:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #667380;
  --paper: #f2efe6;
  --card: #ffffff;
  --navy: #071a2d;
  --line: #ded8cb;
  --grass: #26724f;
  --red: #cf2f2b;
  --gold: #e5ab22;
  --shadow: 0 16px 34px rgba(13, 25, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

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

.hero {
  background:
    linear-gradient(135deg, rgba(38, 114, 79, 0.32), transparent 42%),
    var(--navy);
  color: #fffdf7;
  min-height: 260px;
  padding: 12px 14px 76px;
  position: relative;
  text-align: center;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.top-nav a,
.download-links a {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  min-width: 74px;
  padding: 0 10px;
  text-transform: uppercase;
}

.hero p {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 950;
  margin: 42px 0 8px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(2.9rem, 16vw, 6.8rem);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.55rem, 7vw, 2.6rem);
}

.snapshot {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  color: #cbd7df;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 850;
  margin-top: 16px;
  padding-top: 10px;
}

main {
  margin: -48px auto 0;
  max-width: 1180px;
  padding: 0 10px 30px;
  position: relative;
  z-index: 1;
}

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

.score-strip article,
.panel {
  background: var(--card);
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.score-strip article {
  min-height: 110px;
  padding: 12px;
}

.score-strip span,
.rank-row .meta span,
.section-head p,
th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.score-strip strong {
  display: block;
  font-size: clamp(1.35rem, 7vw, 2.55rem);
  line-height: 1;
  margin-top: 8px;
}

.score-strip em {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
  margin-top: 7px;
}

.panel {
  margin: 10px 0;
}

.insight-panel {
  border-left: 6px solid var(--grass);
  padding: 14px;
}

.insight-panel p {
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.section-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 15px;
}

.section-head p {
  color: var(--gold);
  margin: 0 0 7px;
}

.download-links {
  display: flex;
  gap: 8px;
}

.download-links a {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.rank-list {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.rank-row {
  --team-color: var(--red);
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 40px 54px minmax(0, 1fr);
  min-height: 68px;
}

.rank {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.team-badge {
  align-items: center;
  background: var(--team-color);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 54px;
}

.bar-area {
  min-width: 0;
}

.meta {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 5px;
}

.meta strong {
  font-size: 0.98rem;
}

.meta em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.bar-track {
  background: #ece7dc;
  border-radius: 999px;
  height: 20px;
  overflow: hidden;
}

.bar-fill {
  align-items: center;
  background: linear-gradient(90deg, var(--team-color), #e9473f);
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 0.72rem;
  font-weight: 950;
  height: 100%;
  justify-content: flex-end;
  min-width: 36px;
  padding-right: 7px;
  width: var(--bar);
}

.scatter-wrap {
  overflow-x: auto;
  padding: 8px 8px 12px;
}

#scatterChart {
  display: block;
  min-width: 760px;
  width: 100%;
}

.axis-text,
.point-label,
.axis-title,
.guide-label {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.axis-text {
  fill: #536171;
  font-size: 15px;
  font-weight: 850;
}

.axis-title,
.guide-label {
  fill: #17202a;
  font-size: 16px;
  font-weight: 950;
}

.grid-line {
  stroke: #ddd6c8;
  stroke-dasharray: 6 8;
}

.axis-line {
  stroke: #1d2a36;
  stroke-width: 1.5;
}

.win-line {
  stroke: var(--grass);
  stroke-dasharray: 8 7;
  stroke-width: 2.5;
}

.avg-line {
  stroke: var(--red);
  stroke-dasharray: 8 7;
  stroke-width: 2.5;
}

.team-dot {
  stroke: #ffffff;
  stroke-width: 3;
}

.point-label {
  fill: #111827;
  font-size: 13px;
  font-weight: 950;
}

.table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  min-width: 780px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #eee7dc;
  padding: 11px 10px;
  text-align: right;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

tbody tr:nth-child(odd) {
  background: #fbf8f1;
}

.source-strip {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 2px 22px;
}

.source-strip p {
  margin: 5px 0;
}

.source-strip a {
  color: #145da0;
  font-weight: 950;
  margin-left: 8px;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@media (max-width: 420px) {
  main {
    padding-inline: 8px;
  }

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

  .score-strip article {
    min-height: 88px;
  }
}

@media (min-width: 760px) {
  .hero {
    min-height: 330px;
  }

  .top-nav {
    justify-content: flex-end;
    margin: 0 auto;
    max-width: 1120px;
  }

  main {
    padding-inline: 22px;
  }

  .rank-row {
    grid-template-columns: 48px 64px minmax(0, 1fr) 160px;
  }

  .rank-row::after {
    color: var(--muted);
    content: attr(data-extra);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: right;
  }
}
