:root { color-scheme: light; box-sizing: border-box; padding-top: env(safe-area-inset-top,0px); padding-bottom: env(safe-area-inset-bottom,0px); }
html { scroll-padding-top: env(safe-area-inset-top,0px); }
body { margin: 0; padding: 0; }
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }

/* Layout: the leaderboard's model-rollouts page. Header, overall strip, then a two-pane task browser
   (searchable list | clip grid) with a lightbox player. */
:root {
  --bg: #f8f9fa; --surface: #ffffff; --surface-2: #f1f3f4; --text: #202124; --muted: #5f6368; --soft: #80868b;
  --line: #2022241f; --accent: #3b78e7; --accent-soft: #e8f0fe; --ok: #1e8e3e; --ok-soft: #e6f4ea; --bad: #d93025;
  --bad-soft: #fce8e6; --shade: #20222414; --stage: #0b0d12;
  --gen: #3b78e7; --mem: #188038; --prec: #c5221f; --lh: #8430ce; --open: #b06000;
  --ui: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111316; --surface: #1a1d21; --surface-2: #22262b; --text: #e8eaed; --muted: #a5abb3; --soft: #868c94;
  --line: #e8eaed24; --accent: #7aa7f7; --accent-soft: #1e2a40; --ok: #5bb974; --ok-soft: #173322; --bad: #f28b82;
  --bad-soft: #3a1d1b; --shade: #00000066; --stage: #000000;
  --gen: #7aa7f7; --mem: #5bb974; --prec: #f28b82; --lh: #c58af9; --open: #fcad70; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #111316; --surface: #1a1d21; --surface-2: #22262b; --text: #e8eaed; --muted: #a5abb3; --soft: #868c94;
  --line: #e8eaed24; --accent: #7aa7f7; --accent-soft: #1e2a40; --ok: #5bb974; --ok-soft: #173322; --bad: #f28b82;
  --bad-soft: #3a1d1b; --shade: #00000066; --stage: #000000;
  --gen: #7aa7f7; --mem: #5bb974; --prec: #f28b82; --lh: #c58af9; --open: #fcad70; color-scheme: dark; }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--ui); }
.shell { max-width: 1320px; margin: 0 auto; padding-block: 36px 80px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 22px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2 { margin: 0; text-wrap: balance; }
.head { display: flex; align-items: center; gap: 18px; }
.kicker { margin: 0 0 4px; color: var(--accent); font: 700 12px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
h1 { font: 700 clamp(28px, 4.2vw, 40px)/1.08 var(--ui); letter-spacing: -.015em; }
.sub { margin: 8px 0 0; color: var(--muted); }
.sub i { font-style: normal; margin: 0 .45em; color: var(--soft); }
.overall { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(0, 1fr)); border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); overflow: hidden; }
.overall > div { padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; border-left: 1px solid var(--line); }
.overall > div:first-child { border-left: 0; background: var(--accent-soft); }
.lab { color: var(--soft); font: 650 11px/1.2 var(--ui); letter-spacing: .05em; text-transform: uppercase; }
.big { font: 700 30px/1.05 var(--mono); color: var(--accent); letter-spacing: -.02em; }
.big small, .dim-v small { font-size: .55em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.dim-name { font: 700 11px/1.2 var(--ui); letter-spacing: .05em; text-transform: uppercase; }
.dim-v { font: 700 20px/1.1 var(--mono); }
.d-generalization { color: var(--gen); } .d-memory { color: var(--mem); } .d-precision { color: var(--prec); }
.d-long-horizon { color: var(--lh); } .d-open { color: var(--open); }
@media (max-width: 900px) { .overall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overall > div:first-child { grid-column: 1 / -1; } .overall > div { border-left: 0; border-top: 1px solid var(--line); }
  .overall > div:first-child { border-top: 0; } }
.browser { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.pane { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100vh - 24px); min-height: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.search { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); color: var(--soft); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--text); }
.search input { width: 100%; min-width: 0; height: 38px; border: 0; outline: none; background: transparent; color: var(--text);
  font: 500 13px var(--ui); }
.search input::placeholder { color: var(--soft); }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line);
  border-radius: 5px; background: var(--surface); color: var(--soft); font: 600 11px var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font: 650 11px/1 var(--ui); letter-spacing: .03em; cursor: pointer; }
.chip:hover { border-color: currentColor; }
.chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chip.on { border-color: currentColor; background: var(--surface-2); }
.chip[data-d="all"].on { color: var(--accent); }
.count { margin: 0; color: var(--muted); font: 600 11px var(--mono); }
.list { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: auto; }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.row:hover { background: var(--surface-2); }
.row.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name { font: 650 13px/1.3 var(--ui); overflow-wrap: anywhere; }
.row.on .row-name, .row.on .row-score { color: var(--accent); }
.row-dim { font: 500 10px var(--mono); }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.row-score { font: 650 10px var(--mono); white-space: nowrap; }
.row-count { color: var(--muted); font: 600 10px var(--mono); white-space: nowrap; }
.detail { min-width: 0; }
.dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); }
.dtitle { min-width: 0; }
.dtitle h2 { font: 700 clamp(20px, 2.8vw, 26px)/1.15 var(--ui); letter-spacing: -.015em; overflow-wrap: anywhere; }
.dmeta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.dinstr { margin: 6px 0 0; color: var(--soft); font: 500 12px/1.5 var(--mono); max-width: 80ch; }
.dscore { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; margin: 0; text-align: right; }
.dscore .v { font: 700 clamp(15px, 2vw, 18px) var(--mono); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.thumb { display: flex; flex-direction: column; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: inherit; text-align: left; cursor: pointer; overflow: hidden; font: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.thumb:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 8px 24px var(--shade); }
.thumb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.media { position: relative; display: block; aspect-ratio: 2 / 1; background: var(--stage); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: 100%; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--stage) 55%, transparent);
  display: grid; place-items: center; }
.play svg { width: 18px; height: 18px; fill: #ffffff; margin-left: 3px; }
.label { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; font: 600 12px var(--mono); }
.tag { padding: 2px 8px; border-radius: 999px; font: 700 11px var(--ui); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.bad { background: var(--bad-soft); color: var(--bad); }
.empty { margin: 0; padding: 28px 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .browser { grid-template-columns: minmax(0, 1fr); } .pane { position: static; max-height: 46vh; }
  .grid { grid-template-columns: minmax(0, 1fr); } }
dialog { width: min(1080px, calc(100vw - 32px)); max-width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); }
dialog::backdrop { background: color-mix(in srgb, var(--stage) 70%, transparent); }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.lb-title { font: 700 15px var(--ui); overflow-wrap: anywhere; }
.lb-title span { color: var(--muted); font: 600 12px var(--mono); margin-left: 8px; }
.lb-video { width: 100%; max-width: 100%; aspect-ratio: 2 / 1; display: block; background: var(--stage); }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.btn { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text);
  font: 600 13px var(--ui); cursor: pointer; }
.btn:hover, .btn:focus-visible { border-color: var(--accent); outline: none; }
.btn:disabled { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .thumb { transition: none; } .thumb:hover { transform: none; } }
