:root {
  --green: #0b6e4f;
  --green-dark: #064e3a;
  --gold: #e3b23c;
  --bg: #f4f6f5;
  --card: #ffffff;
  --ink: #1c2421;
  --muted: #6b7a74;
  --line: #e2e8e5;
  --adv: #0b6e4f;
  --third: #e3b23c;
  --out: #c2cbc7;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }
/* the hidden attribute must win even over display:flex/grid containers */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--green); }

/* ── top bar ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(100deg, var(--green-dark), var(--green));
  color: #fff; padding: .7rem 1.2rem; box-shadow: var(--shadow);
}
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem;
  display: inline-flex; align-items: center; gap: .45rem; }
.brand .ball { font-size: 1.3rem; }
.brand .hosts { font-size: .9rem; opacity: .9; margin-left: .3rem; }
.topbar nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.topbar nav a {
  color: #eafff6; text-decoration: none; padding: .35rem .8rem;
  border-radius: 999px; font-weight: 600; font-size: .92rem;
}
.topbar nav a:hover { background: rgba(255, 255, 255, .14); }
.topbar nav a.active { background: var(--gold); color: #3a2c06; }

main { max-width: 1180px; margin: 0 auto; padding: 1.3rem 1.1rem 2.5rem; }
footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.5rem; }

.hero h1 { margin: .2rem 0 .15rem; font-size: 1.6rem; }
.subtle { color: var(--muted); margin: 0 0 1rem; }
code { background: #eef2f0; padding: .05rem .35rem; border-radius: 4px; font-size: .85em; }

/* ── match cards ─────────────────────────────────────── */
.match-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.match {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .9rem; box-shadow: var(--shadow);
}
.match.finished { border-left: 3px solid var(--green); }
.match-meta { display: flex; justify-content: space-between; align-items: baseline;
  color: var(--muted); font-size: .8rem; margin-bottom: .5rem; }
.match-meta .round { font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .03em; }
.match-meta small { opacity: .7; }
.match-teams .row { display: flex; justify-content: space-between; align-items: center;
  padding: .2rem 0; }
.team { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.team.placeholder { color: var(--muted); font-weight: 500; font-style: italic; }
.flag { font-size: 1.15rem; }
.flag-img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12); vertical-align: middle; flex: 0 0 auto; }
.group-table .tname .flag-img, .match .flag-img { margin-right: .1rem; }
.score { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 1.2em; text-align: right; }
.score .pens { font-weight: 700; font-size: .72rem; color: var(--muted); }
/* a knockout settled on penalties: highlight the winning side and the shootout score */
.match-teams .row.win .name { color: var(--green-dark); }
.match-teams .row.win .score { color: var(--green); }
.match-pens { color: var(--muted); font-size: .78rem; margin-top: .4rem; font-weight: 600; }
.match-venue { color: var(--muted); font-size: .8rem; margin-top: .55rem; border-top: 1px dashed var(--line); padding-top: .45rem; }

.empty, .loading { color: var(--muted); }

/* ── quick links ─────────────────────────────────────── */
.quicklinks { display: flex; flex-wrap: wrap; justify-content: center;
  gap: .9rem; margin-top: 1.6rem; }
.card-link { flex: 0 1 240px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .08s; }
.card-link:hover { transform: translateY(-2px); border-color: var(--green); }
.card-link h3 { margin: 0 0 .25rem; }
.card-link p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ── groups ──────────────────────────────────────────── */
.legend { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .25rem; vertical-align: middle; }
.dot.adv { background: var(--adv); } .dot.third { background: var(--third); } .dot.out { background: var(--out); }

.groups-grid { display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.group-table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: .9rem; }
.group-table caption { text-align: left; font-weight: 800; padding: .6rem .8rem; background: var(--green-dark); color: #fff; }
.group-table th { font-size: .72rem; color: var(--muted); text-transform: uppercase; padding: .45rem .3rem; border-bottom: 1px solid var(--line); }
.group-table td { padding: .42rem .3rem; text-align: center; border-bottom: 1px solid var(--line); }
.group-table tr:last-child td { border-bottom: none; }
.group-table .tname { text-align: left; font-weight: 600; white-space: nowrap; }
.group-table .tname .flag { margin-right: .35rem; }
.group-table .pos { color: var(--muted); width: 1.6rem; }
.group-table .pts { font-weight: 800; }
.group-table tr.adv .pos { box-shadow: inset 3px 0 0 var(--adv); }
.group-table tr.third .pos { box-shadow: inset 3px 0 0 var(--third); }
.group-table tr.out { color: var(--muted); }
.check { color: var(--green); font-weight: 800; }

/* ── bracket (graphical) ─────────────────────────────── */
.bracket-toolbar { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center;
  justify-content: space-between; margin-bottom: .6rem; }
.bt-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font-size: .8rem; align-items: center; }
.bt-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.swatch { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }
.swatch.adv { background: var(--adv); } .swatch.third { background: var(--third); }
.line-key { width: 1.4rem; height: 0; border-top-width: 2px; border-top-style: solid; display: inline-block; }
.line-key.feed { border-color: #9bb9c9; border-top-style: dashed; }
.line-key.win { border-color: var(--green); }
.bt-zoom { display: flex; align-items: center; gap: .4rem; }
.bt-zoom button { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--green-dark); box-shadow: var(--shadow); }
.bt-zoom button:hover { background: var(--green); color: #fff; }
.bt-zoom button.fit { width: auto; padding: 0 .7rem; font-size: .85rem; }
.bt-zoom input[type=range] { width: 120px; accent-color: var(--green); }

.bracket-viewport { position: relative; overflow: hidden; height: 76vh; min-height: 460px;
  border: 1px solid var(--line); border-radius: 12px; background:
    radial-gradient(circle, #e7ede9 1px, transparent 1px) 0 0 / 22px 22px, var(--card);
  box-shadow: var(--shadow); cursor: grab; touch-action: none; }
.bracket-viewport.grabbing { cursor: grabbing; }
.bracket-inner { position: relative; display: flex; gap: 2.4rem; align-items: stretch;
  width: max-content; padding: 1rem; transform-origin: top left; will-change: transform; }
.bracket-links { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 0; overflow: visible; }
.bracket-links .lnk { fill: none; stroke-width: 2; }
.bracket-links .lnk.win { stroke: var(--green); opacity: .55; }
.bracket-links .lnk.loss { stroke: var(--gold); opacity: .5; stroke-dasharray: 4 4; }
.bracket-links .lnk.feed { stroke: #9bb9c9; opacity: .5; stroke-dasharray: 3 4; }

.bcol { position: relative; z-index: 1; display: flex; flex-direction: column;
  justify-content: space-around; gap: .5rem; flex: 0 0 auto; width: 184px; }
.bcol.rail { width: 210px; }
.bcol.final-col { justify-content: center; gap: 2rem; }
.bcol-head { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800;
  color: var(--green-dark); text-align: center; padding: .25rem; background: rgba(255,255,255,.85);
  border-radius: 7px; }
.bcol-head.third-head { color: #9a7b1e; }
.bcol-head.champ-head { background: var(--gold); color: #3a2c06; font-size: .9rem; }
.bcol.final-col { width: 200px; }
.bcol.final-col .bmatch { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.bcol.final-col .bmatch.is-third { box-shadow: var(--shadow); }
.bm-side .flag-img { margin-right: .1rem; }

.bmatch { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; position: relative; }
.bmatch.finished { border-left: 3px solid var(--green); }
.bmatch.is-third { border-left: 3px solid var(--gold); }
.bm-no { position: absolute; top: 3px; right: 6px; font-size: .62rem; color: var(--muted); font-weight: 700; }
.bm-side { display: flex; align-items: center; gap: .4rem; padding: .38rem .5rem; font-weight: 600; font-size: .86rem; }
.bm-side + .bm-side { border-top: 1px solid var(--line); }
.bm-side .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-side .score { font-weight: 800; font-variant-numeric: tabular-nums; }
.bm-side.tbd { color: var(--muted); font-style: italic; font-weight: 500; font-size: .8rem; }
.bm-side.win .name { color: var(--accent, #0a7d2c); }
.bm-side.win .score { color: var(--accent, #0a7d2c); }
.bm-side .score .pens { font-weight: 700; font-size: .72rem; color: var(--muted); }
.bm-foot { font-size: .68rem; color: var(--muted); padding: .28rem .5rem; background: #fafbfa; border-top: 1px dashed var(--line); }

/* group rail tables */
.mini-group { width: 100%; border-collapse: collapse; font-size: .8rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden; box-shadow: var(--shadow); }
.mini-group caption { font-weight: 800; text-align: left; color: #fff; background: var(--green-dark); padding: .3rem .5rem; }
.mini-group td { padding: .22rem .4rem; border-bottom: 1px solid var(--line); }
.mini-group .pos { width: 1.2rem; color: var(--muted); }
.mini-group .tname { display: flex; align-items: center; gap: .3rem; max-width: 140px; }
.mini-group .tname .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-group .pts { text-align: right; font-weight: 700; }
.mini-group tr.adv .pos { box-shadow: inset 3px 0 0 var(--adv); }
.mini-group tr.third .pos { box-shadow: inset 3px 0 0 var(--third); }
.mini-group tr.out { color: var(--muted); }
.mini-group .feed-note { font-size: .64rem; color: var(--muted); background: #fafbfa; border-bottom: none; text-align: left; line-height: 1.5; }
.mini-group .feed-note b { color: var(--green-dark); }

.bracket-hint { margin-top: .5rem; font-size: .8rem; text-align: center; }

/* ── map ─────────────────────────────────────────────── */
.day-controls { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 1rem; }
.day-controls button { font-size: 1.4rem; line-height: 1; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--green-dark); box-shadow: var(--shadow); }
.day-controls button:hover { background: var(--green); color: #fff; }
.day-controls .today-btn { width: auto; border-radius: 1.1rem; padding: 0 .85rem; font-size: .78rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.day-controls .today-btn:disabled { opacity: .45; cursor: default; }
.day-controls .today-btn:disabled:hover { background: var(--card); color: var(--green-dark); }
.day-readout { flex: 1; }
.day-readout input[type=range] { width: 100%; accent-color: var(--green); }
.day-label { text-align: center; font-weight: 700; color: var(--green-dark); margin-top: .15rem; }

.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; }
#map { height: 540px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 0; }
.day-panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .8rem; max-height: 540px; overflow-y: auto; }
.day-panel h3 { margin: .1rem 0 .6rem; color: var(--green-dark); }
.day-panel ul { list-style: none; margin: 0; padding: 0; }
.day-panel li { border: 1px solid var(--line); border-radius: 9px; padding: .5rem .6rem; margin-bottom: .55rem; cursor: pointer; }
.day-panel li:hover { border-color: var(--green); background: #f7fbf9; }
.ml-top { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.ml-tag { font-weight: 700; color: var(--green-dark); text-transform: uppercase; }
.ml-teams { font-weight: 600; margin: .2rem 0; }
.ml-teams em { color: var(--muted); font-style: normal; }
.ml-score { font-weight: 800; }
.ml-venue { font-size: .78rem; color: var(--muted); }
.pop-city { color: #ccc; font-size: .8rem; }
.pop-match { margin: .2rem 0; font-size: .85rem; }
.pop-tag { font-weight: 700; color: var(--green); }

/* ── open-vs-covered stadium note ──── */
.pop-roof { margin-top: .25rem; }
.roof { display: inline-block; font-size: .7rem; font-weight: 700; line-height: 1;
  padding: 2px 6px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.roof-open { color: #1f6f4a; background: rgba(35, 180, 120, .16);
  border: 1px solid rgba(35, 180, 120, .45); }
.roof-covered { color: #6a4bb0; background: rgba(126, 92, 214, .16);
  border: 1px solid rgba(126, 92, 214, .45); }
.ml-venue .roof { margin-left: .25rem; }

/* ── daily-map flag pins (who's playing, at a glance) ──── */
.fp-wrap { background: none; border: none; }
.fp-pin { position: relative; display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 1px solid #cfd8d3; border-radius: 8px;
  padding: 4px 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .28); }
.fp-row { display: flex; align-items: center; justify-content: center; gap: 5px; }
.fp-flag { width: 26px; height: 18px; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); display: block; }
.fp-v { font-size: 9px; font-weight: 700; color: #8a9a93; text-transform: uppercase; }
.fp-tbd { width: 26px; height: 18px; display: inline-flex; align-items: center;
  justify-content: center; background: #e7edea; color: #90a29a; font-size: 12px;
  font-weight: 700; border-radius: 2px; }
.fp-stem { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 7px solid #fff; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

/* undecided knockout side on the pin: the favourite's flag, dimmed, with a "?" */
.fp-maybe { position: relative; display: inline-flex; }
.fp-maybe .fp-flag { opacity: .55; }
.fp-maybe .fp-q { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800;
  font-style: normal; color: #fff; background: var(--green, #1f6f4a); border-radius: 50%;
  box-shadow: 0 0 0 1px #fff; }

/* undecided knockout side in the side panel: "may play" cluster */
.ml-maybe { display: inline-flex; flex-direction: column; gap: 1px; vertical-align: middle; }
.ml-maybe-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; color: var(--muted); }
.ml-cands { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .1rem .3rem; font-weight: 600; }
.ml-cand { display: inline-flex; align-items: center; }
.ml-cand-p { margin-left: .2rem; font-size: .72rem; font-weight: 700; color: var(--green-dark); }
.ml-or { font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.pop-maybe { font-weight: 600; }

/* ── site-wide live ticker ─────────────────────────────── */
.live-ticker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  background: #fff5f5; border: 1px solid #f3c9c5; border-left: 4px solid #d0432f;
  border-radius: 10px; padding: .5rem .85rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.lt-label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; color: #d0432f;
  text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.lt-dot { width: 9px; height: 9px; border-radius: 50%; background: #d0432f; display: inline-block;
  animation: lt-pulse 1.4s infinite; }
@keyframes lt-pulse {
  0% { box-shadow: 0 0 0 0 rgba(208,67,47,.55); }
  70% { box-shadow: 0 0 0 7px rgba(208,67,47,0); }
  100% { box-shadow: 0 0 0 0 rgba(208,67,47,0); }
}
.lt-match { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; }
.lt-teams { display: inline-flex; align-items: center; gap: .2rem; }
.lt-score { font-weight: 800; }
.lt-min { font-weight: 700; color: #d0432f; font-size: .8rem; }
.lt-tag { color: var(--muted); font-size: .74rem; }
.lt-match + .lt-match { border-left: 1px solid #eccfca; padding-left: 1rem; }

/* live state on Today-page match cards */
.match.live { box-shadow: 0 0 0 2px rgba(208,67,47,.25), var(--shadow); }
.mc-live { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; color: #d0432f;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
/* extra time (JOE-37): amber instead of the regulation red */
.lt-min.et, .mc-live.et { color: #b06000; }

/* ── daily-map weather ─────────────────────────────────── */
.fp-row .wx { font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; margin-left: 2px; }
.ml-wx { font-size: .8rem; color: var(--ink); margin-top: .25rem; background: var(--bg);
  border-radius: 6px; padding: .25rem .45rem; line-height: 1.35; }
.ml-wx.wx-na { color: var(--muted); font-style: italic; background: none; padding: .15rem 0; }
.wx-kind { float: right; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--green-dark); }

.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; }
.unit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.unit-toggle button { border: none; background: #fff; color: var(--muted); cursor: pointer;
  padding: .3rem .8rem; font-weight: 700; font-size: .85rem; }
.unit-toggle button + button { border-left: 1px solid var(--line); }
.unit-toggle button.active { background: var(--green); color: #fff; }
.temp-legend { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.temp-legend .tl-cap { font-weight: 700; color: var(--ink); white-space: nowrap; }
.temp-legend .tl-scale { display: inline-flex; flex-direction: column; gap: 1px; }
.temp-legend .tl-bar { width: 150px; height: 11px; border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  /* OWM temp_new palette anchors: 0°C cyan → 30°C orange */
  background: linear-gradient(to right,
    rgb(35,221,221) 0%, rgb(194,255,40) 33.3%, rgb(255,240,40) 66.7%,
    rgb(255,194,40) 83.3%, rgb(252,128,20) 100%); }
.temp-legend .tl-ticks { display: flex; justify-content: space-between; width: 150px;
  font-size: .68rem; font-weight: 600; color: var(--muted); }
/* isobar (pressure) legend: same layout as the temp legend, OWM pressure palette */
.iso-legend .tl-bar {
  /* OWM pressure_new palette: ~940 hPa (low, blue) → ~1060 hPa (high, red) */
  background: linear-gradient(to right,
    rgb(106,90,205) 0%, rgb(47,143,214) 16.7%, rgb(75,208,214) 33.3%,
    rgb(141,231,199) 50%, rgb(176,247,32) 58.3%, rgb(240,184,0) 66.7%,
    rgb(251,85,21) 83.3%, rgb(243,0,0) 100%); }

.live-layers { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .5rem .8rem; margin: 0 0 .9rem; box-shadow: var(--shadow); font-size: .85rem; }
.live-layers .ll-title { font-weight: 700; color: var(--green-dark); }
.live-layers label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.live-layers label.disabled { opacity: .45; cursor: not-allowed; }
.live-layers input { accent-color: var(--green); }
.live-layers .ll-hint { color: var(--muted); font-size: .78rem; }

/* advisory popups */
.adv { max-width: 260px; font-size: .82rem; line-height: 1.4; }
.adv-sev { display: inline-block; color: #fff; font-weight: 700; font-size: .68rem; text-transform: uppercase;
  border-radius: 5px; padding: .05rem .35rem; margin-bottom: .25rem; }
.adv-head { color: var(--ink); font-weight: 600; margin: .15rem 0; }
.adv-exp { color: var(--muted); font-size: .76rem; }
.adv-desc { margin-top: .3rem; max-height: 140px; overflow: auto; color: #333; }
.adv-src { margin-top: .3rem; font-size: .74rem; color: var(--muted); }

/* ── all-games (schedule) map ─────────────────────────── */
.sched-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem .8rem; margin-bottom: .9rem; box-shadow: var(--shadow); font-size: .82rem; }
.leg-item { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); }
.leg-dot { width: .8rem; height: .8rem; border-radius: 50%; display: inline-block; }
.leg-note { color: var(--muted); margin-left: auto; font-style: italic; }

.sched-layout { display: grid; grid-template-columns: 1fr 260px; gap: 1rem; }
.sched-side { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: .8rem .9rem; align-self: start; }
.sched-side h3 { margin: .1rem 0 .6rem; color: var(--green-dark); font-size: 1rem; }
.stage-filter { list-style: none; margin: 0; padding: 0; }
.stage-filter li { margin: .25rem 0; }
.stage-filter label { display: flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .9rem; }
.stage-filter input { accent-color: var(--green); }
.stage-n { color: var(--muted); font-size: .8rem; }
.sched-tip { font-size: .78rem; margin: .7rem 0 0; }

.venue-badge-wrap { background: none; border: none; }
.venue-badge { border-radius: 50%; box-shadow: 0 0 0 2px #fff, var(--shadow);
  display: flex; align-items: center; justify-content: center; }
.venue-badge.dim { opacity: .45; }
.venue-badge .venue-count { background: #fff; color: var(--ink); font-weight: 800; font-size: .72rem;
  border-radius: 50%; width: 56%; height: 56%; display: flex; align-items: center; justify-content: center; }

.pop-count { color: var(--green); font-weight: 700; font-size: .8rem; margin-top: .1rem; }
.pop-when { font-weight: 600; }
.pop-swatch { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; margin-right: .35rem; vertical-align: middle; }
.pop-match { margin: .35rem 0; font-size: .82rem; line-height: 1.4; }

/* ── follow-a-team map ─────────────────────────────────── */
.team-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem .8rem; margin-bottom: .9rem; box-shadow: var(--shadow); font-size: .82rem; }
.date-legend { display: inline-flex; align-items: center; gap: .5rem; }
.dl-bar { width: 180px; height: 11px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.dl-label { color: var(--ink); font-weight: 600; }
.dl-note { color: var(--muted); }
.line-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; }
.ll-label { color: var(--muted); font-weight: 600; }
.ll-item { display: inline-flex; align-items: center; gap: .3rem; }
.ll-line { width: 16px; height: 3px; border-radius: 2px; }

.tm-head { display: flex; align-items: center; justify-content: space-between; }
.tm-count { color: var(--green); font-weight: 700; }
.tm-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  border-radius: 7px; padding: .2rem .6rem; font-size: .78rem; font-weight: 600; }
.tm-btn:hover { background: var(--bg); }
.tm-search { width: 100%; box-sizing: border-box; margin: .5rem 0 .6rem;
  border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .85rem; }
.team-list { max-height: 460px; overflow-y: auto; padding-right: .2rem; }
.tg { margin-bottom: .5rem; }
.tg-h { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: .2rem .1rem; position: sticky; top: 0; background: var(--card); }
.tm-item { display: flex; align-items: center; gap: .45rem; padding: .25rem .35rem; border-radius: 7px;
  cursor: pointer; font-size: .88rem; }
.tm-item:hover { background: var(--bg); }
.tm-item.on { background: #eef6f2; font-weight: 600; }
.tm-item input { accent-color: var(--green); }
.tm-name { flex: 1; }
.tm-empty { padding: .4rem .1rem; }

/* team-map pins: each match is a full date-colored band (reuses .fp-* pin chrome) */
.tp-pin { padding: 0; gap: 0; background: #fff; }
.tp-band { padding: 4px 7px; gap: 5px; }
.tp-band + .tp-band { border-top: 1px solid rgba(255, 255, 255, .55); }
.tp-band:first-child { border-radius: 7px 7px 0 0; }
.tp-band:last-child { border-radius: 0 0 7px 7px; }
.tp-band:only-child { border-radius: 7px; }
.tp-band .fp-v { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .45); }
/* kickoff-weather chip sits on the saturated date band -> white for contrast */
.tp-band .wx { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .5); }

/* directional arrows along the route line */
.rt-arrow-wrap { background: none; border: none; }
.rt-arrow { width: 15px; height: 15px; line-height: 0; }
.rt-arrow svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

@media (max-width: 760px) {
  .map-layout { grid-template-columns: 1fr; }
  #map { height: 380px; }
  .sched-layout { grid-template-columns: 1fr; }
  .sched-legend .leg-note { margin-left: 0; }
  .team-list { max-height: 280px; }
  .dl-bar { width: 120px; }
}

/* ── predictions: bracket projection toolbar ───────────── */
.bt-pred { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bt-pred .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bt-pred .seg button { border: none; background: #fff; color: var(--muted); cursor: pointer;
  padding: .25rem .7rem; font-weight: 700; font-size: .82rem; }
.bt-pred .seg button + button { border-left: 1px solid var(--line); }
.bt-pred .seg button.active { background: var(--green); color: #fff; }
.depth-wrap { font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.depth-wrap select { border: 1px solid var(--line); border-radius: 7px; padding: .2rem .4rem; font-size: .8rem; }
.depth-wrap select:disabled { opacity: .5; }
.pred-link { font-size: .82rem; font-weight: 600; color: var(--green-dark); text-decoration: none; }
.pred-link:hover { text-decoration: underline; }

/* predicted teams in the bracket */
.bm-side.predicted { font-style: italic; }
/* a "decided" side is a real team already qualified into an unplayed knockout
   match (e.g. every R32 pairing once the groups finish). It's steerable like a
   projection, but it isn't a guess — keep it upright with no confidence badge. */
.bm-side.predicted.decided { font-style: normal; }
.bm-side.predicted .name { color: var(--ink); }
.bm-side.predicted .conf { margin-left: auto; font-size: .72rem; font-weight: 700; font-style: normal;
  color: #fff; background: var(--green); border-radius: 5px; padding: 0 .3rem; }
.bmatch.has-pred { outline: 1px dashed var(--green); outline-offset: 1px; }

/* interactive manipulation: click a projected team to force it to advance.
   NOTE: the inner element is <div class="bracket-inner" id="binner"> — the
   `projecting` class is toggled on it, so these must key off `.bracket-inner`
   (an earlier `.binner...` typo matched nothing, so picks looked unclickable). */
/* the WHOLE projected box is a pick target (the thin team rows are only ~10px
   tall at the default zoom, so requiring a precise hit felt like nothing worked) */
.bracket-inner.projecting .bmatch.has-pred { cursor: pointer; }
.bracket-inner.projecting .bm-side.predicted { cursor: pointer; }
.bracket-inner.projecting .bmatch.has-pred:hover { outline-color: var(--green-dark);
  box-shadow: 0 0 0 2px rgba(11,110,79,.35), var(--shadow); }
.bracket-inner.projecting .bm-side.predicted:hover {
  background: rgba(11,110,79,.12); box-shadow: inset 0 0 0 1px var(--green); }
/* a forced pick: solid fill (legible even when the bracket is zoomed right out,
   where a small badge would vanish) so the user always sees their click landed */
.bm-side.predicted.locked { background: var(--green); font-style: normal; }
.bm-side.predicted.locked .name { font-weight: 800; color: #fff; }
.bm-side.predicted.locked .conf { background: #fff; color: var(--green-dark); }
.bm-side.predicted .lock { margin-left: .25rem; font-size: .8rem; font-weight: 900;
  line-height: 1; color: #fff; }
/* box-level marker for the match that holds a forced pick: a thick coloured rail
   reads at any zoom, unlike the per-row tint */
.bmatch.forced { box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
/* flash a box when a pick moves it (or when it's the one just clicked) so a
   re-projection is never silent — works even on the tiny, zoomed-out boxes */
@keyframes pickflash {
  0%   { box-shadow: 0 0 0 0 rgba(11,110,79,.0), var(--shadow); }
  20%  { box-shadow: 0 0 0 4px rgba(11,110,79,.65), 0 0 14px 4px rgba(11,110,79,.55); }
  100% { box-shadow: 0 0 0 0 rgba(11,110,79,.0), var(--shadow); }
}
.bmatch.flash { animation: pickflash 1.1s ease-out 1; }
.pick-reset { border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: .25rem .6rem; font-weight: 700; font-size: .8rem; cursor: pointer; }
.pick-reset:not(:disabled):hover { border-color: var(--green); color: var(--green-dark); }
.pick-reset:disabled { opacity: .45; cursor: default; }
.pick-hint { margin: .1rem 0 .6rem; display: flex; align-items: flex-start; gap: .5rem;
  background: rgba(11,110,79,.08); border: 1px solid rgba(11,110,79,.3);
  border-radius: 8px; padding: .5rem .7rem; font-size: .85rem; line-height: 1.4; }
.pick-hint .ph-ico { font-size: 1rem; line-height: 1.3; }
/* live status line for the projection (loading / applied / empty / error) */
.pick-status { margin: -.3rem 0 .6rem; font-size: .82rem; font-weight: 600; }
.pick-status.loading { color: var(--muted); }
.pick-status.ok { color: var(--green-dark); }
.pick-status.warn { color: #8a6d00; }
.pick-status.error { color: #b3261e; }

/* floating confirmation for picks. Fixed to the window (not the viewport) so it
   is visible wherever the user has scrolled — the bracket viewport is taller than
   the window, so a toast anchored to it could sit below the fold, which is exactly
   why earlier picks felt like they "did nothing". */
.pick-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 50; max-width: min(92vw, 640px); margin: 0; pointer-events: none;
  background: var(--green-dark); color: #fff; font-size: .85rem; font-weight: 600;
  line-height: 1.35; padding: .55rem .9rem; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.28); text-align: center; }
.pick-toast.loading { background: #455; }
.pick-toast.warn { background: #8a6d00; }
.pick-toast.error { background: #b3261e; }

/* interactive manipulation: click a projected team to force it to advance.
   (The clickable cursor/hover rules live above, keyed off the real
   `.bracket-inner.projecting` class. The old short-class duplicates matched
   nothing and have been removed.) */
.bm-side.predicted.locked { background: rgba(11,110,79,.14); font-style: normal; }
.bm-side.predicted.locked .name { font-weight: 800; }
.bm-side.predicted .lock { margin-left: .25rem; font-size: .72rem; line-height: 1; }
.pick-reset { border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: .25rem .6rem; font-weight: 700; font-size: .8rem; cursor: pointer; }
.pick-reset:not(:disabled):hover { border-color: var(--green); color: var(--green-dark); }
.pick-reset:disabled { opacity: .45; cursor: default; }
.pick-hint { margin: .1rem 0 .4rem; }

/* ── predictions page ──────────────────────────────────── */
.pred-meta { color: var(--muted); font-size: .85rem; margin: .2rem 0 1rem; }
.odds-wrap { overflow-x: auto; }
.odds-table { width: 100%; border-collapse: collapse; font-size: .86rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.odds-table th, .odds-table td { padding: .45rem .6rem; text-align: center; border-bottom: 1px solid var(--line); }
.odds-table th { background: var(--bg); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.odds-table .ot-team { text-align: left; font-weight: 600; white-space: nowrap; }
.odds-table tbody tr:last-child td { border-bottom: none; }
.odds-table .ot-win { position: relative; font-weight: 800; min-width: 90px; }
.odds-table .ot-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(11,110,79,.16); z-index: 0; }
.odds-table .ot-val { position: relative; z-index: 1; }
/* teams out of title contention: dimmed row, name struck through (JOE-43) */
.odds-table tr.ot-out td { color: var(--muted); }
.odds-table tr.ot-out .ot-team { font-weight: 500; }
.odds-table tr.ot-out .ot-name { text-decoration: line-through; }
.odds-table tr.ot-out .flag-img { filter: grayscale(1); opacity: .6; }
.odds-table tr.ot-out .ot-bar { background: rgba(120,120,120,.12); }
.ot-elim { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 .28em;
  vertical-align: 1px; }

.group-odds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin: .6rem 0 1.5rem; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; box-shadow: var(--shadow); }
.gcard h3 { margin: 0 0 .4rem; font-size: .9rem; }
.grow { display: flex; align-items: center; gap: .4rem; margin: .25rem 0; font-size: .82rem; }
.grow .gt { flex: 0 0 42%; display: inline-flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.grow .gbar { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.grow .gbar i { display: block; height: 100%; background: var(--green); }
.grow .gp { flex: 0 0 2.6em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.gnote { font-size: .72rem; color: var(--muted); margin-top: .35rem; }

/* AI pundit panel */
.pundit-h .exp { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: #a06bd0; border-radius: 5px; padding: .1rem .35rem; vertical-align: middle; }
.pundit-controls { display: flex; gap: .5rem; align-items: center; margin: .4rem 0 .8rem; }
.pundit-controls select { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; font-size: .88rem; }
.pundit-out { min-height: 1rem; }
.pundit-na { color: var(--muted); font-style: italic; background: var(--bg); border-radius: 8px; padding: .6rem .8rem; }
.pundit-title { font-weight: 800; margin-bottom: .5rem; }
.pcache { font-size: .66rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3rem; }
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.pcard { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #a06bd0; border-radius: 9px; padding: .55rem .7rem; box-shadow: var(--shadow); }
.pname { font-weight: 700; font-size: .84rem; margin-bottom: .25rem; }
.plean { color: var(--green-dark); }
.ptake { font-size: .85rem; line-height: 1.4; }
.pconsensus { margin-top: .7rem; background: #f3eefa; border: 1px solid #e1d4f2; border-radius: 9px; padding: .6rem .8rem; font-size: .88rem; line-height: 1.45; }
.pundit-wait { font-style: italic; }

/* pundit cost budget chip */
.pundit-budget { font-size: .76rem; color: var(--muted); }
.pundit-budget .pb { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .15rem .45rem; }
.pundit-budget .pb.over { color: #b3261e; border-color: #f0c2bd; background: #fdeceb; font-weight: 700; }
.pundit-na.limited { color: #b3261e; background: #fdeceb; border: 1px solid #f0c2bd; }

/* ── what-if scenario mapper (MiroFish-style branch map) ── */
.wi-ask textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line);
  border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .92rem;
  background: var(--card); resize: vertical; }
.wi-ask-row { display: flex; gap: .6rem; align-items: center; margin: .4rem 0 .6rem; }
.wi-examples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.wi-chip { border: 1px solid var(--line); background: var(--bg); color: inherit;
  border-radius: 999px; padding: .22rem .7rem; font-size: .78rem; cursor: pointer; }
.wi-chip:hover { border-color: #a06bd0; color: #7a49a8; }
.wi-out { min-height: 1rem; }
.wi-reading { font-size: .9rem; }

/* The map itself: a top-down tree drawn with flex rows + border connectors.
 * Wide answers scroll horizontally rather than squashing the node cards. */
.wi-map { overflow-x: auto; padding-bottom: .5rem; }
.wi-tree, .wi-tree ul { display: flex; justify-content: center; list-style: none;
  margin: 0; padding: 0; position: relative; }
/* Size the tree to its content: a centered flex row wider than the scrollport
 * overflows both sides, and the left half can't be scrolled to. With
 * width:max-content the overflow all lands on the (scrollable) right, while
 * min-width keeps narrow trees centered. */
.wi-tree { width: max-content; min-width: 100%; box-sizing: border-box; }
.wi-tree ul { padding-top: 18px; }
.wi-tree li { display: flex; flex-direction: column; align-items: center;
  position: relative; padding: 18px 5px 0; }
.wi-tree > li { padding-top: 0; }
/* connector from a node up to its parent */
.wi-tree li::before, .wi-tree li::after { content: ''; position: absolute; top: 0;
  right: 50%; width: 50%; height: 18px; border-top: 2px solid var(--line); }
.wi-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.wi-tree li:only-child::before, .wi-tree li:only-child::after { display: none; }
.wi-tree li:only-child { padding-top: 0; }
.wi-tree li:first-child::before, .wi-tree li:last-child::after { border-top: none; }
.wi-tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 8px 0 0; }
.wi-tree li:first-child::after { border-radius: 8px 0 0 0; }
.wi-tree > li::before, .wi-tree > li::after { display: none; }
/* stem from a parent down to its children row */
.wi-tree ul::before { content: ''; position: absolute; top: 0; left: 50%;
  width: 0; height: 18px; border-left: 2px solid var(--line); }

.wi-node { width: 220px; background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid #a06bd0; border-radius: 9px; padding: .5rem .65rem;
  box-shadow: var(--shadow); text-align: left; }
.wi-node.wi-root { width: 300px; border-top-color: var(--green); }
.wi-node-head { font-weight: 700; font-size: .84rem; line-height: 1.3; }
.wi-node-sum { font-size: .78rem; line-height: 1.4; margin-top: .3rem; }
.wi-node-impact { font-size: .7rem; color: var(--green-dark); font-weight: 600; margin-top: .3rem; }
.wi-prob { display: flex; align-items: center; gap: .35rem; margin-top: .3rem; }
.wi-prob .wi-bar { flex: 1; max-width: 120px; height: 6px; background: var(--bg);
  border-radius: 3px; overflow: hidden; }
.wi-prob .wi-bar i { display: block; height: 100%; background: #a06bd0; }
.wi-prob b { font-size: .74rem; font-variant-numeric: tabular-nums; }

/* ── methodology modal ───────────────────────────────── */
.meth-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--card); color: var(--green-dark);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .32rem .8rem; font-size: .85rem; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow); white-space: nowrap;
}
.meth-btn:hover { border-color: var(--green); }
.meth-btn .qm {
  display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem;
  border-radius: 50%; background: var(--green); color: #fff; font-size: .72rem; font-weight: 800;
}

body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(12, 24, 20, .55);
  display: none; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
}
/* show only when not [hidden] — keeps the `hidden` attribute authoritative so
   close (and the initial hidden state) actually work with a flex container */
.modal-overlay:not([hidden]) { display: flex; }
.modal-card {
  position: relative; background: var(--card); color: var(--ink);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  max-width: 760px; width: 100%; margin: auto;
}
.modal-close {
  position: absolute; top: .5rem; right: .6rem;
  background: transparent; border: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--muted); padding: .1rem .35rem;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 1.6rem 1.8rem 2rem; }

.meth h2 { margin: 0 0 .3rem; font-size: 1.45rem; }
.meth h3 {
  margin: 1.5rem 0 .5rem; font-size: 1.05rem; color: var(--green-dark);
  border-top: 1px solid var(--line); padding-top: 1rem;
}
.meth h3:first-of-type { border-top: none; padding-top: 0; }
.meth p, .meth li { font-size: .92rem; line-height: 1.55; }
.meth .meth-lead { font-size: .98rem; color: var(--ink); }
.meth .meth-note { color: var(--muted); font-size: .86rem; }
.meth ol, .meth ul { padding-left: 1.2rem; }
.meth li { margin: .35rem 0; }
.meth code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: .05rem .3rem; font-size: .85em;
}
.meth .formula {
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: 8px; padding: .7rem .9rem; margin: .7rem 0;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.7;
  overflow-x: auto;
}
.meth .formula-inline {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: .03rem .25rem;
}
.meth-limits li::marker { color: var(--gold); }

/* ── form tracker (dynamic-Elo movers) ───────────────── */
.form-track { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .6rem 0 1.4rem; }
.ft-col { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; }
.ft-col h3 { margin: 0 0 .5rem; font-size: .9rem; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; }
.ft-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  gap: .5rem; padding: .28rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.ft-row:first-of-type { border-top: none; }
.ft-t { display: inline-flex; align-items: center; gap: .15rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ft-d { font-weight: 700; font-variant-numeric: tabular-nums; }
.ft-d.up { color: var(--green); }
.ft-d.down { color: #c2362f; }
.ft-e { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; min-width: 2.6rem; text-align: right; }
@media (max-width: 560px) { .form-track { grid-template-columns: 1fr; } }

/* ── Golden Boot tracker ─────────────────────────────────────────────────── */
.gb-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem;
  margin: 0 0 .9rem; }
.gb-leadwrap { font-size: 1.05rem; }
.gb-leader { font-weight: 800; color: var(--green-dark); }
.gb-leader .flag { margin-right: .25rem; }
.gb-leadwrap strong { color: var(--gold); }
.gb-sub { color: var(--muted); font-size: .85rem; }

.gb-controls { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; }
.gb-toggle-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.gb-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.gb-tab { border: none; background: none; padding: .35rem .9rem; cursor: pointer;
  font-weight: 700; font-size: .82rem; color: var(--muted); }
.gb-tab.active { background: var(--gold); color: #3a2c06; }
.gb-tab:hover:not(.active) { background: rgba(11, 110, 79, .08); color: var(--green-dark); }

.gb-wrap { overflow-x: auto; }
.gb-table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.gb-table th { font-size: .72rem; color: var(--muted); text-transform: uppercase;
  padding: .55rem .5rem; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.gb-table th.who, .gb-table th.team { text-align: left; }
.gb-table td { padding: .5rem .5rem; border-bottom: 1px solid var(--line); text-align: center;
  font-variant-numeric: tabular-nums; }
.gb-table tr:last-child td { border-bottom: none; }
.gb-table .pos { color: var(--muted); width: 2rem; font-weight: 700; }
.gb-table .who { text-align: left; font-weight: 600; white-space: nowrap; }
.gb-table .who .flag { margin-right: .35rem; }
.gb-table .team { text-align: left; color: var(--muted); white-space: nowrap; }
.gb-table .goals { font-weight: 800; font-size: 1.05rem; }
.gb-table .pen { color: var(--muted); }
.gb-table .proj { color: var(--green); font-weight: 700; }
.gb-table .projtot { font-weight: 800; color: var(--green-dark); }

.gb-table tr.contention .pos { box-shadow: inset 3px 0 0 var(--third); }
.gb-table tr.leader { background: rgba(227, 178, 60, .12); }
.gb-table.by-proj tr.leader { background: rgba(11, 110, 79, .10); }
.cbadge { display: inline-block; font-size: .62rem; text-transform: uppercase; letter-spacing: .03em;
  background: rgba(227, 178, 60, .22); color: #6b5210; padding: .05rem .35rem; border-radius: 999px;
  vertical-align: middle; margin-left: .15rem; }

.gb-note { margin-top: .8rem; font-size: .82rem; }
.gb-empty { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 2.4rem 1rem; text-align: center; box-shadow: var(--shadow); }
.gb-empty .big { font-size: 1.3rem; font-weight: 800; color: var(--green-dark); margin: 0 0 .3rem; }

@media (max-width: 560px) {
  .gb-table .team { max-width: 6rem; overflow: hidden; text-overflow: ellipsis; }
}
