/* WebsiteBench project site.
   Type: EB Garamond (display), Schibsted Grotesk (UI and body), Martian Mono (numbers, routes, code).
   Colour: GitHub neutrals carry surfaces and text. The README's five theme colours are the accents, and all five stay
   in visible use: salmon, cream, mint, sky and slate. A pastel that fails contrast as text stays a fill or an icon,
   with dark ink for the text. Fonts are self-hosted (assets/fonts/OFL.txt). */
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/eb-garamond-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/eb-garamond-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/schibsted-grotesk-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/schibsted-grotesk-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; src: url('../fonts/martian-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; src: url('../fonts/martian-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand-accent: #2D5BE3;
  --paper: #FFFFFF;
  --paper-2: #F6F8FA;
  --paper-3: #EAEEF2;
  --ink: #1F2328;
  --ink-2: #424A53;
  --ink-3: #59636E;
  --rule: #D1D9E0;
  --rule-2: #D1D9E0;
  --cell: #D1D9E0;
  --focus: #0969DA;
  --link-line: #FFA69E;
  --salmon: #FFA69E;
  --cream: #FAF3DD;
  --mint: #B8F2E6;
  --sky: #AED9E0;
  --hl-soft: #FFE6E3;
  --hl-ink: #A9433C;
  --fail: #A9433C;
  --pass: #41465A;
  --pass-fill: #B8F2E6;
  --pass-edge: #41465A;
  --pass-soft: #E3F6F1;
  --c-proprietary: #5E6472;
  --c-open: #FFA69E;
  --btn-hover: #59636E;
  --on-ink: #FFFFFF;
  --tint: #FAF3DD;
  --tint-edge: #EDE3C4;
  --ramp-0: #D1D9E0;
  --ramp-1: #5E6472;
  --ramp-2: #1F2328;
  --w-error: #F4B5AC;
  --cell-line: rgba(31, 35, 40, .06);
  --ring: #8C959F;
  --w-timeout: #A8D3DC;
  --overlay: #FFFFFF;
  --term: #F6F8FA;
  --term-ink: #1F2328;
  --term-dim: #59636E;
  --code-edge: #D1D9E0;
  --cat-bg: #F6F8FA;
  --cat-ink: #1F2328;
  --cat-edge: #D1D9E0;
  --tree-cat-line: #FFA69E;
  --tree-root-line: #5E6472;
  --shadow: 0 1px 2px rgba(31, 35, 40, .06), 0 10px 30px rgba(31, 35, 40, .08);
  --shadow-lg: 0 2px 4px rgba(31, 35, 40, .05), 0 24px 60px rgba(31, 35, 40, .13);
  --font-display: 'EB Garamond', Garamond, 'Iowan Old Style', 'Times New Roman', serif;
  --font-sans: 'Schibsted Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235E6472' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 60px;
  --split: 62%;
  color-scheme: light;
  --pick: #DFF0F3;
  --thumb-veil: transparent;
  --bar-frontier: #5E6472;
  --bar-open: #FFA69E;
  --radius: 6px;
  --window: 16px;
  --chrome: #F6F8FA;
  --chrome-edge: #D1D9E0;
  --url: #FFFFFF;
  --host: #1F2328;
  --path: #59636E;
  --grip: #5E6472;
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-accent: #85A2FF;
    --paper: #0D1117;
    --paper-2: #161B22;
    --paper-3: #21262D;
    --ink: #F0F6FC;
    --ink-2: #C9D1D9;
    --ink-3: #9198A1;
    --rule: #30363D;
    --rule-2: #30363D;
    --cell: #30363D;
    --focus: #2F81F7;
    --link-line: #FFA69E;
    --hl-soft: #3A2422;
    --hl-ink: #FFA69E;
    --fail: #FFA69E;
    --pass: #B8F2E6;
    --pass-fill: #B8F2E6;
    --pass-edge: #B8F2E6;
    --pass-soft: #16302C;
    --c-proprietary: #AEB5C2;
    --c-open: #FFA69E;
    --btn-hover: #C9D1D9;
    --on-ink: #0D1117;
    --tint: #1E2430;
    --tint-edge: #3A4250;
    --ramp-0: #1C2128;
    --ramp-1: #9198A1;
    --ramp-2: #F0F6FC;
    --w-error: #C47F77;
    --cell-line: rgba(240, 246, 252, .07);
    --ring: #6E7681;
    --w-timeout: #5F9AA6;
    --overlay: #161B22;
    --term: #161B22;
    --code-edge: #30363D;
    --cat-bg: #161B22;
    --cat-ink: #F0F6FC;
    --cat-edge: #30363D;
    --tree-cat-line: #FFA69E;
    --tree-root-line: #9198A1;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239AA3B2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  --term-ink: #F0F6FC;
  --term-dim: #9198A1;
  --pick: #121D2F;
  --thumb-veil: rgba(13,17,23,.16);
  --bar-frontier: #AEB5C2;
  --bar-open: #FFA69E;
  --chrome: #161B22;
  --chrome-edge: #30363D;
  --url: #0D1117;
  --host: #F0F6FC;
  --path: #9198A1;
  --grip: #59636E;
}
}
@media screen {
:root[data-theme="dark"] {
  --brand-accent: #85A2FF;
  --paper: #0D1117;
  --paper-2: #161B22;
  --paper-3: #21262D;
  --ink: #F0F6FC;
  --ink-2: #C9D1D9;
  --ink-3: #9198A1;
  --rule: #30363D;
  --rule-2: #30363D;
  --cell: #30363D;
  --focus: #2F81F7;
  --link-line: #FFA69E;
  --hl-soft: #3A2422;
  --hl-ink: #FFA69E;
  --fail: #FFA69E;
  --pass: #B8F2E6;
  --pass-fill: #B8F2E6;
  --pass-edge: #B8F2E6;
  --pass-soft: #16302C;
  --c-proprietary: #AEB5C2;
  --c-open: #FFA69E;
  --btn-hover: #C9D1D9;
  --on-ink: #0D1117;
  --tint: #1E2430;
  --tint-edge: #3A4250;
  --ramp-0: #1C2128;
  --ramp-1: #9198A1;
  --ramp-2: #F0F6FC;
  --w-error: #C47F77;
    --cell-line: rgba(240, 246, 252, .07);
    --ring: #6E7681;
  --w-timeout: #5F9AA6;
  --overlay: #161B22;
  --term: #161B22;
  --code-edge: #30363D;
  --cat-bg: #161B22;
  --cat-ink: #F0F6FC;
  --cat-edge: #30363D;
  --tree-cat-line: #FFA69E;
  --tree-root-line: #9198A1;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239AA3B2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
  --term-ink: #F0F6FC;
  --term-dim: #9198A1;
  --pick: #121D2F;
  --thumb-veil: rgba(13,17,23,.16);
  --bar-frontier: #AEB5C2;
  --bar-open: #FFA69E;
  --chrome: #161B22;
  --chrome-edge: #30363D;
  --url: #0D1117;
  --host: #F0F6FC;
  --path: #9198A1;
  --grip: #59636E;
}
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body { display: flex; flex-direction: column; min-height: 100dvh; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body > main { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: underline 2px var(--link-line); text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--salmon); color: #1F2328; }
code { font-family: var(--font-mono); font-size: .78em; font-stretch: 90%; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 700; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: 0; transform: translateY(-140%); z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { transform: translateY(12px); }
.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--wrap)); margin-inline: auto; }
:root[data-theme="dark"] .model-logo, :root[data-theme="dark"] .plot-logo { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .model-logo, :root:not([data-theme="light"]) .plot-logo { filter: invert(1); }
}

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.topbar-in { position: relative; display: flex; align-items: center; gap: 20px; height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.025em; }
@media (hover: hover) { .brand:hover { color: var(--ink); } }
.brand-mark { display: block; width: 24px; height: 24px; flex: none; }
.toc { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.toc a { position: relative; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .toc a:hover { color: var(--ink); background: var(--paper-2); } }
.toc a.is-active, .toc a[aria-current="page"] { color: var(--ink); }
.toc a.is-active::after, .toc a[aria-current="page"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -13px; height: 2px; background: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
@media (hover: hover) { .icon-btn:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); } }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .toc { position: absolute; top: calc(100% + 6px); right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; min-width: 220px; padding: 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-lg); }
  .toc.is-open { display: flex; }
  .toc a { padding: 10px 12px; font-size: 16px; }
  .toc a.is-active::after, .toc a[aria-current="page"]::after { display: none; }
  .toc a.is-active, .toc a[aria-current="page"] { background: var(--paper-2); }
}
@media (max-width: 400px) {
  .topbar-in { gap: 8px; }
  .brand { gap: 7px; font-size: 16.5px; }
  .brand-mark { width: 20px; height: 20px; }
  .topbar-actions { gap: 6px; }
}

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px; border: 1px solid var(--rule-2); border-radius: 9px; background: var(--paper); color: var(--ink); font: 600 16px/1 var(--font-sans); letter-spacing: -.005em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
@media (hover: hover) { .btn:hover { background: var(--paper); border-color: var(--ink-3); color: var(--ink); } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
@media (hover: hover) { .btn-ink:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--on-ink); } }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14.5px; border-radius: 8px; }
.btn:disabled { opacity: .4; cursor: default; }
.link-btn { display: inline-block; padding: 4px 2px; border: 0; background: none; color: var(--ink); font: 500 15px/1.4 var(--font-sans); text-align: left; text-decoration: underline 2px var(--link-line); text-underline-offset: 4px; cursor: pointer; }
@media (hover: hover) { .link-btn:hover { color: var(--ink); text-decoration-color: var(--ink-3); } }
.link-btn svg { width: 16px; height: 16px; margin-right: 7px; vertical-align: -3px; }
.go-arrow { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.link-btn .go-arrow { width: 14px; height: 14px; margin: 0 0 0 5px; vertical-align: -2px; }
.dt-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 7px; background: var(--paper); color: var(--ink); font: 600 13.5px/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .dt-btn:hover { background: var(--paper); border-color: var(--ink-3); } }
.dt-btn svg { width: 15px; height: 15px; flex: none; }
.dt-btn-quiet { color: var(--ink-2); }
.dt-btn:disabled, .dt-btn[aria-disabled="true"] { background: var(--paper-3); border-color: var(--rule-2); color: var(--ink-3); cursor: progress; }
.dt-btn.is-done { background: var(--pass-soft); border-color: var(--pass-edge); color: var(--ink); }

.link-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 500; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0 18px; padding: 0; list-style: none; }
.facts li { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink-3); font-size: 13px; }
.facts b { font: 500 13px/1.3 var(--font-mono); font-stretch: 84%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
/* ---------- hero ---------- */
.brand-word { display: block; width: 112px; line-height: 0; }
.brand-word img { width: 100%; height: auto; }
.hero-in { display: flex; flex-direction: column; align-items: center; padding-block: 22px 10px; text-align: center; }
.wordmark { margin: 0 0 12px; line-height: 0; }
.wordmark img { width: 224px; height: auto; }
.wordmark-dark { display: none; }
@media screen {
  :root[data-theme="dark"] .wordmark-light { display: none; }
  :root[data-theme="dark"] .wordmark-dark { display: inline; }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark-light { display: none; }
  :root:not([data-theme="light"]) .wordmark-dark { display: inline; }
}
.question { margin: 0; font: 500 25px/1.2 var(--font-display); letter-spacing: -.003em; color: var(--ink); }
.lede { margin: 7px 0 0; max-width: 720px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; text-wrap: balance; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
@media (max-height: 800px) and (min-width: 721px) {
  .hero-in { padding-block: 14px 6px; }
  .wordmark img { width: 190px; }
  .wordmark { margin-bottom: 8px; }
  .question { font-size: 22px; }
  .actions { margin-top: 12px; }
}
@media (max-width: 720px) {
  .hero-in { padding-block: 18px 8px; }
  .wordmark img { width: 180px; }
  .wordmark { margin-bottom: 10px; }
  .question { font-size: 21px; }
  .lede { font-size: 15px; }
  .actions { margin-top: 14px; }
}

/* ---------- results ---------- */
.results { margin-top: 12px; scroll-margin-top: 0; }
.board-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.results-tabs { display: flex; gap: 26px; }
.results-tabs button { margin-bottom: -1px; padding: 6px 0 8px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-3); font: 600 14px/1.2 var(--font-sans); cursor: pointer; }
@media (hover: hover) { .results-tabs button:hover { color: var(--ink); } }
select { max-width: 100%; min-height: 34px; padding: 6px 30px 6px 11px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--paper) var(--chevron) no-repeat right 11px center / 10px 6px; color: var(--ink); font: 500 14px/1.3 var(--font-sans); -webkit-appearance: none; appearance: none; cursor: pointer; }
@media (hover: hover) { select:hover { border-color: var(--ink-3); } }
.result-panel { margin-top: 0; }
.board-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); }
.board { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14.5px; white-space: nowrap; }
.board th, .board td { padding: 7px 16px; border-bottom: 1px solid var(--rule); text-align: right; vertical-align: middle; }
.board tbody th, .board tbody td { height: 40px; }
.board tbody tr:last-child > * { border-bottom: 0; }
.board thead th { background: var(--paper-2); color: var(--ink-3); font-size: 13px; font-weight: 600; }
.board thead th button { all: unset; position: relative; display: inline-flex; align-items: center; cursor: pointer; border-radius: 4px; }
.board thead th button::after { content: ''; position: absolute; inset: -7px -16px; }
@media (hover: hover) { .board thead th button:hover { color: var(--ink); } }
@media (hover: hover) { .board thead th:not([aria-sort]) button:hover .arrow { opacity: .35; } }
.board thead th button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.board thead th[aria-sort] { color: var(--ink); }
.board .arrow { position: absolute; left: calc(100% + 5px); top: 50%; width: 0; height: 0; margin-top: -2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0; }
.board th[aria-sort] .arrow { opacity: 1; }
.board th[aria-sort="ascending"] .arrow { transform: rotate(180deg); }
.board thead th:last-child, .board tbody td:last-child { padding-right: 22px; }
.board .rank { width: 44px; text-align: left; color: var(--ink-3); font: 500 12.5px var(--font-mono); }
.board .model { text-align: left; }
.board tbody th.model { position: sticky; left: 0; z-index: 1; background: var(--paper); font-weight: 400; }
.board thead th.model { position: sticky; left: 0; z-index: 2; }
.m-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.board tbody th.model .m-name { display: flex; }
.model-logo { display: block; flex: none; object-fit: contain; }
.col-overall { width: 28%; }
.ov { display: grid; grid-template-columns: minmax(80px, 1fr) 56px; align-items: center; gap: 14px; }
.ov .bar { position: relative; height: 10px; border-radius: 5px; background: var(--paper-3); }
.ov .bar::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: 25%; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); opacity: .55; }
.ov .bar i { display: block; height: 100%; border-radius: 5px; background: var(--c-proprietary); }
.ov .bar i.open { background: var(--c-open); }
.board td { color: var(--ink-2); }
.board td:not(.rank), .ov b { font-family: var(--font-mono); font-stretch: 84%; font-size: 14px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ov b { font-weight: 500; color: var(--ink); text-align: right; }
.board .best, .ov b.best { font-weight: 750; color: var(--ink); }
@media (hover: hover) { .board tbody tr:hover > * { background: var(--paper-2); } }
.board-wrap.can-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.board-legend { margin: 12px 0 0; max-width: 92ch; font-size: 14px; color: var(--ink-3); }
.legend { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; background: var(--c-proprietary); }
.legend i.open { background: var(--c-open); }
@media (min-width: 721px) and (max-width: 1100px) {
  .board { min-width: 820px; }
  .board th, .board td { padding-inline: 10px; }
  .board thead th:last-child, .board tbody td:last-child { padding-right: 18px; }
  .board .col-overall { width: 22%; }
  .board .ov { grid-template-columns: minmax(48px, 1fr) 50px; gap: 8px; }
}
@media (max-width: 720px) {
  .board { min-width: 668px; }
  .board th, .board td { padding-inline: 8px; }
  .board thead th:last-child, .board tbody td:last-child { padding-right: 16px; }
  .board .col-overall { width: 128px; }
  .board .ov { grid-template-columns: minmax(44px, 1fr) 44px; gap: 8px; }
}
@media (max-width: 380px) {
  .board-wrap.can-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); }
}

/* Pareto */
.chart-panel { border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); overflow: hidden; }
.chart-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 18px; border-top: 1px solid var(--rule); color: var(--ink-3); font: 13.5px/1.5 var(--font-sans); }
.chart-legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.pareto-list { display: none; margin: 0; padding: 4px 16px 12px; list-style: none; }
.pareto-chart.is-narrow + .pareto-list { display: block; }
.pareto-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; cursor: pointer; }
.pareto-list li:last-child { border-bottom: 0; }
.pareto-list b { font-weight: 650; white-space: nowrap; }
.pareto-ring { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule-2); }
.pareto-list li.on-frontier .pareto-ring { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pareto-list span { font: 500 12.5px var(--font-mono); font-stretch: 86%; color: var(--ink-2); }

/* Waffle: a dense task x model matrix. Its shades are the --ramp tokens, so it follows the theme. */

/* ---------- results toolbar ---------- */
.result-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 10px; }
.tool-group { display: flex; align-items: center; gap: 6px; }
.tool-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--rule-2); }
.tool-wrap { position: relative; }
.tool-btn { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--paper); color: var(--ink-2); cursor: pointer; }
.tool-btn[aria-expanded="true"] { border-color: var(--ink-3); background: var(--paper-2); color: var(--ink); }
@media (hover: hover) { .tool-btn:hover:not(:disabled) { border-color: var(--ink-3); background: var(--paper-2); color: var(--ink); } }
.tool-btn:disabled { opacity: .4; cursor: default; }
.tool-btn.is-active { border-color: var(--ink-3); color: var(--ink); }
.tool-btn svg { display: block; width: 16px; height: 16px; }
.tool-btn .i-check { display: none; }
.tool-btn.is-done > svg { display: none; }
.tool-btn.is-done > .i-check { display: block; color: var(--ink); }
.tool-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
@media (hover: hover) { .tool-btn[aria-pressed="true"]:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); } }
.tool-count { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font: 600 10px/16px var(--font-sans); text-align: center; }
.tool-count[hidden] { display: none; }
.tool-status { margin-right: 6px; color: var(--ink-2); font: 500 13px var(--font-sans); opacity: 0; transition: opacity .15s ease; white-space: nowrap; }
.tool-status.is-on { opacity: 1; }
.tool-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 190px; padding: 6px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--paper); box-shadow: 0 8px 24px rgba(13, 17, 23, .14); }
.tool-pop[hidden] { display: none; }
.tool-pop-end { left: auto; right: 0; }
.tool-menu a, .tool-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: 500 14px/1.3 var(--font-sans); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.tool-menu a:focus-visible, .tool-menu button:focus-visible { background: var(--paper-2); color: var(--ink); }
@media (hover: hover) { .tool-menu a:hover, .tool-menu button:hover { background: var(--paper-2); color: var(--ink); } }
.tool-menu a:focus-visible, .tool-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tool-menu svg { flex: none; width: 15px; height: 15px; color: var(--ink-3); }
.pop-seg { display: flex; gap: 2px; margin-bottom: 6px; padding: 2px; border-radius: 8px; background: var(--paper-2); }
.pop-seg button { flex: 1; padding: 4px 9px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink-2); font: 500 12.5px/1.4 var(--font-sans); white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .pop-seg button:hover { color: var(--ink); } }
.pop-seg button[aria-pressed="true"] { border-color: var(--rule-2); background: var(--paper); color: var(--ink); }
.pop-list { margin: 0; padding: 0; list-style: none; }
.pop-list label { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; color: var(--ink); font: 500 14px/1.3 var(--font-sans); white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .pop-list label:hover { background: var(--paper-2); } }
.pop-list input { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.pop-list label:has(input:disabled) { cursor: default; color: var(--ink-3); }
.pop-list .model-logo { width: 15px; height: 15px; }
.view-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--paper-2); }
.view-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 15px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: 600 14px/1 var(--font-sans); cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.view-seg button svg { flex: none; width: 15px; height: 15px; }
@media (hover: hover) { .view-seg button:hover { background: var(--paper); color: var(--ink); } }
.view-seg button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
@media (hover: hover) { .view-seg button[aria-selected="true"]:hover { background: var(--ink); color: var(--on-ink); } }
.view-seg button:focus-visible, .tool-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
#board.hide-overall [data-col="overall"], #board.hide-request [data-col="request"], #board.hide-browser [data-col="browser"], #board.hide-system [data-col="system"], #board.hide-cost [data-col="cost"], #board.hide-tokens [data-col="tokens"], #board.hide-turns [data-col="turns"] { display: none; }

/* ---------- chart header ---------- */
.chart-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 9px 14px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.chart-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-2); font: 500 14px/1.3 var(--font-sans); }
.chart-sentence-end { gap: 8px 16px; }
.chart-sentence label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); }
.chart-sentence-keep { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.waffle-title { color: var(--ink); font-weight: 600; }

/* ---------- Pareto ---------- */
.pareto-chart { padding: 8px 8px 0; }
.pareto-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot-grid { stroke: var(--rule); stroke-width: 1; }
.plot-axis { stroke: var(--rule-2); stroke-width: 1; }
.plot-tick { fill: var(--ink-3); font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; font-stretch: 86%; }
.axis-title { fill: var(--ink-2); font: 600 12.5px var(--font-sans); }
.frontier-line { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.plot-name { fill: var(--ink-2); font: 600 12.5px var(--font-sans); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.plot-value { fill: var(--ink-3); font-family: var(--font-mono); font-size: 11px; font-weight: 500; font-stretch: 86%; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.plot-label line { stroke: var(--ink-3); stroke-width: .8; opacity: .6; }
.plot-label.on-frontier .plot-name { fill: var(--ink); }
.plot-label.on-frontier .plot-value { fill: var(--ink-2); }
.plot-point circle { fill: var(--paper); stroke: var(--ring); stroke-width: 1.5; }
.plot-point.on-frontier circle { stroke: var(--ink); stroke-width: 2; }
.plot-point { cursor: default; outline: none; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .15s ease; }
.plot-label { transition: opacity .15s ease; }
.pareto-chart.has-hot .plot-point:not(.is-hot), .pareto-chart.has-hot .plot-label:not(.is-hot) { opacity: .28; }
.plot-point.is-hot circle { stroke: var(--ink); stroke-width: 2.5; }
.plot-point:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
.plot-label { cursor: pointer; }
.plot-tick.is-under { opacity: 0; }
.plot-guides line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.plot-guides rect { fill: var(--ink); }
.plot-guides text { fill: var(--on-ink); font-family: var(--font-mono); font-size: 11px; font-weight: 600; font-stretch: 86%; }
.pareto-chart.is-entering .plot-label, .pareto-chart.is-entering .frontier-line { animation: plot-in .4s ease; }
@keyframes plot-in { from { opacity: 0; } to { opacity: 1; } }
.frontier-key { border: 2px solid var(--ink); }
.other-key { border: 1.5px solid var(--ring); }

/* ---------- Waffle ---------- */
.waffle-scroll { padding: 14px 12px 10px; overflow-x: auto; }
.waffle-chart { display: flex; }
.waffle-chart svg { display: block; flex: none; overflow: visible; max-width: none; }
.waffle-chart a { text-decoration: none; }
.wf-cell { stroke: var(--cell-line); stroke-width: 1; }
.wf-cell.is-error { fill: var(--w-error); }
.wf-cell.is-timeout { fill: var(--w-timeout); }
.wf-link { outline: none; cursor: pointer; }
.wf-focus { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.wf-focus.is-on { opacity: 1; }
.wf-focus.is-key { stroke: var(--focus); stroke-width: 2; }
.wf-band { fill: var(--ink); opacity: 0; pointer-events: none; }
.wf-band.is-on { opacity: .055; }
.wf-task text { fill: var(--ink-3); font: 500 10.5px var(--font-sans); }
.wf-task.is-hot text { fill: var(--ink); font-weight: 650; }
@media (hover: hover) { .wf-task:hover text { fill: var(--ink); font-weight: 650; } }
.wf-model { cursor: pointer; }
.wf-model-name { fill: var(--ink); font: 600 12.5px var(--font-sans); }
.wf-model-score { fill: var(--ink-3); font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; font-stretch: 86%; }
.wf-model.is-hot .wf-model-score { fill: var(--ink); }
@media (hover: hover) { .wf-model:hover .wf-model-score { fill: var(--ink); } }
.waffle-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 18px; padding: 12px 18px; border-top: 1px solid var(--rule); color: var(--ink-3); font: 500 13.5px/1.4 var(--font-sans); }
.wf-legend-scale { display: inline-flex; align-items: center; gap: 8px; }
.wf-legend-step { display: inline-flex; align-items: center; gap: 4px; font: 500 10px/1 var(--font-mono); font-stretch: 86%; }
.wf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.waffle-footer i { display: inline-block; width: 12px; height: 12px; border-radius: 2.5px; box-shadow: inset 0 0 0 1px var(--cell-line); }
.wf-key-error { background: var(--w-error); }
.wf-key-timeout { background: var(--w-timeout); }

/* ---------- exported Table ---------- */
.xt-head { fill: var(--ink-3); font: 600 13px var(--font-sans); }
.xt-rank { fill: var(--ink-3); font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-stretch: 86%; }
.xt-name { fill: var(--ink); font: 600 14px var(--font-sans); }
.xt-cell { fill: var(--ink-2); font-family: var(--font-mono); font-size: 14px; font-weight: 500; font-stretch: 84%; }
.xt-best { fill: var(--ink); font-weight: 750; }
.xt-band { fill: var(--paper-2); }
.xt-card { fill: none; stroke: var(--rule-2); }
.xt-tick { fill: var(--ink); opacity: .55; }
.xt-track { fill: var(--paper-3); }
.xt-proprietary { fill: var(--c-proprietary); }
.xt-open { fill: var(--c-open); }
.xt-note { fill: var(--ink-3); font: 500 12.5px var(--font-sans); }
.xt-step { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10px; font-weight: 500; font-stretch: 86%; }
.xt-frontier-key { fill: none; stroke: var(--ink); stroke-width: 2; }
.xt-other-key { fill: none; stroke: var(--ring); stroke-width: 1.5; }

@media (max-width: 720px) {
  .result-tools { position: relative; flex-direction: column; align-items: stretch; gap: 8px; }
  .view-seg { display: flex; }
  .view-seg button { flex: 1; padding: 0 8px; }
  .tool-group { justify-content: flex-end; }
  .tool-wrap { position: static; }
  .tool-pop, .tool-pop-end { left: 0; right: 0; min-width: 0; }
  .tool-status { position: fixed; left: 50%; bottom: 18px; z-index: 70; margin: 0; padding: 6px 12px; border-radius: 8px; background: var(--ink); color: var(--on-ink); pointer-events: none; transform: translateX(-50%); }
  .tool-status:not(.is-on) { display: none; }
  .chart-controls { padding: 9px 10px; }
  .chart-sentence select { font-size: 13px; padding-left: 9px; padding-right: 26px; background-position: right 9px center; }
  .pareto-chart { padding-inline: 2px; }
  .waffle-scroll { padding-inline: 8px; }
}
@media (max-height: 820px) and (min-width: 861px) {
  .hero-in { padding-block: 10px 4px; }
  .wordmark { margin-bottom: 6px; }
  .wordmark img { width: 188px; }
}
@media (max-height: 680px) and (min-width: 721px) {
  .hero-in { padding-block: 6px 2px; }
  .wordmark { margin-bottom: 2px; }
  .wordmark img { width: 150px; }
  .question { font-size: 21px; }
  .lede { margin-top: 3px; max-width: none; font-size: 13.5px; line-height: 1.35; text-wrap: wrap; }
  .actions { margin-top: 8px; }
  .results { margin-top: 4px; }
}
@media (max-height: 500px) {
  .hero-in { padding-block: 8px 2px; }
  .wordmark { margin-bottom: 2px; }
  .wordmark img { width: 128px; }
  .question { font-size: 17px; }
  .lede { margin-top: 2px; font-size: 13px; line-height: 1.35; max-width: none; }
  .actions { margin-top: 8px; flex-wrap: nowrap; }
}

@media (max-height: 560px) {
  .tool-pop { max-height: calc(100svh - 124px); overflow-y: auto; overscroll-behavior: contain; }
}

/* Tooltip shared by table cells, Pareto points and Waffle cells */
.result-tooltip { position: fixed; z-index: 60; pointer-events: none; width: 260px; max-width: calc(100vw - 16px); padding: 13px 15px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--overlay); color: var(--ink); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.5; }
.result-tooltip > strong, .result-tooltip > span { display: block; }
.result-tooltip > strong { font-size: 14.5px; font-weight: 700; }
.result-tooltip > span { margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.result-tooltip dl { margin: 8px 0; }
.result-tooltip dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.result-tooltip dt { color: var(--ink-3); }
.result-tooltip dd { margin: 0; font: 500 12.5px/1.7 var(--font-mono); font-stretch: 86%; }
.result-tooltip .tooltip-score { margin-top: 6px; color: var(--ink); font: 600 13px/1.6 var(--font-mono); font-stretch: 86%; }
.result-tooltip .tooltip-status { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); color: var(--ink-2); }
@media (hover: none) {
  .result-tooltip { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: 420px; margin-inline: auto; pointer-events: auto; padding: 10px 14px 4px; }
  .result-tooltip dl { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; margin: 6px 0; }
  .result-tooltip a.tooltip-status { display: flex; align-items: center; gap: 5px; min-height: 44px; margin-top: 6px; padding: 0; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 600; text-decoration: none; background: none; }
}
@media (hover: none) and (max-height: 500px) {
  .result-tooltip { left: auto !important; right: 8px; width: 320px; margin: 0; max-height: calc(100svh - 77px); overflow: auto; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.sec-head h1, .sec-head h2 { margin: 0; font: 600 20px/1.2 var(--font-display); letter-spacing: -.004em; }
h3 { margin: 0 0 10px; font: 600 17px/1.25 var(--font-display); letter-spacing: 0; }
h4 { margin: 0; }

/* ---------- failure tree ---------- */
.tree { position: relative; margin: clamp(20px, 2.4vw, 32px) 0 0; }
.tree-grid { position: relative; z-index: 1; display: grid; grid-template-columns: max-content minmax(0, 1.3fr) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 96px); row-gap: 9px; align-items: center; }
.tree-lines { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.tree-lines path { fill: none; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.tree-lines path.to-cat { stroke: var(--tree-cat-line); stroke-width: 1.5; }
.tree-lines path.to-root { stroke: var(--tree-root-line); stroke-width: 2; }
.group { display: contents; }
.leaf { grid-column: 1; justify-self: end; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 6px; border-radius: 6px; background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); font: 500 12.5px/1.25 var(--font-sans); white-space: nowrap; }
.leaf i, .cat-node b i { display: inline-grid; place-items: center; flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--salmon); color: #1F2328; font: 800 10.5px/1 var(--font-sans); font-style: normal; }
.cat-node { grid-column: 2; position: relative; align-self: center; display: block; padding: 12px 40px 12px 16px; border-radius: 12px; background: var(--cat-bg); color: var(--cat-ink); box-shadow: inset 0 0 0 1px var(--cat-edge); text-decoration: none; }
.cat-node::after { content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .5; }
@media (hover: hover) { .cat-node:hover { background: var(--paper-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); } }
@media (hover: hover) { .cat-node:hover::after { opacity: 1; } }
.cat-node strong { font-weight: 600; }
.cat-node b { display: flex; align-items: center; gap: 9px; font-size: 16.5px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.cat-node span { display: block; margin-top: 4px; font-size: 13.5px; opacity: .82; text-wrap: balance; }
.root-node { grid-column: 3; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 22px 26px; border-radius: 16px; background: var(--tint); color: var(--ink); box-shadow: inset 0 0 0 1px var(--tint-edge); }
.root-big { display: block; font: 600 34px/1 var(--font-mono); font-stretch: 84%; letter-spacing: -.01em; white-space: nowrap; }
.root-l1 { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; }
.root-l2 { display: block; margin-top: 6px; font-size: 14.5px; color: var(--ink-2); transition: opacity .35s ease; }
.root-l2 em { font-style: normal; font-weight: 600; color: var(--hl-ink); }
.tree.is-armed .root-l2 { opacity: 0; }
.tree.is-armed .root-node.is-punch .root-l2 { opacity: 1; }
.leaf { transition: opacity .3s ease, scale .4s cubic-bezier(.2, .9, .3, 1.25); }
.cat-node, .root-node { transition: opacity .3s ease, translate .45s cubic-bezier(.2, .7, .2, 1), background-color .15s ease, box-shadow .15s ease; }
.tree.is-armed .leaf { opacity: 0; scale: .8; }
.tree.is-armed .cat-node, .tree.is-armed .root-node { opacity: 0; translate: 0 8px; }
.tree.is-armed .leaf.is-on { opacity: 1; scale: 1; }
.tree.is-armed .cat-node.is-on, .tree.is-armed .root-node.is-on { opacity: 1; translate: 0 0; }
.tree.is-measuring .leaf, .tree.is-measuring .cat-node, .tree.is-measuring .root-node { translate: none !important; scale: none !important; transition: none !important; }
.tree-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 16px; }
@media (max-width: 1000px) {
  .tree-grid { grid-template-columns: 1fr; row-gap: 12px; padding-left: 24px; }
  .group { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 10px; border-left: 2px solid var(--tree-cat-line); }
  .leaf { white-space: normal; font-size: 12.5px; }
  .cat-node, .root-node { grid-column: 1; grid-row: auto !important; }
  .cat-node { margin-bottom: 10px; }
  .root-node { align-self: auto; }
}
@media (max-width: 520px) {
  .leaf { font-size: 12px; padding: 4px 8px 4px 5px; }
  .cat-node { padding: 10px 36px 10px 12px; }
}

/* ---------- task demo ---------- */
.demo { margin: 0; }
.demo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.demo-id { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 5px 13px; border: 1px solid var(--tint-edge); border-radius: 999px; background: var(--tint); font: 500 12.5px/1.35 var(--font-mono); font-stretch: 88%; color: var(--ink-2); }
.demo-id b { color: var(--ink); font-weight: 600; }
.demo-run { display: inline-flex; align-items: center; gap: 12px; }
.demo-run .dt-score { display: block; font-size: 14.5px; color: var(--ink-2); }
.demo-run .dt-score b { color: var(--ink); font-weight: 600; }
.demo-nav { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2px 20px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.demo-nav .demo-tabs { flex: 0 1 auto; min-width: 0; gap: 22px; border-bottom: 0; overflow: visible; }
.demo-tabs .tab-short { display: none; }
.stage-wrap { position: relative; }
#stage-wrap, #devtools { max-width: max(720px, calc((100svh - 300px) * 1.71)); margin-inline: auto; }
.stage { position: relative; container-type: inline-size; border: 1px solid var(--rule-2); border-bottom: 0; border-radius: 16px 16px 0 0; overflow: hidden; background: var(--paper-2); -webkit-user-select: none; user-select: none; }
.frame { position: relative; width: 100%; margin-inline: auto; }
.stage .frame { touch-action: pan-y; }
#frame { cursor: ew-resize; }
#stage { scroll-margin-top: 4px; }
.layer { background: var(--paper-2); }
.layer.is-cand { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); }
.shot { display: block; width: 100%; height: auto; aspect-ratio: 1425 / 785; object-fit: cover; object-position: top left; background: var(--paper-2); -webkit-user-drag: none; }
.boxes, .marks { position: absolute; inset: 42px 0 0; pointer-events: none; }
.layer-side { display: none; }
.stage[data-mode="side"] { border: 0; border-radius: 0; overflow: visible; background: none; }
.stage[data-mode="side"] .frame { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; cursor: auto; }
.stage[data-mode="side"] .layer { position: relative; inset: auto; overflow: hidden; border: 1px solid var(--rule-2); border-radius: var(--window); clip-path: none; }
.stage[data-mode="side"] .layer.is-cand .url { justify-content: flex-start; }
.stage[data-mode="side"] .divider, .stage[data-mode="side"] .demo-cursor { display: none; }
.stage[data-mode="side"] .marks { left: calc(50% + 5px); }
.stage[data-mode="side"] .bug { opacity: 1; scale: 1; }
.stage[data-mode="side"] .layer-side { display: block; position: absolute; z-index: 2; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 6px; font: 600 12px/1.3 var(--font-mono); background: #1F2328; color: #FFFFFF; }
.stage[data-mode="side"] .is-cand .layer-side { background: #FFFFFF; color: #1F2328; box-shadow: inset 0 0 0 1px #5E6472; }
.demo:has(.stage[data-mode="side"]) #devtools { margin-top: 12px; border-radius: var(--window); max-width: none; }
#stage-wrap:has(.stage[data-mode="side"]) { max-width: none; }
.demo-nav .demo-modes { flex: none; }
.demo-nav .mode-long { display: inline; }
@media (max-width: 600px) {
  .stage[data-mode="side"] .frame { grid-template-columns: minmax(0, 1fr); }
  .stage[data-mode="side"] .marks { inset: calc(50% + 47px) 0 0; }
  .stage[data-mode="side"] .layer-side { left: 6px; bottom: 6px; font-size: 10.5px; }
}
.side { position: absolute; top: calc(50% - 12px); padding: 3px 9px; border-radius: 6px; font: 600 12px/1.3 var(--font-mono); font-stretch: 88%; white-space: nowrap; pointer-events: none; transition: opacity .15s ease; }
.side.is-off { opacity: 0; }
.side-ref { right: calc(50% + 34px); background: #1F2328; color: #FFFFFF; }
.side-cand { left: calc(50% + 34px); background: #FFFFFF; color: #1F2328; box-shadow: inset 0 0 0 1px #5E6472; }
.divider { position: absolute; top: 0; bottom: 0; left: var(--split); z-index: 6; width: 36px; margin-left: -18px; display: grid; place-items: center; cursor: ew-resize; touch-action: pan-y; }
.divider::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--grip); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
#divider { left: 0; transform: translateX(calc(var(--split-n, 40) * 1cqw)); }
.divider:focus-visible { outline: none; }
.grip { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grip); color: #FFFFFF; box-shadow: 0 0 0 4px rgba(255, 255, 255, .92), 0 6px 18px rgba(31, 35, 40, .35); transition: transform .15s ease; }
.grip svg { width: 22px; height: 22px; }
.divider.is-dragging .grip { transform: scale(1.08); }
@media (hover: hover) { .divider:hover .grip { transform: scale(1.08); } }
.divider:focus-visible::before { width: 4px; margin-left: -2px; background: var(--focus); }
.divider:focus-visible .grip { box-shadow: 0 0 0 4px rgba(255, 255, 255, .92), 0 0 0 7px var(--focus); }
.noscript { margin: 0; padding: 12px 16px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.demo-cursor { position: absolute; z-index: 7; bottom: calc(50% - 15px); left: 0; width: 30px; height: 30px; margin: 0 0 0 8px; opacity: 0; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.demo-cursor svg { width: 30px; height: 30px; }
.chrome { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; background: var(--chrome); border-bottom: 1px solid var(--chrome-edge); color: var(--path); }
.chrome .dots { display: flex; gap: 7px; flex: none; }
.chrome .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--salmon); }
.chrome .dots i:nth-child(2) { background: var(--cream); box-shadow: inset 0 0 0 1px #E6DCBC; }
.chrome .dots i:nth-child(3) { background: var(--mint); }
.chrome .navs { display: flex; gap: 4px; flex: none; color: var(--path); }
.chrome .navs svg { width: 16px; height: 16px; }
.chrome .url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 1px; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--url); border: 1px solid var(--chrome-edge); font: 500 12.5px/1 var(--font-mono); font-stretch: 88%; white-space: nowrap; overflow: hidden; }
.layer.is-cand .url { justify-content: flex-end; }
.chrome .host { flex: none; color: var(--host); font-weight: 600; }
.chrome .path { min-width: 0; color: var(--path); overflow: hidden; text-overflow: ellipsis; }
.bug-box { position: absolute; border: 1.5px dashed #A9433C; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .75); transition: box-shadow .15s ease; }
.bug-box.is-hot { border-style: solid; border-width: 2px; }
.bug { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 4px 6px; border: 0; border-radius: 5px; background: #A9433C; color: #FFFFFF; font: 600 11px/1.2 var(--font-mono); font-stretch: 88%; letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 3px 8px rgba(169, 67, 60, .35); cursor: help; pointer-events: auto; opacity: 0; scale: .9; transition: opacity .35s ease, scale .35s ease, box-shadow .15s ease; }
.bug.is-center { transform: translate(-50%, -50%); }
.bug.is-left { transform: translate(0, -50%); }
.bug.is-right { transform: translate(-100%, -50%); }
.bug-n { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #FFFFFF; color: #A9433C; font: 800 10px/1 var(--font-sans); font-style: normal; }
.dt-n { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 8px; border-radius: 50%; background: var(--salmon); color: #1F2328; font: 800 10.5px/1 var(--font-sans); font-style: normal; vertical-align: 1px; }
.stage.show-bugs .bug { opacity: 1; scale: 1; }
.bug.is-hot, .bug:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 5px #A9433C, 0 3px 8px rgba(169, 67, 60, .35); outline: none; }
@media (hover: hover) { .bug:hover { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 5px #A9433C, 0 3px 8px rgba(169, 67, 60, .35); outline: none; } }
.tip { position: absolute; z-index: 8; width: min(320px, calc(100% - 16px)); padding: 12px 14px; border-radius: 10px; background: #1F2328; color: #E6E9EF; font-size: 13.5px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); pointer-events: none; }
.tip b { display: block; margin-bottom: 4px; color: #FFFFFF; font-size: 14px; }
.tip small { display: block; margin-top: 7px; color: #9AA3B2; font: 500 11px var(--font-mono); font-stretch: 90%; }
@media (max-width: 720px) {
  .tip-body { display: none; }
  .tip b { margin-bottom: 0; }
}
.devtools { border: 1px solid var(--rule-2); border-radius: 0 0 16px 16px; background: var(--paper-2); }
.dt-bar { display: flex; align-items: stretch; gap: 16px; min-height: 44px; padding-right: 10px; border-bottom: 1px solid var(--rule); }
.dt-tab { display: flex; align-items: center; padding: 0 16px; border-bottom: 2px solid var(--ink); margin-bottom: -1px; font: 600 12px var(--font-mono); font-stretch: 90%; color: var(--ink); }
.dt-score { display: flex; align-items: center; font-size: 14px; color: var(--ink-2); }
.dt-score b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.dt-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 .5ch; margin-left: auto; padding: 6px 0; font: 500 12px/1.4 var(--font-mono); font-stretch: 88%; color: var(--ink-3); text-align: right; }
.dt-run b { color: var(--ink); font-weight: 700; }
.dt-run-groups::before { content: '· '; }
.dt-go { all: unset; display: block; padding-left: 25px; text-indent: -25px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
@media (hover: hover) { .dt-go:hover { text-decoration-color: var(--ink-3); } }
.dt-go:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.dt-row.is-pending .dt-ico, .dt-row.is-running .dt-ico { background: var(--cell); box-shadow: none; }
.dt-row.is-pending .dt-ico svg, .dt-row.is-running .dt-ico svg { display: none; }
.dt-row.is-pending .dt-detail, .dt-row.is-running .dt-detail { opacity: 0; }
.dt-row.is-pending .dt-text { color: var(--ink-3); }
.dt-row.is-pending .dt-n { background: var(--cell); color: var(--ink-2); }
.dt-row.is-running .dt-ico { background: transparent; border: 2.5px solid var(--cell); border-top-color: var(--ink); animation: spin .6s linear infinite; }
.dt-list .dt-row.is-running, .dt-list .dt-row.is-running.is-hot { background: var(--paper); border-left-color: var(--ink); }
.dt-row.is-done .dt-ico { animation: pop .3s ease; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.dt-list { margin: 0; padding: 6px 0 8px; list-style: none; }
.dt-row { display: grid; grid-template-columns: 20px 118px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 7px 16px 7px 13px; border-left: 3px solid transparent; font-size: 14.5px; cursor: default; }
.dt-row.is-hot { background: var(--paper); border-left-color: var(--rule-2); }
@media (hover: hover) { .dt-row:hover { background: var(--paper); border-left-color: var(--rule-2); } }
.dt-row.bad.is-hot { border-left-color: var(--fail); }
@media (hover: hover) { .dt-row.bad:hover { border-left-color: var(--fail); } }
.dt-row.ok.is-hot { border-left-color: var(--pass); }
@media (hover: hover) { .dt-row.ok:hover { border-left-color: var(--pass); } }
.dt-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--paper); }
.dt-ico svg { width: 12px; height: 12px; }
.ok .dt-ico { background: var(--pass-fill); color: #1F2328; box-shadow: inset 0 0 0 1px var(--pass-edge); }
.bad .dt-ico { background: var(--salmon); color: #1F2328; }
.dt-group { font: 500 12px/1.2 var(--font-mono); font-stretch: 90%; color: var(--ink-3); white-space: nowrap; }
.dt-text { color: var(--ink); }
.dt-text:not(:has(.dt-n)) { padding-left: 25px; }
.dt-n { text-indent: 0; }
.dt-detail { font: 500 12px/1.2 var(--font-mono); font-stretch: 88%; color: var(--ink-2); text-align: right; }
.bad .dt-detail { color: var(--fail); }
.demo figcaption { margin-top: 14px; max-width: 92ch; font-size: 14.5px; color: var(--ink-3); }
@container (max-width: 640px) {
  .side, .stage.is-phone .side-beside { display: none; }
}
@container (max-width: 700px) {
  .bug { width: 22px; height: 22px; padding: 0; justify-content: center; border-radius: 50%; font-size: 0; gap: 0; }
  .bug-l { display: none; }
  .bug-n { width: auto; height: auto; background: none; color: #FFFFFF; font-size: 11px; }
  .bug-box { border-width: 1px; border-radius: 3px; }
}
@container (max-width: 700px) {
  .chrome .navs { display: none; }
}
@container (max-width: 600px) {
  .stage.is-phone .frame { width: min(100%, 260px); }
  .bug { width: 18px; height: 18px; }
  .bug-n { font-size: 10px; }
  .grip { width: 34px; height: 34px; }
  .grip svg { width: 18px; height: 18px; }
  .chrome { gap: 8px; height: 34px; padding: 0 10px; }
  .chrome .dots { gap: 5px; }
  .chrome .dots i { width: 8px; height: 8px; }
  .chrome .url { height: 22px; padding: 0 8px; font-size: 10.5px; }
  .chrome .path { display: none; }
  .boxes, .marks { inset: 34px 0 0; }
}
@media (max-width: 720px) {
  .dt-bar { flex-wrap: wrap; row-gap: 0; padding-right: 0; }
  .dt-run { width: 100%; justify-content: flex-start; padding: 8px 14px; border-top: 1px solid var(--rule); margin-left: 0; text-align: left; }
  .dt-tab { min-height: 42px; }
  .dt-row { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 3px 10px; padding: 8px 14px 8px 11px; }
  .dt-group { grid-column: 2; grid-row: 1; }
  .dt-detail { grid-column: 3; grid-row: 1; text-align: right; }
  .dt-text { grid-column: 2 / -1; grid-row: 2; }
  .dt-ico { grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
  .demo-run .dt-score { font-size: 13.5px; }
  .demo-id { border-radius: 12px; font-size: 11.5px; }
  .demo-tabs { gap: 20px; }
  .demo-tabs .tab-long { display: none; }
  .demo-tabs .tab-short { display: inline; }
  .dt-run { font-size: 10.5px; }
}
@media (max-width: 860px) {
  .dt-run-groups { width: 100%; }
  .dt-run-groups::before { content: none; }
}
@media (max-width: 480px) {
  .dt-row { grid-template-columns: 20px minmax(0, 1fr); }
  .dt-detail { grid-column: 2; grid-row: 3; padding-left: 25px; text-align: left; }
}

/* access lists and the overview figure */
.access { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(48px, 6vw, 72px); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
.access-col { padding: clamp(22px, 3vw, 34px); }
.access-col.hidden-col { background: var(--paper-2); }
.access h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 600 17px/1.25 var(--font-display); letter-spacing: 0; }
.access-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none; }
.access-ico svg { width: 18px; height: 18px; }
.access-ico.ok { background: var(--pass-soft); color: var(--pass); }
.access-ico.lock { background: var(--paper-3); color: var(--ink-2); }
.access ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.access li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.access li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--pass-fill); box-shadow: inset 0 0 0 1px var(--pass-edge); }
.access .hidden-col li::before { background: var(--ink-3); box-shadow: none; }
.fig-link-lg { margin-top: clamp(28px, 3.5vw, 40px); font-size: 15.5px; }

/* ---------- findings ---------- */
.finding { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px; }
.sec-head + .finding { padding-top: 0; }
.finding-text p { margin: 0 0 1em; color: var(--ink-2); max-width: 72ch; font-size: 16px; line-height: 1.55; }
.finding-text p:last-child { margin-bottom: 0; }
.finding-tag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px !important; color: var(--ink-2) !important; font-size: 14px; font-weight: 600; }
.finding-tag span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--salmon); color: #1F2328; font: 700 12px/1 var(--font-mono); }
.finding-viz { display: grid; align-content: start; gap: 14px; container-type: inline-size; }
.viz-title { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.viz-title:first-child { margin-top: 0; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 0; padding: 0; list-style: none; }
.flow-step { position: relative; display: grid; align-content: start; justify-items: start; gap: 10px; padding-right: 10px; }
.flow-step::after { content: ''; position: absolute; left: 44px; right: 8px; top: 17px; height: 2px; border-radius: 1px; background: var(--ink-3); }
.flow-step:last-child::after { display: none; }
.flow-step.is-stop::after { background: repeating-linear-gradient(90deg, var(--fail) 0 6px, transparent 6px 11px); }
.flow-step i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink-2); color: var(--on-ink); font: 600 13px/1 var(--font-mono); font-style: normal; }
.flow-step.is-stop i { box-shadow: 0 0 0 4px var(--hl-soft); }
.flow-step.is-missed i { background: var(--paper); color: var(--ink-3); box-shadow: inset 0 0 0 2px var(--rule-2); }
.flow-step span { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.flow-step.is-missed span { color: var(--ink-3); }
.flow-notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; font-size: 13.5px; line-height: 1.35; }
.flow-notes span { position: relative; padding: 0 10px 0 12px; border-left: 2px solid; }
.flow-stop { grid-column: 3; border-color: var(--fail); color: var(--fail); font-weight: 600; }
.flow-check { grid-column: 4; border-color: var(--ink-3); color: var(--ink-2); font-weight: 600; }
.cases { display: grid; gap: 12px; }
.case { padding: 16px 18px 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); }
.case-site { margin: 0 0 6px; font: 600 16px/1.3 var(--font-display); letter-spacing: -.005em; color: var(--ink); }
.case-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: baseline; gap: 12px; margin: 0; padding-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.case-row + .case-row { margin-top: 8px; border-top: 1px solid var(--rule); }
.case-k { justify-self: start; padding: 1px 7px; border-radius: 5px; font: 600 11.5px/1.5 var(--font-mono); font-stretch: 90%; }
.case-k.is-saw { background: var(--pass-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--pass-edge); }
.case-k.is-built { background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--salmon); }
.runs { display: grid; gap: 10px; margin-bottom: 6px; }
.run { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px; font-size: 14.5px; }
.run-label { color: var(--ink-2); }
.run-label code { font-size: .86em; }
.run-track { position: relative; height: 28px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--paper-3) 0 calc(25% - 1px), var(--rule-2) calc(25% - 1px) 25%); }
.run-track i { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; justify-content: flex-end; border-radius: 6px; background: var(--ink-3); }
.run.is-goal .run-track i { background: var(--ink-2); }
.run-end, .run-in { font: 600 13px var(--font-mono); font-stretch: 86%; white-space: nowrap; }
.run-end { position: absolute; top: 50%; transform: translate(10px, -50%); color: var(--ink); }
.run-in { padding-right: 10px; color: var(--on-ink); }
.run-axis { margin-top: -4px; }
.run-ticks { position: relative; height: 16px; font: 500 11.5px var(--font-mono); font-stretch: 86%; color: var(--ink-3); }
.run-ticks em { position: absolute; top: 0; font-style: normal; white-space: nowrap; transform: translateX(-50%); }
.run-ticks em:first-child { transform: none; }
.run-ticks em:last-child { transform: translateX(-100%); }
.deltas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.deltas > div { padding: 12px 10px 0 0; }
.deltas dt { font-size: 13px; color: var(--ink-3); }
.deltas dd { margin: 4px 0 0; font: 600 16px var(--font-mono); font-stretch: 86%; white-space: nowrap; }
.deltas dd span { color: var(--ink-3); font-weight: 400; }
@container (max-width: 420px) {
  .deltas { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .deltas > div { padding-right: 0; }
  .deltas dd { font-size: 13px; }
}
@container (max-width: 480px) {
  .run { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .run-axis > span:first-child { display: none; }
  .flow-step span { font-size: 13.5px; }
  .flow-notes { font-size: 12.5px; }
  .flow-notes span { padding-left: 8px; }
  .case-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- tests ---------- */
.corpus { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.corpus-text p { margin: 0; color: var(--ink-2); max-width: 54ch; font-size: 16px; line-height: 1.55; }
.groups { margin-top: 40px; }
.groups-grid { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
.grp { padding: clamp(20px, 2.6vw, 30px); }
.grp-wide { background: var(--tint); }
.grp-k { margin: 0 0 4px; font: 600 12.5px var(--font-mono); font-stretch: 90%; color: var(--ink-3); }
.grp h4 { margin-bottom: 4px; font: 600 15px/1.3 var(--font-sans); letter-spacing: 0; }
.grp p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.grp .grp-k { font-size: 12.5px; }
.levels { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.levels li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.levels b { display: grid; place-items: center; height: 26px; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule-2); font: 600 12px var(--font-mono); color: var(--ink); }
.grp-note { padding-top: 12px; border-top: 1px solid var(--tint-edge); font-size: 14.5px !important; }
.ticks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--salmon); }

/* ---------- code and citation ---------- */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tab { all: unset; margin-bottom: -1px; padding: 10px 0 12px; border-bottom: 2px solid transparent; color: var(--ink-3); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .tab:hover { color: var(--ink); } }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
#copy-bib { position: absolute; top: 10px; right: 10px; z-index: 1; min-width: 130px; justify-content: center; }
.bib, .code-wrap { position: relative; max-width: 880px; border-radius: 16px; background: var(--term); overflow: hidden; box-shadow: inset 0 0 0 1px var(--code-edge); }
.code-wrap { max-width: none; }
.code { margin: 0; padding: clamp(18px, 2.4vw, 26px); overflow-x: auto; color: var(--term-ink); font: 400 13px/1.9 var(--font-mono); font-stretch: 88%; }
.code code { font-size: 1em; font-stretch: inherit; }
#cite.section { padding-top: 64px; }
#cite .sec-head { margin-bottom: 12px; }
#cite .bib { margin-top: 0; max-width: none; border-radius: 16px; }
pre.code.can-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 12px), transparent); }
@media (max-width: 768px) { #bibtex { white-space: pre-wrap; overflow-wrap: anywhere; } }
@media (max-width: 480px) { #bibtex { padding-top: 52px; } }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px clamp(18px, 2.4vw, 26px); border-bottom: 1px solid var(--rule-2); color: var(--term-dim); font: 500 12.5px var(--font-mono); font-stretch: 90%; }
.code-head h2 { margin: 0; font: inherit; }
.code-head .dt-btn { height: 28px; background: var(--paper); border-color: var(--rule-2); color: var(--ink); }
@media (hover: hover) { .code-head .dt-btn:hover { background: var(--paper); border-color: var(--ink-3); } }
.code-head .dt-btn.is-done { background: var(--pass-soft); border-color: var(--pass-edge); color: var(--ink); }

/* ---------- footer ---------- */
.footer { margin-top: clamp(48px, 6vw, 72px); padding-block: 36px 52px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 15px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.footer p { margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-left: auto !important; }
.footer a { color: var(--ink-2); text-decoration: none; }
@media (hover: hover) { .footer a:hover { color: var(--ink); text-decoration: underline 2px var(--link-line); text-underline-offset: 4px; } }
@media (max-width: 900px) { .footer-links { margin-left: 0 !important; flex-basis: 100%; } }

/* ---------- lightbox ---------- */
.lightbox { width: fit-content; max-width: min(96vw, 1600px); max-height: 94vh; padding: 0; border: 0; border-radius: 14px; background: #FFFFFF; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); overflow: auto; overscroll-behavior: contain; }
html:has(dialog[open]) { overflow: hidden; }
.lightbox::backdrop { background: rgba(13, 17, 23, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94vh - 4px); margin: 0 auto; padding: 20px; }
@media (max-width: 720px) { .lightbox { width: 96vw; } .lightbox img { width: 900px; max-width: none; max-height: none; } }
.lb-close { position: sticky; top: 10px; left: calc(100% - 52px); z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin: 10px 10px -50px auto; border: 0; border-radius: 50%; background: #1F2328; color: #FFFFFF; cursor: pointer; }
.lb-close svg { width: 18px; height: 18px; }

/* ---------- subpages ---------- */
.page { padding-top: clamp(28px, 4vw, 52px); }
.page .sec-head { margin-bottom: 18px; }
.page .sec-head h1, .catalog h1 { margin: 0; font: 600 clamp(22px, 1.8vw, 25px)/1.15 var(--font-display); letter-spacing: -.006em; }
.page .section { padding-top: clamp(44px, 5vw, 72px); }
.page > .sec-head + .section { padding-top: 10px; }
.page-intro { margin: 0 0 clamp(28px, 4vw, 44px); max-width: 64ch; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* analysis */
.study { padding-block: clamp(44px, 6vw, 72px) 0; }
.study-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 12px; }
.study-head h2 { margin: 0; font: 600 20px/1.2 var(--font-display); letter-spacing: -.004em; }
.study-scope { margin: 0; color: var(--ink-3); font: 500 12.5px/1.6 var(--font-mono); font-stretch: 88%; }
.study-scope span { white-space: nowrap; }
.study-scope span + span::before { content: '·'; margin: 0 .55em; }
@media (max-width: 340px) { .study-scope { font-size: 11.5px; } }

.design-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; }
.design { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.design caption { padding: 13px 18px; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink-3); background: var(--paper); border-bottom: 1px solid var(--rule); }
.design th, .design td { padding: 12px 18px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.design thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--paper-2); }
.design tbody th { font-weight: 650; white-space: nowrap; }
.design td { color: var(--ink-2); }
.design tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 600px) { .design tbody th { white-space: normal; width: 34%; } }

/* run */
.run-block { display: grid; gap: 26px; }
.run-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 30px 0 0; }
.notes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 72ch; }
.notes li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.notes li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--salmon); }
.notes code { white-space: nowrap; }

.run-failed { color: var(--ink-3); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .board-tools { flex-direction: column; align-items: stretch; gap: 0; border-bottom: 0; }
  .results-tabs { order: -1; border-bottom: 1px solid var(--rule); }
  .chart-footer { padding: 12px; font-size: 13px; }
  .code { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --paper: #FFFFFF; --paper-2: #F6F7F9; --ink: #000000; --ink-2: #222222; --ink-3: #444444; --rule: #DDDDDD; --rule-2: #BBBBBB; }
  .model-logo, .plot-logo { filter: none !important; }
  .topbar { position: static; }
  .topbar-actions, .toc, .board-tools, .footer, .actions, .demo, .tree-foot button { display: none !important; }
  .board { min-width: 0; }
  .board-wrap { overflow: visible; }
}

/* ---------- tasks: the contact sheet ---------- */
main:focus { outline: 0; }
.catalog .sec-head { margin-bottom: 0; }
.catalog .rail-text { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.catalog .link-list { margin-top: 6px; }
.catalog-tools { position: sticky; top: var(--topbar-h); z-index: 5; background: var(--paper); }
.results-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.catalog-search { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; padding: 0 2px 0 6px; border: 1px solid var(--rule-2); border-radius: var(--radius); color: var(--ink-3); transition: border-color .12s ease; }
.catalog-search:focus-within { border-color: var(--ink-3); }
@media (hover: hover) { .catalog-search:hover { border-color: var(--ink-3); } }
.catalog-search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; color: var(--ink); }
.catalog-search svg { width: 14px; height: 14px; flex: none; }
.catalog-search input { width: 132px; min-height: 26px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 13.5px/1.3 var(--font-sans); }
.catalog-search input::placeholder { color: var(--ink-3); opacity: 1; }
.catalog-search input::-webkit-search-cancel-button { -webkit-appearance: none; width: 11px; height: 11px; background: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5l9 9M10.5 1.5l-9 9' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; cursor: pointer; }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); align-content: start; gap: 18px 14px; min-height: calc(100svh - var(--topbar-h) - 60px); margin: 14px 0 0; padding: 0; list-style: none; }
.catalog-empty { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 0; color: var(--ink-2); font-size: 15px; }
.task-grid img { max-width: 100%; }
.task-card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; border-radius: var(--radius); }
.task-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 8 / 5; overflow: hidden; border: 1px solid var(--rule-2); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--paper-2); transition: border-color .12s ease; }
.task-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; background: var(--paper-2); }
/* In the dark theme the screenshots step back a little, so the sheet doesn't glare. */
.task-thumb::after { content: ''; position: absolute; inset: 0; background: var(--thumb-veil); transition: opacity .12s ease; pointer-events: none; }
@media (hover: hover) { .task-card:hover .task-thumb { border-color: var(--ink-3); } }
@media (hover: hover) { .task-card:hover .task-thumb::after { opacity: 0; } }
@media (hover: hover) { .task-card:hover .task-card-name { text-decoration: underline 2px var(--salmon); text-underline-offset: 3px; } }
/* A rule that is also a measure: the dark length is the pass rate, of the full width. */
.rate-rule { display: block; height: 3px; background: linear-gradient(var(--bar-frontier), var(--bar-frontier)) no-repeat left / calc(var(--rate) * 1%) 100%, var(--rule-2); }
.rate-rule.is-open { background-image: linear-gradient(var(--bar-open), var(--bar-open)); }
.task-card-name { display: block; margin-top: 6px; color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.task-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--ink-3); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.task-card-best { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font: 500 13px/1.2 var(--font-mono); font-stretch: 84%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.task-card-best .model-logo { width: 13px; height: 13px; }

/* ---------- tasks: one website ---------- */
.page-task { padding-top: 16px; }
.task-sheet { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "tools" "stage" "side"; column-gap: 0; }
.task-head { grid-area: head; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.task-head h1 { margin: 0; }
.task-head .results-tabs { order: 0; }
.task-picker-wrap { position: relative; display: inline-flex; width: fit-content; max-width: 100%; align-self: flex-start; margin: 0; border-radius: var(--radius); }
.task-picker-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.task-picker-label { margin: 0; padding-right: 19px; background: var(--chevron) no-repeat right 3px center / 11px 7px; color: var(--ink); font: 600 clamp(22px, 1.8vw, 25px)/1.15 var(--font-display); letter-spacing: -.006em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-picker { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; font: 500 14px/1.3 var(--font-sans); cursor: pointer; }
.task-picker option { font: 500 14px var(--font-sans); }
.task-tools .board-tools { min-height: 36px; }
.task-step { border-bottom: 0; }
.task-step a { padding: 4px 0; color: var(--ink-3); font: 500 13.5px/1.3 var(--font-sans); text-decoration: none; }
@media (hover: hover) { .task-step a:hover { color: var(--ink); } }
.task-tools { grid-area: tools; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.task-run { min-height: 21px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.compare-full { display: inline-grid; place-items: center; width: 22px; color: var(--ink-3); }
.compare-full svg { width: 15px; height: 15px; }
.compare-exit { display: none; }
.compare:fullscreen .compare-exit { position: fixed; top: 12px; right: 12px; z-index: 10; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--paper); color: var(--ink); cursor: pointer; }
.compare-exit svg { width: 18px; height: 18px; }

/* The runs: one row per model, in the leaderboard's card. */
.task-side { grid-area: side; display: flex; flex-direction: column; min-width: 0; margin-top: 20px; }
.run-table-wrap { border: 1px solid var(--rule-2); border-radius: 16px; overflow: hidden; }
.run-table { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
.run-table th, .run-table td { height: 40px; padding: 0 0 0 10px; text-align: right; vertical-align: middle; }
.run-table th:first-child { text-align: left; }
.run-table thead th { height: 36px; background: var(--paper-2); border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 13px; font-weight: 600; }
.run-table tbody td { color: var(--ink-2); font: 500 14px/1.2 var(--font-mono); font-stretch: 84%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.run-table tbody th { font-weight: 400; }
.run-table tbody tr + tr > * { border-top: 1px solid var(--rule); }
.run-table .m-name { display: flex; gap: 10px; font-size: 14.5px; font-weight: 600; }
.run-table .model-logo { width: 18px; height: 18px; }
.run-table .run-shot { width: 26px; color: var(--ink-3); }
.split-glyph { display: inline-block; width: 16px; max-width: none; height: 13px; vertical-align: -1px; }
.split-half { opacity: 0; }
.run-table tr:has(input) { cursor: pointer; }
@media (hover: hover) { .run-table tr:has(input):not(.is-on):hover > * { background: var(--paper-2); } }
.run-table tr.is-on > * { background: var(--pick); }
.run-table tr.is-on > th { box-shadow: inset 3px 0 0 var(--c-proprietary); }
.run-table tr.is-on .run-shot { color: var(--ink); }
.run-table tr.is-on .split-half { opacity: 1; }
.run-table tr:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.run-table tr > :first-child { padding-left: 16px; }
.run-table tr > :last-child { padding-right: 16px; }
.run-table .run-bar { width: 38%; padding-left: 24px; }
.run-table .ov { grid-template-columns: minmax(0, 1fr); gap: 0; }
.task-notes { margin-top: auto; padding-top: 14px; }
@media (max-width: 400px) {
  .flow-step { padding-right: 4px; }
  .flow-step span { font-size: 12px; }
}
@media (min-width: 1041px) {
  .task-sheet:has(.compare[data-mode="all"]) .task-side { position: sticky; top: var(--topbar-h); align-self: start; }
}

/* The comparison: one window with a divider, or two windows side by side. */
.compare { grid-area: stage; min-width: 0; padding-top: 10px; }
.compare[aria-busy="true"] .frame { opacity: .35; transition: opacity .12s; }
.compare[data-mode="side"] .side.is-off, .compare.is-reference-only .side.is-off { opacity: 1; }
.compare .stage { border-bottom: 1px solid var(--rule-2); border-radius: var(--window); }
.compare .frame { cursor: ew-resize; }
.compare .chrome { height: 32px; }
.compare .url { height: 22px; }
.compare .shot-box { position: relative; }
.compare .shot { aspect-ratio: var(--shot-ratio); }
.compare .side { display: block; bottom: 10px; left: 10px; background: #1F2328; color: #FFFFFF; }
.compare .is-cand .side { left: auto; right: 10px; background: #FFFFFF; color: #1F2328; box-shadow: inset 0 0 0 1px #5E6472; }
.compare[data-mode="divider"] .stage { max-width: max(720px, calc((100svh - 350px) * 1.536)); margin-inline: auto; }
.compare[data-mode="divider"] .side { top: calc(50% - 16px); bottom: auto; transform: translateY(-50%); }
.compare[data-mode="divider"] .is-ref .side { left: auto; right: calc(100% - var(--split) + 34px); }
.compare[data-mode="divider"] .is-cand .side { right: auto; left: calc(var(--split) + 34px); }
.compare[data-mode="side"] .side { top: auto; bottom: 10px; }
.compare.is-reference-only .is-ref .side { right: auto; left: 10px; }
@container (max-width: 480px) {
  .compare .side { padding: 2px 6px; font: 600 11px/1.3 var(--font-sans); }
  .compare[data-mode="divider"] .is-ref .side { right: calc(100% - var(--split) + 26px); }
  .compare[data-mode="divider"] .is-cand .side { left: calc(var(--split) + 26px); }
  .compare[data-mode="side"] .side { bottom: 6px; left: 6px; right: auto; }
}
.compare[data-mode="side"] .stage { border: 0; border-radius: 0; overflow: visible; background: none; }
.compare[data-mode="side"] .frame { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; cursor: auto; }
.compare[data-mode="side"] .layer { position: relative; inset: auto; overflow: hidden; border: 1px solid var(--rule-2); border-radius: var(--window); clip-path: none; }
.compare[data-mode="side"] .is-cand .url { justify-content: flex-start; }
.compare[data-mode="side"] .is-cand .side { left: 10px; right: auto; }
.compare[data-mode="side"] .divider { display: none; }
.compare.is-reference-only .is-cand, .compare.is-reference-only .divider { display: none; }
.compare.is-reference-only .frame { cursor: auto; }
.compare[data-mode="all"] .stage, .compare:not([data-mode="all"]) .rebuilds { display: none; }
.rebuilds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; margin: 0; padding: 0; list-style: none; }
.rebuilds button { all: unset; display: block; width: 100%; cursor: pointer; }
.rebuilds button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius); }
.rebuild-shot { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top left; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--paper-2); transition: border-color .12s ease; }
@media (hover: hover) { .rebuilds button:hover .rebuild-shot { border-color: var(--ink-3); } }
.rebuilds .is-on .rebuild-shot { border-color: var(--sky); box-shadow: 0 0 0 2px var(--sky); }
.rebuild-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.rebuild-label .m-name { min-width: 0; gap: 7px; font-size: 13.5px; }
.rebuild-label .model-logo { width: 15px; height: 15px; }
.rebuild-label b { color: var(--ink); font: 500 13px/1.2 var(--font-mono); font-stretch: 84%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
html:has(.compare:fullscreen) { scrollbar-gutter: auto; }
.compare:fullscreen { --full-x: 64px; --full-y: 12px; display: grid; place-content: safe center; overflow: auto; padding: var(--full-y) var(--full-x); background: var(--paper); }
.compare:fullscreen .stage { width: min(calc(100vw - 2 * var(--full-x)), calc((100vh - 2 * var(--full-y) - 32px) * var(--shot-ratio))); max-width: none; }
@media (max-aspect-ratio: 1 / 1) {
  .compare:fullscreen { --full-x: 12px; --full-y: 64px; }
}
@media (max-height: 560px) {
  .compare .stage { width: min(100%, calc((100svh - 61px - 20px - 32px) * var(--shot-ratio))); margin-inline: auto; }
  #stage { width: min(100%, calc((100svh - 61px - 56px) * 1425 / 785)); margin-inline: auto; }
  .page { padding-top: 12px; }
  .page-task { padding-top: 8px; }
  .page .sec-head { margin-bottom: 8px; }
  .task-tools .board-tools { margin-bottom: 4px; }
  .compare { padding-top: 6px; }
  .demo-nav { margin-bottom: 8px; }
}

@media (max-width: 1040px) {
  .task-sheet { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "tools" "stage" "side"; }
  .task-run { margin-top: 2px; }
}
@media (max-width: 720px) {
  .task-tools .board-tools { display: flex; flex-wrap: wrap; column-gap: 14px; border-bottom: 1px solid var(--rule-2); }
  .task-tools .results-tabs { gap: 14px; border-bottom: 0; }
  #view-tabs { margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
  .run-table th, .run-table td { height: 36px; }
  .run-table .m-name { gap: 7px; font-size: 13.5px; }
  .run-table .model-logo { width: 15px; height: 15px; }
  .run-table .run-bar { width: 24%; padding-left: 8px; }
  .run-table tr > :first-child { padding-left: 12px; }
  .run-table tr > :last-child { padding-right: 12px; }
  .catalog-tools { position: static; }
  .catalog-search { flex: 1 1 100%; margin: 4px 0; padding-left: 6px; }
  .catalog-search input { width: 100%; }
  .compare[data-mode="side"] .frame { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rebuilds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .rebuild-label .m-name { font-size: 12.5px; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}

@media (max-width: 480px) {
  .run-table .run-passed { display: none; }
  .run-table .run-bar { width: 32%; padding-left: 8px; }
  .rebuild-label { gap: 4px; }
  .rebuild-label .m-name { font-size: 11.5px; gap: 4px; }
  .rebuild-label .model-logo { width: 13px; height: 13px; }
  .rebuild-label b { font-size: 12px; }
  .stage .chrome .dots { display: none; }
}
@media (max-width: 400px) {
  .run-table .m-name { gap: 5px; font-size: 13px; }
  .run-table .model-logo { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; }
}
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; }
  .topbar { position: static; }
  .topbar-actions, .toc, .board-tools, .footer, .actions, .demo { display: none !important; }
  .board-wrap { overflow: visible; }
}

/* ---------- theme, forced colours, reduced motion ---------- */
.theme-switching, .theme-switching * { transition: none !important; }
.ov .bar, .ov .bar i, .legend i { forced-color-adjust: none; }
@media (prefers-reduced-motion: reduce) {
  #tree-replay { display: none; }
}
@media print {
  *, *::before, *::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-tools { display: none !important; }
  .tree.is-armed .leaf, .tree.is-armed .cat-node, .tree.is-armed .root-node, .tree.is-armed .root-l2 { opacity: 1 !important; scale: 1 !important; translate: 0 !important; transition: none !important; }
  .tree-lines, #copy-bib { display: none !important; }
  pre.code, .code { white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; }
  .sec-head, h2, h3, h4, .finding-tag { break-after: avoid; }
  .finding-text, .case, .grp, .access-col { break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }
}

/* ---------- touch ---------- */
.tool-btn:active:not([aria-pressed="true"]), .icon-btn:active, .btn-sm:active, .dt-btn:active, .view-seg button:not([aria-selected="true"]):active { background: var(--paper-2); }
@media (pointer: coarse) {
  a.brand { display: inline-flex; align-items: center; min-height: 40px; }
  .icon-btn, .tool-btn { width: 40px; height: 40px; }
  .btn-sm { min-height: 40px; }
  .view-seg button { height: 40px; }
  .tool-menu a, .tool-menu button, .pop-seg button, .pop-list label { min-height: 40px; }
  select, .chart-sentence select { min-height: 40px; font-size: 16px; }
  .catalog-search { min-height: 40px; }
  .catalog-search input { font-size: 16px; }
  .dt-btn, .code-head .dt-btn { min-height: 40px; height: auto; }
  .board thead th button { min-height: 40px; min-width: 40px; justify-content: flex-end; }
  .footer-links { gap: 0 22px; }
  .footer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; }
  .results-tabs button { min-height: 40px; min-width: 40px; justify-content: center; }
  .link-list a, .task-step a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; }
  .task-picker-wrap { min-height: 40px; align-items: center; }
  .run-table th, .run-table td { height: 44px; }
  .link-btn, .dt-go, .notes a { padding-block: 10px; }
  .tab { min-width: 40px; }
  #compare-full { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; }
  .toc a { display: inline-flex; align-items: center; min-height: 40px; }
  .toc a.is-active::after, .toc a[aria-current="page"]::after { bottom: -10px; }
  .bug::after { content: ""; position: absolute; inset: -11px; }
}
@media (max-width: 720px) {
  .waffle-titlebar .chart-sentence-end { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; }
  .waffle-titlebar .chart-sentence-end label { flex: 1; min-width: 0; white-space: nowrap; }
  .waffle-titlebar .chart-sentence-end select { flex: 1; min-width: 0; }
}
@media (max-width: 400px) {
  .compare .side { font-size: 11px; padding-inline: 6px; }
}
