/* Miruvor — calm, legible, low-glare. Built for readers with brain fog and light sensitivity:
   large type, Atkinson Hyperlegible Next for text, Cormorant Garamond for display,
   a sage day palette and a "dim" night palette with text kept below pure white. */

:root {
  --paper: #F2F6F1;      /* Mist: ground */
  --band: #E7EDE5;       /* Fern: bands, panels */
  --surface: #F9FBF8;    /* Frost: cards */
  --surface-2: #E7EDE5;
  --ink: #1A2B23;        /* Evergreen */
  --ink-2: #42514A;      /* Lichen */
  --ink-3: #596760;      /* Moss */
  --rule: #CED7D1;
  --rule-strong: #B5C1BA;
  --rule-soft: #DDE4DF;
  --accent: #2D583D;     /* Deep sage: links, icons */
  --btn: #1F3D2D;        /* Forest: filled buttons */
  --btn-ink: #F2F6F1;
  --accent-soft: #DFECE1;
  --line: #729779;       /* Sage: linework only */
  --star: #C4A76B;       /* Starlight: stars only */
  --star-line: #7B5E2E;
  --gold: #7B5E2E;
  --warn: #9A4A2C;
  --warn-soft: #F3E3DA;

  /* outcome ramp: ordinal greens + two status marks */
  --o-full: #1F3D2D;
  --o-near-full: #3F7152;
  --o-substantial: #6F9C7C;
  --o-partial: #A9C6B1;
  --o-relapsed: #B0603A;
  --o-none: #B5C1BA;

  --serif: "Cormorant Garamond", "Hoefler Text", Garamond, Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 22px 44px -26px rgba(26, 43, 35, .5);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1B1E; --band: #112124; --surface: #18282B; --surface-2: #1C2F32;
    --ink: #C5D0CF; --ink-2: #A8B4B3; --ink-3: #919E9D;
    --rule: #2C3B3E; --rule-strong: #3F5153; --rule-soft: #223235;
    --accent: #A0CAAD; --btn: #A2C9AE; --btn-ink: #0D1B1E; --accent-soft: #1C332E;
    --line: #8AB799; --star: #D7BA7D; --star-line: #D7BA7D; --gold: #D7BA7D;
    --warn: #E09A7A; --warn-soft: #33221C;
    --o-full: #A2C9AE; --o-near-full: #7FAF8E; --o-substantial: #5A8A6A; --o-partial: #3A6150;
    --o-relapsed: #D08A68; --o-none: #4A5A5C;
    --shadow: 0 22px 44px -26px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .day-only { display: none; }
  :root:not([data-theme="light"]) .dim-only { display: block; }
}
:root[data-theme="dark"] {
  --paper: #0D1B1E; --band: #112124; --surface: #18282B; --surface-2: #1C2F32;
  --ink: #C5D0CF; --ink-2: #A8B4B3; --ink-3: #919E9D;
  --rule: #2C3B3E; --rule-strong: #3F5153; --rule-soft: #223235;
  --accent: #A0CAAD; --btn: #A2C9AE; --btn-ink: #0D1B1E; --accent-soft: #1C332E;
  --line: #8AB799; --star: #D7BA7D; --star-line: #D7BA7D; --gold: #D7BA7D;
  --warn: #E09A7A; --warn-soft: #33221C;
  --o-full: #A2C9AE; --o-near-full: #7FAF8E; --o-substantial: #5A8A6A; --o-partial: #3A6150;
  --o-relapsed: #D08A68; --o-none: #4A5A5C;
  --shadow: 0 22px 44px -26px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
.dim-only { display: none; }
:root[data-theme="dark"] .day-only { display: none; }
:root[data-theme="dark"] .dim-only { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.125rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.06; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 4.6vw, 4.25rem); line-height: 1.04; }
h2 { font-size: clamp(2.1rem, 3.6vw, 3.375rem); }
h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
h1 em, h2 em { font-style: italic; }
p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 40px; }
.narrow { max-width: 860px; }
.muted { color: var(--ink-2); }
.small { font-size: .95rem; }
.tiny { font-size: .875rem; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .6rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .wrap { padding-inline: 20px; } }

/* brand mark: a drop of cordial that is also a leaf, with a star */
.mk-fill { fill: var(--accent-soft); stroke: var(--accent); }
.mk-vein { fill: none; stroke: var(--accent); }
.mk-star { fill: var(--star); }
.orn { display: block; margin: 0 auto; width: 240px; height: 24px; }
.orn .r { stroke: var(--rule-strong); fill: none; }
.star-ico { flex: none; fill: var(--star); stroke: var(--star-line); stroke-width: .6; }

/* header ------------------------------------------------------------------ */
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand svg { flex: none; width: 38px; height: 38px; }
.brand span { font-family: var(--serif); font-size: 31px; font-weight: 500; letter-spacing: .04em; line-height: 1; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink); text-decoration: none; font-size: 1rem; }
.nav a:hover { text-decoration: underline; text-underline-offset: 8px; text-decoration-color: var(--line); }
.nav a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; text-decoration-color: var(--line); }
.theme-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px; font: inherit; font-size: .94rem; color: var(--ink); background: transparent; border: 1px solid var(--rule-strong); border-radius: 999px; cursor: pointer; }
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 20px; height: 20px; flex: none; }
.theme-btn .ico { stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .lab-dim { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .lab-day { display: none; }
  :root:not([data-theme="light"]) .theme-btn .lab-dim { display: inline-flex; }
}
:root[data-theme="dark"] .theme-btn .lab-day { display: none; }
:root[data-theme="dark"] .theme-btn .lab-dim { display: inline-flex; }
.theme-btn .lab-day, .theme-btn .lab-dim { align-items: center; gap: 10px; }
@media (max-width: 860px) {
  .site-head .wrap { gap: 8px 16px; padding-block: 16px; }
  .nav { order: 3; width: 100%; margin-left: -14px; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { white-space: nowrap; }
}

/* hero -------------------------------------------------------------------- */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px 72px; padding-block: 24px 104px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(3rem, 5.8vw, 5.375rem); line-height: 1.02; letter-spacing: -.01em; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lede { max-width: 32em; font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 6px; }
.hero-search { display: flex; gap: .5rem; max-width: 620px; }
.hero-search input { flex: 1; }
.hero-stats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: .94rem; color: var(--ink-3); }
.hero-stats b { color: var(--ink); font-family: var(--serif); font-size: 1.6rem; font-weight: 500; margin-right: .35rem; }
.hero-art { flex: 1 1 420px; max-width: 520px; min-width: 0; position: relative; padding-left: 40px; }
.hero-art > svg { width: 100%; height: auto; overflow: hidden; vertical-align: top; }
.hero-card { position: absolute; left: 0; bottom: 52px; width: 290px; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.hero-card:hover { border-color: var(--accent); color: var(--ink); }
.hero-card .k { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero-card .t { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.15; }
.hero-card .f { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; color: var(--ink-2); }
@media (max-width: 720px) {
  .hero .wrap { padding-bottom: 64px; }
  .hero-art { padding-left: 0; }
  .hero-card { position: relative; left: auto; bottom: auto; width: auto; margin-top: -40px; margin-inline: 12px; }
}

/* bands & sections -------------------------------------------------------- */
.band { background: var(--band); border-block: 1px solid var(--rule); }
.section { padding-block: clamp(64px, 8vw, 112px); }
.section-intro { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; margin-bottom: 48px; }
.section-intro p { max-width: 36em; color: var(--ink-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); margin-top: 12px; max-width: 36em; }
.section-head > a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 600; text-underline-offset: 6px; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 40px; }
.points > div { display: flex; flex-direction: column; gap: 14px; padding-top: 26px; border-top: 1px solid var(--rule-strong); }
.points h3 { font-size: 1.8rem; }
.points p { font-size: 1.0625rem; color: var(--ink-2); }

/* controls ---------------------------------------------------------------- */
input[type="search"], input[type="text"], select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 1.1rem; min-height: 48px; min-width: 0;
}
input[type="search"]::placeholder { color: var(--ink-3); }
select { padding-right: 2.4rem; font-weight: 600; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.btn { font: inherit; font-weight: 600; font-size: 1.0625rem; letter-spacing: .01em; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px; border: 1.5px solid var(--btn); background: var(--btn); color: var(--btn-ink); border-radius: 999px; cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--btn-ink); filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.btn.ghost:hover { border-color: var(--accent); filter: none; color: var(--ink); }
.btn.sm { min-height: 44px; padding: 0 18px; font-size: .94rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.link-strong { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 1.0625rem; font-weight: 600; text-underline-offset: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .94rem; display: inline-flex; align-items: center; min-height: 44px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); padding: 0 16px; border-radius: 999px; cursor: pointer; line-height: 1.3; text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); font-weight: 600; }
.chip .c { color: var(--ink-3); font-size: .82em; margin-left: .35rem; }
.chip[aria-pressed="true"] .c { color: inherit; opacity: .8; }

.field-label { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin-bottom: .6rem; }
.field-hint { font-family: var(--sans); font-size: .875rem; font-weight: 400; color: var(--ink-3); }

/* cards & panels ---------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.panel h2 { font-size: 2rem; }

.tile { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 24px 20px; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.tile:hover { border-color: var(--accent); color: var(--ink); }
.tile h3 { font-size: 1.6rem; font-weight: 500; }
.tile .meta { color: var(--ink-3); font-size: .94rem; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); }

/* explorer ---------------------------------------------------------------- */
.explorer { display: grid; grid-template-columns: 320px 1fr; gap: 40px 56px; align-items: start; }
.explorer-controls { position: sticky; top: 24px; background: transparent; border: 0; padding: 0; }
.explorer-controls > * + * { margin-top: 28px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.seg button { font: inherit; font-size: .94rem; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.seg button:hover { border-color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; cursor: pointer; min-height: 44px; }
.check input { margin-top: .2rem; accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.match-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.match-line strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; }
@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
  .explorer-controls { position: static; }
}

/* treatment ranking rows */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(140px, 1.6fr) 4.8rem 4.8rem; gap: .4rem 1rem; align-items: center; padding: .9rem .25rem; border-top: 1px solid var(--rule-soft); }
.rank li.head { border-top: 0; padding-block: 0 .5rem; font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.rank li.head span:nth-child(n+3) { text-align: right; }
.rank .name a { color: var(--ink); text-decoration: none; font-weight: 600; }
.rank .name a:hover { color: var(--accent); text-decoration: underline; }
.rank .name .sub { display: block; font-size: .875rem; color: var(--ink-3); }
.rank .stat { text-align: right; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.rank .stat small { display: block; font-size: .72rem; color: var(--ink-3); }
.rank .few { color: var(--ink-3); }
.rank .warn { color: var(--warn); }
@media (max-width: 620px) {
  .rank li { grid-template-columns: 1fr 4rem 4rem; }
  .rank li .mix-cell { grid-column: 1 / -1; grid-row: 2; }
  .rank li.head span:nth-child(2) { display: none; }
}
.sortbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .94rem; color: var(--ink-2); }
.sortbar select { min-height: 44px; font-size: .94rem; }

/* outcome bars ------------------------------------------------------------ */
.mix { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: transparent; }
.mix.lg { height: 22px; border-radius: 8px; }
.mix i { display: block; min-width: 2px; }
.o-full { background: var(--o-full); }
.o-near-full { background: var(--o-near-full); }
.o-substantial { background: var(--o-substantial); }
.o-partial { background: var(--o-partial); }
.o-relapsed { background: var(--o-relapsed); }
.o-none { background: var(--o-none); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .875rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }

.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.pill.outline { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tag { display: inline-flex; align-items: center; min-height: 40px; font-size: .94rem; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink); text-decoration: none; background: transparent; }
a.tag:hover { border-color: var(--accent); color: var(--ink); }
.tag.strong { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* stat tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }
.kpi .v { font-family: var(--serif); font-size: 2.75rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .94rem; color: var(--ink-2); margin-top: .4rem; }
.kpi.warn .v { color: var(--warn); }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); font-weight: 600; padding: 0 .75rem .6rem 0; border-bottom: 1px solid var(--rule); }
.tbl td { padding: .75rem .75rem .75rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.bar { min-width: 140px; width: 40%; }

/* callouts */
.note { background: var(--band); padding: 24px 28px; border-radius: 18px; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.note strong { color: var(--ink); }
.note.warn { background: var(--warn-soft); }
.bias { display: grid; gap: .75rem; }
.bias-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 3.5rem; gap: .75rem; align-items: center; font-size: 1rem; }
.bias-row .lab small { display: block; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 560px) { .bias-row { grid-template-columns: 1fr 3.2rem; } .bias-row .mix { grid-column: 1 / -1; grid-row: 2; } }

/* story cards */
.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.story-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 26px; }
.story-card h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.15; }
.story-card h3 a { color: var(--ink); text-decoration: none; }
.story-card h3 a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.story-card .meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .94rem; color: var(--ink-3); margin-top: .6rem; align-items: center; }
.story-card p { margin-top: .7rem; color: var(--ink-2); font-size: 1.0625rem; }
.story-card mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 .1em; }
.story-card .warn { color: var(--warn); font-weight: 600; }
.sells { color: var(--gold); font-weight: 700; }

/* harms */
.harms { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.harms li { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 20px; }
.harms .h { font-weight: 600; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
.harms q { display: block; color: var(--ink-2); margin-top: .35rem; font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.35; quotes: "“" "”"; }
.harms .src { font-size: .875rem; margin-top: .5rem; }

/* page heads, story page */
.story-head { padding-block: 32px 44px; }
.story-head > .wrap { display: flex; flex-direction: column; gap: 16px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .94rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.facts dd { margin: .25rem 0 0; font-size: 1.0625rem; }
.summary { font-size: 1.25rem; line-height: 1.75; text-wrap: pretty; }
.source-box { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* filters bar (stories) */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.searchrow { display: flex; gap: .5rem; margin-bottom: 14px; }
.searchrow input { flex: 1; font-size: 1.125rem; min-height: 56px; padding: 0 1.4rem; }
.result-count { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.1; color: var(--ink); margin: 32px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.more-row { display: flex; justify-content: center; margin-top: 24px; }

/* footer */
.site-foot { background: var(--band); border-top: 1px solid var(--rule); margin-top: 0; }
.site-foot .wrap { padding-block: 72px 48px; display: flex; flex-direction: column; gap: 48px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.foot-brand { flex: 1 1 340px; max-width: 460px; display: flex; flex-direction: column; gap: 18px; }
.foot-brand .brand svg { width: 34px; height: 34px; }
.foot-brand .brand span { font-size: 28px; }
.foot-brand .tagline { font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.4; color: var(--ink-2); }
.foot-nav { flex: 1 1 420px; max-width: 600px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 40px; }
.foot-nav div { display: flex; flex-direction: column; gap: 2px; }
.foot-nav p { margin-bottom: 6px; font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.foot-nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; font-size: 1rem; }
.foot-nav a:hover { text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; padding-top: 28px; border-top: 1px solid var(--rule-strong); font-size: .94rem; color: var(--ink-3); }
.foot-base p:first-child { max-width: 52em; }

/* tooltip */
#tip { position: fixed; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .1s; background: var(--ink); color: var(--paper); font-size: .875rem; padding: .45rem .7rem; border-radius: 8px; max-width: 260px; line-height: 1.35; }

.loading { color: var(--ink-3); font-style: italic; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-head, .site-foot, .explorer-controls, .theme-btn { display: none; } body { background: #fff; } }

.more-chips { width: 100%; }
.more-chips summary { cursor: pointer; color: var(--accent); font-size: .94rem; font-weight: 600; min-height: 44px; display: flex; align-items: center; width: fit-content; }
.filters label { display: block; min-width: 0; }
.filters select { width: 100%; }
.section-head > a svg, .link-strong svg { width: 20px; height: 20px; flex: none; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 1rem; color: var(--ink-2); }
.story-body { padding-bottom: 96px; }
.story-body h2 { font-size: 2rem; }
.theme-btn .lab-day { display: inline-flex; }
.hero-card .f span:last-child { white-space: nowrap; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi .l { display: flex; align-items: baseline; gap: 8px; }
.kpi .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; transform: translateY(-1px); }
.kpi .c { font-size: .875rem; color: var(--ink-3); margin-top: .15rem; padding-left: 18px; }
.lasted { border-top: 1px solid var(--rule); padding-top: 18px; }
.lasted h3 { font-size: 1.5rem; }
.lasted ul { margin: .6rem 0 .5rem; padding-left: 1.2rem; display: grid; gap: .3rem; color: var(--ink-2); }
.lasted strong { color: var(--ink); }

/* Trend lines: one series, so one colour; y starts at zero; hover any point for the count. */
.trend { width: 100%; height: auto; display: block; overflow: visible; }
.trend .grid, .spark .grid { stroke: var(--rule-soft); stroke-width: 1; }
.trend .ax { font-size: 12px; fill: var(--ink-3); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.trend .ln, .spark .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .pt, .spark .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.trend .hit { fill: transparent; cursor: default; }
.trend .hit:hover { fill: var(--accent-soft); }
.spark { width: 160px; height: 36px; display: block; }
.trends-list li { grid-template-columns: minmax(0, 1.4fr) 160px 5.5rem; }
@media (max-width: 560px) { .trends-list li { grid-template-columns: minmax(0, 1fr) 96px 4.5rem; } .trends-list .spark { width: 96px; } }
