/* ============ Leaderboard ============ */
.lb-section-switch{margin:0 0 18px}.lb-section-switch .seg{max-width:520px}
.lb-view-switch{display:flex;align-items:center;gap:12px;margin:0 0 12px}
.lb-view-switch>span{color:var(--muted);font-size:.78rem;font-weight:700}
.lb-view-switch .seg{width:auto}
.lb-controls{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;margin-bottom:14px;padding:16px 18px}
.lb-controls.is-ranking{grid-template-columns:repeat(5,minmax(135px,1fr))}
.lb-controls .field{margin:0}
.lb-legend{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:0 0 20px;padding:0 2px;color:var(--muted);font-size:.8rem}
.lb-legend>span{display:inline-flex;align-items:center;gap:6px}
.lb-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.lb-dot-split{background:#2670b8}.lb-dot-seed{background:#b44747}
.lb-result-section{margin-top:18px}
.lb-result-section+.lb-result-section{margin-top:30px;padding-top:26px;border-top:1px solid var(--line)}
.lb-table-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:10px}
.lb-table-heading h2{margin:1px 0 0;font-size:1.45rem}
.lb-kicker{color:var(--muted);font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.lb-protocol{color:var(--muted);font-size:.78rem}
.lb-table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.lb-table{width:100%;min-width:760px;border-collapse:collapse;font-size:.86rem;font-variant-numeric:tabular-nums}
.lb-table th,.lb-table td{padding:11px 12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;vertical-align:middle}
.lb-table tr>*:last-child{border-right:0}.lb-table tbody tr:last-child>*{border-bottom:0}
.lb-table thead{background:var(--surface2)}
.lb-table thead tr:first-child th{padding-top:12px;padding-bottom:8px}
.lb-table thead tr:nth-child(2) th{padding-top:7px;padding-bottom:9px;color:var(--muted);font-size:.76rem;font-weight:600}
.lb-table thead th strong{display:block;font-size:.9rem}.lb-table thead th small{display:block;margin-top:2px;color:var(--muted);font-size:.68rem;font-weight:500}
.lb-table .lb-model-col{width:175px;text-align:left}
.lb-table tbody th{text-align:left;white-space:nowrap;font-weight:600}
.lb-table tbody tr:not(.lb-baseline):hover{background:color-mix(in srgb,var(--accent) 4%,var(--surface))}
.lb-baseline{background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
.lb-baseline th strong,.lb-baseline th small{display:block}.lb-baseline th small{margin-top:2px;color:var(--muted);font-size:.68rem;font-weight:500}
.lb-baseline-scores{display:flex;justify-content:center;gap:32px;flex-wrap:wrap}
.lb-baseline-scores>span{display:flex;align-items:center;gap:10px}.lb-baseline-scores b{font-size:.74rem;color:var(--muted)}
.lb-score{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:94px}
.lb-score.is-best .lb-mean{font-weight:800;color:var(--ink)}
.lb-mean{font-weight:500}.lb-sds{display:inline-grid;gap:0;text-align:left;font-size:.65rem;line-height:1.15}
.lb-sd{display:block}.lb-split{color:#2670b8}.lb-seed{color:#b44747}
.lb-footnote{max-width:100ch;margin:16px 0 0;color:var(--muted);font-size:.78rem;line-height:1.55}
.lb-ranking-table{width:100%;border-collapse:collapse;font-size:.88rem;font-variant-numeric:tabular-nums}
.lb-ranking-table th,.lb-ranking-table td{padding:12px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.lb-ranking-table thead{background:var(--surface2);color:var(--muted);font-size:.74rem;text-transform:uppercase;letter-spacing:.04em}
.lb-ranking-table tbody tr:last-child>*{border-bottom:0}
.lb-ranking-table tbody tr:not(.lb-ranking-baseline):hover{background:color-mix(in srgb,var(--accent) 4%,var(--surface))}
.lb-ranking-table td:nth-child(3){text-align:center}.lb-ranking-table th:nth-child(2){width:34%}
.lb-rank-number{display:grid;width:28px;height:28px;place-items:center;border:1px solid var(--line);border-radius:50%;font-weight:700}
.lb-ranking-table .is-winner .lb-rank-number{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}
.lb-ranking-table .is-winner th{font-weight:800}
.lb-delta{font-weight:600}.lb-delta.is-positive{color:var(--good)}.lb-delta.is-negative{color:var(--bad)}
.lb-ranking-baseline{background:color-mix(in srgb,var(--accent) 5%,var(--surface));color:var(--muted)}
.lb-ranking-baseline th small{display:block;margin-top:2px;font-size:.68rem;font-weight:500}
[data-theme="dark"] .lb-dot-split{background:#69a9e6}[data-theme="dark"] .lb-dot-seed{background:#e08080}
[data-theme="dark"] .lb-split{color:#78b7ef}[data-theme="dark"] .lb-seed{color:#ed9696}

/* User result artifacts */
.artifact-upload{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:12px;padding:20px 22px}.artifact-upload h2{margin:3px 0 5px;font-size:1.35rem}.artifact-upload p{max-width:680px;color:var(--muted);font-size:.86rem;line-height:1.55}.artifact-upload-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end}.artifact-upload-button{position:relative;flex:0 0 auto;overflow:hidden}.artifact-upload-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.artifact-status{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 2px 14px;padding:10px 13px;border-left:3px solid var(--line);background:var(--surface2);font-size:.8rem}.artifact-status.is-ready{border-color:var(--good)}.artifact-status span{display:grid;gap:2px}.artifact-status small{color:var(--muted)}.artifact-error-message{margin:-4px 2px 14px;color:var(--bad);font-size:.82rem}
.artifact-controls{display:grid;grid-template-columns:1.25fr repeat(4,minmax(135px,1fr));gap:14px;margin-bottom:24px;padding:18px}.artifact-controls .field{margin:0}.artifact-controls .artifact-kind{grid-column:1/-1}.artifact-full{grid-column:1/-1}.artifact-chips .chip span{font-size:.78rem}
.artifact-visual{margin:26px 0 46px}.artifact-visual-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:10px}.artifact-visual-head h2{margin:2px 0 0;font-size:1.45rem}.artifact-series-legend{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin:0 0 10px;color:var(--muted);font-size:.75rem}.artifact-series-legend span{display:inline-flex;align-items:center;gap:6px}.artifact-series-legend i{width:11px;height:11px;border-radius:3px}.artifact-series-legend .artifact-imported-key{margin-left:auto}.artifact-series-legend .artifact-imported-key i{border:2px solid var(--ink);background:transparent}
.artifact-chart{display:block;width:100%;height:auto;overflow:visible;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-family:var(--f-body);font-variant-numeric:tabular-nums}.artifact-grid{stroke:var(--line);stroke-width:1}.artifact-column{stroke:var(--line);stroke-width:1;stroke-dasharray:4 5}.artifact-axis{fill:var(--muted);font-size:12px}.artifact-category{fill:var(--ink);font-size:13px;font-weight:600}.artifact-value{fill:var(--ink);font-size:11px;font-weight:600}.artifact-series-label{fill:var(--ink);font-size:12px}.artifact-panel-value{fill:var(--ink);font-size:11px}.artifact-bar{opacity:.88}.artifact-bar.is-imported,.artifact-point.is-imported{stroke:var(--ink);stroke-width:3}.artifact-error path{fill:none;stroke-width:1.5}.artifact-error-split path{stroke:#2670b8}.artifact-error-seed path{stroke:#b44747}.artifact-line{fill:none;stroke-width:3;opacity:.85}.artifact-point{stroke:var(--surface);stroke-width:2}
.series-0{fill:#157f78;background:#157f78}.series-1{fill:#274f78;background:#274f78}.series-2{fill:#79818a;background:#79818a}.series-3{fill:#9a6b2f;background:#9a6b2f}.series-4{fill:#6f5d86;background:#6f5d86}.series-5{fill:#4f7652;background:#4f7652}.series-6{fill:#9a5555;background:#9a5555}.series-7{fill:#537f8c;background:#537f8c}.series-stroke-0{stroke:#157f78}.series-stroke-1{stroke:#274f78}.series-stroke-2{stroke:#79818a}.series-stroke-3{stroke:#9a6b2f}.series-stroke-4{stroke:#6f5d86}.series-stroke-5{stroke:#4f7652}.series-stroke-6{stroke:#9a5555}.series-stroke-7{stroke:#537f8c}
.artifact-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.artifact-panel{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.artifact-panel h3{margin:0 0 9px;font-size:1rem}.artifact-panel .artifact-chart{border:0;border-radius:0}.artifact-empty{padding:28px;text-align:center}.artifact-empty h3{margin-bottom:5px}.artifact-empty p{color:var(--muted);font-size:.85rem}
[data-theme="dark"] .artifact-error-split path{stroke:#78b7ef}[data-theme="dark"] .artifact-error-seed path{stroke:#ed9696}
@media(max-width:1050px){.lb-controls.is-ranking{grid-template-columns:repeat(2,minmax(150px,1fr))}}
@media(max-width:900px){.lb-controls{grid-template-columns:repeat(2,minmax(150px,1fr))}.artifact-controls{grid-template-columns:repeat(2,minmax(150px,1fr))}.artifact-kind,.artifact-full{grid-column:1/-1}.artifact-panels{grid-template-columns:1fr}}
@media(max-width:560px){.lb-view-switch{align-items:flex-start;flex-direction:column}.lb-controls,.lb-controls.is-ranking,.artifact-controls{grid-template-columns:1fr}.lb-legend{align-items:flex-start;flex-direction:column;gap:7px}.lb-table-heading,.artifact-visual-head{align-items:flex-start;flex-direction:column;gap:3px}.lb-table{font-size:.8rem}.lb-table th,.lb-table td{padding:9px 10px}.lb-ranking-table th,.lb-ranking-table td{padding:10px}.artifact-upload{align-items:flex-start;flex-direction:column}.artifact-upload-actions{align-items:stretch;flex-direction:column;width:100%}.artifact-upload-button{width:100%;justify-content:center}.artifact-status{align-items:flex-start;flex-direction:column}.artifact-series-legend .artifact-imported-key{margin-left:0}.artifact-chart{min-width:700px}.artifact-visual{overflow-x:auto}.artifact-panel .artifact-chart{min-width:520px}}
