/* OpenHydro Bench — plain, modern, readable.
   Schibsted Grotesk for text, IBM Plex Mono for numbers that matter.
   Colours are tokens; charts read them, so light and dark both follow. */
:root {
  --paper: #F5F7F6;
  --sheet: #FFFFFF;
  --ink: #0E1C26;
  --ink-2: #4A5B68;
  --ink-3: #33444F;
  --rule: #DDE3E6;
  --rule-2: #EDF1F3;
  --water: #0B6FB8;
  --water-ink: #0A5A96;
  --water-soft: #DCEBF6;
  --water-wash: #EEF5FB;
  --bed: #B9783A;
  --bed-soft: #EAD9C2;
  --dry: #EFE8DC;
  --pass: #155E3B;
  --pass-soft: #E3F2EA;
  --fail: #C2501C;
  --fail-ink: #8A3410;
  --fail-soft: #FBE7DC;
  --fail-wash: #FDF3EE;
  --dark: #0E1C26;
  --dark-2: #16293A;
  --dark-ink: #F5F7F6;
  --dark-ink-2: #B8C7D1;
  --hot: #FFB37A;
  --cool: #8CC4EE;
  --frozen: #155E3B; --candidate: #0B6FB8; --draft: #A7B4BC; --pending: #7C8A96; --release: #7FB2D9;
  --violet: #5E548E;
  --cat-0: #0B6FB8; --cat-1: #D9622B; --cat-2: #5E548E; --cat-3: #155E3B; --cat-4: #B9783A; --cat-5: #3D8F9F; --cat-6: #7C6A2E;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 70ch;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B161E; --sheet: #12212C; --ink: #E2EAF0; --ink-2: #A3B4C1; --ink-3: #C3D0D9;
    --rule: #26394A; --rule-2: #1A2B38; --water: #5BA7DB; --water-ink: #8CC4EE; --water-soft: #163A55; --water-wash: #102A3D;
    --bed: #D1A35E; --bed-soft: #3B2F1F; --dry: #2A2A24; --pass: #6BCB98; --pass-soft: #12352A; --fail: #F08A5D; --fail-ink: #FFB08C;
    --fail-soft: #43251A; --fail-wash: #2C1B14; --dark: #07111A; --dark-2: #12212C;
    --frozen: #6BCB98; --candidate: #5BA7DB; --draft: #4A5C6A; --violet: #A49AD6;
    --cat-0: #5BA7DB; --cat-1: #F08A5D; --cat-2: #A49AD6; --cat-3: #6BCB98; --cat-4: #D1A35E; --cat-5: #6CC3D2; --cat-6: #C9B061;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B161E; --sheet: #12212C; --ink: #E2EAF0; --ink-2: #A3B4C1; --ink-3: #C3D0D9;
  --rule: #26394A; --rule-2: #1A2B38; --water: #5BA7DB; --water-ink: #8CC4EE; --water-soft: #163A55; --water-wash: #102A3D;
  --bed: #D1A35E; --bed-soft: #3B2F1F; --dry: #2A2A24; --pass: #6BCB98; --pass-soft: #12352A; --fail: #F08A5D; --fail-ink: #FFB08C;
  --fail-soft: #43251A; --fail-wash: #2C1B14; --dark: #07111A; --dark-2: #12212C;
  --frozen: #6BCB98; --candidate: #5BA7DB; --draft: #4A5C6A; --violet: #A49AD6;
  --cat-0: #5BA7DB; --cat-1: #F08A5D; --cat-2: #A49AD6; --cat-3: #6BCB98; --cat-4: #D1A35E; --cat-5: #6CC3D2; --cat-6: #C9B061;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--water); text-underline-offset: 2px; }
a:hover { color: var(--water-ink); }
:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 4px; }
code, kbd, pre, .mono { font-family: var(--mono); }
code, kbd { font-size: 0.88em; }
pre { font-size: 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; position: relative; }
:not(pre) > code { background: var(--rule-2); padding: 0.08em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 10; }
h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.04; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 14px; max-width: var(--measure); }
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-3); max-width: 56ch; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-2); }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--water); }
.section { padding: 64px 0; }
.section.tight { padding: 32px 0; }
main > .section:first-child { padding-top: 40px; }

/* ── header and footer ─────────────────────────────────────────────── */
.site-head { background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 22px; flex: none; }
.brand .w { stroke: var(--water); } .brand .b { stroke: var(--bed); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--water); }
.site-nav a[aria-current="page"] { color: var(--water); font-weight: 700; }
.site-nav a.gh { color: var(--paper); background: var(--ink); padding: 8px 14px; border-radius: 8px; }
.site-nav a.gh:hover { background: var(--water); color: #fff; }
.nav-toggle { display: none; font: 600 15px var(--sans); color: var(--ink); background: transparent; border: 1.5px solid var(--rule); border-radius: 8px; padding: 8px 14px; cursor: pointer; min-height: 44px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 62px; background: var(--sheet); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px; box-shadow: 0 10px 20px rgba(0,0,0,.08); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
  .site-nav a.gh { margin-top: 10px; text-align: center; border-bottom: 0; }
}
.site-foot { border-top: 1px solid var(--rule); background: var(--sheet); margin-top: 40px; }
.site-foot .wrap { padding-top: 28px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--water); }

/* ── buttons, chips, badges ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--water); color: #fff; }
.btn.primary:hover { background: var(--water-ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { color: var(--water); box-shadow: inset 0 0 0 1.5px var(--water); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--rule-2); color: var(--ink-3); }
.tag.blue { background: var(--water-soft); color: var(--water-ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.badge.pass { background: var(--pass-soft); color: var(--pass); }
.badge.fail { background: var(--fail-soft); color: var(--fail-ink); }
.badge.none { background: var(--rule-2); color: var(--ink-2); }
.pill { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; min-height: 40px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; background: var(--sheet); color: var(--ink-3); border: 1.5px solid var(--rule); }
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1.5px solid currentColor; line-height: 1.6; }
.chip.st-frozen { color: var(--frozen); } .chip.st-candidate { color: var(--candidate); } .chip.st-draft { color: var(--pending); }
.verdict { font-weight: 700; font-size: 14px; white-space: nowrap; }
.verdict::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.v-pass { color: var(--pass); } .v-pass::before { background: var(--pass); }
.v-fail { color: var(--fail-ink); } .v-fail::before { background: var(--fail); }
.v-none { color: var(--pending); font-weight: 600; } .v-none::before { border: 1.5px solid var(--pending); width: 7px; height: 7px; }

/* ── cards ─────────────────────────────────────────────────────────── */
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
a.card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--water); box-shadow: 0 4px 18px rgba(11,111,184,.10); color: var(--ink); }
.card .kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--water); margin-bottom: 10px; }
.card h3 { font-size: 21px; }
.card p { font-size: 15px; color: var(--ink-2); margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ── home ──────────────────────────────────────────────────────────── */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 64px 0 36px; }
.hero > div { flex: 1 1 440px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; }
.hero .lede { margin-bottom: 32px; max-width: 34ch; }
.hero figure { flex: 1 1 460px; min-width: 0; margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 20px 20px 14px; }
.hero figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-2); padding-top: 8px; }
.hero svg { width: 100%; height: auto; display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.stats > div { background: var(--sheet); padding: 22px 24px; }
.stats b { display: block; font-size: 38px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stats span { color: var(--ink-2); font-size: 15px; }
.dark { background: var(--dark); color: var(--dark-ink); }
.dark h2 { color: var(--dark-ink); }
.dark .head-row a { color: var(--cool); font-weight: 600; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.head-row h2 { margin: 0; }
.finding { display: block; background: var(--dark-2); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--dark-ink); }
.finding:hover { color: var(--dark-ink); box-shadow: inset 0 0 0 1.5px var(--cool); }
.finding .num { font-family: var(--mono); font-size: 40px; font-weight: 500; color: var(--hot); margin-bottom: 6px; line-height: 1.15; }
.finding .num.cool { color: var(--cool); }
.finding b { display: block; font-size: 19px; margin-bottom: 8px; }
.finding p { font-size: 15px; line-height: 1.5; color: var(--dark-ink-2); margin: 0; }
.test-card { padding: 0; overflow: hidden; display: flex !important; flex-direction: column; }
.test-card svg.tile { display: block; width: 100%; height: auto; aspect-ratio: 280 / 120; background: var(--water-wash); border-bottom: 1px solid var(--rule); }
.test-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.test-card .tc-kick { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--water); display: flex; justify-content: space-between; gap: 8px; }
.test-card .tc-kick span:last-child { font-family: var(--mono); letter-spacing: 0; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.test-card h3 { font-size: 18px; margin: 0; }
.test-card p { font-size: 14px; }
.test-card .tc-score { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.tc-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--rule-2); display: flex; overflow: hidden; }
.tc-bar i { display: block; height: 100%; }
.tc-bar .p { background: var(--pass); } .tc-bar .f { background: var(--fail); }
.more-card { display: flex !important; flex-direction: column; justify-content: space-between; gap: 18px; background: var(--water-soft); border-color: transparent; }
.more-card b { display: block; font-size: 56px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--water-ink); }
.more-card > div:first-child > span { font-size: 16px; color: var(--ink); }
.more-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.more-groups span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--sheet); color: var(--ink-2); }
.more-link { font-weight: 700; color: var(--water); }
.view-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; margin-left: auto; }
.view-toggle button { border: 0; background: var(--sheet); color: var(--ink-2); padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--water); color: #fff; }
.tile-group { margin-top: 34px; }
.tile-group h3 { font-size: 20px; margin: 0 0 4px; }
.tile-group > p { margin: 0 0 14px; }
/* tile drawing */
svg.tile path, svg.tile rect, svg.tile circle, svg.tile ellipse { vector-effect: non-scaling-stroke; }
svg.tile .w { fill: var(--water); fill-opacity: .32; stroke: none; }
svg.tile .ws { fill: none; stroke: var(--water); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
svg.tile .g { fill: var(--bed-soft); stroke: none; }
svg.tile .gs { fill: none; stroke: var(--bed); stroke-width: 2; }
svg.tile .s { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; }
svg.tile .sf { fill: var(--ink-2); stroke: none; }
svg.tile .mh { fill: var(--sheet); stroke: var(--ink-2); stroke-width: 2; }
svg.tile .a { fill: var(--fail); stroke: var(--fail); stroke-width: 2.5; }
svg.tile path.a[fill="none"] { fill: none; }
svg.tile .x { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
svg.tile .f { fill: none; stroke: var(--water-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.tile .k { fill: none; stroke: var(--ink-2); stroke-width: 1.2; opacity: .55; }
svg.tile circle.k { fill: var(--sheet); opacity: .9; }
.case-art { margin: 8px 0 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--sheet); }
.case-art svg.tile { display: block; width: 100%; height: auto; aspect-ratio: 280 / 120; background: var(--water-wash); }
.case-art figcaption { padding: 22px 26px; align-self: center; }
.glance { margin: 0 0 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; font-size: 16px; line-height: 1.45; }
.glance dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--water); padding-top: 3px; }
.glance dd { margin: 0; color: var(--ink); }
@media (max-width: 760px) { .case-art { grid-template-columns: minmax(0, 1fr); } }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; font-size: 17px; line-height: 1.5; }
.steps .n { flex: 0 0 32px; height: 32px; border-radius: 16px; background: var(--water-soft); color: var(--water); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how .label { font-family: var(--mono); color: var(--water); font-size: 14px; margin-bottom: 10px; }
.how p { font-size: 17px; color: var(--ink); line-height: 1.5; }

/* ── tests and results ─────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.results-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.matrix-wrap { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--rule-2); }
table.matrix thead th { background: var(--sheet); border-bottom: 1px solid var(--rule); padding: 12px 4px; text-align: center; vertical-align: bottom; font-size: 12.5px; font-weight: 700; line-height: 1.2; min-width: 58px; }
table.matrix thead th small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 500; margin-top: 2px; }
table.matrix thead th.test-col { text-align: left; padding: 14px 18px; font-size: 13px; color: var(--ink-2); font-weight: 600; min-width: 220px; }
table.matrix tbody th { text-align: left; padding: 10px 18px; font-weight: 500; position: sticky; left: 0; background: var(--sheet); z-index: 1; min-width: 220px; }
table.matrix tbody th a { font-weight: 700; text-decoration: none; color: var(--ink); }
table.matrix tbody th a:hover { color: var(--water); text-decoration: underline; }
table.matrix tbody th small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
table.matrix td { padding: 6px 4px; text-align: center; }
table.matrix tr.group-row th { background: var(--rule-2); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); padding: 8px 18px; }
.cellbtn { width: 44px; height: 36px; border-radius: 8px; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; border: 2.5px solid transparent; }
.cellbtn.pass { background: var(--pass-soft); color: var(--pass); }
.cellbtn.fail { background: var(--fail-soft); color: var(--fail-ink); }
.cellbtn[aria-pressed="true"] { border-color: var(--ink); }
.cellbtn:hover { border-color: var(--ink-2); }
.notrun { color: #A7B4BC; font-size: 15px; }
.panel { margin-bottom: 18px; scroll-margin-top: 80px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 32px; align-items: start; }
.panel > .kicker, .panel > .title, .panel > .solver, .panel > .badge { grid-column: 1; }
.panel > .badge { justify-self: start; }
.panel > ul.checks { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
.panel > p.small, .panel > a { grid-column: 2; }
.panel > .legend-mini.legend-mini { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 6px 20px; }
@media (max-width: 760px) { .panel { grid-template-columns: minmax(0, 1fr); } .panel > * { grid-column: 1 !important; grid-row: auto !important; } }
.panel .kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.panel .title { font-size: 20px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; }
.panel .solver { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.panel ul.checks { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.panel ul.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 6px; }
.panel .legend-mini { border-top: 1px solid var(--rule-2); margin-top: 18px; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.ok { color: var(--pass); font-weight: 800; } .no { color: var(--fail); font-weight: 800; }
.bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 700; color: #fff; }
.bar > div { display: flex; align-items: center; padding-left: 8px; min-width: 0; overflow: hidden; }
.keyrow { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.waitlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.waitlist span { color: var(--ink-2); }

/* ── case pages ────────────────────────────────────────────────────── */
.crumbs { padding: 24px 0 0; font-size: 14px; color: var(--ink-2); }
.case-head { padding: 20px 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: end; }
.case-head > div:first-child { flex: 1 1 560px; min-width: 0; }
.case-head .chip-row { margin-bottom: 14px; }
.case-head .lede { max-width: 52ch; margin: 0; }
.case-id { font-family: var(--mono); font-size: 13px; color: var(--ink-2); text-align: right; line-height: 1.7; }
@media (max-width: 640px) { .case-id { text-align: left; } }
.replay { background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 22px 24px 18px; }
.replay-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggles .sw { width: 14px; height: 4px; border-radius: 2px; margin: 0; }
.toggles .sw.dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; border: 2px solid currentColor; }
.tlabel { font-family: var(--mono); font-size: 15px; }
.replay svg { width: 100%; height: auto; display: block; overflow: visible; }
.replay .ax { fill: var(--ink-2); font-size: 13px; font-family: var(--mono); }
.replay .axl { fill: var(--ink-2); font-size: 13px; }
.replay .gl { stroke: var(--rule-2); }
.replay .bedfill { fill: var(--bed-soft); stroke: var(--bed); stroke-width: 1.2; }
.replay .exact-area { fill: var(--water); opacity: .2; }
.replay .exact { fill: none; stroke: var(--water); stroke-width: 2.5; stroke-linejoin: round; }
.replay .model { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.replay .dam { stroke: #8796A0; stroke-dasharray: 4 5; stroke-width: 1.5; }
.replay .model.thin { stroke-width: 1.2; opacity: .55; }
.replay .band { fill: var(--pass); opacity: .1; }
.replay .exact.target { stroke-dasharray: 7 5; }
.replay .hover { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.replay + .replay { margin-top: 18px; }
.replay h3 { font-size: 19px; margin: 0 0 4px; }
.replay .chart-note { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); max-width: 80ch; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; }
.play { flex: none; width: 48px; height: 48px; border-radius: 24px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.controls label { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.controls input[type=range] { width: 100%; accent-color: var(--water); min-height: 32px; }
.controls .readout { flex: 1 1 260px; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.story { padding: 40px 0 8px; }
.story .card h2 { font-size: 19px; margin-bottom: 10px; letter-spacing: -0.01em; }
.story .card p, .story .card li { font-size: 16px; line-height: 1.6; color: var(--ink-3); }
.story .card ul { margin: 0; padding-left: 18px; }
.models { display: flex; flex-direction: column; gap: 14px; }
.model-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 24px; }
.model-card .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.model-card .name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.model-card .name .sw { width: 16px; height: 4px; margin: 0; }
.model-card .what { font-size: 14px; color: var(--ink-2); }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.check { background: var(--paper); border-radius: 10px; padding: 14px 16px; }
.check.bad { background: var(--fail-wash); }
.check .k { font-size: 13px; color: var(--ink-2); }
.check .v { font-size: 18px; font-weight: 700; }
.check .lim { font-size: 13px; color: var(--ink-2); }
.model-card .note { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: none; }
.notyet { border: 1.5px dashed var(--draft); border-radius: var(--radius); padding: 18px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.split-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split-row > .card:first-child { flex: 1 1 520px; min-width: 0; }
.split-row > .card:last-child { flex: 1 1 300px; min-width: 0; }
.split-row .card h2 { font-size: 19px; margin-bottom: 6px; letter-spacing: -0.01em; }
.links-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
details.tech { margin-top: 40px; }
details.tech > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 24px; font-size: 18px; font-weight: 700; }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary span { font-size: 14px; font-weight: 500; color: var(--water); }
details.tech[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
details.tech > .tech-body { background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 8px 24px 28px; }
.tech-body h3 { margin-top: 28px; }
.figs-legacy { margin-top: 12px; }

/* ── tables and prose ──────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data caption { text-align: left; font-weight: 600; padding: 10px 14px 0; }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.data thead th { font-size: 13px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--rule); background: var(--rule-2); white-space: nowrap; }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data .num { text-align: right; white-space: nowrap; }
table.data td.rationale { color: var(--ink-2); font-size: 14px; min-width: 22ch; }
table.data code { white-space: nowrap; }
.split { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.callout { background: var(--water-wash); border: 1px solid var(--water-soft); padding: 14px 18px; border-radius: 10px; max-width: none; font-size: 15px; }
.callout.warn { background: var(--fail-wash); border-color: var(--fail-soft); }
.callout h2 { font-size: 18px; margin-bottom: 6px; }
.callout ul { margin: 0; padding-left: 20px; }
.cites { padding-left: 20px; font-size: 15px; }
.cites li { margin-bottom: 6px; }
.prose { max-width: var(--measure); }
.prose h1 { font-size: 30px; }
.prose h2 { margin-top: 36px; font-size: 26px; }
.prose h3 { margin-top: 24px; }
.prose table { border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 6px 12px 6px 0; text-align: left; }
.prose li { margin-bottom: 4px; }
.prose, .cites, .callout, .small, .lede { overflow-wrap: anywhere; }
.checklist { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--rule-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { font-weight: 800; }
.checklist .met .mark { color: var(--pass); }
.checklist .unmet .mark { color: var(--fail); }
.checklist .detail { display: block; color: var(--ink-2); font-size: 13.5px; }
.checklist .stage { font-size: 12px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 0 7px; margin-left: 6px; white-space: nowrap; }
.copy { position: absolute; top: 6px; right: 6px; font: 600 12px var(--sans); color: var(--ink-2); background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.copy:hover { color: var(--water); border-color: var(--water); }
.copy.inline { position: static; margin-left: 6px; padding: 1px 6px; }
.hash { font-family: var(--mono); font-size: 13px; }
.searchrow { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.searchrow label { display: flex; flex-direction: column; gap: 4px; }
.searchrow input, .searchrow select { font: inherit; font-size: 15px; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; min-width: 160px; min-height: 40px; }
.audit { padding-left: 22px; }
.audit li { margin-bottom: 22px; max-width: var(--measure); }
.page-head { padding: 40px 0 8px; }
.page-head h1 { max-width: 20ch; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; max-width: 100%; }

/* ── server-drawn charts (charts.py) ───────────────────────────────── */
.figure { margin: 18px 0 26px; }
.figure.map img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); background: #fff; }
.chart { width: 100%; height: auto; display: block; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; font-family: var(--sans); }
.chart .grid line { stroke: var(--rule-2); stroke-width: 1; }
.chart .tick { fill: var(--ink-2); font-size: 12px; font-family: var(--mono); }
.chart .axis-label { fill: var(--ink-2); font-size: 13px; }
.chart .frame { fill: none; stroke: var(--rule); }
.chart .line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: 0.18; stroke: none; }
.chart .bed { fill: var(--bed-soft); stroke: var(--bed); stroke-width: 1.5; }
.chart .ref-line { stroke: var(--ink-2); stroke-dasharray: 5 4; stroke-width: 1.2; }
.chart .ref-label { fill: var(--ink-2); font-size: 12px; }
.s-water.line { stroke: var(--water); } .s-water.area { fill: var(--water); } .s-water circle { fill: var(--water); }
.s-violet.line { stroke: var(--violet); } .s-violet.area { fill: var(--violet); }
.s-solver.line { stroke: var(--ink); } .s-solver circle { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.5; }
.s-muted.line { stroke: var(--ink-2); }
.s-time.line { stroke: var(--water); }
.s-t0.line { opacity: 0.3; } .s-t1.line { opacity: 0.45; } .s-t2.line { opacity: 0.6; } .s-t3.line { opacity: 0.78; } .s-t4.line { opacity: 1; }
.s-cat.line { stroke: var(--cat-0); }
.s-c1.line { stroke: var(--cat-1); } .s-c2.line { stroke: var(--cat-2); } .s-c3.line { stroke: var(--cat-3); } .s-c4.line { stroke: var(--cat-4); } .s-c5.line { stroke: var(--cat-5); } .s-c6.line { stroke: var(--cat-6); }
.bars rect.st-frozen { fill: var(--frozen); } .bars rect.st-candidate { fill: var(--candidate); } .bars rect.st-draft { fill: var(--draft); }
.bars rect.st-release { fill: var(--release); } .bars rect.st-fail { fill: var(--fail); }
.bars .bar-label { fill: var(--ink); font-size: 13px; font-weight: 600; }
.bars .bar-label a { fill: var(--ink); text-decoration: underline; }
.bars .bar-value { fill: #fff; font-size: 12px; font-weight: 600; }
.bars .bar-total { fill: var(--ink-2); font-size: 13px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 18px; height: 4px; border-radius: 2px; background: var(--water); }
.key.st-frozen { background: var(--frozen); height: 12px; width: 12px; } .key.st-candidate { background: var(--candidate); height: 12px; width: 12px; }
.key.st-draft { background: var(--draft); height: 12px; width: 12px; } .key.st-release { background: var(--release); height: 12px; width: 12px; }
.key.s-solver { background: var(--sheet); border: 1.5px solid var(--ink); width: 10px; height: 10px; border-radius: 50%; }
.key.s-muted { background: var(--ink-2); }
.key.key-dash { background: repeating-linear-gradient(90deg, var(--ink-2) 0 5px, transparent 5px 8px); }
.key.s-cat { background: var(--cat-0); }
.key.s-c1 { background: var(--cat-1); } .key.s-c2 { background: var(--cat-2); } .key.s-c3 { background: var(--cat-3); }
.key.s-c4 { background: var(--cat-4); } .key.s-c5 { background: var(--cat-5); } .key.s-c6 { background: var(--cat-6); }
.key.s-violet { background: var(--violet); } .key.s-time { background: var(--water); }
.chart-note { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.conv { max-width: 620px; }
.figure:has(.bars) { max-width: 820px; }

/* ── score your model ──────────────────────────────────────────────── */
.drop { flex: 1 1 360px; min-width: 0; min-height: 220px; border: 2px dashed #9DB6C7; border-radius: 16px; background: var(--water-wash); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--water); background: var(--water-soft); }
.drop b { font-size: 18px; }
.drop input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.drop select { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); max-width: 100%; min-height: 40px; }
.report { margin-top: 20px; }
.report:empty { display: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 44px 0; }
  .hero { padding-top: 40px; gap: 28px; }
  .card, .replay, .model-card { padding: 18px; }
  details.tech > .tech-body { padding: 4px 16px 20px; }
  .figure:has(.bars) { overflow-x: auto; }
  .figure .bars { min-width: 560px; }
  .lede { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.replay svg.narrow .ax, .replay svg.narrow .axl { font-size: 20px; }
.pill[aria-pressed="true"] .sw.dot { color: var(--paper) !important; }
.legacy section { margin: 48px 0; }
.legacy .page-head { padding-top: 40px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--rule-2); color: var(--ink); text-decoration: none; }
.toc a:hover { background: var(--water-soft); color: var(--water-ink); }
.findings { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.findings .finding { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); padding: 14px 16px; font-size: 15px; }
.findings .finding b { font-size: 16px; }

/* compare two models */
.cmp-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; margin: 0 0 22px; }
.cmp-pick label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.cmp-pick select { font: inherit; font-size: 16px; text-transform: none; letter-spacing: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); min-width: min(100%, 300px); }
.cmp-pick .vs { font-weight: 700; color: var(--ink-2); padding-bottom: 10px; }
.cmp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.cmp-summary > div { background: var(--sheet); padding: 16px 18px; }
.cmp-summary > div.hl { background: var(--water-wash); }
.cmp-summary b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.cmp-summary span { color: var(--ink-2); font-size: 14px; }
table.cmp th[scope=row] small { display: block; color: var(--ink-2); font-weight: 400; }
table.cmp td { vertical-align: top; min-width: 220px; }
.cmp-checks { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.cmp-checks li.no { color: var(--fail-ink); }
tr.cmp-diff th[scope=row] { box-shadow: inset 3px 0 0 var(--water); }
@media (max-width: 640px) {
  table.cmp, table.cmp tbody { display: block; width: 100%; }
  table.cmp thead { display: none; }
  table.cmp tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
  table.cmp th[scope=row] { grid-column: 1 / -1; border: 0; padding: 0 0 8px; }
  table.cmp td { min-width: 0; border: 0; padding: 0; overflow-wrap: anywhere; }
  table.cmp td::before { content: attr(data-m); display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
  tr.cmp-diff { box-shadow: inset 3px 0 0 var(--water); }
  tr.cmp-diff th[scope=row] { box-shadow: none; }
}

/* share a result */
details.share { margin-top: 10px; font-size: 14px; }
details.share summary { cursor: pointer; color: var(--water); font-weight: 600; }
details.share label { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
details.share input { font: 13px var(--mono); padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }

/* what's new */
.news-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .news-cols { grid-template-columns: minmax(0, 1fr); } }
.news-item { margin-bottom: 16px; }
.news-item h3 { margin: 0 0 8px; }
.news-item ul { margin: 10px 0; padding-left: 20px; }
.news-item details summary { cursor: pointer; color: var(--water); font-weight: 600; margin-top: 6px; }
.news-change { border-left: 3px solid var(--rule); padding: 4px 0 4px 16px; margin: 0 0 18px; }
.news-change ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
.news-change .kicker { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* scoring review */
.badge.sm { font-size: 12.5px; padding: 3px 10px; }
.badge.unsure { background: var(--rule-2); color: var(--ink-2); }
.tmx-wrap { margin: 4px 0 12px; max-width: 640px; }
table.tmx { width: 100%; }
table.tmx td { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
table.tmx td.hl { background: var(--water-wash); }
.review-rules h3 { margin-top: 0; }
.ord-chart { display: grid; gap: 18px; }
.ord-group { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); padding: 12px 14px; }
.ord-head { margin-bottom: 4px; }
.ord-head a { color: var(--ink); text-decoration: none; }
.ord-row { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) minmax(220px, 260px); gap: 10px; align-items: center; padding: 2px 0; }
.ord-row .lab { font-size: 13.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ord-row .val { font-size: 13px; font-variant-numeric: tabular-nums; display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.ord-svg { width: 100%; height: 16px; display: block; overflow: visible; }
.ord-svg.axis { height: 20px; }
.ord-svg text { font-size: 10px; fill: var(--ink-2); font-family: var(--sans); }
.ord-svg .tk { stroke: var(--rule); }
.ord-svg .need { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 3 2; }
.ord-svg .ok-zone { fill: var(--pass-soft); opacity: .55; }
.ord-svg .ci { stroke-width: 2.5; stroke-linecap: round; }
.ord-svg .ci.pass { stroke: var(--pass); } .ord-svg .ci.fail { stroke: var(--fail); } .ord-svg .ci.unsure { stroke: var(--ink-3); }
.ord-svg .pt.pass { fill: var(--pass); } .ord-svg .pt.fail { fill: var(--fail); } .ord-svg .pt.unsure { fill: var(--ink-2); }
.check .lim .mg { color: var(--ink-2); }
.check.bad .lim .mg { color: var(--fail-ink); font-weight: 600; }
@media (max-width: 640px) {
  .ord-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 6px 0; border-top: 1px solid var(--rule-2); }
  .ord-row.axis-row { border-top: 0; }
  .ord-row.axis-row .lab, .ord-row.axis-row .val { display: none; }
  .ord-row .val { justify-content: flex-start; }
  table.tmx th, table.tmx td { padding: 8px 6px; font-size: 13px; }
}

/* scoring method 2: the third outcome, inconclusive */
.v-unsure { color: var(--ink-2); } .v-unsure::before { background: var(--ink-3); }
.cellbtn.unsure { background: var(--rule-2); color: var(--ink-2); }
.unsure { color: var(--ink-2); font-weight: 800; }
.check.unsure { background: var(--rule-2); font-weight: inherit; color: inherit; }
.cmp-checks li.unsure { color: var(--ink-2); font-weight: inherit; }
.tc-bar i.u { background: var(--ink-3); }
.two-verdicts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 10px; color: var(--ink-2); }
.two-verdicts .ok, .two-verdicts .no, .two-verdicts .unsure { font-weight: 700; }
.check.info { background: var(--rule-2); }
.check.info .v { color: var(--ink-2); }
.check.info .lim .mg { color: var(--ink-2); font-weight: 400; }
.info { color: var(--ink-2); }
pre.code { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 8px 0; white-space: pre; }
pre.code code { font-family: var(--mono); }
details.run-it summary { font-weight: 600; }

/* results viewer */
.vw-pick { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-bottom: 8px; }
.vw-pick label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); flex: 1 1 320px; min-width: 0; }
.vw-pick select { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); width: 100%; }
.vw-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.vw-map { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px; min-width: 0; }
.vw-map[hidden] { display: none; }
.vw-map.vw-exact { border-color: var(--water); box-shadow: inset 0 0 0 1px var(--water); }
.vw-map.vw-big { grid-column: 1 / -1; }
.vw-map.vw-big canvas { max-width: 760px; margin: 0 auto; }
.vw-map figcaption { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; min-height: 26px; }
.vw-read { margin-left: auto; font: 600 13px var(--mono); color: var(--ink); background: var(--water-wash); border-radius: 6px; padding: 2px 7px; }
.vw-read:empty { display: none; }
.vw-map canvas { width: 100%; height: auto; display: block; background: var(--dry); border-radius: 6px; cursor: crosshair; touch-action: pinch-zoom; }
.vw-map.vw-stale canvas { opacity: .35; }
.vw-player { position: sticky; top: 62px; z-index: 6; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  margin: 0 -12px 10px; padding: 10px 12px; border-radius: 0 0 12px 12px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.vw-legend { flex: 1 1 300px; max-width: 460px; margin: 0; }
.vw-leg-row { display: flex; gap: 6px; align-items: center; }
.vw-leg-row .vw-bar { flex: 1; }
.vw-dry { width: 22px; height: 12px; border-radius: 4px; background: var(--dry); border: 1px solid var(--rule); flex: none; }
.vw-bar { height: 12px; border-radius: 6px; border: 1px solid var(--rule); }
.vw-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.vw-time { display: flex; align-items: center; gap: 8px; flex: 2 1 420px; min-width: 0; }
.vw-time .play { width: 44px; height: 44px; }
.vw-step { flex: none; width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vw-step svg { width: 12px; height: 12px; fill: currentColor; }
.vw-step:hover { border-color: var(--ink-2); }
.vw-time input[type=range] { flex: 1; min-width: 80px; accent-color: var(--water); }
.vw-tlabel { font: 600 13.5px var(--mono); white-space: nowrap; min-width: 9ch; }
.vw-speed { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; flex: none; }
.vw-speed button { border: 0; background: var(--sheet); color: var(--ink-2); padding: 5px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.vw-speed button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.vw-hint { margin: 0 0 8px; }
.vw-stale-note { margin: 0 0 10px; }
.vw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; align-items: center; }
.vw-chips[hidden] { display: none; }
.vw-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer; }
.vw-chip[aria-pressed="false"] { opacity: .45; background: transparent; text-decoration: line-through; text-decoration-color: var(--ink-2); }
.vw-chip-sub { font-weight: 400; color: var(--ink-2); }
.vw-chip-v { font-size: 12px; }
.vw-chip-v.pass { color: var(--pass); } .vw-chip-v.fail { color: var(--fail); }
.vw-chip-all { font-size: 13px; color: var(--ink-2); margin-left: 4px; }
#vw-conv .grid { stroke: var(--rule-2); }
#vw-conv .need { stroke: var(--ink-2); stroke-dasharray: 5 4; stroke-width: 1.5; }
#vw-conv .vw-series { cursor: pointer; transition: opacity .12s; }
#vw-conv.vw-hl .vw-series:not(.on) { opacity: .12; }
#vw-conv.vw-hl .vw-series.on path:first-child { stroke-width: 3.5; }
#vw-table tbody tr { transition: opacity .12s; }
#vw-table tbody tr.vw-on td { background: var(--water-wash); }
#vw-table tbody tr.vw-off { opacity: .4; }
@media (max-width: 640px) {
  .vw-player { gap: 8px; }
  .vw-speed { order: 5; }
  .vw-tlabel { min-width: 0; }
}
.vw-time[hidden], .vw-pick [hidden], [data-mode][hidden] { display: none !important; }
.prep-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.prep-item { background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.prep-item b { color: var(--ink); }

/* Network viewer */
.nv-bar { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end; margin-bottom: 14px; }
.nv-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.nv-bar .nv-field { flex: 1 1 320px; }
.nv-field select { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); width: 100%; }
.nv-field select:disabled { opacity: .55; }
.nv-dl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex: 2 1 420px; }
.nv-dl .btn { min-height: 44px; padding: 10px 16px; font-size: 15px; max-width: 100%; overflow-wrap: anywhere; }
.nv-dl .btn:not(.primary):not(.ghost) { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.nv-kb { font-weight: 400; opacity: .85; font-size: 13px; }
.nv-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
.nv-tabs [role=tab] { font: inherit; font-size: 15px; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--ink-2); cursor: pointer; margin-bottom: -1px; }
.nv-tabs [role=tab][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--water); }
.nv-summary { margin-left: auto; padding: 6px 0; }
.nv-pane[hidden] { display: none !important; }
.nv-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.nv-controls .view-toggle { margin-left: 0; }
.nv-controls .view-toggle button:disabled { opacity: .45; cursor: not-allowed; }
.nv-flow-t { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); cursor: pointer; }
.nv-flow-t[hidden] { display: none; }
.nv-flow-t input { accent-color: var(--water); width: 16px; height: 16px; }
.nv-time { display: flex; align-items: center; gap: 8px; flex: 1 1 380px; min-width: 0; }
.nv-engines { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.nv-eng-lbl { font-weight: 600; color: var(--ink-2); margin-right: 2px; }
.nv-engines .vw-chip[aria-pressed="false"] { opacity: 1; text-decoration: none; background: var(--sheet); color: var(--ink-2); }
.nv-engines .vw-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nv-engines .vw-chip[aria-pressed="true"] .vw-chip-sub { color: inherit; opacity: .75; }
.nv-engines .vw-chip[aria-pressed="true"] .vw-chip-v.pass { color: #7EE0A8; }
.nv-engines .vw-chip[aria-pressed="true"] .vw-chip-v.fail { color: #FFB08C; }
.nv-engines .nv-ref { border-style: dashed; }
.nv-mini.nv-seek { cursor: pointer; }
.nv-mini-note { margin: 2px 0 0; }
.nv-back-map { display: none; margin-left: auto; font-size: 13px; }
.nv-src-note { display: block; }
.nv-time[hidden] { display: none !important; }
.nv-time input[type=range] { flex: 1; min-width: 0; }
.nv-time .play { width: 42px; height: 42px; }
.nv-time input[type=range] { accent-color: var(--water); }
.nv-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.nv-stage { position: relative; }
.nv-canvas-box { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
#nv-canvas { display: block; width: 100%; height: 480px; touch-action: none; cursor: grab; }
.nv-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.nv-zoom button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: 600 18px/1 var(--sans); cursor: pointer; }
.nv-zoom button:hover { border-color: var(--ink-2); }
.nv-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); padding: 6px 10px; border-radius: 8px; max-width: 220px; line-height: 1.35; z-index: 2; }
.nv-tip[hidden] { display: none; }
.nv-legend { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 18px; max-width: min(560px, calc(100% - 20px));
  background: color-mix(in srgb, var(--sheet) 90%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; pointer-events: none; }
.nv-legend[hidden] { display: none; }
.nv-leg { flex: 1 1 200px; min-width: 0; }
.nv-leg-t { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 3px; }
.nv-legend .vw-bar { height: 9px; }
.nv-legend .vw-ticks { font-size: 11px; margin-top: 2px; font-family: var(--mono); }
.nv-sym { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.nv-sym span { display: inline-flex; align-items: center; gap: 6px; }
.nv-sym i { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--ink-2); background: var(--sheet); }
.nv-sym .s-j { border-radius: 50%; }
.nv-sym .s-o { width: 0; height: 0; border: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--bed); background: none; }
.nv-sym .s-s { background: var(--water-soft); }
.nv-sym .s-p { transform: rotate(45deg); width: 9px; height: 9px; background: var(--ink); border-color: var(--ink); }
.nv-sym .s-w { transform: rotate(45deg); width: 9px; height: 9px; border-color: var(--ink); }
.nv-side { padding: 16px 18px; max-height: calc(64vh + 120px); overflow: auto; }
.nv-side-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.nv-side-head h3 { margin: 0; font-family: var(--mono); font-size: 18px; overflow-wrap: anywhere; }
.nv-h4 { font-size: 14px; margin: 16px 0 6px; color: var(--ink-3); }
.nv-at { margin: 10px 0 4px; font-weight: 600; color: var(--ink-3); }
table.data.nv-vals th, table.data.nv-vals td, table.data.nv-props th, table.data.nv-props td { padding: 6px 8px; font-size: 13.5px; }
table.data.nv-props th { font-weight: 600; color: var(--ink-2); white-space: nowrap; width: 40%; }
table.data.nv-props .nv-sub { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--rule-2); }
table.data.nv-vals tr.nv-cur td { font-weight: 700; }
.nv-mini { width: 100%; height: auto; margin-top: 8px; font: 11px var(--sans); fill: var(--ink-2); }
.nv-mini .nv-ax { stroke: var(--ink-2); }
.nv-mini .nv-grid { stroke: var(--rule-2); }
.nv-mini .nv-cursor { stroke: var(--fail); stroke-width: 1.5; stroke-dasharray: 3 3; }
.nv-mini .nv-unit { fill: var(--ink-2); }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--water); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nv-file { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.nv-sections { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; max-height: 70vh; overflow: auto; }
.nv-sections button { font: inherit; font-size: 13px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); }
.nv-sections button:hover { background: var(--rule-2); }
.nv-sections button[aria-pressed="true"] { background: var(--water-soft); color: var(--water-ink); font-weight: 600; }
.nv-src-box { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.nv-src-head { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rule-2); }
.nv-src-head input { font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); flex: 1; min-width: 0; }
.nv-src { font: 13px/1.55 var(--mono); white-space: pre; overflow: auto; max-height: 70vh; padding: 8px 0; }
.nv-line { display: block; padding: 0 14px 0 0; }
.nv-line .ln { display: inline-block; width: 7.5ch; padding-right: 1.5ch; text-align: right; color: var(--ink-2); opacity: .55; user-select: none; }
.nv-l-sec { font-weight: 700; color: var(--water-ink); }
.nv-l-com { color: var(--ink-2); }
@media (max-width: 960px) {
  .nv-main { grid-template-columns: 1fr; }
  .nv-side { max-height: none; scroll-margin-top: 72px; }
  .nv-back-map { display: inline; }
  .nv-engines { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-bottom: 6px; }
  .nv-engines > * { flex: none; }
  .nv-time { flex-wrap: wrap; flex-basis: 100%; }
  .nv-time input[type=range] { flex: 1 1 120px; }
  .nv-time .vw-tlabel { order: 6; }
  .nv-time .vw-speed { order: 7; margin-left: auto; }
  .nv-legend { position: static; max-width: none; border: 0; border-top: 1px solid var(--rule-2); border-radius: 0; background: var(--sheet); }
  .nv-file { grid-template-columns: 1fr; }
  .nv-sections { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .nv-summary { margin-left: 0; flex-basis: 100%; }
}
.nv-file-card { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: center; }
.nv-file-card h2 { margin-bottom: 8px; }
.nv-thumb-link { display: block; border-radius: 10px; background: var(--water-wash); border: 1px solid var(--rule); }
.nv-thumb { display: block; width: 100%; height: auto; }
.nv-thumb-l { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.nv-thumb-n { fill: var(--water); }
@media (max-width: 760px) { .nv-file-card { grid-template-columns: 1fr; } }
.nv-head { padding-bottom: 8px; }
.nv-head h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 6px; }
.nv-head .lede { font-size: 18px; margin-bottom: 4px; max-width: 70ch; }
.nv-foot { padding: 8px 14px 12px; border-top: 1px solid var(--rule-2); }
.nv-foot:empty { display: none; }

/* Score your model */
.sc-head { padding-bottom: 4px; }
.sc-steps { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: start; margin-top: 10px; }
.sc-step, .sc-pub { position: relative; padding-top: 22px; min-width: 0; }
.sc-step select { max-width: 100%; }
.sc-n { width: 34px; height: 34px; border-radius: 50%; background: var(--water); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sc-step h2, .sc-pub h2 { font-size: 21px; margin-bottom: 10px; }
.sc-step .nv-field { margin-bottom: 8px; }
.sc-step .btns .btn { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.sc-setup { margin-top: 12px; border-top: 1px solid var(--rule-2); padding-top: 10px; }
.sc-setup summary { cursor: pointer; font-weight: 600; }
.sc-setup .prose h1, .sc-setup .prose h2 { font-size: 15px; margin: 12px 0 4px; }
.sc-setup .prose ul { padding-left: 18px; margin: 4px 0; }
.sc-step .drop { min-height: 200px; }
.sc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin-top: 8px; }
.sc-form input, .sc-form textarea { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); width: 100%; }
.sc-wide { grid-column: 1 / -1; }
.sc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.sc-check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
#sc-sent { margin-top: 14px; }
#sc-publish[hidden], #sc-sent[hidden] { display: none; }
@media (max-width: 960px) { .sc-steps { grid-template-columns: 1fr; } .sc-form { grid-template-columns: 1fr; } }
#vw-maps-sec { padding-top: 24px; }
@media (max-width: 640px) { .vw-player { margin: 0 -4px 10px; padding: 8px 4px; } }
@media (max-width: 640px) {
  .vw-time { flex-wrap: wrap; flex-basis: 100%; }
  .vw-time input[type=range] { flex: 1 1 120px; }
  .vw-tlabel { order: 6; }
  .vw-speed { order: 7; margin-left: auto; }
  .vw-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -16px; scrollbar-width: thin; }
  .vw-chip { flex: none; }
  .vw-chip-all { flex: none; padding-right: 16px; }
  .vw-maps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vw-map { padding: 6px; }
  .vw-map figcaption { font-size: 12px; gap: 4px; }
  .vw-map figcaption .badge { display: none; }
  .vw-read { font-size: 11.5px; padding: 1px 5px; }
  #vw-conv .axl { font-size: 21px; }
}
#vw-conv .need-l { paint-order: stroke; stroke: var(--sheet); stroke-width: 6px; stroke-linejoin: round; }

/* 1D/2D viewer */
.cv-pick { align-items: center; }
.cv-models { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-models .vw-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cv-models .vw-chip[aria-pressed="true"] .vw-chip-v.pass { color: #7EE0A8; }
.cv-models .vw-chip[aria-pressed="true"] .vw-chip-v.fail { color: #FFB08C; }
.cv-story { font-size: 17px; line-height: 1.5; margin: 18px 0 6px; min-height: 2.2em; max-width: 80ch; }
.cv-clock { font: 600 14px var(--mono); background: var(--rule-2); border-radius: 6px; padding: 2px 8px; margin-right: 6px; white-space: nowrap; }
.cv-up { color: #D9622B; } .cv-down { color: #1F78C8; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cv-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cv-panel { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.cv-panel figcaption { font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 8px; }
.cv-panel svg { width: 100%; height: auto; display: block; font: 11.5px var(--sans); cursor: pointer; }
#cv-prof { cursor: default; }
.cv-read { margin-left: auto; font: 600 12.5px var(--mono); background: var(--water-wash); border-radius: 6px; padding: 2px 7px; }
.cv-read:empty { display: none; }
#cv-map { display: block; width: 100%; border-radius: 8px; cursor: crosshair; }
.cv-leg { margin-top: 10px; max-width: 460px; }
.cv-leg-note { margin: 6px 0 0; color: var(--ink-2); }
.cv-ax { fill: var(--ink-2); font-size: 11.5px; }
.cv-lbl { fill: var(--ink-3); font-size: 11.5px; font-family: var(--mono); }
.cv-strong { font-weight: 700; fill: var(--ink); font-family: var(--sans); font-size: 12.5px; }
.cv-key { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); margin-top: 6px; }
.cv-key span { display: inline-flex; align-items: center; gap: 6px; }
.cv-key i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--ink-2); }
.cv-key .k-water { height: 9px; border: 0; background: #2C7DBE; opacity: .55; }
.cv-key .k-hgl { border-top: 2.5px dashed #2C7DBE; }
.cv-key .k-ground { border-top: 3px solid var(--bed); }
.cv-key .k-surf { height: 9px; border: 0; background: #2C7DBE; opacity: .3; }
.cv-bal { margin: 6px 0 0; }
@media (max-width: 960px) { .cv-grid, .cv-charts { grid-template-columns: minmax(0, 1fr); } }
.cv-halo { paint-order: stroke; stroke: var(--sheet); stroke-width: 4px; stroke-linejoin: round; }

/* scores: share of the allowance used (lower is better) */
.score { display: inline-flex; align-items: center; gap: 4px; font: 600 13px/1.2 var(--sans); padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-style: normal; }
.score .rk { font-family: var(--mono); font-weight: 700; }
.s0 { --sc: #1A7F4B; --sb: #DDF2E6; } .s1 { --sc: #3E8E5B; --sb: #E8F4EC; } .s2 { --sc: #7A7A1E; --sb: #F3F1D9; }
.s3 { --sc: #A96313; --sb: #FBEBD6; } .s4 { --sc: #B9471F; --sb: #F9DED2; } .s5 { --sc: #93271A; --sb: #F2CFC8; } .sn { --sc: #5E6B75; --sb: #EDF1F3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s0 { --sc: #7EE0A8; --sb: #12352A; } :root:not([data-theme="light"]) .s1 { --sc: #9BD9AF; --sb: #17322A; }
  :root:not([data-theme="light"]) .s2 { --sc: #D9D27A; --sb: #2E2C17; } :root:not([data-theme="light"]) .s3 { --sc: #F2B56B; --sb: #3A2A15; }
  :root:not([data-theme="light"]) .s4 { --sc: #F08A5D; --sb: #3D2018; } :root:not([data-theme="light"]) .s5 { --sc: #FF8F80; --sb: #44201C; } :root:not([data-theme="light"]) .sn { --sc: #A3B4C1; --sb: #1A2B38; } }
:root[data-theme="dark"] .s0 { --sc: #7EE0A8; --sb: #12352A; } :root[data-theme="dark"] .s1 { --sc: #9BD9AF; --sb: #17322A; } :root[data-theme="dark"] .s2 { --sc: #D9D27A; --sb: #2E2C17; }
:root[data-theme="dark"] .s3 { --sc: #F2B56B; --sb: #3A2A15; } :root[data-theme="dark"] .s4 { --sc: #F08A5D; --sb: #3D2018; } :root[data-theme="dark"] .s5 { --sc: #FF8F80; --sb: #44201C; } :root[data-theme="dark"] .sn { --sc: #A3B4C1; --sb: #1A2B38; }
.score.s0, .score.s1, .score.s2, .score.s3, .score.s4, .score.s5, .score.sn { color: var(--sc); background: var(--sb); }
.cellbtn.s0, .cellbtn.s1, .cellbtn.s2, .cellbtn.s3, .cellbtn.s4, .cellbtn.s5 { color: var(--sc); background: var(--sb); font: 600 12px var(--mono); min-width: 52px; }
.score-legend { flex-wrap: wrap; }
.score-legend .score { padding: 2px 8px; font-size: 12px; }
.tc-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 6px; }
.tc-dots i { width: 12px; height: 12px; border-radius: 3px; background: var(--sc); display: inline-block; }
.run-time { margin: 6px 0 0; }
/* rankings */
.rk-controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-bottom: 8px; }
.rk-controls .filters { margin: 0; }
.rk-kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.rk-kind { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rk-kind input { accent-color: var(--water); width: 16px; height: 16px; }
.rk-board td { vertical-align: middle; }
.rk-board .rk-unranked td { opacity: .62; }
.rk-board td:first-child b { font: 700 18px var(--mono); }
.rk-bar { position: relative; height: 22px; min-width: 160px; background: var(--rule-2); border-radius: 6px; overflow: hidden; }
.rk-bar i { position: absolute; inset: 0 auto 0 0; background: var(--water); opacity: .85; }
.rk-bar span { position: relative; font: 600 12.5px/22px var(--mono); padding-left: 8px; color: var(--ink); }
.rk-portrait-wrap { max-height: 78vh; }
.rk-portrait { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.rk-portrait th { font-weight: 600; text-align: left; white-space: nowrap; background: var(--paper); }
.rk-portrait thead th { position: sticky; top: 0; z-index: 2; height: 74px; vertical-align: bottom; }
.rk-portrait thead th a { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); color: var(--ink-2); text-decoration: none; }
.rk-portrait tbody th { position: sticky; left: 0; z-index: 1; padding-right: 10px; }
.rk-portrait .rk-corner { left: 0; z-index: 3; }
.rk-portrait td { white-space: nowrap; min-width: 58px; height: 28px; text-align: center; border-radius: 4px; background: var(--sb); }
.rk-portrait td a { display: block; color: var(--sc); font: 600 11px/28px var(--mono); text-decoration: none; }
.rk-portrait td.rk-none { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }
.rk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; color: var(--ink-2); }
.rk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rk-legend i { width: 14px; height: 14px; border-radius: 3px; background: var(--sb); box-shadow: inset 0 0 0 1px var(--sc); }
.rk-legend i.rk-none { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.rk-test-pick { max-width: 520px; margin-bottom: 10px; }
.rk-scatter { width: 100%; height: auto; font: 11.5px var(--sans); fill: var(--ink-2); }
.rk-scatter .g { stroke: var(--rule-2); }
.rk-scatter .lim { stroke: var(--fail); stroke-dasharray: 5 4; stroke-width: 1.4; }
.rk-scatter .lim-t { fill: var(--fail); }
.rk-scatter .pl { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--sheet); stroke-width: 3px; }
.panel .score { align-self: flex-start; } .rk-board td:nth-child(2) { min-width: 190px; }

/* percent difference inside a viewer chip or map caption (measurements, not verdicts) */
.vw-chip-v.score { padding: 1px 7px; margin-left: 6px; font-size: 11px; font-weight: 600; border-radius: 999px; }
.score.sm { padding: 1px 7px; font-size: 12px; }

/* ── Leaderboard (rankings.html, the home page's top models, each test's board) ─────────────────────
   Laid out like current AI benchmark boards: the table is the page, one headline rating with its
   interval, dense rows with tabular numbers, a bar chart of the rating, filters in one row. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lb-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding: 40px 0 22px; border-bottom: 1px solid var(--rule); }
.lb-head h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.025em; line-height: 1; margin: 0 0 12px; }
.lb-head .lede { margin: 0; max-width: 62ch; }
.lb-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 0; margin: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); }
.lb-facts div { padding: 10px 18px; border-left: 1px solid var(--rule); }
.lb-facts div:first-child { border-left: 0; }
.lb-facts dt { font-size: 12.5px; color: var(--ink-2); }
.lb-facts dd { margin: 0; font: 600 20px/1.3 var(--mono); color: var(--ink); white-space: nowrap; }
.lb-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--rule); }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--rule-2); border-radius: 10px; }
.lb-tab { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 14px/1 var(--sans); padding: 9px 13px; border-radius: 8px; cursor: pointer; }
.lb-tab:hover { color: var(--ink); }
.lb-tab[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 28, 38, .12); }
.lb-tab:focus-visible, .lb th button:focus-visible, .lb-search input:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
.lb-tools { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.lb-search input { font: 15px var(--sans); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; width: 190px; }
.lb-sec { padding: 30px 0 6px; }
.lb-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 12px; }
.lb-sec-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.lb-sec-head p { margin: 0; max-width: 72ch; }
.lb-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 900px) { .lb-head { grid-template-columns: 1fr; } .lb-two { grid-template-columns: 1fr; } .lb-facts { grid-template-columns: repeat(2, auto); } .lb-facts div:nth-child(3) { border-left: 0; } .lb-facts div:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.lb-how { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.lb-how b { color: var(--ink); }

/* the rating chart: one bar per model, its 95 % interval as a pale band across the bar's end */
.rc { list-style: none; margin: 0; padding: 14px 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; display: grid; gap: 4px; }
.rc li { display: grid; grid-template-columns: minmax(150px, 290px) minmax(0, 1fr) 54px; gap: 14px; align-items: center; min-height: 30px; }
.rc-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-name:hover b { text-decoration: underline; }
.rc-rank { font: 600 12.5px var(--mono); color: var(--ink-2); width: 22px; text-align: right; flex: none; }
.rc-track { position: relative; height: 18px; }
.rc-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--rule-2); }
.rc-ci { position: absolute; top: 4px; bottom: 4px; background: var(--water-soft); border-radius: 999px; }
.rc-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--water); box-shadow: 0 0 0 2px var(--sheet); }
.rc-val { font: 600 14px var(--mono); text-align: right; color: var(--ink); }
.rc-name .sw { flex: none; }
.rc-empty { display: block !important; color: var(--ink-2); font-size: 15px; }
@media (max-width: 640px) { .rc li { grid-template-columns: minmax(0, 1fr) 46px; } .rc-track { grid-column: 1 / -1; grid-row: 2; } .rc-val { grid-row: 1; grid-column: 2; } }

/* the table */
.lb-scroll { border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); max-height: 78vh; }
.lb { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lb th { position: sticky; top: 0; z-index: 2; background: var(--sheet); text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-2);
  padding: 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.lb th.num, .lb td.num { text-align: right; }
.lb th button { appearance: none; border: 0; background: none; font: inherit; color: inherit; padding: 11px 12px; cursor: pointer; width: 100%; text-align: inherit; }
.lb th:not(:has(button)) { padding: 11px 12px; }
.lb th[aria-sort] button { color: var(--ink); }
.lb td { padding: 9px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.lb tbody tr:hover td { background: var(--water-wash); }
.lb tbody tr:last-child td { border-bottom: 0; }
.lb-rank { font: 700 15px var(--mono); color: var(--ink); width: 3.5em; }
.lb-model { min-width: 230px; white-space: nowrap; }
.lb-model a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.lb-model a:hover b { text-decoration: underline; }
.lb-sub { color: var(--ink-2); font-weight: 400; }
.lb-org { font-size: 12.5px; color: var(--ink-2); margin-left: 18px; }
td .lb-org { margin-left: 0; }
.lb-model .lb-org { margin-left: 18px; }
.lb-rating { font: 700 16px var(--mono); color: var(--ink); }
.lb-ci { font: 13px var(--mono); color: var(--ink-2); white-space: nowrap; }
.lb-cell { display: inline-block; min-width: 58px; padding: 3px 7px; border-radius: 6px; font: 600 12.5px var(--mono); color: var(--sc); background: var(--sb); }
.lb-none { color: var(--rule); }
.lb-lic { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lb-unranked td { color: var(--ink-2); }
.lb-unranked .lb-rating, .lb-unranked .lb-model b { color: var(--ink-2); }
.lb-dl { margin: 10px 2px 0; color: var(--ink-2); }
.rk-scatter .best { fill: var(--water-wash); }
.rk-scatter .best-t { fill: var(--water-ink); font-weight: 600; }
.rk-scatter .ci { stroke: var(--ink-2); stroke-width: 1.5; opacity: .45; }

/* the home page's top models and each test's board */
.home-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 32px 48px; align-items: start; padding: 48px 0 24px; }
.home-board h1 { font-size: clamp(36px, 4.6vw, 54px); letter-spacing: -0.025em; line-height: 1.04; margin: 0 0 16px; }
.home-board .lede { margin: 0 0 22px; }
.home-board .rc { padding: 10px 14px; }
.home-board .rc li { grid-template-columns: minmax(150px, 270px) minmax(0, 1fr) 48px; }
.home-board figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
@media (max-width: 900px) { .home-board { grid-template-columns: 1fr; } }
.tb { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; margin: 6px 0 22px; }
.tb th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.tb td { padding: 8px 12px; border-bottom: 1px solid var(--rule-2); }
.tb tr:last-child td { border-bottom: 0; }
.tb .num { text-align: right; }
.tb a { color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.tb a:hover b { text-decoration: underline; }
.tb .tb-why { color: var(--ink-2); font-size: 13.5px; }

/* each test card lists its models, ranked, with their percent difference */
.tc-board { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 3px; }
.tc-board li { display: grid; grid-template-columns: 22px 10px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 13px; color: var(--ink); }
.tc-board .tc-rk { font: 600 11.5px var(--mono); color: var(--ink-2); text-align: right; }
.tc-board .tc-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-board .tc-sub { color: var(--ink-2); }
.tc-board .lb-cell { min-width: 0; font-size: 11.5px; padding: 1px 6px; }
.tc-board .tc-more { display: block; color: var(--ink-2); padding-left: 29px; }
.engine-flag { background: var(--fail-wash); border-left: 3px solid var(--fail); padding: 8px 12px; border-radius: 6px; color: var(--ink); }
.rk-portrait td.rk-flag { background: var(--fail-wash); }
.rk-portrait td.rk-flag a { color: var(--fail); font: 600 13px/28px var(--sans); }
.lb-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lb-gcard { appearance: none; text-align: left; font: inherit; color: inherit; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; gap: 8px; }
.lb-gcard:hover { border-color: var(--water); }
.lb-gcard:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
.lb-gcard > b { font-size: 15px; }
.lb-gnote { font-size: 12px; color: var(--ink-2); }
.lb-why { font: 12px var(--sans); color: var(--ink-2); white-space: normal; }
