:root {
  --bg: #f5f1ec;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #1f2430;
  --muted: #68717f;
  --line: #d9d0c2;
  --brand: #b33a2f;
  --brand-dark: #842920;
  --brand-soft: #f6d3cb;
  --blue: #2f69c8;
  --blue-soft: #d9e7ff;
  --red: #d43f36;
  --red-soft: #ffe0dc;
  --gold: #e6a94a;
  --green: #2f8f62;
  --shadow: 0 18px 42px rgba(31, 36, 48, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(230, 169, 74, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(179, 58, 47, 0.12), transparent 32%),
    var(--bg);
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(245, 241, 236, 0.84);
  border-bottom: 1px solid rgba(217, 208, 194, 0.85);
}

.topbar-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), #18181d);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.18s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.nav-links a.is-cta {
  color: white;
  background: var(--brand);
}

.nav-links a.is-cta:hover {
  background: var(--brand-dark);
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 38px;
  background:
    linear-gradient(130deg, rgba(21, 24, 33, 0.96), rgba(29, 17, 25, 0.96)),
    linear-gradient(160deg, var(--brand), transparent 60%);
  color: white;
  box-shadow: var(--shadow);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-panel::before {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(212, 63, 54, 0.38), transparent 70%);
}

.hero-panel::after {
  width: 320px;
  height: 320px;
  left: -80px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(230, 169, 74, 0.22), transparent 72%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.hero-title {
  margin: 6px 0 14px;
  font-size: clamp(1.5rem, 2.35vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-title .accent {
  color: #ffd7cc;
}

.hero-subtitle {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  margin-bottom: 18px;
}

.authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.authors {
  margin-bottom: 12px;
}

.author-pill,
.affiliation-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.92rem;
}

.hero-meta {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 800;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.95rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--brand);
  border: 1px solid rgba(179, 58, 47, 0.65);
}

.btn-secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(217, 208, 194, 0.9);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary:hover {
  background: #f7f2eb;
}

.hero-card-stack {
  display: grid;
  gap: 14px;
}

.mini-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.mini-card strong {
  display: block;
  font-size: 1.65rem;
  margin-bottom: 6px;
}

.mini-card span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.section {
  margin-top: 34px;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(217, 208, 194, 0.75);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 10px 32px rgba(31, 36, 48, 0.05);
}

.section-header {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.section-kicker {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2.05rem);
  letter-spacing: -0.03em;
}

.section p.lead {
  margin: 0;
  max-width: 860px;
  color: var(--muted);
  font-size: 1.03rem;
}

.figure-card,
.content-card {
  background: var(--surface-strong);
  border: 1px solid rgba(217, 208, 194, 0.72);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(31, 36, 48, 0.05);
}

.figure-card img {
  width: 100%;
}

.teaser-card {
  width: 100%;
  margin: 0 auto;
}

.figure-caption {
  padding: 14px 18px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.stat-block {
  padding: 22px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249,246,239,0.88));
  border: 1px solid rgba(217, 208, 194, 0.8);
}

.stat-block strong {
  display: block;
  font-size: 2rem;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-block span {
  display: block;
  color: var(--muted);
  font-size: 0.93rem;
}

.dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.33fr) minmax(0, 0.67fr);
  gap: 22px;
}

.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.bullet-list {
  display: grid;
  gap: 14px;
}

.bullet-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(217, 208, 194, 0.72);
  border-radius: 20px;
}

.bullet-item .icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  font-size: 1.2rem;
}

.bullet-item strong {
  display: block;
  margin-bottom: 4px;
}

.taxonomy-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.chip-red {
  background: var(--red-soft);
  color: var(--red);
}

.chip-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.chip-gold {
  background: #fdeecf;
  color: #9a6914;
}

.chip-sky {
  background: #e8f1ff;
  color: #2f69c8;
}

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

.info-card {
  padding: 22px;
  background: var(--surface-strong);
  border-radius: 22px;
  border: 1px solid rgba(217, 208, 194, 0.72);
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.info-card p,
.info-card li {
  color: var(--muted);
  font-size: 0.95rem;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.page-link {
  padding: 22px;
  border-radius: 24px;
  text-decoration: none;
  border: 1px solid rgba(217, 208, 194, 0.8);
  background: rgba(255,255,255,0.76);
}

.page-link:hover {
  border-color: rgba(179, 58, 47, 0.30);
}

.page-link strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.page-link span {
  color: var(--muted);
  font-size: 0.94rem;
}

.dataset-shell {
  display: grid;
  gap: 20px;
}

.sample-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sample-chip {
  border: 1px solid rgba(217, 208, 194, 0.9);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

.sample-chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.viewer-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1.35fr) 210px;
  gap: 18px;
  align-items: start;
}

.timeline-column,
.dataset-card {
  background: #fff;
  border: 1px solid rgba(217, 208, 194, 0.82);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(31, 36, 48, 0.05);
}

.timeline-column {
  padding: 18px 16px;
}

.timeline-column h3,
.dataset-card h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.red-heading {
  color: #c63f39;
}

.blue-heading {
  color: #2f69c8;
}

.timeline-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.79rem;
}

.event-list {
  display: grid;
  gap: 10px;
  height: clamp(610px, 64vh, 700px);
  overflow: auto;
  padding-right: 4px;
}

.event-item {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(217, 208, 194, 0.75);
  background: #fcfaf6;
  transition: 0.15s ease;
}

.event-item.is-active {
  background: #fff2f0;
  border-color: rgba(212, 63, 54, 0.45);
  transform: translateX(2px);
}

.event-item.blue.is-active {
  background: #eef5ff;
  border-color: rgba(47, 105, 200, 0.40);
}

.event-item time {
  display: block;
  font-size: 0.77rem;
  font-weight: 800;
  color: var(--muted);
}

.event-item strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 0.86rem;
}

.event-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.dataset-card {
  padding: 18px;
}

.dataset-card h3 {
  font-size: 0.98rem;
}

.matchup-line {
  margin: -4px 0 14px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--muted);
}

.matchup-blue {
  color: #2f69c8;
}

.matchup-red {
  color: #c63f39;
}

.viewer-stage {
  position: relative;
  background: linear-gradient(180deg, #11161e, #0b0d12);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 8.8;
}

.viewer-stage video,
.viewer-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-stage video {
  object-fit: contain;
}

.viewer-stage canvas {
  pointer-events: none;
}

.viewer-toolbar {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f7f2eb;
  border: 1px solid rgba(217, 208, 194, 0.9);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
}

.toggle input {
  accent-color: var(--brand);
}

.meta-pill {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f7f2eb;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.commentary-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  background: #fcfaf6;
  border: 1px solid rgba(217, 208, 194, 0.82);
}

.commentary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.commentary-head-below {
  margin-top: 12px;
  margin-bottom: 0;
}

.commentary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  background: #fff;
  border: 1px solid rgba(217, 208, 194, 0.74);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.play-by-play {
  background: #8fb8ff;
}

.legend-dot.tactical {
  background: #f29f92;
}

.legend-dot.contextual {
  background: #f0cf79;
}

.commentary-list {
  display: grid;
  gap: 8px;
  max-height: 98px;
  overflow: auto;
  padding-right: 4px;
}

.commentary-item {
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(217, 208, 194, 0.74);
  border-left-width: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.commentary-item.play-by-play {
  border-left-color: #8fb8ff;
  background: linear-gradient(90deg, rgba(143, 184, 255, 0.18), rgba(255, 255, 255, 0.92) 22%);
}

.commentary-item.tactical {
  border-left-color: #f29f92;
  background: linear-gradient(90deg, rgba(242, 159, 146, 0.18), rgba(255, 255, 255, 0.92) 22%);
}

.commentary-item.contextual {
  border-left-color: #f0cf79;
  background: linear-gradient(90deg, rgba(240, 207, 121, 0.22), rgba(255, 255, 255, 0.92) 22%);
}

.commentary-item.is-active {
  transform: translateX(1px);
}

.commentary-item.play-by-play.is-active {
  border-color: rgba(47, 105, 200, 0.32);
  border-left-color: #2f69c8;
  box-shadow: inset 0 0 0 1px rgba(47, 105, 200, 0.08);
}

.commentary-item.tactical.is-active {
  border-color: rgba(212, 63, 54, 0.32);
  border-left-color: #d43f36;
  box-shadow: inset 0 0 0 1px rgba(212, 63, 54, 0.08);
}

.commentary-item.contextual.is-active {
  border-color: rgba(230, 169, 74, 0.36);
  border-left-color: #e6a94a;
  box-shadow: inset 0 0 0 1px rgba(230, 169, 74, 0.09);
}

.commentary-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.eyebrow.is-hidden {
  display: none;
}

.commentary-item time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.caption-text {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

body[data-page="overview"] .hero-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.75fr);
}

.scaled-figure {
  width: min(70%, 860px);
  margin: 0 auto;
}

.footer {
  max-width: var(--page-width);
  margin: 18px auto 48px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.citation-box {
  background: #171c24;
  color: #eef2f7;
  padding: 20px;
  border-radius: 22px;
  overflow: auto;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  line-height: 1.75;
}

.info-card.is-emphasis {
  background: linear-gradient(180deg, rgba(255, 245, 226, 0.96), rgba(255, 237, 206, 0.92));
  border-color: rgba(214, 156, 73, 0.42);
}

@media (max-width: 1100px) {
  .hero-grid,
  .dual-grid,
  .viewer-layout,
  .page-switch,
  .stats-grid,
  .columns-3 {
    grid-template-columns: 1fr;
  }

  .timeline-column {
    order: 2;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .page,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-panel,
  .section {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .hero-actions,
  .viewer-toolbar,
  .toggle-row,
  .meta-row {
    align-items: stretch;
  }

  .btn,
  .sample-chip {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    justify-content: flex-end;
  }

  .scaled-figure {
    width: 100%;
  }
}
