/* ============================================================
   Save Ratio — saveratio.com
   Light theme: white page with a connected hexagon honeycomb
   (matching the app's HexBackground, at a larger hex size),
   gold (#FFD700) brand accent, lime "go" accent, athletic
   display type + a data-terminal mono for figures.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Archivo+Expanded:wght@600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Surfaces */
  --bg:        #ffffff;
  --surface:   #ffffff;   /* cards / panels */
  --surface-2: #f5f6f8;   /* muted bands, screen wells */
  --glass:     rgba(255, 255, 255, 0.78);

  /* Ink */
  --ink:       #1b1f27;
  --ink-dim:   #586172;
  --ink-faint: #98a0ad;

  /* Lines */
  --line:        rgba(20, 24, 32, 0.10);
  --line-strong: rgba(20, 24, 32, 0.18);

  /* Brand golds */
  --gold:       #ffd700;   /* pure brand: fills, logo, marker, dots */
  --gold-soft:  #ffe866;
  --gold-line:  #d6a400;   /* visible gold for icons / chart on white */
  --gold-ink:   #927400;   /* readable gold text for labels / links */
  --gold-glow:  rgba(255, 215, 0, 0.45);

  /* Accents */
  --lime:      #6fa82e;   /* "go" / positive text on white */
  --lime-fill: #ace064;   /* hockey.bz CTA green for fills */
  --ice:       #2f8fd4;   /* cool secondary data */
  --danger:    #d64545;

  /* Type */
  --display: 'Archivo Expanded', 'Archivo', system-ui, sans-serif;
  --body:    'Archivo', system-ui, sans-serif;
  --mono:    'Space Mono', ui-monospace, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --container: 1180px;
  --section-pad: clamp(64px, 10vw, 120px);

  /* Soft elevation (light theme uses shadow, not borders, for lift) */
  --shadow-sm: 0 1px 2px rgba(20,24,32,0.04), 0 6px 18px -10px rgba(20,24,32,0.12);
  --shadow-md: 0 2px 6px rgba(20,24,32,0.05), 0 24px 48px -24px rgba(20,24,32,0.22);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Offset in-page anchor jumps so targets clear the sticky header (74px + 3px topbar) */
:is(section[id], #get) { scroll-margin-top: 96px; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  /* Subtle warm glow + connected hex honeycomb (full filled path, like the app) */
  background-image:
    radial-gradient(900px 520px at 84% -10%, rgba(255, 215, 0, 0.12), transparent 62%),
    radial-gradient(760px 560px at -10% 6%, rgba(120, 175, 230, 0.08), transparent 60%),
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="49" viewBox="0 0 28 49"%3E%3Cpath fill="%23b39860" fill-opacity="0.05" fill-rule="nonzero" d="M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z"/%3E%3C/svg%3E');
  background-attachment: fixed, fixed, fixed;
  background-size: auto, auto, 56px 98px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { color: var(--ink); }

::selection { background: var(--gold); color: #1a1500; }

/* Broadcast top bar */
.topbar {
  height: 3px;
  background: linear-gradient(90deg, var(--gold-line), var(--gold), var(--lime-fill), var(--gold), var(--gold-line));
  background-size: 200% 100%;
  animation: slide 8s linear infinite;
  position: relative; z-index: 60;
}
@keyframes slide { to { background-position: 200% 0; } }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.section { padding: var(--section-pad) 0; position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold-ink); margin: 0 0 18px; font-weight: 700;
}
.section-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05;
  letter-spacing: -0.015em; margin: 0 0 16px; color: var(--ink);
}
.section-lead { max-width: 600px; color: var(--ink-dim); font-size: 18px; margin: 0; }
.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px -18px rgba(20,24,32,0.4);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { height: 38px; width: auto; display: block; }
.brand__name { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: 0.01em; }
.brand__name span { color: var(--gold-ink); }
.brand__name { white-space: nowrap; }
@media (max-width: 720px) { .brand__mark { height: 32px; } .brand__name { font-size: 19px; } }

.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-links a:not(.btn) {
  position: relative;
  color: var(--ink-dim); font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em; transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn).active,
.nav-links a:not(.btn)[aria-current] { color: var(--gold-ink); }
.nav-links a:not(.btn).active::after,
.nav-links a:not(.btn)[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px;
  height: 2px; border-radius: 2px; background: var(--gold);
}
/* Compact "Get the app" button in the nav (less padding than full buttons) */
.nav-actions .btn { padding: 9px 18px; font-size: 14px; }

/* Hamburger: phone only. Three bars that fold into an X while the panel is open. */
.nav-toggle {
  display: none; position: relative;
  width: 40px; height: 40px; padding: 0; margin-right: -8px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform 0.22s ease, opacity 0.15s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; }
.nav-toggle__bars::before { transform: translateY(-7px); }
.nav-toggle__bars::after  { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: rotate(-45deg); }

/* Phone: the links move into a panel that drops out of the header bar.
   main.js toggles .open; without it the panel simply stays closed, so every
   page that ships the header must also ship main.js. */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  /* Brand + button + hamburger all have to fit a 360px bar without wrapping. */
  .site-header .container { gap: 10px; }
  .brand { gap: 8px; }
  .nav-actions { gap: 2px; }
  .nav-actions .btn { padding: 9px 13px; font-size: 13.5px; }
  .nav-toggle { width: 36px; height: 36px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 6px 0 10px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(20, 24, 32, 0.55);
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { display: block; padding: 14px 24px; font-size: 16px; }
  /* The desktop underline sits under a centered row; on a stacked list, colour alone reads it. */
  .nav-links a:not(.btn).active::after,
  .nav-links a:not(.btn)[aria-current]::after { content: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 700; font-size: 15px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #1a1500; box-shadow: 0 8px 22px -10px var(--gold-glow); }
.btn-gold:hover { color: #1a1500; box-shadow: 0 14px 30px -10px var(--gold-glow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); background: rgba(255,215,0,0.10); }
.btn-lg { font-size: 17px; padding: 15px 32px; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: var(--section-pad); }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(42px, 6.6vw, 76px); line-height: 1.0;
  letter-spacing: -0.025em; margin: 0 0 22px; color: var(--ink);
}
.hero__title .mark {
  /* gold highlighter behind dark text — legible on white, on-brand */
  background-image: linear-gradient(transparent 58%, var(--gold-soft) 58%);
  padding: 0 0.06em;
}
.hero__sub { font-size: 19px; color: var(--ink-dim); max-width: 520px; margin: 0 0 32px; }
.hero__sub b { color: var(--ink); font-weight: 700; }
.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero__trust { margin-top: 22px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-faint); }
.hero__trust b { color: var(--lime); }

.ticker {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em;
  color: var(--ink-faint); text-transform: uppercase;
  display: flex; gap: 22px; flex-wrap: wrap;
}
.ticker span { position: relative; }
.ticker span::after { content: "·"; position: absolute; right: -14px; color: var(--gold-line); }
.ticker span:last-child::after { display: none; }

@media (max-width: 880px) {
  /* Stacked hero: the "Did you know?" panel sits directly after the intro
     paragraph, ahead of the store badges. .hero__text goes display:contents so
     its children and the panel share one grid; gap is 0 because the copy
     elements already carry their own margins. */
  .hero .container { grid-template-columns: 1fr; gap: 0; align-items: stretch; }
  .hero__text { display: contents; }
  .hero__media { margin-bottom: 36px; }
  .hero__cta, .hero__trust, .ticker { order: 1; }
}

/* ---- Hero stat panel (animated career chart) ---- */
.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; top: -40%; right: -20%;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  opacity: 0.5; pointer-events: none;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.panel__live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--lime); letter-spacing: 0.08em; }
.panel__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111,168,46,0.5); } 70% { box-shadow: 0 0 0 8px rgba(111,168,46,0); } 100% { box-shadow: 0 0 0 0 rgba(111,168,46,0); } }
.panel__note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-ink); }

/* ---- Hero "Did you know?" demo (same data, two scales) ---- */
/* Sizing context for the .demo container query below. Any panel that hosts a
   .demo opts in, so the block is reusable outside the hero (e.g. /what-is-save-ratio). */
.panel--demo { container-type: inline-size; }
.didyou { font-size: 15px; color: var(--ink-dim); margin: 2px 0 18px; line-height: 1.5; }
.didyou b { color: var(--ink); font-weight: 700; }
.demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.demo__group { text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 12px; }
.demo__label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px; }
/* baseline keeps "vs" aligned to the numbers, not to the middle of the
   taller value+label column — and it stays right at both value sizes. */
.demo__row { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.demo__side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo__val { font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace; font-weight: 600; font-size: 22px; color: var(--ink); line-height: 1; }
.demo__val--good { color: var(--lime); }
.demo__val--bad { color: var(--danger); }
.demo__who { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; line-height: 1; }
/* .923/.889 lead with a decimal point, which fills a full mono cell but carries
   almost no visual weight — so the digits sit right of the text box's true
   centre and the label reads as shifted left. Nudge it back under the digits.
   (translate, not padding: padding would be re-centred and only net ~2.5px.) */
.demo__group--pct .demo__who { transform: translateX(5px); }
.demo__vs { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* The panel is narrow twice: on small phones, and again at ~880-1010px where the
   hero becomes two columns and the panel is the slimmer column. Stack the two
   boxes on the PANEL's own width (see container-type on .hero__media .panel)
   rather than the viewport, so both cases are covered by one rule. */
@container (max-width: 370px) {
  .demo { grid-template-columns: 1fr; gap: 10px; }
  .demo__row { gap: 16px; }
  .demo__val { font-size: 26px; }
}
/* matches .didyou (the intro line) — same size/colour, not a subtle footnote */
.didyou__close { font-size: 15px; color: var(--ink-dim); margin: 18px 0 0; line-height: 1.5; }

.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .avg-line { stroke: var(--ice); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.65; }
.chart .sr-line {
  fill: none; stroke: var(--gold-line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
}
.reveal.in .chart .sr-line { animation: draw 1.8s 0.3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .dot { fill: #fff; stroke: var(--gold-line); stroke-width: 2.5; opacity: 0; }
.reveal.in .chart .dot { animation: pop 0.4s ease forwards; }
.chart .dot:nth-of-type(1) { animation-delay: 0.9s; }
.chart .dot:nth-of-type(2) { animation-delay: 1.2s; }
.chart .dot:nth-of-type(3) { animation-delay: 1.5s; }
.chart .dot.hi { fill: var(--gold); }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.chart text { font-family: var(--mono); fill: var(--ink-faint); font-size: 9px; }

.panel__readout { display: flex; gap: 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.readout__val { font-family: var(--mono); font-weight: 700; font-size: 24px; color: var(--gold-ink); line-height: 1; }
.readout__key { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 5px; }

/* ============================================================
   Stat band
   ============================================================ */
.statband { border-block: 1px solid var(--line); background: var(--surface-2); }
.statband .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 52px; }
.stat { text-align: center; }
.stat__num { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6vw, 62px); line-height: 1; color: var(--ink); }
.stat__num .u { color: var(--gold-ink); }
.stat__lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-top: 10px; }
@media (max-width: 720px) { .statband .container { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; } }

/* ============================================================
   Features
   ============================================================ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
@media (max-width: 880px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 30px 26px; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }
.card__icon { width: 50px; height: 50px; margin-bottom: 20px; display: grid; place-items: center; color: var(--gold-line); }
.card__icon svg { width: 100%; height: 100%; }
.card__title { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--ink); }
.card__body { color: var(--ink-dim); font-size: 15.5px; margin: 0; }
.card__body a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Explainer — SV% vs Save Ratio
   ============================================================ */
.explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
/* Drop the chart box down to roughly the heading line (past the eyebrow) when side by side. */
.explainer .gapviz { margin-top: 38px; }
@media (max-width: 880px) { .explainer { grid-template-columns: 1fr; gap: 40px; } .explainer .gapviz { margin-top: 0; } }
.explainer .section-lead + .section-lead { margin-top: 1.1em; }

/* Vertical comparison charts: the same goalie gap on two scales (6.1% vs 91%) */
.gapviz {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  --plot-h: clamp(240px, 26vw, 320px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-md);
}
.gapviz__yaxis {
  grid-row: 2; grid-column: 1;
  height: var(--plot-h);
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  text-align: right; line-height: 1;
}
.gapviz__bars {
  grid-row: 2; grid-column: 2;
  height: var(--plot-h);
  display: flex; align-items: flex-end; justify-content: space-around;
  gap: 24px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  /* horizontal gridlines every 25% */
  background-image: linear-gradient(to top, var(--line) 1px, transparent 1px);
  background-size: 100% 25%;
}
.gapbar { position: relative; width: clamp(56px, 24%, 88px); height: 100%; display: flex; align-items: flex-end; }
.gapbar__fill {
  width: 100%; min-height: 4px; border-radius: 7px 7px 0 0; position: relative;
  box-shadow: var(--shadow-sm);
  transition: height 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* 6.1% bar (Save % spread): deep teal -> light teal gradient */
.gapbar__fill--svp { background: linear-gradient(to top, #146b80, #4fc3cf); box-shadow: 0 6px 16px -6px rgba(20, 140, 150, 0.45); }
/* 91% bar (Save ratio comparison): gold gradient */
.gapbar__fill--sr  { background: linear-gradient(to top, var(--gold-line), var(--gold)); box-shadow: 0 6px 16px -6px rgba(214, 164, 0, 0.45); }
.gapviz:not(.in) .gapbar__fill { height: 0 !important; }
.gapbar__value {
  position: absolute; left: 50%; transform: translateX(-50%); top: -26px;
  white-space: nowrap; font-family: var(--display); font-weight: 800;
  font-size: 18px; color: var(--ink);
}
.gapviz__labels {
  grid-row: 3; grid-column: 2;
  display: flex; justify-content: space-around; gap: 24px; margin-top: 10px;
}
.gapviz__labels span {
  width: clamp(56px, 24%, 88px); text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); line-height: 1.35;
}
.gapviz__sub {
  grid-column: 1 / -1; grid-row: 1;
  text-align: center; margin-bottom: 18px; line-height: 1.4;
  font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--ink-dim);
}
.gapviz__sub span { font-size: 13px; color: var(--ink-faint); font-weight: 400; }

/* ============================================================
   Leagues
   ============================================================ */
.leagues { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 48px; }
.league {
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
  color: var(--ink-dim); padding: 14px 26px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.league:hover { color: #1a1500; background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }

/* ============================================================
   Screens
   ============================================================ */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; align-items: start; margin-top: 52px; }
@media (max-width: 880px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .shots { grid-template-columns: 1fr; max-width: 280px; margin-inline: auto; } }
.shots figure { margin: 0; transition: transform 0.25s ease; }
.shots figure:hover { transform: translateY(-6px); }
.phone {
  width: 100%; aspect-ratio: 9 / 19.5;
  background: linear-gradient(160deg, #3a4150, #181c24);
  border-radius: 30px; padding: 8px;
  box-shadow: 0 3px 8px rgba(20,24,32,0.10), 0 28px 56px -20px rgba(20,24,32,0.52);
  position: relative;
  transition: box-shadow 0.25s ease;
}
.shots figure:hover .phone { box-shadow: 0 6px 14px rgba(20,24,32,0.12), 0 42px 74px -20px rgba(20,24,32,0.62); }
.phone::before { content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 46px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.18); z-index: 2; }
.phone__screen { width: 100%; height: 100%; border-radius: 23px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(20,24,32,0.22); }
/* Screenshots are pre-graded (saturation/contrast baked in when generated), so no extra CSS filter here. */
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__ph { text-align: center; padding: 18px; }
.phone__ph svg { width: 38px; height: 38px; margin: 0 auto 12px; opacity: 0.9; }
.phone__ph span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-faint); }
.shots figcaption { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }

/* ============================================================
   Share cards
   ------------------------------------------------------------
   Real 1200x675 card output. Three across: at this size a card
   reads as an artifact rather than a document, and the lightbox
   is there for anyone who wants the numbers.
   ============================================================ */
.cardstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
@media (max-width: 760px) { .cardstrip { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.cardstrip figure { margin: 0; transition: transform 0.25s ease; }
.cardstrip figure:hover { transform: translateY(-6px); }
.cardshot {
  border-radius: var(--r-md); overflow: hidden;
  background: #1b1f27;
  box-shadow: 0 3px 8px rgba(20,24,32,0.10), 0 28px 56px -24px rgba(20,24,32,0.45);
  transition: box-shadow 0.25s ease;
}
.cardstrip figure:hover .cardshot { box-shadow: 0 6px 14px rgba(20,24,32,0.12), 0 40px 72px -24px rgba(20,24,32,0.55); }
.cardshot img { display: block; width: 100%; height: auto; }
.cardstrip figcaption { margin-top: 14px; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.cardstrip__note { margin: 26px 0 0; text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); }

/* ---- Screenshot lightbox ---- */
.shots .phone__screen img, .cardshot img { cursor: zoom-in; }
.shots .phone__screen img:focus-visible, .cardshot img:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 3px; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin;
  background: rgba(16, 19, 25, 0.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  /* visibility flips instantly on open (so focus works), but is delayed on close so the fade-out shows */
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
.lightbox__img {
  max-width: min(92vw, 460px); max-height: 92vh; width: auto; height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px -12px rgba(0,0,0,0.7);
  transform: scale(0.96); transition: transform 0.25s ease;
}
.lightbox.open .lightbox__img { transform: scale(1); }
/* Phone shots are portrait and cap at 460px; a landscape share card needs the room. */
.lightbox--wide .lightbox__img { max-width: min(94vw, 1200px); }
.lightbox__close {
  position: absolute; top: max(16px, 3vmin); right: max(16px, 3vmin);
  width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.14); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; transition: background 0.2s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,0.26); }
.lightbox__close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox__img { transition: none; }
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band { text-align: center; }
.cta-band .panel { max-width: 760px; margin: 0 auto; padding: clamp(36px, 6vw, 64px); }
.cta-band .section-title { margin-bottom: 12px; }
/* .section-lead is a 600px box with margin:0, so inside the wider panel it sits
   flush left. text-align:center then centres the text *within* that box, which
   lands it slightly off-centre on the panel. Centre the box itself. */
.cta-band .section-lead { margin-inline: auto; }

/* Store badges */
.store-badges { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.cta-band .store-badges, .hero__cta .store-badges { justify-content: center; }
.store-badges a { display: inline-block; line-height: 0; transition: filter 0.2s; }
.store-badges a:hover { filter: drop-shadow(0 6px 14px rgba(20,24,32,0.22)); }
/* Both badges are edge-to-edge artwork (the official Play PNG is cropped to its
   pill so it matches the App Store badge), so a shared height lines up the tops.
   Google's required clear space is provided by the row gap and surrounding margins. */
.store-badges img { height: 54px; width: auto; }
/* "Scan to install" QR (assets/qr-get.svg, from scripts/build-qr.mjs).
   It encodes /get, which forwards to the store for whichever phone scanned it,
   so one code covers both platforms.

   Desktop only, deliberately: on a phone the badges already install the app,
   and a code you cannot point a camera at is just clutter. The pointer query
   catches touch laptops and tablets that clear the width one. */
.get-row { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.qr-scan { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.qr-scan img {
  width: 96px; height: 96px; display: block;
  background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 10px;
}
.qr-scan span {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  letter-spacing: 0.04em; color: var(--ink-dim); max-width: 10em;
}
@media (max-width: 900px), (pointer: coarse) {
  .qr-scan { display: none; }
}

/* /get: the forwarding page a phone lands on from the QR. Only a desktop
   visitor ever reads it, and only long enough to find the badges. */
.get-page .store-badges { margin-top: 26px; }

.store-note { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* App Store badge, disabled until the iOS app is approved (APP_STORE_ID set).
   Grays the badge and shows a visible "Coming soon" label (not just a hover title,
   which is invisible on touch). Reverts automatically when .is-soon is removed. */
.store-badges a.is-soon { pointer-events: none; display: inline-flex; flex-direction: column; align-items: center; gap: 7px; }
.store-badges a.is-soon img { opacity: 0.5; filter: grayscale(1); }
.store-badges a.is-soon::after {
  content: "Coming soon";
  font-family: var(--mono); font-size: 10px; line-height: 1;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap;
}

/* "Rate it" CTA. */
.review-cta { margin-top: 20px; font-size: 0.95rem; color: var(--ink-dim); text-align: center; }
.review-cta a { color: var(--gold-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
.review-cta a:hover { border-bottom-color: currentColor; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--section-pad); background: var(--surface-2); }
.site-footer .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-block: 32px; gap: 16px; }
.foot-brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; }
.foot-brand svg { width: 24px; height: 24px; }
.foot-logo { height: 30px; width: auto; display: block; }
.foot-brand span { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; }
.foot-links { justify-self: end; display: flex; align-items: center; gap: 22px; }
.foot-links a { color: var(--ink-dim); font-size: 14px; font-weight: 600; }
.foot-links a:hover { color: var(--gold-ink); }
.foot-social-group { justify-self: center; display: inline-flex; align-items: center; gap: 16px; }
.foot-social { display: inline-flex; color: var(--ink-dim); line-height: 0; }
.foot-social svg { height: 16px; width: auto; fill: currentColor; display: block; }
.foot-social:hover { color: var(--gold-ink); }
/* Phone: one centered column, in this order — copyright, Privacy/Contact,
   the two social glyphs, the bee. `display: contents` dissolves .foot-brand so
   its logo and copyright become grid items in their own right and can be
   ordered apart; on desktop they stay a single left-hand block. */
@media (max-width: 640px) {
  .site-footer .container { grid-template-columns: 1fr; justify-items: center; gap: 20px; text-align: center; }
  .foot-social-group, .foot-links { justify-self: center; }
  .foot-brand { display: contents; }
  .foot-brand span { order: 1; }
  .foot-links { order: 2; }
  .foot-social-group { order: 3; }
  .foot-logo { order: 4; }
}

/* ============================================================
   Legal / text page
   ============================================================ */
.text-page { max-width: 760px; margin: clamp(48px, 8vw, 88px) auto; padding: clamp(28px, 5vw, 52px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.text-page h1 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.015em; margin: 0 0 6px; color: var(--ink); }
.text-page .updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-faint); margin: 0 0 30px; }
.text-page h2 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); margin: 32px 0 10px; }
.text-page p { color: var(--ink-dim); margin: 0 0 14px; font-size: 16.5px; }
.text-page a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Converter page (/convert)
   ============================================================ */
.conv-lead { font-size: 17.5px !important; color: var(--ink-dim); margin: 0 0 28px !important; }

/* Two fields with a swap arrow between them; stacks on narrow. */
.conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; padding: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.conv__field { min-width: 0; }
.conv__label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.conv__box { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.conv__box:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-glow); }
.conv__prefix { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ink-faint); line-height: 1; }
.conv__input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; padding: 0; }
.conv__input::placeholder { color: var(--ink-faint); opacity: 0.55; font-weight: 400; }
.conv__suffix { flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--ink-faint); white-space: nowrap; }
.conv__arrow { display: flex; align-items: center; justify-content: center; width: 34px; height: 42px; color: var(--gold-line); }
.conv__arrow svg { width: 22px; height: 22px; }

.conv__readout { text-align: center; font-size: 16px !important; color: var(--ink-dim); margin: 18px 0 8px !important; line-height: 1.55; }
.conv__readout b { color: var(--ink); font-weight: 700; }

.conv__formula { display: grid; gap: 10px; font-family: var(--mono); font-size: 14.5px; color: var(--ink-dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; margin: 0 0 14px; overflow-x: auto; }
.conv__fx { color: var(--lime); font-weight: 700; }
.conv__fy { color: var(--gold-ink); font-weight: 700; }

.conv__table { width: 100%; border-collapse: collapse; margin: 4px 0 14px; }
.conv__table th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 400; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.conv__table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.conv__td-svp { font-family: var(--mono); font-size: 16px; color: var(--ink); }
.conv__td-sr { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.conv__td-note { font-size: 14px; color: var(--ink-dim); text-align: right; }

.conv__cta { margin-top: 20px; }

@media (max-width: 560px) {
  .conv { grid-template-columns: 1fr; gap: 10px; align-items: stretch; }
  .conv__arrow { width: 100%; height: 26px; transform: rotate(90deg); }
  .conv__td-note { font-size: 13px; }
}

/* ============================================================
   What is save ratio? (/what-is-save-ratio)
   ============================================================ */
.wisr__panel { margin: 0 0 28px; }
.wisr__table th, .wisr__table td { padding-right: 10px; }
.wisr__table td { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.wisr__who { font-family: var(--body) !important; font-size: 14.5px !important; color: var(--ink-dim) !important; white-space: nowrap; }
.wisr__math { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); font-weight: 400; }
.wisr__note { font-size: 15px !important; color: var(--ink-faint) !important; }

.wisr__faq { margin: 0 0 14px; }
.wisr__faq dt { font-weight: 700; color: var(--ink); margin: 18px 0 6px; font-size: 16.5px; }
.wisr__faq dd { margin: 0; color: var(--ink-dim); font-size: 16.5px; }

/* The worked-example table is 6 columns — let it scroll rather than crush. */
@media (max-width: 640px) {
  .wisr__table { display: block; overflow-x: auto; white-space: nowrap; }
  .wisr__math { display: none; }
}

/* ============================================================
   Leaderboard (/leaderboard, /leaderboard/<league>)
   ============================================================ */
/* These live inside .text-page, whose `a` rule underlines links. Match its
   specificity so the pills and cards stay unadorned. */
.text-page a.lb-league,
.text-page a.lb-card,
.text-page a.rec-section,
.text-page a.rec-section:hover,
.text-page a.lb-card:hover { text-decoration: none; }

/* League switcher */
.lb-leagues { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.lb-league {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-dim); text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
a.lb-league:hover { border-color: var(--gold-line); color: var(--ink); background: var(--surface); }
.lb-league.is-active { background: var(--gold); border-color: var(--gold-line); color: #1a1500; font-weight: 700; }

.lb-summary { font-size: 16.5px !important; color: var(--ink) !important; margin: 0 0 18px !important; }

/* Wide table: scroll it rather than crush the columns. */
.lb-tablewrap { overflow-x: auto; margin: 0 0 14px; }
.lb-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.lb-table th {
  text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 400;
  padding: 0 10px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.lb-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.lb-table tbody tr:hover { background: var(--surface-2); }
.lb-rank { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); width: 34px; }
.lb-name { font-weight: 600; white-space: nowrap; }
.lb-team { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.lb-num  { font-family: var(--mono); font-size: 14px; color: var(--ink-dim); text-align: right; }
.lb-sr   { font-family: var(--mono); font-size: 17px; font-weight: 700; text-align: right; }
.lb-table th:nth-child(n+4) { text-align: right; padding-right: 0; }
.lb-table td:nth-child(n+4) { padding-right: 0; }

/* Right-aligned number columns carry no right padding — they hug the column's right edge — so
   a narrow value like ".972" can butt straight up against the next column's number ("0.82").
   A small left gutter on every number cell keeps adjacent numeric columns apart; the header
   sits inside the widened column and picks up the same separation for free. */
.lb-table td.lb-num, .lb-table td.lb-sr { padding-left: 14px; }

.lb-note { font-size: 14.5px !important; color: var(--ink-faint) !important; }

/* Index: one card per league */
.lb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0 0 20px; }
.lb-card {
  display: grid; gap: 2px; padding: 16px; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lb-card:hover { border-color: var(--gold-line); box-shadow: var(--shadow-sm); }
.lb-card__league { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.lb-card__season { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-faint); }
.lb-card__leader { margin-top: 8px; font-size: 13.5px; color: var(--ink-dim); }
.lb-card__sr { font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--lime); }

@media (max-width: 560px) {
  .lb-table td { font-size: 14px; }
  .lb-sr { font-size: 16px; }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chart .sr-line { stroke-dashoffset: 0; }
  .chart .dot { opacity: 1; }
  .gapbar__fill { transition: none; }
  .topbar { animation: none; }
}

/* Focus */
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,215,0,0.55); border-radius: 999px; }

/* ---- Records (/records) ---------------------------------------------------
   Reuses the .lb-* leaderboard table. Only the record-specific bits live here. */

/* A shutout-only stretch has no finite save ratio. It reads as "Perfect", never as an
   infinity sign — this is a hockey page, not a maths paper. Narrower than the numbers it
   replaces, so it needs its own size or it blows out the column. */
.lb-sr.is-perfect { font-size: 14px; color: var(--lime); letter-spacing: 0.04em; }

/* "When" is column 4, and the shared .lb-table rule right-aligns EVERY column from 4 on.
   That pushed long month names ("December 2011") hard up against GP so the two read as a
   single field. Left-justified, header and cells together, with room before GP. The !important
   is load-bearing: it has to beat .lb-table th:nth-child(n+4)/td:nth-child(n+4).
   ALIGNMENT ONLY on the th — an earlier version also set font-size here, which overrode the
   table's 10px uppercase header style and left "WHEN" visibly larger than every other heading. */
.rec-table th.rec-when,
.rec-table td.rec-when {
  text-align: left !important;
  padding-right: 22px !important;
  white-space: nowrap;
}
.rec-table td.rec-when {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-dim);
}
/* The save-ratio header wraps to two lines so the widest heading on the table doesn't set
   the width of the column carrying the most important number on the page. */
.rec-table thead th { line-height: 1.25; vertical-align: bottom; }

/* Months table only. "OCTOBER 2010" is nearly twice the width of "1970-71"; set in small
   caps it labels the row without competing with the numbers it sits beside. */
.rec-table--longwhen td.rec-when {
  font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint);
}

/* Team abbreviation -> full club name on hover. <abbr> is the semantically correct element
   and gets the tooltip for free; the dotted underline is the long-standing convention that
   says "there is more here", so a reader knows to hover at all.
   Browsers underline <abbr title> by default in a way that clashes with the table, so the
   decoration is set explicitly rather than inherited. */
.lb-team abbr {
  text-decoration: underline dotted;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  cursor: help;
}

/* ---- Sortable columns ----
   The # column is deliberately NOT renumbered on sort: it is the all-time RANK, not a row
   counter. Sort by GP and you can still see that the row you are looking at is the 3rd-best
   month in history — renumbering would destroy the one number the page exists to state. */
/* The arrow sits inline, 5px to the right of each heading's text (margin-left), so it reads as
   part of the label rather than floating in the column's far corner. On the two-line
   "Save / ratio" header it trails "ratio" on the second line, still immediately right of the
   text, which is what we want. */
.lb-table th.is-sortable { cursor: pointer; user-select: none; }
.lb-table th.is-sortable:hover { color: var(--ink); }
.lb-table th.is-sortable::after {
  content: '\2195';
  margin-left: 5px;   /* sits 5px to the right of the heading text, inline */
  opacity: 0.25; font-size: 10px; line-height: 1;
}
.lb-table th[aria-sort="ascending"]::after  { content: '\2191'; opacity: 1; color: var(--gold-line); }
.lb-table th[aria-sort="descending"]::after { content: '\2193'; opacity: 1; color: var(--gold-line); }
.lb-table th[aria-sort] { color: var(--ink); }

/* Table filter pills. Identical shape, size, font and casing to the league switcher above,
   so the two rows read as one control surface. The only thing separating them is TONE: the
   league pills fill with the full brand gold, these fill with a lighter tint of the same
   gold. Same family, clearly subordinate — which is exactly the relationship (pick a
   league, then pick a table within it).
   Selectors are .text-page-scoped because .text-page a (0,1,1) out-specifies a bare class
   and would otherwise repaint these as underlined gold body links. */
.rec-sections { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 22px; }
.text-page a.rec-section,
.rec-section {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-dim);
  text-decoration: none; cursor: pointer; font-weight: 400;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.text-page a.rec-section:hover,
.rec-section:hover,
.rec-section:focus-visible { border-color: var(--gold-line); color: var(--ink); background: var(--surface); }
/* Lighter tint of the league gold, with the same near-black text the league pills use. */
.text-page a.rec-section.is-active,
.text-page a.rec-section.is-active:hover,
.rec-section.is-active,
.rec-section.is-active:hover {
  background: #ffe884; border-color: #e8c93f; color: #1a1500; font-weight: 700;
}

/* Filtering is JS-only. Without JS every section stays visible and the pills fall back to
   plain anchor links — the record data must never depend on a script to be readable, or a
   crawler (and the SEO case for this whole page) sees an empty shell. */
.rec-block[hidden] { display: none; }

/* The decade table's whole argument is the shape: a U, with the 1980s at the bottom and
   the 2010s at the top. The bar makes that visible without a chart library. */
/* Breathing room between the save % figure and the bar it sits beside — without it the
   bar reads as an extension of the number rather than a separate column. */
.rec-decades .rec-svp { padding-right: 26px !important; }
.rec-decades .rec-bar { width: 40%; padding-right: 0; padding-left: 8px; }
.rec-decades .rec-bar span {
  display: block; height: 9px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-line, #e6c200), var(--gold));
}
.rec-decades .lb-sr.is-best  { color: var(--lime); }
.rec-decades .lb-sr.is-worst { color: #c0453d; }

/* Shallow-league honesty banner. The PWHL has three seasons; a page saying "best in
   league history" without saying how long that history is would be overselling, and one
   reply would take it — and the credibility of the stat — apart. */
.rec-shallow {
  border-left: 3px solid var(--gold);
  padding: 10px 0 10px 14px !important;
  background: rgba(255, 215, 0, 0.06);
  border-radius: 0 8px 8px 0;
}

/* Stretch-length sub-pills. One level below the table pills: smaller, and they never fill
   with the brand gold — a nested control must not out-shout its parent. */
.rec-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.text-page a.rec-size,
.rec-size { font-size: 11px; padding: 5px 10px; }
.text-page a.rec-size.is-active,
.rec-size.is-active { background: var(--surface-2); border-color: var(--gold-line); color: var(--ink); }
.rec-size-block[hidden] { display: none; }

/* The date range is the story — "Dec 31, 2003 – Jan 9, 2004" is what a reader can go and
   look up. Wide enough that it never wraps mid-range. */
.rec-table td.rec-range,
.rec-table th.rec-range {
  text-align: left !important; padding-right: 22px !important; white-space: nowrap;
}
.rec-table td.rec-range {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--ink-faint);
}
