/* Club nights design system
   One committed look: a night session under the lights. Navy court, optic-yellow ball.
   Accent tokens (--ball, --ball-2) default to today's palette and are set at boot from tenant.json.
   Mobile-first at 380px; every measure scales up from there. */

:root {
  --bg: #0a1020;
  --bg-2: #0d1528;
  --surface: #131c32;
  --surface-2: #1a2540;
  --surface-3: #22304f;
  --line: rgba(160, 180, 220, 0.14);
  --line-strong: rgba(160, 180, 220, 0.28);

  --text: #f2f5fb;
  --text-2: #c6cfe2;
  --muted: #8f9cb8;
  --faint: #5c6a8a;

  --ball: #dcf542;
  --ball-2: #b9d422;
  --ball-ink: #0a1020;
  --sky: #7ec8ff;
  --up: #4ade80;
  --down: #fb7185;
  --gold: #f6c453;
  --silver: #cbd5e1;
  --bronze: #d9a06a;

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --pad: 16px;
  --gap: 12px;
  --nav-h: 64px;

  --shadow-hero: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 150ms;
  --normal: 320ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input { font: inherit; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 2px solid var(--ball); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell ---------- */
.shell { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 16, 32, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
  isolation: isolate;
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand > span { min-width: 0; }
.brand__ball { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3ff8a, var(--ball) 55%, var(--ball-2)); position: relative; flex: none; box-shadow: 0 0 0 4px rgba(220, 245, 66, 0.12); }
.brand__ball::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid rgba(10, 16, 32, 0.35); border-left-color: transparent; border-right-color: transparent; transform: rotate(35deg); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.brand__sub { font-size: 10.5px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 3px; white-space: normal; overflow-wrap: break-word; line-height: 1.35; }
.brand__sub--notice { text-transform: none; letter-spacing: 0.02em; font-weight: 500; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: background var(--fast), color var(--fast); }
.topnav a:hover { background: var(--surface-2); color: var(--text); }
.topnav a[aria-current='page'] { background: var(--surface-3); color: var(--ball); }
.weekchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.weekchip b { color: var(--ball); font-weight: 700; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  background: rgba(13, 21, 40, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  isolation: isolate;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current='page'] { color: var(--ball); }
/* Phones (incl. Pro Max landscape ~956px) keep the tab bar. Desktop chrome from 1024px. */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .topbar__in { min-height: 66px; }
  .brand__name { font-size: 19px; }
  :root { --pad: 28px; --gap: 16px; }
}

.page { padding: 18px 0 40px; }
@media (prefers-reduced-motion: no-preference) {
  .page { animation: rise var(--normal) var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- type ---------- */
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kicker--ball { color: var(--ball); }
.h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 8vw, 46px); letter-spacing: -0.03em; line-height: 0.98; margin: 6px 0 8px; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.lede { color: var(--text-2); font-size: 15px; max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.micro { font-size: 11.5px; }
.section { margin-top: 30px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section__head .h2 { margin-top: 4px; }
.link { color: var(--sky); font-weight: 600; font-size: 13px; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.card--pad-0 { padding: 0; overflow: hidden; }
.card--flat { background: var(--bg-2); }
.card--ball { background: linear-gradient(135deg, rgba(220, 245, 66, 0.16), rgba(220, 245, 66, 0.04)); border-color: rgba(220, 245, 66, 0.35); }
.card__head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Court-line hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, #15224a 0%, #0f1a3a 45%, #0b132a 100%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-hero);
  padding: 22px 20px 20px;
}
.hero::before {
  content: '';
  position: absolute; inset: -40% -20% -20% 40%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)) 0 48% / 100% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)) 30% 0 / 2px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)) 70% 0 / 2px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)) 0 0 / 100% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)) 0 100% / 100% 2px no-repeat;
  transform: perspective(600px) rotateX(58deg) rotate(-8deg);
  transform-origin: center;
  pointer-events: none;
}
@media (hover: none) {
  .hero::before { transform: none; opacity: 0.45; }
}
.hero::after {
  content: '';
  position: absolute; width: 380px; height: 380px; right: -140px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 245, 66, 0.22), rgba(220, 245, 66, 0) 62%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 9vw, 52px); letter-spacing: -0.03em; line-height: 0.95; margin: 6px 0 0; word-break: break-word; }
.hero__rank { text-align: right; flex: none; }
.hero__rank .display { font-size: clamp(44px, 14vw, 76px); color: var(--ball); font-weight: 800; letter-spacing: -0.05em; }
.hero__rank .display sup { font-size: 0.42em; vertical-align: top; margin-top: 0.4em; display: inline-block; color: var(--ball-2); }
.hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.hero__chart { margin-top: 16px; }
@media (min-width: 640px) {
  .hero { padding: 28px 28px 24px; }
  .hero__stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- stats ---------- */
.stat { min-width: 0; }
.stat__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; line-height: 1.05; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat__value--ball { color: var(--ball); }
.stat__value--sm { font-size: 20px; }
.stat__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.statgrid .card { padding: 14px; }
@media (min-width: 640px) { .statgrid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip--up { background: rgba(74, 222, 128, 0.14); color: var(--up); }
.chip--down { background: rgba(251, 113, 133, 0.14); color: var(--down); }
.chip--flat { background: var(--surface-3); color: var(--muted); }
.chip--new { background: rgba(126, 200, 255, 0.16); color: var(--sky); }
.chip--ball { background: var(--ball); color: var(--ball-ink); }
.chip--ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; }
.chip--gold { background: rgba(246, 196, 83, 0.18); color: var(--gold); }
.chip--sky { background: rgba(126, 200, 255, 0.14); color: var(--sky); }
.chip--sm { font-size: 11px; padding: 2px 7px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); transition: transform var(--fast), background var(--fast), border-color var(--fast); }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn--ball { background: var(--ball); color: var(--ball-ink); border-color: transparent; }
.btn--ball:hover { background: #e8ff5c; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- search ---------- */
.search { position: relative; }
.search__input {
  width: 100%; padding: 15px 44px 15px 46px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 16px; outline: none; transition: border-color var(--fast), box-shadow var(--fast);
}
.search__input::placeholder { color: var(--faint); }
.search__input:focus { border-color: var(--ball); box-shadow: 0 0 0 4px rgba(220, 245, 66, 0.15); }
.search__icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2.2; stroke-linecap: round; }
.search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.search__clear:hover { background: var(--surface-3); color: var(--text); }
.search__results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8); }
.search__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.search__row:last-child { border-bottom: 0; }
.search__row:hover, .search__row[aria-selected='true'] { background: var(--surface-3); }
.search__row b { font-weight: 600; }

/* ---------- list rows (standings) ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  padding: 11px 12px; border-bottom: 1px solid var(--line);
  transition: background var(--fast);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row--me { background: linear-gradient(90deg, rgba(220, 245, 66, 0.12), transparent 60%); box-shadow: inset 3px 0 0 var(--ball); }
.row__rank { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.row__rank--1 { color: var(--gold); }
.row__rank--2 { color: var(--silver); }
.row__rank--3 { color: var(--bronze); }
.row__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row__name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.row__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.row__right { display: flex; align-items: center; gap: 12px; }
.row__spark { display: none; }
.row__pts { text-align: right; }
.row__pts b { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.row__pts span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
@media (min-width: 640px) {
  .row { grid-template-columns: 48px 1fr auto; padding: 12px 16px; }
  .row__spark { display: block; }
}
.row.row--night { grid-template-columns: minmax(0, 1fr); }
.row.row--night .row__name {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
}

/* ---------- full table (desktop standings) ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tablewrap::-webkit-scrollbar { height: 8px; }
.tablewrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.tablewrap::-webkit-scrollbar-track { background: transparent; }
.tablecard { position: relative; }
.tablecard::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 64px; pointer-events: none; opacity: 0; transition: opacity var(--fast); background: linear-gradient(90deg, rgba(19, 28, 50, 0), var(--surface) 85%); }
.tablecard[data-scroll='more']::after { opacity: 1; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { background: var(--surface-2); color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; padding: 10px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.table th:first-child, .table th.left, .table td.left { text-align: left; }
.table th button { color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.table th[aria-sort='descending'] button::after { content: ' ▾'; color: var(--ball); }
.table th[aria-sort='ascending'] button::after { content: ' ▴'; color: var(--ball); }
.table th[aria-sort='descending'], .table th[aria-sort='ascending'] { color: var(--text); }
.table td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.wk, .table td.wk { padding-left: 6px; padding-right: 6px; min-width: 36px; }
.table tr:hover td { background: var(--surface-2); }
.table tr.is-me td { background: rgba(220, 245, 66, 0.08); }
.table td.dim { color: var(--faint); }
.table td.dim2 { color: var(--muted); }
.table td.dropped { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(251, 113, 133, 0.5); }
.table td.strong { font-weight: 800; color: var(--ball); font-size: 15px; font-family: var(--font-display); }
.table td.name { font-weight: 600; text-align: left; width: 150px; min-width: 150px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.table th.sticky--2 { width: 150px; min-width: 150px; }
.table td.name a:hover { color: var(--ball); }
.table td.rank { color: var(--muted); font-family: var(--font-display); font-weight: 800; font-size: 16px; width: 46px; min-width: 46px; }
.table td.rank--top { color: var(--ball); }
.table .sticky { position: sticky; z-index: 2; background: var(--surface); }
.table th.sticky { background: var(--surface-2); z-index: 3; }
.table .sticky--1 { left: 0; }
.table .sticky--2 { left: 46px; }
.table .sticky--3 { left: 196px; box-shadow: 10px 0 14px -10px rgba(0, 0, 0, 0.75); }
.table tr:hover td.sticky { background: var(--surface-2); }
.table tr.is-me td.sticky { background: color-mix(in srgb, var(--surface) 90%, var(--ball)); }
.only-desktop-inline { display: none; }
@media (min-width: 1024px) {
  .only-desktop-inline { display: inline; }
  .card--wide { --wide: min(calc(100vw - 2 * var(--pad) - 20px), 1440px); width: var(--wide); margin-left: calc(50% - var(--wide) / 2); }
}

/* ---------- headline cards ---------- */
.headlines { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding: 2px 0 10px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-width: none; }
.headlines::-webkit-scrollbar { display: none; }
.headline { scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; transition: border-color var(--fast), transform var(--fast); }
.headline:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.headline--lead { background: linear-gradient(150deg, rgba(220, 245, 66, 0.2), rgba(220, 245, 66, 0.03) 60%), var(--surface); border-color: rgba(220, 245, 66, 0.4); }
.headline__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.headline__label svg { width: 14px; height: 14px; stroke: var(--ball); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.headline__big { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1.05; margin-top: 10px; }
.headline__stat { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.04em; line-height: 1; color: var(--ball); margin-top: 6px; font-variant-numeric: tabular-nums; }
.headline__sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
@media (min-width: 640px) {
  .headlines { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0; padding: 0; }
}
@media (min-width: 900px) {
  .headlines { grid-template-columns: 1.35fr 1fr 1fr 1fr; }
}

/* ---------- night strip ---------- */
.night { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
@media (max-width: 520px) { .night { grid-template-columns: 1fr; } }
.night__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 13.5px; }
.night__facts b { color: var(--text); font-weight: 700; }

/* ---------- grids ---------- */
.grid-2 { display: grid; gap: var(--gap); }
.grid-3 { display: grid; gap: var(--gap); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.split { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }

/* ---------- pair / rival rows ---------- */
.pair { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pair:last-child { border-bottom: 0; }
.pair__names { font-weight: 600; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; }
.pair__names .amp { color: var(--faint); font-weight: 400; }
.pair__meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pair__pct { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.pair__pct small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--ball); transition: width var(--normal) var(--ease); }
.bar--split { display: flex; background: var(--down); }
.bar--split > i { border-radius: 999px 0 0 999px; background: var(--up); }

.rival { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rival:last-child { border-bottom: 0; }
.rival__a { text-align: right; font-weight: 600; }
.rival__b { font-weight: 600; }
.rival__score { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rival__score small { display: block; font-family: var(--font-body); font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.rival .lose { color: var(--muted); }

/* ---------- matrix ---------- */
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.matrix th { font-weight: 600; color: var(--muted); padding: 2px 4px; white-space: nowrap; }
.matrix thead th { writing-mode: vertical-rl; transform: rotate(180deg); height: 68px; font-size: 11px; text-align: left; }
.matrix tbody th { text-align: right; padding-right: 8px; }
.matrix td { width: 38px; height: 34px; text-align: center; border-radius: 7px; font-weight: 700; background: var(--surface-2); color: var(--faint); font-variant-numeric: tabular-nums; }
.matrix td.c0 { color: var(--faint); }
.matrix td.c1 { background: rgba(251, 113, 133, 0.22); color: #fecdd3; }
.matrix td.c2 { background: var(--surface-3); color: var(--text-2); }
.matrix td.c3 { background: rgba(220, 245, 66, 0.3); color: var(--text); }
.matrix td.c4 { background: var(--ball); color: var(--ball-ink); }
.matrix td.self { background: transparent; }

/* ---------- courts (week detail) ---------- */
.court { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.court__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.court__title { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.court table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.court td, .court th { padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); white-space: nowrap; }
.court th { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.court td.left, .court th.left { text-align: left; }
.court tr:last-child td { border-bottom: 0; }
.court td.pts { font-weight: 800; color: var(--ball); }
.court td.pos { color: var(--muted); width: 30px; }
.court__sets { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 12.5px; color: var(--text-2); display: grid; gap: 5px; }
.court__sets b { color: var(--text); font-weight: 600; }
.court__sets .score { font-family: var(--font-display); font-weight: 800; color: var(--ball); margin: 0 6px; font-variant-numeric: tabular-nums; }
.court__note { padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.bad { color: var(--down); }
.court td.bad { color: var(--down); font-weight: 700; }

/* ---------- history timeline ---------- */
.timeline { position: relative; display: grid; gap: 14px; }
.week { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; transition: border-color var(--fast), transform var(--fast); }
.week:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.week--latest { background: linear-gradient(150deg, rgba(220, 245, 66, 0.14), rgba(220, 245, 66, 0.02) 55%), var(--surface); border-color: rgba(220, 245, 66, 0.35); }
.week__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.week__title { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; display: inline-block; }
.week__title:hover { color: var(--ball); }
.week__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .week__facts { grid-template-columns: repeat(4, 1fr); } }
.week__story { margin-top: 12px; color: var(--text-2); font-size: 14px; display: grid; gap: 4px; }
.winners { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- misc ---------- */
.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.meter { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.meter i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.meter i.on { background: var(--ball); }
.banner { background: rgba(126, 200, 255, 0.12); border: 1px solid rgba(126, 200, 255, 0.35); color: var(--sky); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.banner--warn { background: rgba(246, 196, 83, 0.12); border-color: rgba(246, 196, 83, 0.4); color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translateX(-50%); background: var(--ball); color: var(--ball-ink); font-weight: 700; padding: 10px 16px; border-radius: 999px; z-index: 60; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6); animation: rise var(--fast) var(--ease); }
@media (min-width: 1024px) { .toast { bottom: 24px; } }
.footer { margin-top: 48px; padding: 20px 0 10px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: flex-start; }
.footer a { color: var(--muted); }
.footer > span:first-child { flex: 1 1 16rem; min-width: 0; }
.footer__wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; color: var(--muted); margin-left: auto; white-space: nowrap; flex: 0 0 auto; }
.footer__marker { display: block; font-size: 11px; letter-spacing: 0.02em; color: var(--faint); margin-bottom: 6px; }
.recap-line { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; line-height: 1.25; margin: 10px 0 8px; }
@media (max-width: 639px) {
  .footer { flex-direction: column; align-items: stretch; }
  .footer__wordmark { margin-left: auto; }
}
.masthead { margin: 0 0 14px; }
.masthead--text { display: flex; flex-direction: column; gap: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 13px; background: var(--surface-3); color: var(--text); flex: none; }
.avatar--ball { background: var(--ball); color: var(--ball-ink); }
.plist { display: grid; gap: 8px; }
.plist a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.plist a:hover { border-color: var(--line-strong); }
details.disclose { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
details.disclose > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: '+'; font-family: var(--font-display); font-size: 20px; color: var(--muted); }
details.disclose[open] > summary::after { content: '–'; }
details.disclose > .disclose__body { padding: 0 16px 16px; }
.skeleton { display: grid; gap: 12px; }
.skeleton i { display: block; height: 80px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* responsive helpers */
.only-desktop { display: none; }
@media (min-width: 1024px) { .only-desktop { display: block; } .only-mobile { display: none; } }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-body); }
.race-label { font-weight: 700; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .page { opacity: 1; transform: none; }
  .topbar, .tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .topbar, .tabbar, .footer, .btn { display: none !important; }
  .card, .hero, .week, .court { border-color: #ccc; background: #fff; color: #000; box-shadow: none; }
}

/* ---------- season honours ---------- */
.awards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .awards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .awards { grid-template-columns: repeat(4, 1fr); } }
.award { display: flex; flex-direction: column; justify-content: space-between; min-height: 132px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; transition: border-color var(--fast), transform var(--fast); }
.award:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.award--lead { background: linear-gradient(150deg, rgba(246, 196, 83, 0.18), rgba(246, 196, 83, 0.02) 60%), var(--surface); border-color: rgba(246, 196, 83, 0.4); }
.award__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.award__label svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.award__who { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; margin-top: 10px; overflow-wrap: anywhere; }
.award__who .amp { color: var(--faint); font-weight: 400; }
.award__value { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.04em; line-height: 1; color: var(--ball); margin-top: 6px; font-variant-numeric: tabular-nums; }
.award__sub { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.honours { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.honours .chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 720px) { .statgrid--3 { grid-template-columns: repeat(3, 1fr); } }
.stat__sub .up { color: var(--up); font-weight: 700; }
.stat__sub .down { color: var(--down); font-weight: 700; }
.stat__sub .bar { margin-top: 6px; height: 4px; }

/* ---------- polish: floodlit atmosphere (2026-09-23) ----------
   Additive layer: layout and the tokens above are unchanged; this adds light, depth and motion.
   --glow follows the accent, so tenant palettes carry through. */
:root {
  --glow: var(--ball);
  --glow-2: var(--sky);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --lift: 0 18px 40px -22px rgba(0, 0, 0, 0.85);
  scrollbar-color: var(--surface-3) var(--bg);
}
::selection { background: color-mix(in srgb, var(--glow) 32%, transparent); color: var(--text); }
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% -14%, color-mix(in srgb, var(--glow) 10%, transparent), transparent 62%),
    radial-gradient(60% 45% at -5% 0%, color-mix(in srgb, var(--glow-2) 8%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 45%);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 5%, color-mix(in srgb, var(--glow) 50%, transparent) 50%, transparent 95%);
}
.topnav a[aria-current='page'] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 28%, transparent); }
.tabbar a { position: relative; transition: color var(--fast); }
.tabbar a[aria-current='page']::before {
  content: ''; position: absolute; top: -1px; left: 50%; width: 28px; height: 3px; transform: translateX(-50%);
  border-radius: 0 0 3px 3px; background: var(--glow);
  box-shadow: 0 0 14px color-mix(in srgb, var(--glow) 70%, transparent);
}
.tabbar a[aria-current='page'] svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--glow) 45%, transparent)); }

.card, .court, .week, .headline, .award, details.disclose { box-shadow: var(--edge); }
.hero { box-shadow: var(--shadow-hero), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
@media (hover: hover) {
  .headline:hover, .week:hover, .award:hover, .plist a:hover {
    box-shadow: var(--edge), var(--lift);
    border-color: color-mix(in srgb, var(--glow) 30%, var(--line-strong));
  }
  .btn:hover { transform: translateY(-1px); }
}
.btn { transition: transform var(--fast), background var(--fast), border-color var(--fast), box-shadow var(--fast); }
.btn:active { transform: scale(0.98); }
.btn--ball, .btn--accent {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 60%);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--glow) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero__rank .display { text-shadow: 0 0 36px color-mix(in srgb, var(--glow) 40%, transparent); }
.stat__value--ball, .stat__value--accent, .headline__stat, .award__value { text-shadow: 0 0 22px color-mix(in srgb, currentColor 30%, transparent); }
.row__rank--1 { text-shadow: 0 0 16px color-mix(in srgb, var(--gold) 50%, transparent); }
.chip--up, .chip--down, .chip--new, .chip--gold, .chip--sky { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent); }
.footer { border-top-color: transparent; background: linear-gradient(90deg, transparent, var(--line-strong), transparent) top / 100% 1px no-repeat; }

@media (prefers-reduced-motion: no-preference) {
  .page > * { animation: rise var(--normal) var(--ease) backwards; }
  .page > :nth-child(2) { animation-delay: 40ms; }
  .page > :nth-child(3) { animation-delay: 80ms; }
  .page > :nth-child(4) { animation-delay: 120ms; }
  .page > :nth-child(n + 5) { animation-delay: 160ms; }
}
@media print { body::before { display: none; } }
