/* Layout: navy scoreboard band that holds the search; cool court-floor page; ledger-style match rows; division rail beside the list on wide screens */
:root {
  --bg: #F2F4F7; --surface: #FFFFFF; --surface-2: #F6F7FA; --ink: #131923; --muted: #586274; --faint: #8A93A3; --line: #E0E4EA;
  --accent: #F26A1B; --accent-ink: #B4460A; --accent-soft: #FDECDF;
  --band: #14203A; --band-2: #1C2B4A; --band-ink: #F1F4FA; --band-muted: #A7B3C9; --band-line: rgba(255,255,255,.10);
  --live: #D9333A; --live-soft: #FCE6E7; --win: #1D7F55; --win-soft: #E2F4EA; --focus: #2B6CF6;
  --shadow: 0 1px 2px rgba(19,25,35,.06), 0 10px 28px rgba(19,25,35,.10);
  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top-h: 64px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0C111A; --surface: #141B27; --surface-2: #192131; --ink: #E8ECF3; --muted: #9AA4B6; --faint: #6D788C; --line: #242E40;
  --accent: #FF7A2E; --accent-ink: #FF9C60; --accent-soft: #3A2415;
  --band: #0A0F19; --band-2: #131C2E; --band-ink: #EEF2F8; --band-muted: #8E9AB0; --band-line: rgba(255,255,255,.08);
  --live: #FF5D63; --live-soft: #3A1A1E; --win: #46C98F; --win-soft: #15301F; --focus: #6E9DFF;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.40); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0C111A; --surface: #141B27; --surface-2: #192131; --ink: #E8ECF3; --muted: #9AA4B6; --faint: #6D788C; --line: #242E40;
  --accent: #FF7A2E; --accent-ink: #FF9C60; --accent-soft: #3A2415;
  --band: #0A0F19; --band-2: #131C2E; --band-ink: #EEF2F8; --band-muted: #8E9AB0; --band-line: rgba(255,255,255,.08);
  --live: #FF5D63; --live-soft: #3A1A1E; --win: #46C98F; --win-soft: #15301F; --focus: #6E9DFF;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.40); color-scheme: dark;
}

* { box-sizing: border-box; }
: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%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--band); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1240px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / search ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); color: var(--band-ink); }
.top-in { position: relative; padding-block: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search actions"; align-items: center; gap: 12px 20px; }
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--band-ink); }
.brand .mark { flex: none; }
.wm { display: grid; gap: 2px; }
.wm small { font: 600 10px/1 var(--f-body); letter-spacing: .34em; text-transform: uppercase; color: var(--band-muted); padding-left: 1px; }
.wm b { font: 700 25px/.9 var(--f-display); letter-spacing: .035em; text-transform: uppercase; }
.brand .tag { align-self: flex-start; margin-top: 2px; font: 700 9px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 3px 4px; }
.hero-copy { grid-area: copy; display: none; position: relative; z-index: 1; }
.top-actions { grid-area: actions; display: flex; gap: 8px; justify-self: end; }
.tbtn { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--band-line); color: var(--band-ink); height: 38px; border-radius: 9px; padding: 0 12px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tbtn:hover { background: var(--band-2); }
.tbtn .n { font: 700 13px/1 var(--f-display); background: var(--accent); color: #fff; border-radius: 99px; padding: 3px 7px 2px; }
.tbtn .n[data-zero] { background: var(--band-2); color: var(--band-muted); }
.search { grid-area: search; position: relative; max-width: 680px; width: 100%; z-index: 2; }
.sbox { position: relative; }
.search input { width: 100%; height: 44px; border-radius: 10px; border: 2px solid transparent; background: var(--surface); color: var(--ink); padding: 0 46px 0 42px; font-size: 16px; font-weight: 500; }
.search input::placeholder { color: var(--faint); font-weight: 400; }
.search input:focus { outline: none; border-color: var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }
.s-ico { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.s-kbd { position: absolute; right: 10px; top: 50%; translate: 0 -50%; font: 600 12px/1 var(--f-body); color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; background: var(--surface-2); }
.court { display: none; position: absolute; right: 0; bottom: 0; width: 520px; max-width: 60%; height: auto; pointer-events: none; }

body.is-home .top { position: relative; top: auto; }
body.is-home .top-in { grid-template-columns: auto 1fr auto; grid-template-areas: "brand . actions" "copy copy copy" "search search search"; padding-block: 14px 40px; }
body.is-home .hero-copy { display: block; padding-top: 28px; }
body.is-home .hero-copy h1 { font: 700 clamp(38px, 6.4vw, 64px)/.95 var(--f-display); text-transform: uppercase; letter-spacing: .01em; max-width: 14ch; }
body.is-home .hero-copy h1 em { font-style: normal; color: var(--accent); }
body.is-home .hero-copy p { color: var(--band-muted); max-width: 56ch; margin: 12px 0 4px; font-size: 16px; }
body.is-home .search { max-width: 760px; }
body.is-home .search input { height: 56px; font-size: 18px; border-radius: 12px; padding-left: 48px; }
body.is-home .s-ico { left: 16px; width: 20px; height: 20px; }
body.is-home .court { display: block; }

.sr { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: min(70vh, 560px); overflow: auto; padding: 6px; z-index: 50; }
.sr-g { display: flex; justify-content: space-between; font: 700 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 6px; }
.sr-i { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sr-i[aria-selected="true"], .sr-i:hover { background: var(--accent-soft); }
.sr-t { font-weight: 600; overflow-wrap: anywhere; }
.sr-s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sr-m { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.sr-foot { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sr-empty { padding: 18px 12px; color: var(--muted); }
mark { background: none; color: var(--accent-ink); font-weight: 700; }
.ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ico svg { width: 16px; height: 16px; }
.ico.team { color: var(--accent-ink); }

/* ---------- page ---------- */
main { padding-block: 20px 56px; min-height: 60vh; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.crumbs .sep { color: var(--faint); }
.crumbs .cur { color: var(--ink); font-weight: 600; }
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.ph-main { display: flex; gap: 16px; align-items: center; min-width: 0; }
.ph h1 { font: 700 clamp(28px, 4.2vw, 40px)/1.02 var(--f-display); letter-spacing: .005em; }
.ph .sub { color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ph .sub b { color: var(--ink); font-weight: 600; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font: 700 12px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.btn svg { width: 16px; height: 16px; }
.sec { margin-top: 34px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-h h2 { font: 700 24px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.sec-h p { margin: 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 22px; }
.empty b { color: var(--ink); }
.note { font-size: 13px; color: var(--muted); }
.banner { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px 3px; border-radius: 5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.live { background: var(--live-soft); color: var(--live); border-color: transparent; }
.pill.live::before, .fresh.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
.pill.next { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.won { background: var(--win-soft); color: var(--win); border-color: transparent; }
.pill.full { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.fresh { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--f-body); letter-spacing: .02em; text-transform: none; color: var(--muted); }
.fresh.live { color: var(--live); }
@keyframes pulse { 50% { opacity: .3; } }

/* team logos with initials underneath for when there's no image */
.lg { --s: 22px; flex: none; position: relative; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font: 700 calc(var(--s) * .42)/1 var(--f-display); color: var(--muted); letter-spacing: .02em; }
.lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.lg.big { --s: 64px; border-width: 2px; }

/* loading placeholders */
.sk { display: grid; gap: 10px; }
.sk i { display: block; height: 58px; border-radius: 12px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- home ---------- */
.tryline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; color: var(--band-muted); font-size: 14px; position: relative; z-index: 1; }
.tryline button { background: var(--band-2); border: 1px solid var(--band-line); color: var(--band-ink); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 14px; }
.tryline button:hover { border-color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--ink); min-width: 0; }
a.card:hover { border-color: var(--accent); }
.card h3 { font: 700 20px/1.1 var(--f-display); }
.card .k { font-size: 13px; color: var(--muted); }
.card .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--faint); }
.bar i.l { background: var(--live); }
.dir { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.dir-top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button .c { font-weight: 500; color: var(--faint); margin-left: 4px; }
.field { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; min-width: 0; width: 100%; max-width: 300px; }
.field:focus { outline: none; border-color: var(--accent); }
.az { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; }
.az a { font: 600 14px/1 var(--f-display); text-decoration: none; color: var(--muted); padding: 6px 7px; border-radius: 6px; }
.az a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.dir-list { columns: 3 250px; column-gap: 28px; }
.dir-l { font: 700 18px/1 var(--f-display); color: var(--accent-ink); padding: 14px 0 4px; break-after: avoid; }
.dir-i { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); break-inside: avoid; font-size: 14px; }
.dir-i:hover { color: var(--accent-ink); }
.dir-i span:last-child { color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------- competition layout ---------- */
.cgrid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.rail { position: sticky; top: calc(var(--top-h) + 14px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - var(--top-h) - 28px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.rail-h { display: flex; justify-content: space-between; align-items: baseline; font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 4px 0 10px; }
.rail .field { max-width: none; margin-bottom: 10px; }
.dv-all { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; margin-bottom: 6px; }
.dv-all.on, .chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.dg { padding: 8px 0; border-top: 1px solid var(--line); }
.dg-h { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-block; text-decoration: none; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 500; color: var(--ink); }
.chip:hover { border-color: var(--accent); }
.tlist { display: grid; gap: 2px; margin-top: 4px; }
.tlist a { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 8px; border-radius: 7px; font-size: 14px; }
.tlist a span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tlist a:hover { background: var(--accent-soft); }
.tlist .st { color: var(--accent); }
.rail-toggle { display: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar .field { max-width: 280px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; scrollbar-width: thin; }
.tab { flex: none; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-width: 84px; }
.tab .d { font: 600 16px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.tab .c { font-size: 12px; color: var(--muted); }
.tab .r { font: 700 10px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.tab[aria-pressed="true"] { background: var(--band); border-color: var(--accent); color: var(--band-ink); box-shadow: inset 0 -3px 0 var(--accent); }
.tab[aria-pressed="true"] .c { color: var(--band-muted); }
.tab[aria-pressed="true"] .r { color: var(--accent); }
.dayh { display: flex; align-items: baseline; gap: 10px; font: 700 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; margin: 18px 0 8px; flex-wrap: wrap; }
.dayh:first-child { margin-top: 4px; }
.dayh small { font: 500 13px var(--f-body); color: var(--muted); text-transform: none; letter-spacing: 0; }

/* ---------- match rows ---------- */
.ml { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
/* Each row opens its game page; the chevron says so */
.m { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr) minmax(0, 250px); gap: 6px 16px; padding: 12px 36px 12px 16px; align-items: center; cursor: pointer; border-top: 1px solid var(--line); }
.m::after { content: "›"; position: absolute; right: 14px; top: 50%; translate: 0 -50%; font: 400 24px/1 var(--f-body); color: var(--faint); }
.m:hover::after { color: var(--accent-ink); }
.m.nolink { cursor: default; }
.m.nolink::after { content: none; }
.m.cur { background: var(--accent-soft); }
.m:first-child { border-top: 0; }
.m:hover { background: var(--surface-2); }
.m-time { font-variant-numeric: tabular-nums; }
.m-time .dd { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.m-time b { font: 600 24px/1 var(--f-display); letter-spacing: .01em; }
.m-time span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }
.m-teams { display: grid; gap: 3px; min-width: 0; }
.mt { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 1px 0; }
.mt .tn { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 16px; }
a.mt:hover .tn { color: var(--accent-ink); text-decoration: underline; }
.mt .sc { font: 700 24px/1 var(--f-display); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; }
.mt.win .tn { font-weight: 700; }
.mt.lose { color: var(--muted); }
.mt.me .tn { color: var(--accent-ink); font-weight: 700; }
.mt.bye { color: var(--faint); font-style: italic; }
.m-meta { display: grid; gap: 4px; font-size: 13px; color: var(--muted); justify-items: start; min-width: 0; }
.m-meta .v { color: var(--ink); overflow-wrap: anywhere; }

/* ---------- courts view ---------- */
.vz { margin-bottom: 22px; }
.vz-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.vz-h h3 { font: 700 20px/1.1 var(--f-display); }
.vz-h h3 a { text-decoration: none; }
.vz-h h3 small { font: 400 14px var(--f-body); color: var(--muted); margin-left: 6px; }
.vz-h > a { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.cg { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.cc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.cc-h { background: var(--band); color: var(--band-ink); font: 700 15px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; padding: 9px 12px; display: flex; justify-content: space-between; }
.cc-h span { color: var(--band-muted); font-weight: 500; }
.cm { padding: 9px 12px; border-top: 1px solid var(--line); display: grid; gap: 3px; font-size: 14px; }
.cc-h + .cm { border-top: 0; }
.cm .t { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.cm .t b { font: 600 15px/1 var(--f-display); color: var(--ink); }
.cm .mt .tn { font-size: 14px; }
.cm .mt .sc { font-size: 18px; }
.cm .lg { --s: 18px; }

/* ---------- ladder ---------- */
.lad-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.lad { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.lad th { font: 700 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: right; padding: 12px 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lad td { padding: 9px 10px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.lad tr:first-child td { border-top: 0; }
.lad th:nth-child(2), .lad td:nth-child(2) { text-align: left; width: 100%; white-space: normal; }
.lad th:first-child, .lad td:first-child { text-align: center; width: 1%; }
.lad td:first-child { font: 700 18px/1 var(--f-display); color: var(--muted); }
.lad .tm { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; min-width: 140px; }
.lad .tm:hover span:last-child { color: var(--accent-ink); text-decoration: underline; }
.lad .pts { font: 700 18px/1 var(--f-display); }
.lad tr.me td { background: var(--accent-soft); }
.lad .form { justify-content: flex-end; }
.lad .form i { width: 20px; height: 20px; font-size: 12px; }

.cm[data-href] { cursor: pointer; }
.cm[data-href]:hover { background: var(--surface-2); }

/* ---------- game page ---------- */
.sb { background: var(--band-2); border: 1px solid var(--band-line); color: var(--band-ink); border-radius: 16px; padding: 24px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px 20px; align-items: center; }
.sb-team { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; }
.sb-team.lose { opacity: .65; }
.sb-link { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--band-ink); min-width: 0; }
.sb-link:hover .sb-name { text-decoration: underline; }
.sb-name { font: 700 clamp(20px, 2.8vw, 28px)/1.05 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
.sb-pos { font-size: 13px; color: var(--band-muted); }
.sb .lg.big { --s: 72px; }
.sb .btn.sm { height: 30px; padding: 0 10px; font-size: 13px; background: transparent; color: var(--band-ink); border-color: var(--band-line); }
.sb .btn.sm.on { color: var(--accent); border-color: var(--accent); }
.sb-mid { display: grid; justify-items: center; gap: 8px; text-align: center; }
.sb-score { display: flex; align-items: baseline; gap: 12px; font: 700 clamp(48px, 8vw, 76px)/.9 var(--f-display); font-variant-numeric: tabular-nums; }
.sb-score i { font-style: normal; font-weight: 500; color: var(--band-muted); }
.sb-time b { display: block; font: 700 clamp(44px, 7vw, 64px)/.9 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.sb-time span { font-size: 13px; color: var(--band-muted); text-transform: uppercase; letter-spacing: .05em; }
.sb-when { font-size: 14px; color: var(--band-muted); min-height: 1em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-top: 12px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.fact .fl { font: 700 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.fact b { font-weight: 600; overflow-wrap: anywhere; }
.fact b a { color: inherit; }
.fact span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.fact span a { color: var(--accent-ink); font-weight: 600; }
.fact .moved { color: var(--accent-ink); font-weight: 600; }
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.side-h { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1.1 var(--f-display); }
.side-h span:last-child { overflow-wrap: anywhere; }
.side-h:hover span:last-child { color: var(--accent-ink); text-decoration: underline; }
.side .stats { margin: 12px 0 8px; }
.side p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.side p a { color: var(--ink); }

/* ---------- team view ---------- */
.board { background: var(--band-2); border: 1px solid var(--band-line); color: var(--band-ink); border-radius: 16px; padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; }
.board .lbl { font: 700 12px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.board .vs { font: 700 clamp(24px, 3.6vw, 34px)/1.05 var(--f-display); text-transform: uppercase; }
.board .vs span { color: var(--band-muted); font-weight: 500; padding: 0 .3em; }
.board .where { color: var(--band-muted); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.board .where a { color: var(--band-ink); }
.board .when { text-align: right; }
.board .when b { display: block; font: 700 clamp(36px, 6vw, 56px)/.9 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.board .when span { color: var(--band-muted); font-size: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 4px; align-items: center; }
.stat b { font: 700 28px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.stat a { color: inherit; }
.form { display: flex; gap: 4px; }
.form i { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font: 700 14px/1 var(--f-display); font-style: normal; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.form i.w { background: var(--win-soft); color: var(--win); border-color: transparent; }

/* ---------- org view ---------- */
.clist { display: grid; gap: 8px; }
.ci { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.ci:hover { border-color: var(--accent); }
.ci h3 { font: 600 19px/1.15 var(--f-display); letter-spacing: .01em; }
.ci .k { font-size: 13px; color: var(--muted); }
.ci .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
details.more > summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; margin: 10px 0; }

/* ---------- drawers, toast, footer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,12,20,.45); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--bg); z-index: 61; overflow: auto; box-shadow: var(--shadow);
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 20px; }
.drawer h2 { font: 700 28px/1 var(--f-display); text-transform: uppercase; }
.drawer h3 { font: 700 18px/1.15 var(--f-display); text-transform: uppercase; letter-spacing: .03em; margin: 22px 0 8px; }
.drawer p, .drawer li { color: var(--muted); }
.drawer ul { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.drawer strong { color: var(--ink); }
.dr-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.opt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 10px; }
.opt h4 { margin: 0 0 4px; font: 700 18px/1.1 var(--f-display); }
.opt p { margin: 0; font-size: 14px; }
.opt .tag { float: right; }
.toast { position: fixed; left: 50%; translate: -50% 0; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--band); color: var(--band-ink); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 70; font-weight: 600; }
footer { border-top: 1px solid var(--line); padding-block: 18px 28px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

@media (max-width: 960px) {
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; display: none; }
  .rail.open { display: block; }
  .rail-toggle { display: flex; width: 100%; justify-content: space-between; margin-bottom: 10px; }
}
@media (max-width: 720px) {
  .top-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "search search"; }
  body.is-home .top-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "copy copy" "search search"; padding-block: 12px 28px; }
  .tbtn .lbl { display: none; }
  .s-kbd { display: none; }
  /* Phones: the wordmark collapses to "Unplugged" */
  .wm small, .brand .tag { display: none; }
  .wm b { font-size: 24px; }
  .m { grid-template-columns: 62px minmax(0, 1fr); padding: 12px 32px 12px 12px; }
  .m::after { right: 10px; }
  .sb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 18px 14px; }
  .sb-mid { grid-column: 1 / -1; order: -1; }
  .sb-team { align-self: start; }
  .sb .lg.big { --s: 52px; }
  .sides { grid-template-columns: minmax(0, 1fr); }
  .m-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
  .m-time b { font-size: 21px; }
  .mt .lg { --s: 18px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board .when { text-align: left; }
  .toolbar .field { max-width: none; }
  .lad .opt-col { display: none; }
  .lg.big { --s: 48px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
