/* The Crowd of 100. Isotype-style picture statistics: every page is a crowd
   of little people, and the visitor is the one in yellow. Warm newsprint,
   poster ink, one blue for the people below you and one yellow for you.
   Archivo (headings, big numbers) and Public Sans (text), both SIL Open Font
   License 1.1 and served from this site; licenses beside them in /kit/.
   Loaded last on every page, so its tokens win. Embeds do not load it. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/kit/publicsans-400.woff2?v=45870c9f) format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600 800; font-display: swap; src: url(/kit/publicsans-600.woff2?v=2a21fbff) format("woff2"); }
@font-face { font-family: "Archivo Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(/kit/archivo-condensed-800.woff2?v=5cc5bf11) format("woff2"); }
@font-face { font-family: "Archivo Expanded"; font-style: normal; font-weight: 800; font-display: swap; src: url(/kit/archivo-expanded-800.woff2?v=8869b712) format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f3ead7;
  --paper-2: #ebe0c8;
  --card: #fffaf0;
  --ink: #1b2233;
  --ink-soft: #3b4356;
  --ink-faint: #575e6e;
  --line: #cdbf9f;
  --edge: #1b2233;
  --accent: #1d5592;
  --accent-ink: #ffffff;
  --btn: #c23b22;
  --btn-ink: #ffffff;
  --good: #1d6b4f;
  --bad: #a8321c;
  --dark: #1b2233;
  --dark-ink: #f3ead7;
  --dark-soft: #d8ccb2;
  --hi: #f5b700;
  --lo: #2f6aa3;
  --hi-line: #6b6556;
  --l-green: #1d6b4f;
  --l-fog: #8fb1cf;
  --l-hair: #ddd1b6;
  --l-tick: #4a4f5c;
  --l-tail: #ebe0c8;
  --l-grid: rgba(27, 34, 51, 0.05);
  --l-curve: #2f6aa3;
  --l-thin: #b8ad95;
  --shadow: 4px 4px 0 var(--edge);
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --survey-sans: var(--sans);
  --display: "Archivo Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --survey-display: var(--display);
  --num: "Archivo Condensed", "Arial Narrow", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #12161f;
    --paper-2: #171c27;
    --card: #1b2130;
    --ink: #f2e9d6;
    --ink-soft: #d2c9b6;
    --ink-faint: #aaa395;
    --line: #3a4254;
    --edge: #4a5468;
    --accent: #8cbcf0;
    --accent-ink: #12161f;
    --btn: #ff8466;
    --btn-ink: #12161f;
    --good: #5cc79a;
    --bad: #ff8a70;
    --dark: #0b0e14;
    --dark-ink: #f2e9d6;
    --dark-soft: #bdb4a2;
    --lo: #6ea8e0;
    --hi-line: #9a9384;
    --l-green: #5cc79a;
    --l-fog: #3d5f80;
    --l-hair: #2c3343;
    --l-tick: #b9b2a3;
    --l-tail: #232a3a;
    --l-grid: rgba(242, 233, 214, 0.05);
    --l-curve: #8cbcf0;
    --l-thin: #4a5263;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12161f; --paper-2: #171c27; --card: #1b2130; --ink: #f2e9d6; --ink-soft: #d2c9b6; --ink-faint: #aaa395;
  --line: #3a4254; --edge: #4a5468; --accent: #8cbcf0; --accent-ink: #12161f; --btn: #ff8466; --btn-ink: #12161f;
  --good: #5cc79a; --bad: #ff8a70; --dark: #0b0e14; --dark-ink: #f2e9d6; --dark-soft: #bdb4a2; --lo: #6ea8e0; --hi-line: #9a9384;
  --l-green: #5cc79a; --l-fog: #3d5f80; --l-hair: #2c3343; --l-tick: #b9b2a3; --l-tail: #232a3a; --l-grid: rgba(242, 233, 214, 0.05);
  --l-curve: #8cbcf0; --l-thin: #4a5263;
}

/* ---------- the page ---------- */
body { font-family: var(--sans); background: var(--paper); color: var(--ink); }
main, .site-footer { font-family: var(--sans); }
h1, h2, h3, main h1, main h2, main h3 { font-family: var(--display); font-weight: 800; letter-spacing: 0; }
main h1 { font-size: clamp(2.1rem, 7.4vw, 3.4rem); line-height: 1.02; }
/* a highlighter stroke under every page title */
main h1 { text-decoration: underline; text-decoration-color: var(--hi); text-decoration-thickness: 0.2em; text-underline-offset: 0.06em; text-decoration-skip-ink: none; }
main h2 { font-size: 1.6rem; line-height: 1.1; }
main h2::before { content: ""; display: inline-block; width: 0.5em; height: 0.95em; margin-right: 0.35em; vertical-align: -0.08em; background: var(--lo); -webkit-mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; }
.card h2::before, .coh h2::before, .story-card h2::before, .methodology h2::before { display: none; }
main h3 { font-size: 1.2rem; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
.fine { color: var(--ink-faint); }
.field input:focus-visible, .field select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible,
.money-field input:focus-visible, .age-pick input:focus-visible, .pick select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--hi); color: #1b2233; }
.skip-link { background: var(--ink); color: var(--paper); }

/* ---------- header: the brand and the parade ---------- */
.site-head { align-items: center; gap: 0.2rem 1.4rem; padding: 0.7rem 1.25rem 0.35rem; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: 0; min-height: var(--tap); }
.brand-mark { display: inline-flex; align-items: flex-end; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--hi); border: 2px solid var(--ink); margin-right: 0.5rem; padding-bottom: 0.05em; overflow: hidden; vertical-align: middle; }
.brand-mark svg { width: 0.62em; height: 1.18em; fill: #1b2233; }
.brand-sub { font-family: var(--sans); font-weight: 600; font-size: 0.85rem; color: var(--ink-faint); margin-left: 0.6rem; }
.site-head nav { gap: 0.3rem 0.4rem; }
.site-head nav a { padding: 0 0.75rem; border-radius: 999px; border: 2px solid transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-head nav a:hover { border-color: var(--ink); }
.site-head nav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* a crowd marching under the header; one of them is you */
.parade { position: relative; max-width: 1060px; height: 30px; margin: 0 auto; overflow: hidden; }
.parade::before { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 0; height: 26px; background: var(--line); -webkit-mask: url(/kit/fig.svg?v=91150396) 0 100% / 14px 26px repeat-x; mask: url(/kit/fig.svg?v=91150396) 0 100% / 14px 26px repeat-x; }
.parade::after { content: ""; position: absolute; left: calc(1.25rem + 14px * 17); bottom: 0; width: 14px; height: 26px; background: var(--hi); -webkit-mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; animation: hop 2.8s ease-in-out 1s infinite; }
@media (min-width: 700px) { .parade::after { left: calc(1.25rem + 14px * 41); } }
.parade { border-bottom: 3px solid var(--ink); }
@keyframes hop { 0%, 80%, 100% { transform: translateY(0); } 88% { transform: translateY(-5px); } }

/* ---------- hero ---------- */
.hero { padding: 1.4rem 0 0.8rem; }
.st-hero { padding: 1.1rem 0 0.2rem; }
.hero .sub { color: var(--ink-soft); }
.kicker { display: inline-block; font-family: var(--sans); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--card); background: var(--ink); padding: 0.28rem 0.6rem; border-radius: 4px; margin: 0 0 0.55rem; transform: rotate(-1.2deg); }

/* ---------- cards, buttons, chips ---------- */
.card { background: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.35rem; }
.field label { color: var(--ink-soft); font-family: var(--sans); }
.field input, .field select { background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; min-height: var(--tap); }
.field input { font-family: var(--num); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.01em; }
.field input::placeholder { color: var(--ink-faint); opacity: 1; font-weight: 800; }
.btn { background: var(--btn); color: var(--btn-ink); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 3px 3px 0 var(--edge); padding: 0.6rem 1.4rem; min-height: var(--tap); font-family: var(--sans); font-weight: 800; transition: transform 0.08s ease, box-shadow 0.08s ease; }
.btn, .btn:hover { text-decoration: none; }
.btn:hover { filter: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--edge); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.btn.ghost { background: var(--card); color: var(--ink); border: 2px solid var(--ink); }
.chip { font-family: var(--num); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); transition: transform 0.08s ease, box-shadow 0.08s ease; }
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--edge); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--hi); color: #1b2233; border: 2px solid var(--ink); }
.chips.measures .chip { font-family: var(--sans); font-size: 0.95rem; }
.seg { border: 2px solid var(--ink); border-radius: 999px; }
.seg label { background: var(--card); color: var(--ink); }
.seg label + label { border-left: 2px solid var(--ink); }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.pick select, .age-pick input { background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; }
.age-pick input { font-family: var(--num); font-weight: 800; }
.age-pick input::placeholder { font-weight: 800; }
.amount-row select, .table-filter input, .share-card input, .embed-code { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.suggest-list { background: var(--card); border: 2px solid var(--ink); }
.suggest-list button { color: var(--ink); }
.suggest-list button:hover, .suggest-list button.sel { background: var(--paper-2); }

/* the money field: a big friendly number on a ruled line */
.money-field { border-bottom: 3px solid var(--ink); max-width: 19rem; }
.money-field span, .money-field input { font-family: var(--num); font-weight: 800; font-size: 2.1rem; letter-spacing: 0.01em; }
.money-field span { color: var(--lo); }
.money-field input::placeholder { color: var(--ink-faint); opacity: 1; }
.fill label { font-family: var(--sans); font-weight: 800; }
.card form > .hint { font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.6rem; }
.counts summary::before, .faq-item summary::after { color: var(--btn); font-family: var(--display); }

/* ---------- readouts and big friendly numbers ---------- */
.readout { background: var(--dark); color: var(--dark-ink); border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; padding: 0; }
.readout .mono { font-family: var(--sans); }
.readout .cell { border-right: 0; border-top: 6px solid var(--lo); padding: 0.75rem 1.1rem 0.85rem; flex: 1 1 7.5rem; }
.readout .cell:nth-child(2) { border-top-color: var(--btn); }
.readout .cell:nth-child(3) { border-top-color: var(--hi); }
.readout .k { color: var(--dark-soft); font-weight: 600; }
.readout .v { font-family: var(--num); font-size: 1.85rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.1; }
.readout .v.up { color: #7ee0a8; }
.readout .v.down { color: #ffaa98; }
.swipe { font-family: "Archivo Expanded", var(--display); }
.swipe::before { background: var(--hi); }
.says { font-family: var(--sans); }
.coh .o, .rank-n { font-family: var(--num); font-weight: 800; }
.tier-gap { font-family: var(--num); font-weight: 800; font-size: 1.1rem; border: 2px solid var(--l-green); background: var(--card); color: var(--l-green); }

/* ---------- the crowd of 100 ---------- */
.crowd { margin: 0.4rem 0 1rem; padding: 0.8rem 0.9rem 0.55rem; background: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); }
.card .crowd { margin: 1.2rem 0 0.2rem; box-shadow: none; border-width: 2px; border-style: dashed; border-color: var(--line); padding: 0.7rem 0.6rem 0.4rem; }
.crowd-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.45rem; margin: 0 0 0.2rem; max-width: none; line-height: 1.1; }
.crowd-n { font-family: var(--num); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); }
.crowd[data-state] .crowd-n { background: linear-gradient(transparent 55%, var(--hi) 55%, var(--hi) 92%, transparent 92%); padding: 0 0.08em; }
.crowd:not([data-state]) .crowd-n, .crowd[data-state=""] .crowd-n { color: var(--btn); background: none; }
.crowd-of { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.crowd-who { flex: 1 1 100%; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); }
.crowd-plot { position: relative; }
.crowd-svg { display: block; width: 100%; height: auto; overflow: visible; }
.crowd-svg .f { fill: var(--paper-2); stroke: var(--hi-line); stroke-width: 1.3; transform-box: fill-box; transform-origin: 50% 100%; }
.crowd-svg .lo { fill: var(--lo); stroke: none; }
.crowd-svg .hi { fill: transparent; stroke: var(--hi-line); }
.crowd-svg .you, .crowd-svg .top { fill: var(--hi); stroke: var(--ink); stroke-width: 1.6; }
.crowd-svg .flag { stroke: var(--ink); stroke-width: 1.6; }
.crowd-svg .pennant { fill: var(--btn); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.crowd-svg .you-g { animation: you-hop 0.5s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
.crowd-enter .crowd-svg .lo { animation: fill-in 0.35s ease-out both; animation-delay: calc(var(--i) * 6ms); }
@keyframes you-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-7px); } 100% { transform: translateY(0); } }
@keyframes fill-in { from { fill: var(--paper-2); transform: scale(0.82); } to { transform: scale(1); } }
/* before a reading, the crowd breathes, one row at a time */
.crowd:not([data-state]) .crowd-svg .f, .crowd[data-state=""] .crowd-svg .f { animation: idle 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * 36ms); }
@keyframes idle { 0%, 70%, 100% { fill: var(--paper-2); } 85% { fill: var(--l-fog); } }
.crowd-ends { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.3rem 0 0; max-width: none; font-size: 0.75rem; font-weight: 600; color: var(--ink-faint); }
.crowd-key { display: inline-flex; align-items: center; gap: 0.3rem; }
.crowd-key i { display: inline-block; width: 0.55rem; height: 1rem; -webkit-mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; margin-left: 0.25rem; }
.crowd-key .k-lo { background: var(--lo); }
.crowd-key .k-you { background: var(--hi); }
.crowd-key .k-hi { background: var(--hi-line); }
@media (max-width: 420px) { .crowd-key { order: 3; flex: 1 1 100%; justify-content: center; } }

/* ---------- the line of 100 ---------- */
.l100 figcaption { font-family: var(--display); font-size: 1.3rem; }
.l100-plot { background-color: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow); }
.l100-svg .t { font-family: var(--num); font-weight: 800; letter-spacing: 0.02em; fill: var(--ink-soft); }
.l100-svg .lab { fill: var(--ink); }
.l100-svg .curve { stroke: var(--l-curve); stroke-width: 2.5; }
.l100-svg .area { fill: var(--l-fog); fill-opacity: 0.4; }
.l100-svg .base { stroke: var(--ink); }
.l100-svg .tk { fill: var(--lo); }
.l100-svg .tk.thin { fill: var(--l-thin); }
.l100-svg .wait, .l100-svg .link { stroke: var(--ink); }
.l100-svg .caret { fill: var(--ink); }
.l100-svg .tiertk, .l100-svg .tierdot { fill: var(--card); }
.l100-svg .you, .mini .you, .l100-svg .youdot { fill: var(--hi); stroke: var(--ink); }
.mini .tk { fill: var(--lo); }
.mini .base { stroke: var(--ink); }
.coh { background: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: 3px 3px 0 var(--edge); }
.coh .k { font-family: var(--sans); font-weight: 800; color: var(--ink-faint); }
.strip-svg .tk { fill: var(--lo); }
.strip-svg .me { fill: var(--btn); }
.strip-svg .tie { fill: var(--card); stroke: var(--ink); }
.strip-svg .base { stroke: var(--ink); }
.strip-svg .usln, .strip-svg .bracket { stroke: var(--ink-soft); }
.strip-us, .strip-me, .strip-ends, .receipt { font-family: var(--sans); }
.strip-me { color: var(--bad); font-weight: 800; }
.st-stats dd { font-family: var(--num); font-size: 1.2rem; }
.st-stats > div, .st-stats, .receipt { border-color: var(--line); }

/* ---------- tables, lists, prose ---------- */
table.data { background: var(--card); border: 2px solid var(--edge); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.data th { background: var(--ink); color: var(--paper); border-bottom: 0; font-family: var(--sans); }
table.data th .th-sort:hover { color: inherit; text-decoration: underline; }
table.data td { border-bottom: 1px solid var(--line); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:nth-child(even) td { background: var(--paper); }
table.data td.mono, table.data .num { font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; }
[aria-sort="ascending"] .th-arrow::before, [aria-sort="descending"] .th-arrow::before { color: inherit; }
.table-scroll { border-radius: 12px; }
.year-cell, .related li a, ul.nb a, .story-card { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 2px 2px 0 var(--edge); color: var(--ink); text-decoration: none; }
.year-cell:hover, .related li a:hover, ul.nb a:hover, .story-card:hover { border-color: var(--ink); background: var(--paper-2); }
ul.nb .mono { font-family: var(--num); font-weight: 800; color: var(--lo); font-size: 1rem; }
.faq-item { border-bottom: 2px dashed var(--line); }
.methodology { background: var(--paper-2); border: 2px solid var(--line); border-radius: 14px; }
.methodology p { color: var(--ink-soft); }
.story-hero { background: var(--dark); color: var(--dark-ink); border: 2px solid var(--edge); border-radius: 14px; }
.disclaimer { border-top: 2px dashed var(--line); }
code { font-size: 0.92em; background: var(--paper-2); padding: 0 0.25em; border-radius: 4px; }

/* ---------- reading pages (about, privacy, terms) ---------- */
main > ul { max-width: 70ch; margin: 0.8rem 0; padding: 0; list-style: none; }
main > ul > li { position: relative; margin: 0.45rem 0; padding: 0.55rem 0.8rem 0.55rem 2rem; background: var(--card); border: 2px solid var(--line); border-radius: 10px; }
main > ul > li::before { content: ""; position: absolute; left: 0.7rem; top: 0.75rem; width: 0.55rem; height: 1rem; background: var(--lo); -webkit-mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; mask: url(/kit/fig.svg?v=91150396) center / contain no-repeat; }
main > h2 { margin-top: 2rem; }
#count-off { font: inherit; font-weight: 800; padding: 0.5rem 1.2rem; min-height: var(--tap); border: 2px solid var(--edge); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: 2px 2px 0 var(--edge); cursor: pointer; }
#count-off:hover { background: var(--paper-2); }
.hero .btn { display: inline-flex; align-items: center; margin-top: 0.6rem; }

/* ---------- 404: one place in the crowd is empty ---------- */
.lost { position: relative; height: 64px; width: 100%; width: round(down, min(100%, 450px), 30px); margin: 1.4rem 0 0.4rem; }
.lost::before { content: ""; position: absolute; inset: 0; background: var(--lo); -webkit-mask: url(/kit/fig.svg?v=91150396) 0 100% / 30px 58px repeat-x; mask: url(/kit/fig.svg?v=91150396) 0 100% / 30px 58px repeat-x; }
.lost::after { content: "?"; position: absolute; left: 150px; bottom: 0; width: 30px; height: 58px; display: flex; align-items: center; justify-content: center; background: var(--paper); border: 2px dashed var(--ink-faint); border-radius: 8px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--btn); }

/* ---------- footer: the crowd goes home ---------- */
.site-footer { position: relative; border-top: 3px solid var(--ink); margin-top: 3rem; }
.site-footer::before { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: -29px; height: 26px; background: var(--line); -webkit-mask: url(/kit/fig.svg?v=91150396) 0 100% / 14px 26px repeat-x; mask: url(/kit/fig.svg?v=91150396) 0 100% / 14px 26px repeat-x; }
.site-footer nav a { color: var(--ink); font-weight: 600; }

/* ---------- phones: the calculator before the reading matter ---------- */
/* Where a strip of headline numbers stands between the title and the
   calculator, a phone shows the title, then the calculator, then the copy and
   the numbers. Only the order on screen changes; the page reads in the same
   order as before. Pages that answer first in copy keep their order. */
@media (max-width: 760px) {
  main:has(> section.calc-grid):has(> .readout) { display: flex; flex-direction: column; }
  main:has(> section.calc-grid):has(> .readout) > section.hero { display: contents; }
  main:has(> section.calc-grid):has(> .readout) > section.hero > h1 { order: -2; margin: 1rem 0 0.9rem; }
  main:has(> section.calc-grid):has(> .readout) > section.calc-grid { order: -1; }
  main:has(> section.calc-grid):has(> .readout) > section.hero > p { margin: 0.6rem 0; }
  main:has(> section.calc-grid):has(> .readout) > section.hero > p:first-of-type { margin-top: 1.6rem; }
  .card { padding: 1rem 1.05rem; }
  .card h2 { font-size: 1.2rem; }
  .field { margin: 0.6rem 0; }
  .brand { font-size: 1.3rem; }
  .site-head nav a { padding: 0 0.6rem; font-size: 0.92rem; }
  .brand-sub { display: none; }
  .site-head { padding-top: 0.5rem; }
  .site-head nav { margin-left: -0.6rem; gap: 0.2rem; }
}
@media (max-width: 400px) {
  main h1 { font-size: 1.95rem; }
  .hero { padding-top: 1rem; }
  .hero .sub { font-size: 1rem; line-height: 1.5; }
}
@media (max-width: 360px) {
  .site-head nav a { padding: 0 0.42rem; font-size: 0.86rem; }
}
/* wide screens: the three headline numbers stand beside the title */
@media (min-width: 1000px) {
  main:has(> section.calc-grid):has(> .readout) { display: grid; grid-template-columns: minmax(0, 1fr) 290px; column-gap: 2.6rem; }
  main:has(> section.calc-grid):has(> .readout) > * { grid-column: 1 / -1; }
  main:has(> section.calc-grid):has(> .readout) > section.hero { grid-column: 1; }
  main:has(> section.calc-grid):has(> .readout) > .readout { grid-column: 2; grid-row: 1; align-self: start; margin-top: 1.4rem; transform: rotate(1.2deg); }
  main:has(> section.calc-grid):has(> .readout) > .readout .mono { flex-direction: column; }
  main:has(> section.calc-grid):has(> .readout) > .readout .cell { flex: 0 0 auto; }
  main:has(> section.calc-grid):has(> .readout) > .readout .v { font-size: 2.2rem; }
}

/* ---------- reduced motion ---------- */
/* base.css stops animations on elements; the parade and the crowd also move
   in pseudo-elements and SVG, so they stop here too. */
@media (prefers-reduced-motion: reduce) {
  .parade::after, .crowd-svg *, .crowd-svg .you-g, .btn, .chip { animation: none !important; transition: none !important; }
  .btn:hover, .chip:hover, .btn:active { transform: none; }
}

/* ---------- print ---------- */
/* Paper is white whatever the screen's colour scheme: printing resets every
   ink and colour token to the light palette above. Browsers drop backgrounds
   when they print, so text that sits on a dark fill prints in ink on a light
   fill instead. */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme] {
    color-scheme: light;
    --paper: #f3ead7; --paper-2: #ebe0c8; --card: #fffaf0; --ink: #1b2233; --ink-soft: #3b4356; --ink-faint: #575e6e;
    --line: #cdbf9f; --edge: #1b2233; --accent: #1d5592; --accent-ink: #ffffff; --btn: #c23b22; --btn-ink: #ffffff;
    --good: #1d6b4f; --bad: #a8321c; --dark: #1b2233; --dark-ink: #f3ead7; --dark-soft: #d8ccb2; --hi: #f5b700; --lo: #2f6aa3; --hi-line: #6b6556;
    --l-green: #1d6b4f; --l-fog: #8fb1cf; --l-hair: #ddd1b6; --l-tick: #4a4f5c; --l-tail: #ebe0c8; --l-grid: rgba(27, 34, 51, 0.05);
    --l-curve: #2f6aa3; --l-thin: #b8ad95;
    --accent-ink: #1b2233; --btn-ink: #1b2233; --dark: #fffaf0; --dark-ink: #1b2233; --dark-soft: #3b4356;
  }
  .btn, .kicker, table.data th, .site-head nav a[aria-current="page"], .seg label:has(input:checked) { background: var(--card); color: var(--ink); }
  .readout .v.down { color: var(--bad); }
}
