/* BudgetState Hospitals — dopecode house style, from vLockin's sheet as
 * BudgetState applies it.
 *
 * Amber goes to three places only: the mark, the selected control, and the
 * focus ring. Data takes the norm scale below: over the Treeknorm on the
 * warm arm (by how far), within it on the cool one, neutral for no report.
 * Roles, not hexes: every colour is a token that resolves per appearance. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #F7F4EF;
  --card: #FFFDFA;
  --hover: #F7F3EC;
  --raised: #F0EBE2;
  --line: #E0D8CB;
  --line-soft: #EFE9E0;
  --text: #17130F;
  --prose: #5C5248;
  --dim: #6B6055;
  --amber: #FFB224;
  --amber-hi: #FFC65C;
  --amber-dn: #E89A12;
  --amber-text: #8F5806;
  --ink: #17130F;
  --ink-card: #1B1712;
  --ink-line: #3A322A;
  --bone: #F4EFE8;
  --ink-dim: #9A8F82;
  /* The headline number: the house's bad red, on Ink in both appearances
     (5.5:1). The one number on the page that is an alarm. */
  --alert: #F2555A;

  /* a wait against the norm: far over, over, within; a light fill for no report */
  --b-over2: #BF2F3B;
  --b-over1: #E5735F;
  --b-under1: #5E93E8;
  --b-none: #DDD5C8;
  /* one series, no judgement: the budget as planned */
  --plan: #BDB2A3;
  /* a share of waits over the norm, hotter as more are over: the deepest
     three steps of vLockin's sequential ramp (its paler two fall under
     2:1 on the card); in the dark the ramp runs from the card to bright */
  --heat1: #E27B69;
  --heat2: #C9464A;
  --heat3: #992331;
  /* the graphs' categorical series, in a fixed order: colour follows the
     thing (a kind of wait, a kind of hospital), never a judgement, so
     neither is the norm's red or blue; the third series is --plan */
  --c1: #773F9B;
  --c2: #96872D;

  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-panel: 12px;
  --r-row: 10px;
  --r-ctl: 8px;
  --r-chip: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #17130F;
    --card: #1B1712;
    --hover: #211C16;
    --raised: #241E18;
    --line: #3A322A;
    --line-soft: #2B241D;
    --text: #F4EFE8;
    --prose: #BDB3A6;
    --dim: #9A8F82;
    --amber-text: #FFB224;
    --ink: #0F0D0A;
    --ink-card: #17130F;
    --b-over2: #EC5B63;
    --b-over1: #A93F37;
    --b-under1: #3A63B8;
    --b-none: #3A322A;
    --plan: #54493E;
    --heat1: #8E3833;
    --heat2: #C4474B;
    --heat3: #F0666C;
    --c1: #834BA8;
    --c2: #8A7B1D;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #17130F;
  --card: #1B1712;
  --hover: #211C16;
  --raised: #241E18;
  --line: #3A322A;
  --line-soft: #2B241D;
  --text: #F4EFE8;
  --prose: #BDB3A6;
  --dim: #9A8F82;
  --amber-text: #FFB224;
  --ink: #0F0D0A;
  --ink-card: #17130F;
  --b-over2: #EC5B63;
  --b-over1: #A93F37;
  --b-under1: #3A63B8;
  --b-none: #3A322A;
  --plan: #54493E;
  --heat1: #8E3833;
  --heat2: #C4474B;
  --heat3: #F0666C;
  --c1: #834BA8;
  --c2: #8A7B1D;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber-text); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: currentColor; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.88em; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: var(--r-ctl); }
:focus-visible { outline: 2px solid var(--amber-text); outline-offset: 2px; border-radius: 4px; }
.muted, .dim { color: var(--dim); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }

/* ── top bar ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ink-line);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 56px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; border: 0; color: var(--bone); flex: none; }
.lockup .mark { width: 32px; height: 32px; color: var(--amber); flex: none; }
/* The name is the lockup: its two words stacked, flush left, the same size
   and weight — BudgetState in bone, the section's word in amber, the mark's
   colour — so the section reads as part of the name, not as a subtitle. */
.lockup-text { display: flex; flex-direction: column; gap: 2px; }
.wordmark { font: 700 16px/1 var(--mono); letter-spacing: -0.04em; color: var(--bone); white-space: nowrap; }
.wordmark-section { color: var(--amber); }
.lockup:hover .wordmark-section { color: var(--amber-hi); }
.nav { display: flex; gap: 16px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-dim); border: 0; font-size: 13px; white-space: nowrap; }
.nav a:hover { color: var(--bone); }
/* The section being read, or the one a page belongs to: bone, on an amber
   rule (the selected control). The padding leaves the rule room in the
   scrolling strip. */
.nav { padding-block: 8px; }
.nav a[aria-current] { color: var(--bone); text-decoration: underline 2px var(--amber); text-underline-offset: 6px; }
/* Another language: its code, set as the theme switch beside it, so a reader
   who does not read this one finds it on every width. */
.lang { flex: none; height: 34px; min-width: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--r-ctl);
  border: 1px solid var(--ink-line); color: var(--ink-dim); font: 700 12px/1 var(--mono); letter-spacing: 0.04em; }
.lang:hover { color: var(--bone); border-bottom-color: var(--ink-line); }
.top-row .lang + .theme { margin-left: -16px; }
.theme { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-ctl);
  background: transparent; border: 1px solid var(--ink-line); color: var(--ink-dim); cursor: pointer; }
.theme:hover { color: var(--bone); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* The maker, named where the maker is named: after the navigation, quiet,
   the same lockup and treatment as the footer's bar. */
.maker-top { flex: none; display: flex; align-items: center; height: 22px; padding-left: 22px;
  border: 0; border-left: 1px solid var(--ink-line); color: var(--ink-dim); opacity: 0.75; line-height: 0; }
.maker-top:hover { opacity: 1; border-left-color: var(--ink-line); }
.maker-top svg { display: block; height: 16px; width: auto; }
@media (max-width: 720px) {
  .nav { display: none; }
  .top-row { gap: 12px; }
  .top-row .lang + .theme { margin-left: -6px; }
  .maker-top { margin-left: auto; padding-left: 0; border-left: 0; }
}
@media (max-width: 400px) { .maker-top svg { height: 13px; } }
/* the narrowest phones keep the language and the theme; the footer names the maker */
@media (max-width: 370px) { .maker-top { display: none; } .top-row .lang { margin-left: auto; } }

/* ── hero: always on ink ─────────────────────────────────────────────── */
.hero { background: var(--ink); color: var(--bone); padding: 72px 0 56px; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-text); }
.hero .eyebrow { color: var(--amber); }
/* The question the page answers, at its head: large and quiet, the mono in
   Ink 300, the one word it turns on in bone. Never amber. */
.hero .ask { margin: 0 0 20px; font: 700 clamp(28px, 4.2vw, 50px)/1.05 var(--mono); letter-spacing: -0.04em; word-spacing: -0.3em; color: var(--ink-dim); }
.hero .ask strong { font-weight: 700; color: var(--bone); }
.hero h1 { margin: 22px 0 0; font-size: clamp(26px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; max-width: 900px; }
.hero h1 .big { display: block; font-size: clamp(88px, 17vw, 196px); line-height: 0.9; letter-spacing: -0.06em; color: var(--alert); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.hero .lede { margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--ink-dim); max-width: 680px; text-wrap: pretty; }
.hero .lede a { color: var(--amber-hi); border-bottom-color: var(--ink-line); }
.hero-foot { margin-top: 28px; font-size: 12px; color: var(--ink-dim); }

.seg-control { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: var(--r-ctl);
  background: var(--card); border: 1px solid var(--line); }
.seg-control button { font: 13px/1 var(--sans); color: var(--dim); background: transparent; border: 0; border-radius: var(--r-chip);
  padding: 8px 12px; cursor: pointer; min-height: 32px; }
.seg-control button:hover { color: var(--text); background: var(--hover); }
.seg-control button[aria-selected="true"] { background: var(--raised); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--amber); }
.hero .seg-control { margin-top: 36px; background: var(--ink-card); border-color: var(--ink-line); }
.hero .seg-control button { color: var(--ink-dim); }
.hero .seg-control button:hover { color: var(--bone); background: #211C16; }
.hero .seg-control button[aria-selected="true"] { background: #241E18; color: var(--bone); }

/* ── maps: gust's Netherlands, the places over it ─────────────────────── */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px 48px; align-items: start; }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-map { max-width: 440px; } }
.hero-map .legend { margin: 12px 0 0; color: var(--ink-dim); }
.map-note { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-dim); max-width: 400px; }
/* On ink, in either appearance: the map in the dark appearance's tokens,
   its scale brightening with how far over the norm, as on a dark page. */
.hero .hero-map { --card: var(--ink); --canvas: var(--ink-card); --line: var(--ink-line); --text: var(--bone); --dim: var(--ink-dim);
  --b-over2: #EC5B63; --b-over1: #A93F37; --b-under1: #3A63B8; --b-none: #4A4037;
  --heat1: #8E3833; --heat2: #C4474B; --heat3: #F0666C; }
.hero .chart.map { background: transparent; border: 0; padding: 0; margin: 0; }
.chart.map { padding: 8px; }
/* A sparkline in a table's row: gust's, the size of a word. */
.chart.spark { display: block; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.chart.spark svg { width: 112px; height: 26px; overflow: hidden; }
.dtable .spark-col { min-width: 132px; }
.dtable td.spark-col small { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.with-map { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 760px) { .with-map { grid-template-columns: minmax(0, 1fr); } .with-map .chart { max-width: 380px; } }

/* ── tiles: the hero's four families of facts ────────────────────────── */
.tiles { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; } }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tfam { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tfam-k { font: 700 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone);
  padding: 0 2px 8px; border-bottom: 1px solid var(--ink-line); }
.tile { background: var(--ink-card); border: 1px solid var(--ink-line); border-radius: var(--r-panel); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-k { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.tile-v { font-size: clamp(26px, 2.8vw, 34px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-v.alarm { color: var(--alert); }
.tile-d { font-size: 12px; color: var(--ink-dim); line-height: 1.45; }
.tile-bar { height: 4px; border-radius: 2px; background: var(--ink-line); overflow: hidden; display: flex; margin-top: 4px; }
.tile-bar i { display: block; height: 100%; background: var(--b-over2); }

/* ── sections ────────────────────────────────────────────────────────── */
.section { padding: 72px 0 8px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.section h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.015em; line-height: 1.15; }
.section h3 { font-size: 17px; letter-spacing: -0.01em; margin: 28px 0 10px; }
.prose { font-size: 15px; color: var(--prose); max-width: 680px; line-height: 1.6; text-wrap: pretty; }
.prose + .prose { margin-top: 10px; }
.note { margin-top: 12px; font-size: 12.5px; line-height: 1.55; color: var(--dim); max-width: 760px; }
.muted { color: var(--dim); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 14px; font-size: 12px; color: var(--prose); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }

/* ── the norm scale: how far over the Treeknorm, or within it ────────── */
.n-over2 { background: var(--b-over2); }
.n-over1 { background: var(--b-over1); }
.n-within { background: var(--b-under1); }
.n-none { background: var(--b-none); }
.sw-plan { background: var(--plan); }
.sw-b-under1 { background: var(--b-under1); } .sw-heat1 { background: var(--heat1); } .sw-heat2 { background: var(--heat2); } .sw-heat3 { background: var(--heat3); }
.sw-b-over1 { background: var(--b-over1); } .sw-b-over2 { background: var(--b-over2); } .sw-b-none { background: var(--b-none); }
.legend-k { font-weight: 600; }
.sw-c1 { background: var(--c1); } .sw-c2 { background: var(--c2); } .sw-text { background: var(--text); }
.days { display: inline-block; min-width: 64px; padding: 2px 8px; border-radius: var(--r-chip); font: 700 12px/1.5 var(--mono);
  text-align: right; white-space: nowrap; color: #fff; }
.days.n-over1, .days.n-none { color: var(--text); }
:root[data-theme="dark"] .days.n-over1 { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .days.n-over1 { color: #fff; } }
/* A share's pill: ink on the palest heat, white on the deeper, ink again on
   the brightest in the dark, where the ramp runs from the card up. */
.days.sw-heat1, .days.sw-b-none { color: var(--text); }
:root[data-theme="dark"] .days.sw-heat3 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .days.sw-heat3 { color: var(--ink); } }
.mark-late { font: 700 10px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--b-over2); }

/* ── panels: highest and lowest ten ──────────────────────────────────── */
.tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tops { grid-template-columns: minmax(0, 1fr); } }
.top-panel { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 20px 14px; }
.top-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--heat1); }
.top-panel.worst::before { background: var(--heat3); }
.top-panel.missed::before { background: var(--b-none); }
.top-panel.missed { grid-column: 1 / -1; }
.top-panel h3 { margin: 0 0 4px; font-size: 20px; }
.top-rule { font-size: 12px; color: var(--prose); margin: 0 0 10px; }
.top-list { list-style: none; margin: 0 -8px; padding: 0; }
.top-list.cols { columns: 2 280px; column-gap: 16px; }
.top-list.cols .trow { grid-template-columns: minmax(0, 1fr); break-inside: avoid; }
.tops + .legend { margin: 12px 0 28px; }
.trow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 8px; }
.trow:hover { background: var(--hover); }
.trow .rk { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.trow .who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trow .who a { font-size: 14px; font-weight: 600; color: var(--text); border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .who small { font: 11px var(--mono); color: var(--dim); }
.trow .sc { font: 700 13px var(--mono); text-align: right; white-space: nowrap; }

/* ── tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th, .dtable td { padding: 9px 12px; text-align: left; vertical-align: top; }
.dtable thead th { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line); background: var(--card); vertical-align: bottom; min-width: 84px; max-width: 200px; }
.dtable thead th:first-child { min-width: 200px; max-width: none; }
.dtable thead th small { text-transform: none; letter-spacing: 0; margin-top: 2px; }
.dtable thead th[data-sort] { cursor: pointer; user-select: none; }
.dtable thead th[data-sort]:hover, .dtable thead th.sorted { color: var(--text); }
.dtable thead th.sorted::after { content: " ↓"; }
.dtable thead th.sorted.asc::after { content: " ↑"; }
.dtable tbody tr { border-top: 1px solid var(--line-soft); }
.dtable tbody tr:hover { background: var(--hover); }
.dtable tbody th { font-weight: 600; min-width: 200px; }
.dtable tbody th a { color: var(--text); border-bottom-color: var(--line); }
/* A row whose name is a link opens that page from anywhere on the row: the
   link's box stretches over the row, its containing block. No script; the
   link keeps its address, its new tab and its place in the tab order. */
.dtable tbody tr, .trow { position: relative; }
.dtable tbody th a::after, .trow .who a::after { content: ""; position: absolute; inset: 0; }
.dtable tbody tr:hover th a { border-bottom-color: currentColor; }
.dtable tbody th a:focus-visible, .trow .who a:focus-visible { outline: 0; }
.dtable tbody th a:focus-visible::after, .trow .who a:focus-visible::after { outline: 2px solid var(--amber-text); outline-offset: -2px; border-radius: 4px; }
.dtable small { display: block; color: var(--dim); font: 11px var(--mono); font-weight: 400; }
.dtable .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.dtable thead th.num { white-space: normal; font-family: var(--mono); min-width: 96px; }
.dtable .num small { font-family: var(--mono); }
.dtable tr.sep th { padding-top: 18px; font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-text); }
.dtable .neg { color: var(--b-over2); }
.dtable td.empty { color: var(--dim); }
.wide { min-width: 880px; }

/* ── picking a treatment ─────────────────────────────────────────────── */
/* Columns, not a grid: the specialisms run from 1 treatment to 20, and a
   grid row is as tall as its longest card. Read down, then across. */
.groups { columns: 300px; column-gap: 16px; }
.group { break-inside: avoid; margin: 0 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px; }
.group h3 { margin: 0 0 8px; font: 700 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.group ul { list-style: none; margin: 0; padding: 0; }
.group li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.group li:first-child { border-top: 0; }
.group li a { color: var(--text); border-bottom-color: var(--line); }
.group li .days { flex-shrink: 0; min-width: 0; font-size: 11px; }
.finder { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 18px; }
.finder label { display: flex; flex-direction: column; gap: 6px; font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.field { min-width: 260px; font: 15px var(--sans); padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); color: var(--text); }
.field:focus { outline: none; border-color: var(--amber-hi); box-shadow: 0 0 0 2px var(--amber-text); }
.finder .hint { font-size: 12px; color: var(--dim); }

/* ── a hospital's page ───────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 36px; }
.locs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.locs li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-row); padding: 12px 14px; font-size: 14px; }
.locs li small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.board ul { list-style: none; margin: 0; padding: 0; }
.board li { padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.board li:first-child { border-top: 0; }
.board li small { display: block; color: var(--dim); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 20px; }
.card h3 { margin-top: 0; }
.alert-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-row);
  background: color-mix(in srgb, var(--b-over2) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--b-over2) 40%, var(--line)); font-size: 14px; }
.hero .alert-line { background: color-mix(in srgb, var(--alert) 12%, var(--ink-card)); border-color: color-mix(in srgb, var(--alert) 45%, var(--ink-line)); color: var(--bone); }
.ico-alert { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--b-over2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero .ico-alert { stroke: var(--alert); }
.crumbs { font-size: 13px; color: var(--ink-dim); margin-bottom: 18px; }
.crumbs a { color: var(--ink-dim); border-bottom-color: var(--ink-line); }

/* ── graphs: drawn at build time, written as SVG (src/chart.rs) ──────── */
/* Each graph is drawn twice: the page shows the one its width takes. Every
   colour is a token class, so a graph turns dark with the page. */
.chart { margin: 0 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 20px 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); }
.chart .draw-narrow { display: none; }
@media (max-width: 720px) {
  .chart { padding: 14px 12px 8px; }
  .chart .draw-wide { display: none; }
  .chart .draw-narrow { display: block; }
}
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin: 28px 0 10px; }
.chart-head h3 { margin: 0; }
.wrap > .chart-head:first-child { margin-top: 0; }
.chart-head .legend { margin: 0; }
.chart + .tops { margin-top: 28px; }
.charts-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .charts-2 { grid-template-columns: minmax(0, 1fr); } }
.charts-2 .chart-head { margin-top: 0; }
/* The readouts: a zone per mark; hovered, its band or cursor and its card. */
.chart .zone { fill: transparent; }
.chart .hit .band { fill: var(--text); opacity: 0; }
.chart .hit .cursor { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart .hit .dot { stroke: var(--card); stroke-width: 2; opacity: 0; }
.chart .hit .tip { opacity: 0; pointer-events: none; }
.chart .hit .ring { fill: none; stroke: var(--text); stroke-width: 2; opacity: 0; }
.chart .hit:hover .band { opacity: 0.06; }
.chart .hit:hover .ring { opacity: 1; }
.chart a { outline: none; }
.chart a:focus-visible .ring, .chart a:focus-visible .tip { opacity: 1; }
.chart .hit:hover .cursor, .chart .hit:hover .dot, .chart .hit:hover .tip { opacity: 1; }
.chart .tip rect:first-child { fill: var(--ink); stroke: var(--ink-line); stroke-width: 1; }
.chart .tip text { fill: var(--bone); }
.chart .tip text.k { fill: var(--ink-dim); }
.chart .f-text { fill: var(--text); } .chart .s-text { stroke: var(--text); } .chart .t-text { stop-color: var(--text); }
.chart .f-dim { fill: var(--dim); } .chart .s-dim { stroke: var(--dim); } .chart .t-dim { stop-color: var(--dim); }
.chart .f-line { fill: var(--line); } .chart .s-line { stroke: var(--line); } .chart .t-line { stop-color: var(--line); }
.chart .f-card { fill: var(--card); } .chart .s-card { stroke: var(--card); } .chart .t-card { stop-color: var(--card); }
.chart .f-canvas { fill: var(--canvas); } .chart .s-canvas { stroke: var(--canvas); } .chart .t-canvas { stop-color: var(--canvas); }
.chart .f-b-over2 { fill: var(--b-over2); } .chart .s-b-over2 { stroke: var(--b-over2); } .chart .t-b-over2 { stop-color: var(--b-over2); }
.chart .f-b-over1 { fill: var(--b-over1); } .chart .s-b-over1 { stroke: var(--b-over1); } .chart .t-b-over1 { stop-color: var(--b-over1); }
.chart .f-b-under1 { fill: var(--b-under1); } .chart .s-b-under1 { stroke: var(--b-under1); } .chart .t-b-under1 { stop-color: var(--b-under1); }
.chart .f-b-none { fill: var(--b-none); } .chart .s-b-none { stroke: var(--b-none); } .chart .t-b-none { stop-color: var(--b-none); }
.chart .f-plan { fill: var(--plan); } .chart .s-plan { stroke: var(--plan); } .chart .t-plan { stop-color: var(--plan); }
.chart .f-heat1 { fill: var(--heat1); } .chart .s-heat1 { stroke: var(--heat1); } .chart .t-heat1 { stop-color: var(--heat1); }
.chart .f-heat2 { fill: var(--heat2); } .chart .s-heat2 { stroke: var(--heat2); } .chart .t-heat2 { stop-color: var(--heat2); }
.chart .f-heat3 { fill: var(--heat3); } .chart .s-heat3 { stroke: var(--heat3); } .chart .t-heat3 { stop-color: var(--heat3); }
.chart .f-c1 { fill: var(--c1); } .chart .s-c1 { stroke: var(--c1); } .chart .t-c1 { stop-color: var(--c1); }
.chart .f-c2 { fill: var(--c2); } .chart .s-c2 { stroke: var(--c2); } .chart .t-c2 { stop-color: var(--c2); }

/* ── method ──────────────────────────────────────────────────────────── */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.method-grid .card p { font-size: 14px; color: var(--prose); line-height: 1.6; }
.method-grid .card p + p { margin-top: 8px; }

/* ── footer ──────────────────────────────────────────────────────────── */
.foot { margin-top: 96px; background: var(--ink); color: var(--ink-dim); padding: 40px 0 36px; }
.foot .lockup .mark { width: 26px; height: 26px; }
.foot .wordmark { font-size: 13px; }
.foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ink-line); font-size: 12px; }
.foot-maker { display: flex; align-items: center; gap: 14px; }
.foot-maker a { display: block; color: var(--ink-dim); opacity: 0.75; line-height: 0; border: 0; }
.foot-maker a:hover { opacity: 1; }
.foot-maker svg { display: block; height: 18px; width: auto; }
