/* ============================================================
   World Cup 2026 — AI Predictions
   Themed on the Waffoo AI brand palette (design-system .dark):
   deep navy surfaces, one blue identity (brand #2C79C6 /
   primary #0074B7 / baby-blue #A3D3ED), one white #F7FAFC.
   Colors only — layout, type, and content unchanged.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Expanded:wght@600;700;800&family=Sometype+Mono:wght@500;600&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  --bg:        #091320;      /* Waffoo dark navy (design-system .dark background) */
  --bg-2:      #070e18;      /* deeper navy — alt rows / depth */
  --panel:     #121d2b;      /* navy card surface */
  --panel-2:   #1e2c3e;
  --panel-3:   #2b3b50;
  --accent:    #5aa3cd;      /* Waffoo blue-500 — brand accent on dark */
  --accent-dk: #2c79c6;      /* blue-600 — brand signature */
  --gold:      #a3d3ed;      /* Waffoo baby-blue (blue-300) — highlight accent */
  --gold-dk:   #7fbbdd;      /* blue-400 */
  --text:      #f7fafc;      /* Waffoo one white */
  --muted:     #a3b6c2;
  --faint:     #657381;
  --border:    #202d3c;
  --border-lt: #2c3d52;
  --bad:       #e0566c;      /* status red — missed pick / negative factor */
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 18px 50px -22px rgba(4,10,18,.8);
  --maxw:      1080px;
  --font-disp: 'Archivo Expanded', 'Arial Narrow', sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'Sometype Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 50% -160px, rgba(90,163,205,.10), transparent 70%),
    radial-gradient(900px 600px at 85% 10%, rgba(163,211,237,.05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #a3d3ed; }

/* ---------- HERO ---------- */
#hero {
  position: relative;
  text-align: center;
  padding: 88px 20px 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(720px 300px at 50% 0%, rgba(90,163,205,.14), transparent 72%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
/* faint pitch lines streaking down from the lights */
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 58px, rgba(255,255,255,.018) 58px 59px);
  pointer-events: none;
}
/* centre spotlight pool */
#hero::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -140px;
  width: 560px; height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(90,163,205,.16), transparent);
  filter: blur(6px);
  pointer-events: none;
}
#hero h1 {
  position: relative;
  margin: 0 auto;
  max-width: 16ch;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: .96;
  letter-spacing: -.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
#hero h1 span {
  display: block;
  margin-top: .18em;
  font-weight: 700;
  background: linear-gradient(92deg, var(--accent), var(--gold) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  position: relative;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: .98rem;
  letter-spacing: .3px;
}
.hero-fav {
  position: relative;
  display: inline-block;
  margin-top: 26px;
  padding: 11px 22px;
  font-family: var(--font-mono);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(163,211,237,.08), rgba(163,211,237,.03));
  border: 1px solid rgba(163,211,237,.32);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 10px 30px -14px rgba(163,211,237,.5);
}

/* ---------- TOP NAV ---------- */
#topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(9,19,32, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text) !important;
}
.brand .logo { height: 28px; width: auto; display: block; flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pred-tag {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: 1.4px;
  color: #fff;
  background: linear-gradient(135deg, #2c79c6, #0074b7);
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.nav-links { display: flex; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
  padding: 7px 14px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--panel-2); }
.nav-link.active { color: var(--bg); background: var(--accent); }

/* ---------- LANDING HERO ---------- */
.hero { text-align: center; padding: 56px 20px 8px; }
.hero h1 {
  margin: 0 auto;
  max-width: 18ch;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: .98;
  letter-spacing: -.5px;
  text-transform: uppercase;
}

/* ---------- LAYOUT ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px 60px;
}
section { margin-top: 56px; }
section:first-child { margin-top: 40px; }

section > h2 {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
section > h2 small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .62em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 6px;
}

.muted { color: var(--muted); }

/* ---------- FLAGS / TEAM CHIP ---------- */
.flag {
  width: 22px; height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  flex: 0 0 auto;
}
.team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* ---------- ODDS TABLE ---------- */
#odds-body {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow);
}
table.odds {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: .92rem;
}
/* the odds table is rendered directly in section#odds (no #odds-body wrapper).
   make the section the horizontal-scroll container so the wide table never
   overflows the page. the h2 stays sticky-left so the heading is always visible. */
#odds { overflow-x: auto; }
#odds > h2 { position: sticky; left: 0; }
#odds > table.odds {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow);
}
table.odds thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-align: right;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-lt);
  white-space: nowrap;
}
table.odds thead th:nth-child(1),
table.odds thead th:nth-child(2) { text-align: left; }
table.odds tbody td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(32,41,58,.6);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
table.odds tbody td:nth-child(1) {
  text-align: left;
  color: var(--faint);
  font-family: var(--font-mono);
  font-weight: 600;
  width: 1%;
}
table.odds tbody td:nth-child(2) { text-align: left; }
table.odds tbody tr {
  cursor: pointer;
  transition: background .15s ease;
}
table.odds tbody tr:hover { background: rgba(90,163,205,.06); }
table.odds tbody tr:hover td:nth-child(2) { color: #fff; }
table.odds td.win {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-mono);
}
/* podium tint for top 3 */
table.odds tbody tr:nth-child(1) td:nth-child(1),
table.odds tbody tr:nth-child(2) td:nth-child(1),
table.odds tbody tr:nth-child(3) td:nth-child(1) { color: var(--gold); }

/* ---------- GROUPS ---------- */
#groups-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.group { padding: 16px 16px 12px; }
.card.group h3 {
  margin: 0 0 12px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gold);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.grow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 -6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .14s ease;
}
.grow:hover { background: rgba(90,163,205,.07); }
.grow .q {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .82rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.grow:first-of-type .q { color: var(--gold); }

/* ---------- BRACKET ---------- */
.bracket {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 14px;
}
.round {
  flex: 0 0 auto;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.round h4 {
  margin: 0 0 2px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-lt);
}
.tie {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .82rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.tie:hover { border-color: var(--accent-dk); transform: translateY(-1px); }
.bteam {
  display: flex;
  align-items: center;
  padding: 3px 4px;
  border-radius: 6px;
  font-size: .8rem;
  opacity: .6;
}
.bteam.adv {
  opacity: 1;
  background: rgba(90,163,205, .10);
  font-weight: 600;
}
.bteam.tbd {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
}

/* ---------- SCHEDULE ---------- */
#schedule-body {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.match {
  display: grid;
  grid-template-columns: 30px 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.match:nth-child(even) { background: var(--bg-2); }
.match:last-child { border-bottom: 0; }
.match .grp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .74rem;
  color: var(--gold);
  background: rgba(163,211,237,.1);
  border: 1px solid rgba(163,211,237,.2);
  border-radius: 7px;
}
.match .team:nth-of-type(1) { justify-self: end; text-align: right; }
.match .team { min-width: 0; }
.match b {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.match .vs {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  color: var(--faint);
}
.match .meta {
  grid-column: 1 / -1;
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

/* ---------- ACCURACY ---------- */
.acc-badge {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: linear-gradient(110deg, rgba(90,163,205,.10), rgba(163,211,237,.04));
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.acc-badge b {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(90,163,205,.35);
}
.acc-badge span { color: var(--muted); font-size: .95rem; }
.acc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}
.acc-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
}
.acc-row b {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}
.acc-row span { color: var(--muted); margin-left: auto; font-size: .78rem; }
.acc-row.hit  { border-left-color: var(--accent); }
.acc-row.miss { border-left-color: var(--bad); }
.acc-row.draw { border-left-color: var(--muted); }
.acc-row.hit  span { color: #7fbbdd; }
.acc-row.miss span { color: #f08496; }
.acc-row.draw span { color: var(--muted); }

/* ---------- HOW IT WORKS ---------- */
#how-body {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 24px;
  box-shadow: var(--shadow);
}
#how-body p { color: var(--text); }
#how-body b { color: var(--accent); font-weight: 600; }

/* ---------- TEAM MODAL ---------- */
dialog#team-modal {
  width: min(640px, 92vw);
  max-width: 640px;
  max-height: 85vh;
  overflow: auto;
  padding: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
}
dialog#team-modal::backdrop {
  background: rgba(4,7,12,.7);
  backdrop-filter: blur(4px);
}
#team-modal-body { padding: 24px 26px 6px; }
#team-modal-body h3 {
  margin: 0 0 12px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1.3rem;
}
#team-modal-body h3 .flag { width: 30px; height: 21px; }
#team-modal-body h4 {
  margin: 22px 0 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}
.blurb { color: var(--muted); font-size: .92rem; }
.factors { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.bar {
  display: grid;
  grid-template-columns: 56px 1fr 40px;
  align-items: center;
  gap: 10px;
}
.bar span {
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.bar i {
  display: block;
  height: 8px;
  min-width: 3px;
  border-radius: 999px;
  box-shadow: 0 0 14px -2px currentColor;
}
.bar b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .8rem;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
table.squad {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin-bottom: 10px;
}
table.squad th {
  text-align: left;
  padding: 7px 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-lt);
  position: sticky; top: 0;
  background: var(--panel-2);
}
table.squad td {
  padding: 7px 9px;
  border-bottom: 1px solid rgba(32,41,58,.55);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
table.squad tr:hover td { background: rgba(90,163,205,.05); }

dialog#team-modal form {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px 26px;
  background: linear-gradient(0deg, var(--panel), transparent);
  border-top: 1px solid var(--border);
}
dialog#team-modal form button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .88rem;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
dialog#team-modal form button:hover { background: #5aa3cd; }
dialog#team-modal form button:active { transform: scale(.97); }

/* ---------- FOOTER ---------- */
footer {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 30px 20px 50px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .84rem;
}

/* ---------- VIEW TOGGLE (segmented) ---------- */
.view-toggle {
  display: flex;
  gap: 4px;
  max-width: 560px;
  margin: 28px auto 36px;
  padding: 5px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.vtab {
  flex: 1 1 0;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 10px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.vtab:hover { color: var(--text); }
.vtab.active {
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 8px 22px -10px rgba(90,163,205,.7);
}

.lview { display: none; }
.lview.active { display: block; }
.lview > section:first-child { margin-top: 0; }

/* ---------- DATE VIEW ---------- */
.dateday { margin-bottom: 30px; }
.dayhead {
  margin: 0 0 12px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.daymatches {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.daymatches .match {
  grid-template-columns: 1fr auto 1fr;
  border-bottom: 1px solid var(--border);
}
.daymatches .match:last-child { border-bottom: 0; }
.daymatches .match .tlink { display: inline-flex; }
.daymatches .match .tlink:first-of-type { justify-self: end; text-align: right; }
.daymatches .match .tlink .team { color: var(--text); }
.daymatches .match.sched { opacity: .94; }
.match .score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  padding: 0 6px;
}
.match .ko {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 6px;
}
a.tlink { color: inherit; }
a.tlink:hover .team { color: #fff; }

/* ---------- GROUP VIEW ---------- */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.card.gstandings { padding: 16px 14px 12px; }
table.gtable {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
table.gtable thead th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .64rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: 6px 7px;
  border-bottom: 1px solid var(--border-lt);
}
table.gtable thead th:nth-child(1),
table.gtable thead th:nth-child(2) { text-align: left; }
table.gtable tbody td {
  padding: 7px;
  text-align: right;
  border-bottom: 1px solid rgba(32,41,58,.55);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  color: var(--text);
}
table.gtable td.tm { text-align: left; font-family: var(--font-body); }
table.gtable td.rk { text-align: left; color: var(--faint); width: 1%; }
table.gtable td.pts { color: var(--accent); font-weight: 700; }
table.gtable td.tm .team { font-size: .85rem; }
table.gtable tbody tr:last-child td { border-bottom: 0; }
table.gtable tbody tr.qual td {
  background: rgba(90,163,205,.06);
}
table.gtable tbody tr.qual td.rk {
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--accent);
}
table.gtable td.tm a.tlink:hover .team { color: #fff; }

/* ---------- KNOCKOUT BRACKET TREE ---------- */
.bracket-tree {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 18px;
}
.bside { display: flex; gap: 14px; }
.bcol {
  flex: 0 0 auto;
  min-width: 92px;
  display: flex;
  flex-direction: column;
}
.bcol h4 {
  margin: 0 0 12px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .64rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--border-lt);
  white-space: nowrap;
}
.bcol-ties {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1 1 auto;
  gap: 10px;
}
.bracket-tree .tie {
  gap: 3px;
  padding: 5px 6px;
  min-width: 88px;
}
.bracket-tree .bteam {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: .74rem;
  opacity: .55;
  color: var(--text);
}
.bracket-tree .bteam .babbr {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .4px;
}
.bracket-tree .bteam.adv {
  opacity: 1;
  background: rgba(90,163,205,.12);
  font-weight: 700;
}
.bracket-tree .bteam.adv .babbr { color: var(--accent); }
.bracket-tree .bteam:hover { opacity: 1; }

/* center column */
.bcenter {
  min-width: 168px;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 0 6px;
}
.bcenter h4 {
  color: var(--gold);
  border-bottom-color: rgba(163,211,237,.3);
  width: 100%;
}
.trophy { margin: 14px 0 10px; filter: drop-shadow(0 6px 18px rgba(163,211,237,.4)); }
.finaltie { width: 100%; }
.finaltie .tie {
  border-color: var(--gold-dk);
  background: linear-gradient(180deg, rgba(163,211,237,.08), var(--panel));
  min-width: 120px;
}
.champ {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.champ-label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.champ-team {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(163,211,237,.1), rgba(163,211,237,.03));
  border: 1px solid rgba(163,211,237,.35);
  border-radius: 999px;
  box-shadow: 0 10px 30px -14px rgba(163,211,237,.6);
}
.champ-team .flag { width: 26px; height: 19px; }
.champ-team:hover { color: #c2e1f3; }

/* ---------- TEAMS GRID ---------- */
.teams-sub { margin: -8px 0 22px; }
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  color: var(--text) !important;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.team-card:hover { border-color: var(--accent-dk); transform: translateY(-2px); }
.tc-flag .flag { width: 40px; height: 28px; border-radius: 5px; }
.tc-name {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -.2px;
}
.tc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.tc-group {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(163,211,237,.1);
  border: 1px solid rgba(163,211,237,.2);
  padding: 3px 8px;
  border-radius: 6px;
}
.tc-win {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- TEAM DETAIL ---------- */
.team-detail { margin-top: 24px; }
.team-head { margin-bottom: 22px; }
.back-link { font-size: .85rem; font-family: var(--font-mono); }
.th-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.th-flag .flag { width: 64px; height: 45px; border-radius: 7px; }
.th-name {
  margin: 0;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.5px;
}
.th-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: .92rem;
}
.detail-card { padding: 20px 22px; margin-bottom: 18px; }
.dc-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}

/* prediction odds */
.odds-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.odds-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.os-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.odds-stat:first-child .os-val { color: var(--gold); }
.os-label {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-card .blurb { margin: 16px 0 0; font-size: .92rem; }

/* group standing row */
table.standing-row {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.standing-row th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .64rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-lt);
}
table.standing-row td {
  padding: 12px 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
table.standing-row td.sr-pos {
  color: var(--gold);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
table.standing-row td.sr-pts { color: var(--accent); font-weight: 700; }

/* key players */
.key-players {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
}
.key-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 110px;
  gap: 8px;
}
.player-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
  border: 2px solid var(--gold-dk);
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.7);
}
.kp-name { font-weight: 600; font-size: .86rem; line-height: 1.15; }
.kp-meta {
  font-size: .72rem;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.squad-wrap { overflow-x: auto; }
table.squad td.sq-name { font-family: var(--font-body); }
table.squad tr.is-key td { background: rgba(163,211,237,.05); }
.key-dot { color: var(--gold); font-size: .8em; }

/* fixtures lists */
.fx-list { display: flex; flex-direction: column; gap: 8px; }
.fx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
}
.fx-res {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .74rem;
  border-radius: 6px;
  flex: 0 0 auto;
}
.res-W { color: var(--accent); background: rgba(90,163,205,.14); }
.res-L { color: var(--bad); background: rgba(224,85,107,.14); }
.res-D { color: var(--muted); background: var(--panel-2); }
.fx-score {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.fx-ko {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--gold);
  white-space: nowrap;
}
.fx-meta { margin-left: auto; font-size: .76rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-sub { margin: -6px 0 22px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .15s ease;
}
.faq-item[open] { border-color: var(--border-lt); }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 18px;
  position: relative;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: clamp(.95rem, 2vw, 1.05rem);
  color: var(--text);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--gold); }
.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
  transition: transform .15s ease;
}
.faq-item[open] > summary::after { content: "−"; }
.faq-answer {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
}
.faq-answer p { margin: 14px 0 0; color: var(--muted); }
.faq-answer strong { color: var(--text); }
.faq-answer a { color: var(--accent); }

/* ---------- ABOUT ---------- */
.about-card { padding: 26px 26px 28px; max-width: 720px; }
.about-head {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.photo-placeholder {
  flex: 0 0 auto;
  width: 140px; height: 140px;
  border: 2px dashed var(--border-lt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  color: var(--faint);
  font-size: .82rem;
  background: var(--panel-2);
}
.about-intro { flex: 1 1 240px; }
.about-intro h3 {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin: 0 0 10px;
}
.about-intro p { margin: 0; color: var(--muted); }
.about-sub {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gold);
  margin: 26px 0 8px;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--border-lt);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
  font-size: .88rem;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.social-link:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- RESPONSIVE: NAV ---------- */
@media (max-width: 560px) {
  #topnav { gap: 12px; padding: 10px 14px; }
  .nav-link { font-size: .84rem; padding: 6px 10px; }
}
@media (max-width: 480px) {
  .brand-name { display: none; }
  #topnav { gap: 10px; padding: 10px 12px; }
  .nav-links { gap: 4px; }
  .nav-link { font-size: .82rem; padding: 6px 9px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .about-head { gap: 16px; }
  .about-card { padding: 18px 16px 20px; }
  .photo-placeholder { width: 120px; height: 120px; }
  .teams-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .odds-stats { grid-template-columns: repeat(2, 1fr); }
  .th-flag .flag { width: 48px; height: 34px; }
  .detail-card { padding: 16px 14px; }
  .fx-meta { margin-left: 0; flex-basis: 100%; }
  .view-toggle { margin: 20px auto 26px; }
  .vtab { font-size: .68rem; padding: 9px 4px; }
  .group-grid { grid-template-columns: 1fr; }
  .bracket-tree { justify-content: flex-start; }
  #hero { padding: 60px 16px 44px; }
  main { padding: 20px 14px 40px; }
  section { margin-top: 44px; }
  #groups-body { grid-template-columns: 1fr; }
  .acc-list { grid-template-columns: 1fr; }
  .match {
    grid-template-columns: 26px 1fr auto 1fr;
    gap: 8px;
    font-size: .84rem;
  }
  .match .meta { grid-column: 1 / -1; }
  .daymatches .match { grid-template-columns: 1fr auto 1fr; }
  dialog#team-modal { width: 94vw; }
  #team-modal-body { padding: 18px 16px 4px; }
  table.squad { font-size: .76rem; }
}

/* ---------- DATE-VIEW MATCH BANNERS (star player + flag behind) ---------- */
.daymatches .match {
  position: relative;
  display: block;
  grid-template-columns: none;
  padding: 0;
  min-height: 182px;
  overflow: hidden;
  background: var(--panel);
}
.daymatches .match:nth-child(even) { background: var(--bg-2); }

/* each side holds an angled flag backdrop + the star player portrait */
.daymatches .match .mside {
  position: absolute;
  top: 0; bottom: 0;
  width: 44%;
  z-index: 0;
  overflow: hidden;
}
.daymatches .match .mside.mleft  { left: 0; }
.daymatches .match .mside.mright { right: 0; }

/* the flag: a vibrant angled wedge from the outer edge, faded toward centre */
.daymatches .match .mflag {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .92;
  filter: saturate(1.1);
}
.daymatches .match .mside.mleft .mflag {
  clip-path: polygon(0 0, 100% 0, 64% 100%, 0 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 24%, transparent 98%);
          mask-image: linear-gradient(to right, #000 0%, #000 24%, transparent 98%);
}
.daymatches .match .mside.mright .mflag {
  clip-path: polygon(36% 0, 100% 0, 100% 100%, 0 100%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 24%, transparent 98%);
          mask-image: linear-gradient(to left, #000 0%, #000 24%, transparent 98%);
}

/* the star: a portrait crop (head + shoulders), anchored to the outer edge,
   feathered into the flag on its inner edge */
.daymatches .match .mstar {
  position: absolute;
  top: 0; bottom: 0;
  height: 100%;
  width: clamp(140px, 42%, 220px);
  object-fit: cover;
  object-position: center top;
}
.daymatches .match .mside.mleft .mstar {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 58%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 58%, transparent 100%);
}
.daymatches .match .mside.mright .mstar {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 58%, transparent 100%);
          mask-image: linear-gradient(to left, #000 0%, #000 58%, transparent 100%);
}

/* centre darkening so the score / names stay readable over the photos */
.daymatches .match::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(9,19,32,.5) 28%, rgba(9,19,32,.86) 50%, rgba(9,19,32,.5) 72%, transparent 100%),
    linear-gradient(180deg, rgba(9,19,32,.15), transparent 26%, transparent 64%, rgba(9,19,32,.55));
}

/* foreground: the original score + flags + names, unchanged */
.daymatches .match .mcore {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 182px;
  padding: 16px 16px 52px;
}
.daymatches .match .mcore .team { text-shadow: 0 1px 8px rgba(0,0,0,.95); }
.daymatches .match .mcore .score,
.daymatches .match .mcore .ko { text-shadow: 0 1px 10px rgba(0,0,0,1); }
/* stacked footer: group/venue + the model's prediction */
.daymatches .match .mcore .mbelow {
  grid-column: 1 / -1;
  position: absolute;
  left: 0; right: 0; bottom: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.daymatches .match .mcore .meta {
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,.95);
}
.mpred {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .2px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(9,19,32, .68);
  border: 1px solid var(--border-lt);
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  white-space: nowrap;
}
.mpred strong { font-weight: 700; }
.mpred.ok   { color: var(--accent); border-color: rgba(90,163,205,.4); }
.mpred.no   { color: var(--bad);    border-color: rgba(224,85,107,.4); }
.mpred.draw { color: var(--gold);   border-color: rgba(163,211,237,.35); }
.mpred.sched{ color: var(--text); }
.mpred.sched strong { color: var(--accent); }
@media (max-width: 560px) {
  .daymatches .match { min-height: 168px; }
  .daymatches .match .mcore { min-height: 168px; gap: 8px; padding-bottom: 50px; }
  .daymatches .match .mside { width: 50%; }
  .daymatches .match .mstar { width: clamp(120px, 56%, 180px); }
  .mpred { font-size: .68rem; white-space: normal; text-align: center; }
}

.hero-sub {
  max-width: 62ch;
  margin: 14px auto 4px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}
.hero-sub strong { color: var(--accent); }

/* ---------- LIVE RESULTS: knockout / schedule / odds reconciliation ---------- */
/* pens / AET note on a scoreline */
.match .pen, .match .score .pen {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .5px;
  color: var(--gold);
  vertical-align: middle;
}

/* bracket: played vs pending ties, scores, TBD, decision note */
.bracket-note { margin: 0 0 16px; font-size: .82rem; }
.tie .bteam { position: relative; }
.tie .bteam.tbd { opacity: .45; }
.tie .bteam .bscore {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .82rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tie .bteam.adv .bscore { color: var(--accent); }
.tie.pending .bteam:not(.tbd) { opacity: .9; }
.tie .bnote {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .4px;
  color: var(--gold);
  margin-top: 1px;
}
.champ-pred { display: block; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.champ-pred a { color: var(--accent); }

/* odds table: eliminated teams greyed out */
.odds-note { margin: -6px 0 14px; font-size: .82rem; }
table.odds tr.elim { opacity: .42; }
table.odds tr.elim .win { color: var(--muted); }
.outtag {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--bad);
  border: 1px solid var(--bad);
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: middle;
}

/* group view: qualified third-place tag */
.q3tag {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--accent);
}

/* accuracy list: cap height and scroll (now dozens of games) */
.acc-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

/* secondary accuracy badges (exact score / goal difference) */
.acc-badge.sub {
  margin-top: 10px;
  opacity: .92;
}
.acc-badge.sub b { font-size: 1.05rem; color: var(--gold); }
.acc-badge.sub span { font-size: .8rem; }

/* ---------- DATE VIEW: collapsible round sections ---------- */
.roundsec {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  overflow: hidden;
}
.roundsec summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s;
}
.roundsec summary::-webkit-details-marker { display: none; }
.roundsec summary:hover { background: var(--panel-2); }
.rs-arrow {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);          /* points right when closed */
  transition: transform .18s ease;
  margin-top: -2px;
}
.roundsec[open] > summary .rs-arrow { transform: rotate(45deg); } /* points down */
.rs-title {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.rs-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .4px;
  color: var(--muted);
  white-space: nowrap;
}
.roundsec .rs-body { padding: 4px 14px 16px; }
.roundsec .dateday { margin-bottom: 22px; }
.roundsec .dateday:last-child { margin-bottom: 4px; }
@media (max-width: 560px) {
  .roundsec summary { padding: 12px 12px; }
  .rs-meta { font-size: .62rem; }
  .roundsec .rs-body { padding: 2px 8px 10px; }
}

/* live odds: movement arrows vs pre-tournament */
#live-odds { margin-bottom: 40px; }
.delta { font-size: .68rem; vertical-align: middle; }
.delta.up { color: var(--accent); }
.delta.down { color: var(--bad); }

/* undecided side of a scheduled knockout game ("France / Morocco", "TBD") */
.tbdteam {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
  border: 1px dashed var(--border-lt);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* predicted score on a team page's upcoming fixtures */
.fx-pred {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--accent);
  white-space: nowrap;
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  padding: 2px 7px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
