/* 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: neutral grey (the share sent to the LLM, baseline bars), reading blue, grammar orange; kept and right
     green, kept but wrong red. Setups take their model family's colour (page_config.json model_families) in the home
     page's charts and the English pages, a chart of one series the ranking scale (rank_scale); either is drawn with an
     edge that keeps 3:1 against the panel whatever the colour. */
  --mark-edge: #7c7871;
  --data-grey: #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-grey: #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, .view-bar, .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; }
/* The view bar stays at the top of the window: links to a part of a page, and the page's own scrolling, land below it.
   site.js keeps --view-bar-h at the bar's height; the value here holds until it runs. */
html { --view-bar-h: 5.3rem; scroll-padding-top: var(--view-bar-h); }
[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 on the first line, the pages row under them: keys in the view bar's style
   after a small PAGES label, the current page filled like a selected key; they wrap where they do not fit (on a phone
   they keep one line that scrolls sideways). The theme keys read Dark and Light, their full names in their labels. */
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand theme" "nav nav";
  align-items: center; gap: .35rem .9rem; max-width: 1100px; margin: 0 auto .6rem; padding: .3rem 0 .45rem;
  border-bottom: 1px solid var(--edge); }
.brand { grid-area: brand; flex: none; color: var(--text-2); font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none; }
.brand:hover { color: var(--text); }
.nav { grid-area: nav; display: flex; align-items: center; gap: .55rem; min-width: 0; }
.nav-label { flex: none; }
.nav ul { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: .35rem; min-width: 0; list-style: none; margin: 0; padding: 0; }
/* The pages row's keys and the in-page link rows that work as tabs (.face-nav: a page's own parts, the habits steps):
   bordered keys a little smaller than the view bar's, the current page filled as a selected key. */
.nav a, .face-nav a { display: inline-flex; align-items: center; min-height: 1.85rem; padding: .15rem .6rem;
  color: var(--view-text); background: var(--view-key); border: 2px solid var(--view-key-edge); border-radius: 7px;
  font-size: .86rem; font-weight: 700; line-height: 1.15; text-decoration: none; box-shadow: var(--key-shadow); }
.nav a:hover, .face-nav a:hover { border-color: var(--view-key-hover); }
/* In-page tab rows (a page's own parts, the habits steps) are tinted and edged with the link colour, so they stand apart
   from the page text and from the pages row. Each theme sets its own tab colours (--tab-*) so the text keeps its
   contrast: a light blue tint with blue text in the light theme, a dark blue with near-white text in the dark one. */
.face-nav a { color: var(--tab-text); background: var(--tab-bg); border-color: var(--tab-edge); }
.face-nav a:focus-visible { border-color: var(--view-key-hover); }
/* The tab of the part in the address (just pressed, or opened by a link) is filled. */
.face-nav a[aria-current] { color: var(--tab-current-text); background: var(--tab-current-bg); border-color: var(--tab-current-bg); }
.nav a[aria-current="page"] { color: var(--view-current-text); background: var(--view-current-bg);
  border-color: var(--view-current-edge); box-shadow: inset 0 -3px 0 var(--view-current-edge); }
.theme-switch { grid-area: theme; display: inline-flex; gap: .35rem; margin-left: auto; }
.topbar .theme-switch .key { min-height: 1.75rem; padding: .1rem .45rem; gap: .3rem; }
.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; }

/* The view bar, the first thing on every page: the test (row 1, a page), the models (row 2, ?models=) and the measure
   (row 3, a part of the page), keys across the whole width, sticky at the top of the window above every other part of
   the page; on a wide screen rows 1 and 2 share the first line and the measure takes the second, each row's name
   before its keys. The top bar under it scrolls away. The current choice is filled: in the dark theme white text on
   blue with a light blue edge, in the light theme white text on near-black navy. */
:root {
  --view-bg: #f7f6f2;
  --view-edge: #7c7871;
  --view-text: #1b1a17;
  --view-label: #3d3b37;
  --view-key: #e9e7e2;
  --view-key-edge: #7c7871;
  --view-key-hover: #23221f;
  --view-current-bg: #14213d;
  --view-current-edge: #14213d;
  --view-current-text: #ffffff;
  --tab-text: #1d4ed8;
  --tab-bg: #d0d5e3;
  --tab-edge: #1d4ed8;
  --tab-current-bg: #1d4ed8;
  --tab-current-text: #ffffff;
}
@media screen {
  /* Dark theme: keys lighter than the bar and with a light edge, so each key reads as a key without hovering (the
     project lead, bus #1819); in-page tabs dark blue with a light blue edge, the marked one filled light blue. */
  :root:not([data-theme="light"]) {
    --view-bg: #1a1a18;
    --view-edge: #4b4945;
    --view-text: #f2f0ea;
    --view-label: #d6d3cc;
    --view-key: #34322e;
    --view-key-edge: #a29d93;
    --view-key-hover: #f2f0ea;
    --view-current-bg: #24508f;
    --view-current-edge: #9cc8ff;
    --view-current-text: #ffffff;
    --tab-text: #d6e8ff;
    --tab-bg: #1f3a5f;
    --tab-edge: #86b9f3;
    --tab-current-bg: #86b9f3;
    --tab-current-text: #10161f;
  }
}
.view-bar { position: sticky; top: 0; z-index: 20; margin: 0 -1rem; padding: .35rem 1rem; background: var(--view-bg);
  border-bottom: 2px solid var(--view-edge); box-shadow: var(--shadow); }
/* The Home key (marked on the root index, the page it opens) comes first: before row 1 on a wide screen and up to
   1000 px, beside row 2's three short keys on a phone, so the bar keeps its height. */
.view-rows { display: grid; grid-template-columns: auto minmax(0, 1.8fr) minmax(0, 1fr); gap: .3rem 1.1rem; max-width: 1100px; margin: 0 auto; }
.view-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .55rem; }
.view-row.view-measures { grid-column: 2 / -1; }
a.view-key.view-home { grid-column: 1; grid-row: 1; gap: .3rem; padding: .15rem .6rem; white-space: nowrap; }
.home-mark { width: .95rem; height: .95rem; flex: none; fill: currentColor; }
.view-label { color: var(--view-label); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.view-row ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; list-style: none; margin: 0; padding: 0; }
/* Row 1's middle key, the longest label, takes more room, so each label keeps one line. */
.view-row.view-tests ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1.2fr); }
.view-row li { display: flex; }
a.view-key { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 2.1rem; padding: .15rem .4rem;
  color: var(--view-text); background: var(--view-key); border: 2px solid var(--view-key-edge); border-radius: 7px;
  font-size: .92rem; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; box-shadow: var(--key-shadow); }
a.view-key:hover { border-color: var(--view-key-hover); }
a.view-key[aria-current] { color: var(--view-current-text); background: var(--view-current-bg); border-color: var(--view-current-edge);
  box-shadow: inset 0 -3px 0 var(--view-current-edge); }
/* Row 3, the measure: four keys, a little smaller than rows 1 and 2. */
.view-row.view-measures ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.view-measures a.view-key { min-height: 1.95rem; padding: .1rem .5rem; font-size: .9rem; }
/* Row 2's keys read All, Decision and Chat after the row's name; "models" shows where each row has a line of its own and
   room for it. Too narrow for rows 1 and 2 side by side: one row each. */
.view-more { display: none; }
@media (max-width: 1000px) {
  .view-rows { grid-template-columns: auto minmax(0, 1fr); }
  .view-row, .view-row.view-measures { grid-column: 2; }
  .view-row { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .view-more { display: inline; }
}
/* One active tab: a filter looks active only away from its default. All, the default group, keeps its aria-current for
   screen readers but looks like an unpressed key; Decision or Chat, when chosen, is filled. */
a.view-key[data-view-group="all"][aria-current] { color: var(--view-text); background: var(--view-key);
  border-color: var(--view-key-edge); box-shadow: var(--key-shadow); }
a.view-key[data-view-group="all"][aria-current]:hover { border-color: var(--view-key-hover); }
/* The cost unit (site.js): each cost carries both units and the chosen one shows; per 1,000 questions without the
   script. The keys sit in the head of each chart or table with costs. */
.cost-1m { display: none; }
:root[data-cost-unit="1m"] .cost-1k { display: none; }
:root[data-cost-unit="1m"] .cost-1m { display: inline; }
.cost-unit { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.cost-unit .key { min-height: 1.75rem; padding: .1rem .5rem; font-size: .8rem; }
/* Parts of a page for some groups only (data-models): site.js hides the others, whatever their display. */
[data-models][hidden] { display: none !important; }

/* 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; and a test's limit, in
   the intro of the English pages. */
.preliminary, .limit { margin: 0 0 .75rem; padding: .4rem .7rem; background: var(--sunk); border-left: 3px solid var(--text); border-radius: 4px; }
.limit { margin: .5rem 0 0; font-size: .92rem; }
.subtitle { color: var(--text-2); margin: 0 0 .75rem; }

/* The title, the intro and the language of the questions, under the Accuracy chart. */
.hero { max-width: 76ch; margin: 0; }
.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 of the other pages. */
.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. On the home
   page the bar sits in the Accuracy chart's head, after its title, and the panel opens under the head, in the page's
   flow, so it never covers the charts or the table. */
.chart-head .filters { display: contents; }
.chart-head .filters-bar { order: 1; flex: 0 1 auto; flex-wrap: nowrap; }
.chart-head .filters-summary { flex: 0 1 auto; }
.chart-head > .key { order: 2; }
.chart-head > .chart-sub { order: 3; }
.chart-head .filters-body { order: 4; flex: 1 1 100%; margin-top: .2rem; }
.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; }
/* Share view keeps its width when it reads "Link copied". */
.filters-bar .share { min-width: 6.6rem; white-space: nowrap; }
/* The part keys above the Accuracy chart (All, Reading, Grammar with their question counts); they change the measure
   charts as the filters do. */
.part-keys { margin: 0 0 .5rem; }
.key-count { margin-left: .3rem; font-family: var(--mono); font-size: .8em; color: var(--text-2); }
/* Beside the name of a setup that searched the web before answering. */
.web-badge { display: inline-block; margin-left: .35rem; padding: 0 .35rem; border: 1px solid var(--control-edge); border-radius: 999px;
  color: var(--text-2); font-size: .72rem; font-weight: 600; line-height: 1.4; white-space: nowrap; vertical-align: .05em; }
.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 table, with its heading. */
.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-grey); }
/* 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; }
.charts + .board-panel { margin-top: 1rem; }
.chart-card { margin: 0; min-width: 0; }
/* A part of a page that row 3 of the view bar links to (#accuracy, #non-hallucination, #cost, #latency): its cards
   spaced as the charts around it. */
.measure { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.measure > .note { margin: 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, under the Cost chart in the same card: the leaderboard's table, its first rows until its Show
   all key opens the rest; it never scrolls up and down inside the card. */
.cost-setups { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--edge); }
.cost-setups > .chart-sub { margin-bottom: .5rem; }
.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; }
/* A chart takes the height of the rows it shows (v3.js topRows) and never scrolls inside its box; room for the first
   rows is kept before it draws, so the page does not move. */
.chart-box { min-height: 26rem; min-width: 0; }
.chart-box > svg { display: block; }
/* The key under a list that opens every row in place, and closes them again. */
.key.show-all { margin: .5rem 0 0; }
.chart-box .row-apart { stroke: var(--control-edge); stroke-width: 1; stroke-dasharray: 2 3; }
.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); }
/* The names of a bar chart's value columns, above its rows, right-aligned over the values. */
.chart-box .column-heads { display: block; }
.chart-box .column-head { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.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 :is(.bar-decision, .bar-chat, .dot-decision, .dot-chat) { stroke: var(--mark-edge); stroke-width: 1; }
.chart-box .bar-reading { fill: var(--reading); }
.chart-box .bar-grammar { fill: var(--grammar); }
.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; }
/* The model families under a chart: one compact line of their own that wraps, small swatches and icons. */
.chart-legend .families { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 0 .6rem; font-size: .72rem; line-height: 1.4; }
.families i.swatch { width: .5rem; height: .5rem; margin-right: .2rem; vertical-align: .05rem; }
.families svg.fam-icon { width: 11px; height: 11px; margin-right: .2rem; vertical-align: -1px; }
/* A model family's icon left of a setup's name (sitebuild/site.py family_sprite): 14 px on the text's baseline, the
   maker's mark in the text's colour; the sprite itself takes no room. */
.family-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.fam-icon { display: inline-block; width: 14px; height: 14px; margin-right: .3rem; vertical-align: -2px; fill: currentColor; }
.chart-box use.fam-icon { fill: var(--text); }
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-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-grey); }
/* The Turkish vs English tab's paired bars take their model family's colour; the English one is striped. */
i.swatch-turkish { background: var(--text-2); }
i.swatch-english { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .55) 0 2px, rgba(0, 0, 0, .12) 2px 4px), var(--text-2); }
/* With web (web-grounding/, pws-decisions/): the English bar's stripes over the setup's family colour. */
i.swatch-web { background-color: var(--text-2); background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .55) 0 2px, rgba(0, 0, 0, .12) 2px 4px); }
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-note { display: block; color: var(--text-2); font-size: .75rem; line-height: 1.3; }
.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-grey); }
.hbar-fill.english, .hbar-fill.web { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .55) 0 3px, rgba(0, 0, 0, .12) 3px 6px); }
/* A set of questions heading its rows (web-grounding/: each pair of setups on the same questions). */
.hbar-group { margin: .35rem 0 -.1rem; color: var(--text-2); font-size: .78rem; font-weight: 650; }
.hbar-group:first-child { margin-top: 0; }
/* web-grounding/'s off and with-web comparisons: web off a clear grey, with web one accent (the Perplexity family's
   colour), the same in every chart and legend of the page and readable in both themes. */
.hbar-fill.web-off, i.swatch-web-off { background: var(--data-grey); }
.hbar-fill.web-on, i.swatch-web-on { background: #9256b3; }
/* A chart's second and folded parts (web-grounding/ Accuracy: the full bank by part, the pilot). */
.chart-part { margin: .9rem 0 .35rem; font-size: .9rem; }
.chart-more { margin-top: .75rem; }
.chart-more > summary { margin-bottom: .4rem; color: var(--text-2); font-size: .85rem; font-weight: 600; cursor: pointer; }
/* web-grounding/'s first screen: one card per main comparison (accuracy off → with web, the change, the cost). */
.result-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; margin: .85rem 0 .4rem; }
.result-card { padding: .7rem .9rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 8px; }
.result-card h2 { margin: 0 0 .3rem; font-size: .9rem; color: var(--text-2); }
.result-card p { margin: 0; }
.result-main { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-gain { color: var(--text-2); font-size: .95rem; font-weight: 600; }
.result-card .result-cost { margin-top: .3rem; color: var(--text-2); font-size: .85rem; }
/* A chart whose values need room (pws-decisions/ Accuracy: accuracy | cost | median · p95; the costs with "≤" and "incl.
   search"; web-grounding/ Accuracy's two-line values and Non-hallucination's long head): a wider value column. */
.chart-wide .hbar { grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr) 15rem; }
.hbar-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); }
/* A value wraps at its spaces where it is longer than its column (pws-decisions/ Accuracy: accuracy | cost | median ·
   p95; Latency: median · p95 ms), so no bar ever covers the start of a value. */
.hbar-value { font-family: var(--mono); font-size: .82rem; white-space: normal; }
/* One value beside each bar of a row (Site hbars texts), each line as tall as a bar and its gap. */
.hbar-value.stack { display: grid; gap: 3px; }
.hbar-value.stack > span { height: .85rem; line-height: .85rem; font-size: .74rem; white-space: nowrap; }
.hbar-fill.wrong { background: var(--wrong); }
i.swatch-wrong { background: var(--wrong); }
.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%); }
/* The value column's name above it, in full and on a phone in short ("Turkish · English", "TR · EN"): the name and every
   value of such a chart (.headed) sit on the column's right edge, so the name stands exactly over the numbers. */
.hbar-head { color: var(--text-2); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.hbar-head .head-short { display: none; }
.headed .hbar-head, .headed .hbar-value { justify-self: end; text-align: right; }
/* Several named value columns (.cols, their number in --cols), each of one width so they line up from row to row; a
   long name wraps in its column. */
.hbar.cols, .hbars.cols > .hbar { grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr) repeat(var(--cols), 6.5rem); }
.cols .hbar-head { white-space: normal; line-height: 1.2; }

/* The result cards above the Accuracy chart (build_site.py result_cards): three cards, each with its setup and scope,
   under a heading naming their scope, the full test. */
.results-heading { margin: 0 0 .5rem; font-size: 1.05rem; }
.result-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.panel.result-card { display: flex; flex-direction: column; gap: .2rem; margin: 0; padding: .7rem .9rem; min-width: 0; }
.result-card .card-title { margin: 0; padding: 0; border: 0; color: var(--text-2); font-size: .8rem; font-weight: 600; line-height: 1.3; }
.result-card .card-value { margin: .1rem 0 0; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-card .card-setup { margin: 0; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.result-card .card-scope { margin: 0; color: var(--text-2); font-size: .78rem; line-height: 1.35; }

/* 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; }
/* A model page's summary at the top: accuracy, the answers kept at the threshold, cost and latency, each in a box. */
dl.key-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .25rem 0 .75rem; }
dl.key-figures > div { padding: .5rem .7rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 6px; min-width: 0; }
dl.key-figures dt { color: var(--text-2); font-size: .8rem; }
dl.key-figures dd { margin: 0; overflow-wrap: anywhere; }
.key-figure { display: block; font-family: var(--mono); font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; }
/* Page images: the four inputs on a sample question (the text with its markup, the picture in a printed page's colours
   in both themes, both, and an OCR model's text), and the colour scale of the bars coloured by accuracy. */
.inputs { margin: .5rem 0 .75rem; }
.inputs figcaption { margin: 0 0 .45rem; font-size: .88rem; color: var(--text-2); }
.input-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.input-list > li { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: .5rem; border: 1px solid var(--edge); border-radius: 6px; }
.input-head { margin: 0; font-size: .88rem; }
pre.input-text { margin: 0; padding: .35rem .5rem; background: var(--sunk); border-radius: 4px; font-size: .72rem; line-height: 1.35;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.input-page { padding: .35rem .55rem; background: #fbf9f2; color: #1b1b1b; border: 1px solid #bdb7a6; box-shadow: 2px 2px 0 rgba(0, 0, 0, .14);
  font-family: Georgia, "Times New Roman", serif; font-size: .76rem; line-height: 1.35; }
.input-page p { margin: 0; }
.colour-scale strong { font-weight: 650; }
i.ramp.wide { width: 6rem; }
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, .heat-scale .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, :root:not([data-theme="light"]) .heat-scale .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; }
/* Compare's lead: the difference on all questions, its interval and what it means; the cost basis cells wrap. */
.compare-verdict { margin: 0 0 1rem; padding: .75rem 1rem; background: var(--sunk); border: 1px solid var(--edge); border-radius: 6px; }
.compare-verdict p { margin: 0 0 .35rem; }
.compare-verdict p:last-child { margin-bottom: 0; }
.verdict-head { font-size: 1.05rem; }
.verdict-interval { font-family: var(--mono); font-size: .9rem; }
.compare-table td.basis { max-width: 22rem; font-size: .82rem; }
/* Every question: the filters, the count and the keys to the other rows. */
.q-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 .5rem; }
.q-filters input[type="search"] { width: 6rem; min-width: 0; }
.q-count, .q-where { margin: .25rem 0; color: var(--text-2); font-family: var(--mono); font-size: .85rem; }
.q-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0; }
.q-pager[hidden] { display: none; }
/* The heat map: its colour scale, the setup choice, and the headers that stay in view while the table scrolls in its
   box (top: the topics; left: the setups). */
.heat-legend { margin: .5rem 0 .75rem; }
.heat-legend figcaption { font-size: .85rem; }
.heat-scale { display: flex; max-width: 36rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.heat-scale li.heat { flex: 1 1 0; padding: .25rem 0; font-size: .72rem; text-align: center; }
.setup-choice { margin: 0 0 .75rem; }
.setup-choice .keys { margin: .5rem 0; }
.setup-list { max-height: 20rem; overflow-y: auto; columns: 3 15rem; margin: 0; padding: 0; border: 0; }
.setup-list label { display: flex; align-items: baseline; gap: .45rem; padding: .1rem 0; font-size: .85rem; break-inside: avoid; }
.heatmap-wrap { max-height: calc(100vh - var(--view-bar-h) - 1rem); overflow: auto; }
.heatmap-table thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--control-edge); }
.heatmap-table thead th:first-child { z-index: 3; box-shadow: 1px 0 0 var(--edge), inset 0 -1px 0 var(--control-edge); }
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; }
  .hbar-axis.dense .hbar-tick:nth-child(even) { display: none; }
  .hbar-head .head-long { display: none; }
  .hbar-head .head-short { display: inline; }
  .hbar.cols, .hbars.cols > .hbar { grid-template-columns: minmax(0, 1fr) repeat(var(--cols), 3.2rem); column-gap: .35rem; }
  .hbar-axis.cols .hbar-tick:nth-child(even) { display: none; }
  /* On a phone the cards stack, each value beside its setup. */
  .result-cards { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .panel.result-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: .1rem .6rem; padding: .45rem .7rem; }
  .result-card :is(.card-title, .card-scope) { grid-column: 1 / -1; }
  .result-card .card-title { font-size: .76rem; }
  .result-card .card-value { margin: 0; font-size: 1.1rem; }
  .result-card .card-setup { font-size: .85rem; }
  .result-card .card-scope { font-size: .74rem; }
  .chart-wide .hbar { grid-template-columns: minmax(0, 1fr) 11.5rem; }
  .chart-wide .hbar-value, .chart-wide .hbar-head { font-size: .72rem; }
  .chart-wide .hbar-axis .hbar-tick:nth-child(even) { 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 pages row is one line
     that scrolls sideways, the title is smaller, the counters take one line and the versions move under the table. */
  .topbar { gap: .3rem .6rem; margin-bottom: .55rem; padding: .35rem 0 .3rem; }
  /* The view bar on a phone: one row each, the row names for screen readers only. Row 1's labels wrap inside their keys;
     the middle key, the longest label, takes more room, so every label fits on two lines. Row 2's keys keep one line
     (All, Decision, Chat: the row's name says "models"). */
  html { --view-bar-h: 8.4rem; }
  .view-bar { margin: 0 -.6rem; padding: .35rem .6rem; }
  .view-rows { gap: .3rem; }
  .view-row { display: block; }
  /* Row 1 across the width; the Home key and row 2 share the second line; row 3 across the width. */
  .view-row.view-tests, .view-row.view-measures { grid-column: 1 / -1; }
  a.view-key.view-home { grid-column: 1; grid-row: 2; min-height: 2.1rem; padding: .15rem .5rem; }
  .view-row.view-groups { grid-column: 2; grid-row: 2; }
  .view-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0; }
  .view-row ul, .view-row.view-tests ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: .3rem; }
  a.view-key { min-height: 2.5rem; padding: .15rem .25rem; font-size: .9rem; line-height: 1.12; border-radius: 6px; }
  .view-groups a.view-key { min-height: 2.1rem; }
  .view-more { display: none; }
  /* Row 3's four keys share one row: Non-hallucination, the longest label, takes more room and wraps at its hyphen. */
  .view-row.view-measures ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, .8fr) minmax(0, 1fr); }
  .view-measures a.view-key { min-height: 2.25rem; padding: .1rem .2rem; font-size: .84rem; }
  .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; }
  /* 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: .35rem; 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 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 under the Accuracy title: the Filters key, the summary of the active filters and Reset; the setup
     count is inside the panel. */
  .chart-head .filters-bar { order: 3; flex: 1 1 100%; }
  .chart-head > .chart-sub { order: 4; }
  .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 three part keys share one row. */
  .part-keys .keys { flex-wrap: nowrap; }
  .part-keys button.key { gap: .3rem; padding: .25rem .45rem; }
  .key-count { margin-left: .15rem; }
  /* The leaderboard panel: the question count, then the four tabs on one row. */
  .board-panel { padding-top: .5rem; }
  .modebar { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "count" "tabs";
    gap: .35rem .5rem; margin-bottom: .4rem; padding-bottom: .45rem; }
  .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; }
  .input-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .input-list > li { padding: .35rem; }
  dl.key-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  dl.key-figures > div { padding: .4rem .5rem; }
  .key-figure { font-size: 1.1rem; }
  .heatmap-table td.model, .heatmap-table thead th:first-child { min-width: 7.5rem; max-width: 9rem; }
  .worked-example { padding: .75rem; }
  details.setup-record dl { grid-template-columns: 1fr; }
  /* Every table keeps its header row on a phone and scrolls sideways inside its frame. */
}

/* 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; }
}
