/* leaderboard.html: the ranking table on the site's dark style; a light variant for this page (OS setting or
   ?theme=light) rebinds the site's colour variables */
.web5 .lb-page { max-width: 1320px; }
.lb-ctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.lb-ctl .f { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.lb-ctl input { font-family: var(--mono); }
.lb-dl { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); text-decoration: none; }
.lb-tbl { overflow-x: auto; }
.lb-tbl table { min-width: 980px; font-size: 12.5px; }
.lb-tbl th, .lb-tbl td { padding: 6px 7px; }
.lb-tbl .tag { white-space: nowrap; }
.lb-tbl th { white-space: normal; vertical-align: bottom; cursor: help; }
.lb-tbl td { vertical-align: top; }
.lb-tbl th.c-rank, .lb-tbl td.c-rank { width: 32px; text-align: center; font-family: var(--font-display); font-size: 18px; }
.lb-tbl td.c-model, .lb-tbl th.c-model { position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 150px; }
.lb-tbl td.c-score b { font-family: var(--font-display); font-size: 17px; color: var(--accent); }
.lb-tbl tr.pending td { opacity: .75; }
.lb-q { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; border: 1px solid var(--border); font-size: 10px; color: var(--text-dim); }
.lb-stack { display: flex; width: 96px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-alt); margin-bottom: 3px; }
.lb-stack i { display: block; height: 100%; }
.lb-stack .s, .lb-key.s { background: var(--teal-bright); }
.lb-stack .e, .lb-key.e { background: var(--warn); }
.lb-stack .d, .lb-key.d { background: var(--danger-color); }
.lb-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 3px 0 8px; vertical-align: -1px; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) body.lb { --bg: #f7f6f2; --panel: #ffffff; --panel-alt: #ecebe6; --border: #d9d6cf; --text: #1d1b20; --text-dim: #5f5b66; --teal-bright: #1f8f73; }
}
html[data-theme="light"] body.lb { --bg: #f7f6f2; --panel: #ffffff; --panel-alt: #ecebe6; --border: #d9d6cf; --text: #1d1b20; --text-dim: #5f5b66; --teal-bright: #1f8f73; }
/* 2026-11-13: the paper's Table 1 layout: column-group header row and a separator row per model group */
.lb-tbl th.lb-grp { cursor: default; text-align: center; font-size: 11px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.lb-tbl tr.lb-sep td { font-style: italic; color: var(--text-dim); background: var(--panel-alt); padding: 4px 7px; }
.lb-tbl td.c-C b, .lb-tbl td.c-presence b { font-family: var(--font-display); font-size: 17px; color: var(--accent); }
/* 2026-11-13: one panel per v33 condition */
#lb-sections > .lb-table-panel { margin-top: 18px; }
.lb-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.lb-sec-head .panel-title { margin: 0; }
.lb-sec-head .lb-dl { margin-left: auto; padding: 4px 10px; font-size: 12px; }
/* 2026-11-13: per-metric charts, the prize panel and the model window */
.lb-model { background: none; border: 0; padding: 0; color: var(--teal-bright, #4fd1b0); cursor: pointer; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.lb-ext { font-size: 12px; text-decoration: none; opacity: .7; }
.lb-charts { margin-top: 12px; }
.lb-charts summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 14px; }
.lb-svg { width: 100%; height: auto; max-width: 340px; background: var(--panel-alt, #1c1c22); border-radius: 8px; }
.lb-svg .g { stroke: rgba(255,255,255,.08); }
.lb-svg .ax { fill: var(--text-dim, #a0a3ad); font: 9.5px var(--mono, monospace); }
.lb-svg .t { fill: var(--text, #eee); font: 600 11.5px var(--font-body, sans-serif); }
.lb-svg .ci { stroke: var(--text, #eee); stroke-width: 1.4; }
.lb-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; }
.lb-legend i, .lb-modal-head h2 i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.lb-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; overflow-y: auto; }
.lb-modal[hidden] { display: none; }
.lb-modal-card { position: relative; width: min(1120px, 100%); padding: 20px 22px 26px; background: #16161b; border: 1px solid var(--border, #333); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-modal-x { position: absolute; top: 14px; right: 14px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.lb-modal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-right: 80px; }
.lb-modal-head h2 { margin: 0; font-size: 22px; }
.lb-h3 { margin: 18px 0 8px; font-size: 15px; }
body.lb-noscroll { overflow: hidden; }
@media (max-width: 560px) { .lb-grid { grid-template-columns: 1fr; } .lb-modal { padding: 8px; } .lb-modal-card { padding: 14px 12px 20px; } }
/* 2026-11-13: the evaluation video in a disclosure (the player itself: vplayer.css) */
.lb-explainer { margin: 18px 0 6px; max-width: 760px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel);
  overflow: hidden; box-shadow: 0 12px 30px -20px rgba(0,0,0,.6); }
.lb-exp-toggle { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; background: transparent;
  color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.lb-exp-toggle:hover { background: var(--panel-alt); }
.lb-exp-toggle:focus-visible { outline: 2px solid #e8336d; outline-offset: -2px; border-radius: 18px; }
.lb-exp-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #e8336d, #b8235a); box-shadow: 0 6px 16px -6px rgba(232,51,109,.7); }
.lb-exp-badge svg { width: 15px; height: 15px; fill: #fff; margin-left: 2px; }
.lb-exp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-exp-text b { font-size: 15px; }
.lb-exp-text small { font-size: 12px; color: var(--text-dim); }
.lb-exp-chev { flex: none; margin-left: auto; width: 20px; height: 20px; color: var(--text-dim); transition: transform .28s ease; }
.lb-explainer.vp-closed .lb-exp-chev { transform: rotate(-90deg); }
.lb-exp-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .32s cubic-bezier(.2,.8,.2,1); }
.lb-explainer.vp-closed .lb-exp-body { grid-template-rows: 0fr; }
.lb-exp-inner { min-height: 0; overflow: hidden; padding: 0 14px 14px; }
.lb-explainer.vp-closed .lb-exp-inner { padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .lb-exp-body, .lb-exp-chev { transition: none; } }
/* 2026-11-13: the evaluation video on the left, the intro on the right (one row; video on top when narrow) */
.lb-hero-row { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-start; margin-top: 14px; }
.lb-hero-row .lb-explainer { flex: 1 1 460px; max-width: 640px; margin: 0; }
.lb-hero-row .lb-rmst { flex: 1 1 420px; min-width: 0; margin: 0; }
/* the rule agents in the same table: a quieter group under the models */
.lb-tbl tr.lb-sep-rules td { border-top: 2px solid var(--border); }
.lb-tbl tr.lb-rule td { background: color-mix(in srgb, var(--panel-alt) 45%, transparent); }
.lb-rules-note { margin-top: 8px; }
/* the RMST chart beside the video (2026-11-13) */
.lb-rmst { padding: 16px 18px 14px; border-radius: 18px; }
.lb-rmst-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.lb-rmst-head h2 { margin: 0; font-size: 17px; }
.lb-rmst-head h2 .muted { font: 600 11px var(--mono, monospace); letter-spacing: .06em; margin-left: 4px; }
.lb-rmst-head p { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); }
.lb-rmst-svg { display: block; width: 100%; height: auto; margin: 8px 0 4px; }
.lb-rmst-svg .g { stroke: var(--border); stroke-width: 1; opacity: .6; }
.lb-rmst-svg .ax { fill: var(--text-dim); font: 10.5px var(--mono, monospace); }
.lb-rmst-line { fill: none; stroke-width: 2; stroke-linejoin: round; transition: opacity .2s ease, stroke-width .2s ease; }
.lb-rmst-line.dim { opacity: .12; }
.lb-rmst-line.hl { stroke-width: 3.2; }
.lb-lg { display: grid; gap: 8px; }
.lb-lg-group { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: start; gap: 2px 8px; }
.lb-lg-items { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.lb-rmst button { min-height: 0; height: auto; line-height: 1.35; margin: 0; box-shadow: none; text-transform: none; letter-spacing: normal; font: inherit; cursor: pointer; color: var(--text); background: transparent; border: 1px solid transparent; transition: background .15s ease, opacity .2s ease, border-color .15s ease; }
.lb-rmst .lb-lg-head { flex: 0 0 auto; min-width: 116px; text-align: left; padding: 3px 8px; border-radius: 999px; font-size: 11.5px !important; font-weight: 600 !important; color: var(--text-dim) !important; }
.lb-rmst .lb-lg-head:hover { background: var(--panel-alt); color: var(--text) !important; }
.lb-rmst .lb-lg-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 12px !important; }
.lb-rmst .lb-lg-item:hover { background: var(--panel-alt); }
.lb-rmst button[aria-pressed="true"]:not(.lb-lg-all) { border-color: var(--text-dim); background: var(--panel-alt); }
.lb-rmst button.dim { opacity: .38; }
.lb-lg-sw { width: 22px; height: 8px; }
.lb-lg-sw line { stroke-width: 2.6; }
.lb-lg-c { font: 11px var(--mono, monospace); color: var(--text-dim); }
.lb-rmst .lb-lg-all { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12px !important; border-color: var(--border) !important; }
.lb-rmst .lb-lg-all[aria-pressed="true"] { background: #e8336d !important; border-color: #e8336d !important; color: #fff !important; }
.lb-rmst button:focus-visible { outline: 2px solid #e8336d; outline-offset: 1px; }
.lb-rmst-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) { .lb-rmst-line, .lb-rmst button { transition: none; } }
@media (max-width: 560px) { .lb-lg-group { grid-template-columns: 1fr; } }
/* 2026-11-21: models / people tabs; the people table opens a row to the seats of that game */
.lb-tabs { display: inline-flex; gap: 4px; margin: 6px 0 12px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.lb-tabs button { padding: 6px 18px; border: 0; border-radius: 7px; background: transparent; color: var(--text-dim); font: 600 14px var(--font-body, sans-serif); cursor: pointer; }
.lb-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.lb-hero-row[hidden], #lb-status[hidden], #lb-sections[hidden] { display: none; }
#lb-people { margin-top: 18px; }
.lb-ptbl table { min-width: 760px; }
.lb-tbl tr.lb-prow { cursor: pointer; }
.lb-tbl tr.lb-prow:hover td, .lb-tbl tr.lb-prow[aria-expanded="true"] td { background: var(--panel-alt); }
.lb-tbl tr.lb-prow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lb-tbl tr.lb-prow td.c-rank::after { content: "▸"; display: block; font-size: 10px; color: var(--text-dim); }
.lb-tbl tr.lb-prow[aria-expanded="true"] td.c-rank::after { content: "▾"; }
.lb-tbl tr.lb-pdetail > td { background: var(--panel-alt); padding: 4px 10px 12px 40px; }
.lb-pdetail-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; }
.lb-pdetail-body .lb-svg { flex: 0 1 320px; border: 1px solid rgba(255,255,255,.08); }
.lb-seats { width: auto; min-width: 0 !important; font-size: 12.5px; }
.lb-seats th { cursor: default; color: var(--text-dim); font-weight: 600; }
.lb-seats tr.me td { font-weight: 600; color: var(--accent); }
