/* StatsNext public website. No web fonts, system type, one stylesheet; scripts only where a page needs one. */
:root {
  --bg: #080c13;
  --bg-deep: #05080d;
  --surface: #0c121b;
  --surface-2: #111823;
  --border: #1c2837;
  --border-soft: #16202d;
  --text: #ffffff;
  --text-2: #e8edf3;
  --muted: #b4becb;
  --subtle: #8793a4;
  --teal: #22d3c5;
  --teal-strong: #5ee6da;
  --teal-deep: #0e8f8a;
  --cyan: #4fe3ec;
  --focus: #5ee6da;
  --radius: 18px;
  --max: 1160px;
  --wide: 1440px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* In-page links land below the sticky header. */
  scroll-padding-top: 84px;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 12px;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font:
    16px/1.6 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(8, 12, 19, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

/* The official logo lockup (transparent): mark with the STATSNEXT wordmark to its right. */
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  line-height: 0;
}

.brand img {
  display: block;
  width: auto;
}

.brand-header img {
  height: 40px;
}

.brand-footer img {
  height: 36px;
}

@media (max-width: 640px) {
  .brand-header img {
    height: 34px;
  }
}

.nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
}

@media (max-width: 640px) {
  /* Two rows on a phone: scrolls away with the page so it never covers a table. */
  .site-header {
    position: static;
  }
  .site-header .wrap {
    flex-wrap: wrap;
    row-gap: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 0;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 10px;
    font-size: 14px;
  }
  .nav a {
    padding: 6px 0;
  }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 720px;
  background:
    radial-gradient(600px 340px at 72% 38%, rgba(34, 211, 197, 0.16), transparent 70%),
    radial-gradient(520px 300px at 18% 20%, rgba(79, 227, 236, 0.07), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.hero .hero-logo {
  margin: 0;
  line-height: 0;
}

/* The header lockup, larger: transparent on the dark hero with a soft brand glow (no card). */
.hero .hero-logo img {
  display: block;
  width: 460px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 36px rgba(34, 211, 197, 0.22));
}

@media (max-width: 560px) {
  .hero .hero-logo img {
    width: 300px;
  }
}

.hero .tagline {
  margin: 22px 0 0;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero .lede {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: 18px;
  color: var(--muted);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.badge-soon,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.badge-soon {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.badge-soon .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(34, 211, 197, 0.8);
}

.btn {
  color: #05080d;
  background: linear-gradient(90deg, #22d3c5, #4fe3ec);
}

.btn:hover {
  color: #05080d;
  filter: brightness(1.06);
}

.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  min-height: 560px;
}

.hero-phones .phone.back {
  transform: translateY(-36px) scale(0.9);
  opacity: 0.92;
}

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

@media (max-width: 560px) {
  .hero-phones .phone.back {
    display: none;
  }
}

/* ---------------------------------------------------------------- phone frame */

.phone {
  --w: 260px;
  width: var(--w);
  flex: 0 0 auto;
  /* The 390 x 844 screen plus the status-bar strip. */
  aspect-ratio: 390 / 884;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2a3646, #121a25 40%, #0b1119);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(34, 211, 197, 0.08);
  position: relative;
}

.phone::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 50%;
  width: 30%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

/* The screen keeps a status-bar strip, so the island never covers the app's own header. */
.phone .screen {
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: var(--bg);
  padding-top: 34px;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--bg-deep);
}

@media (max-width: 380px) {
  .phone {
    --w: 230px;
  }
}

/* ---------------------------------------------------------------- sections */

section {
  scroll-margin-top: 80px;
}

.section {
  padding: 88px 0;
  border-top: 1px solid var(--border-soft);
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section .intro {
  margin: 16px 0 0;
  max-width: 40em;
  font-size: 18px;
  color: var(--muted);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: center;
}

.feature.flip {
  grid-template-columns: auto minmax(0, 1fr);
}

.feature.flip .phone {
  order: -1;
}

@media (max-width: 860px) {
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .feature .phone,
  .feature.flip .phone {
    order: 2;
    margin: 0 auto;
  }
}

.points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.points li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
}

.points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
}

@media (max-width: 520px) {
  .points {
    grid-template-columns: 1fr;
  }
}

.note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--subtle);
}

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

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.terms dt {
  color: var(--text);
  font-weight: 700;
}

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

.terms div {
  border-left: 2px solid var(--teal-deep);
  padding-left: 16px;
}

.terms dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 680px) {
  .terms {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- page hero, chips, plans */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto;
  height: 520px;
  background: radial-gradient(560px 280px at 70% 40%, rgba(34, 211, 197, 0.13), transparent 70%);
  pointer-events: none;
}

.page-hero .wrap {
  position: relative;
}

.page-hero h1 {
  margin: 0;
  max-width: 18em;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
}

.page-hero .lede {
  margin: 20px 0 0;
  max-width: 40em;
  font-size: 18px;
  color: var(--muted);
}

.section.tight {
  padding-top: 8px;
  border-top: 0;
}

.btn.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--teal-deep);
}

.link-cards .card {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.link-cards .card:hover {
  border-color: var(--teal-deep);
}

.link-cards .card h3::after {
  content: ' →';
  color: var(--teal);
}

@media (min-width: 901px) {
  .link-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 15px;
}

.more {
  margin: 24px 0 0;
  font-weight: 600;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.plan {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.plan.pro {
  border-color: var(--teal-deep);
  background:
    radial-gradient(420px 180px at 80% 0%, rgba(34, 211, 197, 0.12), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}

.plan .plan-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.plan .price {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.plan .amount {
  color: var(--text);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan .plan-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.plan .points {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.sport-list {
  display: grid;
  gap: 16px;
}

.sport-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sport-row h2 {
  margin: 0;
  font-size: 26px;
}

.sport-row .chips {
  margin-top: 16px;
}

.sport-row .points {
  margin: 0;
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .sport-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }
}

.table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.compare th,
.compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.compare thead th {
  color: var(--teal);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--surface);
}

.compare tbody th {
  color: var(--text-2);
  font-weight: 500;
}

.compare td {
  color: var(--muted);
}

.compare tr:last-child th,
.compare tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 560px) {
  .compare th,
  .compare td {
    padding: 12px;
    font-size: 14px;
  }
}

.faq {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

.faq summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.faq details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.position {
  background: radial-gradient(500px 200px at 20% 0%, rgba(34, 211, 197, 0.08), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.position {
  margin-top: 28px;
}

.position h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.position ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  columns: 2;
  column-gap: 32px;
}

@media (max-width: 640px) {
  .position ul {
    columns: 1;
  }
}

/* ---------------------------------------------------------------- documents */

.doc {
  padding: 56px 0 88px;
}

.doc .wrap {
  max-width: 820px;
}

.doc h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.doc .meta {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 15px;
}

.doc .pending {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.toc {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
  font-size: 15px;
}

@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }
}

.doc section h2 {
  margin: 40px 0 10px;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.doc ul {
  padding-left: 22px;
}

.doc .resource {
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.doc .resource strong {
  color: var(--text);
}

/* ---------------------------------------------------------------- deletion form */

.deletion {
  display: grid;
  gap: 16px;
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.deletion[hidden],
.deletion .step[hidden],
.done[hidden] {
  display: none;
}

.deletion .step {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.field input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.deletion .btn {
  justify-self: start;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.deletion .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn.danger {
  background: #f87171;
  color: #05080d;
}

.status {
  margin: 0;
  color: var(--muted);
  min-height: 1.6em;
}

.status[data-tone='error'] {
  color: #fbbf24;
}

.done {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--teal-deep);
  border-radius: var(--radius);
  background: var(--surface);
}

.done h3 {
  margin: 0 0 8px;
  color: var(--text);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-deep);
  padding: 48px 0 40px;
  font-size: 15px;
}

/* Brand row; every sport by family; then guides (two columns), company and legal. */
.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.foot-brand {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.foot-brand .tag {
  margin: 0;
}

.site-footer .foot-social {
  display: flex;
  gap: 8px;
}

.site-footer .foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--muted);
  transition:
    color 0.15s,
    border-color 0.15s;
}

.site-footer .foot-social a:hover {
  color: var(--text);
  border-color: var(--muted);
}

.site-footer .foot-social a:focus-visible {
  border-radius: 50%;
}

.foot-brand .foot-all {
  margin: 0 0 0 auto;
  font-weight: 600;
}

.site-footer .foot-brand .foot-all a {
  color: var(--teal-strong);
}

.foot-sports {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

.foot-guides {
  grid-column: span 2;
}

.foot-guides ul {
  display: block;
  columns: 2;
  column-gap: 32px;
}

.foot-guides li {
  margin-bottom: 6px;
  break-inside: avoid;
}

@media (max-width: 1000px) {
  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .foot-sports {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-guides {
    grid-column: 1 / -1;
  }
}

.site-footer .tag {
  margin: 6px 0 0;
  color: var(--subtle);
}

.site-footer h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .legal {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--subtle);
  font-size: 14px;
}

@media (max-width: 720px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .foot-sports {
    gap: 24px 20px;
  }
  .foot-guides ul {
    columns: 1;
  }
  .foot-brand .foot-all {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Header link into the web app (statsnext.com/app). */
.nav a.nav-app {
  color: var(--teal);
  font-weight: 600;
}

/* ---------------------------------------------------------------- research pages (tables) */

.doc .lede {
  font-size: 18px;
  color: var(--text);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.crumbs li + li::before {
  content: '›';
  margin-right: 8px;
}

/*
 * Research pages (body.wide) use the full desktop width: the header, sport bar, page and footer share one
 * wide container so edges line up. Tables take the whole width; prose keeps a readable measure.
 */
body.wide .wrap {
  max-width: var(--wide);
}

.doc.research :where(h1, p, ul, ol, dl, h2, h3, .crumbs, .jump):not(.table-wrap *, .hub-card *, .link-list) {
  max-width: 48rem;
}

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  /* As wide as the table needs, never wider than the column, never narrower than the prose. */
  width: fit-content;
  max-width: 100%;
  min-width: min(100%, 48rem);
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  scrollbar-color: var(--border) transparent;
}

.table-wrap.full {
  width: auto;
}

.table-wrap table:not(.compare) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.table-wrap table:not(.compare) caption {
  padding: 10px 12px 2px;
  text-align: left;
  color: var(--subtle);
  font-size: 14px;
}

.table-wrap table:not(.compare) :is(th, td) {
  padding: 7px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
}

/* Headers wrap onto two lines instead of widening a column of short figures. */
.table-wrap table:not(.compare) thead th {
  min-width: 4.75em;
  white-space: normal;
  vertical-align: bottom;
  line-height: 1.3;
  color: var(--subtle);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* The name (row header) stays pinned while the figures scroll sideways. */
.table-wrap table:not(.compare) :is(tbody th[scope='row'], thead th:first-child) {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 0;
  text-align: left;
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--border);
}

/* A rank in the first column: the rank and the name beside it both stay pinned. */
.table-wrap table.rank tr > :first-child {
  width: 3.5rem;
  min-width: 3.5rem;
  max-width: 3.5rem;
  box-shadow: none;
}

.table-wrap table.rank tr > :nth-child(2) {
  position: sticky;
  left: 3.5rem;
  z-index: 1;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--border);
}

.table-wrap table.rank tbody tr > :nth-child(2) {
  color: var(--text);
  font-weight: 600;
}

/*
 * Sortable stat headers (website/table-sort.js wraps the header text in a button): the arrow shows the
 * order, a faint double arrow marks a header that sorts. Without the script the header is plain text.
 */
.table-wrap thead th > button.sort {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  margin: 0;
  /* A comfortable tap target without changing the row height. */
  padding: 6px 0;
  margin-block: -6px;
  cursor: pointer;
}

.table-wrap thead th > button.sort:hover,
.table-wrap thead th[aria-sort] {
  color: var(--text);
}

.sort-arrow::after {
  content: '↕';
  margin-left: 3px;
  opacity: 0.45;
}

th[aria-sort='descending'] .sort-arrow::after {
  content: '↓';
  opacity: 1;
  color: var(--teal-strong);
}

th[aria-sort='ascending'] .sort-arrow::after {
  content: '↑';
  opacity: 1;
  color: var(--teal-strong);
}

.doc .table-note {
  margin-bottom: 0;
}

/* Text columns (team, opponent, result, links) read left to right; figures stay right-aligned. */
.table-wrap .l2 tr > :nth-child(2),
.table-wrap .l3 tr > :nth-child(3),
.table-wrap .l4 tr > :nth-child(4),
.table-wrap .l5 tr > :nth-child(5),
.table-wrap .l6 tr > :nth-child(6),
.table-wrap .l7 tr > :nth-child(7),
.table-wrap .l8 tr > :nth-child(8),
.table-wrap .l9 tr > :nth-child(9),
.table-wrap .l10 tr > :nth-child(10),
.table-wrap .l11 tr > :nth-child(11),
.table-wrap .l12 tr > :nth-child(12),
.table-wrap .l13 tr > :nth-child(13),
.table-wrap .l14 tr > :nth-child(14),
.table-wrap .l15 tr > :nth-child(15),
.table-wrap .l16 tr > :nth-child(16),
.table-wrap .l17 tr > :nth-child(17),
.table-wrap .l18 tr > :nth-child(18),
.table-wrap .l19 tr > :nth-child(19),
.table-wrap .l20 tr > :nth-child(20) {
  text-align: left;
}

/* Columns of sentences wrap at a readable width. */
.table-wrap .w1 tr > :nth-child(1),
.table-wrap .w2 tr > :nth-child(2),
.table-wrap .w3 tr > :nth-child(3),
.table-wrap .w4 tr > :nth-child(4),
.table-wrap .w5 tr > :nth-child(5),
.table-wrap .w6 tr > :nth-child(6),
.table-wrap .w7 tr > :nth-child(7),
.table-wrap .w8 tr > :nth-child(8),
.table-wrap .w9 tr > :nth-child(9),
.table-wrap .w10 tr > :nth-child(10),
.table-wrap .w11 tr > :nth-child(11),
.table-wrap .w12 tr > :nth-child(12),
.table-wrap .w13 tr > :nth-child(13),
.table-wrap .w14 tr > :nth-child(14),
.table-wrap .w15 tr > :nth-child(15),
.table-wrap .w16 tr > :nth-child(16),
.table-wrap .w17 tr > :nth-child(17),
.table-wrap .w18 tr > :nth-child(18),
.table-wrap .w19 tr > :nth-child(19),
.table-wrap .w20 tr > :nth-child(20) {
  min-width: min(16em, 45vw);
  max-width: 36em;
  white-space: normal;
}

.table-wrap table:not(.compare) tbody tr:last-child :is(th, td) {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .table-wrap table:not(.compare) {
    font-size: 14px;
  }
  .table-wrap table:not(.compare) caption {
    font-size: 13px;
    /* Kept to the visible width while the table scrolls under it. */
    position: sticky;
    left: 0;
    max-width: calc(100vw - 50px);
  }
  .table-wrap table:not(.compare) :is(th, td) {
    padding: 6px 7px;
  }
  .table-wrap table:not(.compare) thead th {
    min-width: 3.25em;
  }
  /* On a phone, text columns of short tables wrap (figures never do), so they fit without scrolling. */
  .table-wrap:not(.full) .l2 tbody tr > :nth-child(2),
  .table-wrap:not(.full) .l3 tbody tr > :nth-child(3),
  .table-wrap:not(.full) .l4 tbody tr > :nth-child(4),
  .table-wrap:not(.full) .l5 tbody tr > :nth-child(5),
  .table-wrap:not(.full) .l6 tbody tr > :nth-child(6),
  .table-wrap:not(.full) .l7 tbody tr > :nth-child(7),
  .table-wrap:not(.full) .l8 tbody tr > :nth-child(8),
  .table-wrap:not(.full) .l9 tbody tr > :nth-child(9),
  .table-wrap:not(.full) .l10 tbody tr > :nth-child(10),
  .table-wrap:not(.full) .l11 tbody tr > :nth-child(11),
  .table-wrap:not(.full) .l12 tbody tr > :nth-child(12),
  .table-wrap:not(.full) .l13 tbody tr > :nth-child(13),
  .table-wrap:not(.full) .l14 tbody tr > :nth-child(14),
  .table-wrap:not(.full) .l15 tbody tr > :nth-child(15),
  .table-wrap:not(.full) .l16 tbody tr > :nth-child(16),
  .table-wrap:not(.full) .l17 tbody tr > :nth-child(17),
  .table-wrap:not(.full) .l18 tbody tr > :nth-child(18),
  .table-wrap:not(.full) .l19 tbody tr > :nth-child(19),
  .table-wrap:not(.full) .l20 tbody tr > :nth-child(20) {
    white-space: normal;
  }
  /* A long name wraps rather than pinning half the screen. */
  .table-wrap table:not(.rank) tbody th[scope='row'],
  .table-wrap table.rank tbody tr > :nth-child(2) {
    min-width: 7.5rem;
    max-width: 11rem;
    white-space: normal;
  }
  .table-wrap table.rank tr > :first-child {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
  }
  .table-wrap table.rank tr > :nth-child(2) {
    left: 2.75rem;
  }
}

/* ---------------------------------------------------------------- sport bar (research pages) */

.sport-bar {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-deep);
}

.sport-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.sport-bar a {
  display: inline-block;
  padding: 9px 0;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.sport-bar a:hover,
.sport-bar a[aria-current] {
  color: var(--text);
}

.sport-bar a[aria-current] {
  box-shadow: inset 0 -2px 0 var(--teal);
}

@media (max-width: 640px) {
  .sport-bar ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0 16px;
    scrollbar-width: none;
    /* The fade says the row scrolls. */
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
    padding-right: 48px;
  }
  .sport-bar ul::-webkit-scrollbar {
    display: none;
  }
}

/* ---------------------------------------------------------------- research hub: every sport by category */

.jump {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--subtle);
}

.hub-family h3 {
  margin: 28px 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 14px;
}

.hub-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.hub-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hub-card h4 a {
  color: var(--text);
  text-decoration: none;
}

.hub-card h4 a::after {
  content: ' →';
  color: var(--teal);
}

.hub-card dl {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 15px;
}

.hub-card dt {
  color: var(--subtle);
  font-size: 13px;
}

.hub-card dd {
  margin: 0;
}

/* ---------------------------------------------------------------- betting calculators (calculators.js) */

.calc {
  display: grid;
  gap: 16px;
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.calc[hidden],
.calc [hidden] {
  display: none;
}

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

.field select {
  min-height: 48px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field input[aria-invalid='true'] {
  border-color: #fbbf24;
}

.calc-out-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 20px;
  margin: 0;
}

.calc-out-list div {
  border-left: 2px solid var(--teal-deep);
  padding-left: 12px;
}

.calc-out-list dt {
  color: var(--subtle);
  font-size: 13px;
}

.calc-out-list dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.formula {
  margin: 14px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--teal-deep);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.formula p {
  margin: 4px 0;
  color: var(--text);
}

/* ---------------------------------------------------------------- hero headline, showcase, upgrade copy */

.hero h1.hero-h {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
}

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

.showcase .sc {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.showcase .sc .phone {
  --w: 190px;
  margin: 0 auto 22px;
}

.showcase .sc h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.showcase .sc p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.showcase .sc .sc-sports {
  margin-top: 12px;
  font-size: 13px;
  color: var(--teal);
}

.showcase .sc .sc-link {
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .showcase {
    grid-template-columns: 1fr;
  }
}

.upgrade {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.upgrade h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

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

.app-link {
  font-size: 14px;
  font-weight: 600;
}

/* Short FAQ on research pages: question and answer both visible. */
.doc dl.qa {
  margin: 12px 0;
}

.doc dl.qa dt {
  margin: 16px 0 4px;
  font-weight: 600;
  color: var(--text);
}

.doc dl.qa dd {
  margin: 0;
  color: var(--muted);
}
