/* The site's stylesheet: a research console. The hardware feel lives in the controls (raised keys, panel edges, small
   indicator lamps); data, charts and text stay plain. The data colours are the earlier pages' (v1/style.css), unchanged
   in both themes. Dark on screen unless the reader chose light (data-theme="light", set before the page renders);
   printing uses light. No web fonts. */

:root {
  color-scheme: light;
  /* Light: stone-grey background, off-white panels, dark graphite text, light-grey raised keys. */
  --bg: #dcd9d2;
  --panel: #f7f6f2;
  --sunk: #efede8;
  --key: #e9e7e2;
  --edge: #cbc7bf;
  --control-edge: #7c7871;
  --text: #23221f;
  --text-2: #4b4944;
  --focus: #23221f;
  --lamp-off: #bdb9b1;
  --lamp-on: #c4301d;
  --lamp-glow: transparent;
  --row-hover: #efede8;
  --row-selected: #e2dfd8;
  /* How far a chart dims the setups that are not selected: the lowest opacity at which the data colours keep 3:1. */
  --dim: .82;
  --tip-bg: #23221f;
  --tip-text: #f7f6f2;
  --shadow: 0 1px 2px rgba(40, 36, 30, .12), 0 6px 18px rgba(40, 36, 30, .07);
  --key-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(40, 36, 30, .28);
  --key-inset: inset 0 2px 3px rgba(40, 36, 30, .32);
  --link: #1d4ed8;
  /* Data colours: chat models grey, reading blue, grammar orange; kept and right green, kept but wrong red. Decision
     models take the ranking scale (page_config.json rank_scale), drawn with an edge that keeps 3:1 against the panel
     whatever the scale colour. */
  --mark-edge: #7c7871;
  --data-chat: #64748b;
  --reading: #2563eb;
  --grammar: #ea580c;
  --reading-text: #1d4ed8;
  --grammar-text: #c2410c;
  --accepted: #15803d;
  --wrong: #b91c1c;
  --check: #e2e8f0;
  --check-stripe: #cbd5e1;
  --key-check-border: #cbd5e1;
  --bar-outline: #64748b;
  --heat-count: #475569;
  --track: #f1f5f9;
  --bar: #dbeafe;
  --error-text: #991b1b;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media screen {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    /* Dark: matte black and graphite, charcoal panels, off-white text, light-grey secondary text. */
    --bg: #0e0e0d;
    --panel: #1a1a18;
    --sunk: #131312;
    --key: #272624;
    --edge: #34332f;
    --control-edge: #78746d;
    --text: #ebe9e4;
    --text-2: #bab7b0;
    --focus: #f2f0ea;
    --lamp-off: #4b4945;
    --lamp-on: #ff5b4f;
    --lamp-glow: rgba(255, 91, 79, .45);
    --row-hover: #222220;
    --row-selected: #2c2b28;
    --dim: .56;
    --tip-bg: #ebe9e4;
    --tip-text: #1a1a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .35);
    --key-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .65);
    --key-inset: inset 0 2px 4px rgba(0, 0, 0, .75);
    --link: #86b9f3;
    --mark-edge: #78746d;
    --data-chat: #a8a6a0;
    --reading: #86b9f3;
    --grammar: #f0a35e;
    --reading-text: #86b9f3;
    --grammar-text: #f0a35e;
    --accepted: #4ade80;
    --wrong: #fca5a5;
    --check: #2b2a27;
    --check-stripe: #3d3c38;
    --key-check-border: #6b6963;
    --bar-outline: #6b6963;
    --heat-count: #d6d3cc;
    --track: #2b2a27;
    --bar: #1e3a5c;
    --error-text: #f5c2c2;
    --error-bg: #3a1d1b;
    --error-border: #6b2a26;
  }
}
/* Images drawn for one theme only (the Method page's charts exist in both). */
@media screen { :root:not([data-theme="light"]) .theme-light { display: none !important; } }
:root[data-theme="light"] .theme-dark { display: none !important; }
@media print { .theme-dark, .theme-switch, .needs-js, .skip { display: none !important; } }
/* Controls that need the script stay out of the page without it; the plain table shows every setup instead. */
html:not(.js) .needs-js { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0 1rem 2rem; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.5; }
main, .footer { max-width: 1100px; margin: 0 auto; }
a { color: var(--link); text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: .85em; }
h1, h2, h3 { line-height: 1.2; }
[id] { scroll-margin-top: 1rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: .5rem; z-index: 30; padding: .4rem .7rem; background: var(--panel); color: var(--text);
  border: 1px solid var(--control-edge); border-radius: 6px; }
.skip:focus { left: 1rem; }

/* Top bar: the brand and the theme switch, then the navigation bar on its own row. Plain text links; the current page is
   underlined. */
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand theme" "nav nav"; align-items: center;
  gap: .45rem 1rem; max-width: 1100px; margin: 0 auto 1.25rem; padding: .7rem 0 .55rem; border-bottom: 1px solid var(--edge); }
.brand { grid-area: brand; color: var(--text-2); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; }
.brand:hover { color: var(--text); }
.nav { grid-area: nav; }
.nav ul { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-block; padding: .2rem 0; color: var(--text); font-size: .9rem; text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--text-2); }
.nav a[aria-current="page"] { border-bottom-color: var(--text); }
.theme-switch { grid-area: theme; display: inline-flex; gap: .35rem; }
.theme-switch[hidden] { display: none; }
/* With the script, the switch shows from the first paint, so nothing moves when site.js wires it. */
.js .theme-switch[hidden] { display: inline-flex; }

/* Keys: the only things that look pressable. A pressed key sinks (inset), takes a clear edge and lights its lamp; its size
   never changes, so nothing around it moves. */
button.key { display: inline-flex; align-items: center; gap: .45rem; min-height: 2rem; padding: .25rem .7rem; margin: 0;
  font: inherit; font-size: .85rem; line-height: 1.2; color: var(--text); background: var(--key); border: 1px solid var(--control-edge);
  border-radius: 6px; box-shadow: var(--key-shadow); cursor: pointer; }
button.key:hover { border-color: var(--text-2); }
button.key:active { box-shadow: var(--key-inset); }
button.key[aria-pressed="true"] { background: var(--sunk); border-color: var(--text); box-shadow: var(--key-inset); }
button.key[aria-disabled="true"] { color: var(--text-2); border-style: dashed; box-shadow: none; cursor: not-allowed; }
.lamp { display: inline-block; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--lamp-off);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
[aria-pressed="true"] > .lamp, [aria-selected="true"] > .lamp, [aria-current="page"] > .lamp { background: var(--lamp-on);
  box-shadow: 0 0 0 1px var(--lamp-on), 0 0 5px 1px var(--lamp-glow); }
.keys { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
select, input[type="search"] { min-height: 2rem; padding: .25rem .45rem; font: inherit; font-size: .85rem; color: var(--text);
  background: var(--sunk); border: 1px solid var(--control-edge); border-radius: 6px; }
input[type="checkbox"] { accent-color: var(--text); width: 1rem; height: 1rem; }

/* Panels: thin edges, soft shadows. */
.panel, .card { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; box-shadow: var(--shadow); padding: 1rem 1.25rem;
  margin: 0 0 1rem; }
.card h2 { font-size: 1.15rem; margin: 0 0 .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--edge); }
main > .card h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
.eyebrow { margin: 0 0 .25rem; color: var(--text-2); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
/* A result that is not final: a marked line at the top of a model page's Page images section. */
.preliminary { margin: 0 0 .75rem; padding: .4rem .7rem; background: var(--sunk); border-left: 3px solid var(--text); border-radius: 4px; }
/* The site's three benchmarks, Text, Page images and Hallucination, as tabs above each one's page: links drawn as the leaderboard's tab
   keys; the current one sinks, lights its lamp and carries a bar under it. */
.bench-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.1rem; }
.bench-tab { position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .35rem .85rem;
  font-weight: 600; color: var(--text); text-decoration: none; background: var(--key); border: 1px solid var(--control-edge);
  border-radius: 6px; box-shadow: var(--key-shadow); }
.bench-tab:hover { border-color: var(--text-2); }
.bench-tab[aria-current="page"] { background: var(--sunk); border-color: var(--text); box-shadow: var(--key-inset); }
.bench-tab[aria-current="page"]::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -.55rem; height: 3px;
  border-radius: 2px; background: var(--text); }
.bench-tab .count { color: var(--text-2); font-family: var(--mono); font-size: .78rem; font-weight: 400; }
.subtitle { color: var(--text-2); margin: 0 0 .75rem; }

/* Header: the question, the intro, the language of the questions and the links to the charts below. */
.hero { max-width: 76ch; margin: 0 0 1.25rem; }
.hero h1 { font-size: 2.25rem; margin: 0 0 .75rem; letter-spacing: -.01em; text-wrap: balance; }
.hero .intro { font-size: 1.1rem; margin: 0 0 1rem; }
.readout-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin: 0 0 .85rem;
  padding: .45rem 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.readouts { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.readout { display: inline-flex; align-items: baseline; gap: .35rem; margin-right: .9rem; padding-right: .9rem; border-right: 1px solid var(--edge); }
.readout:last-child { margin-right: 0; padding-right: 0; border-right: none; }
.readout-value { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.readout-label { color: var(--text-2); font-size: .85rem; }
.version { margin: 0; color: var(--text-2); font-size: .78rem; }
/* The language of the questions, under the counters: body text, not secondary. */
.hero .language { margin: 0 0 .85rem; font-size: 1rem; color: var(--text); }
/* The summary: a lead line, then one short line per measure; each label opens its tab. */
.summary { margin: 0; font-size: 1rem; }
.summary-lead { margin: 0 0 .2rem; }
.summary-list { margin: 0; padding: 0; list-style: none; }
.summary-list li { margin: .12rem 0; }
.summary-list a { font-weight: 600; }
/* The links to the charts and to Info, under the intro. */
.face-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: 0; font-size: .95rem; }

/* Phone-only parts (shown by the phone rules below): the swipe label, the versions under the table and the setup count
   inside the filter panel. */
.swipe-hint, .version-below { display: none; }
.filters .panel-only { display: none; }

/* Filters: labelled groups; the bar keeps the count, a summary and Reset in view when the panel is
   closed. The panel sits in the page's flow, so it never covers the tabs or the table. */
.filters { padding: .65rem .8rem; }
.filters-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; margin: 0; }
.group-label { color: var(--text-2); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.setup-count { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.filters-summary { flex: 1 1 12rem; margin: 0; color: var(--text-2); font-size: .85rem; }
.chevron { display: inline-block; width: .7rem; font-size: .8rem; }
.chevron::before { content: "\25B8"; }
[aria-expanded="true"] > .chevron::before { content: "\25BE"; }
.filters-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .9rem 2rem; margin-top: .7rem; padding-top: .7rem;
  border-top: 1px solid var(--edge); }
.filters:not(.is-open) .filters-body { display: none; }
.filters-body > .group { flex-direction: column; align-items: flex-start; }
.filters-body .group select { width: 17rem; max-width: 100%; }
.models { display: grid; flex: 1 1 100%; gap: .4rem; }
.model-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.model-tools input { width: 17rem; max-width: 100%; }
.model-list { height: 9.5rem; overflow-y: auto; padding: .4rem .6rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 6px; }
.model-list fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); column-gap: 1.5rem; border: 0; margin: 0 0 .4rem;
  padding: 0; }
.model-list fieldset[hidden] { display: none; }
.model-list legend { padding: 0; color: var(--text-2); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.model-list label { display: flex; align-items: baseline; gap: .45rem; padding: .15rem 0; font-size: .85rem; }
.model-list label[hidden] { display: none; }
.model-list .detail { color: var(--text-2); font-size: .78rem; }
.model-list .none { margin: .25rem 0; color: var(--text-2); font-size: .85rem; }
/* A disabled key says why, on hover and on keyboard focus. */
button.key[data-tip] { position: relative; }
button.key[data-tip]:hover::after, button.key[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; right: 0;
  top: calc(100% + 6px); z-index: 12; width: max-content; max-width: min(16rem, 80vw); padding: .4rem .6rem; background: var(--tip-bg);
  color: var(--tip-text); border-radius: 4px; font-size: .78rem; line-height: 1.35; text-align: left; white-space: normal; }

/* Tabs: four mode keys; the selected one sinks, lights its lamp and carries a bar under it. */
.board-panel { padding-top: .8rem; }
.modebar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 .75rem; padding-bottom: .8rem;
  border-bottom: 1px solid var(--edge); }
.modes { display: flex; flex-wrap: wrap; gap: .35rem; }
button.mode { position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .35rem .85rem;
  font: inherit; font-weight: 600; color: var(--text); background: var(--key); border: 1px solid var(--control-edge); border-radius: 6px;
  box-shadow: var(--key-shadow); cursor: pointer; }
button.mode:hover { border-color: var(--text-2); }
button.mode:active { box-shadow: var(--key-inset); }
button.mode[aria-selected="true"] { background: var(--sunk); border-color: var(--text); box-shadow: var(--key-inset); }
button.mode[aria-selected="true"]::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -.55rem; height: 3px;
  border-radius: 2px; background: var(--text); }
.in-view { margin-left: auto; color: var(--text-2); font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.definition { margin: 0 0 .75rem; color: var(--text-2); font-size: .9rem; }
.definition[hidden] { display: none; }

/* Tables: the model's name prominent, its settings smaller below; numbers right-aligned in a fixed-width face, one
   number of decimals per column, the unit in the header. */
.table-wrap { overflow-x: auto; }
/* While columns are hidden to the right, a soft fade on the table's right edge shows there is more to scroll to. */
.table-frame { position: relative; }
.table-frame::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2.25rem; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--panel)); opacity: 0; transition: opacity .2s; }
.table-frame.more-right::after { opacity: 1; }
.swipe-hint { margin: 0 0 .2rem; color: var(--text-2); font-size: .78rem; text-align: right; }
.swipe-hint.is-done { visibility: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
caption { text-align: left; color: var(--text-2); font-size: .85rem; margin-bottom: .5rem; }
th, td { padding: .5rem .65rem; border-bottom: 1px solid var(--edge); text-align: left; vertical-align: top; }
/* Headers sit on the panel colour, so the reading and grammar header colours keep 4.5:1 in both themes; the stronger rule
   under them separates them from the rows. */
thead th { background: var(--panel); font-weight: 600; vertical-align: bottom; white-space: nowrap; border-bottom: 1px solid var(--control-edge); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* A tab whose columns would not fit (wrapHeaders in v3.js) wraps its headers on a wide screen too; on a phone every header
   wraps already. */
@media (min-width: 641px) { table.board.wrap-headers thead th:not(:first-child) { white-space: normal; min-width: 5.5rem; } }
/* The Hallucination table: seven columns, each number with its counts under it, so its cells wrap too. */
@media (min-width: 641px) { table.board.idk thead th:not(:first-child), table.board.idk td.num { white-space: normal; min-width: 6.5rem; }
  table.board.idk td.num:last-child { min-width: 8.5rem; } }
table.board td.num { font-family: var(--mono); font-size: .84rem; }
.small { display: block; color: var(--text-2); font-size: .78rem; }
/* The settings line: the long form, and on a phone the short form ("1 per request · low reasoning"). */
.small.settings-short { display: none; }
/* A setup's name: in full, and on a phone the charts' short name where it has one. */
.name-short { display: none; }
td.num .small { font-family: var(--mono); }
.small.inline { display: inline; margin-left: .3rem; }
.muted { color: var(--text-2); }
.model-name { font-weight: 650; font-size: .95rem; }
td.model { min-width: 12rem; }
/* Every body cell, a row's header cell (th scope="row") too, sits on the panel colour, so a sticky first column covers
   the columns that scroll under it. */
table.board tbody tr > :is(td, th) { background: var(--panel); }
table.board tbody tr:hover > :is(td, th) { background: var(--row-hover); }
table.board tbody tr.is-selected > :is(td, th) { background: var(--row-selected); }
table.board tbody tr.is-selected > td.model { box-shadow: inset 3px 0 0 var(--text); }
.js table.fallback caption { display: none; }
/* The leaderboard's tables, each with its heading: the decision models, then the other models (or all models in one). */
.board-group { font-size: 1.05rem; margin: 0 0 .5rem; }
* + .board-group { margin-top: 1.5rem; }
table.board th.reading { color: var(--reading-text); }
table.board th.grammar { color: var(--grammar-text); }
/* Not measured reads as words; a value a filter leaves out is a dash with its reason; a true zero is a number. */
.nm { color: var(--text-2); font-family: var(--sans); font-size: .78rem; white-space: normal; }
.mark { margin-left: .15em; }
/* The Routing tab's share, with its split on a line under it: three parts with their values printed. A 1px gap keeps
   green and red apart, and the red part is hatched, so colour never carries the meaning alone. */
.share-cell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.split { display: inline-flex; align-items: center; gap: 6px; }
.split-bar { display: flex; gap: 1px; width: 96px; height: 10px; }
.split-bar > span { flex-basis: 0; min-width: 0; }
.split-right { background: var(--accepted); }
.split-wrong { background: repeating-linear-gradient(135deg, var(--wrong) 0 2px, var(--panel) 2px 3px); }
.split-rest { background: var(--data-chat); }
/* The values get a fixed width (monospace; a line such as "37.3 · 10.0 · 52.7" is 18 characters), so the bars line up
   across rows. */
.split-values { font-family: var(--mono); font-size: .78rem; color: var(--text-2); white-space: nowrap; min-width: 18ch;
  text-align: right; }
.table-note { color: var(--text-2); font-size: .85rem; margin: .5rem 0 0; max-width: 80ch; }
.note, .footnote { color: var(--text-2); font-size: .875rem; }
.footnote { padding-left: 1.25rem; margin: 0; }
/* Sortable headers carry ⇅; the sorted one ▲ or ▼. */
th button.sort { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: .3rem; padding: 0; margin: 0; font: inherit;
  font-weight: 600; color: inherit; text-align: inherit; background: none; border: 0; cursor: pointer; white-space: inherit; }
th:not(.num) button.sort { justify-content: flex-start; }
th button.sort:hover { text-decoration: underline; }
.sort-mark { color: var(--text-2); font-size: .72rem; }
th[aria-sort] .sort-mark { color: var(--text); }
/* A header that says which direction is better (v3.js header, directions): the label with its sort mark, and under the
   label a muted line in words; on a phone the line sits between the label and the sort mark. */
th button.sort.directed { display: inline-grid; grid-template-columns: auto auto; grid-template-areas: "label mark" "direction .";
  justify-content: end; align-items: baseline; column-gap: .3rem; }
th button.sort.directed .label { grid-area: label; }
th button.sort.directed .sort-mark { grid-area: mark; }
th button.sort.directed .direction { grid-area: direction; justify-self: end; font-weight: 400; }
th button.sort.directed:hover { text-decoration: none; }
th button.sort.directed:hover .label { text-decoration: underline; }
/* A header with a tooltip: dotted underline, the tip on hover and on keyboard focus. */
th button.sort[data-tip] { position: relative; }
th button.sort[data-tip] .label { text-decoration: underline dotted; text-underline-offset: 3px; }
th button.sort[data-tip]:hover::after, th button.sort[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; right: 0;
  top: calc(100% + 6px); z-index: 12; width: max-content; max-width: min(18rem, 80vw); padding: .4rem .6rem; background: var(--tip-bg);
  color: var(--tip-text); border-radius: 4px; font-size: .78rem; font-weight: 400; line-height: 1.35; text-align: left; white-space: normal; }
/* The model cell: the key that highlights its setup in the charts, then the name with its settings under it. */
.who { display: flex; align-items: flex-start; gap: .45rem; }
.who .names { min-width: 0; }
button.pick { display: inline-grid; flex: none; place-items: center; width: 1.6rem; height: 1.6rem; margin: 0; padding: 0;
  background: var(--key); border: 1px solid var(--control-edge); border-radius: 50%; box-shadow: var(--key-shadow); cursor: pointer; }
button.pick[aria-pressed="true"] { background: var(--sunk); border-color: var(--text); box-shadow: var(--key-inset); }
.empty-state { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .75rem 0; padding: .6rem .8rem;
  border: 1px solid var(--control-edge); border-radius: 6px; }
.empty-state p { margin: 0; }
.icon { font-weight: 700; }
.load-error { margin: 0 0 1rem; padding: .7rem 1rem; color: var(--error-text); background: var(--error-bg); border: 1px solid var(--error-border);
  border-radius: 6px; }

/* Tooltips: on hover and on keyboard focus or tap, so they work on phones. */
.hint { position: relative; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.hint:hover::after, .hint:focus::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 4px); z-index: 12;
  width: max-content; max-width: min(18rem, 80vw); padding: .4rem .6rem; background: var(--tip-bg); color: var(--tip-text); border-radius: 4px;
  font-family: var(--sans); font-size: .78rem; font-weight: 400; line-height: 1.35; text-align: left; white-space: normal; }

/* Routing: the choices, a small static diagram of the path and the table. */
.tab-title { font-size: 1.05rem; margin: 0 0 .6rem; }
.route-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 .75rem; }
.route-controls label { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; }
.table-title { font-weight: 600; margin: 0; }
.scope { color: var(--text-2); font-size: .85rem; margin: 0 0 .5rem; }
.tab-notes { color: var(--text-2); font-size: .875rem; max-width: 80ch; }
.tab-notes p { margin: .5rem 0 0; }
/* The Confidence tab's guide above the table: a short heading, then each term with what it means. */
.tab-guide { max-width: 80ch; margin: 0 0 .9rem; font-size: .875rem; }
.tab-guide h3 { margin: 0 0 .3rem; font-size: .95rem; }
.tab-guide ul { margin: 0; padding-left: 1.1rem; }
.tab-guide li { margin: .15rem 0; }
.route-map { display: grid; grid-template-columns: max-content 2.25rem max-content 1fr; align-items: center; margin: 0 0 .9rem;
  padding: .75rem .9rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 8px; font-size: .85rem; }
.rm-node { display: inline-block; padding: .3rem .6rem; background: var(--panel); border: 1px solid var(--text); border-radius: 6px; font-weight: 600; }
.rm-wire { display: block; height: 2px; background: var(--text); transform-origin: left center; }
.rm-fork { position: relative; display: grid; gap: .5rem; padding-left: 1.5rem; }
.rm-fork::before { content: ""; position: absolute; left: 0; top: 1rem; bottom: 1rem; width: 2px; background: var(--text); transform-origin: top; }
.rm-branch { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.rm-branch::before { content: ""; position: absolute; left: -1.5rem; top: 1rem; width: 1.5rem; height: 2px; background: var(--text);
  transform-origin: left center; }
/* The current choices, as flat tags with a lit mark: read-only, so nothing about them looks pressable. */
.rm-choice { display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .55rem; color: var(--text); background: var(--panel);
  border-radius: 999px; font-size: .8rem; }
.rm-choice::before { content: ""; flex: none; width: .45rem; height: .45rem; border-radius: 50%; background: var(--lamp-on); }
.route-map.trace .rm-wire, .route-map.trace .rm-branch::before { animation: rm-draw .45s ease-out 1 both; }
.route-map.trace .rm-fork::before { animation: rm-drop .45s ease-out .15s 1 both; }
@keyframes rm-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rm-drop { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* The charts, the page's face: one card per measure, stacked in one column, each with a title and a line saying which
   way is better. Room is kept for each before it draws, so the page does not move. */
.charts { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1rem 0 0; }
.chart-card { margin: 0; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .5rem; }
.chart-head h2 { margin: 0 auto 0 0; padding: 0; border: 0; font-size: 1.05rem; }
.chart-sub { flex-basis: 100%; margin: 0; color: var(--text-2); font-size: .85rem; }
/* The cost of every setup: the leaderboard's table in a box of fixed height, its header held in view while it scrolls. */
.cost-scroll { max-height: 32rem; overflow: auto; }
.cost-scroll thead th { position: sticky; top: 0; z-index: 1; }
.pareto-tag { display: inline-block; margin-left: .35rem; padding: 0 .3rem; border: 1px dashed var(--control-edge); border-radius: 3px;
  color: var(--text-2); font-size: .72rem; vertical-align: .1rem; }
.cost-box .chart-legend { margin: .4rem 0 0; }
table.cost-table td.num:nth-child(n+6) { white-space: normal; min-width: 9rem; }
.chart-box { min-height: 26rem; min-width: 0; }
.chart-scroll { max-height: var(--chart-max, 360px); overflow-y: auto; overflow-x: hidden; }
.chart-scroll svg, .chart-box > svg { display: block; }
.chart-box svg text { font-family: var(--sans); font-size: 12px; }
.chart-box .grid { stroke: var(--edge); stroke-width: 1; }
.chart-box .axis { stroke: var(--control-edge); stroke-width: 1; }
.chart-box .tick, .chart-box .axis-title { fill: var(--text-2); }
.chart-box .label, .chart-box .value { fill: var(--text); }
.chart-box .detail { fill: var(--text-2); font-size: 12px; }
.chart-box .value.nm { fill: var(--text-2); }
.chart-box .value { font-family: var(--mono); }
.chart-box .bar-decision, .chart-box .dot-decision { stroke: var(--mark-edge); stroke-width: 1; }
.chart-box .bar-reading { fill: var(--reading); }
.chart-box .bar-grammar { fill: var(--grammar); }
.chart-box .bar-chat, .chart-box .dot-chat { fill: var(--data-chat); }
.chart-box .whisker-case { fill: none; stroke: var(--panel); stroke-width: 4.5; }
.chart-box .whisker { fill: none; stroke: var(--text); stroke-width: 1.5; }
.chart-box .leader { stroke: var(--text-2); stroke-width: 1; }
/* The trade-off chart's shaded region (better than the median on both) and its Pareto line. */
.chart-box .quadrant { fill: var(--bar); fill-opacity: .6; }
.chart-box .pareto { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 2 3; }
.chart-box .mark { cursor: pointer; }
.chart-box .mark:focus { outline: none; }
.chart-box .ring { fill: transparent; stroke: none; }
.chart-box .mark:focus-visible .ring { stroke: var(--focus); stroke-width: 2; }
.chart-box .mark.is-selected :is(.bar-decision, .bar-chat, .bar-reading, .bar-grammar, .dot-decision, .dot-chat) { stroke: var(--text); stroke-width: 2; }
.chart-box .mark.is-selected rect.ring { fill: var(--row-selected); }
.chart-box .is-selected .label, .chart-box .label.is-selected { font-weight: 700; }
/* The selected label may sit over dimmed points; a halo in the panel colour keeps it readable. */
.chart-box text.label.is-selected { paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
/* With a setup selected, the others dim; nothing disappears. Dimmed shapes keep 3:1 against the panel, and dimmed text
   turns secondary, which keeps 4.5:1. */
.chart-box.has-selection .mark:not(.is-selected) :is(.bar-decision, .bar-chat, .bar-reading, .bar-grammar, .dot-decision, .dot-chat, .whisker, .whisker-case),
.chart-box.has-selection .leader:not(.is-selected) { opacity: var(--dim); }
.chart-box.has-selection .mark:not(.is-selected) .value, .chart-box.has-selection .label:not(.is-selected) { fill: var(--text-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0 0; color: var(--text-2); font-size: .8rem; }
i.swatch { display: inline-block; width: .75rem; height: .75rem; margin-right: .35rem; border-radius: 2px; vertical-align: -.05rem; }
i.swatch-reading { background: var(--reading); }
i.swatch-grammar { background: var(--grammar); }
.scale-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .35rem; }
i.ramp { display: inline-block; width: 3rem; height: .75rem; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--mark-edge); }
i.swatch-chat { background: var(--data-chat); }
i.swatch-quadrant { background: var(--bar); opacity: .8; }
i.swatch-pareto { width: 1.2rem; height: 0; border-top: 2px dotted var(--text); border-radius: 0; vertical-align: .2rem; }
i.swatch-lead { background: var(--text); }
i.swatch-base { background: var(--data-chat); }
i.swatch-marker { width: 2px; background: var(--text); border-radius: 0; }

/* Bars in HTML (Site hbars), the face of the tabs without a script: the label, the bars on one axis with a line at each
   quarter, and the value; on a phone the label takes its own line above the bars. */
.hbar { display: grid; grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr) 7rem; align-items: center; gap: .65rem; }
.hbars { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.hbar-label { font-size: .85rem; text-align: right; overflow-wrap: anywhere; }
.hbar-track { position: relative; display: grid; gap: 3px; min-height: 1rem;
  background-image: linear-gradient(to right, var(--edge) 1px, transparent 1px); background-size: 25% 100%; background-repeat: repeat-x; }
.hbar-fill { display: block; height: .85rem; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--mark-edge); }
.hbar-fill.lead { background: var(--text); }
.hbar-fill.base { background: var(--data-chat); }
.hbar-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); }
.hbar-value { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.hbar-axis { margin-bottom: .25rem; }
.hbar-axis .hbar-track { height: 1rem; background: none; }
.hbar-tick { position: absolute; transform: translateX(-50%); color: var(--text-2); font-family: var(--mono); font-size: .72rem; }
.hbar-tick:first-child { transform: none; }
.hbar-tick:last-child { transform: translateX(-100%); }
.chart-more { margin: 0; }

/* Info: the tables, the summary and the notes, behind the charts; its summary line opens it like a key. */
.info { margin: 1.25rem 0 0; }
.info-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; padding: .6rem .85rem; cursor: pointer; list-style: none;
  background: var(--key); border: 1px solid var(--control-edge); border-radius: 8px; box-shadow: var(--key-shadow); }
.info-summary::-webkit-details-marker { display: none; }
.info-summary::before { content: "▸"; color: var(--text-2); }
.info-details[open] > .info-summary { margin-bottom: 1rem; background: var(--sunk); box-shadow: var(--key-inset); }
.info-details[open] > .info-summary::before { content: "▾"; }
.info-title { font-weight: 650; }
.info-sub { color: var(--text-2); font-size: .9rem; }
.info-details > .about { margin: 1rem 0; }
.info-details > .chart-card { margin-top: 1rem; }

/* The other pages: facts, topics, the heat map, Compare, the Method page's boxes, charts and references. */
dl.facts { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: .35rem 1rem; margin: 0 0 .75rem; }
dl.facts dt { color: var(--text-2); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
tr.right td.num:nth-child(2) { font-weight: 700; }
details.show-table, details.all-configs, details.show-more { margin: 1rem 0; }
details > summary { cursor: pointer; }
details.show-table > summary, details.show-more > summary { font-weight: 600; color: var(--link); }
.topic-list { columns: 2 18rem; padding-left: 1.25rem; }
.topic-list li { break-inside: avoid; margin-bottom: .25rem; }
.heatmap-table th.unit { white-space: normal; min-width: 6.5rem; vertical-align: bottom; }
.heatmap-table td.model, .heatmap-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel);
  box-shadow: 1px 0 0 var(--edge); min-width: 14rem; }
.heatmap-table thead th:first-child { background: var(--sunk); }
td.heat { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--heat-light); }
@media screen { :root:not([data-theme="light"]) td.heat { background: var(--heat-dark); } }
td.heat .small { color: var(--heat-count); }
.compare-pickers { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 0 1rem; }
.compare-pickers label, label.control { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; }
.compare-pickers select, label.control select { flex: 1 1 auto; min-width: 0; max-width: 100%; }
.compare-table th[scope="row"] { font-weight: 400; color: var(--text-2); }
/* The paired table: each scope's label row shows only on a phone (below). */
table.paired tr.label-row { display: none; }
pre.citation { overflow-x: auto; padding: .75rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 6px; font-size: .8rem;
  white-space: pre-wrap; overflow-wrap: anywhere; }
body.v3 p code, body.v3 td code, body.v3 li code { overflow-wrap: anywhere; word-break: break-all; }
.prose p, .prose li { max-width: 80ch; }
.prose ul { padding-left: 1.25rem; }
nav.toc { margin: 0 0 1rem; font-size: .875rem; }
nav.toc ul { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; margin: 0; padding: 0; }
.method-page .card h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.method-page .card p { max-width: 80ch; }
.worked-example { margin: 0 0 1rem; padding: 1rem 1.25rem; background: var(--panel); border: 1px solid var(--edge); border-left: 4px solid var(--text);
  border-radius: 10px; box-shadow: var(--shadow); }
.worked-example h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
.worked-example p { max-width: 80ch; }
.caveat { margin: 1rem 0; padding: .5rem .9rem; background: var(--sunk); border-left: 3px solid var(--text); border-radius: 4px; max-width: 80ch; }
.caveat h3 { margin-top: .25rem; }
dl.sources { margin: 0; }
dl.sources dt { font-weight: 600; margin-top: .5rem; }
dl.sources dd { margin: 0; max-width: 80ch; }
table.settings td:first-child { font-weight: 600; min-width: 9rem; }
table.setups th[scope="row"] { font-weight: 600; min-width: 12rem; }
table.setups td p { margin: 0; }
details.setup-record { margin-top: .4rem; }
details.setup-record summary { color: var(--text-2); font-size: .85rem; }
details.setup-record dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; margin: .4rem 0 .6rem; font-size: .8rem; }
details.setup-record dt { color: var(--text-2); }
details.setup-record dd { margin: 0; overflow-wrap: anywhere; }
details.setup-record dl + dl { border-top: 1px solid var(--edge); padding-top: .5rem; }
table.overview td { overflow-wrap: anywhere; }
/* A method record that names code (long identifiers with no space to break at) wraps inside its column. */
.method-notes { overflow-wrap: anywhere; }
table.overview td.num .small { white-space: normal; }
table.overview th.reading { color: var(--reading-text); }
table.overview th.grammar { color: var(--grammar-text); }
table.overview caption { font-weight: 600; color: var(--text); }
table.overview tr.group-row th, tr.group-row th { padding-top: .9rem; color: var(--text-2); font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; background: none; }
table.overview tr.lead td { font-weight: 600; }
.figure-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; }
figure.chart { margin: 1.25rem 0 0; }
.chart-link { display: block; }
.chart img { display: block; max-width: 100%; height: auto; }
.chart figcaption { margin-top: .5rem; max-width: 80ch; color: var(--text-2); font-size: .85rem; }
.versions { color: var(--text-2); font-size: .85rem; }
sup.cite { font-size: .75em; line-height: 0; }
sup.cite a { text-decoration: none; padding: 0 .1em; }
sup.cite a:hover { text-decoration: underline; }
ol.references { padding-left: 1.75rem; font-size: .9rem; }
ol.references li { overflow-wrap: anywhere; }
ol.references li:target, sup.cite a:target { background: var(--bar); border-radius: 3px; }
a.backref { text-decoration: none; margin-left: .25rem; }
ul.price-list { padding-left: 1.25rem; }

/* Footer */
.footer { margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--edge); color: var(--text-2); font-size: .85rem; text-align: center; }
.footer p { margin: .25rem 0; }

/* Phones: one compact table instead of stacked cards. The first column stays in view while the numbers scroll beside it
   inside the table's wrapper; at 375 px at least two number columns show next to it. */
@media (max-width: 640px) {
  .hbar { grid-template-columns: minmax(0, 1fr) 5.5rem; gap: .15rem .5rem; }
  .hbar-label { grid-column: 1 / -1; text-align: left; }
  .hbar-axis > span:first-child { display: none; }
  body { padding: 0 .6rem 1.5rem; }
  /* The first screen reaches the results: the site name and the theme switch share a row, the navigation is one line
     that scrolls sideways, the title is smaller, the counters take one line and the versions move under the table. */
  .topbar { grid-template-areas: "brand theme" "nav nav"; gap: .3rem .6rem; margin-bottom: .55rem; padding: .45rem 0 .3rem; }
  .brand { font-size: .66rem; letter-spacing: .04em; }
  .theme-switch { gap: .25rem; }
  .theme-switch .key { min-height: 1.75rem; padding: .15rem .45rem; gap: .3rem; font-size: .78rem; }
  .theme-switch .long { display: none; }
  /* Padding inside the scrolling bar keeps a focused link's outline unclipped; the negative margin keeps the row's size. */
  .nav ul { flex-wrap: nowrap; gap: 1rem; overflow-x: auto; scrollbar-width: none; margin: -.3rem -.35rem; padding: .3rem .35rem;
    scroll-padding-inline: .35rem; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav li { flex: none; }
  .nav a { white-space: nowrap; }
  .panel, .card { padding: .75rem; border-radius: 8px; }
  .hero { margin-bottom: .5rem; }
  .hero h1 { font-size: 1.45rem; margin-bottom: .35rem; }
  .hero .intro { font-size: .95rem; line-height: 1.36; margin-bottom: .5rem; }
  .hero .language { font-size: .95rem; line-height: 1.36; margin-bottom: .45rem; }
  .readout-row { padding: .3rem 0; margin-bottom: .45rem; }
  .readouts { flex-wrap: nowrap; }
  .readout { gap: .2rem; margin-right: .4rem; padding-right: .4rem; white-space: nowrap; }
  .readout-value { font-size: .82rem; }
  .readout-label { font-size: .72rem; }
  .version-below { display: block; margin-top: .6rem; }
  .summary { font-size: .9rem; line-height: 1.25; }
  .summary-list li { margin: 0; }
  /* One filter row: the Filters key, the summary of the active filters and Reset; the setup count is inside the panel. */
  .filters { padding: .45rem .6rem; margin-bottom: .5rem; }
  .filters-bar { flex-wrap: nowrap; gap: .5rem; }
  .filters .bar-only { display: none; }
  .filters .panel-only { display: flex; }
  .filters-summary { flex: 1 1 auto; min-width: 0; }
  .filters-body { gap: .8rem; }
  /* The leaderboard panel: the All models switch and the question count, then the four tabs on one row. */
  .board-panel { padding-top: .5rem; }
  .bench-tabs { flex-wrap: nowrap; gap: .3rem; margin-bottom: .9rem; }
  .bench-tab { flex: 1 1 0; justify-content: center; flex-wrap: wrap; gap: .1rem .35rem; padding: .3rem .4rem; font-size: .88rem; }
  .bench-tab .count { flex-basis: 100%; text-align: center; }
  .modebar { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "models count" "tabs tabs";
    gap: .35rem .5rem; margin-bottom: .4rem; padding-bottom: .45rem; }
  .all-models { grid-area: models; justify-self: start; min-height: 1.9rem; padding: .15rem .55rem; font-size: .8rem; }
  .modes { grid-area: tabs; display: flex; flex-wrap: wrap; gap: .25rem; }
  button.mode { flex: 1 1 auto; justify-content: center; gap: .25rem; padding: .3rem .2rem; font-size: .78rem; }
  .in-view { grid-area: count; justify-self: end; margin-left: 0; }
  .swipe-hint:not([hidden]) { display: block; }
  .swiped .swipe-hint { display: none; }
  .chart-box { min-height: 22rem; }
  .route-map { grid-template-columns: 1fr; justify-items: start; }
  .rm-wire { width: 2px; height: 1rem; margin-left: 1.25rem; transform-origin: top center; }
  .route-map.trace .rm-wire { animation-name: rm-drop; }
  table.board, table.cards, table.overview:not(.setups) { font-size: .82rem; }
  table.board th, table.board td, table.cards th, table.cards td { padding: .45rem .5rem; }
  table.board thead th, table.cards thead th { white-space: normal; min-width: 4.2rem; }
  /* The unit columns' long labels wrap to two lines instead of six. */
  table.board thead th.unit-long { min-width: 9rem; }
  th button.sort.directed { grid-template-columns: auto; grid-template-areas: "label" "direction" "mark"; justify-items: end; }
  table.board th:first-child, table.board td:first-child, table.cards th:first-child, table.cards td:first-child {
    position: sticky; left: 0; z-index: 2; width: min(140px, 40vw); min-width: min(140px, 40vw); max-width: min(140px, 40vw);
    box-shadow: 1px 0 0 var(--edge); overflow-wrap: break-word; white-space: normal; }
  table.board thead th:first-child, table.cards thead th:first-child { z-index: 3; background: var(--panel); }
  .compare-pickers label, label.control { display: flex; width: 100%; }
  /* The paired table: each scope's label on its own line above its numbers, so no sticky label covers a number while
     the row scrolls; the inline label and its header stay for screen readers only. The numbers row then fits the
     screen, the interval wrapping after "to". */
  table.paired tr.label-row { display: table-row; }
  table.board.paired tr.label-row th { position: static; width: auto; min-width: 0; max-width: none; padding: .55rem .5rem 0;
    border-bottom: none; box-shadow: none; }
  table.board.paired thead th:first-child, table.board.paired tbody tr:not(.label-row) th { position: absolute; width: 1px; height: 1px;
    min-width: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; box-shadow: none; }
  table.board.paired thead th { min-width: 0; }
  table.board.paired thead th, table.board.paired td { padding-left: .3rem; padding-right: .3rem; }
  table.board.paired td.num, table.board.paired td.num .small { white-space: normal; }
  table.cards tbody td:first-child { background: var(--panel); }
  td.model { min-width: 0; }
  table.board td.model { padding-left: .4rem; padding-right: .4rem; }
  .model-name { font-size: .86rem; }
  /* A row at most 72 px: the name in at most two lines (the charts' short name where there is one), then the settings
     in their short form, at a slightly closer line spacing. */
  table.board td.model .names, table.board td.model .small { line-height: 1.3; }
  .name-long { display: none; }
  .name-short { display: inline; }
  .small.settings-long { display: none; }
  .small.settings-short { display: block; }
  button.pick { width: 1.5rem; height: 1.5rem; }
  .who { gap: .3rem; }
  .hint:hover::after, .hint:focus::after { position: fixed; left: .5rem; right: .5rem; bottom: .5rem; top: auto; width: auto; max-width: none; font-size: .85rem; }
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: .5rem; }
  .heatmap-table td.model, .heatmap-table thead th:first-child { min-width: 7.5rem; max-width: 9rem; }
  .worked-example { padding: .75rem; }
  table.setups thead { display: none; }
  table.setups, table.setups tbody, table.setups tr, table.setups th[scope="row"], table.setups td { display: block; }
  table.setups th[scope="row"] { min-width: 0; border-bottom: none; padding-bottom: .2rem; }
  details.setup-record dl { grid-template-columns: 1fr; }
  /* The Page images and Hallucination tables, a few rows whose every column matters: each row stacks, each value beside its label (the
     header with its direction, from data-label). */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack tr { padding: .35rem 0; border-bottom: 1px solid var(--control-edge); }
  table.board.stack td, table.board.stack td:first-child { position: static; width: auto; min-width: 0; max-width: none; padding: .2rem .25rem;
    border-bottom: none; box-shadow: none; }
  table.stack td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; white-space: normal; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--text-2); font-family: var(--sans); font-size: .78rem; text-align: left; }
  table.stack .cell { flex: none; max-width: 55%; text-align: right; }
}

/* Motion only traces the routing path once, when its choices change; none at all for readers who ask for less. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
