/* Design tokens: the validated default palette (blue-led categorical, one-hue
   ordinal ramp). Dark is *selected*, not an automatic inversion — the ordinal
   steps are re-chosen for the dark surface so the weakest step still clears 2:1.
   Both scopes are declared: the media query covers the OS setting, the
   [data-theme] scope covers the toggle, which must win either way. */
/* The one display face, served from this directory like everything else (SIL OFL,
   see PlayfairDisplay-OFL.txt). Latin subset, variable weight. Only the overview
   uses it, and a browser fetches a face only for a page that uses it. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("playfair-display-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --surface-0: #f5f5f2;
  --surface-1: #fcfcfb;
  --surface-2: #efeeea;
  --border: #e2e1dc;
  --border-strong: #cbcac3;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7c7b74;
  --accent: #2a78d6;
  --accent-soft: #e7f0fc;
  /* ordinal ramp, weakest -> strongest (light: no lighter than step 250) */
  --ord-1: #86b6ef;
  --ord-2: #5598e7;
  --ord-3: #2a78d6;
  --ord-4: #1c5cab;
  --ord-5: #104281;
  --ord-off: #9c9b93;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --mark: #fdf0c8;
  --shadow: 0 1px 2px rgba(11,11,11,.06), 0 6px 18px rgba(11,11,11,.05);
  /* the recipe band: inverted on the light surface; bars are neutral, not the ramp */
  --band-bg: #17181c; --band-cell: #1f2025; --band-rule: #33343a;
  --band-text: #f3efe6; --band-muted: #9a968d; --band-bar: #c9c4b8;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-0: #111110; --surface-1: #1a1a19; --surface-2: #232322;
    --border: #33322f; --border-strong: #4a4945;
    --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8f8e86;
    --accent: #3987e5; --accent-soft: #16283f;
    --ord-1: #184f95; --ord-2: #256abf; --ord-3: #3987e5; --ord-4: #6da7ec; --ord-5: #9ec5f4;
    --ord-off: #7b7a73;
    --mark: #3d3413;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    --band-bg: #1a1a19; --band-cell: #232322; --band-rule: #33322f;
    --band-text: #ffffff; --band-muted: #8f8e86; --band-bar: #8f8e86;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0: #111110; --surface-1: #1a1a19; --surface-2: #232322;
  --border: #33322f; --border-strong: #4a4945;
  --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8f8e86;
  --accent: #3987e5; --accent-soft: #16283f;
  --ord-1: #184f95; --ord-2: #256abf; --ord-3: #3987e5; --ord-4: #6da7ec; --ord-5: #9ec5f4;
  --ord-off: #7b7a73;
  --mark: #3d3413;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  --band-bg: #1a1a19; --band-cell: #232322; --band-rule: #33322f;
  --band-text: #ffffff; --band-muted: #8f8e86; --band-bar: #8f8e86;
}

* { box-sizing: border-box; }
/* The script hides with the attribute; `.row` and friends set display, so it must win. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font: 15px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; }
.muted { color: var(--text-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface-1); border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; gap: 16px; align-items: center; padding-block: 11px; flex-wrap: wrap; }
.brand { font-weight: 600; font-size: 15px; color: var(--text-primary); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.topnav a { color: var(--text-secondary); }
.topnav a[aria-current="page"] { color: var(--text-primary); font-weight: 600; }
.search { margin-left: auto; position: relative; flex: 0 1 300px; min-width: 190px; }
.search input {
  width: 100%; padding: 7px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface-0); color: var(--text-primary);
}
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; padding: 4px;
}
.search-results:empty { display: none; }
.search-results a { display: block; padding: 7px 9px; border-radius: 7px; color: var(--text-primary); }
.search-results a:hover, .search-results a:focus { background: var(--surface-2); text-decoration: none; }
.search-results .kind { float: right; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- page furniture ---------- */
main { padding: 34px 0 64px; }
.page-head { margin-bottom: 26px; }
.page-head p { color: var(--text-secondary); max-width: 68ch; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-secondary); }
.crumbs span::after { content: "›"; margin: 0 7px; color: var(--border-strong); }
.crumbs span:last-child::after { content: ""; }
section { margin: 34px 0; }
section:last-child { margin-bottom: 0; }
section > h2 { margin-bottom: 12px; }
.tiles + section { margin-top: 30px; }
.section-note { font-size: 13px; color: var(--text-muted); margin: -6px 0 12px; }

.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- stat tiles: a number is not a chart ---------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.tile .value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.tile .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- overview: hero, sample quote, recipe, usage matrix ---------- */
.display { font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary);
  margin: 0;
}
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px;
  align-items: start; padding: 22px 0 18px;
}
.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.05; overflow-wrap: anywhere; }
.hero-overview h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; overflow-wrap: normal; }
.hero.solo { grid-template-columns: minmax(0, 1fr); }
.hero.solo .hero-text { max-width: 760px; }
.crumbs + .hero { padding-top: 6px; }
.hero-text .chips { margin-top: -6px; }
.hero-text > p.muted { margin: -8px 0 0; }
.small { font-size: 13px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--text-secondary); max-width: 34em; margin: 0; }
.quote-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; margin-top: 8px;
}
.quote-card-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.quote-card-body { padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 16px; }
.quote-card blockquote { margin: 0; font-size: 22px; line-height: 1.35; }
.quote-card blockquote p { margin: 0; }
.quote-src, .quote-filed { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--text-secondary); }
.quote-src b { color: var(--text-primary); font-weight: 600; }
.quote-filed { padding-top: 14px; border-top: 1px dashed var(--border-strong); gap: 6px; font-size: 14.5px; color: var(--text-primary); }
.quote-more {
  margin: 0 20px 20px; padding: 11px 14px; border-radius: 10px; text-align: center;
  background: var(--surface-2); color: var(--text-primary); font-weight: 500; font-size: 14px;
}
.quote-more:hover { text-decoration: none; background: var(--border); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px 48px;
  align-items: end; margin-bottom: 24px;
}
.section-head > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.08; }
.section-aside { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.section-aside p { margin: 0 0 8px; }
.section-aside p:last-child { margin: 0; color: var(--text-muted); }

.recipe {
  background: var(--band-bg); color: var(--band-text); border-radius: 18px;
  padding: 40px 32px 28px; margin: 44px 0;
}
.recipe .eyebrow, .recipe .section-aside { color: var(--band-muted); }
.recipe a { color: var(--band-text); }
.recipe-stages {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 2px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--band-rule); border-radius: 12px; overflow: hidden;
}
.recipe-stage { background: var(--band-cell); padding: 18px 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.recipe-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--band-muted); }
.recipe-meta a { color: var(--band-muted); }
.recipe-stage h3 { font-size: 23px; line-height: 1.1; font-weight: 400; }
.recipe-stage ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.recipe-stage li a { display: flex; flex-direction: column; gap: 5px; }
.recipe-stage li a:hover { text-decoration: none; }
.recipe-stage li a:hover .recipe-name { text-decoration: underline; }
.recipe-name { font-size: 14px; line-height: 1.35; }
.recipe-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--band-muted); }
.recipe-bar > span:first-child { height: 5px; border-radius: 3px; background: var(--band-bar); }
.recipe-bar .num { white-space: nowrap; }
.recipe-empty { font-size: 13px; color: var(--band-muted); margin: 0; }
.recipe-note { font-size: 13px; color: var(--band-muted); margin: 16px 0 0; }

.matrix-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px 16px; }
.matrix { font-size: 14px; }
.matrix th, .matrix td { padding: 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.matrix thead th { border-bottom-color: var(--border-strong); }
.matrix th.m-name { vertical-align: bottom; padding-bottom: 10px; }
.matrix th.m-col { height: 200px; vertical-align: bottom; text-align: center; padding: 0 0 10px; min-width: 30px; }
.matrix th.m-col a {
  writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
  text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--text-primary);
}
.matrix th.m-col span { display: inline-block; max-height: 190px; overflow: hidden; text-overflow: ellipsis; }
.matrix tbody th[scope="row"] {
  text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px;
  padding: 11px 16px 11px 0; min-width: 190px;
}
.matrix tbody th[scope="row"] a { color: var(--text-primary); }
.matrix td { text-align: center; position: relative; }
.matrix tr.m-stage th { padding: 16px 0 6px; font-weight: 600; color: var(--text-muted); border-bottom: 0; }
.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: middle; }
.dot.silent { width: 5px; height: 5px; background: var(--border-strong); }

/* Code verdicts: a glyph in the text colour, never a hue — colour is adoption status alone. */
.code-mark { font-style: normal; font-size: 11px; font-weight: 700; line-height: 1; color: var(--text-primary); }
.code-mark.code-absent, .code-mark.code-unclear { color: var(--text-muted); }
.matrix td .code-mark { position: absolute; top: 50%; left: calc(50% + 8px); transform: translateY(-80%); font-size: 10px; }
.dist-legend .code-mark { margin-right: 5px; }
.code-table th[scope="row"], .code-table td { vertical-align: top; }
.code-table th[scope="row"] {
  font-size: 14.5px; text-transform: none; letter-spacing: normal; font-weight: 500; color: var(--text-primary);
}
.code-table td:nth-child(2), .code-table td:nth-child(3) { white-space: nowrap; }
.code-summary { margin: 0 0 6px; color: var(--text-secondary); }
.config-kv {
  display: inline-block; font-size: 12.5px; background: var(--surface-2); color: var(--text-primary);
  border-radius: 4px; padding: 1px 6px; margin: 0 4px 4px 0; overflow-wrap: anywhere;
}
.code-quote { margin: 2px 0 8px; }
.code-quote pre {
  margin: 0; padding: 8px 10px; background: var(--surface-2); border-radius: 8px;
  font-size: 12.5px; line-height: 1.45; overflow-x: auto; max-width: 64ch;
}
.code-quote pre code { background: none; padding: 0; }
.code-quote figcaption { font-size: 12.5px; margin-top: 3px; }
.matrix-foot {
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center;
  padding-top: 14px; font-size: 14px;
}

/* ---------- inner pages: the overview's vocabulary, reused ---------- */
main section > h2.display, .outline > h2.display { font-size: 28px; line-height: 1.15; font-weight: 400; }
.outline > h2.display .num { font-family: ui-sans-serif, -apple-system, "Segoe UI", sans-serif; font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 0; }
.facts div { display: flex; flex-direction: column-reverse; gap: 2px; }
.facts dd { margin: 0; font-size: 30px; line-height: 1.1; }
.facts dd .swatch { width: 12px; height: 12px; vertical-align: 3px; }
.hero-text .facts { padding-top: 16px; border-top: 1px solid var(--border); }
.hero-text .facts dd { font-size: 24px; }
.card-sub { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.card-note { font-size: 13px; color: var(--text-muted); margin: 0; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.bars li { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.bars .recipe-bar { color: var(--text-muted); }
.bars.compact { gap: 6px; }
.bars.compact li { display: grid; grid-template-columns: minmax(0, 1fr) 44%; gap: 10px; align-items: center; font-size: 13.5px; }
.curator-note { font-size: 13px; color: var(--text-muted); margin: 0; display: flex; flex-direction: column; gap: 4px; max-width: 60ch; }
.bars .recipe-bar > span:first-child { background: var(--text-muted); opacity: .55; }
.ramp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.ramp-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ramp-list .step { display: inline-flex; align-items: center; gap: 7px; color: var(--text-primary); font-weight: 500; }

.table-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 8px 22px 4px; }
.table-card table { font-size: 14.5px; }
.table-card tbody tr:last-child td { border-bottom: 0; }
.table-foot { margin: 0; padding: 12px 0 10px; border-top: 1px solid var(--border); }
.models-table td { vertical-align: middle; padding-block: 12px; }
.models-table td b { font-weight: 500; }
.meter-cell { min-width: 180px; }
.meter-cell > * { vertical-align: middle; }
.meter { display: inline-block; width: calc(100% - 44px); height: 7px; border-radius: 4px; background: var(--surface-2); margin-right: 8px; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--text-muted); }

.recipe-check { margin: 40px 0; }
.check-stages {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.check-stage { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; }
.check-stage h3 { font-size: 20px; font-weight: 400; margin-bottom: 10px; }
.check-stage ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-stage li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; line-height: 1.35; }
.check-stage li .dot { margin-top: 3px; }
.check-stage li .dot.silent { margin: 7px 0 0 4px; }
.check-status { display: block; font-size: 12px; color: var(--text-muted); }

.area-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 12px; }
.area-card { margin: 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px 10px; }
.area-card .recipe-meta { color: var(--text-muted); margin-bottom: 4px; }
.area-card h2.display { font-size: 26px; margin-bottom: 6px; }
.area-card h2 a { color: var(--text-primary); }
.area-card .row { padding: 6px 0; font-size: 14px; }

/* ---------- ordinal distribution bar ---------- */
.dist { display: flex; gap: 2px; height: 10px; margin: 8px 0 9px; }
.dist > span { border-radius: 2px; min-width: 3px; }
.dist > span:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.dist > span:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.ord-1 { background: var(--ord-1); }
.ord-2 { background: var(--ord-2); }
.ord-3 { background: var(--ord-3); }
.ord-4 { background: var(--ord-4); }
.ord-5 { background: var(--ord-5); }
.ord-off { background: var(--ord-off); }
.dist-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-secondary); }
.dist-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-block; font-size: 11.5px; line-height: 1.5; padding: 1px 8px;
  border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-secondary);
  background: var(--surface-2); white-space: nowrap;
}
.badge.strong { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.row .title { min-width: 0; overflow-wrap: anywhere; }
.chips a.badge:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* ---------- further reading ---------- */
.links { list-style: none; margin: 0; padding: 0; }
.links li { padding: 7px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.links li:last-child { border-bottom: 0; }
.links .muted { font-size: 12.5px; }
.link-note { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- lists & tables ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; gap: 12px; align-items: baseline; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; }
.row .meta { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.row .title { font-weight: 500; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); vertical-align: baseline; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 20px; }
td.num:last-child, th.num:last-child { padding-right: 0; }

/* ---------- evidence ---------- */
.evidence {
  border-left: 3px solid var(--border-strong); padding: 2px 0 2px 14px;
  margin: 0 0 8px; color: var(--text-primary);
}
.evidence p { margin: 0; }
.mention { padding: 14px 0; border-bottom: 1px solid var(--border); }
.mention:last-child { border-bottom: 0; }
.mention .prov { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.mention .prov .sep { color: var(--border-strong); margin: 0 7px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- filterable index ---------- */
.filter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-row input {
  flex: 1 1 260px; padding: 8px 11px; font: inherit; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface-1); color: var(--text-primary);
}
.count-note { font-size: 13px; color: var(--text-muted); }
.filter-bar { margin: 26px 0 8px; }
.filter-bar .filter-row { margin-bottom: 10px; }
.ord-filter {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 0; margin: 0 14px 0 0; padding: 0; min-width: 0;
}
.ord-filter legend {
  float: left; padding: 0; margin-right: 4px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600;
}
.ord-filter label { position: relative; cursor: pointer; }
.ord-filter input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ord-filter .badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 10px; }
.ord-filter input:checked + .badge { border-color: var(--accent); background: var(--accent-soft); color: var(--text-primary); }
.ord-filter input:focus-visible + .badge { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- nested outline: depth is size, weight and indent, never hue ---------- */
.outline .node { margin: 0 0 12px; }
.outline .node > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 7px; padding: 2px 0 8px;
}
.outline .node > summary::-webkit-details-marker { display: none; }
.outline .node > summary::before {
  content: "▸"; font-size: 11px; color: var(--text-muted);
  display: inline-block; width: 10px; transition: transform .12s;
}
.outline details.node[open] > summary::before { transform: rotate(90deg); }
.outline .node > summary h3 { display: inline; }
.outline .node-direct > summary h3 .muted { font-weight: 500; }
.subnode { padding-left: 14px; margin-top: 12px; }
.subnode .subnode { padding-left: 0; }
.subnode h4 {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em; padding: 2px 0 1px;
}
.subnode .subnode > h4 { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------- by-model comparison ---------- */
.bymodel td { vertical-align: top; }
.bymodel th a { color: inherit; }
.bymodel td.model a { font-weight: 500; white-space: nowrap; }
.bymodel .rollup, .bymodel .cell-item .status { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.bymodel .rollup { display: block; }
.bymodel .cell-item { display: block; white-space: nowrap; }
.bymodel .dash { color: var(--text-muted); }
.bymodel td:not(.empty) .dash { display: none; }

footer {
  border-top: 1px solid var(--border); background: var(--surface-1);
  padding: 22px 0 40px; font-size: 13px; color: var(--text-muted);
}
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--text-secondary); }
footer .footer-meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

@media (max-width: 860px) {
  .hero, .section-head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 620px) {
  h1 { font-size: 23px; }
  .hero h1 { font-size: 30px; }
  .hero-overview h1 { font-size: 36px; }
  .area-grid { grid-template-columns: minmax(0, 1fr); }
  .table-card { padding-inline: 14px; }
  .recipe { padding: 28px 16px 20px; margin-inline: -4px; }
  .search { margin-left: 0; flex-basis: 100%; }
  .row { flex-wrap: wrap; }
}
