/* ============================================================================
   SPA POOL — VIII
   English 8-ball aesthetic. Aramith Pro Cup palette. Stenciled numerals.
   ============================================================================ */

:root {
  /* Aramith-inspired palette */
  --ink:        #0a0907;
  --ink-2:      #14110d;
  --ink-3:      #1f1a14;
  --bone:       #f1ebe0;
  --bone-2:     #e6dfd0;
  --bone-3:     #d8cfbb;
  --paper:      #faf6ec;

  --red:        #8a1a14;   /* Aramith red */
  --red-deep:   #5a0f0a;
  --red-glow:   #b8281c;

  --yellow:     #d4a017;   /* Aramith yellow */
  --yellow-deep:#8a6510;
  --yellow-glow:#e8b733;

  --rule:       rgba(241,235,224,0.14);
  --rule-strong:rgba(241,235,224,0.28);

  /* Type */
  --display:    'Antonio', 'Oswald', 'Bebas Neue', sans-serif;
  --body:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ────────── Felt-grain noise overlay ────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

#root { position: relative; z-index: 2; }

/* ────────── Layout ────────── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ============================================================================
   HERO — masthead with giant 8-ball
   ============================================================================ */
.hero {
  position: relative;
  background: var(--ink);
  border-bottom: 2px solid var(--bone);
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-3);
  position: relative; z-index: 4;
}

.topbar-meta { display: flex; gap: 28px; }
.topbar-meta span { display: inline-flex; align-items: center; gap: 8px; }
.topbar-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red-glow); animation: pulse 2.4s ease-in-out infinite; }
@media (max-width: 640px) {
  .topbar-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.topbar-nav {
  display: flex; gap: 24px;
}
.topbar-nav a {
  color: var(--bone-3);
  text-decoration: none;
  transition: color 0.15s;
}
.topbar-nav a:hover { color: var(--yellow); }

/* Masthead */
.hero-stage {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 60px 0 80px;
}

@media (max-width: 900px) {
  .hero-stage { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 60px; }
}

.hero-text { position: relative; z-index: 3; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--yellow), transparent);
  max-width: 180px;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 12px;
}
.hero-title .ti { display: block; }
.hero-title .ti.red { color: var(--red-glow); }
.hero-title .ti.outline {
  -webkit-text-stroke: 2px var(--bone);
  color: transparent;
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 36px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-strong);
}
.hero-meta-item .lbl {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-3);
  margin-bottom: 6px;
}
.hero-meta-item .val {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bone);
  text-transform: uppercase;
}
.hero-meta-item .val.red { color: var(--red-glow); }
.hero-meta-item .val.yellow { color: var(--yellow); }

/* The 8-ball */
.eight-ball-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 480px;
}

.eight-ball {
  position: relative;
  width: min(72vh, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #4a3f30 0%, #1a1410 28%, #050402 70%, #000 100%);
  box-shadow:
    inset -40px -40px 80px rgba(0,0,0,0.9),
    inset 30px 30px 60px rgba(255,200,120,0.04),
    0 40px 120px rgba(0,0,0,0.8),
    0 0 0 2px rgba(241,235,224,0.06);
  animation: roll 30s linear infinite;
}
.eight-ball::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 22%;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,240,210,0.32), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.eight-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #f1ebe0 50%, #c8c0b0 100%);
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.eight-numeral {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16vw;
  color: #0a0907;
  line-height: 1;
  transform: translateY(-3%);
  letter-spacing: -0.04em;
}
@media (max-width: 900px) {
  .eight-ball { width: min(80vw, 440px); }
  .eight-numeral { font-size: 32vw; }
}
@keyframes roll {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* Counter-rotate the numeral */
.eight-circle { animation: counter-roll 30s linear infinite; }
@keyframes counter-roll {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Decorative red & yellow balls */
.deco-ball {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.deco-ball.red {
  width: 88px; aspect-ratio: 1;
  bottom: 8%; left: 4%;
  background: radial-gradient(circle at 32% 28%, #d4453c, #8a1a14 60%, #4a0a06 100%);
  box-shadow: inset -8px -8px 16px rgba(0,0,0,0.5), 0 12px 30px rgba(0,0,0,0.5);
}
.deco-ball.yellow::after {
  content: '';
  position: absolute;
  inset: 30% 35%;
  background: rgba(241,235,224,0.95);
  border-radius: 50%;
}
.deco-ball.yellow {
  width: 72px; aspect-ratio: 1;
  top: 20%; right: 4%;
  background: radial-gradient(circle at 32% 28%, #f5c54a, #d4a017 60%, #7a5a0a 100%);
  box-shadow: inset -8px -8px 16px rgba(0,0,0,0.4), 0 10px 24px rgba(0,0,0,0.5);
}
@media (max-width: 900px) {
  .deco-ball { display: none; }
}

/* Edition stamp — bottom-left */
.hero-stamp {
  position: absolute;
  bottom: 32px;
  left: 32px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--bone-3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 3;
}
.hero-stamp .big {
  font-family: var(--display);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--bone);
  line-height: 0.9;
  margin-top: 8px;
  letter-spacing: -0.02em;
}
.hero-stamp .big .slash { color: var(--red-glow); margin: 0 4px; }
.hero-stamp .big .stamp-label {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--red-glow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 4px;
  vertical-align: middle;
}
@media (max-width: 900px) { .hero-stamp { display: none; } }

/* ============================================================================
   SECTION CHROME
   ============================================================================ */
section {
  position: relative;
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
}
section.light {
  background: var(--bone);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
section.light .section-eyebrow { color: var(--red); }
section.light .section-title { color: var(--ink); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid currentColor;
  border-bottom-color: var(--rule-strong);
  gap: 24px;
  flex-wrap: wrap;
}
section.light .section-head { border-bottom-color: rgba(10,9,7,0.15); }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--yellow);
  display: flex; align-items: center; gap: 12px;
}
.section-eyebrow .num {
  font-family: var(--display);
  font-size: 1.8rem;
  color: currentColor;
  font-weight: 700;
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--bone);
  flex: 1;
  min-width: 260px;
}
.section-title .accent { color: var(--red-glow); }

.section-aside {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--bone-3);
  text-align: right;
  letter-spacing: 0.04em;
  max-width: 260px;
}
section.light .section-aside { color: var(--ink-3); }
@media (max-width: 640px) {
  .section-aside {
    text-align: left;
    max-width: none;
    width: 100%;
  }
}

/* ============================================================================
   STANDINGS
   ============================================================================ */
.standings-section { background: var(--bone); color: var(--ink); }
.standings-section .section-title { color: var(--ink); }
.standings-section .section-aside { color: rgba(10,9,7,0.6); }

.standings-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
@media (max-width: 900px) {
  .standings-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--paper);
  border: 2px solid var(--ink);
  position: relative;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.panel-head .badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--yellow);
  font-weight: 500;
}

/* Player rows */
.player-list { padding: 0; }
.player-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(10,9,7,0.08);
  transition: background 0.15s;
}
.player-row:last-child { border-bottom: none; }
.player-row:hover { background: rgba(10,9,7,0.03); }
.player-row.top {
  background: linear-gradient(90deg, rgba(212,160,23,0.12), transparent 60%);
  border-left: 4px solid var(--yellow);
  padding-left: 16px;
}

.player-rank {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.player-row:not(.top) .player-rank { color: rgba(10,9,7,0.35); }
.player-rank .ord {
  font-family: var(--mono);
  font-size: 0.65rem;
  vertical-align: super;
  font-weight: 500;
  color: rgba(10,9,7,0.4);
  margin-left: 2px;
}

.player-name {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-stats {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(10,9,7,0.55);
  letter-spacing: 0.04em;
  display: flex;
  gap: 16px;
}
.player-stats span strong {
  color: var(--ink);
  font-weight: 700;
  margin-right: 4px;
}

.player-pts {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  min-width: 60px;
  text-align: right;
}
.player-row.top .player-pts { color: var(--red); }

@media (max-width: 760px) {
  .player-row {
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }
  .player-row.top { padding-left: 12px; }
  .player-rank { font-size: 1.8rem; }
  .player-name { font-size: 0.95rem; gap: 8px; }
  .player-stats { display: none; }
  .player-pts { font-size: 1.6rem; min-width: 44px; }
}

/* Team chip */
.team-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bone);
  flex-shrink: 0;
  position: relative;
  box-shadow: inset -3px -3px 6px rgba(0,0,0,0.3), inset 3px 3px 6px rgba(255,255,255,0.15);
}
.team-chip::before {
  content: '';
  position: absolute;
  inset: 30% 30%;
  background: var(--bone);
  border-radius: 50%;
  z-index: 0;
}
.team-chip span { position: relative; z-index: 1; color: var(--ink); font-size: 0.7rem; }

/* Team panel */
.team-list { padding: 0; }
.team-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(10,9,7,0.08);
}
.team-row:last-child { border-bottom: none; }
.team-row.top { background: rgba(212,160,23,0.08); }

.team-ball {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.4), inset 4px 4px 8px rgba(255,255,255,0.18), 0 4px 8px rgba(0,0,0,0.2);
}
.team-ball::after {
  content: '';
  position: absolute;
  top: 18%; left: 22%;
  width: 30%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,240,210,0.55), transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
}

.team-info { display: flex; flex-direction: column; gap: 2px; }
.team-name {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.team-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(10,9,7,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-pts {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
}
.team-row.top .team-pts { color: var(--red); }

.team-roster-strip {
  padding: 16px 20px;
  background: rgba(10,9,7,0.04);
  border-top: 1px solid rgba(10,9,7,0.08);
}
.team-roster-strip h4 {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(10,9,7,0.5);
  margin-bottom: 10px;
}
.roster-team-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.roster-team-block:last-child { margin-bottom: 0; }
.roster-team-label {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 56px;
}
.roster-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(10,9,7,0.7);
  padding: 2px 0;
}
.roster-chip + .roster-chip::before {
  content: '·';
  margin: 0 8px;
  color: rgba(10,9,7,0.3);
}

/* ============================================================================
   FIXTURES — dark
   ============================================================================ */
.fixtures-section { background: var(--ink); }

.round-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule-strong);
  flex-wrap: wrap;
}
.round-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: var(--bone-3);
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 24px 16px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.round-tab:hover {
  color: var(--bone);
}
.round-tab.active {
  color: var(--bone);
  border-bottom-color: var(--red-glow);
}
.round-tab .tab-date {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--bone-3);
  margin-top: 2px;
}
.round-tab.active .tab-date { color: var(--yellow); }
.round-tab.played::before {
  content: '';
  position: absolute;
  top: 16px; right: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}
.round-tab.tba::before {
  content: '';
  position: absolute;
  top: 16px; right: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bone-3);
  opacity: 0.4;
}
@media (max-width: 760px) {
  .round-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .round-tabs::-webkit-scrollbar { display: none; }
  .round-tab {
    flex: 0 0 auto;
    font-size: 1.1rem;
    padding: 10px 16px 12px;
  }
  .round-tab .tab-date { font-size: 0.6rem; }
  .round-tab.played::before,
  .round-tab.tba::before { top: 10px; right: 8px; width: 5px; height: 5px; }
}

/* View toggle (Grid vs By Player) */
.view-tabs {
  display: flex;
  gap: 4px;
  margin: 8px 0 24px;
  flex-wrap: wrap;
}
.view-tab {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--bone-3);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 22px;
  cursor: pointer;
  transition: all 0.15s;
}
.view-tab:hover { color: var(--bone); border-color: var(--bone-3); }
.view-tab.active {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

/* ============================================================================
   CROSSTABLE — round-robin grid
   ============================================================================ */
.crosstable-wrap {
  background: var(--ink-2);
  border: 1px solid var(--rule-strong);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.crosstable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--bone);
}
.crosstable th, .crosstable td {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 0;
  text-align: center;
  height: 44px;
}
.crosstable thead th {
  background: var(--ink-3);
  position: sticky;
  top: 0;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-3);
  font-weight: 500;
  height: 56px;
}
.ct-corner {
  position: sticky !important;
  left: 0;
  z-index: 3 !important;
  background: var(--ink-3) !important;
  min-width: 160px;
}
.ct-col-head {
  min-width: 48px;
  vertical-align: middle;
  padding: 4px 2px !important;
}
.ct-col-head .ct-col-ball { display: block; margin: 0 auto 4px; line-height: 0; }
.ct-col-head .ct-abbr {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bone);
  font-size: 0.72rem;
}
.ct-total-head {
  min-width: 56px;
  background: var(--ink) !important;
  color: var(--yellow) !important;
  font-weight: 700;
}

.ct-row-head {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ink-3);
  min-width: 160px;
  text-align: left !important;
  padding: 0 14px !important;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone);
}
.ct-row-head .fixture-ball { display: inline-block; vertical-align: middle; margin-right: 10px; }
.ct-row-name { vertical-align: middle; }

.crosstable tbody tr:hover .ct-row-head { background: var(--ink-2); }
.crosstable tbody tr:hover td:not(.ct-self) { background: rgba(241,235,224,0.04); }

.ct-self {
  background: var(--ink);
  background-image: linear-gradient(135deg, transparent 47%, var(--rule-strong) 47%, var(--rule-strong) 53%, transparent 53%);
}
.ct-empty {
  color: var(--bone-3);
  opacity: 0.35;
}
.ct-cell {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
}
.ct-cell .ct-cell-dash { color: var(--rule-strong); margin: 0 1px; font-weight: 400; }
.ct-cell.ct-win {
  color: var(--yellow-glow);
  background: rgba(212, 160, 23, 0.08);
}
.ct-cell.ct-loss {
  color: var(--bone-3);
  opacity: 0.55;
}
.ct-total {
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.crosstable-legend {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-3);
  border-top: 1px solid var(--rule);
  background: var(--ink-3);
}

@media (max-width: 760px) {
  .crosstable th, .crosstable td { height: 38px; }
  .ct-col-head { min-width: 38px; }
  .ct-col-head .ct-abbr { font-size: 0.62rem; }
  .ct-row-head { min-width: 110px; font-size: 0.78rem; padding: 0 8px !important; }
  .ct-row-head .fixture-ball { width: 14px !important; height: 14px !important; margin-right: 6px; }
  .ct-cell { font-size: 0.7rem; }
  .ct-total { font-size: 0.95rem; }
}

/* ============================================================================
   PLAYER ACCORDION — drill into a player's 16 fixtures
   ============================================================================ */
.player-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pa-card {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  transition: border-color 0.15s;
}
.pa-card:hover { border-color: var(--rule-strong); }
.pa-card.open { border-color: var(--bone-3); }
.pa-card.top { border-left: 3px solid var(--yellow); }

.pa-head {
  display: grid;
  grid-template-columns: 70px 1fr auto auto 28px;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 22px;
  cursor: pointer;
  color: var(--bone);
  text-align: left;
}
.pa-head:hover { background: var(--ink-3); }

.pa-rank {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--bone-3);
  line-height: 1;
}
.pa-card.top .pa-rank { color: var(--yellow); }
.pa-rank .ord {
  font-family: var(--mono);
  font-size: 0.55rem;
  vertical-align: super;
  color: var(--bone-3);
  margin-left: 2px;
  font-weight: 500;
}

.pa-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pa-stats {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--bone-3);
  letter-spacing: 0.04em;
}
.pa-stats span strong { color: var(--bone); font-weight: 700; margin-right: 3px; }

.pa-pts {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
  min-width: 48px;
  text-align: right;
}
.pa-card.top .pa-pts { color: var(--yellow); }

.pa-chevron {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--bone-3);
  text-align: center;
  width: 28px;
}
.pa-card.open .pa-chevron { color: var(--yellow); }

.pa-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  background: var(--ink);
}
.pa-fix {
  display: grid;
  grid-template-columns: 32px 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--rule);
}
.pa-fix:nth-child(odd) { border-right: 1px solid var(--rule); }

.pa-fix-vs {
  color: var(--bone-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.62rem;
}
.pa-fix-opp {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bone);
  text-transform: uppercase;
}
.pa-fix-result {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pa-fix-result .dash { color: var(--rule-strong); margin: 0 2px; font-weight: 400; }
.pa-fix.win .pa-fix-result { color: var(--yellow-glow); }
.pa-fix.loss .pa-fix-result { color: var(--bone-3); opacity: 0.5; }
.pa-fix.open .pa-fix-result {
  color: var(--bone-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 760px) {
  .pa-head {
    grid-template-columns: 50px 1fr auto 24px;
    gap: 12px;
    padding: 12px 16px;
  }
  .pa-stats { display: none; }
  .pa-name { font-size: 1.05rem; }
  .pa-pts { font-size: 1.2rem; }
  .pa-body { grid-template-columns: 1fr; }
  .pa-fix:nth-child(odd) { border-right: none; }
  .pa-fix { padding: 9px 16px; }
}

.round-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  gap: 20px;
}
.round-meta-left {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.round-meta-left .when {
  color: var(--bone-3);
  font-weight: 500;
  font-size: 1.1rem;
  margin-left: 12px;
}
@media (max-width: 640px) {
  .round-meta-left .when {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
}
.round-progress {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--bone-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-bar {
  width: 120px;
  height: 4px;
  background: var(--rule-strong);
  position: relative;
  overflow: hidden;
}
.progress-bar-fill {
  position: absolute;
  inset: 0;
  background: var(--yellow);
  transform-origin: left;
  transition: transform 0.4s ease;
}

/* Fixture card */
.fixtures-list {
  display: grid;
  gap: 8px;
}
.fixture {
  display: grid;
  grid-template-columns: 60px 1fr 160px 1fr 60px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  position: relative;
  transition: all 0.15s;
}
.fixture:hover { border-color: var(--rule-strong); background: var(--ink-3); }
.fixture.played { border-left: 3px solid var(--yellow); }
.fixture.tba { background: transparent; border-style: dashed; opacity: 0.55; }

.fixture-num {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--bone-3);
  opacity: 0.4;
  line-height: 1;
  letter-spacing: -0.04em;
}
.fixture.played .fixture-num { opacity: 0.7; }

.fixture-side {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fixture-side.right {
  flex-direction: row-reverse;
  text-align: right;
}
.fixture-player {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bone);
  line-height: 1.1;
}
.fixture-player .sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--bone-3);
  letter-spacing: 0.18em;
  margin-top: 4px;
}
.fixture-side.winner .fixture-player { color: var(--yellow-glow); }
.fixture-side.loser  .fixture-player { color: var(--bone-3); opacity: 0.55; }

/* small ball avatar in fixture */
.fixture-ball {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset -3px -3px 6px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.4);
}
.fixture-ball::after {
  content: '';
  position: absolute;
  top: 18%; left: 22%; width: 26%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5), transparent 70%);
  border-radius: 50%;
}
.fixture-side.winner .fixture-ball {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* Score cluster */
.fixture-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.score-num {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  width: 44px;
  text-align: center;
}
.score-num.win  { color: var(--yellow); }
.score-num.lose { color: var(--bone-3); opacity: 0.5; }
.score-dash {
  color: var(--rule-strong);
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
}

.score-vs {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-3);
  padding: 6px 14px;
  border: 1px solid var(--rule-strong);
}
.score-tba {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--yellow);
  padding: 6px 14px;
  border: 1px dashed var(--yellow);
  background: rgba(212,160,23,0.06);
}

.fixture-time {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--bone-3);
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .fixture {
    grid-template-columns: 40px 1fr 100px 1fr;
    padding: 14px 16px;
    gap: 8px;
  }
  .fixture-time { display: none; }
  .fixture-player { font-size: 1.05rem; }
  .fixture-num { font-size: 1.4rem; }
  .score-num { font-size: 1.8rem; width: 30px; }
  .fixture-ball { width: 22px; height: 22px; }
}

/* ============================================================================
   FOOTER — scoring & rules
   ============================================================================ */
.foot-section { background: var(--ink); padding-top: 48px; padding-bottom: 60px; }
.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .foot-grid { grid-template-columns: 1fr; }
}

.foot-block-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-strong);
}

.scoring-grid {
  display: grid;
  grid-template-columns: minmax(56px, auto) 1fr;
  gap: 12px 20px;
  align-items: center;
}
.scoring-result {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.scoring-points {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--bone-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scoring-points .pt-win { color: var(--yellow); font-weight: 700; }
.scoring-points .pt-lose { color: var(--bone-3); opacity: 0.6; }

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rules-list li {
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--bone);
  padding-left: 28px;
  position: relative;
  line-height: 1.4;
}
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  counter-increment: rule;
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red-glow);
  letter-spacing: 0.04em;
  font-weight: 700;
}
.rules-list { counter-reset: rule; }

.colophon-block .text {
  font-family: var(--body);
  color: var(--bone-3);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.colophon-block .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--bone-3);
  letter-spacing: 0.04em;
}
.colophon-block .stat-row strong { color: var(--bone); font-weight: 600; }

/* Final strip */
.final-strip {
  border-top: 1px solid var(--rule-strong);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-3);
  flex-wrap: wrap;
  gap: 20px;
}
.final-strip .mark {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  font-weight: 700;
  white-space: nowrap;
}
.final-strip .mark .red { color: var(--red-glow); }

/* ============================================================================
   STATE — loading
   ============================================================================ */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
