:root {
  --ink: #17201f;
  --muted: #5f6f6a;
  --line: #d9e1de;
  --paper: #f7faf9;
  --surface: #ffffff;
  --header: #214f73;
  --header-dark: #173a56;
  --teal: #0f6f69;
  --teal-dark: #07514d;
  --mint: #e4f2e9;
  --rose: #b84a5a;
  --shadow: 0 10px 26px rgba(23, 32, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Lato, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-header {
  background: var(--header);
  color: #ffffff;
  max-width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 28px;
  background: var(--header-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--header-dark);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
}

.nav-links a {
  flex: 0 0 auto;
  text-decoration: none;
}

.nav-links a:hover,
.brand:hover {
  color: #c9f2d6;
}

.masthead {
  background: var(--header);
  max-width: 100%;
}

.masthead-inner {
  width: 100%;
  min-width: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 46px 28px 54px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.masthead .eyebrow {
  color: #c9f2d6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0 0 12px;
  font-size: 76px;
  line-height: 0.95;
}

h2 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.2;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.subtitle {
  max-width: 920px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.headline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 160px));
  gap: 12px;
}

.headline-stats div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.headline-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.headline-stats span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.page-shell {
  width: 100%;
  min-width: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.layout-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 22px;
  align-items: start;
}

.info-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.info-block,
.leaderboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.info-block {
  min-width: 0;
  padding: 18px;
  overflow: hidden;
}

.info-block p:last-child,
.compact-list,
.protocol-list {
  margin-bottom: 0;
}

.info-block p,
.compact-list,
.protocol-list,
.status-list {
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: #eef7f3;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
}

.resource-button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resource-button:hover {
  background: var(--teal);
  color: #ffffff;
}

.resource-button svg {
  width: 17px;
  height: 17px;
}

.status-list {
  display: grid;
  gap: 8px;
}

.status-list p {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--rose);
}

.compact-list,
.protocol-list {
  padding-left: 20px;
}

.compact-list li,
.protocol-list li {
  margin-bottom: 8px;
}

.compact-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.leaderboard-card {
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.leaderboard-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 14px;
  background: #fbfdfc;
  border-bottom: 1px solid var(--line);
}

.control-group {
  min-width: 0;
}

.metric-control {
  justify-self: stretch;
  width: 100%;
}

.dataset-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: end;
  gap: 14px;
}

.split-control,
.dataset-control {
  width: 100%;
}

.split-control {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.split-control .segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  width: min(100%, 360px);
  gap: 3px;
  overflow-x: visible;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #edf4f2;
}

.split-control .segmented button {
  flex: 1 1 0;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  justify-content: center;
  text-align: center;
}

.dataset-control .segmented {
  flex-wrap: wrap;
  overflow-x: visible;
  gap: 8px;
}

.dataset-control .segmented button {
  min-width: 88px;
  text-align: center;
}

.control-group > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.segmented {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.segmented button,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.segmented button {
  flex: 0 0 auto;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.segmented button[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

select {
  width: 100%;
  padding: 8px 12px;
}

.task-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 12px;
}

.summary-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.05;
}

.summary-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.task-note {
  margin: 0;
  padding: 0 20px 14px;
  color: var(--muted);
  font-size: 14px;
}

.table-caption {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.leaderboard-table {
  min-width: 560px;
}

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

th {
  color: var(--muted);
  background: #fbfdfc;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rank-cell {
  width: 76px;
  text-align: center;
}

.leaderboard-table th:first-child {
  width: 76px;
  text-align: center;
}

.leaderboard-table th:last-child,
.score-cell {
  width: 130px;
  text-align: right;
}

.comparison-head,
.comparison-test {
  border-left: 1px solid var(--line);
}

.comparison-test {
  background: #f8fbfa;
}

.rank-cell strong {
  font-size: 20px;
}

.method-cell strong {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.method-cell span {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.score-cell {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 900;
}

.score-cell.is-best {
  background: #edf7f4;
  color: var(--teal-dark);
}

.score-cell strong {
  display: block;
}

.score-missing {
  color: #8a9995;
  font-size: 13px;
  font-weight: 900;
}

.compact-table table {
  min-width: 720px;
}

.compact-table td:last-child {
  color: var(--muted);
  font-size: 13px;
}

.code-block {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid #2b3d3a;
  border-radius: 8px;
  background: #1d2624;
  color: #f2f7f5;
  font-size: 12px;
  line-height: 1.55;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    width: 100vw;
    max-width: 100vw;
    padding: 14px 18px;
  }

  .nav-links {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 2px;
  }

  .masthead-inner,
  .page-shell {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding-right: 16px;
    padding-left: 16px;
  }

  .layout-grid,
  .info-column,
  .info-block,
  .leaderboard-card,
  .table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .info-block,
  .leaderboard-card {
    overflow: hidden;
  }

  table {
    min-width: 520px;
  }

  .compact-table table {
    min-width: 620px;
  }

  .masthead-inner {
    padding-top: 36px;
    padding-bottom: 40px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 22px;
  }

  .subtitle {
    font-size: 17px;
  }

  .headline-stats,
  .resource-grid,
  .dataset-metric-row,
  .task-summary {
    grid-template-columns: 1fr;
  }

  .split-control .segmented {
    display: grid;
    width: 100%;
  }

  .footer {
    flex-direction: column;
    padding: 24px 16px 36px;
  }
}
