:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5c6670;
  --line: #d6dde5;
  --paper: #f7f8fa;
  --surface: #ffffff;
  --accent: #c8452d;
  --accent-dark: #8f2f20;
  --court: #f1b65b;
  --focus: #2457d6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

p {
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  line-height: 1.03;
}

h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
}

.brand {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.back-link:hover,
.brand:hover {
  text-decoration: underline;
}

.brand:focus-visible,
.back-link:focus-visible,
.viz-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.home-shell,
.viz-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.intro {
  max-width: 760px;
  margin-bottom: 32px;
}

.intro p:last-child,
.viz-heading p {
  max-width: 700px;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chart-disclaimer {
  margin: -4px 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

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

.viz-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.viz-card:hover,
.viz-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.viz-card span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.viz-card p {
  margin: 0;
}

.viz-heading {
  margin-bottom: 28px;
}

.viz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.viz-stage,
.data-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.viz-stage {
  min-height: 440px;
  padding: 24px;
}

.placeholder-chart {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(23, 32, 42, 0.08) 50%, transparent 51%),
    linear-gradient(var(--court), #f6cf8d);
  color: var(--ink);
  text-align: center;
}

.placeholder-chart strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.placeholder-chart p {
  max-width: 420px;
  margin: 0;
}

.data-panel {
  padding: 18px;
}

.data-panel h2 {
  margin-bottom: 12px;
}

.data-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.data-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.team-names {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.viz-credit {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 0.8rem;
}

.viz-credit a {
  color: var(--muted);
  text-decoration: underline;
}

@media (max-width: 760px) {
  .home-shell,
  .viz-shell {
    padding: 32px 0;
  }

  .viz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viz-layout {
    grid-template-columns: 1fr;
  }

  .viz-stage {
    min-height: 340px;
  }

  .placeholder-chart {
    min-height: 280px;
  }
}
