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

/* =========================================================
   Design tokens (validated categorical palette + chart chrome
   from the dataviz reference palette — see plan doc §dataviz)
   ========================================================= */
:root {
  color-scheme: light;

  /* Chrome & ink */
  --page-plane:     #f4f5f8;
  --surface-1:      #f8f9fb;
  --surface-2:      #ffffff;
  --text-primary:   #0c1322;
  --text-secondary: #4a5468;
  --text-muted:     #8b93a3;
  --gridline:       #e6e8ef;
  --border:         rgba(12, 19, 34, 0.09);

  /* Categorical (validated: PASS light+dark, secondary encoding via labels) */
  --series-home:    #2a78d6; /* blue  */
  --series-draw:    #008300; /* green */
  --series-away:    #e34948; /* red   */

  /* Status palette (fixed — never themed), for form pills */
  --status-good:    #0ca30c;
  --status-warn:    #fab219;
  --status-bad:     #d03b3b;

  /* Rating scale accents */
  --rating-track:   #e6e8ef;

  /* Brand accent + gradient (premium chrome) */
  --accent:         #2a6df0;
  --accent-2:       #6a34e0;
  --accent-ink:     #ffffff;
  --brand-grad:     linear-gradient(135deg, #2a6df0 0%, #6a34e0 100%);

  /* Deep hero canvas */
  --hero-1:         #0b1224;
  --hero-2:         #141d3a;
  --hero-3:         #221a4d;

  /* Elevation */
  --shadow-sm:  0 1px 2px rgba(12, 19, 34, 0.06), 0 1px 3px rgba(12, 19, 34, 0.05);
  --shadow-md:  0 6px 16px rgba(12, 19, 34, 0.08), 0 2px 6px rgba(12, 19, 34, 0.05);
  --shadow-lg:  0 18px 44px rgba(12, 19, 34, 0.14), 0 6px 14px rgba(12, 19, 34, 0.08);
  --shadow-hero: 0 30px 60px rgba(8, 12, 30, 0.45);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

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

  font-size: 16px;
}

/* ---------------- Dark theme (validated dark palette) ---------------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --page-plane:     #080b14;
  --surface-1:      #10141f;
  --surface-2:      #161b28;
  --text-primary:   #f4f6fb;
  --text-secondary: #b3bccd;
  --text-muted:     #7c869a;
  --gridline:       #232937;
  --border:         rgba(255, 255, 255, 0.09);

  --series-home:    #3987e5; /* blue  (dark step) */
  --series-draw:    #008300; /* green (mode-invariant) */
  --series-away:    #e66767; /* red   (dark step) */

  --rating-track:   #232937;

  --accent:         #5a8bff;
  --accent-2:       #9a6cff;
  --accent-ink:     #ffffff;
  --brand-grad:     linear-gradient(135deg, #3f74f5 0%, #8a52f0 100%);

  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 8px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg:  0 20px 46px rgba(0, 0, 0, 0.55);
  --shadow-hero: 0 30px 60px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Global polish */
html { scroll-behavior: smooth; }
img { max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto; } }

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo::before {
  content: "";
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--brand-grad);
  box-shadow: 0 4px 10px rgba(42, 109, 240, 0.4);
}
.logo span {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--text-primary); background: var(--surface-1); text-decoration: none; }
.main-nav a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Hamburger (mobile) — injected by theme.js */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; margin-left: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; margin: 0 auto; border-radius: 2px;
  background: var(--text-primary); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; display: none;
    background: var(--surface-2); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); padding: 10px 16px 14px;
  }
  .main-nav--open { display: flex; }
  .main-nav a { padding: 13px 14px; font-size: 1rem; }
}

/* ---------------- Ad placeholder slots ---------------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #f0efec,
    #f0efec 10px,
    #e9e8e4 10px,
    #e9e8e4 20px
  );
  border: 1px dashed var(--text-muted);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 28px 0;
}
:root[data-theme="dark"] .ad-slot {
  background: repeating-linear-gradient(
    45deg,
    #191f2c,
    #191f2c 10px,
    #12161f 10px,
    #12161f 20px
  );
  border-color: #2c3444;
}
.ad-slot--leaderboard { height: 90px; }
.ad-slot--rectangle { height: 250px; width: 300px; }
.ad-slot--infeed { height: 100px; }
.ad-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: -20px;
  margin-bottom: 24px;
}

/* ---------------- Page-title hero (inner pages) ---------------- */
.hero {
  padding: 40px 0 8px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.hero p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---------------- Premium hero (homepage) ---------------- */
.hero-premium {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(106, 52, 224, 0.55), transparent 60%),
    radial-gradient(900px 460px at 8% 120%, rgba(42, 109, 240, 0.45), transparent 55%),
    linear-gradient(160deg, var(--hero-1) 0%, var(--hero-2) 55%, var(--hero-3) 100%);
  color: #eef1fb;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero-premium::after {
  /* subtle top pitch-line texture */
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 46px;
  pointer-events: none;
  opacity: 0.6;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  padding-top: 68px;
  padding-bottom: 76px;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 52px; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bcc7f2;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 12px;
  border-radius: 30px;
}
.hero-eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #35d07f; box-shadow: 0 0 0 3px rgba(53,208,127,0.25);
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 18px 0 18px;
  color: #fff;
  text-wrap: balance;
}
.hero-copy h1 .grad {
  background: linear-gradient(120deg, #7aa2ff, #b98bff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-copy p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #c7cfe2;
  max-width: 46ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .hero-grid { padding-top: 28px; padding-bottom: 34px; }
  .hero-copy h1 { margin: 14px 0 14px; }
  .hero-copy p { font-size: 1rem; line-height: 1.55; margin-bottom: 22px; }
  .hero-eyebrow { font-size: 0.68rem; padding: 5px 10px; }
  .btn--lg { padding: 13px 20px; font-size: 0.95rem; }
}

/* ---------------- Stat strip ---------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: -40px auto 8px;
  position: relative;
  z-index: 5;
}
@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -28px; }
  .stat-tile { padding: 13px 14px; border-radius: var(--radius-md); }
  .stat-tile .stat-value { font-size: 1.45rem; }
  .stat-tile .stat-value .unit { font-size: 0.85rem; }
  .stat-tile .stat-label { font-size: 0.75rem; margin-top: 5px; }
}
.stat-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
}
.stat-tile .stat-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: block;
  line-height: 1;
}
.stat-tile .stat-value .unit { font-size: 1rem; color: var(--accent); margin-left: 2px; }
.stat-tile .stat-label {
  display: block;
  margin-top: 7px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ---------------- Section headings ---------------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 48px 0 20px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-heading a { font-size: 0.9rem; font-weight: 600; }

/* ---------------- Layout grids ---------------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 860px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ---------------- Match card ---------------- */
.match-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, border-color .2s ease;
}
.match-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.match-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.match-card__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
}
.team-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.team-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text-primary);
}
.vs-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 9px;
  align-self: center;
}
.match-card__venue {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ---------------- Prediction bar (validated categorical: home/draw/away) --- */
.prediction {
  margin-top: 8px;
}
.prediction--centered .prediction__score {
  text-align: center;
}
.prediction__score {
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.prediction__score .label {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 2px;
}
.prob-bar {
  display: flex;
  width: 100%;
  height: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gridline);
}
.prob-bar__seg {
  height: 100%;
}
.prob-bar__seg + .prob-bar__seg { margin-left: 2px; } /* surface gap between segments */
.prob-bar__seg--home { background: var(--series-home); }
.prob-bar__seg--draw { background: var(--series-draw); }
.prob-bar__seg--away { background: var(--series-away); }

.prob-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.prob-legend__item { display: flex; align-items: center; gap: 6px; }
.prob-legend__dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.prob-legend__dot--home { background: var(--series-home); }
.prob-legend__dot--draw { background: var(--series-draw); }
.prob-legend__dot--away { background: var(--series-away); }

/* ---------------- Fair-odds grid (model-implied 1X2 odds) ---------------- */
.odds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px; /* surface gap between cells */
  margin-top: 10px;
}
.odds-grid__col {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 6px 9px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.odds-grid__outcome {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.odds-grid__pct {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.odds-grid__odds {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.odds-caption {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.confidence-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--gridline);
  color: var(--text-secondary);
}
.prediction-pending {
  margin-top: 14px;
  padding: 14px 12px;
  border: 1px dashed var(--gridline);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Fixtures toolbar: day tabs + view toggle */
.fx-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin: 4px 0 16px;
}
/* Day tabs are standalone pills (not a segmented control), so they wrap cleanly. */
.tabs--days {
  flex-wrap: wrap; gap: 8px; margin: 0;
  border: none; border-radius: 0; overflow: visible;
}
.tabs--days .tab-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 15px;
}
.tabs--days .tab-btn.active { border-color: var(--accent); }
.view-toggle { gap: 4px; margin: 0; }

/* Grouped day view */
.day-group { margin-bottom: 26px; }
.day-group__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 0 0 12px;
}
.day-group__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
}
.day-group__count {
  font-size: 0.72rem; font-weight: 700; color: var(--text-secondary);
  background: var(--surface-1); border: 1px solid var(--border);
  padding: 1px 8px; border-radius: 20px;
}
.day-group__table {
  font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}

/* Small crest (list rows) */
.team-crest--sm { width: 22px; height: 22px; }
.team-crest--sm .team-crest__mono { font-size: 0.55rem; }
.team-crest--xl { width: 84px; height: 84px; }
.team-crest--xl .team-crest__mono { font-size: 1.5rem; }
.upnext-row__pred--final { color: #1a8f52; font-weight: 800; }

/* List-row extras: goals + live/FT status */
.mrow__goals {
  margin-left: auto; font-weight: 800; font-size: 0.95rem; color: var(--text-primary);
  min-width: 16px; text-align: right;
}
.mrow__status {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.mrow__status--live { color: #e5384f; }

/* List row: clear Prediction vs Full-time distinction */
.mrow__pred2 { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.mrow__pred2 small { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.mrow__tag {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.mrow__tag--final { color: #fff; background: #1a8f52; }
.mrow__tag--live { color: #fff; background: #e5384f; display: inline-flex; align-items: center; gap: 5px; }
.mrow__tag--live .live-badge__dot { background: #fff; }
.mrow--played { background: color-mix(in srgb, #1a8f52 6%, transparent); }
.mrow--live { background: color-mix(in srgb, #e5384f 6%, transparent); }

/* Custom flag dropdown (Tables) */
.flag-dropdown { position: relative; min-width: 260px; max-width: 100%; }
.fd-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font: inherit; font-size: 0.92rem; font-weight: 600; text-align: left;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text-primary); cursor: pointer;
}
.fd-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.fd-caret { margin-left: auto; color: var(--text-secondary); }
.fd-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); flex-shrink: 0; }
.fd-flag--none { background: var(--surface-1); }
.fd-list {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}
.fd-opt {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 0.9rem; cursor: pointer;
}
.fd-opt:hover { background: var(--surface-1); }
.fd-opt--sel { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }

/* Standings team crest */
.std-team { display: inline-flex; align-items: center; gap: 9px; }

/* Knockout bracket */
.bracket { margin-top: 30px; }
.bracket__title { font-size: 1.15rem; margin: 0 0 14px; }
.bracket__scroll { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 10px; }
.bt-col { flex: 0 0 auto; min-width: 210px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.bt-round { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin: 0 0 2px; }
.bt-tie { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.bt-team { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 0.86rem; }
.bt-team + .bt-team { border-top: 1px solid var(--border); }
.bt-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-score { font-weight: 800; min-width: 16px; text-align: right; }
.bt-team--win { font-weight: 800; }
.bt-team--win .bt-score { color: var(--accent); }

/* Model insights (match page) */
.insights { margin: 4px 0 24px; padding: 20px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.insights__title { font-size: 1.15rem; margin: 0 0 16px; }
.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ins-metric { text-align: center; }
.ins-metric__val { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.ins-metric__lbl { font-size: 0.76rem; color: var(--text-secondary); margin: 2px 0 8px; }
.ins-bar { height: 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 20%, transparent); overflow: hidden; }
.ins-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; }
.ins-scores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.ins-scores__lbl { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); }
.ins-score { background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; font-size: 0.88rem; }
.ins-score b { font-size: 0.98rem; }
@media (max-width: 520px) { .ins-grid { grid-template-columns: 1fr; } }

/* Head-to-head */
.h2h { margin: 0 0 24px; }
.h2h__title { font-size: 1.15rem; margin: 0 0 12px; }
.h2h-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.h2h-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); font-size: 0.88rem; }
.h2h-date { color: var(--text-secondary); min-width: 96px; font-size: 0.8rem; }
.h2h-teams { flex: 1; }
.h2h-comp { color: var(--text-secondary); font-size: 0.78rem; text-align: right; }
@media (max-width: 520px) { .h2h-comp { display: none; } }

/* Top scorers */
.topscorers { margin-top: 30px; }
.topscorers__title { font-size: 1.15rem; margin: 0 0 14px; }
.ts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ts-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ts-rank { width: 20px; font-weight: 800; color: var(--text-secondary); text-align: center; }
.ts-photo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-1); flex-shrink: 0; }
.ts-photo--none { background: var(--surface-1); }
.ts-name { flex: 1; font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; }
.ts-name small { font-weight: 500; color: var(--text-secondary); font-size: 0.78rem; }
.ts-stat { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 1.05rem; min-width: 54px; }
.ts-stat small { font-weight: 500; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); }
.ts-stat--muted { color: var(--text-secondary); }

/* Model track record */
.accuracy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.accuracy--empty {
  display: block; padding: 22px; border: 1px dashed var(--border); border-radius: 14px;
  color: var(--text-secondary); text-align: center; font-size: 0.92rem;
}
.acc-stat { padding: 22px; border-radius: 14px; text-align: center; background: var(--surface-2); border: 1px solid var(--border); }
.acc-stat__val { font-size: 2.4rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.acc-stat__val span { font-size: 1.2rem; color: var(--accent); }
.acc-stat__lbl { font-size: 0.82rem; color: var(--text-secondary); margin-top: 8px; }
@media (max-width: 600px) { .accuracy { grid-template-columns: 1fr; } }

/* Live now strip */
.livebar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.livebar__dot { width: 10px; height: 10px; border-radius: 50%; background: #e5384f; box-shadow: 0 0 0 0 rgba(229,56,79,0.6); animation: livePulse 1.4s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(229,56,79,0.5); } 70% { box-shadow: 0 0 0 8px rgba(229,56,79,0); } 100% { box-shadow: 0 0 0 0 rgba(229,56,79,0); } }
.livebar__label { font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.82rem; color: #e5384f; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em; color: #e5384f; }
.live-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: #e5384f; animation: livePulse 1.4s infinite; }

/* Cookie consent banner */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.28); padding: 16px 18px;
}
.consent-banner__text { flex: 1; min-width: 220px; font-size: 0.88rem; color: var(--text-secondary); }
.consent-banner__actions { display: flex; gap: 10px; }
.consent-btn { font: inherit; font-weight: 700; font-size: 0.9rem; padding: 10px 18px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); }
.consent-btn--ghost { background: transparent; color: var(--text-primary); }
.consent-btn--accept { background: var(--accent); color: #fff; border-color: var(--accent); }
.consent-btn--accept:hover { filter: brightness(1.05); }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
@media (max-width: 480px) { .consent-banner__actions { width: 100%; } .consent-btn { flex: 1; } }

/* Post-match analysis (match page) */
.postmatch {
  margin: 8px 0 26px; padding: 20px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.postmatch__title { font-size: 1.2rem; margin: 0 0 16px; }
.postmatch h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 18px 0 10px; }
.postmatch__goals h3:first-child, .postmatch__goals h3 { margin-top: 0; }
.pm-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pm-goals li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.pm-goals__min { min-width: 38px; font-weight: 800; color: var(--accent); }
.pm-goals__scorer { font-weight: 600; }
.pm-goals__team { margin-left: auto; color: var(--text-secondary); font-size: 0.82rem; }
.pm-stat { margin-bottom: 12px; }
.pm-stat__row { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.pm-stat__label { color: var(--text-secondary); font-weight: 600; }
.pm-stat__bar { height: 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 22%, transparent); overflow: hidden; }
.pm-stat__fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.postmatch__block { margin-top: 22px; }
.postmatch__block:first-of-type { margin-top: 0; }

/* Match timeline */
.timeline { display: flex; flex-direction: column; gap: 4px; }
.tl-row { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; gap: 8px; }
.tl-cell { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.tl-cell--home { justify-content: flex-end; text-align: right; }
.tl-cell--away { justify-content: flex-start; text-align: left; }
.tl-cell--home .tl-txt { order: 2; }
.tl-cell--home .tl-ico, .tl-cell--home .tl-card { order: 3; }
.tl-txt { display: flex; flex-direction: column; line-height: 1.2; }
.tl-txt small { color: var(--text-secondary); font-size: 0.72rem; }
.tl-ico { font-size: 1rem; }
.tl-min { text-align: center; font-weight: 800; font-size: 0.72rem; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border); border-radius: 20px; padding: 2px 0; }
.tl-card { width: 11px; height: 15px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.tl-card--yellow { background: #f2c53d; }
.tl-card--red { background: #e5384f; }

/* Line-ups */
.lu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lu-col { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.lu-team { font-weight: 800; margin-bottom: 10px; }
.lu-form { font-weight: 600; font-size: 0.76rem; color: var(--text-secondary); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 12px; margin-left: 4px; }
.lu-xi, .lu-subs { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.lu-xi li, .lu-subs li { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; }
.lu-num { width: 22px; text-align: center; font-weight: 700; color: var(--text-secondary); font-size: 0.78rem; flex-shrink: 0; }
.lu-pos { margin-left: auto; font-size: 0.68rem; color: var(--text-muted); }
.lu-subs li { font-size: 0.82rem; color: var(--text-secondary); }
.lu-subhead { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 10px 0 6px; }
.lu-coach { font-size: 0.78rem; color: var(--text-secondary); margin-top: 8px; }
@media (max-width: 560px) { .lu-grid { grid-template-columns: 1fr; } .tl-row { grid-template-columns: 1fr 40px 1fr; } }

/* ===== Rich design polish ===== */

/* Hero match-of-the-day: probability donut + stacked legend */
.hero-card__viz {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin: 18px 0 10px; flex-wrap: wrap;
}
.hero-donut {
  width: 134px; height: 134px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.hero-donut__hole {
  width: 96px; height: 96px; border-radius: 50%; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-donut__score { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.hero-donut__lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-top: 4px; }
.prob-legend--stack { flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.prob-legend--stack .prob-legend__item strong { color: var(--text-primary); }

/* Card hover lift */
.match-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.match-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.16);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}
.article-card { transition: transform .18s ease, box-shadow .18s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,0.16); }

/* Crest shadow */
.team-crest img { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.18)); }

/* Section heading accent bar */
.section-heading h2 { position: relative; padding-left: 14px; }
.section-heading h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 1.05em; border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

/* Subtle fade-in for grids */
@keyframes ffIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.grid-cards > * { animation: ffIn .34s ease both; }

/* Analysis card competition badge (over the image gradient) */
.article-card__image { position: relative; }
.article-card__badge {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: #fff;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.25);
  padding: 3px 9px; border-radius: 20px; backdrop-filter: blur(2px);
}

/* Tables page league picker */
.table-picker { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; flex-wrap: wrap; }
.table-picker label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.select-input {
  font: inherit; font-size: 0.9rem; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text-primary); cursor: pointer;
  min-width: 240px; max-width: 100%;
}

.empty-note { color: var(--text-secondary); padding: 20px 0; text-align: center; }

/* Final / live result shown instead of a prediction once a match kicks off */
.result-block {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: 14px; padding: 12px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
}
.result-block__label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.result-block__score { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.result-block__dash { color: var(--text-muted); font-weight: 600; }
.result-block--live { border-color: var(--accent); }
.result-block--live .result-block__label { color: var(--accent); }
.pred-note { font-size: 0.8rem; color: var(--text-secondary); margin: 16px 0 6px; text-align: center; }

/* Team crests (real logos with a monogram fallback) */
.team-crest {
  width: 44px; height: 44px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.team-crest img { width: 100%; height: 100%; object-fit: contain; }
.team-crest__mono {
  width: 100%; height: 100%; border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.9rem;
}
.team-crest--lg { width: 64px; height: 64px; }
.team-crest--lg .team-crest__mono { font-size: 1.15rem; }

/* Compact result badge on cards (shown with the prediction) */
.result-badge {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin: 12px 0 4px;
}
.result-badge__tag {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em;
  color: var(--text-secondary); background: var(--gridline);
  padding: 2px 7px; border-radius: 10px;
}
.result-badge__score { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); }
.result-badge--live .result-badge__tag { color: #fff; background: var(--accent); }

.card-footer-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------------- Filters (fixtures page) ---------------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------------- Article card ---------------- */
.article-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card:hover .article-card__image { transform: scale(1.04); }
.article-card__image {
  height: 148px;
  background: linear-gradient(135deg, #2a78d6 0%, #1c5cab 100%);
  transition: transform .35s ease;
  position: relative;
}
.article-card__image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.22));
}
.article-card__body { padding: 18px 20px 22px; }
.article-card__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}
.article-card__title { font-family: var(--font-display); font-size: 1.08rem; margin: 0 0 8px; line-height: 1.3; letter-spacing: -0.01em; }
.article-card__excerpt { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 10px; }
.article-card__date { font-size: 0.78rem; color: var(--text-muted); }

/* ---------------- Article page typography ---------------- */
.article-hero {
  padding: 40px 0 10px;
}
.article-hero__tag {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.article-hero h1 {
  font-size: 2rem;
  margin: 10px 0 14px;
  letter-spacing: -0.01em;
}
.article-hero__byline {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.article-body {
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.article-body p { margin: 0 0 20px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-style: italic;
}
.article-body h2 { font-size: 1.3rem; margin: 32px 0 14px; }

/* ---------------- Embedded mini prediction ---------------- */
.embedded-prediction {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 28px 0;
}
.embedded-prediction__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

/* ---------------- Match detail page ---------------- */
.match-hero {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin: 28px 0;
}
.match-hero__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.match-hero__teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}
.match-hero__teams .vs {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
/* Badged match-hero header */
.match-hero__teams--badged { gap: 28px; align-items: center; }
.mh-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  min-width: 130px;
}
.mh-team:hover { text-decoration: none; }
.mh-team:hover .mh-team__name { color: var(--accent); }
.mh-team__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  transition: color .15s ease;
}
.team-badge--lg {
  width: 64px;
  height: 64px;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), var(--shadow-md);
}
.match-hero__venue {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.stats-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.stats-table th, .stats-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--gridline);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.stats-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

.factors-list p { margin: 0 0 14px; color: var(--text-secondary); }

/* ---------------- Disclaimer / notice box ---------------- */
.notice-box {
  background: #fdf6e8;
  border: 1px solid #eda100;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.88rem;
  color: #4a3d1a;
  margin: 24px 0;
}
.notice-box strong { display: block; margin-bottom: 4px; color: #3a2c00; }
:root[data-theme="dark"] .notice-box {
  background: #2a2510;
  border-color: #a5741a;
  color: #ecd9a8;
}
:root[data-theme="dark"] .notice-box strong { color: #f5e6bf; }

/* ---------------- Sidebar ---------------- */
.sidebar-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.sidebar-box h3 { font-size: 0.95rem; margin: 0 0 12px; }
.sidebar-box ul { margin: 0; padding: 0; list-style: none; }
.sidebar-box li { padding: 8px 0; border-bottom: 1px solid var(--gridline); font-size: 0.88rem; }
.sidebar-box li:last-child { border-bottom: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(42, 109, 240, 0.32);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(42, 109, 240, 0.42); filter: brightness(1.05); }
.btn--lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #dfe5f5;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { text-decoration: none; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); }
.btn--lg.btn-ghost { padding: 14px 24px; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 32px 0 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .footer-disclaimer {
  max-width: 760px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .footer-links a { color: var(--text-secondary); }

/* Fixtures list rows */
.fixture-group { margin-bottom: 36px; }
.fixture-group h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gridline);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* =========================================================
   WhoScored-inspired components
   ========================================================= */

/* ---------------- Theme toggle ---------------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.nav-wrap { display: flex; align-items: center; }

/* ---------------- Form guide pills (W / D / L) ---------------- */
.form-guide {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.form-pill {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.form-pill--W { background: var(--status-good); }
.form-pill--D { background: var(--status-warn); color: #3a2c00; }
.form-pill--L { background: var(--status-bad); }
.form-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 6px;
}

/* ---------------- Rating badge (0–10) ---------------- */
.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: -0.01em;
}
/* rating colour ramps by band (WhoScored-style): higher = stronger */
.rating-badge--elite { background: #1b7a3d; }   /* >= 7.0 */
.rating-badge--good  { background: #3f9a53; }   /* 6.8–6.99 */
.rating-badge--avg   { background: #7d8a55; }   /* 6.6–6.79 */
.rating-badge--low   { background: #9a7d3f; }   /* < 6.6 */

.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* team row inside a match card: name + form + rating */
.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.team-row--away { justify-content: flex-end; }
.team-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

/* ---------------- Stat comparison bars (match centre) ---------------- */
.compare-block { margin: 8px 0 4px; }
.compare-row { margin-bottom: 14px; }
.compare-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}
.compare-row__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.compare-row__val { font-weight: 700; }
.compare-row__val--home { color: var(--series-home); }
.compare-row__val--away { color: var(--series-away); }
.compare-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--gridline);
}
.compare-bar__home { background: var(--series-home); height: 100%; }
.compare-bar__away { background: var(--series-away); height: 100%; margin-left: 2px; }

.compare-legend {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.compare-legend__item { display: flex; align-items: center; gap: 6px; }
.compare-legend__dot { width: 9px; height: 9px; border-radius: 50%; }
.compare-legend__dot--home { background: var(--series-home); }
.compare-legend__dot--away { background: var(--series-away); }

/* ---------------- Tabs (Overall / Home / Away) ---------------- */
.tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 18px;
}
.tab-btn {
  background: var(--surface-2);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
}
.tab-btn:last-child { border-right: none; }
.tab-btn.active { background: var(--accent); color: var(--accent-ink); }

/* ---------------- Standings table ---------------- */
.standings-wrap { overflow-x: auto; }
.standings {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.9rem;
}
.standings th, .standings td {
  padding: 11px 10px;
  text-align: center;
  border-bottom: 1px solid var(--gridline);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.standings thead th {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface-1);
}
.standings td.team-cell, .standings th.team-cell { text-align: left; }
.standings .pos-cell { color: var(--text-muted); font-weight: 600; }
.standings tbody tr:last-child td { border-bottom: none; }
.standings tbody tr:hover { background: var(--surface-1); }
.standings .team-name { font-weight: 600; color: var(--text-primary); }
.standings .pts-cell { font-weight: 700; }
.qual-line { border-left: 3px solid var(--status-good); }

/* small helper */
.section-lead {
  color: var(--text-secondary);
  margin: 0 0 8px;
  max-width: 640px;
}

/* =========================================================
   Hero "Match of the day" card
   ========================================================= */
.hero-featured { display: flex; justify-content: center; }
.hero-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px 24px;
  box-shadow: var(--shadow-hero);
  position: relative;
}
.hero-card__ribbon {
  position: absolute;
  top: -12px; left: 24px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(42,109,240,0.4);
}
.hero-card__meta {
  display: flex; justify-content: space-between;
  font-size: 0.74rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  margin: 8px 0 16px;
}
.hero-card .match-card__teams { margin-bottom: 16px; }
.hero-card__predline {
  text-align: center;
  margin-bottom: 12px;
}
.hero-card__predline .lbl {
  font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  display: block; margin-bottom: 2px;
}
.hero-card__score {
  font-family: var(--font-display);
  font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.hero-card .prob-bar { height: 22px; }
.hero-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px;
}

/* Confidence chip variants (used in hero + can extend elsewhere) */
.conf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px;
}
.conf-chip::before { content:""; width: 7px; height: 7px; border-radius: 50%; }
.conf-chip--high { background: color-mix(in srgb, var(--status-good) 16%, transparent); color: #0a7a0a; }
.conf-chip--high::before { background: var(--status-good); }
.conf-chip--medium { background: color-mix(in srgb, var(--status-warn) 20%, transparent); color: #9a6a00; }
.conf-chip--medium::before { background: var(--status-warn); }
.conf-chip--low { background: color-mix(in srgb, var(--text-muted) 18%, transparent); color: var(--text-secondary); }
.conf-chip--low::before { background: var(--text-muted); }
:root[data-theme="dark"] .conf-chip--high { color: #4ad24a; }
:root[data-theme="dark"] .conf-chip--medium { color: #f5c451; }

.hero-card__cta { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

/* =========================================================
   Compact league-grouped fixtures list (Flashscore-style)
   ========================================================= */
.fx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}
.fx-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 4px 0 18px;
}
.fx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fx-legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.fx-legend .dot--high { background: var(--status-good); }
.fx-legend .dot--medium { background: var(--status-warn); }
.fx-legend .dot--low { background: var(--text-muted); }
.fx-legend .pickswatch {
  width: 16px; height: 12px; border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
}

.team-badge--sm {
  width: 22px; height: 22px;
  font-size: 0.58rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.lg-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  overflow: hidden;
}
.lg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gridline);
  background: var(--surface-1);
}
.lg-badge {
  min-width: 32px; height: 22px;
  border-radius: 5px;
  color: #fff;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.lg-name { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; }
.lg-link { margin-left: auto; font-size: 0.8rem; font-weight: 600; }

.mrow {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto 18px;
  align-items: center;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--gridline);
  color: inherit;
  transition: background .12s ease;
}
.mrow:last-child { border-bottom: none; }
.mrow:hover { background: var(--surface-1); text-decoration: none; }
.mrow__time {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; line-height: 1.25;
}
.mrow__time small { color: var(--text-muted); font-size: 0.68rem; font-weight: 500; }
.mrow__teams { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mrow__team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mrow__name {
  font-weight: 600; font-size: 0.93rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrow__pred { display: flex; align-items: center; gap: 9px; }
.mrow__score {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.conf-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.conf-dot--high { background: var(--status-good); }
.conf-dot--medium { background: var(--status-warn); }
.conf-dot--low { background: var(--text-muted); }
.mrow__odds { display: flex; gap: 6px; }
.oc {
  display: flex; flex-direction: column; align-items: center;
  min-width: 46px;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-weight: 700; font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.oc small { font-size: 0.58rem; color: var(--text-muted); font-weight: 700; margin-bottom: 1px; }
.oc--pick {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--accent);
}
.oc--pick small { color: var(--accent); }
.mrow__go { color: var(--text-muted); font-size: 1.35rem; text-align: center; line-height: 1; }

@media (max-width: 680px) {
  .mrow { grid-template-columns: 44px minmax(0,1fr) auto 14px; gap: 9px; padding: 11px 12px; }
  .mrow__odds { display: none; }
  /* Give team names room and let them wrap rather than clip on narrow screens. */
  .mrow__team { gap: 7px; align-items: center; }
  .mrow__name { font-size: 0.85rem; white-space: normal; line-height: 1.15; }
  .mrow__pred2 small { font-size: 0.5rem; }
  .mrow__score { font-size: 0.9rem; padding: 4px 8px; }
}

/* =========================================================
   Team profile page
   ========================================================= */
.team-badge--xl {
  width: 84px; height: 84px;
  font-size: 1.5rem; border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), var(--shadow-md);
}
.team-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}
.team-hero__info { flex: 1; min-width: 200px; }
.team-hero__info h1 {
  font-family: var(--font-display);
  font-size: 2.1rem; letter-spacing: -0.03em; margin: 0 0 4px;
}
.team-hero__meta { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 12px; }
.team-hero__row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.team-hero__form { display: inline-flex; align-items: center; gap: 8px; }
.team-hero__facts {
  display: flex; gap: 26px; flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.team-hero__facts div { font-size: 0.95rem; font-weight: 600; }
.team-hero__facts span {
  display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px;
}
.stat-strip--team { margin: 22px 0 8px; }
.team-blurb {
  color: var(--text-secondary); font-size: 1.05rem; max-width: 760px;
  margin: 18px 0 0; text-wrap: pretty;
}
.team-h2 {
  font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em;
  margin: 4px 0 16px;
}

/* Strength meters */
.strengths { display: grid; gap: 16px; margin-bottom: 34px; }
.strength__head {
  display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 6px;
}
.strength__val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.strength__track {
  height: 8px; border-radius: 5px; background: var(--rating-track); overflow: hidden;
}
.strength__fill {
  height: 100%; border-radius: 5px; background: var(--brand-grad);
}

/* Upcoming fixtures list */
.upnext {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.upnext-row {
  display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--gridline); color: inherit;
  transition: background .12s ease;
}
.upnext-row:last-child { border-bottom: none; }
.upnext-row:hover { background: var(--surface-1); text-decoration: none; }
.upnext-row__date { font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); display: flex; flex-direction: column; line-height: 1.25; }
.upnext-row__date small { color: var(--text-muted); font-size: 0.68rem; font-weight: 500; }
.upnext-row__opp { font-weight: 600; font-size: 0.95rem; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.upnext-row__opp small { color: var(--text-muted); font-size: 0.72rem; font-weight: 500; }
.upnext-row__pred {
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px; font-variant-numeric: tabular-nums;
}

/* Recent results (sidebar) */
.results { display: grid; gap: 8px; }
.result-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; font-size: 0.88rem; }
.result-row__opp { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-row__score { font-weight: 700; font-variant-numeric: tabular-nums; }
.muted-note { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================================
   Best XI — pitch visualization
   ========================================================= */
.bestxi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 860px) { .bestxi-layout { grid-template-columns: 1fr; } }

.pitch {
  position: relative;
  aspect-ratio: 68 / 105;
  width: 100%;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(0deg, #1f9d53 0 9.09%, #1c9550 9.09% 18.18%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.15);
}
.pitch__lines { position: absolute; inset: 0; }
.pitch__lines > * { position: absolute; border: 2px solid rgba(255,255,255,0.55); box-sizing: border-box; }
.pitch__halfway { top: 50%; left: 0; width: 100%; height: 0; border-width: 0 0 2px 0; }
.pitch__circle { top: 50%; left: 50%; width: 24%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.pitch__box { left: 50%; width: 58%; height: 15%; transform: translateX(-50%); }
.pitch__box--top { top: 0; border-top: none; }
.pitch__box--bottom { bottom: 0; border-bottom: none; }
.pitch__spot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.7); border: none; left: 50%; transform: translateX(-50%); }
.pitch__spot--top { top: 11%; }
.pitch__spot--bottom { bottom: 11%; }

.player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  width: 84px;
  text-align: center;
}
.player:hover { text-decoration: none; }
.player:hover .player__badge { transform: scale(1.08); }
.player__badge {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  box-shadow: 0 3px 8px rgba(0,0,0,0.35), inset 0 0 0 2px rgba(255,255,255,0.4);
  transition: transform .15s ease;
}
.player__badge .team-crest { width: 34px; height: 34px; }
.player__badge .team-crest__mono { font-size: 0.72rem; }
.player__rating {
  position: absolute;
  bottom: -6px; right: -8px;
  background: #fff; color: #0c1322;
  font-size: 0.64rem; font-weight: 800;
  padding: 1px 4px; border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  font-variant-numeric: tabular-nums;
}
.player__name {
  font-size: 0.78rem; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.1;
  margin-top: 4px;
}
.player__pos {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Best XI ranked list */
.bx-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.bx-panel h3 {
  font-family: var(--font-display);
  font-size: 1rem; margin: 0;
  padding: 14px 16px; border-bottom: 1px solid var(--gridline);
  background: var(--surface-1);
}
.bx-row {
  display: grid;
  grid-template-columns: 34px 22px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gridline);
  color: inherit;
}
.bx-row:last-child { border-bottom: none; }
.bx-row:hover { background: var(--surface-1); text-decoration: none; }
.bx-row__pos { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.bx-row__name { font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bx-row__name small { color: var(--text-muted); font-size: 0.72rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.formation-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; color: var(--text-secondary);
  background: var(--surface-1); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 20px;
}

/* ---------------- Match-page "League table" button + pop-up ------------- */
.match-hero__table-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 4px auto 18px; padding: 7px 15px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.match-hero__table-btn:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-1));
}
.mh-table-icon { font-size: 0.9em; line-height: 1; }

/* Generic modal */
html.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 30, 0.55);
  backdrop-filter: blur(3px);
  animation: modal-fade .16s ease;
}
.modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 680px; max-height: 96vh;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-pop .18s ease;
}
/* Wider variant for tables that need the room to fit without scrolling. */
.modal--wide { max-width: 760px; }
.modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.modal__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.modal__close {
  margin-left: auto; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-1);
  color: var(--text-secondary); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s ease, background .15s ease;
}
.modal__close:hover { color: var(--text-primary); background: var(--surface-2); }
.modal__body { padding: 14px 18px; overflow-y: auto; }
.modal__foot {
  padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
.modal-note, .modal-loading, .modal-empty {
  font-size: 0.76rem; color: var(--text-muted); margin: 0 0 8px;
}
.modal-loading, .modal-empty { margin: 8px 0; }
.modal__body .standings-wrap { margin: 0; }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; border-radius: 9px; box-shadow: none; }

/* Compact standings inside the pop-up so the whole table fits without scrolling. */
.modal__body { padding-top: 10px; padding-bottom: 12px; }
.modal .standings { font-size: 0.8rem; }
.modal .standings th, .modal .standings td { padding: 4px 6px; }
.modal .standings thead th { font-size: 0.64rem; }
.modal .standings .team-cell { max-width: none; }
.modal .standings .team-crest { width: 17px; height: 17px; }
.modal .standings .team-crest img { width: 17px; height: 17px; }
.modal .standings .std-team span { font-size: 0.8rem; }
/* Form column is the widest/tallest cell — trim it in the compact view. */
.modal .standings th:last-child, .modal .standings td:last-child { padding-left: 4px; padding-right: 4px; }

/* Knockout-tie view inside the pop-up */
.tie-legs { display: flex; flex-direction: column; gap: 14px; }
.tie-leg__meta {
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 6px;
}
.tie-legs .bt-tie { max-width: 420px; }
.tie-legs .bt-name { font-weight: 600; }
.tie-legs .bt-score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tie-agg {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-secondary);
}
.tie-agg strong { color: var(--text-primary); }

/* Highlighted rows: the two sides of the current match */
.standings tr.std-row--focus td { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.standings tr.std-row--focus:hover td { background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); }
.standings tr.std-row--focus .std-team { font-weight: 800; color: var(--text-primary); }
.standings tr.std-row--focus td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .modal { max-height: 92vh; }
  .modal__body { padding: 12px 12px; }
}
