/* Shared design for Reading the Numbers */
:root {
  --ink: #1c241e;
  --muted: #3e4a42;
  --paper: #f7f4ef;
  --card: #fff;
  --green: #1f4d3a;
  --green-mid: #2e6b52;
  --gold: #c5a35a;
  --gold-soft: #ffe08a;
  --link: #1a4f8b;
  --line: #cfc6b8;
  --row: #f4eee4;
  --highlight: #e8f3c9;
  --core: #6a8f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--green);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: var(--green);
  color: var(--paper);
  padding: 1.4rem 0 1rem;
}

.site-kicker {
  margin: 0 0 0.35rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.site-title {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  line-height: 1.15;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-tag {
  margin: 0 0 0.9rem;
  max-width: 42rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-family: Arial, Helvetica, sans-serif;
}

.site-nav a {
  color: var(--gold-soft);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold-soft);
}

main {
  padding: 1.5rem 0 2.5rem;
}

h2 {
  color: var(--green);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.25rem;
  margin: 1.75rem 0 0.75rem;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  color: var(--green);
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.08rem;
  max-width: 46rem;
}

.note,
.try {
  color: var(--muted);
  font-size: 0.96rem;
}

.takeaways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.takeaway,
.card,
.example,
.glossary-block,
.hero,
.message-box {
  background: var(--card);
  border: 1px solid var(--line);
}

.takeaway,
.card {
  padding: 1rem 1.1rem 1.15rem;
}

.takeaway h3,
.card h3 {
  margin-top: 0;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.card a {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
}

figure {
  margin: 0.5rem 0 1.25rem;
}

figcaption {
  font-style: italic;
  margin-bottom: 0.5rem;
  color: #333;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--green-mid);
  color: #fff;
  font-weight: bold;
}

th.core-header,
td.core-col {
  background: var(--highlight);
  font-weight: bold;
  text-align: right;
}

th.core-header {
  background: var(--core);
  color: #fff;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr:nth-child(even) td:not(.core-col) {
  background: var(--row);
}

tr.row-hover td {
  background: #fff3b0 !important;
}

tr.row-hover td.core-col {
  background: #ffb347 !important;
  outline: 2px solid #c45c00;
}

tr.walk-on td {
  background: #cde8ff !important;
}

tr.walk-on td.core-col {
  background: #ffb347 !important;
}

.click-name {
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
}

.tip-header {
  cursor: help;
  text-decoration: underline dashed var(--gold-soft);
}

.added-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--highlight);
  border: 1px solid var(--core);
  padding: 0.05rem 0.3rem;
  vertical-align: middle;
}

.tooltip {
  position: absolute;
  max-width: 300px;
  background: #1f2a22;
  color: #fff;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-family: Arial, Helvetica, sans-serif;
  z-index: 20;
  border-radius: 2px;
}

.tooltip[hidden] {
  display: none;
}

.message-box {
  border: 2px solid var(--green);
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
  min-height: 5rem;
}

.message-box h3 {
  margin: 0 0 0.4rem;
}

.message-box p {
  margin: 0;
}

.example {
  border-left: 6px solid var(--gold);
  padding: 0.4rem 1rem 1rem;
  margin-bottom: 1rem;
}

.example p.clickable {
  cursor: pointer;
}

.example p.clickable:hover {
  background: var(--row);
}

.term-on {
  background: #fff3b0;
  padding: 0 0.15rem;
}

.hero {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.hero-text {
  flex: 1;
}

.hero-text h2 {
  margin-top: 0;
  border: 0;
  padding: 0;
}

.hero-logo {
  height: 1.05em;
  vertical-align: -0.12em;
  margin-right: 0.25rem;
}

.hero-media {
  flex: 0 0 180px;
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
  margin: 1rem 0 1.5rem;
}

.glossary-block {
  padding: 0.75rem 1rem 1rem;
}

dl {
  margin: 0;
}

dt {
  font-weight: bold;
  color: var(--green);
  cursor: pointer;
  margin-top: 0.85rem;
}

dd {
  margin: 0.25rem 0 0 1.15rem;
  color: #333;
  display: none;
}

.site-footer {
  background: var(--green);
  color: var(--paper);
  padding: 1.1rem 0 1.4rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--gold-soft);
}

caption {
  caption-side: top;
  text-align: left;
  font-style: italic;
  margin-bottom: 0.45rem;
}

@media (max-width: 800px) {
  .takeaways,
  .card-row,
  .split,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-media {
    max-width: 220px;
  }

  .site-title {
    font-size: 1.55rem;
  }

  table {
    font-size: 0.8rem;
  }
}
