/* Layout: broadcast-booth app shell. Left rail on desktop, bottom tab bar on phones.
   Game cards are drawn like on-air score bugs; channels like network bugs; LIVE uses the camera tally light. */
:root {
  --paper: #edf0f4;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #e8ecf2;
  --ink: #0c1524;
  --ink-2: #48536a;
  --ink-3: #78839a;
  --line: #dbe0e8;
  --line-2: #c3cad6;
  --key: #1d43f2;
  --key-ink: #ffffff;
  --key-soft: #e4e9ff;
  --key-text: #1638d6;
  --tally: #e0302a;
  --tally-soft: #fde8e6;
  --go: #0b7a46;
  --go-soft: #ddf2e6;
  --warn: #9a5b00;
  --warn-soft: #fff0d2;
  --bad: #b42318;
  --bad-soft: #fde4e1;
  --shadow: 0 1px 2px rgba(12, 21, 36, .06), 0 8px 24px -12px rgba(12, 21, 36, .18);
  --scrim: rgba(9, 14, 24, .48);
  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "Martian Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r: 12px;
  --r-sm: 7px;
  --rail: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #080d17; --surface: #111a29; --surface-2: #162133; --surface-3: #1c2a40;
    --ink: #e9eef6; --ink-2: #a8b3c7; --ink-3: #75829a; --line: #213049; --line-2: #2f405e;
    --key: #7690ff; --key-ink: #08101f; --key-soft: #1a2552; --key-text: #9fb2ff;
    --tally: #ff5b4f; --tally-soft: #3b1614; --go: #42cf86; --go-soft: #0f2c1f;
    --warn: #f3b74a; --warn-soft: #32250b; --bad: #ff7a70; --bad-soft: #3a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
    --scrim: rgba(0, 0, 0, .62);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #080d17; --surface: #111a29; --surface-2: #162133; --surface-3: #1c2a40;
  --ink: #e9eef6; --ink-2: #a8b3c7; --ink-3: #75829a; --line: #213049; --line-2: #2f405e;
  --key: #7690ff; --key-ink: #08101f; --key-soft: #1a2552; --key-text: #9fb2ff;
  --tally: #ff5b4f; --tally-soft: #3b1614; --go: #42cf86; --go-soft: #0f2c1f;
  --warn: #f3b74a; --warn-soft: #32250b; --bad: #ff7a70; --bad-soft: #3a1714;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
  --scrim: rgba(0, 0, 0, .62);
  color-scheme: dark;
}

:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
img { max-width: 100%; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--key-text); text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--key); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100%; }
.rail {
  position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px 18px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; position: relative;
}
.brand-mark svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.brand-mark .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 2px var(--ink); }
.brand-mark .dot.on { background: var(--tally); animation: tally 1.6s ease-in-out infinite; }
.brand-word { font: 900 26px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--key-soft); color: var(--key-text); }
.nav .count { margin-left: auto; font: 500 10.5px/1 var(--f-mono); padding: 4px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); }
.nav .count.live { background: var(--tally-soft); color: var(--tally); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  text-decoration: none; color: inherit; background: var(--surface-2);
}
.me-card:hover { border-color: var(--line-2); }
.me-card .stack { display: flex; }
.me-card .stack .badge { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface-2); }
.me-card .stack .badge:first-child { margin-left: 0; }
.me-card small { display: block; color: var(--ink-3); font-size: 12px; }
.fresh { font: 400 10.5px/1.5 var(--f-mono); color: var(--ink-3); padding: 0 8px; }

.topbar {
  display: none; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .brand-word { font-size: 22px; }
.topbar .brand-mark { width: 30px; height: 30px; }
.topbar .spacer { flex: 1; }
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
  justify-content: space-around;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
  color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 500; border-radius: 8px; position: relative;
}
.tabbar a[aria-current="page"] { color: var(--key-text); }
.tabbar a .pip { position: absolute; top: 4px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--tally); box-shadow: 0 0 0 2px var(--surface); }

.main { min-width: 0; padding-inline: clamp(16px, 3.2vw, 44px); padding-block: 26px 80px; }
.main-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; container-type: inline-size; container-name: page; }

@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { display: flex; }
  .tabbar { display: flex; }
  .main { padding-block: 18px 110px; }
}

/* ---------------------------------------------------------------- type + section scaffolding */
.eyebrow { font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head h1 { font: 800 clamp(34px, 5vw, 52px)/.95 var(--f-display); letter-spacing: .01em; text-transform: uppercase; }
.page-head p { color: var(--ink-2); max-width: 62ch; margin-top: 8px; }
.sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { font: 800 24px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.sec-head .aside { color: var(--ink-3); font-size: 13px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.cols > * { min-width: 0; }
@container page (max-width: 980px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 18px; }
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--key); border-color: var(--key); color: var(--key-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.sm { min-height: 30px; padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.iconbtn:hover { color: var(--ink); border-color: var(--line-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { font: 500 10px/1 var(--f-mono); opacity: .7; }
.chip.x { padding-right: 6px; }
.chip.x button { border: 0; background: transparent; padding: 0 2px; color: inherit; display: inline-grid; place-items: center; }
.scroller { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scroller::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-3); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface);
}
.input:focus { outline: 2px solid var(--key); outline-offset: -1px; border-color: transparent; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 38px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 36px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; margin: 0; cursor: pointer; flex: none; transition: background .15s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle input:checked { background: var(--key); }
.toggle input:checked::after { transform: translateX(14px); }

/* ---------------------------------------------------------------- tokens of the subject: badges, channel bugs, tally */
.badge {
  --tc: #5b6472; --tt: #fff;
  width: 30px; height: 30px; flex: none; border-radius: 8px; display: inline-grid; place-items: center;
  background: var(--tc); color: var(--tt); font: 800 11.5px/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.badge.lg { width: 52px; height: 52px; border-radius: 13px; font-size: 18px; }
.badge.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.bug-chan {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line-2);
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; background: var(--surface);
}
.bug-chan.have { background: var(--go-soft); border-color: transparent; color: var(--go); }
.bug-chan.miss { border-style: dashed; }
.bug-chan.local { color: var(--ink-3); }
.tally { display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tally); }
.tally::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tally); animation: tally 1.6s ease-in-out infinite; }
@keyframes tally { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.status { font: 500 11px/1.2 var(--f-mono); letter-spacing: .03em; color: var(--ink-3); text-transform: uppercase; }
.status.final { color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--go-soft); color: var(--go); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.key { background: var(--key-soft); color: var(--key-text); }
.pill.dim { background: var(--surface-3); color: var(--ink-2); }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- score bug cards */
.bug {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); text-align: left; width: 100%; color: inherit; position: relative;
}
button.bug:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.bug.mine::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--key); }
.bug .teams { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.bug .t { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.bug .t .nm { min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.bug .t .nm b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bug .t .nm .rk { font: 500 10.5px var(--f-mono); color: var(--ink-3); }
.bug .t .nm .rec { font: 400 11px var(--f-mono); color: var(--ink-3); white-space: nowrap; }
.bug .t .sc { font: 800 24px/1 var(--f-display); min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.bug .t.lose .sc, .bug .t.lose b { color: var(--ink-3); }
.bug .side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: right; min-width: 92px; }
.bug .when { font: 600 15px/1.1 var(--f-body); white-space: nowrap; }
.bug .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-3); }
.bug .meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.bug .ev-name { font-weight: 600; font-size: 15px; }
.bug .sit { font: 400 11px/1.4 var(--f-mono); color: var(--ink-2); }
.bug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; position: relative;
}
.hero-main { padding: 24px 26px 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; position: relative; }
.hero-stripe { position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(var(--c1) 0 50%, var(--c2) 50% 100%); }
.hero .kick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hero .match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.hero .side-t { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hero .side-t.r { flex-direction: row-reverse; text-align: right; }
.hero .side-t .tn { font: 800 clamp(24px, 3.2cqi, 40px)/.95 var(--f-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.hero .side-t .tr { font: 400 11.5px var(--f-mono); color: var(--ink-3); margin-top: 4px; }
.hero .vs { font: 800 clamp(28px, 4vw, 48px)/1 var(--f-display); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero .vs small { display: block; font: 500 11px/1.4 var(--f-mono); color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; margin-top: 6px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.hero .facts span { display: inline-flex; align-items: center; gap: 6px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-watch { background: var(--surface-2); border-left: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero-watch h3 { font: 800 18px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.countdown { font: 500 12px var(--f-mono); color: var(--ink-2); }
@container page (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-watch { border-left: 0; border-top: 1px solid var(--line); }
  }
@container page (max-width: 560px) {
  .hero .match { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero .side-t.r { flex-direction: row; text-align: left; }
  .hero .vs { text-align: left; }
  .hero-main { padding: 20px 18px 18px 22px; }
}

/* where-to-watch rows */
.wrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.wrow.have { border-color: color-mix(in srgb, var(--go) 45%, var(--line)); background: color-mix(in srgb, var(--go-soft) 55%, var(--surface)); }
.wrow .svc { flex: 1; min-width: 0; }
.wrow .svc b { display: block; font-weight: 600; }
.wrow .svc small { color: var(--ink-3); font-size: 12px; }
.wrow .price { font: 500 12px var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.svc-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff;
  font: 800 12px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase;
}

/* ---------------------------------------------------------------- rows used in lists */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow-wrap: break-word; }
.row .sub { color: var(--ink-3); font-size: 13px; overflow-wrap: break-word; }
button.row { width: 100%; border: 0; background: transparent; text-align: left; color: inherit; }
button.row:hover { background: var(--surface-2); }
.day-label { font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 16px 6px; background: var(--surface-2); }
.timecol { width: 74px; flex: none; font: 600 13.5px/1.25 var(--f-body); font-variant-numeric: tabular-nums; }
.timecol small { display: block; font: 400 10.5px var(--f-mono); color: var(--ink-3); letter-spacing: .03em; }

/* heads-up alert cards */
.heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.head-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.head-card:hover { border-color: var(--line-2); }
.head-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.head-card .big { font: 800 40px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.head-card .lines { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.head-card .lines div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.head-card .lines div span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev { width: 8px; height: 8px; border-radius: 2px; flex: none; transform: translateY(-1px); }
.sev.bad { background: var(--bad); } .sev.warn { background: var(--warn); } .sev.ok { background: var(--go); } .sev.dim { background: var(--line-2); }

/* banner */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-radius: var(--r); background: var(--key-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--key) 30%, transparent); }
.banner .grow { flex: 1; min-width: 220px; }
.banner b { font-weight: 600; }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* trending */
.trend { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 14px 16px; }
.trend .rank { font: 800 22px/1 var(--f-display); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.trend .tt { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.trend .vol { text-align: right; font: 800 20px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.trend .vol small { display: block; font: 500 10.5px var(--f-mono); color: var(--go); margin-top: 4px; }
.trend .rel { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.trend .rel span { font-size: 12px; color: var(--ink-3); background: var(--surface-2); border-radius: 5px; padding: 2px 7px; }
.trend .bar { grid-column: 2 / -1; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.trend .bar i { display: block; height: 100%; background: var(--key); border-radius: 2px; }
.trend .meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--ink-3); align-items: center; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.stat { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat .v { font: 800 38px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat .k { font-size: 13px; color: var(--ink-2); }
.stack-bar { display: flex; height: 18px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); }
.stack-bar i { display: block; height: 100%; min-width: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 3px; background: var(--key); }
.hbar .n { font: 500 11.5px var(--f-mono); color: var(--ink-2); text-align: right; }

/* recalls, outages, weather */
.rc { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rc .top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rc .tt { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.rc .why { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.rc .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); }
.rc details summary { cursor: pointer; font-size: 13px; color: var(--key-text); font-weight: 600; list-style: none; }
.rc details summary::-webkit-details-marker { display: none; }
.rc details p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.match-flag { background: var(--tally-soft); color: var(--tally); }
.src { font: 500 10px/1 var(--f-mono); letter-spacing: .05em; padding: 4px 6px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.svc-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.svc-card.issue { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.svc-card.major { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.svc-card .hd { display: flex; align-items: center; gap: 10px; }
.svc-card .hd b { font-weight: 600; font-size: 15.5px; }
.svc-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.star { border: 0; background: transparent; color: var(--ink-3); padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; margin-left: auto; }
.star[aria-pressed="true"] { color: var(--key); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.wx { padding: 16px 18px; display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 4px 14px; }
.wx .rail-sev { grid-row: 1 / span 4; border-radius: 3px; }
.wx .rail-sev.Extreme { background: var(--bad); } .wx .rail-sev.Severe { background: var(--warn); }
.wx .ev { font: 800 20px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }

/* watch: matrix + plans */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.matrix th, .matrix td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.matrix thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--ink-2); z-index: 1; }
.matrix th.rowh { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 600; z-index: 2; }
.matrix thead th.rowh { z-index: 3; background: var(--surface-2); }
.matrix td.y { color: var(--go); font-weight: 700; }
.matrix td.n { color: var(--line-2); }
.matrix th.mine { color: var(--key-text); }
.matrix tr.grp th { background: var(--surface-2); text-align: left; font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.plan { padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.plan.best { border: 2px solid var(--key); padding: 17px; }
.plan .price { font: 800 34px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.plan .price small { font: 500 12px var(--f-mono); color: var(--ink-3); margin-left: 4px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--go); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }

/* sheet (game detail) + modal */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: flex; justify-content: flex-end; animation: fade .18s ease-out; }
.sheet {
  width: min(560px, 100%); height: 100%; background: var(--paper); overflow-y: auto; box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
  display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2,.8,.2,1);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-body { padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 22px; }
.sheet h3 { font: 800 18px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 640px) {
  .scrim { align-items: flex-end; }
  .sheet { height: 92%; border-radius: 18px 18px 0 0; animation: rise .24s cubic-bezier(.2,.8,.2,1); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
.dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.inj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; font-size: 13.5px; }
.inj + .inj { border-top: 1px solid var(--line); }
.inj small { grid-column: 1 / -1; color: var(--ink-3); }
.diamond { width: 30px; height: 30px; position: relative; }
.diamond i { position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--ink-3); transform: rotate(45deg); }
.diamond i.on { background: var(--key); border-color: var(--key); }
.diamond i:nth-child(1) { right: 2px; top: 10px; } .diamond i:nth-child(2) { left: 10px; top: 2px; } .diamond i:nth-child(3) { left: 2px; top: 10px; }

/* ask */
.ask { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: min(72vh, 760px); }
.msgs { display: flex; flex-direction: column; gap: 14px; padding: 18px; overflow-y: auto; }
.msg { max-width: min(680px, 92%); padding: 12px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.ai p + p, .msg.ai ul + p, .msg.ai p + ul { margin-top: 8px; }
.msg.ai ul { margin: 6px 0 0; padding-left: 20px; }
.msg.err { background: var(--bad-soft); color: var(--bad); border: 0; }
.msg .tools { margin-top: 8px; font: 400 10.5px/1.5 var(--f-mono); color: var(--ink-3); }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.thinking { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-3); font-size: 13px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tally 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }

/* me / setup */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.team-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 0; }
.team-btn:hover { border-color: var(--line-2); }
.team-btn[aria-pressed="true"] { border-color: var(--key); background: var(--key-soft); }
.team-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.team-btn .ck { margin-left: auto; color: var(--key); }
.svc-pick { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.svc-pick[aria-pressed="true"] { border-color: var(--key); background: var(--key-soft); }
.svc-pick .grow { flex: 1; min-width: 0; }
.svc-pick small { display: block; color: var(--ink-3); font-size: 12.5px; }
.svc-pick .price { font: 500 12px var(--f-mono); color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.wizard-bar { position: sticky; bottom: env(safe-area-inset-bottom, 0px); z-index: 5; background: var(--paper); padding-block: 12px; border-top: 1px solid var(--line); }
@media (max-width: 980px) { .wizard-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } }
.chip[disabled] { opacity: .5; cursor: not-allowed; }
.steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.steps span { font: 500 11px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.steps span.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.steps span.done { color: var(--go); border-color: color-mix(in srgb, var(--go) 40%, var(--line)); }

/* empty, skeleton, toast */
.empty { padding: 28px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { color: var(--ink); font-weight: 600; }
.skel { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 90; box-shadow: var(--shadow); animation: rise .2s ease-out; max-width: calc(100% - 32px); }
@media (max-width: 980px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.foot-note { font-size: 12.5px; color: var(--ink-3); max-width: 80ch; }
.linkish { border: 0; background: none; padding: 0; color: var(--key-text); font-weight: 600; font-size: inherit; }
.linkish:hover { text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .search { flex: 1 1 240px; }
.show-sm { display: none; }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .show-sm { display: flex; }
  .row { padding: 12px 14px; gap: 10px; }
  .timecol { width: 58px; font-size: 12.5px; }
  .row .badge { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; }
  .page-head h1 { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ v2: server-rendered site */
a.row, a.bug, a.head-card, a.svc-card, a.team-btn, a.chip, a.side-t, a.state, a.chan-card { text-decoration: none; color: inherit; }
a.row:hover { background: var(--surface-2); }
a.bug:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
a.chip:hover { color: var(--ink); }
.cov:empty { display: none; }
.row.mine { box-shadow: inset 3px 0 0 var(--key); }
.pair { display: flex; flex: none; }
.pair .badge + .badge { margin-left: -2px; box-shadow: 0 0 0 2px var(--surface); }
.row-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.row-chips.show-sm { margin-top: 6px; display: none; }
@media (max-width: 640px) { .row-chips.show-sm { display: flex; } }
.hide-sm.row-chips { justify-content: flex-end; max-width: 220px; }
.rank-n { font: 800 18px/1 var(--f-display); color: var(--ink-3); width: 24px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.rank-grid .row { border-bottom: 1px solid var(--line); }
.col { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.h2 { font: 800 22px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.h3 { font: 800 16px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.answer { font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 72ch; padding: 14px 18px; border-left: 3px solid var(--key); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; }
.answer a { color: var(--key-text); }
.prose { max-width: 72ch; }
.prose p, .prose-p { color: var(--ink-2); line-height: 1.65; max-width: 72ch; }
.prose p + p { margin-top: 10px; }
.big-search .input { min-height: 50px; font-size: 16px; }
.big-search { max-width: 680px; }
.chan-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.setup-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-style: dashed; }
.watch-col { display: flex; flex-direction: column; gap: 8px; }
.wrow .svc a { color: inherit; text-decoration: none; }
.wrow .svc a:hover b { text-decoration: underline; }
.wrow.flat { border-radius: 0; border: 0; }
.list > .wrow.flat + .wrow.flat { border-top: 1px solid var(--line); }
.inj-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.hero-ev { font: 800 clamp(26px, 4vw, 42px)/1 var(--f-display); text-transform: uppercase; }
.hero-ev a { color: inherit; text-decoration: none; }
.hero .side-t:hover .tn { text-decoration: underline; text-decoration-thickness: 2px; }
.meter-sm { width: 70px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; display: inline-block; vertical-align: middle; }
.meter-sm i { display: block; height: 100%; background: var(--go); border-radius: 3px; }
.meter-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.miss-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.miss-list a { color: inherit; }
.price-big { font: 800 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.price-big small { font: 500 12px var(--f-mono); color: var(--ink-3); margin-left: 2px; }
.pill-lg { font-size: 14px; padding: 6px 12px; }
.rc h3.tt, .wx h3.ev { margin: 0; }
.rc h3.tt a { color: inherit; text-decoration: none; }
.rc h3.tt a:hover { text-decoration: underline; }
.svc-card .hd { justify-content: space-between; }
a.svc-card:hover { border-color: var(--line-2); }

/* team page header */
.team-head .team-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.team-head h1 { overflow-wrap: break-word; }
.follow[aria-pressed="true"] { background: var(--key-soft); border-color: var(--key); color: var(--key-text); }
.follow[aria-pressed="true"] svg { fill: currentColor; }
[data-svc-have][aria-pressed="true"] { background: var(--go-soft); border-color: transparent; color: var(--go); }

/* tables: standings, services */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl thead th { font: 500 11px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.tbl .l { text-align: left; }
.tbl th.l a { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.tbl th.l a:hover span { text-decoration: underline; }
.tbl th[scope="row"] { font-weight: 600; }

/* weather states */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 6px; }
.state { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 13px; }
.state b { font: 600 11px var(--f-mono); color: var(--ink-3); width: 22px; }
.state span:not(.pill) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state.has { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.state:hover { border-color: var(--line-2); }

/* breadcrumbs */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs + .page-head { margin-top: -16px; }

/* ---------------- shell: sidebar
   Collapsed to icons by default. Hovering (or tabbing into) it opens the full sidebar
   over the page without moving the page; the pin button keeps it open beside the page. */
.shell { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.shell .main { flex: 1; }
.app[data-rail="closed"] { --rail: 76px; }
.rail { width: var(--rail); z-index: 40; overflow: hidden; transition: width .18s ease, box-shadow .18s ease, padding .18s ease; }
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-toggle { width: 34px; height: 34px; flex: none; }
.rail-toggle[aria-pressed="true"] { color: var(--key-text); border-color: color-mix(in srgb, var(--key) 45%, var(--line)); background: var(--key-soft); }
.rail .nav a { position: relative; white-space: nowrap; }
/* The league list takes the space left between the sections and the footer card, and scrolls. */
.rail-leagues { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; border-top: 1px solid var(--line); flex: 1 1 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rail .nav { flex: none; }
.rail-foot { flex: none; }
.rail-leagues .eyebrow { padding: 10px 10px 6px; }
.rail-leagues a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; white-space: nowrap; }
.rail-leagues a:hover { background: var(--surface-2); color: var(--ink); }
.install-btn { width: 100%; }

/* Collapsed and not hovered: icons only. */
.app[data-rail="closed"] .rail:not(.peek) { padding-inline: 10px; align-items: center; }
.app[data-rail="closed"] .rail:not(.peek) .lbl { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app[data-rail="closed"] .rail:not(.peek) .rail-top { flex-direction: column; }
.app[data-rail="closed"] .rail:not(.peek) .brand { padding: 0; }
.app[data-rail="closed"] .rail:not(.peek) .nav { width: 100%; align-items: center; }
.app[data-rail="closed"] .rail:not(.peek) .nav a { width: 48px; height: 44px; justify-content: center; padding: 0; }
.app[data-rail="closed"] .rail:not(.peek) .nav a .count { position: absolute; top: 5px; right: 4px; padding: 2px 4px; font-size: 9px; }
.app[data-rail="closed"] .rail:not(.peek) .me-card { padding: 8px; justify-content: center; border-color: transparent; background: transparent; }
.app[data-rail="closed"] .rail:not(.peek) .me-card .stack .badge:not(:first-child) { display: none; }
.app[data-rail="closed"] .rail:not(.peek) .install-btn { width: 44px; padding: 0; }
.app[data-rail="closed"] .rail:not(.peek) .rail-foot { align-items: center; }

/* Collapsed and hovered or focused: the full sidebar floats over the page. */
.app[data-rail="closed"] .rail.peek { width: 248px; box-shadow: 18px 0 44px -20px rgba(12, 21, 36, .38); }

/* ---------------- footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding-inline: clamp(16px, 3.2vw, 44px); padding-block: 32px 110px; }
.foot-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 24px; }
.foot-grid h2 { font: 500 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { max-width: 1240px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.foot-base p { flex: 1; min-width: 240px; font-size: 12.5px; color: var(--ink-3); max-width: 90ch; }
.foot-base a { color: var(--ink-2); }
@media (min-width: 981px) { .site-foot { padding-bottom: 40px; } }

/* ---------------- mobile: tab bar "More" and drawer */
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--ink-3); font-size: 11px; font-weight: 500; border: 0; background: transparent; border-radius: 8px; }
.tabbar button[aria-expanded="true"] { color: var(--key-text); }
.drawer { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: flex; justify-content: flex-end; animation: fade .18s ease-out; }
.drawer-panel { width: min(340px, 88%); height: 100%; overflow-y: auto; background: var(--paper); padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 6px; animation: slide .22s cubic-bezier(.2,.8,.2,1); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.drawer-nav, .drawer-leagues { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a, .drawer-leagues a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 500; }
.drawer-leagues a { padding: 8px; font-weight: 400; color: var(--ink-2); }
.drawer-nav a:hover, .drawer-leagues a:hover { background: var(--surface-2); }
body.drawer-open { overflow: hidden; }
@media (min-width: 981px) { .drawer { display: none !important; } }

/* Wordmark: "Where's it on?" with the question mark in the tally color. */
.brand-word { font-size: 22px; white-space: nowrap; letter-spacing: .03em; }
.brand-word .q { color: var(--tally); margin-left: 1px; }
.topbar .brand-word { font-size: 20px; }
.rail .brand-word { font-size: 19px; }
.rail .brand { gap: 8px; padding: 0 4px; min-width: 0; }

/* Short screens: a tighter nav, a leagues list that always shows a few rows, and a sidebar
   that scrolls as a whole when it still doesn't fit. */
.rail { overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-leagues { min-height: 150px; }
.app[data-rail="closed"] .rail:not(.peek) .rail-leagues { min-height: 0; }
@media (max-height: 860px) {
  .rail { gap: 14px; padding-top: 16px; }
  .nav a { padding: 7px 10px; }
}

/* Long headings (recall headlines, long show names) step down a size. */
.page-head h1.long { font-size: clamp(26px, 3.6vw, 40px); line-height: 1; }
