:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --surface-2: #f8f9fb;
  --line: #e3e7ed;
  --line-strong: #cfd6df;
  --text: #172033;
  --muted: #627087;
  --quiet: #8590a2;
  --blue: #2463eb;
  --blue-soft: #eef4ff;
  --orange: #c76821;
  --orange-soft: #fff4e8;
  --green: #167457;
  --green-soft: #eaf7f2;
  --shadow: 0 4px 16px rgba(25, 38, 63, .05);
  --radius: 10px;
  --max: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
body.drawer-open { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #fff; background: #1f55c9; font-size: 14px; font-weight: 800; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.header-nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
.header-nav a { color: var(--text); font-weight: 650; text-decoration: none; }
.header-nav a:hover { color: var(--blue); }

main, footer { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.overview { display: flex; justify-content: space-between; gap: 32px; align-items: end; padding: 28px 2px 18px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -.035em; font-weight: 760; }
.overview-copy > p:last-child { max-width: 680px; margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.overview-stats { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.stat { min-width: 112px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stat strong { display: block; font-size: 20px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 9px 12px; color: #65552e; background: #fffbeb; border: 1px solid #efe3b2; border-radius: 8px; font-size: 11px; }
.notice strong { flex: 0 0 auto; color: #7a641e; }

.app-shell { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { min-height: 46px; padding: 0 14px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 650; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.filters { display: grid; grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(120px, .43fr)) auto auto; gap: 8px; align-items: end; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.filters label:not(.check-field) > span, .compare-controls label:not(.check-field) > span { display: block; margin-bottom: 4px; color: var(--quiet); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
input[type="search"], select { width: 100%; height: 34px; padding: 0 9px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; outline: none; font-size: 12px; }
input[type="search"]:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,99,235,.1); }
.check-field { display: flex; min-height: 34px; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.check-field input { accent-color: var(--blue); }
.topic-bar { min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 6px 14px; overflow-x: auto; background: #fbfcfe; border-bottom: 1px solid var(--line); }
.topic-label { flex: 0 0 auto; color: var(--quiet); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.topic-list { display: flex; gap: 6px; min-width: max-content; }
.topic-list button { height: 29px; padding: 0 10px; color: #40536e; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.topic-list button:hover { color: var(--blue); border-color: #aac7ef; }
.topic-list button.active { color: #174da8; background: var(--blue-soft); border-color: #9dbcf1; box-shadow: inset 0 0 0 1px rgba(36,99,235,.08); }
.export-button { height: 34px; padding: 0 13px; color: #fff; background: var(--blue); border: 0; border-radius: 6px; font-size: 12px; font-weight: 700; }
.export-button:hover { background: #184fc9; }
.collection-strip { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 14px; color: #40536e; background: #f4f8ff; border-bottom: 1px solid #cfddf2; font-size: 10px; }
.collection-strip > div { display: flex; align-items: baseline; gap: 9px; }
.collection-strip strong { flex: 0 0 auto; color: #174da8; font-size: 11px; }
.collection-strip button { flex: 0 0 auto; padding: 4px 8px; color: var(--blue); background: transparent; border: 1px solid #b8cff2; border-radius: 5px; font-size: 10px; }

.leaderboard-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 690px; }
.bench-sidebar { max-height: 808px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface-2); scrollbar-width: thin; }
.sidebar-heading { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 13px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-heading strong { color: var(--quiet); font-variant-numeric: tabular-nums; }
.sidebar-heading b { color: var(--text); }
.bench-group-title { padding: 14px 13px 5px; color: var(--quiet); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.bench-nav-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 12px; color: var(--muted); background: transparent; border: 0; border-left: 3px solid transparent; text-align: left; font-size: 11px; }
.bench-nav-copy { min-width: 0; display: grid; }
.bench-nav-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-nav-copy em { margin-top: 2px; overflow: hidden; color: var(--quiet); font-size: 8px; font-style: normal; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.bench-nav-item small { color: var(--quiet); font-size: 9px; font-variant-numeric: tabular-nums; }
.bench-nav-item:hover { color: var(--text); background: #eef3f9; }
.bench-nav-item.active { color: var(--blue); background: var(--blue-soft); border-left-color: var(--blue); font-weight: 700; }
.leaderboard-main { min-width: 0; }
.leaderboard-heading { min-height: 88px; display: flex; justify-content: space-between; gap: 24px; align-items: start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.leaderboard-heading h2, .section-head h2 { margin: 0; font-size: 21px; line-height: 1.1; letter-spacing: -.025em; }
.leaderboard-heading p, .section-head > p { max-width: 660px; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.leaderboard-title { min-width: 0; flex: 1 1 620px; }
.benchmark-variants { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.benchmark-variant { min-height: 29px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; color: #526176; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-weight: 700; }
.benchmark-variant small { color: var(--quiet); font-size: 9px; font-weight: 600; font-variant-numeric: tabular-nums; }
.benchmark-variant:hover { color: var(--blue); border-color: #aac7ef; }
.benchmark-variant.active { color: #174da8; background: var(--blue-soft); border-color: #9dbcf1; box-shadow: inset 0 0 0 1px rgba(36,99,235,.08); }
.benchmark-variant.active small { color: #4f72aa; }
.selected-variant { color: var(--text); font-weight: 750; }
.selected-variant::after { color: var(--quiet); content: " · "; font-weight: 400; }
.leaderboard-meta { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; white-space: nowrap; }
.chip.orange { color: var(--orange); background: var(--orange-soft); border-color: #f0cfb6; }
.chip.green { color: var(--green); background: var(--green-soft); border-color: #c3e3d7; }
.chip.harness { color: #3e5577; background: #f1f5fa; border-color: #d5dfe9; }
.chip.collection-scope { color: #174da8; background: var(--blue-soft); border-color: #c8d9f5; }
.chip.input-modality { color: #7a4310; background: #fff7e8; border-color: #efd5ad; }

.table-wrap { width: 100%; overflow-x: auto; }
.leaderboard-wrap, .compare-wrap { max-height: 720px; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { position: sticky; top: 0; z-index: 3; height: 38px; padding: 0 12px; color: var(--quiet); background: #f8f9fb; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.data-table tbody tr:hover { background: #fafcff; }
.rank { width: 46px; color: var(--quiet); text-align: center !important; font-variant-numeric: tabular-nums; }
.rank.top { color: var(--blue); font-weight: 800; }
.model-cell { min-width: 190px; }
.model-cell strong { display: block; font-size: 13px; }
.model-cell small, .muted { color: var(--muted); font-size: 10px; }
.model-link { padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.model-link:hover strong { color: var(--blue); }
.score-cell { min-width: 105px; font-size: 16px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-cell small { margin-left: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.setting-cell { min-width: 260px; max-width: 430px; color: #526176; }
.source-cell { min-width: 170px; }
.source-cell a { display: block; width: fit-content; margin-bottom: 4px; color: var(--blue); text-decoration: none; }
.source-cell a:hover { text-decoration: underline; }
.source-cell a.cross { color: #7a5b22; }
.conflict-mark { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--orange); vertical-align: 1px; }
.modality { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; color: #40536e; background: #eef2f7; border-radius: 5px; font-size: 10px; white-space: nowrap; }
.empty { padding: 60px 22px !important; color: var(--muted); text-align: center; }

.section-head { min-height: 94px; display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 19px 18px; border-bottom: 1px solid var(--line); }
.section-head .eyebrow { margin-bottom: 6px; }
.matrix-wrap { max-height: 760px; overflow: auto; }
.matrix-table th:first-child, .matrix-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 210px; background: var(--surface); }
.matrix-table th:first-child { z-index: 4; background: var(--surface-2); }
.matrix-table td:not(:first-child) { min-width: 100px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.matrix-value { font-weight: 700; }
.matrix-metric + .matrix-metric { margin-top: 7px; padding-top: 7px; border-top: 1px solid #edf0f4; }
.metric-label { display: block; margin-bottom: 2px; color: var(--quiet); font-size: 9px; font-weight: 700; line-height: 1.25; white-space: normal; }
.matrix-empty { color: #c4cbd5; }
.model-title { min-width: 220px; }
.model-title strong { display: block; font-size: 13px; }
.model-row { cursor: pointer; }
.model-row:hover .model-title strong, .detail-hint { color: var(--blue); }
.model-row-button { padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.model-row-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.detail-hint { font-size: 10px; font-weight: 700; }
.status-pending { color: var(--orange); }
.status-metadata { color: var(--muted); }
.status-base { color: var(--green); }
.status-comparison { color: var(--muted); }
.source-title { min-width: 300px; }
.source-title a { color: var(--text); font-weight: 650; text-decoration: none; }
.source-title a:hover { color: var(--blue); }
.audit-complete { display: inline-flex; padding: 3px 7px; color: var(--green); background: var(--green-soft); border: 1px solid #c3e3d7; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.audit-partial, .audit-target, .audit-metadata, .audit-inaccessible { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.audit-partial { color: var(--orange); background: var(--orange-soft); border: 1px solid #f0cfb6; }
.audit-target { color: #2864a7; background: #eef6ff; border: 1px solid #bed8f6; }
.audit-metadata { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.audit-inaccessible { color: #8b4c22; background: #fff7ed; border: 1px solid #fed7aa; }

.compare-controls { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; gap: 10px; align-items: end; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.compare-summary { display: flex; flex-wrap: wrap; gap: 8px; min-height: 49px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.compare-summary span { padding: 5px 8px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { min-width: 190px; }
.compare-table td:first-child { min-width: 220px; }
.compare-value { display: block; color: var(--text); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.compare-context { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.compare-source { display: inline-block; margin-top: 5px; color: var(--blue); font-size: 10px; text-decoration: none; }
.compare-metric + .compare-metric { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e9ef; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 6px 38px; color: var(--muted); font-size: 11px; }
footer div { display: flex; gap: 12px; }
footer strong { color: var(--text); }
footer a { color: var(--blue); text-decoration: none; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(24,34,53,.26); backdrop-filter: blur(2px); }
.model-drawer { position: fixed; inset: 0 0 0 auto; z-index: 51; width: min(760px, 92vw); overflow-y: auto; color: var(--text); background: var(--surface); border: 0; border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(24,34,53,.18); }
.drawer-topbar { position: sticky; top: 0; z-index: 2; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: var(--quiet); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.drawer-close { height: 31px; padding: 0 10px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 700; }
.drawer-close:hover { color: var(--blue); border-color: #aac7ef; }
.drawer-hero { padding: 26px 28px 20px; border-bottom: 1px solid var(--line); background: #f8fbff; }
.drawer-hero h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1; letter-spacing: -.04em; }
.drawer-hero > p:not(.eyebrow) { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.drawer-badges span { padding: 5px 8px; color: #40536e; background: #fff; border: 1px solid #d7e1ef; border-radius: 6px; font-size: 10px; }
.model-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 18px 28px 8px; gap: 14px 24px; }
.model-meta div { min-width: 0; }
.model-meta dt { color: var(--quiet); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.model-meta dd { margin: 4px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.primary-source { display: inline-flex; margin: 10px 28px 22px; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.model-reference-list { display: grid; gap: 7px; padding: 14px 28px 20px; }
.model-reference-list > strong { color: var(--quiet); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.model-reference-list .primary-source { align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-weight: 650; }
.model-reference-list .primary-source > span { min-width: 0; overflow-wrap: anywhere; }
.source-audit-pill { flex: 0 0 auto; padding: 2px 6px; color: var(--quiet); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 9px; font-weight: 750; }
.source-audit-pill.complete { color: var(--green); background: var(--green-soft); border-color: #c3e3d7; }
.source-audit-pill.target { color: #2864a7; background: #eef6ff; border-color: #bed8f6; }
.source-audit-pill.partial { color: var(--orange); background: var(--orange-soft); border-color: #f0cfb6; }
.source-audit-pill.inaccessible { color: #8b4c22; background: #fff7ed; border-color: #fed7aa; }
.drawer-results { border-top: 1px solid var(--line); }
.result-group { padding: 20px 28px 4px; }
.result-group + .result-group { border-top: 1px solid var(--line); }
.result-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.result-group-head h3 { margin: 0; font-size: 13px; }
.result-group-head span { color: var(--quiet); font-size: 10px; }
.result-family { margin-top: 15px; border-top: 1px solid #dfe4eb; }
.result-family-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.result-family-head h4 { margin: 0; font-size: 13px; }
.result-family-head span { color: var(--quiet); font-size: 9px; }
.result-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid #edf0f4; }
.result-score strong { display: block; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.result-score span { color: var(--muted); font-size: 10px; }
.result-copy h5 { margin: 0; color: var(--text); font-size: 11px; }
.result-copy p { margin: 5px 0 8px; color: var(--muted); font-size: 11px; }
.result-copy .source-cell { min-width: 0; font-size: 10px; }
.drawer-empty { padding: 56px 28px; text-align: center; }
.drawer-empty strong { font-size: 16px; }
.drawer-empty p { color: var(--muted); font-size: 12px; }

@media (max-width: 1050px) {
  .overview { align-items: start; }
  .overview-stats { max-width: 500px; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .leaderboard-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .compare-controls { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  main, footer { width: min(calc(100% - 20px), var(--max)); }
  .site-header { padding-inline: 12px; }
  .header-nav #freshness, .header-nav a:first-of-type { display: none; }
  .overview { display: block; padding-top: 22px; }
  .overview-stats { justify-content: start; margin-top: 16px; }
  .stat { min-width: calc(50% - 4px); }
  .notice { align-items: start; }
  .collection-strip, .collection-strip > div { align-items: start; }
  .collection-strip > div { display: grid; gap: 2px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .leaderboard-layout { display: block; }
  .bench-sidebar { max-height: none; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading { position: static; }
  #benchmark-nav { display: flex; overflow-x: auto; padding: 7px; scrollbar-width: thin; }
  .bench-group-title { display: none; }
  .bench-nav-item { width: auto; flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; border-radius: 6px; }
  .bench-nav-item.active { border-left-color: transparent; border-bottom-color: var(--blue); }
  .leaderboard-heading, .section-head { display: block; }
  .leaderboard-meta { justify-content: start; margin-top: 12px; }
  .compare-controls { grid-template-columns: 1fr; }
  footer, footer div { display: grid; }
  .model-drawer { width: 100vw; }
  .drawer-hero, .result-group { padding-inline: 18px; }
  .model-meta { grid-template-columns: 1fr; padding-inline: 18px; }
  .primary-source { margin-inline: 18px; }
  .model-reference-list { padding-inline: 18px; }
  .model-reference-list .primary-source { margin-inline: 0; }
}

@media (max-width: 460px) {
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .check-field, .export-button { width: 100%; }
}
