:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #eeeeee;
  --text: #111111;
  --muted: #5f6368;
  --muted-2: #8c9097;
  --border: #dddddd;
  --border-strong: #c9c9c9;
  --primary: #5b3df5;
  --primary-2: #4a30d9;
  --accent: #1f9d55;
  --violet: #7c3aed;
  --warning: #d9a300;
  --success: #1f9d55;
  --pill-dark: #111111;
  --pill-light: #ececec;
  --shadow: none;
  --radius: 8px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  padding-top: 96px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); text-decoration: underline; }

.container {
  width: min(1360px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding-top: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 72%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 0;
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.aa-floating-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.brand,
.aa-brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 760;
  letter-spacing: 0;
  background: #111111;
  border-radius: 999px;
  padding: 0 16px;
  min-height: 48px;
}

.brand img { width: 30px; height: 30px; }
.brand span { font-size: 0.98rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 48px;
}

.nav-pill-group {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: #ece7e4;
  padding: 4px;
}

.nav-link,
.nav-link-utility {
  padding: 9px 12px;
  border-radius: 999px;
  color: #3d3633;
  font-size: 0.9rem;
  line-height: 1;
}

.nav-link.active,
.nav-link:hover {
  background: #111111;
  color: #ffffff;
  text-decoration: none;
}

.nav-toggle { display: none; }

.hero {
  background: transparent;
  border-bottom: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.88fr);
  gap: 28px;
  padding: 28px 0 10px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #6c4f5f;
  font-size: 0.9rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: 0; }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.7rem, 5.2vw, 4.25rem); font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 1.65rem; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 1.05rem; }
p { margin: 0; }

.hero-copy {
  margin-top: 20px;
  max-width: 760px;
  color: #5f5753;
  font-size: 1.02rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero .actions {
  gap: 10px;
  margin-top: 22px;
}

.hero-panel.aa-hero-ranking {
  margin-top: 2px;
}

.hero-metrics-wrap {
  margin-top: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-weight: 640;
  font-size: 0.9rem;
  cursor: pointer;
}

.button:hover { text-decoration: none; border-color: #cbd5e1; background: #f8fafc; color: var(--text); }
.button-primary { background: var(--primary); border-color: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: white; }

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.metric-list { display: grid; gap: 12px; }

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.metric-row:last-child { border-bottom: 0; }
.metric-label { color: var(--muted); font-size: 0.92rem; }
.metric-value { font-size: 1.55rem; font-weight: 780; color: var(--text); }

.analysis-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.analysis-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
}

.analysis-shell-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 720;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(3, 152, 85, 0.12);
}

.analysis-shell-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  min-height: 354px;
}

.analysis-table-preview {
  border-right: 1px solid var(--border);
  overflow: auto;
}

.analysis-table-preview table {
  min-width: 620px;
  font-size: 0.88rem;
}

.analysis-side {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  background: #fbfcfd;
}

.analysis-note {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.analysis-note strong {
  display: block;
  margin-bottom: 5px;
  color: #101828;
}

.analysis-list {
  display: grid;
  gap: 10px;
}

.analysis-list-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.analysis-list-row:last-child {
  border-bottom: 0;
}

.analysis-list-key {
  color: #344054;
  font-weight: 700;
}

.analysis-list-value {
  color: var(--muted);
}

.aa-metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.aa-metric {
  padding: 18px;
  border-right: 1px solid var(--border);
}

.aa-metric:last-child { border-right: 0; }

.aa-metric-value {
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 780;
  color: #101828;
  font-variant-numeric: tabular-nums;
}

.aa-metric-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px minmax(160px, 1fr) minmax(120px, 0.95fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rank-row:last-child { border-bottom: 0; }

.rank-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}

.rank-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.leaderboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.leaderboard-insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
}

.leaderboard-insight-card .leaderboard-big-number {
  font-size: 2rem;
}

.matrix-grid {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.matrix-table {
  min-width: 780px;
}

.matrix-table td {
  font-variant-numeric: tabular-nums;
}

.matrix-score {
  display: inline-flex;
  min-width: 54px;
  justify-content: flex-end;
  font-weight: 760;
}

.compact-data-table {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.compact-data-table table {
  min-width: 760px;
  font-size: 0.88rem;
}

.compact-data-table th,
.compact-data-table td {
  padding: 9px 10px;
}

.mini-kicker {
  color: #475467;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pipeline-step {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.pipeline-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #344054;
  font-size: 0.82rem;
  font-weight: 760;
  background: var(--surface-3);
}

.split-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-grid {
  display: grid;
  gap: 12px;
}

.evidence-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.no-data-panel {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: repeating-linear-gradient(-45deg, #fbfcfd, #fbfcfd 8px, #f6f8fa 8px, #f6f8fa 16px);
  padding: 18px;
}

.no-data-panel h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.no-data-panel p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.no-data-panel .table-note {
  font-size: 0.78rem;
  color: var(--muted-2);
}

.chart-card canvas + div[style*="chartjs-title-"] {
  display: none;
}

.chartjs-title-container {
  display: none;
}

.source-note {
  display: flex;
  align-items: start;
  gap: 10px;
  border: 1px solid #b9e6d3;
  background: #f0fdf8;
  color: #05603a;
  border-radius: 8px;
  padding: 14px;
}

.source-note::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 7px;
  flex: 0 0 auto;
  background: var(--success);
}

.aa-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.aa-highlight-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
}

.aa-highlight-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.aa-highlight-card-compact-gap h3 {
  font-size: 1.24rem;
  margin-bottom: 8px;
}

.aa-highlight-card-compact-gap p {
  font-size: 0.98rem;
  line-height: 1.55;
}

.aa-highlight-card-compact-gap .aa-mini-leaderboard {
  margin-top: 10px;
}

.aa-highlight-card-compact-gap .aa-mini-row {
  grid-template-columns: 34px minmax(0, 1fr) 88px;
  font-size: 0.98rem;
  padding: 7px 0;
}

.aa-highlight-card-compact-gap .aa-mini-row strong,
.aa-highlight-card-compact-gap .aa-mini-row .score {
  font-size: 1rem;
}

.aa-mini-leaderboard {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.aa-mini-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.aa-mini-row:last-child {
  border-bottom: 0;
}

.aa-changelog {
  display: grid;
  gap: 10px;
}

.aa-changelog-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.aa-changelog-item:last-child {
  border-bottom: 0;
}

.aa-changelog-item .changelog-date {
  color: var(--primary);
  font-weight: 760;
  font-size: 0.85rem;
  padding-top: 2px;
}

.aa-changelog-item .changelog-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.release-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.release-timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}

.release-date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 760;
  white-space: nowrap;
  margin-top: 4px;
}

.release-date-badge-amber {
  background: #d97706;
}

.release-date-badge-teal {
  background: #0d9488;
}

.release-timeline-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.release-timeline-body p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.release-timeline-card {
  padding: 24px;
}

/* ─── Changelog cards ───────────────────────────────────────────────── */
.changelog-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.changelog-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 0 18px;
  align-items: stretch;
}

.changelog-dot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.changelog-dot::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

.changelog-row:first-child .changelog-dot::before {
  top: 14px;
}

.changelog-row:last-child .changelog-dot::before {
  bottom: calc(100% - 14px);
}

.changelog-row:not(:first-child):not(:last-child) .changelog-dot::before {
  top: 0;
}

.changelog-dot::after {
  content: "";
  position: relative;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 2px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.96);
  flex-shrink: 0;
  z-index: 1;
}

.changelog-dot-active::after {
  background: #10b981;
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.96), 0 0 0 8px rgba(16, 185, 129, 0.14);
}

.changelog-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.changelog-card-active {
  border-color: rgba(110, 231, 183, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(110, 231, 183, 0.1);
}

.changelog-card-accent-indigo .changelog-card-inner {
  border-left: 2px solid rgba(129, 140, 248, 0.75);
}

.changelog-card-accent-sky .changelog-card-inner {
  border-left: 2px solid rgba(168, 85, 247, 0.66);
}

.changelog-card-accent-emerald .changelog-card-inner {
  border-left: 2px solid rgba(52, 211, 153, 0.74);
}

.changelog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.changelog-date {
  color: rgba(203, 213, 225, 0.72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.changelog-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.changelog-tag-release {
  color: #e9ddff;
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(167, 139, 250, 0.24);
}

.changelog-tag-paper {
  color: #ede9fe;
  background: rgba(147, 51, 234, 0.18);
  border-color: rgba(196, 181, 253, 0.22);
}

.changelog-tag-leaderboard {
  color: #dcfce7;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(110, 231, 183, 0.22);
}

.changelog-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 10px;
  line-height: 1.24;
}

.changelog-desc {
  font-size: 15px;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.55;
  margin: 0;
}

.changelog-card-inner {
  border-radius: 24px;
  padding: 24px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0));
}

.changelog-card-active .changelog-card-inner {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.changelog-dot {
  background: transparent;
}

.changelog-dot-active {
  background: transparent;
}

.changelog-dot-active::before {
  background: rgba(148, 163, 184, 0.28);
}

.section-title-bold {
  color: #111111;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.changelog-meta .changelog-tag {
  font-weight: 700;
  font-size: 12px;
}

/* ─── Vertical timeline ─────────────────────────────────────────────── */
/* (kept for future use — unused for now) */

.leaderboard-chart-mini {
  margin-bottom: 10px;
}

.leaderboard-chart-mini canvas {
  width: 100% !important;
  height: 140px !important;
}

.aa-tagline {
  max-width: 880px;
  font-size: 1rem;
  color: var(--muted);
}

.aa-hero-ranking {
  border-radius: 24px;
}

.aa-hero-ranking-body {
  padding: 16px 16px 14px;
}

.aa-hero-ranking-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
}

.aa-hero-ranking-stat {
  background: var(--surface-3);
  padding: 11px 12px;
}

.aa-hero-ranking-stat strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1;
}

.aa-hero-ranking-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.leaderboard-title-row {
  margin: 0;
  align-items: center;
}

.leaderboard-title-row img {
  width: 34px;
  height: 34px;
}

.leaderboard-page-header {
  padding: 18px 0 8px;
}

.leaderboard-page-lead {
  max-width: 840px;
  margin-top: 10px;
}

.leaderboard-hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--border);
}

.leaderboard-hero-stat {
  background: var(--surface-2);
  padding: 11px 14px;
}

.leaderboard-hero-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 640;
}

.leaderboard-hero-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 800;
}

.leaderboard-top-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 0;
}

.leaderboard-summary-note {
  height: 100%;
  font-size: 0.96rem;
}

.leaderboard-module {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  padding: 16px 18px;
}

.leaderboard-module + .leaderboard-module {
  margin-top: 14px;
}

.leaderboard-module .section-head {
  margin-bottom: 10px;
}

.leaderboard-tall-card {
  min-height: 300px;
}

.leaderboard-composition-card {
  min-height: 300px;
}

.leaderboard-text-panel {
  min-height: 390px;
  display: grid;
  align-content: start;
}

.ability-insight-list {
  display: grid;
  gap: 10px;
}

.ability-insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.ability-insight-row:last-child {
  border-bottom: 0;
}

.section { padding: 30px 0; }
.section + .section { border-top: 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-subtitle {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.98rem;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.threshold-layout {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.7fr);
  align-items: stretch;
}

.composition-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.7fr);
  align-items: stretch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: none;
}

.card p { color: var(--muted); }

.stat-card .value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 790;
  margin-bottom: 8px;
}

.stat-card .label { color: var(--muted); font-size: 0.92rem; }

.page-header {
  padding: 20px 0 10px;
  background: transparent;
  border-bottom: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-title-row img { width: 46px; height: 46px; }

.page-lead {
  max-width: 860px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ece7e4;
  padding: 4px;
  margin-bottom: 16px;
}

.tab-button {
  border: 0;
  background: transparent;
  color: #4a433f;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 640;
  cursor: pointer;
}

.tab-button.active { color: #ffffff; background: #111111; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

select, input {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 10px;
  font: inherit;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
  font-size: 0.92rem;
}

th, td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8f9fb;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 760;
  white-space: nowrap;
}

tbody tr:hover { background: #f8fafc; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-family: var(--mono); color: var(--muted); }
.score { color: var(--primary); font-weight: 760; }
.table-note { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: #334155;
  background: #f8fafc;
  white-space: nowrap;
}

.badge-green { color: #166534; background: #e9f8ef; border-color: #ccefd8; }
.badge-blue { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.badge-violet { color: #6d28d9; background: #ede9fe; border-color: #ddd6fe; }

.chart-card {
  min-height: 360px;
  position: relative;
}

.chart-card canvas {
  width: 100% !important;
  /* height driven by Chart.js via aspectRatio; no CSS override */
}

.wide-chart canvas { height: 360px !important; }

/* Lite ranking chart: canvas for bars, HTML rail for logo/label stack. */
.lite-ranking-chart-card {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.lite-ranking-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 14px 8px 8px;
}

.lite-ranking-scroll-compact {
  overflow-x: hidden;
}

.lite-ranking-canvas-wrap {
  width: 100%;
  min-width: 0;
  height: 344px;
}

.lite-ranking-canvas-wrap canvas {
  height: 100% !important;
}

.lite-ranking-label-rail {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 128px;
  padding: 6px 0 0;
}

.lite-ranking-label-item {
  position: absolute;
  top: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.lite-ranking-agent-logo,
.lite-ranking-llm-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.lite-ranking-slanted-label {
  display: block;
  width: 140px;
  margin-top: 2px;
  color: #2f3441;
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: 0;
  text-align: center;
  transform: rotate(-48deg);
  transform-origin: center top;
  white-space: normal;
}


.lite-ranking-slanted-label span {
  display: block;
  text-shadow: 0 0 0 currentColor;
}

.figure-panel {
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98)),
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 36%);
}

.figure-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.leaderboard-summary-grid {
  margin-bottom: 22px;
}

.leaderboard-summary-card {
  background: #ffffff;
  min-height: 164px;
}

.leaderboard-kicker {
  color: #475467;
  font-size: 0.85rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.leaderboard-big-number {
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 790;
  margin-bottom: 10px;
}

.leaderboard-chart-card {
  background: #ffffff;
}

.leaderboard-stat-grid {
  display: grid;
  gap: 12px;
}

.leaderboard-stat-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.leaderboard-stat-item:last-child {
  border-bottom: 0;
}

.callout {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: var(--radius);
  padding: 16px;
  color: #1e3a8a;
}

.code-block {
  font-family: var(--mono);
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 16px;
  overflow: auto;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.timeline-date { color: var(--muted); font-weight: 720; }

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  body { padding-top: 86px; }
  .changelog-row { grid-template-columns: 12px minmax(0, 1fr); gap: 0 14px; }
  .changelog-card-inner { padding: 22px 22px 20px; }
  .changelog-title { font-size: 20px; }
  .changelog-desc { font-size: 14px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 16px; }
  .leaderboard-hero-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .aa-highlight-grid { grid-template-columns: 1fr; }
  .aa-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aa-metric { border-right: 0; border-bottom: 1px solid var(--border); }
  .analysis-shell-body { grid-template-columns: 1fr; }
  .analysis-table-preview { border-right: 0; border-bottom: 1px solid var(--border); }
  .leaderboard-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-grid { grid-template-columns: 1fr; }
  .split-band { grid-template-columns: 1fr; }
  .threshold-layout,
  .composition-layout { grid-template-columns: 1fr; }
  .nav-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    padding: 8px 10px;
  }
  .nav-links {
    display: none;
    position: fixed;
    left: 20px;
    right: 20px;
    top: 74px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  body.nav-open .nav-links { display: grid; }
  .nav-pill-group { display: grid; border-radius: 18px; }
  .nav-link { width: 100%; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1180px); }
  .changelog-cards { gap: 14px; }
  .changelog-row { grid-template-columns: 1fr; gap: 10px; }
  .changelog-dot { display: none; }
  .changelog-card-inner { padding: 20px 18px 18px; }
  .changelog-title { font-size: 18px; }
  .changelog-desc { font-size: 14px; line-height: 1.62; }
  h1 { font-size: 2.55rem; }
  .leaderboard-hero-panel { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .timeline-item { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
  .aa-metric-strip { grid-template-columns: 1fr; }
  .leaderboard-insight-grid { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 28px 1fr 64px; }
  .rank-bar-track { grid-column: 2 / -1; }
  .analysis-list-row { grid-template-columns: 1fr; }

  .leaderboard-tall-card,
  .leaderboard-composition-card {
    min-height: 260px;
  }
}

body {
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1800px, calc(100% - 84px));
}

.site-header {
  top: 0;
  padding-top: 18px;
}

.nav {
  min-height: 52px;
}

.aa-floating-nav {
  gap: 12px;
}

.brand,
.aa-brand-pill {
  background: var(--pill-dark);
  color: #ffffff;
  min-height: 44px;
  padding: 0 15px;
}

.nav-pill-group {
  background: var(--pill-light);
  padding: 3px;
  gap: 0;
}

.nav-link,
.nav-link-utility {
  color: #444444;
  font-size: 0.88rem;
  font-weight: 560;
}

.nav-link.active,
.nav-link:hover {
  background: var(--pill-dark);
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.aa-icon-button,
.aa-toolbar-button,
.aa-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #3d3d3d;
  font-size: 0.85rem;
  font-weight: 600;
}

.aa-icon-button:hover,
.aa-toolbar-button:hover,
.aa-search-button:hover {
  text-decoration: none;
  background: var(--surface-3);
  color: var(--text);
}

.site-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 104px 20px 20px;
  background: rgba(17, 17, 17, 0.18);
  backdrop-filter: blur(4px);
}

.site-search-overlay[hidden] {
  display: none;
}

.site-search-panel {
  width: min(640px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(17, 17, 17, 0.16);
  overflow: hidden;
}

.site-search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: #f8f8f8;
}

.site-search-results {
  display: grid;
  max-height: min(460px, 60vh);
  overflow: auto;
  padding: 8px;
}

.site-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-radius: 10px;
  color: var(--text);
}

.site-search-result:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.site-search-empty {
  padding: 18px;
  color: var(--muted);
}

.hero-inner {
  gap: 24px;
  padding: 38px 0 18px;
}

.eyebrow {
  margin-bottom: 14px;
  color: #6d61d6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
}

.eyebrow::before {
  background: var(--primary);
  box-shadow: none;
}

h1 {
  font-size: clamp(2.95rem, 5.4vw, 4.5rem);
}

h2 {
  font-size: 1.55rem;
}

.hero-copy,
.page-lead,
.section-subtitle,
.table-note,
.analysis-list-value,
.card p {
  color: var(--muted);
}

.button {
  min-height: 36px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 620;
}

.button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.button-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.button-primary:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
}

.analysis-shell,
.leaderboard-module,
.card,
.table-wrap,
.aa-metric-strip,
.matrix-grid,
.compact-data-table,
.source-note,
.evidence-card,
.pipeline-step {
  border-color: var(--border);
  box-shadow: none;
}

.analysis-shell,
.leaderboard-module,
.card,
.aa-metric-strip,
.matrix-grid,
.compact-data-table,
.evidence-card,
.pipeline-step {
  background: var(--surface);
}

.analysis-shell,
.leaderboard-module,
.aa-highlight-card,
.card,
.table-wrap,
.aa-hero-ranking,
.aa-metric-strip {
  border-radius: 16px;
}

.analysis-shell-header,
th {
  background: #f7f7f7;
}

.analysis-shell-title,
th,
.mini-kicker,
.leaderboard-kicker {
  color: #555555;
}

.aa-page-title {
  margin: 0;
  font-size: clamp(2.35rem, 4.6vw, 3.3rem);
  line-height: 1.05;
}

.aa-page-lead {
  max-width: 840px;
  margin-top: 14px;
}

.aa-summary-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.aa-summary-tile .leaderboard-big-number {
  font-size: 2rem;
}

.example-title {
  font-size: 1.35rem;
}

.leaderboard-insight-card,
.aa-highlight-card {
  border-color: var(--border);
  background: var(--surface);
}

.tabs {
  background: var(--pill-light);
  border-color: transparent;
  padding: 3px;
}

.tab-button {
  font-size: 0.86rem;
  font-weight: 620;
}

.tab-button.active {
  background: var(--pill-dark);
  color: #ffffff;
}

select,
input {
  border-radius: 999px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.aa-table-search {
  min-width: 280px;
}

th,
td {
  padding: 8px 10px;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 640;
}

.table-wrap td:first-child,
.table-wrap th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.table-wrap th:first-child {
  z-index: 2;
}

tbody tr:hover {
  background: #fafafa;
}

.score {
  color: var(--primary);
}

.rank-bar-track {
  background: #ececec;
}

.rank-bar {
  background: linear-gradient(90deg, #5b3df5, #1f9d55);
}

.badge {
  background: #f6f6f6;
  border-color: var(--border);
  color: #555555;
}

.badge-violet {
  color: #6d28d9;
  background: #f3e8ff;
  border-color: #e9d5ff;
}

.chart-card {
  min-height: 340px;
}

.figure-panel {
  background: var(--surface);
}

.figure-image {
  border-color: var(--border);
  box-shadow: none;
}

.page-header {
  padding: 26px 0 14px;
}

.page-title-row {
  gap: 10px;
}

.page-title-row img {
  width: 34px;
  height: 34px;
}

.page-title-row h1,
.page-header .aa-page-title {
  margin: 0;
}

.source-note {
  background: #f8fafc;
  color: #46505a;
}

.source-note::before {
  background: var(--primary);
}

.dataset-badge {
  font-size: 0.72rem;
}

.dataset-badge-green-sm {
  font-size: 0.75rem;
}

.dataset-api-log {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.dataset-code-block {
  font-size: 0.82rem;
  margin-top: 10px;
}

.dataset-task-desc {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dataset-metric-value {
  font-size: 2.8rem;
  font-weight: 790;
  margin: 12px 0 8px;
  line-height: 1;
}

.dataset-task-excerpt {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.dataset-card-stat {
  text-align: center;
}

.dataset-card-stat .mini-kicker {
  text-align: left;
}

.dataset-card-stat p {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.dataset-bar-wrapper {
  margin-bottom: 10px;
}

.dataset-h3 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.dataset-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dataset-pillar {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px 16px;
}

.dataset-pillar .mini-kicker { text-align: left; }

.dataset-lite-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.dataset-source-note-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.dataset-task-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
}

.dataset-task-card p {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.dataset-task-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dataset-badge-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dataset-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.dataset-table-0 {
  border: 0 !important;
}

.dataset-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.dataset-big-num {
  font-size: 2.2rem;
  font-weight: 790;
  margin: 6px 0;
  line-height: 1;
}

.dataset-big-num-primary { color: var(--primary); }
.dataset-big-num-accent { color: var(--accent); }
.dataset-big-num-warning { color: #d97706; }

@media (max-width: 700px) {
  .dataset-pillar-grid { grid-template-columns: 1fr; }
  .dataset-lite-grid { grid-template-columns: 1fr; }
}

  .nav-links {
    background: var(--surface);
    border-radius: 20px;
  }
}
