/* Ligi Kuu Bara Power Rankings: shared styles for every page in /tpl-power-rankings. Tokens follow the main site (ink #0A0A0A, green #1EB53A, yellow #FCD116, cream cards on beige). System fonts for speed. */
:root {
  --ink: #0A0A0A; --muted: #5A5A50; --line: #E4DEC9; --bg: #F5F2E7; --card: #FDFBF3;
  --brand: #0A0A0A; --brand-2: #1A1A1A; --gold: #FCD116; --green: #1EB53A; --up: #0A7A4A; --down: #C2152B;
  --h: #0A7A4A; --d: #6b7280; --a: #1F5FA8;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: #0A5E8F; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(26px, 6vw, 38px); }
h2 { font-size: clamp(20px, 4.6vw, 26px); margin-top: 0; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* header + section nav */
.gh { background: var(--brand); color: #fff; border-bottom: 4px solid var(--green); }
.gh .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { color: #fff; text-decoration: none; font: 800 19px/1 var(--sans); letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--gold); color: var(--brand); display: grid; place-items: center; font-size: 12px; letter-spacing: -.5px; font-weight: 900; }
.brand small { display: block; font: 500 12px/1.2 var(--sans); letter-spacing: 0; color: #c9c5b4; margin-top: 3px; }
.nav { background: var(--brand-2); }
.nav ul { list-style: none; margin: 0 auto; padding: 0 12px; max-width: 980px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav a { display: block; white-space: nowrap; color: #E8E4D6; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 10px; border-bottom: 3px solid transparent; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }

/* page head */
.crumbs { font-size: 13px; color: var(--muted); margin: 14px 0 10px; }
.crumbs a { color: var(--muted); }
.lede { color: #3a3f48; max-width: 680px; }
.stamp { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); background: var(--card); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; margin: 0 0 18px; }
.stamp b { color: var(--ink); font-weight: 600; }

/* cards + stats */
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--green); padding: 16px; margin: 0 0 22px; }
.card > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card > h2 a { font: 600 14px var(--sans); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px; }
.stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .stats > :last-child:nth-child(odd) { grid-column: auto; } }
.stat { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--green); padding: 12px 14px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.stat .v { font: 800 24px/1.2 var(--sans); margin-top: 2px; }
.stat .s { font-size: 14px; color: #3a3f48; }
.grid2 { display: grid; gap: 18px; }
@media (min-width: 820px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2 > .card { margin: 0; } .grid2 { margin-bottom: 18px; } }

/* tables */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; text-align: right; padding: 6px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th.l, td.l { text-align: left; }
td.team { white-space: normal; min-width: 120px; }
td.team a { color: var(--ink); text-decoration: none; font-weight: 600; }
td.team a:hover { text-decoration: underline; }
td.rk { color: var(--muted); width: 28px; }
tr.zone-r td { background: #fdeaea; }
tr.zone-t td { background: #e8f7ec; }
tr.zone-p td { background: #fff3d6; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.25); }
.up { color: var(--up); font-weight: 600; } .down { color: var(--down); font-weight: 600; } .flat { color: var(--muted); }
.form { display: inline-flex; gap: 2px; }
.form i { font-style: normal; width: 16px; height: 18px; border-radius: 3px; font-size: 11px; font-weight: 700; color: #fff; display: grid; place-items: center; }
.form .W { background: var(--h); } .form .D { background: var(--d); } .form .L { background: var(--down); }
@media (max-width: 400px) { td, th { padding-left: 4px; padding-right: 4px; } table { font-size: 14px; } .form i { width: 14px; } }

/* H/D/A prediction rows */
.fx { list-style: none; margin: 0; padding: 0; }
.fx li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fx li:last-child { border-bottom: 0; }
.fx .teams { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 15px; }
.fx .teams a { color: var(--ink); text-decoration: none; }
.fx .when { font-size: 12px; color: var(--muted); margin: 1px 0 6px; }
.bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; }
.bar span { display: grid; place-items: center; min-width: 30px; }
.bar .h { background: var(--h); } .bar .d { background: var(--d); } .bar .a { background: var(--a); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.res { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 4px; background: #fdecc8; color: #7a4b00; margin-left: 6px; }

/* odds lists */
.odds { list-style: none; margin: 0; padding: 0; }
.odds li { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 10px; padding: 6px 0; }
.odds .nm { font-weight: 600; font-size: 15px; }
.odds .track { grid-column: 1 / -1; height: 6px; background: #ece7d6; border-radius: 3px; margin-top: -4px; }
.odds .fill { height: 100%; border-radius: 3px; background: var(--up); }
.odds.rel .fill { background: var(--down); }
.odds .pc { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* heatmap */
.heat td.c { font-size: 11px; padding: 6px 2px; min-width: 30px; text-align: center; color: var(--ink); }
.heat th.c { text-align: center; padding: 6px 2px; }

/* charts */
.chart svg { width: 100%; height: auto; display: block; }
.note { font-size: 13px; color: var(--muted); }

/* prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.4em; }
.prose code { background: #ece7d6; padding: 1px 5px; border-radius: 4px; font-size: 14px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 1em; }
dl.kv dt { font-weight: 600; } dl.kv dd { margin: 0; }

/* footer */
.gf { margin-top: 32px; background: #08300F; border-top: 4px solid var(--gold); font-size: 14px; color: #A9C4AE; }
.gf .wrap { padding-top: 20px; padding-bottom: 28px; }
.gf nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.gf nav a { color: #FAF6EC; font-weight: 600; text-decoration: none; }
.gf p a { color: #FAF6EC; }
.gf p { margin: 0 0 6px; }
.fx .teams > span:last-child { text-align: right; }
.fx .teams > span:last-child .dot { margin: 0 0 0 8px; }
.heat td.team { min-width: 0; }
.heat td.team, .heat th.l { position: sticky; left: 0; background: var(--card); z-index: 1; }

/* season-chances table: the projected-points column is dropped on narrow phones so the chances columns fit without scrolling */
@media (max-width: 520px) { .sc .pp { display: none; } .sc td.team { min-width: 104px; } }

/* ---- layout v2: green hero band, pill menu, two-column hub, fixture cards, rating bars, club banners (differs from the Ghana version on purpose) ---- */
.gh .wrap { justify-content: space-between; }
.gh .home { color: var(--gold); font: 600 13px var(--sans); text-decoration: none; border: 1.5px solid var(--gold); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.gh .home:hover { background: var(--gold); color: var(--brand); }
.pills { background: var(--bg); border-bottom: 2px solid var(--ink); }
.pills ul { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pills ul::-webkit-scrollbar { display: none; }
.pills a { display: block; white-space: nowrap; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 999px; font: 700 14px var(--sans); padding: 7px 14px; }
.pills a[aria-current="page"] { background: var(--gold); box-shadow: 2px 2px 0 var(--ink); }
.hero { background: var(--green); border-bottom: 4px solid var(--ink); padding: 22px 0 18px; }
.hero h1 { margin: 0 0 .35em; font-size: clamp(27px, 6.4vw, 44px); line-height: 1.12; letter-spacing: -.025em; }
.hero h1 .hl { background: var(--ink); color: var(--card); padding: 0 8px; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lede { color: #08300F; font-weight: 500; font-size: 17px; max-width: 640px; }
.hero .stamp { margin: 0; border-color: var(--ink); }
.kicker { font: 500 11px/1 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 9px; display: inline-block; margin: 0 0 10px; }
.hero .kicker { background: var(--card); }
.block { margin: 0 0 24px; }
.block > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.block > h2 a { font: 600 14px var(--sans); }
main > .stats { margin-top: 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.cols > .card, .cols .side .card { margin: 0 0 22px; }
@media (min-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 26px; align-items: start; }
  .cols > .card { margin: 0; }
  .side { position: sticky; top: 14px; }
  .side .card:last-child { margin-bottom: 0; }
}
/* next-matchday cards: swipe sideways on a phone, grid on larger screens */
.fxc { list-style: none; margin: 0; padding: 4px 4px 10px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.fc { flex: 0 0 min(78%, 300px); scroll-snap-align: start; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--gold); padding: 12px 14px; }
.fc .when { font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.fc .tm { font-weight: 700; font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; }
.fc .tm a { color: var(--ink); text-decoration: none; }
.fc .bar { margin-top: 8px; }
@media (min-width: 700px) { .fxc { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; margin: 0; padding: 4px 0 10px; } .fc { flex: none; } }
/* rankings table: rank badge and a rating bar in each club's colour */
.rn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--card); font-weight: 800; font-size: 13px; }
tr:nth-child(-n+3) .rn { background: var(--gold); color: var(--ink); border: 2px solid var(--ink); }
td.rk { width: 38px; }
.rbar { display: block; height: 5px; border-radius: 3px; background: #ece7d6; margin: 5px 0 0 20px; max-width: 160px; }
.rbar i { display: block; height: 100%; border-radius: 3px; }
/* club pages: banner in the club's own colours */
.hero:has(.tb) { background: var(--card); padding: 18px 0 0; }
.tb { display: flex; gap: 16px; align-items: center; padding-bottom: 16px; position: relative; }
.tb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; border-radius: 6px 6px 0 0; background: linear-gradient(90deg, var(--c1) 55%, var(--c2) 55%); border: 2px solid var(--ink); border-bottom: 0; }
.bigdot { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); background: linear-gradient(135deg, var(--c1) 55%, var(--c2) 55%); box-shadow: 3px 3px 0 var(--ink); margin-bottom: 12px; }
.tb h1 { margin: 0 0 .25em; font-size: clamp(24px, 5.4vw, 36px); }
.tb .stamp { margin: 0 0 12px; }
.hero:has(.tb) .kicker { margin-bottom: 8px; }

.brand-ball { display: block; width: 34px; height: 34px; flex: 0 0 auto; }
.brand-ball svg { width: 34px; height: 34px; }

@media (max-width: 520px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand small { display: none; }
  .gh .home { font-size: 12px; padding: 5px 10px; }
  .gh .wrap { gap: 8px; }
}

/* phones: the rankings table fits the screen without a sideways scroll */
@media (max-width: 520px) { td.rk { width: 26px; } td.team { min-width: 92px; } .form i { width: 13px; } }
.swipe { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
@media (min-width: 700px) { .swipe { display: none; } }

/* phones: the finishing-positions grid stacks, one club per block with its 16 cells across, instead of scrolling sideways */
@media (max-width: 700px) {
  .heat, .heat thead, .heat tbody { display: block; }
  .heat tr { display: flex; }
  .heat thead th.l { display: none; }
  .heat td.team, .heat td.team:first-child { flex: 0 0 100%; position: static; padding: 9px 2px 3px; border: 0; text-align: left; }
  .heat tbody tr { flex-wrap: wrap; }
  .heat td.c, .heat th.c { flex: 1 1 5%; min-width: 0; padding: 6px 0; font-size: 10px; border-bottom: 0; }
  .heat th.c { font-size: 10px; border-bottom: 2px solid var(--line); }
  .heat tbody tr:last-child td.c { border-bottom: 0; }
}

/* very narrow phones: a little tighter, and the form chips drop out of the rankings table */
@media (max-width: 380px) { .card { padding: 12px; } table { font-size: 13.5px; } td, th { padding-left: 3px; padding-right: 3px; } }
@media (max-width: 340px) { .fm { display: none; } .sc td.team { min-width: 84px; } }

/* a club name that wraps lines up with the start of the name, not under the colour dot */
td.team { padding-left: 26px; text-indent: -20px; }
td.team .rbar { margin-left: 0; text-indent: 0; }
.heat td.team { padding-left: 6px; text-indent: 0; }
.odds .nm { padding-left: 20px; text-indent: -20px; }
.fx .teams > span:first-child { padding-left: 20px; text-indent: -20px; }
@media (max-width: 400px) { td.team { padding-left: 24px; } }
@media (max-width: 380px) { td.team { padding-left: 23px; } }
@media (max-width: 700px) { .heat td.team, .heat td.team:first-child { padding-left: 2px; } }
@media (max-width: 340px) { .sc td, .sc th { padding-left: 2px; padding-right: 2px; font-size: 13px; } .sc td.team { min-width: 76px; } }
@media (max-width: 340px) { .sc th { font-size: 11px; letter-spacing: 0; } .sc th:nth-child(5) { font-size: 10px; } }

/* methodology and embed pages: the same cards as the hub, in a main column and a side column */
.cols > .main > .card { margin: 0 0 22px; }
.cols > .main > .card:last-child { margin-bottom: 0; }
.card dl.kv { margin-bottom: .6em; }
.card .chart h3 { margin: .2em 0 .4em; font-size: 16px; }
.card textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; gap: 0 0; } dl.kv dt { margin-top: .5em; } }
td code { white-space: normal; overflow-wrap: anywhere; }
td:has(> code) { white-space: normal; }
