:root {
  color-scheme: light;
  --bg: #e9ebee;
  --card: #ffffff;
  --card-2: #f4f5f7;
  --ink: #0b0d10;
  --ink-2: #4a515c;
  --ink-3: #8a919c;
  --line: #dfe2e6;
  --hot: #d4ff3a;
  --hot-ink: #0b0d10;
  --cold: #ff5a3c;
  --blue: #2f5bff;
  --draw: #b9bec6;
  --shadow: 0 1px 0 rgba(11, 13, 16, 0.04);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d11;
    --card: #14171d;
    --card-2: #1b1f27;
    --ink: #f1f3f6;
    --ink-2: #aeb5c0;
    --ink-3: #6f7784;
    --line: #242933;
    --draw: #4a515c;
    --blue: #6c8bff;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d11;
  --card: #14171d;
  --card-2: #1b1f27;
  --ink: #f1f3f6;
  --ink-2: #aeb5c0;
  --ink-3: #6f7784;
  --line: #242933;
  --draw: #4a515c;
  --blue: #6c8bff;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 700px) { .wrap { padding: 0 14px; } }
.num { font-variant-numeric: tabular-nums; }
.d { font-family: var(--display); }

/* top bar ------------------------------------------------------------ */
.bar { background: var(--ink); color: var(--bg); }
:root[data-theme="dark"] .bar { background: #000; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar { background: #000; color: var(--ink); } }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.logo b { background: var(--hot); color: var(--hot-ink); padding: 3px 6px 2px; border-radius: 4px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs a { font: 600 17px/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; padding: 9px 12px; border-radius: 8px; opacity: 0.62; white-space: nowrap; }
.tabs a:hover { opacity: 1; }
.tabs a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.fresh { font-size: 13px; opacity: 0.7; white-space: nowrap; }
.fresh i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); margin-right: 7px; }
.mode { background: none; border: 0; cursor: pointer; opacity: 0.7; font-size: 13px; padding: 6px; }
.mode:hover { opacity: 1; }
@media (max-width: 700px) {
  .bar .wrap { height: auto; flex-wrap: wrap; gap: 6px 14px; padding-top: 12px; padding-bottom: 8px; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -8px; }
  .tabs a { font-size: 16px; padding: 8px; }
  .fresh { margin-left: auto; }
  .mode { display: none; }
}

main { padding: 26px 0 60px; }

/* headline ----------------------------------------------------------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 6px 0 22px; }
.hero h1 { font: 700 clamp(34px, 5vw, 54px)/0.95 var(--display); letter-spacing: -0.005em; margin: 0; text-transform: uppercase; }
.hero h1 em { font-style: normal; background: var(--hot); color: var(--hot-ink); padding: 0 8px; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow); }
.chip b { color: var(--ink); font-weight: 600; }

h2 { font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin: 34px 0 14px; display: flex; align-items: baseline; gap: 12px; }
h2 a { font: 500 14px var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-3); text-decoration: none; margin-left: auto; }
h2 a:hover { color: var(--ink); }
h3 { font: 700 19px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin: 0 0 8px; }

/* grid + cards -------------------------------------------------------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 700px) { .grid, .grid.two { grid-template-columns: 1fr; gap: 10px; } }
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); position: relative; min-width: 0; }
a.card { text-decoration: none; display: block; transition: transform 0.12s ease; }
a.card:hover { transform: translateY(-2px); }
.card.flat { background: var(--card-2); box-shadow: none; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.small { font-size: 13px; }

/* team badges -------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; font: 700 13px/1 var(--display); letter-spacing: 0.02em; flex: none; }
.badge.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.teams .t { display: flex; align-items: center; gap: 10px; font: 600 18px/1.1 var(--display); text-transform: uppercase; min-width: 0; }
.teams .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teams .t.r { flex-direction: row-reverse; text-align: right; }
.teams .vs { font: 500 13px var(--sans); color: var(--ink-3); }
.when { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; display: flex; justify-content: space-between; }

/* 3-way bar ------------------------------------------------------------ */
.bar3 { display: flex; gap: 3px; height: 12px; margin: 14px 0 6px; }
.bar3 i { display: block; height: 100%; }
.bar3 i:first-child { border-radius: 6px 0 0 6px; }
.bar3 i:last-child { border-radius: 0 6px 6px 0; }
.bar3 i.dr { background: var(--draw); }
.pcts { display: flex; justify-content: space-between; font: 700 24px/1 var(--display); }
.pcts span:nth-child(2) { color: var(--ink-3); }
.pcts small { font: 500 12px var(--sans); color: var(--ink-3); display: block; margin-top: 3px; letter-spacing: 0; }
.pcts span:last-child { text-align: right; }

.kv { display: flex; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.kv b { font: 700 17px var(--display); color: var(--ink); margin-left: 4px; }

/* tags --------------------------------------------------------------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 5px 8px; border-radius: 6px; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.tag.hot { background: var(--hot); color: var(--hot-ink); }
.tag.cold { background: rgba(255, 90, 60, 0.14); color: var(--cold); }

/* signal cards --------------------------------------------------------- */
.sig { display: flex; flex-direction: column; gap: 12px; }
.sig .what { font: 700 26px/1 var(--display); text-transform: uppercase; }
.sig .prices { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.sig .prices > div { background: var(--card-2); border-radius: 10px; padding: 10px; }
.sig .prices .l { font-size: 12px; color: var(--ink-3); }
.sig .prices .v { font: 700 28px/1.05 var(--display); }
.sig .prices .v.edge { color: var(--hot-ink); }
.sig .prices > .e { background: var(--hot); }
.sig .prices .e .l { color: var(--hot-ink); opacity: 0.7; }
.sig .why { font-size: 14px; color: var(--ink-2); }
.sig .why b { color: var(--ink); font-weight: 600; }

/* finding cards ----------------------------------------------------- */
.find .big { font: 700 64px/0.9 var(--display); letter-spacing: -0.01em; margin: 6px 0 8px; }
.find .big small { font-size: 26px; }
.find p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.find p b { color: var(--ink); font-weight: 600; }

/* empty / notice ---------------------------------------------------- */
.notice { background: var(--card); border-radius: var(--r); padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.notice .dot { width: 44px; height: 44px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font: 700 22px var(--display); }
.notice p { margin: 0; color: var(--ink-2); }
.notice b { color: var(--ink); }

/* tables (deep-dive tabs only) -------------------------------------- */
.tbl { background: var(--card); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { font: 600 12px/1 var(--sans); color: var(--ink-3); text-align: left; padding: 14px 12px 10px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--card-2); }
td .team { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.pos { color: #11a36a; }
.neg { color: var(--cold); }
.hl { background: var(--hot); color: var(--hot-ink); padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* segmented control ------------------------------------------------- */
.seg { display: inline-flex; background: var(--card); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--shadow); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* charts -------------------------------------------------------------- */
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg text { font-family: var(--sans); font-size: 11px; fill: var(--ink-3); }
svg .grid { stroke: var(--line); stroke-width: 1; }
svg .zero { stroke: var(--ink-3); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 4px 0 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* heatmap -------------------------------------------------------------- */
.heat { display: grid; gap: 3px; font: 600 12px var(--display); }
.heat .c { aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; background: var(--card-2); }
.heat .h { display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }

/* position strip ----------------------------------------------------- */
.pd { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; height: 18px; min-width: 150px; }
.pd i { border-radius: 2px; background: var(--card-2); }

/* bars in cards ------------------------------------------------------ */
.hbar { display: grid; grid-template-columns: 70px 1fr 54px; gap: 10px; align-items: center; font-size: 13px; margin: 5px 0; }
.hbar .track { height: 10px; background: var(--card-2); border-radius: 5px; position: relative; overflow: hidden; }
.hbar .track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; }
.hbar .track b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); border-radius: 1px; }
.hbar .v { text-align: right; font: 700 16px var(--display); }

/* prose ------------------------------------------------------------- */
.prose { max-width: 740px; font-size: 16px; line-height: 1.6; }
.prose h2 { margin-top: 38px; }
.prose p, .prose li { color: var(--ink-2); }
.prose b { color: var(--ink); }
.prose code, .eq { font: 13px ui-monospace, Menlo, monospace; }
.eq { background: var(--card); border-radius: 10px; padding: 14px 16px; white-space: pre; overflow-x: auto; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; max-width: 300px; white-space: pre-line; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
footer { padding: 40px 0 44px; color: var(--ink-3); font-size: 13px; }
footer a { color: var(--ink-2); }
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-3); text-decoration: none; font-size: 14px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* AFCON ---------------------------------------------------------------- */
.flag { width: 30px; height: 30px; object-fit: contain; flex: none; }
.flag.sm { width: 22px; height: 22px; }
.teams .sc { font: 700 30px/1 var(--display); text-align: center; min-width: 58px; font-variant-numeric: tabular-nums; }
.teams .sc.v { font: 500 13px var(--sans); color: var(--ink-3); min-width: 0; }
.tag.live { background: var(--cold); color: #fff; }

.am .kv { align-items: center; }
h3.day { font-size: 16px; color: var(--ink-2); margin: 18px 0 10px; }
h3.day:first-of-type { margin-top: 0; }
.grid.groups { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 700px) { .grid.groups { grid-template-columns: 1fr; } }
.grp .gr { display: grid; grid-template-columns: minmax(0, 1fr) 14px 24px 66px 34px 34px; gap: 6px; align-items: center; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); }
.grp .gr.hd { border-top: 0; font-size: 11.5px; color: var(--ink-3); padding: 0 0 4px; }
.grp .tm { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.grp .tm > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp .n { text-align: right; font-variant-numeric: tabular-nums; }
.grp .n.b { font-weight: 700; }
.grp .n.hl { padding: 1px 4px; }
.grp .q { display: flex; align-items: center; gap: 6px; }
.grp .q .t { flex: 1; height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.grp .q .t i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.grp .q .n { width: 32px; flex: none; }
.grp .host { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--card-2); border-radius: 5px; padding: 2px 6px; }
details.more > summary { cursor: pointer; font: 700 18px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink-2); margin: 18px 0 12px; }
details.more > summary:hover { color: var(--ink); }
.results { padding: 8px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); column-gap: 36px; }
@media (max-width: 700px) { .results { grid-template-columns: 1fr; } }
.res { display: grid; grid-template-columns: 22px minmax(0, 1fr) 54px minmax(0, 1fr) 84px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 600; }

.res .g { font: 700 13px var(--display); color: var(--ink-3); }
.res .h, .res .a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.res .h { justify-content: flex-end; }
.res .h > span, .res .a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .s { font: 700 22px/1 var(--display); text-align: center; font-variant-numeric: tabular-nums; }
.res .f { font-size: 12.5px; color: var(--ink-3); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .res { grid-template-columns: 16px minmax(0, 1fr) 46px minmax(0, 1fr); } .res .f { display: none; } }

/* live ------------------------------------------------------------------ */
.fresh i.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .fresh i.pulse { animation: none; } }
.card.is-live { box-shadow: inset 0 0 0 2px var(--cold); }
.teams .t i.red { display: inline-block; width: 9px; height: 12px; border-radius: 2px; background: #e11d2a; flex: none; font: 700 9px/12px var(--sans); color: #fff; text-align: center; font-style: normal; }
