/* Weir: live TSBench-Forge leaderboard. Built on the V2 landing palette
   (cascade-v2.css): ground #141B17, cream #E8E1D3, coral #EE6254 for ours,
   sand #B3A68C for labels. Single dark theme, like the rest of the site. */
:root {
  --ground: #141B17;
  --panel: #18211C;
  --cream: #E8E1D3;
  --cream-80: rgba(232,225,211,0.8);
  --cream-62: rgba(232,225,211,0.62);
  --rule: rgba(232,225,211,0.4);
  --rule-soft: rgba(232,225,211,0.14);
  --coral: #EE6254;
  --sand: #B3A68C;
  --moss: #4B6152;
  --good: #8FC79A;
  --gutter: clamp(18px, 5vw, 92px);
}

.w-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(18px, 3vw, 28px) var(--gutter); font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.w-brand { display: flex; align-items: center; gap: 14px; min-width: 0; text-transform: none; letter-spacing: normal; }
.w-brand img { width: 40px; height: 40px; object-fit: contain; }
.w-brand span { font-family: Fraunces, serif; font-variation-settings: 'SOFT' 30, 'WONK' 1, 'opsz' 72; font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.03em; line-height: 1; }

.w-main { max-width: 1560px; margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 8vw, 120px); }

.w-eyebrow, .w-label { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--coral); }
.w-label { color: var(--sand); font-size: 11.5px; }

.w-head { display: flex; flex-direction: column; gap: 16px; padding: clamp(48px, 8vw, 120px) 0 clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--rule); }
.w-head h1 { margin: 0; display: flex; align-items: center; gap: 0.28em; font-family: 'Manrope', system-ui, sans-serif; font-weight: 800; font-size: clamp(56px, 9vw, 144px); letter-spacing: -0.045em; line-height: 1; }
.w-mark { flex: none; display: block; width: 0.78em; height: 0.78em; border: 1px solid rgba(232,225,211,0.22); background: var(--ground); overflow: hidden; }
.w-mark img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.w-lede { margin: 0; max-width: none; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--cream-80); text-wrap: pretty; }
.w-lede a { color: var(--cream); border-bottom: 1px solid var(--rule); }
.w-lede a:hover { color: var(--coral); border-color: var(--coral); }
.w-lede strong { color: var(--cream); font-weight: 700; }

.w-status { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; letter-spacing: 0.08em; color: var(--cream-80); border: 1px solid var(--rule-soft); padding: 8px 12px; }
.w-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); flex: none; }
.w-status[data-state="live"] .w-dot { background: var(--good); box-shadow: 0 0 0 0 rgba(143,199,154,0.5); animation: w-pulse 2.4s ease-out infinite; }
.w-status[data-state="error"] .w-dot { background: var(--coral); }
@keyframes w-pulse { 0% { box-shadow: 0 0 0 0 rgba(143,199,154,0.45); } 70% { box-shadow: 0 0 0 8px rgba(143,199,154,0); } 100% { box-shadow: 0 0 0 0 rgba(143,199,154,0); } }

.w-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; border-bottom: 1px solid var(--rule); }
.w-kpis[hidden] { display: none; }
.w-kpi { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2.4vw, 36px); border-right: 1px solid var(--rule-soft); min-width: 0; }
.w-kpi:first-child { padding-left: 0; }
.w-kpi:last-child { border-right: 0; }
.w-kpi strong { font-weight: 800; font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.w-kpi strong.w-kpi-name { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }
.w-kpi small { font-size: 14px; color: var(--cream-62); line-height: 1.4; }

.w-section { padding: clamp(48px, 6vw, 96px) 0 0; }
.w-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.w-section-head > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.w-section h2 { margin: 0; font-weight: 800; font-size: clamp(26px, 2.8vw, 44px); letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
.w-section h3 { margin: 0 0 14px; font-family: 'IBM Plex Mono', monospace; font-weight: 400; font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); }
.w-note { margin: 16px 0 0; max-width: 72ch; font-size: 15px; line-height: 1.6; color: var(--cream-62); text-wrap: pretty; }

.w-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.w-select { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 0 0 12px; border: 1px solid var(--rule); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); }
.w-select select { min-height: 42px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule-soft); background: var(--ground); color: var(--cream); font: inherit; letter-spacing: 0.04em; text-transform: none; cursor: pointer; }
.w-seg { display: inline-flex; border: 1px solid var(--rule); }
.w-seg button { min-height: 44px; min-width: 64px; padding: 0 14px; border: 0; background: transparent; color: var(--cream-80); font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; letter-spacing: 0.14em; cursor: pointer; }
.w-seg button + button { border-left: 1px solid var(--rule-soft); }
.w-seg button[aria-pressed="true"] { background: var(--cream); color: var(--ground); }
.w-seg button:hover:not([aria-pressed="true"]) { color: var(--coral); }

.w-table-wrap { margin-top: 8px; overflow-x: auto; }
.w-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.w-table th { padding: 14px 12px 10px 0; text-align: left; font-family: 'IBM Plex Mono', monospace; font-weight: 400; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
.w-table th button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; min-height: 32px; }
.w-table th button:hover { color: var(--coral); }
.w-table th[data-active="true"] { color: var(--cream); }
.w-table th[data-active="true"] button { border-bottom: 1px solid var(--coral); }
.w-table td.dim { color: var(--cream-62); font-size: 14px; white-space: nowrap; }
.w-table td { white-space: nowrap; }
.w-table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule-soft); font-size: 16px; vertical-align: middle; }
.w-table .num { text-align: right; padding-right: 20px; }
.w-table td.num { font-family: 'IBM Plex Mono', monospace; font-size: 15px; }
.w-table td.name { font-weight: 700; letter-spacing: -0.01em; }
.w-table td.metric-cell { position: relative; }
.w-bar { display: block; height: 3px; margin-top: 6px; margin-left: auto; background: var(--moss); }
.w-chip { display: inline-block; padding: 2px 7px; border: 1px solid var(--rule-soft); font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-62); white-space: nowrap; }
.w-chip[data-kind="reference"] { color: var(--sand); border-color: rgba(179,166,140,0.5); }
.w-sig { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--good); vertical-align: middle; }
.w-empty td { color: var(--cream-62); text-align: center; padding: 32px 0; }

.w-chart { margin: 24px 0 0; width: 100%; min-height: 220px; }
.w-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.w-chart .axis text, .w-chart .lbl { font-family: 'IBM Plex Mono', monospace; font-size: 11px; fill: var(--cream-62); letter-spacing: 0.04em; }
.w-chart .grid line { stroke: var(--rule-soft); }
.w-chart .zero { stroke: var(--rule); }
.w-chart .break line { stroke: var(--sand); stroke-dasharray: 3 4; }
.w-chart .break text { fill: var(--sand); }
.w-chart .bar-up { fill: var(--coral); }
.w-chart .bar-down { fill: var(--moss); }
.w-chart .line { fill: none; stroke-width: 1.75; stroke-linejoin: round; transition: opacity 160ms ease; }
.w-chart .line.dim { opacity: 0.18; }
.w-chart .line.hl { stroke-width: 3; }

.w-legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.w-legend button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--rule-soft); background: transparent; color: var(--cream-80); font: 13px 'Manrope', sans-serif; cursor: pointer; }
.w-legend button:hover, .w-legend button[aria-pressed="true"] { border-color: var(--cream); color: var(--cream); }
.w-legend i { width: 16px; height: 4px; }

.w-mix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px clamp(24px, 4vw, 72px); margin-top: 24px; }
.w-bars { display: flex; flex-direction: column; gap: 8px; }
.w-barrow { display: grid; grid-template-columns: minmax(96px, 140px) minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: 14px; }
.w-barrow span:first-child { color: var(--cream-80); }
.w-barrow .track { height: 8px; background: var(--rule-soft); }
.w-barrow .fill { display: block; height: 100%; background: var(--moss); }
.w-barrow span:last-child { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--cream-62); text-align: right; font-variant-numeric: tabular-nums; }

.w-method { border-top: 1px solid var(--rule); margin-top: clamp(48px, 6vw, 96px); }
.w-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px clamp(24px, 3vw, 48px); margin-top: 24px; }
.w-method-grid p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--cream-80); }
.w-method-grid strong { display: block; margin-bottom: 4px; color: var(--cream); }
.w-method-grid a { border-bottom: 1px solid var(--rule); }
.w-method-grid a:hover { border-color: var(--coral); }

.w-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; max-width: 1560px; margin: 0 auto; padding: 32px var(--gutter) 40px; border-top: 1px solid var(--rule); font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.w-foot .w-brand img { width: 32px; height: 32px; }
.w-foot .w-brand span { font-size: 28px; }
.w-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.w-foot a[aria-current="page"] { color: var(--coral); }

@media (max-width: 640px) {
  .w-kpi { border-right: 0; border-bottom: 1px solid var(--rule-soft); padding-left: 0; padding-right: 0; }
  .w-kpi:last-child { border-bottom: 0; }
  .w-barrow { grid-template-columns: 96px minmax(0, 1fr) 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .w-status[data-state="live"] .w-dot { animation: none; }
  .w-chart .line { transition: none; }
}

/* Keep the model name in view while the wide table scrolls sideways. */
.w-table th:nth-child(2), .w-table td:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--ground); box-shadow: 1px 0 0 var(--rule-soft); }

/* Over-time chart: multi-select legend with each model's latest value. */
.w-legend-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 16px; }
.w-legend-row .w-legend { margin-top: 0; }
.w-legend-v { margin-left: 4px; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--cream-62); font-variant-numeric: tabular-nums; }
.w-legend button[aria-pressed="true"] { background: rgba(232,225,211,0.08); }
.w-clear { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); background: transparent; color: var(--cream-80); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.w-clear:hover { color: var(--coral); border-color: var(--coral); }
.w-clear[hidden] { display: none; }
.w-chart circle.dim { opacity: 0.18; }

/* Direction cues: which way is good, for every score and rank. */
.w-direction { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.06em; color: var(--cream-80); }
.w-direction b { color: var(--coral); font-weight: 500; margin-right: 4px; }
.w-dir { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px dashed var(--rule); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--cream); white-space: nowrap; }

.w-eyebrow-link { color: inherit; border-bottom: 1px solid rgba(238,98,84,0.5); }
.w-eyebrow-link:hover { color: var(--cream); border-color: var(--cream); }
