:root {
  color-scheme: light dark;
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #0b1020;
  color: #eef2ff;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #0b1020;
  font-weight: 700;
  transform: translateY(calc(-100% - 2rem));
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #8da2fb;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  width: min(42rem, calc(100% - 3rem));
}

main:focus {
  outline: none;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.language-switcher a {
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  color: #c7d2fe;
}

.language-switcher a[aria-current="page"] {
  background: #253563;
  color: #fff;
  text-decoration: none;
}

.language-switcher a:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.eyebrow {
  color: #8da2fb;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.98;
}

.tagline {
  margin: 1.5rem 0;
  color: #c7d2fe;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
}

.status {
  max-width: 36rem;
  color: #aeb9d4;
  line-height: 1.7;
}

.cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0.75rem;
  background: #344a86;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.cta:hover,
.cta:focus-visible {
  background: #4964ad;
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.home-actions,
.page-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.text-link,
.page-nav a,
.empty-state a {
  color: #a5b4fc;
}

.arena-page {
  display: block;
}

.arena-shell {
  width: min(90rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.arena-header {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.arena-header h1 {
  margin-top: 1.5rem;
  font-size: clamp(2rem, 5vw, 4rem);
}

.arena-header p,
.blind-note,
.section-label,
.prompt-rating legend {
  color: #aeb9d4;
}

.brand {
  color: #c7d2fe;
  font-weight: 700;
  text-decoration: none;
}

.prompt,
.prompt-rating,
.response-card,
.empty-state {
  border: 1px solid #293354;
  border-radius: 1rem;
  background: #11182c;
}

.prompt,
.empty-state {
  padding: 1.5rem;
}

.prompt p:last-child {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.65;
}

.section-label {
  margin-top: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vote-form {
  margin-top: 1rem;
}

.completed-comparison {
  margin: 0 0 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #293354;
}

.completed-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.vote-result {
  color: #c7d2fe;
}

.revealed-responses,
.next-comparison {
  margin-top: 1rem;
}

.model-reveal {
  color: #8da2fb;
  font-weight: 700;
}

.prompt-rating {
  margin: 0;
  padding: 1rem 1.5rem;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem;
}

.responses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.response-card {
  padding: 1.5rem;
}

.response-card h2 {
  margin-top: 0;
  color: #c7d2fe;
}

.response-text {
  line-height: 1.65;
}

.vote-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

button {
  min-height: 3rem;
  border: 1px solid #5265a8;
  border-radius: 0.75rem;
  background: #253563;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: #344a86;
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.vote-row-secondary button {
  background: #18213a;
  font-weight: 500;
}

.empty-state {
  max-width: 42rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #293354;
  border-radius: 1rem;
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  background: #11182c;
}

.rankings-table th,
.rankings-table td {
  padding: 1rem;
  border-bottom: 1px solid #293354;
  text-align: right;
}

.rankings-table th:nth-child(2),
.rankings-table td:nth-child(2) {
  text-align: left;
}

.rankings-table tbody tr:last-child th,
.rankings-table tbody tr:last-child td {
  border-bottom: 0;
}

.ranking-note {
  color: #aeb9d4;
  line-height: 1.6;
}

.ai-evaluation {
  margin-bottom: 2rem;
}

.evaluation-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.evaluation-meta h2 {
  margin-top: 0.25rem;
}

.provisional-badge {
  padding: 0.5rem 0.75rem;
  border: 1px solid #8a6a2b;
  border-radius: 999px;
  color: #f2cf78;
}

.audit-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.audit-meta div {
  padding: 1rem;
  border: 1px solid #293354;
  border-radius: 0.75rem;
  background: #11182c;
}

.audit-meta dt {
  color: #aeb9d4;
  font-size: 0.8rem;
}

.audit-meta dd {
  margin: 0.4rem 0 0;
  overflow-wrap: anywhere;
}

.methodology-shell {
  max-width: 52rem;
}

.methodology-shell > section,
.methodology-limit {
  margin-top: 1rem;
  padding: 1.5rem;
  border: 1px solid #293354;
  border-radius: 1rem;
  background: #11182c;
}

.methodology-shell h2 {
  margin-top: 0;
}

.methodology-shell section p,
.methodology-limit p {
  margin-bottom: 0;
  line-height: 1.65;
}

.methodology-limit {
  border-color: #8a6a2b;
}

@media (max-width: 48rem) {
  .responses {
    grid-template-columns: 1fr;
  }

  .vote-row {
    grid-template-columns: 1fr;
  }

  .audit-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Light editorial data theme: Artificial Analysis × Arena × LiveBench, adapted for AIWB. */
:root {
  color-scheme: light;
  background: #f6f8fc;
  color: #17213d;
  --ink: #17213d;
  --muted: #60708f;
  --line: #dce3ef;
  --surface: #fff;
  --surface-soft: #f0f4fb;
  --accent: #3158ee;
  --accent-soft: #e9eeff;
}

body {
  background: #f6f8fc;
  color: var(--ink);
}

.language-switcher a,
.arena-header p,
.blind-note,
.section-label,
.prompt-rating legend,
.ranking-note,
.audit-meta dt {
  color: var(--muted);
}

.language-switcher a[aria-current="page"] {
  background: var(--accent-soft);
  color: #2445c4;
}

.language-switcher a:focus-visible,
.cta:hover,
.cta:focus-visible,
button:hover,
button:focus-visible {
  outline-color: #9eb0ff;
}

.eyebrow,
.model-reveal {
  color: var(--accent);
}

.tagline,
.vote-result,
.response-card h2 {
  color: #334467;
}

.status {
  color: var(--muted);
}

.cta,
button {
  border-color: var(--ink);
  background: var(--ink);
}

.cta:hover,
.cta:focus-visible,
button:hover,
button:focus-visible {
  background: var(--accent);
}

.text-link,
.page-nav a,
.empty-state a {
  color: #2445c4;
}

.brand {
  color: var(--ink);
}

.prompt,
.prompt-rating,
.response-card,
.empty-state,
.audit-meta div,
.methodology-shell > section,
.methodology-limit {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(27, 42, 78, 0.05);
}

.completed-comparison {
  border-bottom-color: var(--line);
}

.vote-row-secondary button {
  border-color: #c9d2e2;
  background: var(--surface-soft);
  color: var(--ink);
}

.table-wrap {
  border-color: var(--line);
}

.rankings-table {
  background: var(--surface);
}

.rankings-table th,
.rankings-table td {
  border-bottom-color: var(--line);
}

.provisional-badge,
.methodology-limit {
  border-color: #d6a83d;
}

.provisional-badge {
  background: #fff8e4;
  color: #77520a;
}

.home-page,
.arena-page {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  box-sizing: border-box;
  width: 100%;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2rem;
  min-height: 4.25rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(220, 227, 239, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 0.42rem;
  background: var(--ink);
  color: #fff;
  font-family: ui-serif, Georgia, serif;
}

.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a,
.site-footer a {
  color: #435270;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 720;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35rem;
}

.site-header .language-switcher {
  margin: 0;
}

.home-shell {
  width: 100%;
}

.home-hero,
.leaderboard-section,
.homepage-arena,
.site-footer {
  width: min(76rem, calc(100% - 3rem));
  margin-inline: auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(4rem, 10vw, 8.5rem) 0 clamp(3rem, 8vw, 6rem);
}

.home-hero h1 {
  max-width: 13ch;
  color: #101a33;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(3rem, 6.5vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.93;
}

.hero-copy {
  padding-bottom: 0.35rem;
}

.hero-copy .tagline {
  margin-top: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 680;
  line-height: 1.35;
}

.leaderboard-section {
  padding: 3.5rem 0 5rem;
  border-top: 1px solid var(--line);
}

.homepage-arena {
  padding: 4.5rem 0 5.5rem;
  border-top: 1px solid var(--line);
}

.arena-invitation {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.arena-invitation h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.arena-invitation > p:last-child {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.homepage-arena .next-comparison {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.section-heading > div {
  max-width: 48rem;
}

.section-number,
.freshness,
.ranking-filters label {
  color: #7181a0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-number {
  margin: 0 0 0.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
}

.section-heading div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.freshness {
  white-space: nowrap;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.5rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
}

.metric-strip div {
  display: flex;
  min-height: 5.5rem;
  padding: 1rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-right: 1px solid var(--line);
}

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

.metric-strip strong {
  color: #2445c4;
  font-size: 1.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.25rem 0;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-label {
  margin-right: 0.25rem;
  color: #7181a0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.category-chip {
  display: inline-flex;
  min-height: 2.2rem;
  padding: 0.48rem 0.85rem;
  align-items: center;
  border: 1px solid #d3daea;
  border-radius: 999px;
  background: #fff;
  color: #52617d;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.category-chip:hover,
.category-chip:focus-visible {
  border-color: #9cace0;
  color: #2445c4;
}

.category-chip.is-active {
  border-color: #2445c4;
  background: #2445c4;
  color: #fff;
}

.home-table-wrap {
  border-radius: 0.75rem;
  box-shadow: 0 16px 45px rgba(27, 42, 78, 0.06);
}

.home-table-wrap:focus-visible {
  outline: 3px solid #9eb0ff;
  outline-offset: 3px;
}

.primary-ranking-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.primary-ranking-table thead {
  background: #eef2f8;
}

.primary-ranking-table thead th {
  color: #53617d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-ranking-table th,
.primary-ranking-table td {
  padding: 0.85rem 0.9rem;
}

.primary-ranking-table th:nth-child(1) {
  width: 4.5rem;
}

.primary-ranking-table th:nth-child(3),
.primary-ranking-table th:nth-child(4) {
  width: 10rem;
  text-align: center;
}

.primary-ranking-table tbody tr:hover {
  background: #f7f9fd;
}

.primary-ranking-table .top-ranked {
  background: #f0f4ff;
}

.primary-ranking-table .top-ranked .model-cell {
  box-shadow: inset 3px 0 0 var(--accent);
}

.rank-cell {
  color: #596985;
  text-align: center !important;
}

.model-cell {
  min-width: 14rem;
  color: #101a33;
  font-size: 0.94rem;
  text-align: left !important;
}

.model-cell > span {
  font-weight: 750;
}

.model-cell small {
  display: block;
  margin-top: 0.25rem;
  color: #7a88a3;
  font-weight: 400;
}

.score-cell strong {
  color: #2445c4;
  font-size: 1.05rem;
}

.human-score-cell {
  color: #53617d;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.judge-summary {
  margin: -0.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.matchup-details {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.matchup-details summary {
  cursor: pointer;
}

.matchup-details ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.duel-matrix-section {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.matrix-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.matrix-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: -0.025em;
}

.matrix-heading > p {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.duel-matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(27, 42, 78, 0.06);
  scrollbar-width: thin;
}

.duel-matrix-scroll:focus-visible {
  outline: 3px solid #9eb0ff;
  outline-offset: 3px;
}

.duel-matrix-svg {
  display: block;
  width: 100%;
  min-width: 48rem;
  height: auto;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.matrix-axis-label {
  fill: #435270;
  font-size: 10px;
}

.matrix-axis-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.matrix-cell text {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.matrix-cell rect {
  shape-rendering: crispEdges;
}

.matrix-legend-axis text {
  fill: #53617d;
  font-size: 10px;
}

.matrix-legend-axis line,
.matrix-legend-axis path {
  stroke: #93a0b8;
}

.duel-matrix-table-details {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.duel-matrix-table-details summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 700;
}

.duel-matrix-table-details .table-wrap {
  margin-top: 0.75rem;
}

.duel-matrix-table {
  min-width: max-content;
  border-collapse: collapse;
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.duel-matrix-table th,
.duel-matrix-table td {
  max-width: 10rem;
  padding: 0.55rem 0.7rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.duel-matrix-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 48rem) {
  .site-header {
    position: static;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
  }

  .site-header .language-switcher {
    justify-content: end;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2.1rem 0 2.4rem;
  }

  .home-hero h1 {
    font-size: clamp(2.55rem, 12vw, 4.3rem);
  }

  .home-hero-copy {
    gap: 1rem;
  }

  .home-actions {
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  .home-actions .primary-action {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .section-heading,
  .matrix-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .primary-ranking-table th,
  .primary-ranking-table td {
    padding: 0.7rem 0.4rem;
    font-size: 0.76rem;
  }

  .primary-ranking-table th:nth-child(1) {
    width: 2.6rem;
  }

  .primary-ranking-table th:nth-child(2),
  .primary-ranking-table .model-cell {
    width: auto;
    min-width: 0;
  }

  .primary-ranking-table th:nth-child(3),
  .primary-ranking-table th:nth-child(4) {
    width: 5.3rem;
    white-space: normal;
  }

  .model-cell small {
    font-size: 0.65rem;
  }
}

@media (max-width: 32rem) {
  .site-brand span:last-child {
    max-width: 9rem;
    line-height: 1.05;
  }

  .home-hero,
  .leaderboard-section,
  .homepage-arena,
  .site-footer {
    width: min(100% - 2rem, 76rem);
  }

  .audit-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 24rem) {
  .home-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 22.5rem) {
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-strip div,
  .metric-strip div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-strip div:last-child {
    border-bottom: 0;
  }
}
