:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #5f6a66;
  --line: #d8ddd2;
  --paper: #fbfbf7;
  --panel: #ffffff;
  --teal: #0b7f83;
  --teal-dark: #075e61;
  --coral: #d95d39;
  --gold: #e0a422;
  --mint: #dcefe7;
  --rose: #f5dfd9;
  --shadow: 0 18px 60px rgba(24, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(220, 239, 231, 0.72), rgba(251, 251, 247, 0) 460px),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(216, 221, 210, 0.8);
  background: rgba(251, 251, 247, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  min-height: 430px;
  padding: 42px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(56px, 8vw, 108px);
  line-height: 0.9;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.hero-subtitle {
  max-width: 560px;
  margin: 20px 0 0;
  color: #38423f;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.18;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(24, 32, 31, 0.05);
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.button:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
  margin: 30px 0 0;
}

.hero-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.hero-stats dt {
  font-size: 18px;
  font-weight: 850;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-media {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.montage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  width: 80%;
  max-width: 80%;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(24, 32, 31, 0.12);
  border-radius: 8px;
  background: #101615;
  box-shadow: var(--shadow);
}

.montage-tile {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: visible;
  min-width: 0;
  min-height: 124px;
  border-radius: 6px;
  background: #111;
}

.montage-video {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 320 / 420;
  background: #111;
  overflow: visible;
}

.montage-video video {
  display: block;
  width: auto;
  height: 80%;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.montage-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px 8px;
  background: #101615;
  color: white;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.12;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.section {
  padding: 44px 0;
}

.leaderboard-section {
  padding-top: 18px;
}

.leaderboard-section .section-heading {
  display: grid;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.section-note.leaderboard-note {
  width: 100%;
  max-width: none;
  font-size: 18px;
  margin: -6px 0 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-note {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.findings-section {
  padding-top: 24px;
}

.findings-section .section-heading {
  display: grid;
  align-items: start;
  gap: 10px;
}

.findings-section .section-note {
  width: 100%;
  max-width: none;
  font-size: 18px;
}

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

.capability-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 28px rgba(24, 32, 31, 0.06);
}

.capability-card span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--mint);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
}

h3 {
  margin: 0;
  letter-spacing: 0;
}

.capability-card h3,
.failure-card h3 {
  font-size: 18px;
  line-height: 1.18;
}

.capability-card p,
.failure-heading p,
.failure-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.failure-heading {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 34px 0 16px;
}

.failure-heading h3 {
  font-size: 28px;
  line-height: 1.08;
}

.failure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.failure-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 28px rgba(24, 32, 31, 0.07);
}

.failure-card figure {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 80%;
  aspect-ratio: 2400 / 1851;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #edf0ea;
  background: white;
}

.failure-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.failure-card div {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px);
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 127, 131, 0.13);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(24, 32, 31, 0.07);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0ea;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7ef;
  color: #3d4944;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
}

tbody tr:hover {
  background: #f9fbf5;
}

.rank-cell {
  width: 68px;
}

.model-name {
  display: grid;
  gap: 3px;
}

.model-name strong {
  font-size: 15px;
}

.model-name span {
  color: var(--muted);
  font-size: 12px;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 30px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 850;
}

.combined-table {
  min-width: 1840px;
}

.sticky-col {
  position: sticky;
  background: white;
  z-index: 2;
}

th.sticky-col {
  background: #f4f7ef;
  z-index: 4;
}

.sticky-rank {
  left: 0;
  min-width: 68px;
}

.sticky-model {
  left: 68px;
  min-width: 210px;
}

.sticky-think {
  left: 278px;
  min-width: 84px;
}

.sticky-score {
  left: 362px;
  min-width: 92px;
}

.sticky-avg-rank {
  left: 454px;
  min-width: 104px;
  border-right: 1px solid #cbd2c8;
}

.game-head {
  min-width: 72px;
  max-width: 82px;
  white-space: normal;
  line-height: 1.1;
  text-align: center;
}

.heat-cell {
  min-width: 70px;
  text-align: center;
  font-weight: 850;
}

.missing-cell {
  background: #f3f1ea;
  color: #8c918d;
}

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

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 28px rgba(24, 32, 31, 0.07);
}

.video-frame {
  aspect-ratio: 16 / 10;
  background: #101615;
}

.video-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.video-meta strong {
  font-size: 16px;
}

.video-meta span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.workflow-layout {
  display: grid;
  gap: 16px;
}

.workflow-figure {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 28px rgba(24, 32, 31, 0.07);
}

.workflow-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.pipeline div {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8faf4);
}

.pipeline strong {
  font-size: 18px;
}

.pipeline span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #18201f;
  color: #f5f5ed;
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-media {
    order: 2;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .capability-grid,
  .failure-grid,
  .video-grid,
  .pipeline {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

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

  main {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 28px;
  }

  .hero-stats,
  .montage,
  .capability-grid,
  .failure-grid,
  .video-grid,
  .pipeline {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 56px;
  }

  th,
  td {
    padding: 10px;
  }
}
