:root {
  --ground: #f6f8fc;
  --surface: #ffffff;
  --surface-alt: #fbfcfe;
  --ink: #14213d;
  --muted: #5a6b85;
  --faint: #8a99b5;
  --accent: #2f54eb;
  --accent-soft: #eaf0ff;
  --live: #12b886;
  --border: #e4e9f2;
  --border-strong: #d4dbea;
  --danger: #c0392b;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(20, 33, 61, .06);
  --shadow-md: 0 8px 28px rgba(20, 33, 61, .09);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lb-wrap { width: min(100% - 44px, 1360px); margin-inline: auto; }

.lb-nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: rgba(246, 248, 252, .88); backdrop-filter: blur(12px); }
.lb-nav-in { width: min(100% - 44px, 1360px); min-height: 58px; margin-inline: auto; display: flex; align-items: center; gap: 20px; }
.lb-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.lb-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 184, 134, .5); } 70% { box-shadow: 0 0 0 7px rgba(18, 184, 134, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0); } }
.lb-tag { padding: 1px 5px; border: 1px solid var(--live); border-radius: 5px; color: var(--live); font: 600 10px/1.4 var(--mono); letter-spacing: .06em; }
.lb-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lb-links a { padding: 6px 11px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500; transition: .15s; }
.lb-links a:hover { background: var(--accent-soft); color: var(--ink); }
.lb-links a:focus-visible, .control-chip:focus-visible, .category-chip:focus-visible, .release-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lb-hero { padding: 46px 0 28px; border-bottom: 1px solid var(--border); }
.lb-eyebrow { margin: 0 0 14px; color: var(--accent); font: 12px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lb-hero h1 { max-width: 21ch; margin: 0; font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; }
.lb-hero-sub { max-width: 66ch; margin: 16px 0 0; color: var(--muted); font-size: 17px; }
.lb-hero-sub strong { color: var(--ink); font-weight: 600; }

.release-card { margin-top: 28px; padding: 20px 24px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.release-head { margin-bottom: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.release-head span { color: var(--muted); font: 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.release-head strong { color: var(--accent); font: 700 15px/1.4 var(--mono); }
.release-rail { position: relative; height: 30px; margin: 0 6px; }
.release-rail::before, .release-progress { content: ""; position: absolute; top: 11px; left: 0; height: 2px; border-radius: 2px; }
.release-rail::before { right: 0; background: var(--border-strong); }
.release-progress { z-index: 1; width: 100%; background: var(--accent); transition: width .25s ease; }
.release-dot { position: absolute; z-index: 2; top: 5px; width: 14px; height: 14px; padding: 0; transform: translateX(-50%); border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); transition: .15s; }
.release-dot:hover { transform: translateX(-50%) scale(1.2); border-color: var(--accent); }
.release-dot.done { border-color: var(--accent); background: var(--accent); }
.release-dot.active { border-color: var(--live); background: var(--surface); box-shadow: 0 0 0 4px rgba(18, 184, 134, .18); }
.release-ends { margin-top: 4px; display: flex; justify-content: space-between; color: var(--faint); font: 11px/1.4 var(--mono); }
.release-note { min-height: 19px; margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.release-note strong { color: var(--ink); }
.live-text { color: var(--live); }

.lb-section { padding: 42px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 58px; }
.section-title { margin-bottom: 6px; display: flex; align-items: baseline; gap: 13px; }
.section-title span { color: var(--faint); font: 13px/1.4 var(--mono); }
.section-title h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.section-sub { max-width: 76ch; margin: 6px 0 0; color: var(--muted); }

.kpi-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.kpi > span { display: block; color: var(--muted); font: 10.5px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.kpi strong { display: block; margin-top: 7px; overflow: hidden; color: var(--ink); font: 700 24px/1.2 var(--mono); letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.kpi small { display: block; margin-top: 3px; overflow: hidden; color: var(--faint); text-overflow: ellipsis; white-space: nowrap; }
.kpi-live { border-color: var(--live); }
.kpi-live strong { color: var(--live); font-size: 19px; }

.table-controls { margin: 24px 0 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.model-search { flex: 1 1 240px; min-width: 180px; }
.model-search input, .org-select { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: none; background: var(--surface); color: var(--ink); font-size: 14px; }
.model-search input:focus, .org-select:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.org-select { width: auto; min-width: 180px; color: var(--muted); font: 12px/1.5 var(--mono); }
.control-chip, .category-chip { padding: 7px 13px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--muted); font: 12px/1.45 var(--mono); transition: .15s; }
.control-chip:hover, .category-chip:hover { border-color: var(--accent); color: var(--ink); }
.control-chip[aria-pressed="true"], .category-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.category-controls { margin: 0 0 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.category-label { margin-right: 2px; color: var(--muted); font: 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.table-state { padding: 42px 0; color: var(--muted); font: 14px/1.5 var(--mono); text-align: center; }
.table-state.error { color: var(--danger); }
.table-scroll { max-height: 78vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.score-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13.5px; }
.score-table th { position: sticky; top: 0; z-index: 4; padding: 12px 11px; border-bottom: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 600 10.5px/1.25 var(--mono); letter-spacing: .04em; text-align: right; text-transform: uppercase; white-space: nowrap; user-select: none; }
.score-table th button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.score-table th button:hover { color: var(--accent); }
.score-table th.left, .score-table td.left { text-align: left; }
.score-table th.group, .score-table td.group { border-left: 1px solid var(--border); }
.score-table td { padding: 10px 11px; border-bottom: 1px solid var(--border); color: var(--ink); font: 13px/1.4 var(--mono); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-table tbody tr.model-row { cursor: pointer; }
.score-table tbody tr.model-row:hover td { background-color: #f3f6ff !important; }
.score-table tbody tr:last-child td { border-bottom: 0; }
.rank-col { position: sticky; left: 0; z-index: 3; width: 36px; min-width: 36px; background: var(--surface); color: var(--faint) !important; text-align: center !important; }
th.rank-col { z-index: 6; }
.model-col { position: sticky; left: 36px; z-index: 3; min-width: 218px; background: var(--surface); box-shadow: inset -1px 0 var(--border); }
th.model-col { z-index: 6; }
.model-cell { display: flex; align-items: center; gap: 8px; font-family: var(--sans); }
.model-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; }
.model-name { font-weight: 650; }
.variant-badge { padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--muted); font: 10px/1.5 var(--mono); }
.expand-icon { display: inline-block; width: 12px; color: var(--faint); transition: transform .15s; }
.model-row.open .expand-icon { transform: rotate(90deg); color: var(--accent); }
.org-cell { color: var(--muted) !important; font-family: var(--sans) !important; font-size: 12.5px !important; text-align: left !important; }
.overall-cell { font-size: 14px !important; font-weight: 750 !important; }
.na { color: var(--faint) !important; }
.sort-arrow { margin-left: 3px; color: var(--accent); font-size: 9px; }
.detail-row td { padding: 0; background: var(--surface-alt); }
.detail-panel { position: sticky; left: 0; width: min(100vw - 46px, 1314px); padding: 16px 18px 18px; text-align: left; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.detail-category h4 { margin: 0 0 7px; color: var(--accent); font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.subtask { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--border); font-size: 12px; }
.subtask span:first-child { color: var(--muted); font-family: var(--sans); }
.data-note { margin: 11px 2px 0; color: var(--faint); font-size: 11.5px; }

.insight-grid { margin-top: 24px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.insight-card { min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.insight-card h3 { margin: 0 0 3px; font-size: 15px; }
.insight-card > p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.chart-stage { min-height: 260px; overflow: hidden; }
.chart-stage svg { display: block; width: 100%; height: auto; }
.chart-empty { padding: 72px 12px; color: var(--faint); font: 12px/1.5 var(--mono); text-align: center; }
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-label { fill: var(--faint); font: 10px var(--mono); }
.chart-point { stroke: #fff; stroke-width: 2; transition: r .15s; }
.chart-point:hover { r: 7; }
.radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-axis { stroke: var(--border-strong); stroke-width: 1; }
.radar-label { fill: var(--muted); font: 10px var(--mono); }
.chart-legend { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font: 11px/1.4 var(--mono); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 50%; }

.about-index { background: rgba(255, 255, 255, .35); }
.about-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-grid article { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.about-grid strong { font-size: 14px; }
.about-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.lb-footer { padding: 34px 0 48px; color: var(--faint); font-size: 12.5px; }
.footer-row, .license-row { display: flex; justify-content: space-between; gap: 24px; }
.footer-row strong { color: var(--ink); font-size: 16px; }
.footer-row p, .license-row p { margin: 5px 0 0; }
.footer-links { display: flex; align-items: flex-start; gap: 18px; }
.footer-links a { color: var(--muted); }
.license-row { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.license-row p { max-width: 68ch; }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-row, .license-row { flex-direction: column; }
}

@media (max-width: 640px) {
  .lb-wrap, .lb-nav-in { width: min(100% - 30px, 1360px); }
  .lb-nav-in { min-height: 54px; gap: 10px; }
  .lb-brand { font-size: 16px; }
  .lb-links { gap: 2px; }
  .lb-links a { padding: 5px 7px; font-size: 12px; }
  .lb-links a:nth-child(n+3) { display: none; }
  .lb-hero { padding-top: 35px; }
  .lb-hero-sub { font-size: 15px; }
  .release-card { padding-inline: 14px; }
  .release-dot { width: 12px; height: 12px; }
  .release-ends { font-size: 9px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .table-controls { align-items: stretch; flex-direction: column; }
  .model-search, .org-select { width: 100%; }
  .score-table th, .score-table td { padding: 8px 7px; }
  .model-col { min-width: 138px; max-width: 138px; }
  .model-cell { align-items: flex-start; flex-wrap: wrap; gap: 4px 6px; white-space: normal; }
  .model-name { width: calc(100% - 24px); font-size: 12.5px; line-height: 1.25; }
  .detail-panel { width: calc(100vw - 31px); padding: 14px; }
  .chart-stage { min-height: 220px; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
