:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #607089;
  --line: #dfe5ec;
  --line-soft: #edf1f5;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --accent: #175cd3;
  --accent-dark: #11479f;
  --accent-soft: #eaf2ff;
  --focus: #84adff;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: #f4f6f9;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfe 0, #f4f6f9 420px), #f4f6f9;
}

button {
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline: 3px solid color-mix(in srgb, var(--focus) 62%, transparent);
  outline-offset: 2px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.header-inner,
.page-shell {
  width: min(1680px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-mark {
  flex: 0 0 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand strong {
  font-weight: 700;
}

.brand-divider {
  margin-inline: 7px;
  color: #c0c8d3;
}

.submit-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 7px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.submit-link:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.page-shell {
  padding-block: 34px 64px;
}

.collection-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.collection-note a {
  color: var(--accent);
}

.load-state {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.load-state[hidden] {
  display: none;
}

.load-state.is-error {
  color: var(--danger);
  border-color: #f2c8c4;
  background: #fff8f7;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 1.25s ease-in-out infinite;
}

.load-state.is-error .loading-dot {
  display: none;
}

@keyframes pulse {
  50% { opacity: 0.42; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-dot { animation: none; }
}

.retry-button {
  margin-left: 4px;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.content-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
}

.content-section + .content-section {
  margin-top: 22px;
}

.chart-section {
  padding-bottom: 14px;
}

.section-heading {
  min-height: 80px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.chart-section .section-heading > div:first-child {
  flex-shrink: 0;
}

.chart-controls {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
}

.chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-toggle {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  background: var(--surface);
  font-size: 11px;
  font-weight: 650;
}

.range-toggle:hover {
  border-color: #b8c9e4;
  background: var(--accent-soft);
}

.timeline-chart {
  width: 100%;
  height: 370px;
}

.point-details {
  margin: 18px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#point-details .point-details-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

#point-details tr,
#point-details th,
#point-details td {
  height: auto;
}

#point-details th,
#point-details td {
  padding: 4px 16px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
  font-size: 12px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#point-details th {
  width: 195px;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 500;
}

#point-details td {
  width: auto;
  color: #344054;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
}

#point-details tr:first-child td {
  color: #175cd3;
  font-size: 15px;
  font-weight: 650;
}

@media (max-width: 600px) {
  .point-details { margin: 16px 18px 18px; }
  #point-details th, #point-details td { padding: 4px 11px; font-size: 11px; }
  #point-details th { width: 108px; }
}

.chart-fallback {
  min-height: 230px;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 28px;
  color: var(--muted);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 96px 100%;
  text-align: center;
}

.chart-fallback strong {
  color: #344054;
  font-size: 14px;
}

.chart-fallback span {
  max-width: 520px;
  font-size: 12px;
  line-height: 1.5;
}

.table-frame {
  width: 100%;
  overflow-x: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 2px 24px 8px;
  color: var(--muted);
  font-size: 11px;
}
.chart-legend [hidden] { display: none; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: #175cd3; }
.legend-generation-500 { background: #b42318; }
.legend-generation-other { background: #64748b; }
.legend-evaluation-time { width: 7px; height: 7px; border: 1px solid #64748b; transform: rotate(45deg); }
.legend-checkpoint-time { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.legend-observed-evaluation { width: 7px; height: 7px; background: #64748b; }
.legend-estimated-checkpoint { width: 7px; height: 7px; border: 1px solid #64748b; border-radius: 50%; }
.legend-real-baseline { width: 22px; height: 7px; border-top: 2px dashed #ec4899; background: rgba(236, 72, 153, 0.16); }
.legend-frontier { width: 20px; border-top: 2px solid #ea580c; }
.baseline-method {
  margin: 0 24px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.baseline-method[hidden] { display: none; }
.baseline-method summary { cursor: pointer; }
.baseline-method p { margin: 8px 0 0; }

.table-scroll-hint {
  display: none;
  margin: 12px 18px;
  color: var(--muted);
  font-size: 11px;
}

table {
  width: 100%;
  min-width: 1560px;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th:first-child,
td:first-child { width: 12%; }

th:nth-child(2),
td:nth-child(2) { width: 8%; }

th:nth-child(3), td:nth-child(3) { width: 7%; }
th:nth-child(4), td:nth-child(4) { width: 8%; }
th:nth-child(5), td:nth-child(5),
th:nth-child(6), td:nth-child(6) { width: 25%; }
th:nth-child(7), td:nth-child(7) { width: 15%; }

.created-entry + .created-entry { margin-top: 12px; }
.created-date { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }
.created-label, .created-basis, .created-unresolved {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.created-unresolved { margin-top: 8px; }

.table-frame table { min-width: 2200px; }
.table-frame th:first-child, .table-frame td:first-child { width: 9%; }
.table-frame th:nth-child(2), .table-frame td:nth-child(2) { width: 6%; }
.table-frame th:nth-child(3), .table-frame td:nth-child(3) { width: 5%; }
.table-frame th:nth-child(4), .table-frame td:nth-child(4) { width: 6%; }
.table-frame th:nth-child(5), .table-frame td:nth-child(5),
.table-frame th:nth-child(6), .table-frame td:nth-child(6) { width: 19%; }
.table-frame th:nth-child(7), .table-frame td:nth-child(7) { width: 12%; }
.table-frame th:nth-child(8), .table-frame td:nth-child(8) { width: 9%; }
.table-frame th:nth-child(9), .table-frame td:nth-child(9) { width: 8%; }
.table-frame th:nth-child(10), .table-frame td:nth-child(10) { width: 7%; }
.table-scroll-hint { display: block; }

.model-zoo-cell a,
.wandb-cell a {
  display: block;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.model-zoo-cell a + a,
.wandb-cell a + a,
.model-zoo-status + .training-log-link { margin-top: 5px; }
.model-zoo-status,
.training-link-status {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.model-zoo-cell a + .model-zoo-status,
a + .training-link-status { margin-top: 6px; }

.column-unit {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.length-cell {
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.checkpoint-entry + .checkpoint-entry { margin-top: 12px; }
.checkpoint-missing { color: var(--muted); }

.source-path {
  display: block;
  overflow-wrap: anywhere;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  user-select: text;
}

.path-type {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

th {
  height: 44px;
  padding: 0 24px;
  color: #536176;
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  height: 49px;
  padding: 10px 24px;
  color: #334155;
  font-size: 13px;
}

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

tbody tr:hover td {
  background: #fbfcfe;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -8px;
  padding: 8px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.sort-button:hover {
  color: var(--accent);
}

.sort-indicator {
  min-width: 10px;
  color: var(--accent);
  font-size: 12px;
}

.date-cell {
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.unknown-date {
  color: #7b8797;
}

.generation-length[data-generation-length="250"] {
  color: #175cd3;
  font-weight: 600;
}

.generation-length[data-generation-length="500"] {
  color: #b42318;
  font-weight: 600;
}

.score-warning {
  display: block;
  margin-top: 5px;
  color: #9a3412;
  font-size: 10px;
  font-weight: 500;
  white-space: normal;
}

.score-cell {
  color: #142b4a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
  padding-inline: 12px;
  font-size: 11px;
}

.empty-message {
  margin: 0;
  padding: 52px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1610px) {
  .table-scroll-hint { display: block; }
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell {
    width: min(100% - 28px, 1060px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 13px;
  }

  .brand-divider,
  .brand-divider + span {
    display: none;
  }

  .page-shell {
    padding-block: 24px 44px;
  }

  .section-heading {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 19px 18px 15px;
  }

  .section-note {
    text-align: left;
  }

  .chart-controls {
    align-items: flex-start;
  }

  .timeline-chart {
    height: 330px;
  }

  th,
  td {
    padding-inline: 14px;
  }

  .table-scroll-hint { display: block; }
}

@media (max-width: 430px) {
  .chart-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
  }

  .submit-link {
    padding-inline: 7px;
  }

  .submit-link span,
  .brand-mark {
    display: none;
  }

  th,
  td {
    padding-inline: 11px;
  }

  th {
    font-size: 9px;
  }
}

.mode-filter-bar { padding: 0 20px 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.mode-filter-bar label { font-weight: 600; }
.mode-filter-bar select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 28px 6px 9px; }
.mode-filter-bar p { flex: 1 1 380px; margin: 0; color: var(--muted); line-height: 1.5; }
.mode-metric, .mode-status { display: block; font-family: Inter, ui-sans-serif, sans-serif; font-size: 10px; line-height: 1.35; font-weight: 400; color: var(--muted); white-space: normal; }
.mode-metric { max-width: 180px; margin-top: 2px; }
.mode-score-details, .original-source-details { margin-top: 3px; font-size: 10px; line-height: 1.4; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.mode-score-details summary, .original-source-details summary { cursor: pointer; color: var(--muted); }
.mode-score-details p { margin: 6px 0; max-width: 260px; }
.table-frame table:has(.mode-score-details[open]) th:nth-child(2),
.table-frame table:has(.mode-score-details[open]) td:nth-child(2) { width: 340px; }
.mode-score-details[open] { font-family: Inter, ui-sans-serif, sans-serif; font-size: 11px; line-height: 1.5; }
.mode-score-details[open] p { max-width: none; }
.mode-provenance { margin: 6px 0; }
.mode-source-proof { border-left: 2px solid var(--line); padding-left: 7px; }
.source-group-start td { border-top: 2px solid var(--line); }
.sort-button:disabled { cursor: default; opacity: .6; }
