:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --line-strong: #b8c2d1;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --teal: #0f766e;
  --teal-soft: #ccfbf1;
  --rose: #9f1239;
  --rose-soft: #ffe4e6;
  --gold: #a16207;
  --gold-soft: #fef3c7;
  --shadow: 0 18px 48px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(216, 222, 232, 0.92);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--blue);
}

.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 72px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: 12px 0;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 11ch;
  font-size: 5.2rem;
  font-weight: 850;
}

h2 {
  font-size: 2.1rem;
  font-weight: 800;
}

h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.lede {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover {
  color: var(--blue);
}

.activation-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.button,
.chip-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button {
  padding: 0 16px;
}

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

.button.secondary:hover,
.chip-button:hover {
  border-color: var(--blue);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}

.summary-strip div,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}

.summary-strip div {
  padding: 14px;
}

.summary-strip span,
.metric span,
.filter-group > span,
.search-box span,
.axis-note {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-strip strong,
.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.trajectory-preview {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
  box-shadow: var(--shadow);
}

.trajectory-preview img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: contain;
  background: #ffffff;
}

.trajectory-preview figcaption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.4;
}

.trajectory-preview figcaption strong {
  color: var(--teal);
  text-align: right;
}

.panel,
.tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
  margin-bottom: 24px;
  min-width: 0;
}

.panel.compact {
  margin-bottom: 0;
}

.panel-head,
.tool-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-head {
  margin-bottom: 18px;
}

.tool-head {
  margin-bottom: 14px;
}

.stamp,
.command,
.muted {
  color: var(--muted);
}

.stamp {
  margin: 0;
  text-align: right;
}

.command {
  margin: 14px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.metric {
  padding: 14px;
}

.benchmark-grid,
.starter-layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.benchmark-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.tool-panel {
  padding: 18px;
  min-width: 0;
  box-shadow: none;
}

.scatter {
  min-height: 310px;
}

.benchmark-filter,
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-filter {
  margin: -3px 0 10px;
}

.map-note {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.map-legend {
  margin: 0 0 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.25;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.45);
}

.scatter-plot {
  position: relative;
  height: 310px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface-subtle);
  background-size: 25% 25%;
}

.axis-label {
  position: absolute;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.x-axis {
  right: 12px;
  bottom: 8px;
}

.y-axis {
  left: 10px;
  top: 8px;
}

.point {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transform: translate(-8px, -8px);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.dot {
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 1px rgba(159, 18, 57, 0.45);
}

.legend-dot.kitti_00_full,
.point.kitti_00_full .dot {
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.45);
}

.legend-dot.kitti_07_full,
.point.kitti_07_full .dot {
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.45);
}

.legend-dot.kitti_07_smoke,
.point.kitti_07_smoke .dot {
  background: var(--rose);
  box-shadow: 0 0 0 1px rgba(159, 18, 57, 0.45);
}

.legend-dot.autoware_108_reference,
.point.autoware_108_reference .dot {
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(161, 98, 7, 0.45);
}

.legend-dot.shape-reference,
.scatter-plot .point.gt_seeded_reference .dot {
  border-radius: 3px;
}

.legend-dot.shape-odometry,
.scatter-plot .point.odometry_only .dot {
  border-radius: 50%;
}

.point-label {
  padding: 3px 6px;
  border: 1px solid rgba(216, 222, 232, 0.85);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
}

.leaderboard {
  display: grid;
  gap: 9px;
}

.leaderboard-note {
  margin: -4px 0 13px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.reference-leaderboard {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.leaderboard-section-title {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 850;
}

.leaderboard-row.reference .rank {
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.64rem;
}

.method {
  font-weight: 800;
}

.ate {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.leaderboard-row.reference .ate {
  color: var(--gold);
}

.smoke-baseline {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.smoke-head {
  display: grid;
  gap: 12px;
}

.smoke-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.smoke-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.smoke-grid {
  display: grid;
  gap: 8px;
}

.smoke-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.smoke-row strong {
  font-size: 0.9rem;
}

.smoke-row span {
  color: var(--muted);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  min-width: 0;
}

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

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

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

th {
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.status-ok {
  background: var(--teal-soft);
  color: #0f3f3b;
}

.status-pill.status-skipped {
  background: var(--gold-soft);
  color: var(--gold);
}

.search-box {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
}

.search-box input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.filter-group {
  display: grid;
  gap: 8px;
}

.segmented,
.track-buttons,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 0.88rem;
}

.chip-button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: #0f3f3b;
}

.starter-layout {
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  align-items: start;
}

.starter {
  position: sticky;
  top: 84px;
}

.starter .muted {
  min-height: 44px;
  margin: 14px 0;
  line-height: 1.55;
}

.track-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.track-list li {
  padding-left: 4px;
}

.track-list a {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.track-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  min-width: 0;
}

.method-card {
  display: grid;
  gap: 10px;
  min-height: 182px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.method-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.method-card-head a {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 850;
  text-decoration: none;
}

.method-card-head a:hover {
  color: var(--blue);
}

.scope,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.scope {
  padding: 0 8px;
  background: var(--gold-soft);
  color: var(--gold);
}

.method-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.tag {
  padding: 0 7px;
  background: var(--blue-soft);
  color: #1d4ed8;
}

.tag:nth-child(3n) {
  background: var(--rose-soft);
  color: var(--rose);
}

.tag:nth-child(3n + 1) {
  background: var(--teal-soft);
  color: #0f3f3b;
}

.empty {
  margin: 0;
  color: var(--muted);
}

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

.privacy-note {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.quickstart-lede {
  max-width: 72ch;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.platform-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.platform-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.platform-tab.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: #1d4ed8;
}

.command-shell {
  position: relative;
}

.command-shell pre {
  min-height: 128px;
  padding-right: 148px;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #1f2937;
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.success-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.success-path > div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.success-path span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
}

.success-path strong {
  font-size: 0.95rem;
}

.success-path p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.success-path code {
  display: inline;
  padding: 0;
  color: var(--ink);
  font-size: inherit;
}

.native-details {
  margin-top: 16px;
  color: var(--muted);
}

.native-details summary {
  width: fit-content;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.native-details pre {
  margin-top: 10px;
}

.local-metrics-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.local-metrics-note p {
  max-width: 76ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.local-metrics-note button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.button:focus-visible,
.platform-tab:focus-visible,
.copy-button:focus-visible,
.local-metrics-note button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

pre {
  min-height: 98px;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}

code {
  display: block;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .intro-grid,
  .benchmark-grid,
  .starter-layout,
  .filter-grid,
  .code-grid,
  .success-path {
    grid-template-columns: 1fr;
  }

  .intro-copy,
  .trajectory-preview {
    min-height: auto;
  }

  .trajectory-preview img {
    min-height: 320px;
  }

  h1 {
    font-size: 4.1rem;
  }

  .starter {
    position: static;
  }
}

@media (max-width: 700px) {
  .topbar,
  .panel-head,
  .trajectory-preview figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
  }

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

  .page {
    width: min(100vw - 20px, 1180px);
    padding-top: 20px;
  }

  h1 {
    max-width: 12ch;
    font-size: 2.8rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .stamp,
  .trajectory-preview figcaption strong {
    text-align: left;
  }

  .panel {
    padding: 16px;
  }

  .command-shell pre {
    padding-top: 58px;
    padding-right: 0;
  }

  .local-metrics-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .scatter,
  .scatter-plot {
    min-height: 280px;
    height: 280px;
  }

  .point-label {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .leaderboard-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .leaderboard-row .ate {
    grid-column: 2;
  }

  .smoke-row span {
    white-space: normal;
  }
}
