/* ============================================================
   Ligue TT Québec — Public Stylesheet
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #071923;
  --primary-h:     #087fb3;
  --primary-light: #d8f1fb;
  --accent:        #e5c61f;
  --accent-h:      #b99f11;
  --danger:       #dc2626;
  --danger-h:     #b91c1c;
  --danger-bg:    #fef2f2;
  --danger-border:#fecaca;
  --electric:      #0793c8;
  --gold:          #e5c61f;
  --bg:            #eef2f7;
  --surface:       #ffffff;
  --border:        #dce3ed;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --green:         #16a34a;
  --green-bg:      #dcfce7;
  --green-border:  #86efac;
  --radius-sm:     0.25rem;
  --radius:        0.375rem;
  --radius-lg:     0.5rem;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.14);
  --card-bg:       #ffffff;
  --table-head-bg: #f1f5f9;
  --container:     1100px;
  --nav-h:         3.75rem;
  --font:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--primary);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-h); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--primary); }

.container {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.site-header .container {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 1rem;
}
.site-logo {
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.site-logo .brand-mark {
  width: 3.375rem;
  height: 3.75rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.24));
}
.site-logo:hover { color: #cce0ff; text-decoration: none; }

.main-nav { flex: 1; min-width: 0; overflow: hidden; }
.main-nav ul { list-style: none; display: flex; gap: 0; flex-wrap: nowrap; }
.main-nav a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
  position: relative;
}
.main-nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.main-nav a[aria-current="page"] {
  background: rgba(255,255,255,.16);
  color: #fff;
  font-weight: 600;
}
.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0.4rem;
  right: 0.4rem;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.lang-switch a { color: rgba(255,255,255,.6); font-weight: 700; letter-spacing: .06em; }
.lang-switch a[aria-current="true"],
.lang-switch a:hover { color: #fff; text-decoration: none; }
.lang-switch span { color: rgba(255,255,255,.3); }

/* Hamburger toggle — always outside the nav, hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
  order: 3;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .lang-switch { order: 2; margin-left: auto; }
  .main-nav {
    order: 4;
    width: 100%;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #071923;
    padding: 0 1rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
  }
  /* ul is the menu — hidden by default, shown when .open */
  .main-nav ul { flex-direction: column; gap: 0.125rem; display: none; padding-block: 0.75rem 1.25rem; }
  .main-nav ul.open { display: flex; }
  .main-nav a { padding: 0.65rem 1rem; }
  .main-nav a[aria-current="page"]::after { display: none; }
  .site-header .container { flex-wrap: wrap; height: auto; min-height: var(--nav-h); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #05090d 0%, var(--primary) 40%, #087fb3 100%);
  color: #fff;
  padding: 2.5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 60%, rgba(7,147,200,.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(229,198,31,.22) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.03) 0%, transparent 50%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-status-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  background: rgba(229,198,31,.15);
  border: 1px solid rgba(229,198,31,.35);
  border-radius: 999px;
  padding: 0.25rem 0.875rem;
  margin-bottom: 0;
}
.hero-registration-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  background: var(--accent);
  color: #07151d;
  border: 1px solid rgba(255,255,255,.4);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
}
.hero-registration-link:hover {
  background: var(--accent-h);
  color: #07151d;
  text-decoration: none;
}
.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 1.25rem;
  line-height: 1.08;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: #fff;
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 0.45rem;
  font-weight: 800;
  line-height: 1.35;
}
.hero-description {
  font-size: 1rem;
  color: rgba(255,255,255,.78);
  max-width: 620px;
  margin: 0 auto 1.25rem;
  font-weight: 400;
  line-height: 1.55;
}
.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem;
  background: var(--accent);
  color: #07151d;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  font-family: var(--font);
  transition: background .15s, transform .1s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(229,198,31,.35);
}
.btn-hero-primary:hover { background: var(--accent-h); transform: translateY(-1px); text-decoration: none; color: #07151d; }
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: var(--font);
  transition: background .15s, border-color .15s;
  text-decoration: none;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); text-decoration: none; color: #fff; }

/* ============================================================
   HOME GRID CARDS
   ============================================================ */
/* ── Feature cards (home page — TTCAN, Calculator, Players) ── */
.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-block: 1.25rem 0.5rem;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--primary);
  transition: box-shadow .18s, transform .15s;
  border-top: 3px solid var(--primary);
}
.feature-ratings { border-top-color: #0793c8; }
.feature-calc    { border-top-color: #e5c61f; }
.feature-players { border-top-color: #16a34a; }
.feature-guide   { border-top-color: #e5c61f; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.feature-card-icon { font-size: 1.75rem; flex-shrink: 0; line-height: 1; }
.feature-card-body { flex: 1; min-width: 0; }
.feature-card-body h2 {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.2rem;
  letter-spacing: -.01em;
}
.feature-card-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.feature-card-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform .15s, color .15s;
}
.feature-card:hover .feature-card-arrow { transform: translateX(3px); color: var(--primary); }
@media (max-width: 700px) {
  .home-features { grid-template-columns: 1fr; }
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  padding-block: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .18s, border-color .15s;
  text-decoration: none;
  display: block;
  color: var(--text);
  border-top: 4px solid var(--primary);
  border-left: none;
}
.card:nth-child(2) { border-top-color: var(--electric); }
.card:nth-child(3) { border-top-color: var(--green); }
.card:nth-child(4) { border-top-color: var(--gold); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); text-decoration: none; }
.card-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius);
}
.card:nth-child(2) .card-icon { background: #dbeafe; }
.card:nth-child(3) .card-icon { background: #dcfce7; }
.card:nth-child(4) .card-icon { background: #fef3c7; }
.card h2 { font-size: 1.125rem; font-weight: 800; margin-bottom: 0.4rem; color: var(--primary); letter-spacing: -.01em; }
.card h2 a { color: var(--primary); }
.card h2 a:hover { color: var(--primary-h); text-decoration: none; }
.card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ============================================================
   SECTION PAGES
   ============================================================ */
.page-header {
  background: linear-gradient(120deg, #05090d 0%, var(--primary) 55%, #087fb3 100%);
  color: #fff;
  padding: 1.5rem 0 1.75rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 50%, rgba(229,198,31,.18) 0%, transparent 45%);
  pointer-events: none;
}
.page-header .container { position: relative; }
.page-header h1 {
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -.03em;
}
.page-header-encounter {
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.page-header-encounter::before {
  display: none;
}
.page-header-encounter .container {
  display: flex;
  width: min(var(--container), 100%);
}
.page-header-encounter h1 {
  width: 100%;
  text-align: center;
  color: var(--text);
}
.page-content { padding-block: 1.75rem 2rem; }

.coming-soon {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.9375rem;
}
.data-table th,
.data-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 0.35rem;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  text-align: inherit;
  padding: 0;
}
.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: var(--primary);
  outline: none;
}
.table-sort-button span::before {
  content: '↕';
  color: #94a3b8;
  font-size: 0.72rem;
}
.table-sort-button[aria-sort="ascending"] span::before { content: '↑'; color: var(--primary); }
.table-sort-button[aria-sort="descending"] span::before { content: '↓'; color: var(--primary); }
.col-num .table-sort-button {
  margin-left: auto;
  text-align: right;
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page { text-align: center; padding: 6rem 1rem; }
.error-page h1 { font-size: 7rem; font-weight: 900; color: var(--primary); line-height: 1; letter-spacing: -.05em; }
.error-page p { margin: 1rem 0 2rem; color: var(--text-muted); font-size: 1.125rem; }
.error-page a {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background .15s;
}
.error-page a:hover { background: var(--primary-h); text-decoration: none; color: #fff; }

/* ============================================================
   SHARED SECTION ELEMENTS
   ============================================================ */
.section-heading {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  padding: 0 0 0 0.75rem;
  border-left: 3px solid var(--primary);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.no-data {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--primary-h);
  font-weight: 500;
}
.back-link:hover { color: var(--primary); text-decoration: underline; }

.status-badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status-scheduled  { background: #dbeafe; color: #087fb3; border: 1px solid #93c5fd; }
.status-completed  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.status-cancelled  { background: #fde8e8; color: #8b0000; border: 1px solid #f5c2c2; }
.status-postponed  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.status-forfeit    { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.status-active     { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.status-inactive   { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   STANDINGS
   ============================================================ */
.season-label { margin-bottom: 1.25rem; color: var(--text-muted); font-size: 0.9375rem; }

.division-section { margin-bottom: 1.75rem; }
.division-title {
  font-size: 1.1875rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -.01em;
}
.division-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.375rem;
  background: var(--accent);
  border-radius: 3px;
  flex-shrink: 0;
}

.standings-table .col-pos {
  text-align: center;
  white-space: nowrap;
  width: 2rem;
  padding-inline: 0.375rem;
}
.standings-table .col-num {
  text-align: center;
  white-space: nowrap;
  width: 2.5rem;
}
.standings-table .col-team { min-width: 10rem; }
.team-name-link { color: inherit; text-decoration: none; }
.team-name-link:hover strong { color: var(--primary-h); text-decoration: underline; }

/* Team detail summary bar */
.team-summary-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.tsb-season {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .625rem;
  font-weight: 500;
}
.tsb-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.tsb-item { display: flex; flex-direction: column; align-items: center; min-width: 3rem; }
.tsb-val { font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.tsb-label { font-size: .75rem; color: var(--text-muted); margin-top: .1rem; }
.tsb-win  .tsb-val { color: var(--green); }
.tsb-loss .tsb-val { color: var(--danger); }

/* Home/Away tags in encounter table */
.ha-tag {
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: var(--radius);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.ha-home { background: rgba(13,43,78,.08); color: var(--primary-h); }
.ha-away { background: rgba(14,165,233,.1); color: #0369a1; }

/* Score colouring in encounter table */
.enc-score-win  { font-weight: 700; color: var(--green); }
.enc-score-loss { color: var(--text-muted); }
.enc-date-col   { white-space: nowrap; }
.enc-score-col  { white-space: nowrap; }
.enc-forfeit    { font-size: .8125rem; color: var(--text-muted); }
.standings-table .col-pts { background: rgba(13,43,78,.05); font-weight: 700; text-align: center; }
.standings-table .col-diff { text-align: center; }
.diff-pos  { color: var(--green); font-weight: 600; }
.diff-neg  { color: var(--danger); font-weight: 600; }
.diff-zero { color: var(--text-muted); }
.standings-table tbody tr:first-child td { background: #fffbeb; border-bottom: 1px solid #fde68a; }
.standings-table tbody tr:first-child td.col-pts { background: #e5c61f; color: #07151d; font-weight: 900; }
.standings-table tbody tr:nth-child(2) td,
.standings-table tbody tr:nth-child(3) td { background: #f9fafb; }

.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
}
.pos-1 { background: #e5c61f; color: #07151d; border: 1.5px solid #b99f11; }
.pos-2 { background: #f1f5f9; color: #475569; border: 1.5px solid #cbd5e1; }
.pos-3 { background: #fef3c7; color: #78350f; border: 1.5px solid #fde68a; opacity: .8; }
.pos-n { background: transparent; color: var(--text-muted); border: none; font-size: 0.9rem; }

.team-club {
  color: var(--text-muted);
  font-size: 0.82em;
  font-weight: 400;
  margin-left: 0.3rem;
}

/* ============================================================
   SCHEDULE
   ============================================================ */
.schedule-table .col-date    { white-space: nowrap; min-width: 9rem; }
.schedule-table .col-division { white-space: nowrap; color: var(--text-muted); font-size: 0.875rem; }
.schedule-table .col-teams   { min-width: 16rem; }
.schedule-table .col-venue   { color: var(--text-muted); font-size: 0.875rem; }
.schedule-table .col-score   { text-align: center; white-space: nowrap; font-weight: 700; }
.schedule-table .col-detail  { width: 2rem; text-align: center; }

.vs-sep { color: var(--text-muted); margin-inline: 0.4rem; font-size: 0.85em; }
.result-score {
  font-weight: 800;
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: .03em;
}

.schedule-date-group { margin-bottom: 1.25rem; }
.schedule-date-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   SCHEDULE — MATCH CARDS
   ============================================================ */
.match-list { display: flex; flex-direction: column; gap: 0.4rem; }
.mt-section { margin-top: 1.5rem; }

.match-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .18s, transform .15s, border-color .15s;
  border-left: 4px solid var(--border);
}
.match-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; color: var(--text); border-left-color: var(--primary); }
.match-card-upcoming { border-left-color: var(--electric); }
.match-card-result   { border-left-color: var(--primary); }

.match-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.match-division { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.match-round    { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.match-date     { font-size: 0.82rem; color: var(--text-muted); }
.match-venue    { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

.match-card-teams {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
}
.match-team { font-size: 0.9875rem; font-weight: 600; color: var(--primary); flex: 1; min-width: 6rem; }
.match-team-won { font-weight: 800; }
.match-vs { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.match-score-block { flex-shrink: 0; text-align: center; min-width: 4rem; }
.match-score {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .04em;
  display: block;
  text-align: center;
}
.match-score-forfeit {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe;
}
.match-outcome {
  display: inline-block;
  margin-top: 0.375rem;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.outcome-win  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.outcome-draw { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border); }

/* Compact division-first schedule board */
.schedule-topbar-compact {
  align-items: center;
  margin-bottom: 0.85rem;
}
.schedule-season-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.schedule-season-tabs .season-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.45rem 0.65rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--text);
  font-weight: 900;
  text-align: center;
}
.schedule-season-tabs .season-tab:last-child { border-right: 0; }
.schedule-season-tabs .season-tab:hover {
  background: #f8fafc;
  border-bottom-color: #bfdbfe;
  color: var(--primary);
  text-decoration: none;
}
.schedule-season-tabs .season-tab-active {
  background: #f8fafc;
  border-bottom-color: var(--electric);
  color: var(--text);
}
.schedule-season-tabs .season-tab-active:hover {
  color: var(--text);
  border-bottom-color: var(--electric);
}
.schedule-division-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.schedule-division-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border-right: 1px solid var(--border);
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}
.schedule-division-tab:last-child { border-right: 0; }
.schedule-division-tab:hover {
  background: #f8fafc;
  color: var(--primary);
  border-bottom-color: #bfdbfe;
  text-decoration: none;
}
.schedule-division-tab-active {
  background: #f8fafc;
  border-bottom-color: var(--electric);
  color: var(--text);
}
.schedule-division-tab-active:hover { color: var(--text); border-bottom-color: var(--electric); }
.schedule-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.schedule-board-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.8rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.schedule-board-kicker {
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.schedule-board h2 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0;
}
.schedule-round-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.45rem, 1fr);
  gap: 0;
  overflow-x: auto;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  scrollbar-width: thin;
  min-height: 4.55rem;
}
.schedule-round-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 0.12rem;
  border-radius: 0;
  background: #f8fafc;
}
.schedule-round-slot:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.schedule-round-slot:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.schedule-round-slot-played,
.schedule-round-slot-scheduled,
.schedule-round-slot-other { background: #f8fafc; }
.schedule-round-tab {
  display: grid;
  gap: 0.1rem;
  min-width: 4.65rem;
  padding: 0.35rem 0.46rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-decoration: none;
}
.schedule-round-tab:hover {
  border-color: var(--primary-h);
  text-decoration: none;
}
.schedule-round-tab span {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}
.schedule-round-tab strong {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.schedule-match-groups {
  display: grid;
  gap: 0;
}
.schedule-round-group {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.schedule-round-group + .schedule-round-group {
  border-top: 0.8rem solid var(--bg);
}
.schedule-round-group-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.55rem 1rem 0.48rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.schedule-round-group-label strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.schedule-match-list {
  display: grid;
  gap: 0;
}
.schedule-match-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.75fr) minmax(0, 1.25fr) 5.5rem minmax(0, 1.25fr) minmax(5rem, 0.7fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 3.15rem;
  padding: 0.42rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.schedule-match-row:last-child { border-bottom: 0; }
.schedule-match-row:hover {
  background: #f8fafc;
  color: var(--text);
  text-decoration: none;
}
.schedule-match-date,
.schedule-match-venue {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}
.schedule-team {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  font-weight: 800;
}
.schedule-team-home { text-align: right; }
.schedule-team-away { text-align: left; }
.schedule-team-won {
  color: var(--green);
  font-weight: 950;
}
.schedule-match-center {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.schedule-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  width: 5.1rem;
  min-height: 1.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.schedule-score-num { color: var(--text); }
.schedule-score-won { color: var(--green); }
.schedule-score-lost { color: var(--text); }
.schedule-score-sep {
  color: var(--text-muted);
  font-size: 0.92em;
}
.schedule-score-forfeit {
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.schedule-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.7rem;
  min-height: 1.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #f8fafc;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.schedule-status-scheduled {
  color: var(--electric);
  border-color: #bfdbfe;
  background: #eff6ff;
}
.schedule-status-postponed {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}
.schedule-status-cancelled {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}
@media (max-width: 760px) {
  .schedule-division-tabs { flex-wrap: wrap; }
  .schedule-division-tab {
    flex-basis: 50%;
    border-top: 1px solid var(--border);
  }
  .schedule-division-tab:nth-child(odd):last-child {
    flex-basis: 100%;
    border-right: 0;
  }
  .schedule-division-tab:nth-child(-n+2) { border-top: 0; }
  .schedule-division-tab:nth-child(2n) { border-right: 0; }
  .schedule-match-row {
    grid-template-columns: minmax(0, 1fr) 4.8rem minmax(0, 1fr);
    gap: 0.45rem 0.6rem;
    padding: 0.75rem;
  }
  .schedule-match-date {
    grid-column: 1 / -1;
    text-align: center;
  }
  .schedule-match-venue {
    grid-column: 1 / -1;
    text-align: center;
  }
  .schedule-score,
  .schedule-status-pill {
    width: 4.85rem;
  }
}
@media (max-width: 440px) {
  .schedule-division-tab {
    flex-basis: 100%;
    border-right: 0;
  }
  .schedule-division-tab:nth-child(n) { border-top: 1px solid var(--border); }
  .schedule-division-tab:first-child { border-top: 0; }
  .schedule-team { font-size: 0.86rem; }
}

/* ============================================================
   PLAYERS
   ============================================================ */
.player-search-wrap { margin-bottom: 1rem; }
.player-table-controls {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.player-search-input {
  width: 100%;
  flex: 1 1 260px;
  max-width: 22rem;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9375rem;
  background: var(--surface);
  color: var(--text);
}
.player-search-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.player-division-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 0 1 220px;
}
.player-division-filter span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.player-division-filter select {
  min-height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
}
.player-division-filter select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.players-table .col-rank { width: 3rem; text-align: center; }
.players-table td:nth-child(2) a { color: var(--primary-h); font-weight: 500; }
.stats-best {
  margin-bottom: 1.25rem;
}
.stats-best-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.section-kicker {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.stats-best-head h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}
.stats-best-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}
.stats-best-card {
  --best-accent: var(--primary);
  --best-soft: var(--primary-light);
  background: linear-gradient(180deg, var(--surface) 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-top: 4px solid var(--best-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stats-best-card-singles-won,
.stats-best-card-singles-pct { --best-accent: var(--green); --best-soft: var(--green-bg); }
.stats-best-card-doubles-played,
.stats-best-card-doubles-pct { --best-accent: var(--electric); --best-soft: #dbeafe; }
.stats-best-card-sets-won,
.stats-best-card-sets-diff { --best-accent: var(--accent); --best-soft: #fee2e2; }
.stats-best-card-rating { --best-accent: var(--gold); --best-soft: #fef3c7; }
.stats-best-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem 0.35rem;
}
.stats-best-card-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.25;
}
.stats-best-card-head span {
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--best-soft);
  color: var(--best-accent);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.28rem 0.45rem;
}
.stats-best-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0.6rem 0.55rem;
  padding: 0.7rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--best-accent) 28%, var(--border));
  border-radius: var(--radius);
  background: var(--best-soft);
  color: var(--text);
  text-decoration: none;
}
.stats-best-feature:hover {
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--best-accent) 45%, transparent);
}
.stats-best-feature-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}
.stats-best-feature strong {
  color: var(--best-accent);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.stats-best-list {
  list-style: none;
  display: grid;
  padding: 0 0.6rem 0.55rem;
  gap: 0.35rem;
}
.stats-best-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.stats-best-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--best-soft);
  color: var(--best-accent);
  font-size: 0.72rem;
  font-weight: 900;
}
.stats-best-rank-first {
  width: 1.7rem;
  height: 1.7rem;
  background: var(--best-accent);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--best-accent) 28%, transparent);
}
.stats-best-list a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}
.stats-best-list a:hover { color: var(--primary-h); }
.stats-best-list strong {
  color: var(--best-accent);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

/* Player aggregate stats bar */
.player-stats-summary {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  text-align: center;
}
.pss-item {
  flex: 1;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pss-item:last-child { border-right: none; }
.pss-val  { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.pss-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.pss-win  .pss-val { color: var(--green); }
.pss-loss .pss-val { color: var(--danger); }
.pss-pct  .pss-val { color: var(--primary-h); }

.player-profile { max-width: 860px; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  letter-spacing: -.025em;
}
.profile-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.125rem;
  box-shadow: var(--shadow-sm);
}
.profile-details dt { color: var(--text-muted); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .05em; }
.profile-details dd { color: var(--text); }

.profile-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.seasons-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0; }
.seasons-list li a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-h);
  transition: background .15s, border-color .15s;
}
.seasons-list li a:hover { background: var(--primary-light); border-color: var(--primary-h); text-decoration: none; }
.no-data-inline { color: var(--text-muted); font-size: 0.9375rem; }

/* ============================================================
   NEWS
   ============================================================ */
.article-list { display: flex; flex-direction: column; gap: 1.25rem; max-width: 800px; }
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .15s, border-left-color .15s;
}
.article-card:nth-child(2) { border-left-color: var(--electric); }
.article-card:nth-child(3) { border-left-color: var(--green); }
.article-card:nth-child(4) { border-left-color: var(--gold); }
.article-card:nth-child(5) { border-left-color: #7c3aed; }
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.article-card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.3rem; }
.article-card-title a { color: var(--primary); }
.article-card-title a:hover { color: var(--primary-h); text-decoration: none; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.625rem; }
.read-more-link { font-size: 0.875rem; color: var(--primary-h); font-weight: 600; }
.read-more-link:hover { color: var(--primary); }

.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 1.75rem; }
.article-full-header { margin-bottom: 1.75rem; }
.article-full-title { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; letter-spacing: -.025em; }
.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 720px;
}
.article-body h2 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin: 2rem 0 0.75rem; }
.article-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 1.5rem 0 0.5rem; }
.article-body h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.375rem; }
.article-body p  { margin-bottom: 1.125rem; }
.article-body ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.375rem; }
.article-body strong { font-weight: 700; }
.article-body em     { font-style: italic; }
.article-body a { color: var(--primary-h); text-decoration: underline; }

/* ============================================================
   EVENTS
   ============================================================ */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 0.5rem; }
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .15s;
}
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.event-card-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.event-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 0; }
.event-when { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.event-where { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.event-label { font-weight: 600; }
.event-desc { font-size: 0.875rem; color: var(--text); margin-top: 0.5rem; line-height: 1.5; }
.event-end { opacity: .8; }

.event-type-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.event-match      { background: #dbeafe; color: #087fb3; border: 1px solid #93c5fd; }
.event-tournament { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.event-training   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.event-meeting    { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.event-general    { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   HOME — STANDINGS TEASER
   ============================================================ */
.home-standings-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.home-standings-header h2 {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--primary);
  margin: 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}
.home-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.625rem;
}
.home-standings-div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.home-standings-divname {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  padding: 0.28rem 0.55rem;
  background: var(--primary);
  border-bottom: none;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-standings-list {
  list-style: none;
  padding: 0.15rem 0;
  margin: 0;
}
.mini-standing-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-bottom: 1px solid var(--border);
}
.mini-standing-row:last-child { border-bottom: none; }
.home-standings-div .pos-badge {
  width: 1.4rem;
  height: 1.4rem;
  font-size: 0.675rem;
  flex-shrink: 0;
}
.mini-team-name {
  flex: 1;
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  min-width: 0;
}
a.mini-team-name:hover { color: var(--primary); text-decoration: underline; }
.mini-pts {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   HOME — STATS BAR
   ============================================================ */
.home-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--primary);
  border: none;
  border-top: 3px solid var(--accent);
  border-radius: 0;
  margin-block: 1rem 0;
  overflow: hidden;
}
.home-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 0.75rem;
  gap: 0.2rem;
}
.home-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.home-stat-label {
  font-size: 0.675rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.home-stat-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ============================================================
   HOME — BODY GRID (standings + match feed)
   ============================================================ */
.home-body { padding-block: 1.25rem 0; }
.home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 56%) 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 768px) {
  .home-main-grid { grid-template-columns: 1fr; }
}
.home-matches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: start;
}
@media (max-width: 640px) {
  .home-matches-grid { grid-template-columns: 1fr; }
}
.home-matches-footer {
  text-align: right;
  padding-top: 0.5rem;
}
.home-col-footer {
  text-align: right;
  padding-top: 0.4rem;
}
.home-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0.625rem;
  background: var(--primary);
  border-left: 3px solid var(--accent);
  margin-bottom: 0.625rem;
  font-size: 0.675rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
}
.home-col-header a {
  color: rgba(255,255,255,0.7);
  font-size: 0.675rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.home-col-header a:hover { color: #fff; text-decoration: underline; }
.home-feed-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.home-feed-section { padding: 0; }
.home-feed-upcoming { border-top: none; }
.home-feed-label {
  display: block;
  font-size: 0.635rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  background: #1e3a5f;
  padding: 0.28rem 0.75rem;
}
.home-feed-panel .live-row { padding-inline: 0.75rem; }
.home-feed-panel .live-row-link { margin-inline: 0; padding: 0.45rem 0.75rem; }
.home-feed-panel .no-data-sm { padding: 0.6rem 0.75rem; }
.home-feed-footer {
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--table-head-bg);
  text-align: right;
}
.home-players-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.home-players-col .home-feed-label {
  padding: 0.28rem 0.75rem;
  background: #1e3a5f;
  border-bottom: none;
  color: rgba(255,255,255,0.85);
}
.home-players-strip-vert {
  display: flex;
  flex-direction: column;
  padding: 0.2rem 0.375rem;
  gap: 0.15rem;
}
.home-players-strip-vert .home-player-mini {
  border-radius: 0;
  padding: 0.3rem 0.4rem;
  border-left: 2px solid transparent;
  transition: border-color .12s, background .12s;
}
.home-players-strip-vert .home-player-mini:hover {
  border-left-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.home-players-col .home-feed-footer { text-align: right; }

/* ============================================================
   HOME — PLAYERS SPOTLIGHT
   ============================================================ */
.home-spotlight { padding-block: 0 0; margin-top: 1.25rem; }
.home-players-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.625rem;
}
.home-player-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.home-player-mini:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary); text-decoration: none; }
.hpm-name { font-size: 0.875rem; font-weight: 700; color: var(--primary); }
.hpm-stats { font-size: 0.75rem; color: var(--text-muted); }

.home-registration-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-block: 1.5rem 2rem;
  padding-block: 1.1rem;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
}
.home-registration-cta span {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.home-registration-cta h2 {
  color: var(--primary);
  font-size: 1.1rem;
  line-height: 1.2;
  margin: 0 0 0.2rem;
}
.home-registration-cta p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.home-registration-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #07151d;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(229,198,31,.28);
}
.home-registration-button:hover {
  background: var(--accent-h);
  color: #07151d;
  text-decoration: none;
}
@media (max-width: 640px) {
  .home-registration-cta {
    display: block;
    text-align: left;
  }
  .home-registration-button {
    width: 100%;
    margin-top: 0.85rem;
  }
}

/* ============================================================
   HOME — LIVE SECTIONS
   ============================================================ */
.home-live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-block: 1.25rem 1.25rem;
}
.home-standings { padding-block: 0 1.5rem; }
.home-news-teaser { padding-block: 0 1.25rem; }
.home-news-row { align-items: center; gap: 1rem; }
.home-news-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seasons-inline { line-height: 1.7; }
@media (max-width: 640px) { .home-live { grid-template-columns: 1fr; } }

.live-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.live-col-header {
  padding: 0.625rem 1.125rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.live-col-header h2 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0;
}
.live-col-body { padding: 0 1.125rem; }

.live-row {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--text);
  transition: background .1s;
}
.live-row:last-of-type { border-bottom: none; }
.live-row-link { margin: 0 -1.125rem; padding: 0.75rem 1.125rem; }
.live-row-link:hover { background: var(--primary-light); text-decoration: none; color: var(--text); }

.live-teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.9375rem;
}
.live-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.15rem; }
.no-data-sm {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1.25rem 0;
  font-style: italic;
}
.live-col-footer {
  padding: 0.75rem 1.125rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.see-all-link { font-size: 0.875rem; color: var(--primary-h); font-weight: 600; display: block; }
.see-all-link:hover { color: var(--primary); text-decoration: underline; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-block;
  padding: .4rem .9rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary-h);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.page-btn:hover { background: var(--primary); color: #fff; }
.page-btn-disabled {
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}
.page-info { font-size: .875rem; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.6);
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 0 1rem;
}
.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-brand .footer-logo::before { content: '🏓'; }
.footer-brand p { font-size: 0.875rem; max-width: 280px; }
.footer-nav { display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-nav a { color: rgba(255,255,255,.65); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
.privacy-updated { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-nav { justify-content: flex-start; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, var(--primary) 0%, #1a3a6e 100%); }
.login-main { width: 100%; padding: 1rem; }
.login-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem 2rem; max-width: 380px; margin-inline: auto; }
.login-card h1 { font-size: 1.375rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--primary); text-align: center; letter-spacing: -.02em; }
.login-card label { display: block; font-weight: 600; font-size: 0.8125rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 0.375rem; }
.login-card input[type="password"] { width: 100%; padding: 0.625rem 0.875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; font-family: var(--font); margin-bottom: 1.25rem; transition: border-color .15s, box-shadow .15s; }
.login-card input[type="password"]:focus { outline: none; border-color: var(--primary-h); box-shadow: 0 0 0 3px rgba(26,74,130,.12); }
.login-card button[type="submit"] { width: 100%; padding: 0.625rem; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 700; font-family: var(--font); cursor: pointer; transition: background .15s; }
.login-card button[type="submit"]:hover { background: var(--primary-h); }

/* ============================================================
   SEASON TABS
   ============================================================ */
.season-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1.25rem; }
.season-tab {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: border-color .15s, color .15s, background .15s;
  text-decoration: none;
}
.season-tab:hover { border-color: var(--primary-h); color: var(--primary-h); text-decoration: none; }
.season-tab-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.season-tab-active:hover { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.division-tabs { margin-top: -.5rem; margin-bottom: 1rem; }
.division-tabs .season-tab { font-size: 0.75rem; padding: 0.175rem 0.6rem; }

/* ============================================================
   ENCOUNTER DETAIL
   ============================================================ */
.encounter-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.encounter-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.meta-sep { color: var(--border); margin-inline: 0.25rem; }
.encounter-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}
.enc-team {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
}
.enc-team a { color: inherit; }
.enc-team a:hover { color: var(--primary-h); text-decoration: underline; }
.enc-team-home { text-align: right; }
.enc-team-away { text-align: left; }
.enc-team-won,
.enc-team-won a {
  color: var(--green);
  font-weight: 900;
}
.enc-team-lost,
.enc-team-lost a {
  color: var(--text);
}
.enc-score-center { text-align: center; flex-shrink: 0; }
.encounter-score {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: .04em;
  line-height: 1;
}
.enc-score-num {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.enc-score-won { color: var(--green); }
.enc-score-lost { color: var(--text); }
.enc-score-sep {
  color: var(--text-muted);
  margin-inline: 0.2rem;
}
.encounter-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.encounter-matches-table .col-player a { color: var(--text); }
.encounter-matches-table .col-player a:hover { color: var(--primary-h); text-decoration: underline; }
.match-winner { color: var(--green); font-weight: 800; }
.match-winner a { color: var(--green) !important; }
.encounter-lineups {
  margin-bottom: 1.25rem;
}
.enc-lineup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.enc-lineup-team {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.enc-lineup-team h4 {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 900;
}
.enc-lineup-list { display: grid; }
.enc-lineup-player {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.enc-lineup-player:last-child { border-bottom: 0; }
.enc-lineup-player span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}
.enc-lineup-player a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.lineup-empty { color: var(--text-muted); }
.type-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.type-singles  { background: var(--primary-light); color: var(--primary); }
.type-doubles  { background: #fef3c7; color: #92400e; }
.result-win   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.result-loss  { background: #fde8e8; color: #8b0000; border: 1px solid #f5c2c2; }
.result-win-away  { background: var(--green-bg); color: var(--green); }
.result-loss-away { background: #fde8e8; color: #8b0000; }
.detail-link { color: var(--text-muted); font-weight: 500; }
.detail-link:hover { color: var(--primary-h); text-decoration: none; }
.encounter-link { color: inherit; text-decoration: none; }
tr.tr-link { cursor: pointer; }
tr.tr-link:hover td { background: #f8fafc; }
.encounter-link:hover { text-decoration: underline; color: var(--primary-h); }
.live-row-link { color: inherit; text-decoration: none; }
.enc-score { color: var(--text-muted); margin-left: 0.25rem; }
.history-own-team { font-weight: 600; color: var(--primary); }
.history-vs { color: var(--text-muted); font-size: .8rem; margin: 0 .2rem; }
.history-opp-team { color: var(--text); }
.team-won { font-weight: 700; color: var(--primary); }
.forfeit-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(217,119,6,0.1);
  color: #b45309;
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: 3px;
  padding: 0.05em 0.4em;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.match-sets {
  display: inline-block;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.1em 0.45em;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* Win indicator (schedule results) */
.win-indicator {
  display: inline-block;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.wi-home, .wi-away { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.wi-draw { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border); }

.encounter-notes {
  margin-top: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.125rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.encounter-notes strong { color: var(--text); }

@media (max-width: 600px) {
  .encounter-nav-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
  .encounter-context-links {
    justify-content: flex-start;
  }
  .encounter-scoreboard {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.75rem;
  }
  .enc-team { font-size: 1rem; min-width: 0; }
  .encounter-score { font-size: 2rem; }
  .enc-lineup-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PARTICIPANTS — tab layout + teams grid
   ============================================================ */
.participants-tabs { margin-bottom: 1.25rem; }

.participants-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.participants-div-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.participants-div-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--table-head-bg);
  padding: 0.5rem 0.75rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.participants-div-block .table-wrap { margin: 0; }
.participants-div-block .data-table { border-radius: 0; border: none; }
.participants-div-block .data-table thead { display: none; }
.participants-div-block .data-table td { padding: 0.45rem 0.75rem; }
.participants-div-block .data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   CLUBS
   ============================================================ */
.clubs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.club-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .15s, border-color .15s;
  display: block;
  color: var(--text);
  text-decoration: none;
}
.club-card:nth-child(4n+1) { border-left-color: var(--primary); }
.club-card:nth-child(4n+2) { border-left-color: var(--electric); }
.club-card:nth-child(4n+3) { border-left-color: var(--green); }
.club-card:nth-child(4n+4) { border-left-color: #b99f11; }
.club-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.club-card-name { font-size: 1.0625rem; font-weight: 700; color: var(--primary); margin-bottom: 0.375rem; }
.club-card-stats { font-size: 0.875rem; color: var(--text-muted); }

/* ============================================================
   PLAYER HISTORY
   ============================================================ */
.col-opponent { min-width: 10rem; }
.history-partner { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.history-with { font-style: italic; }
.history-opponents { font-size: 0.875rem; }

/* ============================================================
   MISC
   ============================================================ */
.error-msg { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-left: 4px solid var(--danger); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; }

/* ============================================================
   RATING CALCULATOR
   ============================================================ */
.calc-subtitle {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 1.75rem;
}
.calc-app { max-width: 680px; }

/* Step badges */
.calc-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.calc-step-heading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

/* Setup card */
.calc-setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.calc-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* My rating row: name search + rating input side by side */
.calc-my-rating-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Name search in setup — same visual style as the rating input */
.calc-my-name {
  flex: 1;
  min-width: 0;
  padding: 0.625rem 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 600;
  height: 3.25rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
.calc-my-name:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(13,43,78,.12); }

/* Star buttons */
.stars-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.star-btn {
  padding: 0.625rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.1em;
  min-width: 3.25rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.star-btn:hover { border-color: #b99f11; color: #92400e; background: #fef3c7; }
.star-btn.active { background: #b99f11; border-color: #b99f11; color: #fff; box-shadow: 0 2px 8px rgba(217,119,6,.35); }

/* My rating input */
.calc-rating-input {
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.375rem;
  font-weight: 700;
  width: 7.5rem;
  flex-shrink: 0;
  height: 3.25rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.calc-rating-input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(13,43,78,.12); }
.calc-rating-input::-webkit-outer-spin-button,
.calc-rating-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Match list */
.calc-matches-section { margin-bottom: 1.5rem; }
.calc-matches-list { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.75rem; }

/* Individual match row */
.calc-match-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s;
  overflow: visible;
}
.calc-match-row:focus-within { border-color: var(--primary); }

.calc-match-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.125rem;
  text-align: center;
  flex-shrink: 0;
}

/* Opponent name search field */
.calc-opp-name {
  flex: 1;
  min-width: 0;
  padding: 0.375rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  height: 2.5rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
.calc-opp-name:focus { outline: none; border-color: var(--primary); background: #fff; }

/* Opponent rating input */
.calc-opp-rating {
  flex-shrink: 0;
  width: 5rem;
  padding: 0.375rem 0.375rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  height: 2.5rem;
  text-align: center;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.calc-opp-rating:focus { outline: none; border-color: var(--primary); background: #fff; }
.calc-opp-rating::-webkit-outer-spin-button,
.calc-opp-rating::-webkit-inner-spin-button { -webkit-appearance: none; }

/* W / L buttons */
.calc-wl-btns { display: flex; gap: 0.25rem; flex-shrink: 0; }
.calc-wl-btn {
  min-width: 2.75rem;
  height: 2.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-win-btn:hover  { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.calc-win-btn.active { border-color: var(--green); background: var(--green-bg); color: var(--green); box-shadow: 0 2px 8px rgba(21,128,61,.2); }
.calc-lose-btn:hover  { border-color: #ef4444; background: #fef2f2; color: #dc2626; }
.calc-lose-btn.active { border-color: #ef4444; background: #fef2f2; color: #dc2626; box-shadow: 0 2px 8px rgba(220,38,38,.2); }

/* Per-match delta */
.calc-match-delta {
  font-size: 1rem;
  font-weight: 800;
  min-width: 3rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Remove button */
.calc-remove-btn {
  border: none;
  background: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.calc-remove-btn:hover { color: var(--danger); background: #fef2f2; }

/* Add match button */
.calc-add-btn {
  padding: 0.875rem 1.25rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all .15s;
  text-align: center;
}
.calc-add-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Results section */
.calc-results-section { margin-bottom: 1.5rem; }
.calc-no-matches {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.calc-result-panel {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
}
.calc-result-grid {
  display: flex;
  justify-content: center;
  align-items: center;
}
.calc-result-divider {
  width: 1px;
  height: 4rem;
  background: var(--border);
  margin: 0 2.5rem;
  flex-shrink: 0;
}
.calc-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
  flex: 1;
}
.calc-result-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.calc-result-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calc-delta-pos     { color: var(--green); }
.calc-delta-neg     { color: var(--danger); }
.calc-delta-neutral { color: var(--text-muted); }

.calc-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* Remove button always hidden on touch screens — blank rows simply don't count */
@media (max-width: 600px) {
  .calc-remove-btn { display: none; }
}

@media (max-width: 480px) {
  /* Tighter page chrome */
  .calc-subtitle { font-size: 0.9rem; margin-bottom: 1.25rem; }
  .calc-app { margin-inline: -0.5rem; }

  /* Setup card */
  .calc-setup-card {
    padding: 0.875rem 0.875rem;
    gap: 1rem;
    border-radius: var(--radius);
  }
  .star-btn {
    padding: 0.4rem 0.5rem;
    min-width: 2rem;
    min-height: 2.25rem;
    font-size: 0.875rem;
  }
  /* My rating wrap: stack vertically on mobile */
  .calc-my-rating-wrap { flex-direction: column; align-items: stretch; gap: 0.375rem; }
  .calc-my-name { height: 2.75rem; font-size: 0.9375rem; }
  .calc-rating-input { width: 100%; height: 2.75rem; font-size: 1.125rem; }

  /* Match rows */
  .calc-matches-list { gap: 0.25rem; }
  .calc-match-row {
    padding: 0.3rem 0.375rem;
    gap: 0.2rem;
    border-radius: var(--radius);
    overflow: visible;
  }
  .calc-match-num { display: none; }

  /* Wrap: don't flex-grow — let the name width drive it */
  .calc-opp-wrap { flex: 0 0 auto; overflow: visible; }

  /* Name: small by default, expands to show autocomplete results when focused */
  .calc-opp-name {
    flex: none;
    width: 4rem;
    font-size: 0.8125rem;
    height: 2.25rem;
    padding: 0.25rem 0.3rem;
    transition: width 0.2s ease, border-color .15s;
  }
  .calc-opp-name:focus { width: 10rem; }

  /* Rating: takes all remaining space */
  .calc-opp-rating {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 2.25rem;
    font-size: 0.9375rem;
  }
  .calc-wl-btns { gap: 0.15rem; }
  .calc-wl-btn {
    min-width: 1.75rem;
    height: 2.25rem;
    font-size: 0.8125rem;
    border-width: 1.5px;
    padding: 0;
  }
  .calc-match-delta { font-size: 0.875rem; min-width: 2rem; }

  /* Results */
  .calc-result-panel { padding: 1.25rem 1rem; }
  .calc-result-value { font-size: 2.25rem; }
  .calc-result-divider { margin: 0 1.5rem; }
}

/* ════════════════════════════════════════════════════════════════
   TTCAN Ratings page
   ════════════════════════════════════════════════════════════════ */


.ratings-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}
.ratings-search-wrap { flex: 1; position: relative; min-width: 0; }
.ratings-search-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9375rem;
  padding: 0.5rem 0.875rem 0.5rem 2.375rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.625rem center;
}
.ratings-search-input:focus { border-color: var(--primary); }
.ratings-search-input::placeholder { color: var(--text-muted); }

/* Province dropdown */
.prov-select {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.prov-select:focus { border-color: var(--primary); }

/* Meta bar */
.ratings-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ratings-sync-label strong { color: var(--text); font-weight: 600; }

/* Ratings update banner */
.ratings-update-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 6px;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  color: #fb923c;
  margin-bottom: 0.75rem;
}
.ratings-update-icon {
  font-size: 1rem;
  animation: spin 1.5s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ratings-update-step { font-style: italic; opacity: 0.85; }

/* Ratings table — tighter rows */
.ratings-table td,
.ratings-table th { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
.ratings-table th { font-size: 0.6875rem; }

/* Table columns */
.col-rank-ttcan  { width: 2.5rem; text-align: right; color: var(--text-muted); }
.col-name-ttcan  { min-width: 10rem; }
.col-prov        { width: 3.5rem; text-align: center; color: var(--text-muted); }
.col-gender      { width: 2.5rem; text-align: center; color: var(--text-muted); }
.col-rating-ttcan { width: 6rem; text-align: right; }

/* Rating tier badges */
.rating-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm, 4px);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.tier-5 { background: #e5c61f; color: #07151d; border-color: #b99f11; }   /* Elite    ≥2400 gold   */
.tier-4 { background: #0793c8; color: #fff; border-color: #087fb3; }   /* Advanced ≥1800 blue   */
.tier-3 { background: #0891b2; color: #fff; border-color: #0e7490; }   /* Inter    ≥1200 cyan   */
.tier-2 { background: #16a34a; color: #fff; border-color: #15803d; }   /* Recr     ≥700  green  */
.tier-1 { background: #64748b; color: #fff; border-color: #475569; }   /* Beginner <700  slate  */
.tier-unrated { background: #e2e8f0; border-color: #cbd5e1; color: #64748b; font-weight: 500; }

/* ── Calculator promo banner (top of TTCAN page) ── */
.calc-promo-banner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(120deg, #071923 0%, #087fb3 100%);
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  margin-bottom: 1.25rem;
  transition: opacity .15s, transform .15s;
  box-shadow: var(--shadow);
}
.calc-promo-banner:hover { opacity: .93; transform: translateY(-1px); text-decoration: none; color: #fff; }
.calc-promo-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.calc-promo-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.calc-promo-text strong { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.calc-promo-text span   { font-size: 0.85rem; color: rgba(255,255,255,.75); }
.calc-promo-cta {
  flex-shrink: 0;
  background: var(--accent);
  color: #07151d;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .calc-promo-cta { display: none; }
}

.ratings-note {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Player detail page ── */
.player-detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 2rem;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.player-rating-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.player-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.player-detail-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.prov-chip, .gender-chip {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  letter-spacing: 0.02em;
}
.gender-chip { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.age-chip { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); display: inline-block; padding: 0.2rem 0.65rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.player-period-label { font-size: 0.8125rem; color: var(--text-muted); }
.player-rating-hero { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rating-badge-lg { font-size: 2.75rem; padding: 0.4rem 1.1rem; line-height: 1.1; }
.rating-delta { font-size: 0.9375rem; font-weight: 600; }

/* Career stats bar */
.player-career-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8375rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.player-career-stats strong { color: var(--text); font-weight: 700; }
.cs-sep { color: var(--border); }
.cs-wins { font-weight: 700; color: var(--text); }
.cs-pct {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
}

@media (max-width: 560px) {
  .player-detail-header {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 1rem;
    padding: 1.25rem;
  }
  .player-rating-col { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .rating-badge-lg { font-size: 2rem; }
}

/* Chart card */
.rating-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 0.5rem 0.625rem;
  margin-bottom: 1.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.rating-chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-dot { cursor: crosshair; }

/* Chart hover tooltip */
.chart-tip {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  background: var(--text, #111827);
  color: #fff;
  border-radius: 0.375rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.chart-tip strong { font-size: 1rem; font-weight: 800; }
.chart-tip span { opacity: 0.75; font-size: 0.75rem; }

/* Section headings */
.rating-history-wrap { margin-bottom: 1.5rem; }
.section-subtitle {
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--primary);
  padding: 0.3rem 0 0.3rem 0.75rem;
  border-left: 3px solid var(--accent);
  border-bottom: none;
}

@media (max-width: 640px) {
  .rating-badge-lg { font-size: 2rem; }
}

@media (max-width: 640px) {
  .ratings-toolbar { flex-wrap: wrap; }
  .prov-select { width: 100%; }
  .col-gender { display: none; }
}

/* ── Highlight panels ── */
.hl-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}
.hl-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.6rem 0.75rem 0.5rem;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
/* Best wins = green, gap wins = electric blue, gap losses = red */
.hl-panel:nth-child(1) { border-left-color: #16a34a; }
.hl-panel:nth-child(2) { border-left-color: var(--electric); }
.hl-panel:nth-child(3) { border-left-color: #dc2626; }

/* Streak row spans full width, contains two streak panels side by side */
.hl-streaks-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}
.hl-panel-streak {
  padding: 0.875rem 1.25rem;
}
.hl-panel-streak.hl-panel { border-left-color: var(--text-muted); }
.hl-streak-body {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.375rem;
}
.hl-streak-num {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hl-streak-win  { color: #16a34a; }
.hl-streak-loss { color: #dc2626; }
.hl-streak-unit {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hl-streak-range {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}
.hl-streak-breaker {
  width: 100%;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}
.hl-panel-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.hl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hl-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.hl-item:last-child { border-bottom: none; }
.hl-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
}
.hl-item-name { font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-item-name a { color: var(--text); text-decoration: none; }
.hl-item-name a:hover { color: var(--primary); text-decoration: underline; }
.hl-item-sub { display: flex; align-items: center; gap: 0.3rem; overflow: hidden; }
.hl-item-date { font-size: 0.68rem; font-weight: 600; color: var(--electric, #0793c8); white-space: nowrap; flex-shrink: 0; }
.hl-item-event { font-size: 0.68rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-item-key { flex-shrink: 0; }
.hl-rtng-sm { font-size: 0.7rem !important; padding: 0.08rem 0.3rem !important; }
.hl-item-pts { flex-shrink: 0; font-size: 0.8rem; font-weight: 700; min-width: 2.5rem; text-align: right; }
.hl-pts-big { font-size: 0.9rem; font-weight: 800; }
/* Gap badge — shown in the pts column for gap-win / gap-loss panels */
.gap-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
/* Opp-rating badge — used in "best wins" pts column */
.hl-gap-opp {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
}

/* Matchup rating display inside player highlight panels */
.hl-matchup {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.hl-you-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.06rem 0.28rem;
  line-height: 1.3;
}
.hl-vs-sep {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Recent Highlights section (ratings list page) ── */
.rhl-section { margin-bottom: 1.25rem; }
.rhl-single-panel { margin-top: 0.75rem; }
.rhl-panel-wide { width: 100%; }
.rhl-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}
.rhl-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 0.5rem;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.rhl-panel-title {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}
.rhl-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.rhl-list-wide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.5rem;
}
.rhl-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  row-gap: 0.1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.rhl-item:last-child { border-bottom: none; }
.rhl-winner {
  font-size: 0.8125rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  grid-column: 1;
  grid-row: 1;
}
.rhl-winner a { color: var(--text); text-decoration: none; }
.rhl-winner a:hover { color: var(--primary); text-decoration: underline; }
.rhl-arrow { display: none; }
.rhl-loser {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  grid-column: 1;
  grid-row: 2;
}
.rhl-loser a { color: var(--text-muted); text-decoration: none; }
.rhl-loser a:hover { color: var(--primary); text-decoration: underline; }
.rhl-ratings {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  grid-column: 2;
  grid-row: 1;
}
.rhl-you-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.05rem 0.3rem;
  line-height: 1.3;
  white-space: nowrap;
}
.rhl-vs-sep {
  font-size: 0.6rem;
  color: var(--text-muted);
}
.rhl-pts {
  grid-column: 3;
  grid-row: 1;
  font-size: 0.8rem;
  font-weight: 700;
}
.rhl-event {
  grid-column: 2 / -1;
  grid-row: 2;
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .rhl-panels { grid-template-columns: 1fr; }
  .rhl-list-wide { grid-template-columns: 1fr; }
}

/* ── Match result badges ── */
.match-result-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.match-result-w { background: #dcfce7; color: #15803d; }
.match-result-l { background: #fee2e2; color: #b91c1c; }

.match-pts-pos { color: #15803d; font-weight: 700; }
.match-pts-neg { color: #b91c1c; font-weight: 700; }
.match-stars { color: #e5c61f; font-size: 0.65rem; letter-spacing: -0.05em; margin-right: 0.2rem; }

/* ── Match table (grouped by period) ── */
.match-history-table td, .match-history-table th {
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
}
.match-period-header td {
  background: var(--primary-light, #eff6ff);
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}
.match-period-name { font-weight: 700; color: var(--primary); margin-right: 0.75rem; letter-spacing: 0.01em; }
.match-period-record { font-size: 0.72rem; }
.col-match-result { width: 2.25rem; text-align: center; padding-right: 0.25rem; }
.col-match-opp { }
.col-match-opp a { font-weight: 600; text-decoration: none; color: var(--text); }
.col-match-opp a:hover { color: var(--primary); text-decoration: underline; }
.match-row-event {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28ch;
}
.col-match-opprtng { text-align: right; width: 3.5rem; color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.col-match-pts { text-align: right; width: 3.25rem; white-space: nowrap; }

@media (max-width: 900px) {
  .hl-panels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hl-panels { grid-template-columns: 1fr; }
  .hl-streaks-row { grid-template-columns: 1fr; }
  .col-match-opprtng { display: none; }
}
@media (max-width: 480px) {
  .match-row-event { display: none; }
  .hl-item-event { display: none; }
  .hl-item-date  { font-size: 0.65rem; }
}

/* Autocomplete */
.calc-opp-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.calc-opp-wrap .calc-opp-rating { width: 100%; box-sizing: border-box; }
.calc-ac-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  min-width: 16rem;
  width: max-content;
  max-width: min(22rem, 90vw);
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  background: var(--card-bg);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-height: 240px;
  overflow-y: auto;
}
.calc-ac-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.1s;
}
.calc-ac-list li:hover,
.calc-ac-list li.ac-active { background: rgba(59,130,246,.1); }
.ac-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .calc-setup-card { flex-direction: column; gap: 1.5rem; padding: 1.25rem; }
  .calc-rating-input { width: 100%; font-size: 1.75rem; height: 3.75rem; }
  .stars-selector { gap: 0.5rem; }
  .star-btn { flex: 1; min-width: 0; font-size: 1.125rem; }

  .calc-match-row { padding: 0.5rem 0.625rem; gap: 0.375rem; }
  .calc-opp-rating { max-width: none; font-size: 1.0625rem; padding: 0.375rem 0.5rem; }
  .calc-wl-btns { gap: 0.25rem; }
  .calc-wl-btn { min-width: 2.375rem; height: 2.5rem; font-size: 0.875rem; }
  .calc-match-delta { min-width: 2.5rem; font-size: 0.9375rem; }
  .calc-remove-btn { width: 2rem; height: 2rem; font-size: 1rem; }

  /* Sticky results bar at bottom of screen */
  .calc-results-section {
    position: sticky;
    bottom: 0;
    z-index: 40;
    background: var(--bg);
    margin: 1.25rem -1.25rem 0;
    padding: 0 1.25rem env(safe-area-inset-bottom, 0.5rem);
  }
  .calc-no-matches { display: none; } /* self-evident with rows present */
  .calc-result-panel {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,.1);
    padding: 1rem 1.5rem;
  }
  .calc-result-value { font-size: 2.25rem; }
  .calc-result-divider { height: 3rem; margin: 0 1.5rem; }
}

/* ============================================================
   PLAYER PROFILE — TTCAN link
   ============================================================ */
.ttcan-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1.5px solid #93c5fd;
  color: var(--electric);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  text-decoration: none;
}
.ttcan-profile-link:hover {
  background: #dbeafe;
  color: var(--primary);
  text-decoration: none;
}

/* ============================================================
   SCHEDULE — topbar with standings cross-link
   ============================================================ */
.schedule-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.schedule-tabs-wrap { flex: 1; min-width: 0; }
.schedule-tabs-wrap .season-tabs { margin-bottom: 0; }
.schedule-standings-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--electric);
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}
.schedule-standings-link:hover { color: var(--primary); text-decoration: underline; }

.schedule-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.schedule-col { min-width: 0; }

@media (max-width: 700px) {
  .schedule-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   STANDINGS — division title row with schedule link
   ============================================================ */
.division-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.division-title-row .division-title {
  margin-bottom: 0;
}
.division-schedule-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--electric);
  white-space: nowrap;
  flex-shrink: 0;
}
.division-schedule-link:hover { color: var(--primary); text-decoration: underline; }

.encounter-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.encounter-nav-row .back-link {
  margin-bottom: 0;
}
.encounter-context-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.context-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--electric);
}
.context-link:hover { color: var(--primary); text-decoration: underline; }

/* ============================================================
   ENCOUNTER — club sub-label
   ============================================================ */
.enc-club-sub {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.enc-club-sub a { color: var(--text-muted); }
.enc-club-sub a:hover { color: var(--primary); text-decoration: underline; }

/* ── Encounter detail: pairing badge & sets column ─────────────────────── */
.enc-matches-wrap { overflow-x: auto; }
.col-pairing  { white-space: nowrap; text-align: center; }
.col-sets     { white-space: nowrap; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 3.5rem; }
.match-set-score {
  color: var(--text);
  font-weight: 900;
}
.set-game-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: center;
  margin-top: 0.15rem;
}
.set-game-scores span {
  display: inline-flex;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
}
.pairing-badge {
  display: inline-block;
  font-family: var(--font-mono, 'Courier New', monospace);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--primary);
  background: rgba(var(--primary-rgb, 14,82,164), 0.07);
  border-radius: 3px;
  padding: 0.15em 0.45em;
  min-width: 3.25rem;
  text-align: center;
}
.pairing-doubles {
  color: #92400e;
  background: #fef3c7;
}
.match-no-result { color: var(--text-muted); }
.match-partner { font-size: 0.875em; }
.enc-round-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border-radius: 3px;
  padding: 0.1em 0.5em;
  vertical-align: middle;
}
.encounter-meta-link { color: var(--text); font-weight: 500; }
.encounter-meta-link:hover { color: var(--primary-h); text-decoration: underline; }

/* Match row highlight: shift columns because pairing replaced type */
.encounter-matches-table .col-player { min-width: 9rem; }
.match-row-home-win td:nth-child(3) { background: rgba(21,128,61,.05); }
.match-row-away-win td:nth-child(4) { background: rgba(14,165,233,.05); }

/* ── Schedule: results grouped by round ────────────────────────────────── */
.results-by-round   { display: flex; flex-direction: column; gap: 0; }
.results-round-section { margin-bottom: 0.5rem; }
.results-round-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 0 0.35rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* ── Home page: result rows ─────────────────────────────────────────────── */
.live-result-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}
.live-team { flex: 1; font-weight: 500; }
.live-team-won { font-weight: 800; color: var(--primary); }
.live-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 0.25rem;
}
.live-score-forfeit { font-size: 0.78rem; color: #b99f11; }
.live-round {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--text-muted);
  vertical-align: middle;
}

/* ============================================================
   GUIDE (Resources page)
   ============================================================ */
.guide-body {
  max-width: 720px;
}
.guide-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.guide-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.guide-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.625rem;
  letter-spacing: -.01em;
}
.guide-section p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.625rem;
}
.guide-section p:last-child { margin-bottom: 0; }
.guide-section ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0.625rem;
}
.guide-section li {
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 0.25rem;
}
.guide-matches {
  display: flex;
  gap: 2rem;
  margin: 0.75rem 0 0.75rem;
}
.guide-matches-col { min-width: 0; }
.guide-match-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}
.guide-match-list {
  list-style: decimal;
  padding-left: 1.375rem;
  margin: 0;
}
.guide-match-list li {
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0;
  letter-spacing: .02em;
}
.guide-note {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
}
/* ============================================================
   2026-2027 REGISTRATION
   ============================================================ */
.registration-hero {
  background: linear-gradient(135deg, #071427 0%, var(--primary) 54%, #087fb3 100%);
  color: #fff;
  padding: 3rem 0 2.25rem;
  overflow: hidden;
}
.registration-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 2rem;
  align-items: center;
}
.registration-copy h1,
.registration-format-copy h2,
.registration-form-intro h2,
.registration-thanks h1 {
  letter-spacing: 0;
  line-height: 1.08;
  color: inherit;
}
.registration-copy h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
  margin-bottom: 1rem;
}
.registration-eyebrow {
  display: inline-flex;
  width: fit-content;
  border-left: 3px solid var(--accent);
  padding-left: 0.65rem;
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.registration-lead {
  max-width: 620px;
  color: rgba(255,255,255,.8);
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.registration-actions,
.registration-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.registration-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.registration-button:hover { text-decoration: none; }
.registration-button-primary {
  color: #07151d;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(229,198,31,.32);
}
.registration-button-primary:hover { color: #07151d; background: var(--accent-h); }
.registration-button-secondary {
  color: var(--primary);
  background: #fff;
  border-color: var(--border);
}
.registration-button-secondary:hover { color: var(--primary); background: #f8fafc; border-color: var(--primary-light); }
.registration-hero .registration-button-secondary {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.3);
}
.registration-hero .registration-button-secondary:hover { background: rgba(255,255,255,.2); }
.registration-preview {
  background: rgba(255,255,255,.96);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.registration-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  background: var(--primary);
  color: #fff;
}
.registration-preview-head span {
  font-size: 0.72rem;
  color: rgba(255,255,255,.68);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.registration-preview-head strong { font-size: 0.9rem; }
.registration-scroll-rail {
  max-height: 390px;
  overflow: hidden;
  position: relative;
}
.registration-scroll-track {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  animation: registration-scroll 28s linear infinite;
}
.registration-scroll-rail:hover .registration-scroll-track { animation-play-state: paused; }
@keyframes registration-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.registration-rail-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.registration-rail-card h3 {
  margin: 0 0 0.45rem;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.registration-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  list-style: none;
}
.registration-mini-list li,
.registration-player-card > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}
.registration-player-card > div { grid-template-columns: auto minmax(0, 1fr); }
.registration-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.registration-mini-list a,
.registration-player-card a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.registration-mini-list strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.registration-player-card p {
  margin: 0.35rem 0 0 2.05rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.registration-empty { color: var(--text-muted); padding: 0.5rem; }
.registration-stats-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.registration-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.registration-stats-grid div {
  padding: 1.1rem 1rem;
  border-left: 1px solid var(--border);
}
.registration-stats-grid div:last-child { border-right: 1px solid var(--border); }
.registration-stats-grid strong {
  display: block;
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.registration-stats-grid span {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.registration-format-section,
.registration-form-section,
.registration-thanks {
  padding: 2.25rem 0;
}
.registration-format-grid,
.registration-form-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.registration-format-copy,
.registration-form-intro {
  color: var(--text);
}
.registration-format-copy h2,
.registration-form-intro h2,
.registration-thanks h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  margin-bottom: 0.65rem;
}
.registration-format-copy p,
.registration-form-intro p,
.registration-thanks p {
  color: var(--text-muted);
  max-width: 520px;
}
.registration-format-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.registration-format-details div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem;
  min-height: 6rem;
}
.registration-format-details strong {
  display: block;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
}
.registration-format-details span {
  color: var(--text-muted);
  font-size: 0.86rem;
}
.registration-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.registration-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.registration-form input,
.registration-form textarea {
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  padding: 0.66rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.registration-form textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.registration-form input:focus,
.registration-form textarea:focus {
  outline: none;
  border-color: var(--primary-h);
  box-shadow: 0 0 0 3px rgba(26,74,130,.12);
}
.registration-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.registration-form > * + * { margin-top: 0.9rem; }
.registration-form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  color: #991b1b;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  font-weight: 700;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.teams-builder {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 1rem;
}
.teams-builder-head {
  margin-bottom: 0.85rem;
}
.teams-builder-head h2 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 900;
  margin: 0 0 0.2rem;
  letter-spacing: 0;
}
.teams-builder-head p {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.teams-container {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.85rem;
}
.team-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}
.team-form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.team-form-head h3 {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0;
}
.team-form-head span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.player-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
  margin-top: 0.75rem;
  position: relative;
}
.ttcan-results {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  max-height: 15rem;
  overflow: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ttcan-results li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ttcan-results li:last-child { border-bottom: 0; }
.ttcan-results li:hover,
.ttcan-results li.lookup-active { background: var(--primary-light); }
.ttcan-results strong {
  color: var(--text);
  font-size: 0.88rem;
}
.ttcan-results span {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.selected-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1.9rem;
  margin-top: 0.75rem;
}
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.28rem 0.38rem 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}
.player-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-chip button {
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-weight: 900;
}
.players-empty {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-style: italic;
}
.privacy-notice {
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.privacy-notice p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 0.65rem;
}
.consent-label {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem !important;
  color: var(--text) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.consent-label input {
  width: auto;
  margin-top: 0.2rem;
}
.registration-form-actions span {
  color: var(--text-muted);
  font-size: 0.84rem;
}
.registration-thanks .container {
  max-width: 720px;
}
.receipt {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .registration-scroll-track { animation: none; }
}
@media (max-width: 900px) {
  .registration-hero-grid,
  .registration-format-grid,
  .registration-form-grid {
    grid-template-columns: 1fr;
  }
  .registration-preview {
    max-width: 620px;
  }
}
@media (max-width: 640px) {
  .registration-hero { padding: 2rem 0 1.5rem; }
  .registration-actions,
  .registration-form-actions,
  .registration-button {
    width: 100%;
  }
  .registration-stats-grid,
  .registration-format-details,
  .registration-form-row {
    grid-template-columns: 1fr;
  }
  .registration-stats-grid div,
  .registration-stats-grid div:last-child {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }
  .registration-stats-grid div:last-child { border-bottom: 0; }
  .registration-form { padding: 1rem; }
  .player-lookup {
    grid-template-columns: 1fr;
  }
  .team-form-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
}
