.leaderboard-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 8px; }
.model-search { min-width: 160px; width: 200px; max-width: 100%; border: 1px solid var(--axis); background: var(--surface); padding: 8px 10px; }
.model-search::placeholder { color: var(--ink-2); }
.vendor-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1 1 500px; min-width: 0; }
.vendor-button { border: 1px solid transparent; padding: 5px 8px; color: var(--ink-2); font-size: 12px; }
.vendor-button[aria-pressed="true"] { border-color: var(--axis); color: var(--ink); background: var(--wash); }
.vendor-count { font-size: 12px; font-variant-numeric: tabular-nums; margin-left: 2px; }
.model-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.category-key { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.leaderboard-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.leaderboard-table th { position: sticky; top: 0; z-index: 2; background: var(--page); border-bottom: 1px solid var(--axis); padding: 12px 7px; text-align: left; vertical-align: bottom; font-weight: 500; }
.leaderboard-table th:first-child { width: 4%; padding-left: 0; }
.leaderboard-table th:nth-child(2) { width: 24%; }
.leaderboard-table th:nth-child(3) { width: 24%; }
.leaderboard-table th:nth-child(4) { width: 14%; }
.leaderboard-table th:nth-child(5) { width: 11%; }
.leaderboard-table th:nth-child(6) { width: 14%; }
.leaderboard-table th:nth-child(7) { width: 9%; }
.sort-button { border: 0; padding: 0; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.sort-arrow { width: 10px; height: 12px; margin-left: 3px; }
.leaderboard-table td { border-bottom: 1px solid var(--rule); height: 44px; padding: 7px; vertical-align: middle; }
.leaderboard-table td:first-child { padding-left: 0; }
.model-row { cursor: pointer; scroll-margin-top: 122px; }
.model-row:hover, .model-row:focus-within { background: var(--wash); }
.rank-cell { position: relative; font: 11px var(--mono); color: var(--muted); }
.model-name { border: 0; padding: 3px 0; font-weight: 500; text-align: left; line-height: 1.35; overflow-wrap: anywhere; }
.vendor-label { color: var(--muted); font-size: 11px; margin-left: 5px; white-space: nowrap; }
.screen-clear { margin-left: 5px; display: inline-flex; }
.status-glyph { flex: 0 0 14px; width: 14px; height: 14px; }
.status-glyph.pass { color: var(--good-ink); }
.status-glyph.fail { color: var(--critical); }
.tasks-cell { white-space: nowrap; }
.tasks-track { height: 6px; width: 100%; max-width: 132px; background: var(--grid); margin-bottom: 4px; overflow: hidden; }
.tasks-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; }
.task-count { color: var(--muted); font-size: 11px; margin-left: 5px; }
.category-bars { display: flex; align-items: end; gap: 3px; width: 69px; height: 28px; }
.category-track { display: flex; align-items: end; width: 9px; height: 28px; background: var(--grid); }
.category-fill { display: block; width: 9px; background: var(--ink-2); border-radius: 2px 2px 0 0; }
.resolution-cell { white-space: nowrap; }
.resolution-measure { display: flex; justify-content: flex-start; align-items: center; gap: 6px; }
.resolution-number { flex: 0 0 5ch; text-align: right; }
.resolution-count { font-size: 11px; white-space: nowrap; }
.ci-whisker { display: block; flex: 0 0 120px; width: 120px; height: 16px; overflow: visible; }
.ci-whisker line:not(.ci-baseline) { stroke: var(--ink-2); stroke-width: 1; }
.ci-whisker .ci-baseline { stroke: var(--grid); stroke-width: 1; }
.ci-whisker circle { fill: var(--ink); }
.unsafe-measure { display: flex; justify-content: flex-start; align-items: center; gap: 8px; }
.unsafe-number { flex: 0 0 5ch; text-align: right; }
.unsafe-track { flex: 0 0 48px; width: 48px; display: block; }
.unsafe-fill { min-width: 2px; height: 4px; display: block; background: var(--critical); border-radius: 2px; }
.cost-cell { white-space: nowrap; text-align: right; }
.leaderboard-table th:last-child { text-align: right; padding-right: 0; }
.leaderboard-table td:last-child { padding-right: 0; }
.model-row.is-selected { background: var(--wash); }
.model-row.is-selected .rank-cell { padding-left: 5px; }
.model-row.is-selected .rank-cell::before { content: ''; position: absolute; left: 0; top: calc(50% - 10px); width: 2px; height: 20px; background: var(--accent); }
.model-row.is-highlighted { background: var(--wash); }
.model-row.is-selected .model-name { text-decoration: underline; text-underline-offset: 4px; }
.model-attribution { display: contents; }
.leaderboard-table .detail-row > td { padding: 0; height: auto; }
.model-detail { padding: 24px; background: var(--surface); }
.detail-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.detail-heading h3 { margin: 0; }
.text-button { border: 0; padding: 3px 0; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; white-space: nowrap; }
.model-id { font: 10px/1.5 var(--mono); color: var(--muted); margin: 6px 0 20px; overflow-wrap: anywhere; }
.copy-status { margin: 0; font-size: 12px; }
.copy-status:empty { display: none; }
.copy-fallback { width: 100%; margin-block: 8px 16px; background: var(--page); border: 1px solid var(--axis); padding: 8px; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.model-detail h4 { font-size: 13px; font-weight: 600; margin: 24px 0 14px; }
.detail-columns > div > h4:first-child { margin-top: 0; }
.detail-bars, .outcome-legend, .screen-checks { padding: 0; margin: 0; list-style: none; }
.detail-bars li { margin-bottom: 15px; }
.detail-median-key { display: flex; align-items: center; gap: 7px; font-size: 11px; margin: -8px 0 12px; }
.field-median-key { display: inline-block; width: 1px; height: 10px; background: var(--ink); }
.bar-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; font-size: 12px; margin-bottom: 5px; }
.bar-label > span:last-child { white-space: nowrap; }
.bar-label .muted { margin-left: 8px; }
.detail-bar-visual { position: relative; }
.detail-track { height: 6px; background: var(--grid); }
.detail-fill { height: 100%; display: block; background: var(--accent); border-radius: 0 2px 2px 0; }
.field-median-tick { position: absolute; top: -2px; width: 1px; height: 10px; background: var(--ink); transform: translateX(-50%); z-index: 1; }
.outcome-bar { display: flex; gap: 2px; height: 10px; background: var(--surface); }
.outcome-bar > span { min-width: 0; }
.outcome-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 11px; }
.outcome-legend li { display: flex; align-items: center; gap: 5px; }
.outcome-legend strong { font-weight: 500; }
.legend-swatch { width: 8px; height: 8px; flex-shrink: 0; }
.detail-caption { font-size: 11px; color: var(--ink-2); margin: -6px 0 10px; }
.detail-note { font-size: 11px; margin: 10px 0 0; }
.family-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.family-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 9px var(--mono); }
.family-square { display: block; width: 100%; max-width: 25px; aspect-ratio: 1; }
.scale-key { display: flex; gap: 2px; align-items: center; justify-content: end; margin-top: 10px; font: 9px var(--mono); color: var(--ink-2); }
.scale-key > span:not(:first-child):not(:last-child) { width: 10px; height: 6px; }
.scale-key > span:first-child { margin-right: 4px; }
.scale-key > span:last-child { margin-left: 4px; }
.screen-checks { display: grid; gap: 6px; font-size: 12px; }
.screen-checks li { display: flex; gap: 8px; align-items: baseline; }
.detail-figures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 18px; font-size: 12px; border-top: 1px solid var(--rule); padding-top: 16px; margin: 24px 0 0; }
.detail-figures dt { color: var(--ink-2); }
.detail-figures dd { margin: 0; overflow-wrap: anywhere; }
.mobile-figures { display: none; }
.baselines { margin-top: 24px; font-size: 12px; }
.baselines summary { color: var(--ink-2); cursor: pointer; width: fit-content; padding: 5px 0; }
.baseline-wrap { overflow-x: auto; }
.baseline-table { width: 100%; border-collapse: collapse; margin-block: 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
.baseline-table th, .baseline-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--rule); }
.baseline-table th { font-weight: 500; }
.baseline-name, .baseline-description { display: block; }
.baseline-description { font-size: 12px; font-weight: 400; line-height: 1.45; margin-top: 2px; }
.baseline-table th:first-child, .baseline-table td:first-child { text-align: left; padding-left: 0; }
.baselines p { color: var(--ink-2); max-width: 90ch; }
.empty-row td { color: var(--ink-2); padding-block: 24px; }
@media (min-width: 760px) and (max-width: 1050px) {
  .leaderboard-table { font-size: 12px; }
  .leaderboard-table th, .leaderboard-table td { padding-inline: 4px; }
  .vendor-label { display: block; margin-left: 0; }
  .sort-button { font-size: 11px; }
  .ci-whisker { flex-basis: clamp(72px, 10vw, 104px); width: clamp(72px, 10vw, 104px); }
}
@media (max-width: 759px) {
  .category-key { display: none; }
  .desktop-col { display: none; }
  .leaderboard-table th:first-child { width: 8%; }
  .leaderboard-table th:nth-child(2) { width: 52%; }
  .leaderboard-table th:nth-child(3) { width: 40%; }
  .leaderboard-table th, .leaderboard-table td { padding-inline: 6px; }
  .ci-whisker { display: none; }
  .model-name { display: block; min-height: 32px; }
  .model-attribution { display: block; }
  .vendor-label { display: inline; margin-left: 0; }
  .tasks-track { max-width: none; }
  .detail-columns { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .model-detail { padding: 24px; }
  .detail-heading { flex-wrap: wrap; gap: 8px; }
  .mobile-figures { display: grid; margin: 0 0 24px; padding-top: 0; border: 0; }
  .family-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .model-row { scroll-margin-top: 80px; }
  .vendor-controls { flex-basis: 100%; }
  .model-search { flex: 1; }
  .model-count { margin-left: auto; }
  .baseline-table th, .baseline-table td { padding-inline: 5px; font-size: 11px; }
}
