/* GPL Power Rankings: shared styles for every page in /gpl-power-rankings */
:root {
  --ink: #14161a; --muted: #5b6270; --line: #e3e6ea; --bg: #f5f4ef; --card: #fff;
  --brand: #04331F; --brand-2: #0A4A2E; --gold: #FCD116; --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; }
.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: 13px; letter-spacing: -.5px; }
.brand small { display: block; font: 500 12px/1.2 var(--sans); letter-spacing: 0; color: #b9d3c4; 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: #dfeee5; 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: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 0 0 18px; }
.stamp b { color: var(--ink); font-weight: 600; }

/* cards + stats */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 18px; }
.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: 10px; margin: 0 0 18px; }
.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: #fff; border: 1px solid var(--line); border-radius: 12px; 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: #fff5f5; }
tr.zone-t td { background: #f2fbf5; }
.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: #eef0f2; 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: #eef0f2; 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: #fff; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.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: var(--ink); font-weight: 600; text-decoration: none; }
.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: #fff; z-index: 1; }
