:root {
  --ink: #182234;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --paper: #f8fafc;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font:
    14px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select {
  font: inherit;
}
button,
summary,
select {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}
button {
  color: var(--ink);
}
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 4vw;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 18px;
  font-weight: 750;
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--blue);
}
nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 4vw;
}
.hero {
  padding: 44px 0 28px;
}
.hero .signal {
  display: none;
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.15em;
  color: var(--muted);
}
h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -1.6px;
  margin: 14px 0;
}
.title-light {
  color: #758196;
  font-weight: 450;
}
.lede {
  font-size: 16px;
  color: var(--muted);
  max-width: 830px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.button {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 12px;
  background: #fff;
}
.button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.button:hover {
  border-color: #94a3b8;
  text-decoration: none;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.status-grid article {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.status-grid article:last-child {
  border: 0;
}
.status-grid span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.status-grid strong {
  font-size: 15px;
}
.section {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 85px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 10px 0 20px;
}
h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 5px;
  letter-spacing: -0.2px;
}
.note,
.message {
  font-size: 12px;
  color: var(--muted);
}
.message {
  margin: 18px 0 6px;
}
.message:empty,
.note:empty,
.chart-label:empty {
  display: none;
}
.category-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 20px;
}
.category-strip button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.category-strip button span {
  margin-left: 10px;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--muted);
}
.category-strip button[aria-pressed="true"] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.filter-bar {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.65fr 1.2fr 1fr 1fr 1.1fr;
  gap: 12px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.search {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 650;
  color: #475569;
}
.search input,
.search select {
  width: 100%;
  min-width: 0;
  height: 37px;
  border: 1px solid #d6dfe9;
  border-radius: 6px;
  background: #fff;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
}
.model-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px 16px;
}
.model-picker summary {
  font-size: 12px;
  font-weight: 600;
}
.picker-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.picker-actions button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
}
#model-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  font-size: 12px;
}
#model-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.model-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}
.analysis-tabs {
  display: flex;
  gap: 25px;
  margin-top: 26px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.analysis-tabs button {
  white-space: nowrap;
  padding: 12px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.analysis-tabs button[aria-selected="true"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.analysis-panel[hidden] {
  display: none;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.chart-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 20px 18px 8px;
  box-shadow: 0 2px 5px #0f172a03;
}
.chart-card > p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 4px;
}
.plot {
  width: 100%;
  min-height: 330px;
}
.wide-chart {
  margin: 18px 0;
}
.chart-heading,
.chart-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
}
.chart-heading {
  justify-content: space-between;
  align-items: center;
}
.chart-controls {
  margin: 20px 0 14px;
}
.chart-controls .search,
.chart-heading .search {
  min-width: 145px;
  flex: 0 1 240px;
}
.chart-controls .button {
  height: 37px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  font-size: 12px;
  color: var(--muted);
}
.pair-stats {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .chart-controls .search {
    flex: 1 1 140px;
  }
  .chart-heading .search {
    flex: 1 1 100%;
  }
  .analysis-tabs {
    gap: 20px;
  }
}
.table-heading {
  margin-top: 32px;
  margin-bottom: 12px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--paper);
  color: var(--muted);
}
td small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  max-width: 270px;
  white-space: normal;
  overflow-wrap: anywhere;
}
td details {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #f8fafc;
}
#leaderboard table td:nth-child(2),
#leaderboard table th:nth-child(2) {
  position: sticky;
  left: 0;
  background: white;
  z-index: 1;
  min-width: 155px;
  border-right: 1px solid var(--line);
}
#leaderboard table th:nth-child(2) {
  background: var(--paper);
}
.badge {
  font-size: 10px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
  padding: 3px 7px;
}
#archive a {
  color: #1d4ed8;
  text-decoration: underline;
}
.chart-label {
  font-size: 12px;
  color: var(--muted);
  max-width: 600px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}
.split p,
.join p {
  color: var(--muted);
}
.steps {
  padding: 0;
  list-style: none;
}
.steps li {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.steps b {
  color: var(--blue);
}
.steps strong {
  display: block;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.metric-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric-grid p {
  color: var(--muted);
  font-size: 12px;
}
.join {
  text-align: center;
}
.join .actions {
  justify-content: center;
}
.join p {
  max-width: 800px;
  margin: 0 auto;
}
code {
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
}
footer {
  display: flex;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 25px 4vw;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 1000px) {
  nav {
    gap: 10px;
  }
  .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #model-options {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  #panel-overview > .chart-card,
  #panel-datasets > .chart-card,
  #panel-pairs > .chart-card {
    overflow-x: auto;
  }
  #heatmap-chart,
  #domain-chart,
  #pairwise-chart {
    min-width: 660px;
  }
  main {
    padding: 0 16px;
  }
  .nav {
    position: static;
    flex-wrap: wrap;
    padding: 14px 16px;
  }
  .hero {
    padding-top: 25px;
  }
  .hero .actions {
    display: none;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .status-grid article {
    padding: 12px;
  }
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .comparison-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .metric-grid,
  #model-options {
    grid-template-columns: 1fr 1fr;
  }
  .section {
    padding: 30px 0;
  }
  .chart-card {
    padding: 15px 8px 3px;
  }
  .category-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .category-strip button {
    white-space: nowrap;
  }
  .analysis-tabs {
    gap: 20px;
  }
  footer {
    gap: 20px;
  }
  .section-title > .button {
    margin-bottom: 12px;
  }
}
