:root {
  --bg: #fdfbf7;
  --text: #24211c;
  --muted: #6b645a;
  --accent: #b4500f;
  --border: #e4ddd2;
  --card: #f5f0e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1915;
    --text: #ece7df;
    --muted: #a39a8d;
    --accent: #f08a3e;
    --border: #3a352d;
    --card: #262119;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}
.site-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.site-header a {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.site-header .tag {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: system-ui, sans-serif;
}
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
h1, h2, h3 { line-height: 1.25; }
a { color: var(--accent); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.card h2 { margin-top: 0; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; }
input, select, button {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
button { cursor: pointer; background: var(--accent); color: #fff; border: none; }
.disclosure {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: system-ui, sans-serif;
  text-align: center;
}

/* ---- calculator ------------------------------------------------------- */
.lede { font-size: 1.1rem; }
.small { font-size: 0.9rem; color: var(--muted); }
fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 1rem 0;
  padding: 0.5rem 1rem 1rem;
}
legend { font-weight: bold; padding: 0 0.4rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}
.grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
}
.grid .hint { color: var(--muted); font-size: 0.82rem; }
.grid input { width: 100%; }
.example-note {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}
.example-note button {
  padding: 0.15rem 0.5rem;
  font-size: 0.85rem;
}
.headline { text-align: center; }
.headline-label {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.headline-figure {
  margin: 0.2rem 0;
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent);
  line-height: 1.1;
}
.headline-figure.blanked { color: var(--muted); font-size: 2rem; }
.headline-sub {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}
#warnings p {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 6px 6px 0;
}
#warnings p.note { border-left-color: var(--muted); }
td, th { vertical-align: top; }
td.how, .how {
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}
tr.emphasis th, tr.emphasis td { background: var(--card); font-weight: bold; }
.blanked { color: var(--muted); }
table { margin-bottom: 1.5rem; }
#scenarios th:first-child { font-weight: normal; }
@media (max-width: 32rem) {
  table, #chain .how { font-size: 0.9rem; }
  .headline-figure { font-size: 2.4rem; }
}

.scroller { overflow-x: auto; margin-bottom: 1.5rem; }
.scroller table { margin-bottom: 0; }
