/* Layout: a slim sticky top bar, one wide column of content; summary first, detail on its own page. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef1;
  --ink: #1c1f24;
  --muted: #5e646d;
  --line: #dde0e5;
  --line-strong: #b9bec7;
  --accent: #0b7a75;
  --accent-ink: #ffffff;
  --focus: #0b7a75;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --fail: #d03b3b;
  --fail-bg: #fbe9e9;
  --excel: #0a8a0a;
  --excel-bg: #e6f5e6;
  --pass: #6a7079;
  --pass-bg: #eef0f3;
  --na: #9aa0a8;
  --heat-0: #f0efec;
  --heat-1: #cde2fb;
  --heat-2: #9ec5f4;
  --heat-3: #6da7ec;
  --heat-4: #3987e5;
  --heat-5: #256abf;
  --heat-6: #184f95;
  --heat-ink-dark: #ffffff;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.06), 0 4px 16px rgba(20, 24, 32, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141517;
    --surface: #1d1f23;
    --surface-2: #26292e;
    --ink: #ebecea;
    --muted: #a3a8b1;
    --line: #2d3036;
    --line-strong: #4a4f58;
    --accent: #3cc4bd;
    --accent-ink: #0d1413;
    --focus: #3cc4bd;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --fail: #ef6b6b;
    --fail-bg: #3a2223;
    --excel: #4fc04f;
    --excel-bg: #1f3320;
    --pass: #a3a8b1;
    --pass-bg: #2a2d33;
    --na: #6c727b;
    --heat-0: #383835;
    --heat-1: #184f95;
    --heat-2: #1c5cab;
    --heat-3: #256abf;
    --heat-4: #3987e5;
    --heat-5: #6da7ec;
    --heat-6: #9ec5f4;
    --heat-ink-dark: #0b1220;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141517;
  --surface: #1d1f23;
  --surface-2: #26292e;
  --ink: #ebecea;
  --muted: #a3a8b1;
  --line: #2d3036;
  --line-strong: #4a4f58;
  --accent: #3cc4bd;
  --accent-ink: #0d1413;
  --focus: #3cc4bd;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --fail: #ef6b6b;
  --fail-bg: #3a2223;
  --excel: #4fc04f;
  --excel-bg: #1f3320;
  --pass: #a3a8b1;
  --pass-bg: #2a2d33;
  --na: #6c727b;
  --heat-0: #383835;
  --heat-1: #184f95;
  --heat-2: #1c5cab;
  --heat-3: #256abf;
  --heat-4: #3987e5;
  --heat-5: #6da7ec;
  --heat-6: #9ec5f4;
  --heat-ink-dark: #0b1220;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, select, input { font: inherit; color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 600; }
h1 { font-size: 28px; letter-spacing: -0.01em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.prose { max-width: 72ch; }
.prose p + p { margin-top: 10px; }
.prose ul { margin: 8px 0 0; padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.loading { color: var(--muted); padding: 40px 0; }
.error { color: var(--fail); background: var(--fail-bg); padding: 12px 14px; border-radius: var(--radius); }

/* Top bar */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  padding: 14px 10px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.built { margin-left: auto; color: var(--muted); font-size: 12.5px; }

.wrap { max-width: 1480px; margin: 0 auto; padding-inline: 20px; padding-block: 24px 60px; }

/* Panels and tables */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}
.panel-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
table.table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-size: 13.5px; }
.table th.num { font-family: var(--font-body); }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table .lead td { font-weight: 600; }
.table td.model { min-width: 240px; }
.hero-table td.num { font-size: 16px; }

/* Series identity */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--series-1); vertical-align: middle; margin-right: 6px; flex: none; }
.s1 { --c: var(--series-1); }
.s2 { --c: var(--series-2); }
.s3 { --c: var(--series-3); }
.s4 { --c: var(--series-4); }
.s1 .dot, .dot.s1 { background: var(--series-1); }
.s2 .dot, .dot.s2 { background: var(--series-2); }
.s3 .dot, .dot.s3 { background: var(--series-3); }
.s4 .dot, .dot.s4 { background: var(--series-4); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; }

/* Bar rows: category comparisons, one thin bar per series */
.bars { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 12px; align-items: center; }
.bars .label { font-size: 13.5px; color: var(--ink); text-align: right; }
.bars .label.link { cursor: pointer; }
.bars .label.link:hover { color: var(--accent); }
.bars .group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bar { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; height: 14px; }
.bar .track { height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; }
.bar .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--c, var(--series-1)); }
.bar .val { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars.compact .bar { height: 12px; }
.bars.compact .bar .track { height: 8px; }

/* Inline score with a tiny bar: identity by the model's color, magnitude by length */
.score { display: inline-grid; grid-template-columns: auto 44px; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.score .track { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.score .fill { display: block; height: 100%; background: var(--c, var(--series-1)); }
.score.big { grid-template-columns: auto 120px; font-size: 20px; }
.score.big .track { height: 10px; }
.score .lbl { font-family: var(--font-body); color: var(--muted); font-size: 12px; }

/* Raw facet verdicts */
.verdict { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px; padding: 1px 6px; border-radius: 3px; border: 1px solid transparent; white-space: nowrap; }
.verdict.v0 { color: var(--fail); background: var(--fail-bg); border-color: var(--fail); }
.verdict.v1 { color: var(--pass); background: var(--pass-bg); border-color: var(--line-strong); }
.verdict.v2 { color: var(--excel); background: var(--excel-bg); border-color: var(--excel); }
.verdict.vna { color: var(--na); border-color: var(--line); border-style: dashed; }
.verdict.vx { color: var(--fail); border-color: var(--fail); border-style: dashed; }

/* Chips and controls */
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.chip.btn { cursor: pointer; border: 0; }
.chip.btn:hover { color: var(--ink); }
.chip.on:hover { color: var(--accent-ink); }
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; }
.control { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.control select, .control input[type="search"], .control input[type="number"] {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 8px;
  font-size: 14px;
  color: var(--ink);
  max-width: 100%;
}
.control input[type="search"] { min-width: 220px; }
.control label.check { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink); padding: 6px 0; }
.btn {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 12px;
  cursor: pointer;
  color: var(--ink);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { opacity: 0.9; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.taskchips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Case cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  min-width: 0;
}
.case:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.thumbs { display: grid; gap: 6px; }
.thumb { position: relative; aspect-ratio: 1; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.missing { display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.thumb .tag { position: absolute; left: 4px; top: 4px; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: rgba(20, 24, 32, 0.72); color: #fff; }
.thumb .tag.src { background: rgba(20, 24, 32, 0.55); }
.thumb .tag.s1 { background: var(--series-1); }
.thumb .tag.s2 { background: var(--series-2); }
.thumb .tag.s3 { background: var(--series-3); }
.thumb .tag.s4 { background: var(--series-4); }
.case .text { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--muted); }
.case .scores { display: grid; grid-template-columns: 1fr; gap: 3px; }
.case .scores .srow { display: flex; gap: 10px; align-items: center; font-size: 12.5px; min-width: 0; }
.case .scores .srow .name { color: var(--muted); flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.more { display: flex; justify-content: center; padding: 10px; }
.case .texts { display: flex; flex-direction: column; gap: 3px; }
.case .text-orig { font-size: 12.5px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* A prompt and its English version side by side */
.prompt-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; max-width: 1200px; }
.prompt-pair .prompt-text { max-width: none; }

/* Judge details: sub-scores, reasoning, warnings */
.subblock { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.subblock:first-of-type { border-top: 0; padding-top: 0; }
.subblock h4 { font-size: 14.5px; }
.subrow { display: grid; grid-template-columns: minmax(110px, max-content) auto 1fr; gap: 10px; align-items: center; font-size: 13.5px; padding: 2px 6px; border-radius: 4px; }
.subrow .sublabel { color: var(--muted); }
.subrow.sets { background: var(--surface-2); }
.subrow.sets .sublabel { color: var(--ink); font-weight: 600; }
blockquote.reason { margin: 2px 0 0; padding: 6px 10px; border-left: 3px solid var(--c, var(--accent)); background: var(--surface-2); border-radius: 0 4px 4px 0; font-size: 13.5px; line-height: 1.45; max-width: 70ch; }
.warn { color: var(--fail); background: var(--fail-bg); padding: 8px 12px; border-radius: var(--radius); font-size: 13.5px; max-width: 80ch; }
.facet .cell-reason { flex-direction: column; align-items: flex-start; gap: 3px; }
.reason-text { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.tree.hide-reasons .reason-text { display: none; }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--ink); }
.table th.rowh { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.table th.rowh .small { font-weight: 400; }
.tree-head { display: grid; gap: 4px 14px; padding: 0 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 50px); background: var(--bg); z-index: 2; padding-block: 6px; }
.cell-model { display: none; font-size: 12px; color: var(--muted); align-items: center; }

/* Detail pages */
.detail-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; }
.pager { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.imgrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.imgbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.imgbox .frame { background: var(--surface-2); border-radius: 4px; overflow: hidden; display: grid; place-items: center; min-height: 200px; cursor: zoom-in; }
.imgbox .frame img { width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.imgbox .frame.missing { color: var(--muted); font-size: 13px; cursor: default; }
.imgbox .cap { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.imgbox .cap strong { color: var(--ink); font-size: 14px; }
.prompt-text { font-size: 17px; line-height: 1.45; max-width: 80ch; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.formula { font-family: var(--font-mono); font-size: 13.5px; background: var(--surface-2); padding: 8px 12px; border-radius: var(--radius); display: inline-block; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
details > summary::before { content: "▸"; color: var(--muted); font-size: 12px; transition: transform 0.15s; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary::-webkit-details-marker { display: none; }
details > .body { padding: 0 14px 14px; }
details.inline { border: 0; background: transparent; }
details.inline > summary { padding: 4px 0; font-weight: 400; color: var(--accent); font-size: 13px; }
details.inline > .body { padding: 6px 0 0; }
.callout { border-left: 3px solid var(--accent); background: var(--surface); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; max-width: 80ch; }

/* Facet tree (Qwen-Image-Bench) */
.tree { display: grid; gap: 14px; }
.pillar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pillar.inactive { opacity: 0.6; }
.pillar-head { display: grid; grid-template-columns: 1fr; gap: 6px 14px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); align-items: center; }
.pillar-head h4 { font-size: 15px; }
.l2 { padding: 8px 14px; border-top: 1px solid var(--line); }
.l2-head { display: grid; gap: 4px 14px; align-items: center; font-weight: 600; font-size: 13.5px; }
.facet { display: grid; gap: 4px 14px; align-items: center; padding: 3px 0 3px 14px; font-size: 13.5px; }
.facet .fname { color: var(--ink); }
.facet .fname .q { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.facet.diff .fname { font-weight: 600; }
.cell { display: flex; gap: 8px; align-items: center; justify-content: flex-start; min-width: 0; flex-wrap: wrap; }
.cell .mapped { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-head { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; }
.pillar-head .score, .l2-head .score { font-size: 13px; }
.rollup { font-size: 12.5px; color: var(--muted); }

/* Heatmap table */
.heat td.cell-heat { text-align: center; font-family: var(--font-mono); font-size: 12.5px; padding: 4px 8px; border-radius: 3px; }
.heat td.cell-heat span { display: block; font-size: 11px; opacity: 0.8; }
.heat th.rowh { font-weight: 400; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.heat th.grp { background: var(--surface-2); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13px; }
.h0 { background: var(--heat-0); color: var(--ink); }
.h1 { background: var(--heat-1); color: var(--ink); }
.h2 { background: var(--heat-2); color: var(--ink); }
.h3 { background: var(--heat-3); color: var(--heat-ink-dark); }
.h4 { background: var(--heat-4); color: var(--heat-ink-dark); }
.h5 { background: var(--heat-5); color: var(--heat-ink-dark); }
.h6 { background: var(--heat-6); color: var(--heat-ink-dark); }
:root[data-theme="dark"] .h1, :root[data-theme="dark"] .h2 { color: #ebecea; }
:root[data-theme="dark"] .h5, :root[data-theme="dark"] .h6 { color: #0b1220; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .h1, :root:not([data-theme="light"]) .h2 { color: #ebecea; }
  :root:not([data-theme="light"]) .h5, :root:not([data-theme="light"]) .h6 { color: #0b1220; }
}

/* Histogram (SVG) */
.hist svg { width: 100%; height: auto; display: block; }
.hist .axis { stroke: var(--line-strong); stroke-width: 1; }
.hist text { fill: var(--muted); font-family: var(--font-body); font-size: 11px; }
.hist rect.b1 { fill: var(--series-1); }
.hist rect.b2 { fill: var(--series-2); }
.hist rect.b3 { fill: var(--series-3); }
.hist rect.b4 { fill: var(--series-4); }
.hist rect:hover { opacity: 0.8; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }

/* Tooltip and lightbox */
.tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  padding: 6px 9px;
  border-radius: 4px;
  max-width: 320px;
  box-shadow: var(--shadow);
  white-space: pre-line;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 12, 16, 0.92);
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { color: #d8dbe0; font-size: 13px; text-align: center; }
.lightbox-close { position: absolute; top: 14px; right: 18px; background: transparent; border: 0; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; }

/* Home */
.hero { display: grid; gap: 10px; max-width: 80ch; }
.bench-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.bench-card { display: flex; flex-direction: column; gap: 14px; }
.bench-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-family: var(--font-mono); font-size: 22px; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; }

/* Methods page */
.toc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.method-section { scroll-margin-top: 70px; }
.rubric { display: grid; gap: 8px; }
.rubric .l2name { font-weight: 600; margin-top: 6px; }
.rubric .rq { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 4px 12px; font-size: 13.5px; padding-left: 12px; }
.rubric .rq .fn { color: var(--ink); }
.rubric .rq .fq { color: var(--muted); }
.steps { counter-reset: step; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }

@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .nav a { padding: 12px 8px; }
  .built { display: none; }
  .bench-cards { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .bars { grid-template-columns: 1fr; gap: 2px 0; }
  .bars .label { text-align: left; margin-top: 6px; }
  .score.big { grid-template-columns: auto 80px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 6px; }
  .subrow { grid-template-columns: 1fr auto; }
  .tree-head { display: none; }
  .pillar-head, .l2-head, .facet { grid-template-columns: 1fr !important; }
  .facet { padding-left: 0; }
  .cell-model { display: inline-flex; }
  .subrow > :last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  details > summary::before { transition: none; }
}
.heat thead th { white-space: normal; }
