/* Fonts are served from the site itself (Latin subsets, variable). Archivo: OFL, wdth 72–100, wght 400–900.
   Literata: OFL, opsz 12–36, wght 400–600. Licenses in /fonts/. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 400 900; font-stretch: 72% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

/* Opensaurus. Black-ruled "facts label" identity: Archivo (variable width) for UI and headings,
   Literata for running text, semantic colours only for facts (live, caution, risk). */
:root {
  --ink: #000000;
  --paper: #FFFFFF;
  --text: #2A2D31;
  --muted: #50555C;
  --rule: #D5D8DB;
  --rule-strong: #B9BEC2;
  --surface: #F1F3F2;
  --live: #157347;
  --caution: #9A5B00;
  --risk: #B42318;
  --focus: #2F5BD3;
  --ui: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --serif: "Literata", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.4; overflow-wrap: break-word; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.05; font-weight: 800; font-stretch: 82%; }
h3 { margin: 0; }
p { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.live { color: var(--live); }
.caution { color: var(--caution); }
.risk { color: var(--risk); }
dd.live, dd.caution, dd.risk { font-weight: 700; }
.strong-link { font-size: 16px; font-weight: 700; }
.body-text { margin-top: 16px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--text); max-width: 34em; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 6px; font: 700 17px var(--ui); text-decoration: none; cursor: pointer; }
.button:hover { color: var(--paper); background: #24272B; }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 6px; cursor: pointer; }

/* ---------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--ink); background: var(--paper); }
.site-header .bar { max-width: 1200px; margin: 0 auto; padding: 14px max(var(--gutter), env(safe-area-inset-right, 0px)) 14px max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.logo { font-size: 26px; font-weight: 900; font-stretch: 75%; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.main-nav { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; font-weight: 500; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { text-decoration: underline; color: var(--ink); }
.header-search { display: flex; align-items: center; gap: 8px; position: relative; }
.header-search input { width: min(260px, 60vw); height: 44px; padding: 0 14px; font: 16px var(--ui); border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); }
.header-search .search-results { right: 0; left: auto; width: min(420px, 90vw); }

/* ---------------------------------------------------------------- search */
.search { position: relative; }
.search-results { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px 0; list-style: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); max-height: 70vh; overflow-y: auto; }
.search-results a { display: block; padding: 10px 14px; text-decoration: none; }
.search-results a strong { display: block; font-size: 17px; }
.search-results a span { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results li[aria-selected="true"] a, .search-results a:hover { background: var(--surface); color: var(--ink); }
.search-results .empty { padding: 10px 14px; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- hero */
.hero .hero-grid { padding-top: 72px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.hero-main { flex: 999 1 560px; min-width: 0; }
h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: 0.98; font-weight: 850; font-stretch: 78%; letter-spacing: -0.015em; max-width: 13ch; }
.lede { margin-top: 28px; font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--text); max-width: 34em; }
.hero-search { margin-top: 36px; display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.hero-search label { font-size: 17px; font-weight: 700; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; }
.search-row input { flex: 1 1 280px; min-width: 0; height: 56px; padding: 0 18px; font: 18px var(--ui); border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); }
.search-row .button { min-height: 56px; padding: 0 26px; }
.popular { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 16px; color: var(--muted); }

.week { flex: 1 1 320px; max-width: 380px; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.week-title { font-size: 18px; font-weight: 800; }
.tag-sponsored { font-size: 13px; font-weight: 700; color: var(--caution); border: 1.5px solid var(--caution); border-radius: 4px; padding: 1px 7px; }
.week-note { margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--text); }
.week-note a { font-weight: 700; }
.sponsor-box { margin-top: 12px; background: var(--surface); border-radius: 6px; padding: 14px 16px; }
.sponsor-box p { margin: 6px 0 12px; font-size: 15px; line-height: 1.45; color: var(--text); }

/* ---------------------------------------------------------------- facts label */
.facts { border: 2px solid var(--ink); padding: 10px 14px 12px; background: var(--paper); }
.facts-title { font-size: 36px; font-weight: 900; font-stretch: 72%; line-height: 1; }
.facts-sub { font-size: 15px; margin-top: 4px; }
.rule-10 { height: 10px; background: var(--ink); margin: 8px 0 2px; }
.rule-5 { height: 5px; background: var(--ink); margin: 2px 0; }
.facts dl { margin: 0; font-size: 15px; }
.facts dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink); padding: 5px 0; }
.facts dl div:first-child { border-top: 0; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; text-align: right; }
.facts-foot { border-top: 5px solid var(--ink); margin-top: 2px; padding-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* ---------------------------------------------------------------- bands */
.band { border-top: 1px solid var(--ink); }
.band > .wrap { padding-top: 56px; padding-bottom: 56px; }
.band-grey { background: var(--surface); }
.band-black { background: var(--ink); color: var(--paper); }
.band-black h2, .band-black h3, .band-black a { color: var(--paper); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head p { font-size: 15px; }

.category-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.category-tile { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 6px; text-decoration: none; }
.category-tile:hover { background: var(--surface); color: var(--ink); }
.tile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile-name { font-size: 18px; font-weight: 750; }
.tile-list { font-size: 14px; color: var(--muted); line-height: 1.4; }

.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-side .body-text { margin-top: 0; }
.changes { flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.changes li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule-strong); padding: 14px 0; font-size: 17px; line-height: 1.45; }
.changes-date { font-size: 16px; font-weight: 700; }
.changes .muted { font-size: 15px; }

.score-list, .rising { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); column-gap: 40px; }
.score-list li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 14px; align-items: baseline; border-top: 1px solid var(--rule); padding: 16px 0; }
.score { font-size: 30px; font-weight: 900; font-stretch: 75%; }
.item-title { font-size: 20px; font-weight: 800; }
.item-meta { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }
.rising li { border-top: 1px solid var(--rule); padding: 16px 0; }
.rising-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rising-desc { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--text); }

.stalled { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.stalled li { border: 2px solid var(--ink); border-radius: 6px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stalled-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stalled-name { font-size: 22px; font-weight: 800; }
.stalled p { font-size: 16px; line-height: 1.5; color: var(--text); }
.stalled dl { margin: 6px 0 0; font-size: 15px; border-top: 1px solid var(--rule); }
.stalled dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 0; }
.stalled dt { font-weight: 700; }
.stalled dd { margin: 0; text-align: right; }

.how-grid { margin: 28px 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.how-grid > div { border-top: 2px solid var(--paper); padding-top: 14px; }
.how-grid h3 { font-size: 22px; font-weight: 800; }
.how-grid p { margin-top: 10px; font-size: 17px; line-height: 1.55; color: var(--rule); }
.band-black .strong-link { font-size: 17px; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 3px solid var(--ink); background: var(--surface); }
.site-footer .cols { max-width: 1200px; margin: 0 auto; padding: 40px max(var(--gutter), env(safe-area-inset-right, 0px)) 32px max(var(--gutter), env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer .cols p { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.col-title { font-size: 16px; font-weight: 800; }
.site-footer ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.site-footer .legal { max-width: 1200px; margin: 0 auto; padding: 16px max(var(--gutter), env(safe-area-inset-right, 0px)) 36px max(var(--gutter), env(safe-area-inset-left, 0px)); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.site-footer .legal a { color: var(--muted); }
.site-footer .legal .wide { flex-basis: 100%; }

@media (max-width: 520px) {
  .hero .hero-grid { padding-top: 40px; padding-bottom: 40px; gap: 40px; }
  .changes li { grid-template-columns: 1fr; gap: 4px; }
  .score-list, .rising { grid-template-columns: 1fr; }
  .week { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------------------------------------------------------------- shared bits */
.button-outline { background: var(--paper); color: var(--ink); }
.button-outline:hover { background: var(--surface); color: var(--ink); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }
.fine { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.fine a { color: var(--muted); }
.callout { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--ink); background: var(--surface); font-size: 16px; line-height: 1.5; color: var(--text); }
.callout strong { color: var(--ink); }
.caution-callout { border-left-color: var(--caution); }
.risk-callout { border-left-color: var(--risk); }
.live-callout { border-left-color: var(--live); }

/* ---------------------------------------------------------------- project page */
.p-wrap { padding-top: 28px; padding-bottom: 72px; }
.p-grid { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.p-main { flex: 999 1 600px; min-width: 0; }
.p-title { font-size: clamp(44px, 6vw, 72px); font-weight: 900; font-stretch: 75%; max-width: none; }
.p-lede { margin-top: 18px; font-family: var(--serif); font-size: 20px; line-height: 1.55; color: var(--text); max-width: 36em; }
.p-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--muted); }
.p-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.p-section { margin-top: 48px; border-top: 3px solid var(--ink); padding-top: 18px; }
.p-section h2 { font-size: 32px; }
.p-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.p-section-head p { font-size: 17px; }
.p-text { margin-top: 12px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--text); max-width: 38em; }

.health-bars { list-style: none; margin: 12px 0 0; padding: 0; }
.health-bars li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 4.5em; gap: 16px; align-items: center; border-top: 1px solid var(--rule); padding: 14px 0; }
.hb-label { font-weight: 700; font-size: 16px; }
.hb-track { height: 8px; background: #E3E6E8; border-radius: 4px; overflow: hidden; }
.hb-fill { height: 8px; border-radius: 4px; }
.hb-fill.live { background: var(--live); }
.hb-fill.caution { background: var(--caution); }
.hb-fill.risk { background: var(--risk); }
.hb-detail { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--text); }
.hb-points { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding: 12px 0; font-size: 16px; line-height: 1.5; }
.tl-when { font-weight: 700; }

.kv { margin: 12px 0 0; }
.kv div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding: 10px 0; font-size: 16px; line-height: 1.45; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.alt-list { list-style: none; margin: 12px 0 0; padding: 0; }
.alt-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; border-top: 1px solid var(--rule); padding: 14px 0; }
.alt-list li > span:first-child { flex: 1 1 320px; min-width: 0; }
.alt-name { font-size: 20px; font-weight: 800; }
.alt-desc { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); line-height: 1.45; }
.alt-facts { font-size: 15px; color: var(--muted); white-space: nowrap; }
/* Long license names ("Apache-2.0 with additional conditions") must not push a phone screen wide. */
@media (max-width: 600px) { .alt-facts { white-space: normal; } }

.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { font-size: 19px; font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--text); max-width: 40em; }

.p-aside { flex: 1 1 320px; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.facts-group { margin-top: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.facts-foot a { color: var(--muted); }
.claim-box { border: 2px solid var(--ink); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.claim-box p { font-size: 15px; line-height: 1.45; color: var(--text); }
@media (min-width: 1000px) {
  .p-aside { position: sticky; top: 16px; }
}
@media (max-width: 640px) {
  .health-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .hb-main { grid-column: 1 / -1; grid-row: 2; }
  .timeline li, .kv div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .p-aside { max-width: none; }
}

/* ---------------------------------------------------------------- category page */
.c-head { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.c-intro { flex: 999 1 560px; min-width: 0; }
.c-aside { flex: 1 1 300px; max-width: 380px; }
.c-filters { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; font: 600 15px var(--ui); border: 1.5px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.c-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 15px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.select { display: inline-flex; align-items: center; gap: 8px; }
.select select { height: 40px; padding: 0 10px; font: 15px var(--ui); border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); }
.sort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sort .chip { min-height: 34px; font-size: 14px; }
.c-list { list-style: none; margin: 8px 0 0; padding: 0; }
.c-item { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 13em; gap: 20px; align-items: start; border-top: 1px solid var(--rule); padding: 18px 0; }
.c-score { text-align: center; }
.c-score-n { display: block; font-size: 32px; font-weight: 900; font-stretch: 75%; line-height: 1; }
.c-score-s { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; }
.c-name { font-size: 21px; font-weight: 800; }
.c-desc { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--text); }
.c-lic { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.flag { font-size: 12px; font-weight: 700; border: 1.25px solid currentColor; border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.c-facts { margin: 0; font-size: 14px; }
.c-facts div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.c-facts dt { color: var(--muted); }
.c-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .c-item { grid-template-columns: 3.5em minmax(0, 1fr); }
  .c-facts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .c-facts div { gap: 6px; }
  .c-aside { max-width: none; }
}

/* ---------------------------------------------------------------- info pages */
.narrow { max-width: 920px; }
.block { display: block; margin-top: 4px; }
.toc { margin-top: 24px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 16px; font-weight: 600; }
.kv-wide div { grid-template-columns: minmax(0, 13em) minmax(0, 1fr); }
.kv-wide dt .muted { display: block; font-weight: 500; font-size: 14px; }
.changes-page li { font-size: 17px; }
.changes-page .flag { margin-left: 4px; vertical-align: 1px; }
.option-list { list-style: none; margin: 12px 0 0; padding: 0; }
.option-list li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding: 12px 0; font-size: 16px; line-height: 1.5; scroll-margin-top: 16px; }
.badge-tool { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 640px; }
.badge-tool .search-row { width: 100%; }
.badge-tool input { height: 48px; }
.badge-preview { margin: 4px 0; min-height: 20px; }
.badge-tool textarea { width: 100%; padding: 10px 12px; font: 14px ui-monospace, "SF Mono", Menlo, monospace; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--surface); color: var(--ink); resize: vertical; }
@media (max-width: 640px) { .option-list li, .kv-wide div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------------------------------------------------------------- editorial description */
.about-text p, .before p { margin-top: 12px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--text); max-width: 38em; }
.about code, .before code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); padding: 1px 4px; border-radius: 3px; }
.fit { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fit-col { border-top: 3px solid var(--ink); padding-top: 12px; }
.fit-yes { border-top-color: var(--live); }
.fit-no { border-top-color: var(--caution); }
.fit h3, .before h3 { font-size: 18px; font-weight: 800; }
.fit ul { margin: 10px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.5; color: var(--text); }
.before { margin-top: 24px; background: var(--surface); border-left: 4px solid var(--ink); padding: 16px 18px; }
.before p { margin-top: 8px; font-size: 17px; }
.about .fine { margin-top: 14px; }

/* Category guide: picks by use case, how to choose, license check. */
.picks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.picks > li { border-top: 3px solid var(--ink); padding: 14px 0 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pick-label { font-size: 19px; font-weight: 800; font-stretch: 90%; line-height: 1.2; }
.pick-text { font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--text); }
.pick-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pick-facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-top: 1px solid var(--rule); padding-top: 6px; }
.pick-facts a { font-weight: 700; }
.pick-facts span { color: var(--muted); }
.pick-facts span.live, .pick-facts span.caution, .pick-facts span.risk { font-weight: 700; }
.pick-facts .live { color: var(--live); } .pick-facts .caution { color: var(--caution); } .pick-facts .risk { color: var(--risk); }
.pick-facts .flag { font-size: 11px; }
.choose { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 40px; }
.choose-item { min-width: 0; }
.choose-item h3 { font-size: 19px; font-weight: 800; font-stretch: 90%; }
.choose-item p { margin-top: 8px; font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--text); max-width: 38em; }
.c-intro .p-text { margin-top: 12px; }

/* Category pages on phones: the list comes right after the lede; facts follow the list, filters fold. */
.filter-toggle { display: none; }
@media (max-width: 720px) {
  .c-page { display: flex; flex-direction: column; }
  .c-page > * { order: 5; }
  .c-page > .crumbs { order: 0; }
  .c-page .c-head { display: contents; }
  .c-page .c-intro { order: 1; margin-top: 20px; flex: none; }
  .c-page > #list { order: 2; }
  .c-page .c-aside { order: 3; margin-top: 40px; flex: none; max-width: none; }
  .filter-toggle:not([hidden]) { display: inline-flex; align-items: center; margin-top: 14px; min-height: 40px; padding: 0 14px; font: 600 15px var(--ui); border: 1.5px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); cursor: pointer; }
  .filter-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
  .c-filters:not(.is-open) { display: none; }
}
@media (max-width: 520px) {
  .c-page .p-title { font-size: 38px; }
}

/* Phones: logo and search on one row, the three nav links on the next, so the header stays short. */
@media (max-width: 640px) {
  .site-header .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
  .site-header .logo { grid-column: 1; grid-row: 1; align-self: center; }
  .site-header .header-search { grid-column: 2; grid-row: 1; justify-self: end; }
  .site-header .main-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; gap: 20px; font-size: 15px; white-space: nowrap; overflow-x: auto; }
}
/* Category filters: how-it-runs chips and sorting share the first row. */
.c-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.c-aside .facts-title { white-space: nowrap; font-size: 32px; }

/* /category/: one row per category, facts on the right. */
.cat-index { list-style: none; margin: 32px 0 0; padding: 0; }
.cat-index > li { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px 40px; padding: 24px 0; border-top: 3px solid var(--ink); }
.cat-index h2 { font-size: clamp(24px, 3vw, 30px); }
.cat-index h2 a { text-decoration: none; }
.cat-index h2 a:hover { text-decoration: underline; color: var(--ink); }
.cat-lede { margin-top: 8px; font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--text); max-width: 40em; }
.cat-top { margin-top: 10px; font-size: 15px; line-height: 1.5; }
.cat-facts { margin: 0; font-size: 15px; align-self: start; }
.cat-facts div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); padding: 6px 0; }
.cat-facts div:first-child { border-top: 0; }
.cat-facts dt { font-weight: 600; }
.cat-facts dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 720px) { .cat-index > li { grid-template-columns: minmax(0, 1fr); } }

/* Cookie consent (only when analytics is on): a bar at the bottom, both choices equally prominent. */
.consent { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: 720px; margin: 0 auto; padding: 16px 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: 15px; line-height: 1.45; }
.consent p { flex: 1 1 300px; color: var(--text); }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent .button { min-height: 44px; padding: 0 18px; font-size: 16px; }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--ink); }
