/* PPC stats dashboard. The look is the prototype rounds' (SPEC §15): direction C (Clubhouse) colors,
cards and tiles, with direction B's header. Bebas Neue for titles and labels, DM Sans for the rest. */

:root {
  --bg: #EEF2F8; --card: #FFFFFF; --ink: #0F1A2E; --ink2: #44506A; --muted: #5E6984; --nav: #3F4B63;
  --blue: #184296; --pill: #DCE5F5; --orange: #E87A2D; --rule: #CBD3E0; --tint: #F5F8FD; --hair: #E6EBF3;
  --line: #D3D9E3; --gray: #7C879C; --gray-l: #B9C6DE; --band: #F3F6FB; --bar: #2a78d6;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --bebas: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 6px 20px rgba(15, 26, 46, 0.08);
  --gutter: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
svg text { font-family: var(--sans); }
.num, .tbl td.n, .tbl th.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- header and nav ---------- */
header.top { border-top: 6px solid var(--blue); background: #FFFFFF; border-bottom: 1px solid var(--line); }
header.top .wrap { padding-top: 12px; padding-bottom: 12px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
header.top .logo img { height: 56px; width: auto; display: block; }
header.top nav { display: flex; gap: 26px; flex-wrap: wrap; font-size: 18px; font-weight: 500; }
header.top nav a { text-decoration: none; color: var(--nav); padding-bottom: 3px; border-bottom: 3px solid transparent; }
header.top nav a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.badge.public { border-color: var(--rule); color: var(--muted); font-weight: 500; }

/* ---------- scope bar ---------- */
.scopebar { background: #F7F9FC; border-bottom: 1px solid var(--line); }
.scopebar .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--nav); }
.showing { font-size: 15px; color: var(--ink2); }
/* the one-line summary is for phones (below); elsewhere the controls sit in the bar as they are */
.scope-sum { display: none; }
.scope-controls { display: contents; }
.sep { color: #9AA6BC; }
/* the scope reads as a sentence: each choice is a word with a dotted underline (round 1's board B, D46) */
.word { font-size: 15px; font-weight: 600; color: var(--blue); background: none; border: 0; border-radius: 6px; padding: 0 1px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none; line-height: 1.25; }
.word .w { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.word:hover, .dd[open] > .word { color: var(--ink); }
.word:hover .w, .dd[open] > .word .w { text-decoration-style: solid; }
.word.quiet { color: var(--ink2); font-weight: 500; }
.word .sub { font-weight: 400; color: var(--muted); }
/* a choice that isn't the default is highlighted, so a filtered view stands out */
.changed > .word, .word.changed { background: var(--pill); color: var(--ink); font-weight: 600; padding: 0 10px; min-height: 32px; }
.changed > .word .w, .word.changed .w { text-decoration-line: none; }
.scope-more { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; }
@media (pointer: coarse) {
  .word { min-height: 40px; }
  .changed > .word, .word.changed { min-height: 36px; }
}
.btn { font-size: 15px; font-weight: 600; color: var(--blue); background: #FFFFFF; border: 1px solid #C3CCDA; border-radius: 6px; padding: 6px 11px; min-height: 36px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.quiet { color: var(--ink2); font-weight: 500; }
.btn.dashed { border-style: dashed; border-color: #9AA6BC; color: var(--ink2); font-weight: 500; }
.btn.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn.small { min-height: 30px; padding: 4px 9px; font-size: 14px; }
.btn .sub { font-weight: 400; color: var(--muted); }
.push { margin-left: auto; }

.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd .menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 70vh; overflow-y: auto; background: #FFFFFF; border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 26, 46, 0.16); padding: 6px; display: flex; flex-direction: column; }
.dd.right .menu { left: auto; right: 0; }
.menu a, .menu .mh { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 28px; border-radius: 8px; color: var(--ink); text-decoration: none; position: relative; font-size: 15px; }
.menu a:hover { background: var(--tint); }
.menu a[aria-checked="true"] { font-weight: 700; }
.menu a[aria-checked="true"]::before { content: "✓"; position: absolute; left: 9px; font-weight: 700; color: var(--blue); }
.menu .mh { padding-left: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--hair); margin: 6px 4px; }

/* ---------- page heads ---------- */
.eyebrow { font-family: var(--bebas); font-size: 21px; letter-spacing: 0.14em; color: var(--muted); }
.title { font-family: var(--bebas); font-weight: 400; font-size: clamp(64px, 11vw, 148px); line-height: 0.82; letter-spacing: 0.01em; margin: 0; text-transform: uppercase; overflow-wrap: anywhere; }
.title.mid { font-size: clamp(56px, 9vw, 112px); }
.head { display: flex; flex-direction: column; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 24px; }
.head-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 20px 48px; align-items: end; }
.head-grid.narrow { grid-template-columns: minmax(0, 1fr) auto; }
.lede { font-size: 19px; line-height: 1.55; max-width: 900px; text-wrap: pretty; }
.avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--pill); border: 5px solid #FFFFFF; box-shadow: 0 6px 18px rgba(15, 26, 46, 0.14); display: flex; align-items: center; justify-content: center; flex: none; font-family: var(--bebas); font-size: 76px; color: var(--blue); line-height: 1; padding-top: 6px; }
.namerow { display: flex; align-items: flex-end; gap: 28px; min-width: 0; }
.awards { margin: 0; padding: 0 0 6px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.awards li { display: flex; align-items: flex-start; gap: 11px; }
.awards .a-main { font-size: 16px; line-height: 1.3; }
.awards .a-main.big { font-size: 17px; }
.awards .a-crit { font-size: 14px; line-height: 1.35; color: var(--muted); }
/* a season's awards, full width: two columns once there's room */
.awards.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 16px 40px; padding-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13.5px; color: var(--ink2); background: #FFFFFF; border: 1px solid var(--rule); border-radius: 6px; padding: 3px 9px; }

/* ---------- cards and sections ---------- */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.tight { padding: 20px 22px; }
.h2 { margin: 0; font-family: var(--bebas); font-weight: 400; font-size: 38px; letter-spacing: 0.03em; line-height: 1; color: var(--blue); text-transform: uppercase; }
.h2.small { font-size: 30px; }
.h3 { font-family: var(--bebas); font-weight: 400; font-size: 24px; letter-spacing: 0.06em; color: var(--ink); text-transform: uppercase; margin: 0; }
.sub { color: var(--ink2); font-size: 15px; }
.card-head { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-end; justify-content: space-between; }
.card-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.lock { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; vertical-align: middle; text-transform: uppercase; }
.section-label { font-family: var(--bebas); font-size: 24px; letter-spacing: 0.08em; color: var(--ink); margin: 6px 0 -6px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pair { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: stretch; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: 18px; box-shadow: 0 6px 20px rgba(15, 26, 46, 0.10); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
a.tile:hover { box-shadow: 0 8px 24px rgba(15, 26, 46, 0.16); color: inherit; }
.tile .t-label { font-size: 17px; font-weight: 600; color: var(--ink2); }
.tile .t-value { font-size: 50px; font-weight: 700; line-height: 1; color: var(--blue); }
.tile .t-value.mid { font-size: 40px; }
.tile .t-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tile.lead { outline: 3px solid var(--orange); outline-offset: -3px; }
.pill { font-size: 15px; font-weight: 700; color: var(--ink); background: var(--pill); border-radius: 999px; padding: 3px 12px; white-space: nowrap; }
.pill.first { background: var(--orange); color: var(--ink); }
.pill.small { font-size: 13px; padding: 2px 9px; }
.delta { font-size: 14px; color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; }
.delta b { color: var(--ink); }

/* ---------- tabs and toggles ---------- */
.tabs { display: flex; align-items: flex-end; gap: 30px; border-bottom: 1px solid var(--rule); font-size: 19px; font-weight: 500; flex-wrap: wrap; }
.tabs a { text-decoration: none; color: var(--nav); padding: 0 2px 8px; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.tabs .push { padding-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid #C3CCDA; border-radius: 8px; overflow: hidden; background: #FFFFFF; }
.seg a { padding: 6px 12px; font-size: 14.5px; font-weight: 600; color: var(--ink2); text-decoration: none; border-right: 1px solid #C3CCDA; }
.seg a:last-child { border-right: 0; }
.seg a[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.controls .lbl { font-size: 14px; color: var(--ink2); }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 11px; font-size: 14px; font-weight: 600; color: var(--ink); background: #FFFFFF; text-decoration: none; }
.chip.on { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.chip .x { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 8px 8px; border-bottom: 2px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
.tbl th a { color: inherit; text-decoration: none; }
.tbl th a:hover { color: var(--blue); }
.tbl th.sorted::after { content: " ▾"; color: var(--blue); }
.tbl th.sorted.asc::after { content: " ▴"; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl td.n, .tbl th.n { text-align: right; white-space: nowrap; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl tr.hl td { background: var(--tint); }
.tbl tr.me td { background: #FFF4EC; }
.tbl tr.rule td { border-bottom: 2px solid var(--orange); }
.tbl td a { text-decoration: none; font-weight: 600; }
.tbl td .sm { display: block; font-size: 13px; color: var(--muted); font-weight: 400; white-space: normal; }
.tbl td.n .sm { min-width: 9em; }
.tbl td .rk-in { margin-left: 5px; font-size: 13px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.tbl .strong { font-weight: 700; }
.tbl.compact td { padding: 6px 8px; }
.tbl tbody tr:hover td { background: var(--tint); }
.moneyline td { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--orange); border-bottom: 2px solid var(--orange); padding: 4px; }
.fin-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.fin-dot.win { background: var(--blue); box-shadow: 0 0 0 2px var(--orange); }
.fin-dot.cash { background: var(--blue); }
.fin-dot.none { background: #FFFFFF; border: 2px solid var(--gray); }

/* ---------- leaders (rows of three, D21) ---------- */
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.leader { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.leader .l-title { font-size: 15px; font-weight: 700; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.leader .l-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.leader .l-name { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.15; min-width: 0; }
.leader .l-name a { color: inherit; text-decoration: none; }
.leader .l-name a:hover { color: var(--blue); }
.leader .l-val { font-size: 28px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.leader .l-note { font-size: 13.5px; color: var(--muted); }
.leader ol { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 6px; }
.leader li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.leader li .rk { width: 34px; color: var(--muted); font-weight: 600; flex: none; }
.leader li .nm { flex: 1; min-width: 0; }
.leader li .nm a { color: var(--ink); text-decoration: none; font-weight: 600; }
.leader li .vl { font-weight: 700; white-space: nowrap; }
.leader .more { font-size: 14px; font-weight: 700; text-decoration: none; margin-top: auto; }

/* ---------- small pieces ---------- */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 18px 24px; }
.kv > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-left: 1px solid var(--rule); padding-left: 24px; }
.kv > div:first-child { border-left: 0; padding-left: 0; }
.kv .k { font-size: 15px; font-weight: 600; color: var(--ink2); }
.kv .v { font-size: 30px; font-weight: 700; line-height: 1.05; color: var(--ink); }
.kv .v small { font-size: 16px; font-weight: 600; color: var(--ink2); }
.kv .s { font-size: 14px; color: var(--muted); }
.kv.tight { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.note { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.trophy { flex: none; display: inline-block; }
.linkcards { display: flex; gap: 12px; flex-wrap: wrap; }
.linkcard { background: #FFFFFF; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; max-width: 420px; }
.linkcard:hover { border-color: var(--blue); }
.linkcard .lc-k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.linkcard .lc-v { font-size: 15px; font-weight: 700; color: var(--blue); }
.story { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.story:last-child { border-bottom: 0; }
.story .st-k { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
/* a full-width card's storylines run in two columns, a rule under each (the finder, §10) */
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); column-gap: 40px; }
.stories .story:last-child { border-bottom: 1px solid var(--hair); }
.evstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.evcard { background: #FFFFFF; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; }
.evcard:hover { border-color: var(--pill); color: var(--ink); }
.evcard.me { border-color: var(--orange); }
.evcard .ec-k { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.evcard .ec-n { font-size: 17px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.evcard .ec-s { font-size: 13.5px; color: var(--ink2); }
.evcard .ec-w { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.listrows { display: flex; flex-direction: column; }
.listrows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.listrows > div:last-child { border-bottom: 0; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart [data-tip] { cursor: default; }
.chart a [data-tip], .chart [data-href] { cursor: pointer; }
.chart .dim { opacity: 0.25; }
.chart-scroll { overflow-x: auto; }
#tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #FFFFFF; font-size: 13.5px; line-height: 1.35; padding: 8px 10px; border-radius: 8px; box-shadow: 0 8px 22px rgba(15, 26, 46, 0.25); max-width: 300px; }
#tip .tv { font-weight: 700; font-size: 15px; }
#tip .tl { color: #C9D3E6; }

/* ---------- drill-down panel (§9) ---------- */
.drill-back { position: fixed; inset: 0; background: rgba(15, 26, 46, 0.42); z-index: 40; }
.drill { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: #FFFFFF; z-index: 50; box-shadow: -12px 0 40px rgba(15, 26, 46, 0.22); overflow-y: auto; padding: 22px 28px 40px; display: flex; flex-direction: column; gap: 16px; border-radius: 22px 0 0 22px; }
.drill .d-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; padding-right: 36px; }
.drill .d-crumbs a { font-weight: 600; text-decoration: none; }
.drill .d-close { position: absolute; top: 16px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; color: var(--ink); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.drill .d-close:hover { background: var(--tint); }
.drill .d-sib { background: var(--tint); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.drill .d-sib .k { font-size: 14px; font-weight: 700; }
.drill h2 { font-family: var(--bebas); font-weight: 400; font-size: 40px; color: var(--blue); line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.drill .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- stat sheet ---------- */
.sheet th.per, .sheet td.per { text-align: right; white-space: nowrap; }
.sheet td.per a { color: var(--ink); text-decoration: none; font-weight: 600; }
.sheet td.per a:hover { color: var(--blue); }
.sheet td.per .r { display: inline-block; min-width: 46px; margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-align: left; }
.sheet td.per .r.one { color: var(--orange); }
.sheet tr.grp td { padding-top: 18px; font-family: var(--bebas); font-size: 20px; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--rule); }
.tipped { font-weight: 700; color: var(--ink); text-decoration: underline dotted var(--gray); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; }
.tipped:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

/* ---------- footer ---------- */
.foot { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--line); margin-top: 8px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .side, .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .grid3, .leaders { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .head-grid { grid-template-columns: minmax(0, 1fr); }
  header.top .wrap { gap: 12px 20px; }
  header.top .logo img { height: 44px; }
  header.top nav { gap: 6px 16px; font-size: 16px; order: 3; width: 100%; }
  .badge { margin-left: auto; }
  .avatar { width: 84px; height: 84px; font-size: 50px; }
  .namerow { gap: 16px; }
  .tile .t-value { font-size: 40px; }
  .card { padding: 20px 18px; border-radius: 18px; }
  .h2 { font-size: 32px; }
  .lede { font-size: 17px; }
  .kv > div { border-left: 0; padding-left: 0; }
  .drill { padding: 18px 16px 32px; border-radius: 0; }
  .tabs { gap: 18px; font-size: 17px; }
  .def-wide { display: none !important; }
  /* the stat sheet's names stay put while its periods scroll sideways */
  .sheet td.stat, .sheet th:first-child { position: sticky; left: 0; z-index: 1; background: #FFFFFF; box-shadow: 1px 0 0 var(--hair); }
  .sheet tbody tr:hover td.stat { background: var(--tint); }
  .tbl td.n .sm { min-width: 7em; }
  main.wrap { padding-top: 22px; gap: 18px; }
}
@media (max-width: 640px) {
  /* the scope bar is one line until "Change" opens its controls (D45) */
  .scope-sum { display: flex; align-items: center; gap: 10px; width: 100%; }
  .scope-sum .showing { margin-right: 0; flex: none; }
  .scope-sum .sum { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); line-height: 1.3; }
  .scope-sum .btn { flex: none; }
  .scope-controls { display: none; }
  .scopebar.open .scope-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; width: 100%; }
  .scope-controls .showing, .scope-controls .sep { display: none; }
  .scope-more { margin-left: 0; column-gap: 16px; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px 14px 12px; }
  .tile .t-label { font-size: 15px; }
  .tile .t-value { font-size: 34px; }
}
@media print {
  .scopebar, header.top nav, .drill, .drill-back { display: none; }
  body { background: #FFFFFF; }
  .card, .tile, .leader { box-shadow: none; border: 1px solid var(--rule); }
}

/* ---------- knockout tree ---------- */
.kotree, .kotree ul { list-style: none; margin: 0; padding: 0; }
.kotree ul { margin-left: 5px; padding-left: 16px; border-left: 1.5px solid var(--rule); }
.kotree li { padding: 3px 0; }
.kotree .node { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; flex-wrap: wrap; }
.kotree .node a { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 4px; }
.kotree .node a:hover { color: var(--blue); }

/* ---------- the Wall and the knockout grid (§10, D55) ---------- */
/* Each grid scrolls sideways inside its card with the names pinned at the left, so the page never does.
   The squares sit 2px apart, with no borders. Both ramps are one hue, light to dark, checked as
   ordinal ramps on the white card (the light end at 2.1:1); a win adds an orange dot. */
.grid-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px 6px; }
.heat { border-collapse: separate; border-spacing: 2px; }
.heat th, .heat td { padding: 0; }
.heat th.nm { position: sticky; left: 0; z-index: 2; background: #FFFFFF; text-align: right; padding: 0 10px 0 0; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.heat th.nm a { color: var(--ink); text-decoration: none; }
.heat th.nm a:hover, .heat thead th a:hover { color: var(--blue); }
.heat thead th { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; vertical-align: bottom; padding-bottom: 4px; }
.heat thead th a { color: inherit; text-decoration: none; }
.heat thead th.yr { font-family: var(--bebas); font-size: 17px; letter-spacing: 0.06em; font-weight: 400; color: var(--ink2); text-align: left; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.heat .s0 { padding-left: 8px; }
.heat td > a, .heat td > span { display: block; width: 20px; height: 20px; border-radius: 4px; }
.heat td > a:hover, .heat td > a:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat .tot { padding-left: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.heat tr.hl th.nm, .heat tr.hl td, .heat .hlc { background: var(--pill); }
.legend .lbl { font-weight: 700; color: var(--ink); }
/* a grid with its controls, legend, and notes beside it on a wide screen, above it on a narrower one */
.beside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.beside > .side-notes { order: -1; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1101px) {
  .beside { grid-template-columns: minmax(0, max-content) minmax(240px, 1fr); gap: 40px; align-items: start; }
  .beside > .side-notes { order: 0; padding-top: 28px; }
  .beside > .side-notes .legend { flex-direction: column; align-items: flex-start; gap: 9px; }
}
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; position: relative; flex: none; }
.sw.none { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rule); }
.wc0 { background: #94b4e7; }
.wc1 { background: #6f9ae0; }
.wc2 { background: #4a7fd5; }
.wc3 { background: #2a5fbf; }
.wc4 { background: #184296; }
.wc5 { background: #0c214d; position: relative; }
.wc5::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--orange); }
.sw.wc5::after { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
.kos td > a { display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; text-decoration: none; color: #FFFFFF; }
.kos td > a.kc1 { color: var(--ink); }
.kc1 { background: #94b4e7; }
.kc2 { background: #4a7fd5; }
.kc3 { background: #184296; }
.kc4 { background: #0c214d; }
.kos td > span.self { background: var(--band); }
.kos thead th.vert { height: 92px; padding-bottom: 6px; }
.kos thead th.vert a { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--ink2); }
.kos th.corner { vertical-align: bottom; font-size: 11px; font-weight: 700; color: var(--muted); }
.kos th.corner span { display: block; }

/* ---------- the pre-event preview (§10) ---------- */
/* who's coming: a name is coming (filled), likely (dashed), or not on the list (plain) */
.chip.rsvp { cursor: pointer; }
.chip.rsvp.yes { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chip.rsvp.maybe { border-style: dashed; border-color: var(--blue); color: var(--blue); }
.story .st-u { font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- the Road So Far (D68) ---------- */
/* a timeline: a rule down the left with a dot at each entry, the entries as cards */
.road { list-style: none; margin: 0; padding: 0 0 0 36px; position: relative; display: flex; flex-direction: column; gap: 24px; }
.road::before { content: ""; position: absolute; left: 11px; top: 30px; bottom: 30px; width: 2px; background: var(--rule); }
.road > li { position: relative; }
.road > li::before { content: ""; position: absolute; left: -31px; top: 31px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--bg); }
.road > li.draft { outline: 2px dashed var(--gray-l); outline-offset: -2px; }
.road > li.draft::before { background: var(--gray); }
.r-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.r-when { font-family: var(--bebas); font-size: 28px; letter-spacing: 0.05em; line-height: 1; color: var(--blue); }
.r-title { font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--ink); max-width: 820px; text-wrap: pretty; }
.r-text { display: flex; flex-direction: column; gap: 10px; max-width: 820px; font-size: 16px; line-height: 1.55; }
.r-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 4px; }
.r-photos figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.r-photos a { display: block; border-radius: 12px; overflow: hidden; background: var(--band); }
.r-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; transition: transform 0.2s; }
.r-photos a:hover img { transform: scale(1.03); }
.r-photos figcaption { font-size: 13px; line-height: 1.35; color: var(--muted); }
.r-more { align-self: flex-start; font-size: 15px; font-weight: 700; text-decoration: none; }
.r-more::after { content: " →"; }
@media (max-width: 640px) {
  .road { padding-left: 22px; }
  .road::before { left: 5px; }
  .road > li::before { left: -23px; width: 12px; height: 12px; top: 27px; }
  .r-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .r-title { font-size: 19px; }
}
