/* VERSION CHECK: v-table-width-fix-002 */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root{
  --pitch:#163326;
  --pitch-light:#1F4D3A;
  --chalk:#F5F6F4;
  --panel:#FFFFFF;
  --ink:#142019;
  --ink-soft:#5C6B63;
  --line:#E3E7E4;
  --gold:#C79A2E;
  --live-bg:#FBF3E1;
  --champions:#2F6FED;
  --europa:#E07B2C;
  --conference:#2FA37A;
  --relegation:#D2483F;
  --radius:10px;
}

*{ box-sizing:border-box; }
body{
  margin:0; background:var(--chalk); color:var(--ink);
  font-family:'Inter',system-ui,sans-serif; -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
:focus-visible{ outline:3px solid var(--gold); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ============ NAV ============ */
nav.primary{ background:var(--pitch); }
.nav-inner{
  max-width:1040px; margin:0 auto; padding:0 20px;
  display:flex; gap:2px;
}
.nav-item{ position:relative; }
.nav-link{
  display:flex; align-items:center; gap:5px;
  padding:15px 14px; font-weight:600; font-size:.875rem;
  color:#C8DED0; white-space:nowrap; cursor:pointer; border:none; background:none;
  font-family:'Inter',sans-serif;
}
.nav-link:hover{ color:#fff; }
.nav-item.active > .nav-link{ color:#fff; box-shadow:inset 0 -3px 0 var(--gold); }
.nav-item.open > .nav-link{ color:#fff; background:var(--pitch-light); }
.caret{ font-size:.6rem; opacity:.75; transition:transform .15s ease; }
.nav-item.open .caret{ transform:rotate(180deg); }

.dropdown{
  position:absolute; top:100%; left:0;
  background:var(--panel); border:1px solid var(--line);
  border-radius:8px; box-shadow:0 12px 28px rgba(20,32,25,.16);
  min-width:200px; padding:6px; margin-top:6px; display:none; z-index:30;
}
.nav-item.open .dropdown{ display:block; }
.dropdown a{
  display:block; padding:9px 12px; border-radius:6px;
  font-size:.875rem; font-weight:500; color:var(--ink);
}
.dropdown a:hover{ background:var(--chalk); }

.mobile-nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:4px;
  width:36px; height:36px; padding:0; border:none; background:none; cursor:pointer;
  margin-left:auto;
}
.hamburger-bar{ display:block; width:22px; height:2px; background:#fff; border-radius:2px; }

@media (max-width:900px){
  .primary{ position:relative; }
  .nav-inner{
    display:none; flex-direction:column; gap:0;
    position:absolute; top:100%; left:0; right:0;
    background:var(--pitch); border-top:1px solid rgba(255,255,255,.12);
    max-height:80vh; overflow-y:auto; z-index:40;
  }
  .nav-inner.mobile-open{ display:flex; }
  .mobile-nav-toggle{ display:flex; }

  .nav-item{ width:100%; }
  .nav-link{ width:100%; justify-content:space-between; padding:14px 20px; }

  .dropdown{
    position:static; box-shadow:none; border:none; border-radius:0;
    background:rgba(0,0,0,.14); margin:0; padding:0; min-width:0;
    max-height:0; overflow:hidden; transition:max-height .2s ease;
  }
  .nav-item.open .dropdown{ max-height:400px; }
  .dropdown a{ color:#fff; padding:12px 32px; border-radius:0; }
  .dropdown a:hover{ background:rgba(255,255,255,.08); }
}

/* ============ PAGE HEADER (non-home pages) ============ */
header.page-head{
  background:linear-gradient(155deg, var(--pitch) 0%, var(--pitch-light) 100%);
  color:#fff; padding:34px 20px 30px;
}
.page-head-inner{ max-width:1040px; margin:0 auto; }
.eyebrow{
  font-family:'JetBrains Mono',monospace; font-size:.75rem; letter-spacing:.14em;
  text-transform:uppercase; color:#9FCBB0; margin:0 0 6px;
}
h1{
  font-family:'Oswald',sans-serif; font-weight:700; font-size:clamp(2rem,5vw,2.75rem);
  letter-spacing:.01em; text-transform:uppercase; margin:0 0 10px; line-height:1.02;
}
.lede{ font-size:.9375rem; color:#C8DED0; max-width:46ch; margin:0; }

/* ============ HOME HERO ============ */
.hero{
  background:linear-gradient(155deg, var(--pitch) 0%, var(--pitch-light) 100%);
  color:#fff; padding:44px 20px 40px; text-align:center;
}
.hero-inner{ max-width:1040px; margin:0 auto; }
.hero h1{ margin:0 0 10px; }
.hero p{ font-size:1rem; color:#C8DED0; margin:0 0 18px; }
.hero-live{
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18);
  padding:8px 16px; border-radius:999px; font-family:'JetBrains Mono',monospace;
  font-size:.8125rem; font-weight:600; color:#fff;
}

/* ============ LIVE PULSE ============ */
.live-dot{
  width:7px; height:7px; border-radius:50%; background:var(--gold);
  animation:pulse 2s infinite; display:inline-block;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(199,154,46,.55); }
  70%{ box-shadow:0 0 0 7px rgba(199,154,46,0); }
  100%{ box-shadow:0 0 0 0 rgba(199,154,46,0); }
}

/* ============ LAYOUT ============ */
main{ max-width:1040px; margin:0 auto; padding:0 20px 20px; }
.section{ margin-top:30px; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px; }
.section-head h2{
  font-family:'Oswald',sans-serif; font-size:1.05rem; text-transform:uppercase; letter-spacing:.03em; margin:0;
}
.section-head a{ font-size:.8125rem; font-weight:700; color:var(--pitch); white-space:nowrap; }
.section-head a:hover{ text-decoration:underline; }

/* ============ FIXTURE ROWS (used on Home + Fixtures & Results) ============ */
.fixture-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.fixture-row{
  display:grid; grid-template-columns:64px 1fr auto 1fr; align-items:center;
  gap:10px; padding:12px 16px; border-bottom:1px solid var(--line);
}
.fixture-row:last-child{ border-bottom:none; }
.fixture-row:nth-child(even){ background:var(--chalk); }
.status-live{
  display:inline-flex; align-items:center; gap:5px; justify-self:center;
  background:var(--live-bg); color:#8A6A17; font-weight:700; font-size:.75rem;
  padding:4px 8px; border-radius:999px; font-family:'JetBrains Mono',monospace;
}
.status-ft{ font-family:'JetBrains Mono',monospace; font-size:.75rem; font-weight:700; color:var(--ink-soft); text-align:center; }
.status-ko{ font-family:'JetBrains Mono',monospace; font-size:.8125rem; font-weight:700; color:var(--ink); text-align:center; }
.team{ display:flex; align-items:center; gap:8px; font-size:.875rem; font-weight:600; }
.team.away{ justify-content:flex-end; text-align:right; flex-direction:row-reverse; }
.crest{
  width:22px; height:22px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  font-family:'Oswald',sans-serif; font-weight:600; font-size:.5625rem; color:#fff; background:var(--pitch-light);
}
.crest-img{ width:22px; height:22px; object-fit:contain; flex:none; }
.score{ font-family:'JetBrains Mono',monospace; font-weight:700; font-size:1rem; text-align:center; min-width:48px; color:#8A6A17; }
.score.finished{ color:var(--ink); }
.score.upcoming{ color:var(--ink-soft); font-weight:500; font-size:.8125rem; }

.league-tag{
  font-family:'JetBrains Mono',monospace; font-size:.625rem; font-weight:700;
  letter-spacing:.04em; color:var(--ink-soft); background:var(--chalk);
  border:1px solid var(--line); border-radius:5px; padding:2px 5px;
  justify-self:center; margin-top:3px;
}
.fixtures-summary{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
  padding:14px 16px; border-top:1px solid var(--line); background:var(--chalk);
}
.fs-info{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:.8125rem; color:var(--ink-soft); }
.fs-live-more{
  display:inline-flex; align-items:center; gap:6px;
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.75rem;
  color:#8A6A17; background:var(--live-bg); border-radius:999px; padding:4px 10px;
}
.fs-counts strong{ font-family:'JetBrains Mono',monospace; color:var(--ink); font-weight:700; }
.fs-dot{ color:var(--line); }
.fs-link{
  font-family:'Inter',sans-serif; font-weight:700; font-size:.8125rem; color:#fff;
  background:var(--pitch); border-radius:999px; padding:7px 14px; white-space:nowrap;
}
.fs-link:hover{ background:var(--pitch-light); }

/* ============ MINI TABLES (Home) ============ */
.tables-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.mini-table-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.mini-table-head{ display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line); }
.mini-table-head h3{ font-family:'Oswald',sans-serif; font-size:.875rem; text-transform:uppercase; letter-spacing:.02em; margin:0; }
.mini-table-head a{ font-size:.75rem; font-weight:700; color:var(--pitch); }
.mini-row{
  display:grid; grid-template-columns:36px 1fr 40px; align-items:center; gap:8px;
  padding:8px 16px; border-bottom:1px solid var(--line); font-size:.8125rem;
}
.mini-row:nth-child(even){ background:var(--chalk); }

.rivalry-row{
  display:grid; grid-template-columns:36px 1fr auto 1fr; align-items:center; gap:10px;
  padding:12px 16px; border-bottom:1px solid var(--line); text-decoration:none; color:var(--ink);
}
.rivalry-row:last-child{ border-bottom:none; }
.rivalry-row:nth-child(even){ background:var(--chalk); }
.rivalry-team{ display:flex; align-items:center; gap:8px; font-size:.875rem; font-weight:600; min-width:0; }
.rivalry-team.away{ justify-content:flex-end; text-align:right; }
.rivalry-team .mini-team{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rivalry-count{
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.9375rem;
  background:var(--chalk); border-radius:999px; padding:4px 12px; text-align:center; min-width:32px;
}
.history-row:nth-child(even):not(.history-row-a):not(.history-row-draw):not(.history-row-b):not(.history-row-current){ background:var(--chalk); }
.predicted-row:nth-child(even){ background:var(--chalk); }
.mini-team-wrap{ display:flex; align-items:center; gap:7px; min-width:0; }
.mini-team-wrap .crest-img{ width:18px; height:18px; }
.mini-team-wrap .crest{ width:18px; height:18px; font-size:.5rem; }
.mini-row:last-child{ border-bottom:none; }
.mini-pos{
  width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.75rem; color:#fff; background:var(--ink-soft);
}
.zone-champions .mini-pos, .zone-champions .pos-badge{ background:var(--champions); }
.zone-europa .mini-pos, .zone-europa .pos-badge{ background:var(--europa); }
.zone-conference .mini-pos, .zone-conference .pos-badge{ background:var(--conference); }
.zone-relegation .mini-pos, .zone-relegation .pos-badge{ background:var(--relegation); }
.mini-team{ font-weight:600; }
.mini-pts{ font-family:'JetBrains Mono',monospace; font-weight:700; text-align:right; }

/* ============ FULL LEAGUE TABLE (League Table page) ============ */
/* Structural rules for the two-table split (frozen Pos+Team / scrollable
   rest) — needed at every screen size just to keep them visually
   stitched together as one table, but deliberately desktop-neutral:
   nothing here constrains widths or forces mobile-style narrowing.
   All of that mobile-specific sizing lives in the media query below,
   so normal desktop display is completely unaffected by it. */
.table-wrap{
  display:flex; align-items:flex-start;
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
}
.table-frozen{ flex:none; }
.table-frozen table{ width:auto; min-width:0; border-collapse:collapse; }
.table-frozen th, .table-frozen td, .table-scroll th, .table-scroll td{ vertical-align:middle; }
.table-frozen thead tr, .table-scroll thead tr{ height:44px; }
.table-frozen tbody tr, .table-scroll tbody tr{ height:56px; }
.table-scroll{
  flex:1 1 auto; min-width:0; overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
.table-scroll table{ border-collapse:collapse; }
.table-frozen tbody tr:hover td, .table-scroll tbody tr:hover td,
.table-frozen tbody tr.move-up:hover td, .table-scroll tbody tr.move-up:hover td,
.table-frozen tbody tr.move-down:hover td, .table-scroll tbody tr.move-down:hover td{
  background:transparent;
}
/* Zebra striping caused a visible flicker on these specific tables when
   toggling "Show full stats" — hiding/showing ~5 columns across every
   row in two independently-laid-out tables simultaneously repaints a
   lot of alternating backgrounds, and it didn't settle instantly.
   Dropped here specifically; every other list/table on the site still
   has it. */
.table-frozen tbody tr:nth-child(even), .table-scroll tbody tr:nth-child(even){ background:var(--panel); }
/* ...except Season Form Table specifically, where zebra was requested
   back — higher specificity here (2 classes) correctly wins over the
   general removal above (1 class). */
.form-table-zebra .table-frozen tbody tr:nth-child(even),
.form-table-zebra .table-scroll tbody tr:nth-child(even){ background:var(--chalk); }

/* Everything below is mobile-only — narrow explicit column widths,
   table-layout:fixed, right-aligned numbers, and the shrink-wrapped
   box. None of this applies above 900px, so desktop keeps its normal
   auto-sized, full-width table exactly as it always has. */
@media (max-width:900px){
  .table-wrap{ width:100%; }
  .table-section{ width:100%; }
  .table-scroll{ flex:0 1 auto; }
  body.compact .table-frozen{ flex:1 1 auto; }
  .table-frozen table{ width:100%; }
  .table-scroll table{ table-layout:fixed; min-width:0; }
  body.compact .table-scroll table{ width:160px; }
  body:not(.compact) .table-scroll table{ width:420px; }

  /* Predicted League: Accuracy + Actual Pos are always visible on
     desktop and stay visible in compact mode on mobile too — the goal
     is fitting them within the viewport without scrolling, not hiding
     them. */
  body.compact .has-accuracy.has-actual-pos .table-scroll table{ width:298px; }
  body:not(.compact) .has-accuracy.has-actual-pos .table-scroll table{ width:560px; }

  /* Adjusted Predicted League: Actual Pos only, no Accuracy column. */
  body.compact .has-actual-pos:not(.has-accuracy) .table-scroll table{ width:224px; }
  body:not(.compact) .has-actual-pos:not(.has-accuracy) .table-scroll table{ width:470px; }

  /* Season Form Table: +/- and Next Fixture — Next Fixture alone is
     too wide (190px) to ever fit a phone viewport without scrolling
     even in compact mode, so this one genuinely can't avoid it. */
  body.compact .has-points-diff.has-next-fixture .table-scroll table{ width:378px; }
  body:not(.compact) .has-points-diff.has-next-fixture .table-scroll table{ width:620px; }
  .table-scroll th{ text-align:right; padding-right:16px; }
  .table-scroll td{ text-align:right; padding-right:16px; }
  .table-scroll th, .table-scroll td{ width:44px; font-size:.8125rem; }
  .table-scroll th.col-pts, .table-scroll td.col-pts{ width:56px; }
  .table-scroll th.col-next-fixture, .table-scroll td.next-fixture-cell{ width:190px; }
  .table-scroll th.accuracy-cell, .table-scroll td.accuracy-cell,
  .table-scroll th.actual-pos-cell, .table-scroll td.actual-pos-cell{ width:77px; }
  .actual-pos-badge{ font-size:.6875rem; padding:2px 5px; }
  .accuracy-badge{ font-size:.6875rem; padding:2px 5px; }
  .table-frozen .team-name{
    display:inline-block; overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap; vertical-align:middle;
  }
  body.compact .table-frozen .team-name{ max-width:300px; }
  body:not(.compact) .table-frozen .team-name{ max-width:80px; }
}
table{ width:100%; min-width:640px; border-collapse:collapse; }
thead th{
  position:sticky; top:0; background:var(--panel);
  font-family:'JetBrains Mono',monospace; font-weight:600; font-size:.6875rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-soft); text-align:center; padding:12px 6px; border-bottom:2px solid var(--line);
}
thead th.col-team{ text-align:left; padding-left:14px; }
thead th.col-next-fixture{ text-align:left; padding-left:14px; }
tbody td{
  padding:11px 6px; text-align:center; border-bottom:1px solid var(--line);
  font-family:'JetBrains Mono',monospace; font-size:.875rem; color:var(--ink);
}
tbody tr:nth-child(even){ background:var(--chalk); }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover td{ background:#FAFBF9; }
tbody tr.move-up td{ background:#EAF7EE; }
tbody tr.move-down td{ background:#FDECEB; }
tbody tr.move-up:hover td{ background:#DFF2E4; }
tbody tr.move-down:hover td{ background:#FBE1DF; }
.move-indicator{
  font-size:.6875rem; font-weight:700; margin-left:5px; display:inline-block;
}
.move-up .move-indicator{ color:#2FA37A; }
.move-down .move-indicator{ color:#D2483F; }
td.col-pos{ padding:0; width:52px; }
.pos-badge{
  width:34px; height:34px; margin:0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:50%; font-weight:700; font-size:.9375rem; color:#fff; background:var(--ink-soft);
}
td.col-team{ text-align:left; padding-left:14px; font-family:'Inter',sans-serif; }
.team-row{ display:flex; align-items:center; gap:10px; }
.team-name{ font-weight:600; font-size:.9375rem; }
a.team-name:hover{ text-decoration:underline; }
td.col-pts{ font-weight:700; font-size:1rem; color:var(--ink); }
.table-crest{
  width:26px; height:26px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  font-family:'Oswald',sans-serif; font-weight:600; font-size:.6875rem; color:#fff; background:var(--pitch-light);
}
.table-crest-img{
  width:26px; height:26px; object-fit:contain; flex:none;
}

.table-toolbar{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:12px; gap:12px; flex-wrap:nowrap; width:100%;
}
.table-toolbar h2{
  font-family:'Oswald',sans-serif; font-size:1.05rem; text-transform:uppercase; letter-spacing:.03em; margin:0; color:var(--ink);
}
#stat-toggle{
  font-family:'Inter',sans-serif; font-weight:600; font-size:.8125rem;
  background:var(--panel); border:1px solid var(--line); color:var(--pitch);
  padding:8px 14px; border-radius:999px; cursor:pointer;
}
#stat-toggle:hover{ border-color:var(--pitch); }
body.compact .stat-col{ display:none; }

/* ============ LEAGUE RECORDS ============ */
.form-dots{ display:flex; gap:3px; }
.form-dot{ width:9px; height:9px; border-radius:50%; display:inline-block; }
.form-dot.w{ background:#2FA37A; }
.form-dot.d{ background:#9AA39D; }
.form-dot.l{ background:var(--relegation); }
.form-row{
  display:grid; grid-template-columns:36px 1fr auto 50px; align-items:center; gap:10px;
  padding:8px 16px; border-bottom:1px solid var(--line); font-size:.8125rem;
}
.form-row:last-child{ border-bottom:none; }
.form-row:nth-child(even){ background:var(--chalk); }
.mini-list-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.mini-list-head{ padding:12px 16px; border-bottom:1px solid var(--line); font-family:'Oswald',sans-serif; font-size:.875rem; text-transform:uppercase; letter-spacing:.02em; }
.records-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.record-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:18px; }
.record-card-label{ font-size:.6875rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; margin:0 0 6px; }
.record-card-value{ font-family:'Oswald',sans-serif; font-size:1.25rem; font-weight:600; margin:0 0 4px; }
.record-card-meta{ font-size:.75rem; color:var(--ink-soft); margin:0; }

/* ============ ZONE LEGEND ============ */
.legend{ display:flex; flex-wrap:wrap; gap:16px; margin-top:16px; font-size:.8125rem; color:var(--ink-soft); }
.legend-item{ display:flex; align-items:center; gap:7px; }
.legend-dot{ width:10px; height:10px; border-radius:50%; flex:none; }

.points-diff-cell{ font-weight:700; }
.points-diff-cell.points-diff-pos{ background:#EAF7EE; color:#2FA37A; }
.points-diff-cell.points-diff-neg{ background:#FDECEB; color:#D2483F; }

.deduction-mark{ color:var(--relegation); font-weight:700; margin-left:4px; }
.deduction-footnote{
  margin-top:12px; font-size:.75rem; color:var(--ink-soft);
}
.deduction-footnote p{ margin:2px 0; }

/* ============ EXPLORE CARDS (Home) ============ */
.explore-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.explore-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:block; }
.explore-card:hover{ border-color:var(--pitch); }
.explore-card h3{ font-family:'Oswald',sans-serif; font-size:.9375rem; text-transform:uppercase; letter-spacing:.02em; margin:0 0 6px; }
.explore-card p{ font-size:.8125rem; color:var(--ink-soft); margin:0 0 10px; line-height:1.45; }
.explore-card .go{ font-size:.8125rem; font-weight:700; color:var(--pitch); }

/* ============ HEAD TO HEAD ============ */
.picker-card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px; margin-bottom:26px;
  display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap;
}
.picker-card .field{ display:flex; flex-direction:column; gap:6px; flex:1; min-width:180px; }
.picker-card label{ font-size:.75rem; font-weight:600; color:var(--ink-soft); }
.picker-card select{
  font-family:'Inter',sans-serif; font-size:.9375rem; font-weight:600; color:var(--ink);
  padding:10px 14px; border-radius:8px; border:1px solid var(--line);
  background:var(--panel); cursor:pointer; width:100%;
}
.picker-card select:hover{ border-color:var(--pitch); }
.swap-btn{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--line);
  background:var(--chalk); color:var(--pitch); font-size:1rem; cursor:pointer; flex:none;
}
.swap-btn:hover{ border-color:var(--pitch); }
.compare-btn{
  font-family:'Inter',sans-serif; font-weight:700; font-size:.875rem;
  background:var(--pitch); color:#fff; border:none; border-radius:8px;
  padding:11px 22px; cursor:pointer; flex:none;
}
.compare-btn:hover{ background:var(--pitch-light); }

.h2h-error{
  background:var(--live-bg); color:#8A6A17; border-radius:8px; padding:14px 16px;
  font-size:.875rem; margin-bottom:24px;
}

.summary-card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:22px; margin-bottom:24px;
}
.summary-heading{
  text-align:center; font-family:'Oswald',sans-serif; text-transform:uppercase; letter-spacing:.02em;
  font-size:1.125rem; margin:0 0 18px;
}
.summary-heading .vs{ font-family:'JetBrains Mono',monospace; font-size:.8125rem; color:var(--ink-soft); font-weight:600; }

.record-bar{ display:flex; height:34px; border-radius:8px; overflow:hidden; margin-bottom:10px; }
.record-seg{ display:flex; align-items:center; justify-content:center; color:#fff; font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.875rem; }
.record-seg.a{ background:var(--champions); }
.record-seg.draw{ background:#9AA39D; }
.record-seg.b{ background:var(--relegation); }
.record-labels{ display:flex; justify-content:space-between; font-size:.75rem; color:var(--ink-soft); margin-bottom:22px; }
.record-labels .a-label{ color:var(--champions); font-weight:700; }
.record-labels .b-label{ color:var(--relegation); font-weight:700; }

.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; }
.stat-box{ background:var(--chalk); border-radius:8px; padding:14px; text-align:center; }
.stat-value{ font-family:'JetBrains Mono',monospace; font-weight:700; font-size:1.375rem; color:var(--ink); }
.stat-label{ font-size:.6875rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; margin-top:3px; }

.history-heading{ font-family:'Oswald',sans-serif; font-size:1.05rem; text-transform:uppercase; letter-spacing:.03em; margin:0 0 10px; }
.history-card{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.history-row{
  display:grid; grid-template-columns:100px 1fr auto 1fr; align-items:center;
  gap:10px; padding:12px 16px; border-bottom:1px solid var(--line);
}
.history-row:last-child{ border-bottom:none; }
.hist-meta{ font-family:'JetBrains Mono',monospace; font-size:.75rem; color:var(--ink-soft); }
.hist-league{
  display:block; width:fit-content;
  font-family:'JetBrains Mono',monospace; font-size:.625rem; font-weight:700;
  letter-spacing:.04em; color:var(--ink-soft); background:var(--chalk);
  border:1px solid var(--line); border-radius:5px; padding:2px 6px;
  margin-top:4px;
}
.hist-team{ display:flex; align-items:center; gap:6px; font-size:.875rem; font-weight:600; }
.hist-team.away{ justify-content:flex-end; }
.hist-score{ font-family:'JetBrains Mono',monospace; font-weight:700; font-size:1rem; text-align:center; min-width:48px; }

.history-row-a{ background:#E7F0FE; }
.history-row-draw{ background:#E9EBEA; }
.history-row-b{ background:#FDECEB; }

@media (max-width:600px){
  .history-row{ grid-template-columns:70px 1fr auto 1fr; padding:10px; gap:6px; }
  .hist-team{ font-size:.75rem; }
}

/* ============ FIXTURES & RESULTS: date nav + league groups ============ */
.date-strip{
  display:flex; align-items:center; justify-content:center; gap:14px;
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:14px 16px; margin-bottom:22px;
  box-shadow:0 8px 20px rgba(20,32,25,.08);
}
.date-arrow{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line);
  background:var(--panel); font-size:1rem; color:var(--pitch); text-decoration:none;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.date-arrow:hover{ border-color:var(--pitch); background:var(--chalk); }
.date-arrow.disabled{ color:var(--line); pointer-events:none; }
.date-center{ text-align:center; min-width:180px; }
.date-day{ font-family:'Oswald',sans-serif; font-weight:600; font-size:1.0625rem; text-transform:uppercase; letter-spacing:.02em; }
.date-sub{ font-size:.75rem; color:var(--ink-soft); margin-top:2px; }
.today-jump{
  font-size:.75rem; font-weight:700; color:var(--pitch); background:var(--chalk);
  border:1px solid var(--line); border-radius:999px; padding:5px 12px; text-decoration:none;
  margin-left:6px; font-family:'Inter',sans-serif;
}
.today-jump:hover{ border-color:var(--pitch); }

.league-group{ margin-bottom:22px; }
.league-heading{
  display:flex; align-items:center; gap:8px;
  font-family:'Oswald',sans-serif; font-size:.9375rem; text-transform:uppercase;
  letter-spacing:.03em; color:var(--ink); margin:0 0 10px;
}
.league-count{ font-family:'JetBrains Mono',monospace; font-size:.75rem; color:var(--ink-soft); font-weight:600; }
.no-fixtures-msg{ color:var(--ink-soft); font-size:.875rem; text-align:center; padding:20px; }

/* ============ UTILITIES ============ */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ============ PAST TABLES SELECTOR ============ */
.selector-card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:22px; margin-bottom:24px;
}
.selector-label{
  font-family:'JetBrains Mono',monospace; font-size:.6875rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-soft); margin:0 0 8px;
}
.league-tabs{
  display:inline-flex; background:var(--chalk); border-radius:999px; padding:3px;
  margin-bottom:20px;
}
.league-tab{
  padding:8px 18px; border-radius:999px; font-weight:600; font-size:.8125rem;
  border:none; background:none; cursor:pointer; color:var(--ink-soft);
  font-family:'Inter',sans-serif;
}
.league-tab.active{ background:var(--pitch); color:#fff; }
.select-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.selector-card select{
  font-family:'Inter',sans-serif; font-size:.9375rem; font-weight:600; color:var(--ink);
  padding:10px 14px; border-radius:8px; border:1px solid var(--line);
  background:var(--panel); min-width:180px; cursor:pointer;
}
.selector-card select:hover{ border-color:var(--pitch); }
.selector-card .view-btn{
  font-family:'Inter',sans-serif; font-weight:700; font-size:.875rem;
  background:var(--pitch); color:#fff; border:none; border-radius:8px;
  padding:11px 22px; cursor:pointer;
}
.selector-card .view-btn:hover{ background:var(--pitch-light); }
.recent-label{ font-size:.75rem; font-weight:600; color:var(--ink-soft); margin:20px 0 8px; }
.chip-row{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  font-family:'JetBrains Mono',monospace; font-size:.8125rem; font-weight:600;
  padding:7px 13px; border-radius:999px; border:1px solid var(--line);
  background:var(--chalk); color:var(--ink); cursor:pointer; text-decoration:none;
}
.chip:hover{ border-color:var(--pitch); color:var(--pitch); }

.history-row-current{ background:#EAF7EE; }
.history-row-diff{ grid-template-columns:100px 1fr auto 1fr 50px; }
.points-diff{ font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.875rem; text-align:center; border-radius:6px; padding:4px 0; }
.points-diff-pos{ background:#EAF7EE; color:#2FA37A; }
.points-diff-neg{ background:#FDECEB; color:#D2483F; }

td.next-fixture-cell{ text-align:left; padding:8px 14px; font-size:.75rem; }
.next-fixture-cell-live{ background:#EAF7EE; }
.next-fixture-line{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:2px 0; color:var(--ink); justify-content:flex-start; }
.next-fixture-tag{
  font-family:'JetBrains Mono',monospace; font-size:.625rem; font-weight:700;
  padding:2px 7px; border-radius:999px; background:var(--chalk); color:var(--ink-soft);
  white-space:nowrap; display:inline-flex; align-items:center; gap:4px;
}
.next-fixture-tag-live{ background:var(--live-bg); color:#8A6A17; }
.next-fixture-none{ color:var(--ink-soft); }

.predicted-row{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:12px 16px; border-bottom:1px solid var(--line); font-size:.8125rem;
}
.predicted-row:last-child{ border-bottom:none; }
.predicted-tag{
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.6875rem;
  padding:3px 8px; border-radius:999px; white-space:nowrap;
}
.predicted-row-actual .predicted-tag{ background:var(--chalk); color:var(--ink-soft); }
.predicted-row-future .predicted-tag{ background:var(--live-bg); color:#8A6A17; }
.predicted-tag.predicted-tag-correct{ background:#EAF7EE; color:#2FA37A; }
.predicted-tag.predicted-tag-wrong{ background:#FDECEB; color:#D2483F; }
.predicted-tag-live{ display:inline-flex; align-items:center; gap:5px; background:var(--live-bg); color:#8A6A17; }
.predicted-opponent{ display:inline-flex; align-items:center; gap:6px; font-weight:600; min-width:140px; }
.predicted-score{ font-family:'JetBrains Mono',monospace; font-weight:700; min-width:60px; text-align:center; }
.predicted-probs{ font-family:'JetBrains Mono',monospace; font-size:.75rem; color:var(--ink-soft); flex:1; }
.predicted-pts{ font-family:'JetBrains Mono',monospace; font-weight:700; margin-left:auto; }

.accuracy-cell{ text-align:center; }
.accuracy-badge{
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.8125rem;
  padding:4px 10px; border-radius:999px; background:var(--chalk); color:var(--ink);
  white-space:nowrap;
}
.accuracy-high{ background:#EAF7EE; color:#2FA37A; }
.accuracy-low{ background:#FDECEB; color:#D2483F; }

.overall-accuracy-banner{
  display:flex; align-items:baseline; justify-content:center; gap:10px; flex-wrap:wrap;
  text-align:center;
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 20px; margin-bottom:16px;
}
.overall-accuracy-banner.overall-accuracy-high{ background:#EAF7EE; border-color:#CDEAD5; }
.overall-accuracy-banner.overall-accuracy-low{ background:#FDECEB; border-color:#F5D3D0; }
.overall-accuracy-value{
  font-family:'Oswald',sans-serif; font-weight:700; font-size:1.75rem; color:var(--pitch);
}
.overall-accuracy-banner.overall-accuracy-high .overall-accuracy-value{ color:#2FA37A; }
.overall-accuracy-banner.overall-accuracy-low .overall-accuracy-value{ color:#D2483F; }
.overall-accuracy-label{ font-size:.8125rem; color:var(--ink-soft); }

.actual-pos-cell{ text-align:center; }
.actual-pos-badge{
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:.8125rem;
  padding:4px 10px; border-radius:999px; background:var(--chalk); color:var(--ink);
  display:inline-block; white-space:nowrap;
}
.actual-pos-badge-up{ background:#EAF7EE; color:#2FA37A; }
.actual-pos-badge-down{ background:#FDECEB; color:#D2483F; }

.explainer-panel{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px 22px; margin-top:16px;
}
.explainer-heading{
  font-family:'Oswald',sans-serif; font-size:.9375rem; text-transform:uppercase; letter-spacing:.02em;
  margin:0 0 10px; color:var(--ink);
}
.explainer-panel p{ font-size:.8125rem; color:var(--ink-soft); line-height:1.6; margin:0 0 10px; }
.explainer-panel p:last-child{ margin-bottom:0; }

/* ============ FOOTER (every page) ============ */
.site-footer{ background:var(--panel); border-top:1px solid var(--line); margin-top:34px; }
.site-footer-inner{ max-width:1040px; margin:0 auto; padding:28px 20px 34px; text-align:center; }
.footer-brand{ display:inline-flex; align-items:center; gap:10px; margin-bottom:10px; }
.footer-logo{ height:34px; width:auto; opacity:.9; }
.footer-wordmark{ font-family:'Oswald',sans-serif; font-weight:600; font-size:1.0625rem; letter-spacing:.02em; color:var(--pitch); }
.site-footer-inner p{ margin:0; font-size:.75rem; color:var(--ink-soft); }

@media (max-width:760px){
  .tables-grid{ grid-template-columns:1fr; }
  .explore-grid{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  .fixture-row{ grid-template-columns:52px 1fr auto 1fr; gap:6px; padding:10px; }
  .team{ font-size:.75rem; gap:5px; }
}
