/* One palette for every page. Dark is the default; the choice is browser-local. */
:root{--danger:#ef8a82;--warning:#e3bb79;--on-accent:#102920;--logo-bg:#0b1219}
:root[data-theme=light]{color-scheme:light;--bg:#f7f8f4;--surface:#fff;--raised:#edf1ea;--text:#182e29;--muted:#4d6159;--faint:#60746a;--accent:#23634e;--accent-dim:#28634f;--line:#cdd8cf;--soft-line:#e1e7df;--hair:#182e2910;--hair-strong:#182e2920;--accent-wash:#23634e0b;--danger:#a13d36;--warning:#82581e;--on-accent:#fff;--point-outline:#52655c}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;color:var(--muted)}
.theme-toggle[hidden]{display:none}.theme-toggle:hover{background:var(--raised);color:var(--text)}.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5}.theme-sun{display:none}
[data-theme=light] .theme-moon{display:none}[data-theme=light] .theme-sun{display:block}
.header-actions{display:flex;align-items:center;gap:16px;margin-left:auto;flex-shrink:0}
@media(max-width:600px){.header-actions{gap:10px}.header-account{gap:12px}.theme-toggle{flex-basis:32px;width:32px;height:32px}}
@media(max-width:370px){.site-header{padding-inline:12px}.brand{font-size:14px;gap:6px}.brand img{width:25px;height:25px}.header-actions{gap:8px}.header-account{gap:8px;min-width:0}.header-account .signup-link{padding:7px 8px}}
/* Legacy decorative surfaces use the shared palette in light mode too. */
[data-theme=light] body{background:radial-gradient(ellipse 1000px 440px at 12% 0,#dcebe466,transparent),var(--bg)}
[data-theme=light] .site-header{background:#f7f8f4ef;border-color:var(--line)}
[data-theme=light] .brand img{filter:brightness(.38) saturate(.8)}
[data-theme=light] :is(.brand strong,.lab-label strong,.forecast-cell strong,.analytics-summary strong,.latest-intro h2,.release-day-label,.about .lead,.about h2,.personal-top h1,.account-main h1,.analytics-context strong,.heat-heading strong,.loading-label){color:var(--text)}
[data-theme=light] :is(.workspace-eyebrow,.count,.lab-label small,.forecast-link,.analytics-summary span,.data-table th,.model-description,.chart-tooltip>div>span,.heat-heading span,.forecast-label,.forecast-window,.forecast-table td,.forecast-table th,.forecast-table .forecast-validation,.market-jump,.market-jump span,.note-summary,.note-body,#suggest-status:not(:empty),#workspace-status:not(:empty),.example-note p,.gaps){color:var(--muted)}
[data-theme=light] :is(.analytics-context>a,.forecast-primary>strong,.forecast-table .forecast-estimate button,.forecast-estimate button span,.forecast-asof,.forecast-market-evidence a,.mp-sources a){color:var(--accent)}
[data-theme=light] :is(.search,.select-wrap select,.chart-periods,.value-controls select,.value-controls input,.release-views,.spec,.model-picker [role=listbox],.pulse-tile,.pulse-more,.note-figure){background:var(--surface);border-color:var(--line)}
[data-theme=light] :is(.timeline-head,.lab-label,.forecast-head,.forecast-cell,.timeline-status,.data-table th,.loading-surface){background:var(--raised);border-color:var(--line);color:var(--muted)}
[data-theme=light] :is(.timeline-head.now,.add-compare.selected,.badge.open,.compare-tray,.toast,.back-top){background:#e0eee3;border-color:#a5bdae;color:var(--text)}
[data-theme=light] :is(.count,.lab-chip.active,.chart-periods button[aria-pressed=true],.release-views a[aria-current],.model-color-controls button[aria-pressed=true]){background:var(--accent-wash);border-color:var(--line)}
[data-theme=light] :is(.panel,#releases-by-lab,#capability-price,#frontier-tenure,.ow-summary,.analytics-context,.analytics-secondary,.standing,footer){background:transparent;border-color:var(--line)}
[data-theme=light] :is(.lb-card,.market-contract,.personal-page .index-preview,.analytics-summary){background:linear-gradient(140deg,#eaf1e9,var(--surface));border-color:var(--line)}
[data-theme=light] :is(dialog,.personal-page dialog){background:var(--surface);border-color:var(--line);box-shadow:0 24px 90px #182e2926}
[data-theme=light] :is(.lb-card:hover,.pulse-tile:hover,.back-top:hover,.data-table tr:hover td){background:var(--raised)}
[data-theme=light] :is(.signup-link,.button.primary){background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
[data-theme=light] :is(.header-account .signup-link:hover,.button.primary:hover){background:#184e3c;color:#fff}
[data-theme=light] :is(.account-link,.standing,.spec-grid,.model-picker [role=listbox]){border-color:var(--line)}
[data-theme=light] .lab-mark{background:var(--logo-bg);border-radius:50%;padding:3px;box-sizing:content-box}
[data-theme=light] .chart .projection-label{fill:#765396}
[data-theme=light] .chart-hit:focus-visible>rect:first-child{stroke:var(--text)}
[data-theme=light] .chart-tooltip{background:var(--surface);border-color:var(--line);box-shadow:0 8px 28px #182e2920}
[data-theme=light] .heat-cell{border-color:var(--line)}
[data-theme=light] :is(.cadence-track,.probability-track,.score-track,.lb-bar,.timeline-hbar:before){background:var(--soft-line)}
[data-theme=light] .forecast-section{background:var(--raised)}
[data-theme=light] :is(.note-draft,.market-outage,.sync.stale,.example-note .eyebrow){color:var(--warning)}
[data-theme=light] .stale{color:var(--warning)!important}
[data-theme=light] .danger{color:var(--danger)!important}
[data-theme=light] :is(.delta em.down,.radar-row>em.down,#account-status.error){color:var(--danger)}
[data-theme=light] :is(.delta em.up,.radar-row>em.up,#account-status){color:var(--accent)}
[data-theme=light] .toggle input:focus-visible+span{outline-color:var(--accent)}
[data-theme=light] :is(.key-prev,.lane-prev){border-color:var(--muted)}
[data-theme=light] :is(.radar-prev,.radar-prev-dot,.value-map circle.prev){stroke:var(--muted)}
[data-theme=light] .key-median{border-color:var(--faint)}
[data-theme=light] ::selection{background:#b8dec8;color:#182e29}

[data-theme=light] .chart :is(.intelligence-frontier,.value-frontier){stroke:var(--accent)}
@media(max-width:1000px){.header-actions{grid-row:1;grid-column:2}}
@media(max-width:600px){.site-header nav{overflow-x:auto;overflow-y:hidden;justify-content:flex-start;gap:16px}}
@media(max-width:370px){.brand span{display:inline}}
.chart-tooltip{max-width:min(440px,calc(100vw - 16px))}.chart-tooltip b{min-width:0;overflow-wrap:anywhere;text-align:right}
[data-theme=light] .chart-tooltip :is(strong,b){color:var(--text)}

/* Light charts use ink colors, not the pastels intended for a dark canvas.
   Renderers reference these tokens with their original dark color as fallback,
   so changing themes doesn't reset filters, the viewport, or an open tooltip. */
:root[data-theme=light]{
 --faint:#566b60;--line:#c5d0c7;--soft-line:#d9e1da;--control-line:#82958a;--plot-grid:#c5d0c7;
 --lab-openai:#34454f;--lab-anthropic:#9e411e;--lab-google:#205fbb;
 --lab-meta:#4c51b8;--lab-xai:#596c80;--lab-deepseek:#086a9f;
 --lab-mistral:#8a5905;--lab-alibaba:#7042ae;--lab-moonshotai:#9e3b83;
 --lab-zhipuai:#087567;--lab-nvidia:#50731e;
 --cap-code:#285b9c;--cap-writing:#8a427e;--cap-reading:#4d6a26;--cap-reasoning:#7b5b20;
 --cap-math:#176e70;--cap-science:#3c598d;--cap-vision:#94502b;--cap-computer:#684599;
 --series-main:#23634e;--series-projection:#7541a6;--series-muted:#526878;
 --series-purple:#7541a6;--series-orange:#a04a13;--series-blue:#3e58b0;
 --series-weekend:#647284;--series-context-high:#9474b9;--series-context-median:#331951;
 --series-track:#d9e1da;--scatter-opacity:1;
 --category-819292:#566768;--category-a4dfb0:#286735;--category-7ab9ef:#1d649c;
 --category-edb36f:#8d570c;--category-c7a5e9:#71429b;--category-df8f9e:#a13351;
 --category-86baff:#235fba;--category-f39c8b:#ac3f2a;--category-c6adf6:#7345ad;
 --category-e8c778:#80600b;--category-86d4c3:#116f60;--category-b5d688:#516f1d;
 --category-dda3ce:#933f7d;--category-d5b58c:#86602e;--category-b2c6b7:#526b59;
 --category-d4c6ac:#756344;--category-a8c6be:#38695c;--category-9dd8b9:#266c48;
 --category-9aaff4:#3e55a8;--category-a8b8c6:#526878;
}

/* Give plotted evidence a visible edge. Grid lines stay quieter than data. */
[data-theme=light] .chart :is(.gridline,.year-line),
[data-theme=light] :is(.value-map .grid,.radar-ring,.radar-spoke,.bench-chart .grid){stroke:var(--plot-grid)}
[data-theme=light] .chart .data-point{fill:var(--series-main);opacity:1;stroke:var(--bg);stroke-width:1}
[data-theme=light] .chart .value-point{opacity:1}
[data-theme=light] .chart .release-stack{opacity:.85;stroke:var(--bg);stroke-width:.5}
[data-theme=light] .chart .pace-fit{stroke-opacity:1;stroke-width:2}
[data-theme=light] .chart .pace-trend{paint-order:stroke;filter:drop-shadow(0 1px 0 var(--bg))}
[data-theme=light] .chart .pace-focus{opacity:0}
[data-theme=light] .chart-hit:is(:hover,:focus) .pace-focus{opacity:1}
[data-theme=light] .hover-rule{stroke:var(--muted)}
[data-theme=light] .frontier-period>rect:first-child{fill-opacity:1}
[data-theme=light] .frontier-span-label{fill:#fff;paint-order:normal;stroke:none}
[data-theme=light] .chart-legend button:hover{color:var(--text)}
[data-theme=light] :is(.lab-dot,.pill-dot){outline:none}
[data-theme=light] .bench-chart .data-point{opacity:1}
[data-theme=light] .bench-chart .chart .whisker{stroke:var(--muted);stroke-width:1.25;opacity:.85}
[data-theme=light] .bench-chart > svg .pt.dominated .whisker{stroke:var(--faint)}
[data-theme=light] .evalgraph .area{fill:var(--accent);opacity:.12}
[data-theme=light] .evalgraph .bl{fill:var(--danger)}
[data-theme=light] .evalgraph .mi{fill:var(--warning)}
[data-theme=light] .mv:hover{background:var(--raised)}
[data-theme=light] .mv.current{background:#dcebe2;box-shadow:inset 3px 0 var(--accent)}
[data-theme=light] .tier-dot.l1{background:#e3eee7}
[data-theme=light] .tier-dot.l2{background:#b6d4c2}
[data-theme=light] .tier-dot.l3{background:#467c5d;color:#fff;border-color:#467c5d}
[data-theme=light] .tier-dot.l4{background:#235537;color:#fff;border-color:#235537}
[data-theme=light] .puzzle-grid td.ok{background:#2a7b54;border-color:#2a7b54}

/* Model profiles: field, median, predecessor and selected model remain distinct. */
[data-theme=light] .radar-median{stroke:var(--faint);opacity:1}
[data-theme=light] .radar-prev{fill:#5268780c}
[data-theme=light] .radar-me{fill:color-mix(in srgb,var(--lab) 12%,transparent);filter:none}
[data-theme=light] :is(.key-rug,.lane-rug i){background:#697c8b;opacity:.75}
[data-theme=light] .lane-median{border-color:var(--faint)}
[data-theme=light] .lane-me{box-shadow:0 0 0 3px var(--bg)}
[data-theme=light] .value-map circle{fill:#657b8e;opacity:1}
[data-theme=light] .value-map circle.better{fill:var(--accent)}
[data-theme=light] .value-map circle.prev{fill:var(--bg)}
[data-theme=light] .value-map circle.me{fill:var(--lab)}
[data-theme=light] :is(.chain-node.me,.rhythm-track i.me){box-shadow:none}
[data-theme=light] .chain-node.me small{color:var(--muted)}
[data-theme=light] .board-bar span{background:var(--lab)}
[data-theme=light] .compare-line .baseline-bar .score-fill,
[data-theme=light] .legend .baseline-dot{background:#496a91}
[data-theme=light] .projection-track>span{opacity:1}
[data-theme=light] .projection-track>b{color:var(--text)}

/* Keep controls and their selected/hover states visible on white surfaces. */
[data-theme=light] :is(input:not([type=checkbox]):not([type=range]),textarea,select,.search,.button,.icon-button,.plot-buttons button,.chart-download,.model-color-controls button,.value-controls select,.chart-periods,.release-views,.picker-control,.cap-check,.value-tabs button,.bench-search input){border-color:var(--control-line)}
[data-theme=light] :is(.capability.selected,.starting-examples [aria-current=true]){border-color:var(--cap,var(--accent));background:color-mix(in srgb,var(--cap,var(--accent)) 5%,var(--surface))}
[data-theme=light] :is(.chart-periods button[aria-pressed=true],.model-color-controls button[aria-pressed=true],.release-views a[aria-current],.value-tabs button[aria-selected=true]){background:#dcebe2;color:var(--accent);box-shadow:inset 0 -2px var(--accent)}
[data-theme=light] :is(.lab-chip:hover,.launch-row:hover,.lb-row.linked:hover,.standing-peer.linked:hover){background:var(--raised);color:var(--text)}
[data-theme=light] :is(.guide-delay,.note-draft){color:var(--warning)}
[data-theme=light] .heat-cell{background:color-mix(in srgb,var(--lab) calc(var(--intensity) * .4),var(--surface));color:var(--text)}
[data-theme=light] .heat-cell:is(:hover,:focus-visible){border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}
