/* EsportsWatch, Fight Night.
   Two families: Big Shoulders Display for everything that is a scoreboard
   (tags, scores, times, positions), Archivo with its width axis for the
   graphics-package text. Black and white, plus small colours with one meaning
   each: red block + dot = on air now, gold = what is at stake (main event,
   prize), green = a win (and the EW mark), a deeper red as text or outline =
   a loss, blue = time to go. Square corners; the one shape is a 12-degree
   broadcast slant. */

:root {
  --cut: 9px;
  --bar: 56px; --crawl: 50px; --strip-h: 0px;
  --display: 'Big Shoulders Display', 'Archivo', system-ui, sans-serif;
  --text: 'Archivo', system-ui, sans-serif;
  --pad: 40px;
}
[data-theme='dark'] {
  --bg: #000; --ink: #fff; --mute: #9a9a9a; --faint: #5c5c5c; --line: #262626; --panel: #111; --panel2: #1c1c1c;
  --red: #ff3b1f; --red-bg: #d8280e; --gold: #f5b700; --gold-fg: #f5b700; --gold-mark: #f5b700; --plate: #f0f0f0; --ghost: #0f0f0f;
  --win: #2fd36f; --win-on: #000; --loss: #ea4f66; --time: #5aa9ff; --logo: #2fd36f;
  --sk: #1d1d1d; color-scheme: dark;
}
[data-theme='light'] {
  --bg: #fff; --ink: #000; --mute: #616161; --faint: #a8a8a8; --line: #dcdcdc; --panel: #f2f2f2; --panel2: #e6e6e6;
  --red: #d8280e; --red-bg: #d8280e; --gold: #f2b100; --gold-fg: #8f6500; --gold-mark: #b88200; --plate: #fff; --ghost: #f2f2f2;
  --win: #087236; --win-on: #fff; --loss: #a61f3b; --time: #1a58c4; --logo: #087236;
  --sk: #e8e8e8; color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.35 var(--text); font-variation-settings: 'wdth' 100;
  min-height: 100vh; padding-bottom: calc(var(--crawl) + env(safe-area-inset-bottom)); font-feature-settings: 'tnum'; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; flex: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 50; background: var(--ink); color: var(--bg); padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 800; }
.skip:focus { top: 8px; }
.noscript { padding: 40px; font-weight: 700; }
.mute { color: var(--mute); }

/* the slant */
.belt, .g, .bug-plate, .onair, .btn, .follow, .crawl-tag, .gtab, .chip, .seg button, .pip, .tick { clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }

/* ---------- boot ---------- */
#bootLoader { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); transition: opacity .25s; }
#bootLoader.out { opacity: 0; pointer-events: none; }
.bug-plate.big { height: 64px; font-size: 44px; padding: 0 34px 0 30px; clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%); animation: wipe .9s cubic-bezier(.2,.8,.2,1) infinite alternate; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; height: var(--bar); display: flex; align-items: center; gap: 18px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); }
.bug { position: relative; display: inline-flex; flex: none; }
.bug-plate { display: inline-grid; place-items: center; height: 30px; padding: 0 17px 0 15px; background: var(--logo); color: var(--bg); font: 900 20px/1 var(--display); letter-spacing: .02em; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.tally { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; animation: pulse 1.4s ease-in-out infinite; }
.tally[hidden] { display: none; }
.bug .tally { position: absolute; top: 4px; right: 10px; width: 6px; height: 6px; }
.word { font: 800 17px/1 var(--text); font-variation-settings: 'wdth' 125; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: 18px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; height: var(--bar); padding: 0 12px; font: 600 14px/1 var(--text); font-variation-settings: 'wdth' 112; color: var(--mute); white-space: nowrap; }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.n-short { display: none; }
.n-count { font: 800 12px/1 var(--text); color: var(--bg); background: var(--ink); padding: 3px 5px; }
.n-count:empty { display: none; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.clock { font: 500 13px/1 var(--text); color: var(--mute); font-variation-settings: 'wdth' 110; white-space: nowrap; margin-right: 6px; }
.clock b { color: var(--ink); font-weight: 700; }
.ib, .tb { height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); font: 600 13px/1 var(--text); font-variation-settings: 'wdth' 112; position: relative; }
.tb .dot { font: 800 12px/1 var(--text); background: var(--ink); color: var(--bg); padding: 3px 5px; }
.theme span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
#searchBtn { display: none; }
.search { position: relative; }
.search input { width: 250px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 14px/1 var(--text); border-radius: 0; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--mute); }
.search input:focus { border-color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search-close { display: none; }
.search-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--ink); display: none; z-index: 30; }
.search-pop.open { display: block; }
.search-group { padding: 12px 14px 6px; font: 700 12px/1 var(--text); color: var(--mute); }
.search-hit { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 48px; text-align: left; border-top: 1px solid var(--line); }
.hit-name { font: 700 15px/1.1 var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-sub { font: 800 15px/1 var(--display); color: var(--mute); }
.search-empty { padding: 18px 14px; color: var(--mute); }

/* ---------- strip: on air, stale ---------- */
.strip { display: flex; align-items: stretch; background: var(--red-bg); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); font: 600 14px/1 var(--text); font-variation-settings: 'wdth' 110; }
.strip-a { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.strip b { font-weight: 800; white-space: nowrap; }
.strip .st { display: none; font: 900 22px/1 var(--display); text-transform: uppercase; }
.onair { display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; padding: 8px 17px 8px 15px; font-weight: 800; white-space: nowrap; }
.onair .tally { background: var(--red); }
.strip .g { background: rgba(0,0,0,.28); color: #fff; }
.strip-score { font: 900 30px/1 var(--display); display: inline-flex; gap: 6px; margin: 0 4px; }
.strip-score em { font-style: normal; opacity: .65; }
.strip .rounds { --pip: rgba(255,255,255,.5); --pip-run: #fff; --pip-mine: #fff; --pip-theirs: rgba(0,0,0,.45); }
.strip-meta { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.strip .plate { background: #fff; }
.strip-more { display: grid; place-items: center; padding: 0 22px; background: rgba(0,0,0,.25); font-weight: 800; white-space: nowrap; }
.stale { display: flex; align-items: center; gap: 14px; padding: 10px 28px; background: var(--ink); color: var(--bg); font: 600 14px/1.3 var(--text); }
.stale button { text-decoration: underline; font-weight: 800; min-height: 32px; }

/* ---------- shared atoms ---------- */
.plate { position: relative; display: inline-grid; place-items: center; background: var(--plate); flex: none; overflow: hidden; color: #000; }
[data-theme='light'] .plate { box-shadow: inset 0 0 0 1px var(--line); }
.plate b { font: 900 13px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.plate img { position: absolute; inset: 11%; width: 78%; height: 78%; object-fit: contain; opacity: 0; }
.plate img.ok { opacity: 1; }
.plate:has(img.ok) b { visibility: hidden; }
.plate.xs { width: 24px; height: 24px; } .plate.xs b { font-size: 11px; }
.plate.sm { width: 34px; height: 34px; } .plate.sm b { font-size: 11px; }
.plate.md { width: 52px; height: 52px; } .plate.md b { font-size: 16px; }
.plate.xl { width: 112px; height: 112px; } .plate.xl b { font-size: 34px; }
.plate.xxl { width: 200px; height: 200px; } .plate.xxl b { font-size: 60px; }
.plate.player { background: var(--panel2); color: var(--ink); }

.g { display: inline-grid; place-items: center; height: 22px; padding: 0 9px; white-space: nowrap; background: var(--ink); color: var(--bg); font: 800 11px/1 var(--text); font-variation-settings: 'wdth' 125; flex: none; }
.g.lg { height: 30px; font-size: 13px; padding: 0 16px; }

.rounds { display: inline-flex; gap: 4px; vertical-align: middle; flex: none; }
.pip { display: inline-block; width: 11px; height: 11px; --cut: 2.3px; background: var(--pip, var(--faint)); position: relative; }
.pip::after { content: ''; position: absolute; inset: 1.5px; background: var(--bg); clip-path: inherit; }
.pip.mine { background: var(--pip-mine, var(--ink)); } .pip.mine::after,
.pip.theirs::after, .pip.run::after, .pip.gold::after { display: none; }
.pip.theirs { background: var(--pip-theirs, var(--faint)); }
.pip.run { background: var(--pip-run, var(--red)); animation: pulse 1.4s ease-in-out infinite; }
.pip.gold { background: var(--gold-mark); }
.strip .pip::after { background: var(--red-bg); }

.fp { display: inline-flex; gap: 3px; }
.fp.none { font: 500 12px/1 var(--text); color: var(--mute); }
.f { width: 18px; height: 20px; display: grid; place-items: center; font: 800 11px/1 var(--text); font-style: normal; }
.f.w { background: var(--ink); color: var(--bg); }
.f.l { box-shadow: inset 0 0 0 1.5px var(--faint); color: var(--mute); }

.belt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 19px 8px 17px; font: 800 13px/1 var(--text); font-variation-settings: 'wdth' 120; white-space: nowrap; flex: none; }
.belt.gold { background: var(--gold); color: #000; }
.belt.red { background: var(--red-bg); color: #fff; }
.belt.red .tally { background: #fff; }
.belt.ink { background: var(--ink); color: var(--bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px 0 22px; font: 800 14px/1 var(--text); font-variation-settings: 'wdth' 115; white-space: nowrap; background: var(--panel2); color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn svg { width: 16px; height: 16px; }
.acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.follow { position: relative; isolation: isolate; min-height: 36px; padding: 0 18px 0 16px; font: 800 13px/1 var(--text); font-variation-settings: 'wdth' 115; background: var(--ink); color: var(--ink); white-space: nowrap; flex: none; }
.follow::after { content: ''; position: absolute; inset: 2px 2.5px; z-index: -1; background: var(--tile-bg, var(--bg)); clip-path: polygon(calc(var(--cut) - 1px) 0, 100% 0, calc(100% - var(--cut) + 1px) 100%, 0 100%); }
.follow.on { color: var(--bg); }
.follow.on::after { display: none; }
.follow.on::before { content: '✓ '; }
.tile.on { --tile-bg: var(--panel); }
.tower { --tile-bg: var(--panel); }
.follow.big { min-height: 44px; padding: 0 28px 0 26px; font-size: 15px; margin-top: 20px; }
.follow.sm { min-height: 32px; padding: 0 14px 0 12px; font-size: 12px; }
.calb { width: 44px; height: 44px; display: grid; place-items: center; color: var(--mute); flex: none; }
.calb svg { width: 20px; height: 20px; stroke-width: 1.8; }
.sq { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); }

.main-event, .cage, .state-page { container-type: inline-size; }
.ghost { position: absolute; z-index: 0; pointer-events: none; font: 900 min(var(--gmax, 470px), calc(186cqi / var(--glen, 6)))/.78 var(--display); text-transform: uppercase; color: var(--ghost); letter-spacing: -.02em; white-space: nowrap; left: -14px; top: 70px; user-select: none; }
.tri { display: block; font: 900 min(236px, calc(190cqi / var(--len, 2)))/.8 var(--display); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.tri.solid { color: var(--ink); }
.tri.outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.sk { display: block; background: var(--sk); animation: pulse 1.6s ease-in-out infinite; }
.sk-line { height: 11px; width: 80%; min-width: 40px; display: inline-block; }
.sk-form { width: 96px; height: 19px; }
.none { color: var(--mute); padding: 18px 0; }
.sec-h { font: 900 30px/1 var(--display); text-transform: uppercase; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-h small, .tower-head small, .page-head small, .div-head small { font: 500 13px/1 var(--text); color: var(--mute); text-transform: none; }
.lv { color: var(--red); }
.src-foot { display: none; }

/* ---------- tower (the card, the day, the live list) ---------- */
.tower { display: flex; flex-direction: column; background: var(--panel); min-height: 0; min-width: 0; }
.tower-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 22px 24px 14px; }
.tower-head h1, .tower-head h2 { font: 900 32px/1 var(--display); text-transform: uppercase; }
.tower-rows { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
.tw-sub { display: flex; align-items: center; gap: 8px; padding: 18px 24px 8px; font: 800 15px/1 var(--text); font-variation-settings: 'wdth' 118; border-top: 1px solid var(--line); }
.tw-sub small { color: var(--mute); font-weight: 600; }
.row { position: relative; display: flex; align-items: stretch; border-top: 1px solid var(--line); flex: 1 0 auto; min-height: 78px; max-height: 140px; }
.row .row-link { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px 60px 34px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 12px 8px 12px 20px; }
.row.off .row-link { padding-right: 24px; }
.row::before { content: ''; position: absolute; left: 0; top: -1px; bottom: 0; width: 4px; }
.row.is-main::before { background: var(--gold-mark); }
.row.is-live::before { background: var(--red); }
.row .calb { align-self: center; margin-right: 10px; }
.row .pos { font: 900 30px/1 var(--display); }
.row .who { display: grid; gap: 3px; min-width: 0; }
.row .who b { font: 800 23px/1 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who .v, .bout .v, .lrow .v { color: var(--mute); font-weight: 700; font-size: .7em; padding: 0 2px; }
.row .who small, .row .gap small { font: 500 12px/1.15 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who small.last b { font: 800 12px/1 var(--text); color: var(--ink); text-transform: none; }
.row .who small.last b.l { color: var(--mute); }
.row .gap { display: grid; justify-items: end; gap: 5px; text-align: right; }
.row .gap em { font: 800 22px/1 var(--display); font-style: normal; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.row .gap em.lv { color: var(--red); }
.row.off { min-height: 54px; max-height: 66px; }
.row.off .row-link { padding-top: 8px; padding-bottom: 8px; }
.row.off .pos { color: var(--mute); }
.row.off .g { background: transparent; color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--mute); clip-path: none; }
.row.off .who b { color: var(--ink); font-size: 19px; }
.row.off .plate.sm { width: 28px; height: 28px; }
.row.off .gap small { font-size: 12px; }
.row.build { animation: wipe .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(min(var(--i), 12) * 60ms + 120ms); }
.tower-foot { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-top: 1px solid var(--line); font: 700 14px/1 var(--text); font-variation-settings: 'wdth' 115; color: var(--mute); flex: none; }
.tower-foot::before { content: '+'; font-size: 20px; color: var(--ink); width: 14px; }
.sug { border-top: 1px solid var(--line); padding-bottom: 8px; }
.sug .tw-sub { border-top: 0; color: var(--mute); }
.sug-row { display: flex; align-items: center; gap: 12px; padding: 6px 24px 6px 20px; }
.sug-row a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; }
.sug-row .who { display: grid; gap: 2px; min-width: 0; }
.sug-row .who b { font: 800 19px/1 var(--display); text-transform: uppercase; }
.sug-row .who small { font: 500 12px/1.1 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 452px; height: calc(100vh - var(--bar) - var(--crawl) - var(--strip-h)); min-height: 660px; }
.main-event { position: relative; overflow: hidden; padding: 26px var(--pad) 24px; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; border-right: 1px solid var(--line); min-width: 0; }
.main-event > *:not(.ghost), .cage > *:not(.ghost), .fighter > *:not(.ghost), .state-page > *:not(.ghost) { position: relative; z-index: 1; }
.me-head { display: flex; align-items: center; gap: 18px; min-width: 0; }
.me-title { font: 700 16px/1.2 var(--text); font-variation-settings: 'wdth' 115; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.me-bo { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 var(--text); color: var(--mute); white-space: nowrap; }
.me-bo .pip { width: 15px; height: 15px; }
.tape { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px) minmax(0, 1fr); align-items: center; gap: 16px; min-height: 0; }
.corner { container-type: inline-size; display: grid; justify-items: start; align-content: center; gap: 6px; min-width: 0; }
.corner.r { justify-items: end; text-align: right; }
.corner .tri { margin-top: 18px; }
.corner .nm, .bs-t .nm { font: 700 20px/1.1 var(--text); font-variation-settings: 'wdth' 118; margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spine { display: grid; justify-items: center; gap: 16px; align-self: center; }
.vs { font: 900 66px/1 var(--display); color: var(--ink); text-transform: uppercase; }
.vs.gold { color: var(--gold-fg); }
.spine-score { font: 900 96px/.85 var(--display); display: inline-flex; gap: 10px; }
.spine-score em { font-style: normal; color: var(--mute); }
.spine-score.live em { color: var(--red); }
.spine-sub { display: inline-flex; align-items: center; gap: 9px; font: 700 13px/1 var(--text); color: var(--mute); margin-top: -4px; white-space: nowrap; }
.spine-sub .pip { width: 14px; height: 14px; }
.me-acts { margin-left: auto; flex-wrap: nowrap; }
.bell-sm { font: 600 14px/1.2 var(--text); color: var(--mute); }
.bell-k.lv-k { font: 900 44px/1 var(--display); color: var(--ink); text-transform: uppercase; gap: 12px; }
.bell-k.lv-k .tally { width: 14px; height: 14px; }
.spine dl { width: 100%; display: grid; border-top: 1px solid var(--line); }
.spine dl div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spine dt { font: 600 12px/1 var(--text); color: var(--mute); text-align: center; font-variation-settings: 'wdth' 110; }
.spine dd { font: 800 24px/1 var(--display); text-transform: uppercase; }
.spine dd:last-child { text-align: right; display: flex; justify-content: flex-end; }
.me-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.lineup { display: flex; gap: 10px; min-width: 0; }
.lineup.r { justify-content: flex-end; }
.lineup figure { width: 64px; min-width: 0; }
.lineup .pic, .lineup-big .pic { position: relative; display: grid; place-items: center; background: var(--panel); overflow: hidden; }
.lineup .pic { width: 64px; height: 64px; }
.lineup .pic b, .lineup-big .pic b { font: 900 22px/1 var(--display); color: var(--mute); }
.lineup .pic, .lineup-big .pic { background: var(--panel2); }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(1) contrast(1.05); opacity: 0; }
.pic img.ok { opacity: 1; }
.lineup figcaption { font: 500 11px/1.2 var(--text); color: var(--mute); padding-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineup.r figcaption { text-align: right; }
.lineup figcaption b { display: block; color: var(--ink); font: 800 13px/1.1 var(--text); font-variation-settings: 'wdth' 106; overflow: hidden; text-overflow: ellipsis; }
.bell { display: grid; justify-items: center; gap: 6px; text-align: center; }
.bell-k { display: inline-flex; align-items: center; gap: 7px; font: 700 13px/1 var(--text); color: var(--mute); }
.bell-when { font: 900 52px/.9 var(--display); text-transform: uppercase; white-space: nowrap; }
.bell-when small { font: 600 13px/1 var(--text); color: var(--mute); text-transform: none; vertical-align: middle; }
.count { display: inline-flex; gap: 10px; font: 500 14px/1 var(--text); color: var(--mute); white-space: nowrap; }
.count b { font: 800 28px/1 var(--display); color: var(--ink); margin-right: 2px; }
.count.soon b { font-size: 40px; }
.count.due { font: 800 18px/1 var(--text); color: var(--ink); }
.purse { font: 600 13px/1 var(--text); color: var(--mute); }
.bell .acts { margin-top: 8px; justify-content: center; }
.main-event.is-live { box-shadow: inset 0 4px 0 var(--red); }
.bell-top { display: none; }
.main-event.quiet { grid-template-rows: auto 1fr auto; }
.quiet-body { container-type: inline-size; display: grid; justify-items: start; align-content: center; gap: 10px; }
.quiet-body .tri { font-size: min(calc(180cqi / var(--len, 2)), 44vh); margin-top: 12px; }
.quiet-body .nm { font: 700 22px/1.1 var(--text); font-variation-settings: 'wdth' 118; }
.lineup:empty { visibility: hidden; }
.main-event.quiet .me-foot:not(:has(figure, .sk)) { display: none; }
.quiet-body p { font: 600 18px/1.3 var(--text); color: var(--mute); }

/* ---------- first visit ---------- */
.picker { padding-bottom: 40px; }
.pick-hero { padding: 44px var(--pad) 30px; display: grid; gap: 10px; }
.pick-hero h1 { font: 900 120px/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.pick-hero p { font: 600 20px/1.3 var(--text); font-variation-settings: 'wdth' 112; color: var(--mute); }
.main-event.preview { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 560px; }
.pick-group { padding: 34px var(--pad) 0; }
.pick-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pick-head h2, .div-head h2 { font: 900 30px/1 var(--display); text-transform: uppercase; }
.pick-head .more { margin-left: auto; font: 700 13px/1 var(--text); color: var(--mute); min-height: 44px; display: inline-flex; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles.list { grid-template-columns: 1fr; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; padding: 0 var(--pad); }
.pick-grid .pick-group { padding: 28px 0 0; min-width: 0; }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 12px; background: var(--bg); min-width: 0; }
.tile.on { background: var(--panel); box-shadow: inset 4px 0 0 var(--ink); }
.tile-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 52px; }
.tile .who { display: grid; gap: 3px; min-width: 0; }
.tile .who b { font: 900 25px/.95 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .who small { font: 500 12px/1.2 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .rg { font-weight: 700; color: var(--ink); }
.pick-go { position: fixed; left: 0; right: 0; bottom: calc(var(--crawl) + env(safe-area-inset-bottom)); z-index: 14; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 22px; background: var(--ink); color: var(--bg); font: 600 15px/1 var(--text); }
.pick-go b { font: 900 26px/1 var(--display); margin-right: 4px; }
.pick-go .btn { background: var(--bg); color: var(--ink); }
.picker.has-go { padding-bottom: 96px; }
.pick-h { padding: 34px var(--pad) 22px; font: 900 120px/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.pick-tabs { margin: 0 var(--pad) 8px; }
button.gtab { text-align: left; }
.gtab[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.gtab[aria-pressed='true'] small { color: var(--bg); opacity: .75; }
.pick-tiles { margin: 0 var(--pad); }
.more-link { display: inline-flex; align-items: center; min-height: 44px; margin: 6px var(--pad) 30px; font: 700 14px/1 var(--text); color: var(--mute); text-decoration: underline; text-underline-offset: 4px; }
.picker .main-event.preview { min-height: 600px; }

/* ---------- teams ---------- */
.teamspage { padding: 0 var(--pad) 40px; }
.page-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 34px 0 20px; }
.page-head h1 { font: 900 96px/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.gtabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.gtab { display: grid; gap: 4px; padding: 14px 20px 12px 18px; background: var(--panel); min-height: 64px; }
.gtab b { font: 900 30px/1 var(--display); text-transform: uppercase; }
.gtab small { font: 600 12px/1.1 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtab[aria-current] { background: var(--ink); color: var(--bg); }
.gtab[aria-current] small { color: var(--bg); opacity: .7; }
.div-section { padding-top: 30px; }
.div-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.more-btn { margin-top: 14px; }

/* ---------- calendar ---------- */
.calpage { display: grid; grid-template-columns: minmax(0, 1fr) 452px; min-height: calc(100vh - var(--bar) - var(--crawl) - var(--strip-h)); }
.cal-main { padding: 30px var(--pad) 30px; border-right: 1px solid var(--line); min-width: 0; }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 20px; }
.cal-head h1 { font: 900 72px/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.cal-head h1 span { color: var(--mute); }
.cal-nav { display: inline-flex; gap: 6px; }
.cal-head .acts { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cal-dow { background: var(--bg); padding: 10px 10px 8px; font: 700 13px/1 var(--text); color: var(--mute); }
.cal-day { background: var(--bg); min-height: 92px; padding: 9px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-width: 0; position: relative; }
.cal-day.pad { background: var(--panel); }
.cal-day .num { font: 900 28px/1 var(--display); }
.cal-day.past .num, .cal-day:not(.has) .num { color: var(--mute); }
.cal-day.today .num { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.cal-day.sel { background: var(--ink); color: var(--bg); }
.cal-day.sel .num { color: var(--bg); }
.cal-day.sel .pip.mine { background: var(--bg); }
.cal-day.sel .cb { color: var(--bg); }
.marks { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.marks em { font: 700 13px/1 var(--text); font-style: normal; }
.cal-day .pip::after { background: var(--bg); }
.cal-day.sel .pip::after { background: var(--ink); }
.cbs { display: grid; gap: 2px; width: 100%; }
.cb { font: 800 14px/1.05 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.cb.more { font: 600 13px/1 var(--text); text-transform: none; color: var(--mute); }
.cal-key { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font: 500 13px/1 var(--text); color: var(--mute); }
.cal-key span { display: inline-flex; align-items: center; gap: 7px; }
.cal-key .pip::after { background: var(--bg); }
.day-card { min-height: 0; }
.day-card .none { padding: 12px 24px; }
.day-card .bout.dated > a { grid-template-columns: 84px auto minmax(0, 1fr); }
.day-card { overflow-y: auto; }
.later { margin-top: 10px; }
.bout { display: flex; align-items: center; border-top: 1px solid var(--line); position: relative; }
.bout > a { flex: 1; min-width: 0; display: grid; grid-template-columns: 62px auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 3px; padding: 10px 6px 10px 22px; min-height: 60px; }
.bout::before { content: ''; position: absolute; left: 0; top: -1px; bottom: 0; width: 4px; }
.bout.is-main::before { background: var(--gold-mark); }
.bout.is-live::before { background: var(--red); }
.bout .calb { margin-right: 8px; }
.bt-t { grid-row: span 2; font: 800 21px/1 var(--display); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bt-t.mute { color: var(--mute); font-size: 17px; }
.bt-t.lv { color: var(--red); font-size: 17px; }
.bout .g { grid-row: span 2; }
.bt-m { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bt-m b { font: 800 20px/1 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bt-s { font: 900 20px/1 var(--display); white-space: nowrap; }
.bt-s.lv { color: var(--red); }
.bout small { grid-column: 3; font: 500 12px/1.1 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- live ---------- */
.livepage { display: grid; grid-template-columns: minmax(0, 1fr) 560px; height: calc(100vh - var(--bar) - var(--crawl) - var(--strip-h)); min-height: 660px; }
.cage { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; padding: 26px var(--pad); border-right: 1px solid var(--line); min-width: 0; }
.cage.is-live { box-shadow: inset 0 4px 0 var(--red); }
.cage .ghost { --gmax: 560px; top: auto; bottom: -40px; }
.bug-score { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); align-items: end; align-self: center; gap: 22px; }
.bs-t { container-type: inline-size; display: grid; gap: 6px; justify-items: start; min-width: 0; }
.bs-t.r { justify-items: end; text-align: right; }
.bs-t .tri { font-size: min(150px, calc(170cqi / var(--len, 2))); margin-top: 12px; }
.bs-n { font: 900 240px/.8 var(--display); }
.bs-d { font: 900 120px/1 var(--display); color: var(--mute); align-self: center; }
.bs-d.lv { color: var(--red); }
.bs-vs { grid-column: 2 / 5; font: 900 120px/1 var(--display); text-transform: uppercase; align-self: center; }
.cage-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; padding-top: 18px; border-top: 1px solid var(--line); font: 600 14px/1 var(--text); color: var(--mute); }
.cage-foot .count b { font-size: 22px; }
.cage-foot .acts { margin-left: auto; }
.cage.empty { grid-template-rows: auto 1fr; }
.cage-none { align-self: center; display: grid; gap: 12px; }
.cage-none b { font: 900 120px/.85 var(--display); text-transform: uppercase; }
.cage-none p { color: var(--mute); font: 600 17px/1.3 var(--text); }
.tower.wide { overflow: hidden; }
.filters { display: grid; gap: 8px; padding: 0 24px 14px; }
.seg, .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button, .chip { min-height: 36px; padding: 0 16px 0 14px; font: 700 13px/1 var(--text); font-variation-settings: 'wdth' 112; background: var(--panel2); color: var(--mute); }
.seg button[aria-pressed='true'], .chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.livepage .tower-rows .none { padding: 18px 24px; }
.livepage .tower-rows > .btn { margin: 0 24px; align-self: flex-start; }
.lrow { display: flex; align-items: center; border-top: 1px solid var(--line); }
.lrow > a { flex: 1; min-width: 0; display: grid; grid-template-columns: 22px 60px 24px auto auto auto 24px minmax(0, 1fr); align-items: center; gap: 9px; padding: 0 12px 0 22px; min-height: 46px; font: 500 12px/1 var(--text); }
.lrow.mine { box-shadow: inset 4px 0 0 var(--ink); }
.lrow .pos { font: 900 17px/1 var(--display); color: var(--mute); }
.lrow b { font: 800 18px/1 var(--display); text-transform: uppercase; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .ls { font: 900 19px/1 var(--display); }
.lrow .ls.lv { color: var(--red); }
.lrow small { color: var(--mute); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow small b { font-size: 16px; color: var(--ink); text-transform: none; }
.lrow .g { height: 20px; font-size: 11px; padding: 0 8px; }
.lrow .calb { width: 44px; height: 44px; margin-right: 8px; }

/* ---------- team page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; margin: 10px 0 0 calc(var(--pad) - 8px); font: 700 14px/1 var(--text); color: var(--mute); }
.fighter { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(320px, 420px); align-items: center; gap: 36px; padding: 18px var(--pad) 34px; border-bottom: 1px solid var(--line); }
.fighter .ghost { font-size: 520px; left: auto; top: auto; right: 360px; bottom: -150px; }
.f-id { min-width: 0; container-type: inline-size; }
.f-g { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--text); color: var(--mute); font-variation-settings: 'wdth' 118; }
.f-id h1 { font: 900 min(150px, calc(150cqi / var(--len, 4)))/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; margin: 14px 0 18px; overflow-wrap: anywhere; }
.f-id h1.long { font-size: min(110px, 13cqi); }
.f-rec { display: flex; flex-wrap: wrap; gap: 10px 28px; font: 500 13px/1 var(--text); color: var(--mute); }
.f-rec b { font: 900 32px/1 var(--display); color: var(--ink); margin-right: 6px; }
.next { display: grid; gap: 14px; padding: 22px 26px; background: var(--panel); box-shadow: inset 4px 0 0 var(--ink); min-width: 0; }
.next.is-main { box-shadow: inset 4px 0 0 var(--gold); }
.next.is-live { box-shadow: inset 4px 0 0 var(--red); }
.next .belt { justify-self: start; }
.next-v { display: flex; align-items: center; gap: 14px; min-width: 0; }
.next-v small { display: block; color: var(--mute); font: 600 12px/1 var(--text); }
.next-v b { font: 900 32px/1 var(--display); text-transform: uppercase; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-v span { min-width: 0; }
.next-w { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.next-w > b { font: 900 30px/1 var(--display); text-transform: uppercase; }
.next-w .count b { font-size: 22px; }
.next-l { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 500 13px/1.3 var(--text); color: var(--mute); }
.next-l b { color: var(--ink); }
.tp-body { display: grid; grid-template-columns: minmax(0, 1fr) 520px; border-bottom: 1px solid var(--line); }
.tp-roster { padding: 28px var(--pad) 32px; border-right: 1px solid var(--line); min-width: 0; }
.lineup-big { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 4px; }
.lineup-big figure { display: grid; min-width: 0; }
.lineup-big .pic { aspect-ratio: 3 / 4; }
.lineup-big .pic b { font-size: 40px; }
.lineup-big figcaption { padding: 12px 2px 0; display: grid; gap: 3px; font: 500 12px/1.2 var(--text); color: var(--mute); min-width: 0; }
.lineup-big figcaption b { font: 900 30px/1 var(--display); color: var(--ink); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-big figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record { background: var(--panel); padding: 28px 24px 24px; min-width: 0; }
.rec-strip { display: grid; gap: 10px; margin-bottom: 14px; }
.rec-l { font: 600 12px/1 var(--text); color: var(--mute); }
.ticks { display: grid; grid-template-columns: repeat(var(--n, 30), minmax(0, 1fr)); gap: 3px; height: 34px; max-width: calc(var(--n, 30) * 18px); }
.tick { --cut: 4px; }
.tick.w { background: var(--ink); }
.tick.l { background: var(--faint); opacity: .55; }
.history { width: 100%; border-collapse: collapse; }
.history th { text-align: left; padding: 0; border-bottom: 1px solid var(--line); }
.history th.r { text-align: right; }
.history th button { min-height: 40px; font: 600 12px/1 var(--text); color: var(--mute); padding: 0 4px; }
.history td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.history .dt { font: 500 12px/1 var(--text); color: var(--mute); white-space: nowrap; }
.history .rr { font: 900 21px/1 var(--display); }
.history tr.l .rr { color: var(--mute); }
.history .opp a { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; }
.history .opp span { display: grid; gap: 2px; min-width: 0; }
.history .opp b { font: 700 14px/1.1 var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.history .opp small { font: 500 11.5px/1.2 var(--text); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.history .sc { font: 900 22px/1 var(--display); white-space: nowrap; }
.history .r { text-align: right; }
.event-sec { padding: 30px var(--pad) 36px; }
.bouts { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 24px; }

/* ---------- match page ---------- */
.main-event.bout { border-right: 0; border-bottom: 1px solid var(--line); min-height: 600px; display: grid; }
.mp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mp-body > section { padding: 28px var(--pad) 32px; min-width: 0; }
.mp-body > section + section { border-left: 1px solid var(--line); background: var(--panel); }
.mp-body.one { grid-template-columns: minmax(0, 1fr); }
.bout.dated > a { grid-template-columns: 96px auto minmax(0, 1fr); }
.bout.dated .bt-t { font-size: 17px; }
.tp-left { min-width: 0; border-right: 1px solid var(--line); }
.tp-left .tp-roster { border-right: 0; }
.tp-left .event-sec { border-top: 1px solid var(--line); padding-top: 28px; }
.tp-left .bouts { grid-template-columns: 1fr; }
.maps { list-style: none; border-top: 1px solid var(--line); }
.maps li { display: flex; align-items: center; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.maps li.is-live { box-shadow: inset 4px 0 0 var(--red); padding-left: 14px; }
.maps .mn { font: 900 22px/1 var(--display); text-transform: uppercase; width: 70px; }
.maps .mname { font: 700 14px/1 var(--text); color: var(--mute); }
.maps .mres { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--text); }
.maps .mres .lv { display: inline-flex; align-items: center; gap: 7px; }
.h2h { font: 900 34px/1 var(--display); text-transform: uppercase; margin-bottom: 12px; display: flex; gap: 12px; align-items: baseline; }

/* ---------- empty, not found, failed ---------- */
.state-page { position: relative; overflow: hidden; display: grid; align-content: center; justify-items: start; gap: 16px; padding: 60px var(--pad); min-height: calc(100vh - var(--bar) - var(--crawl) - var(--strip-h)); }
.state-page .ghost { top: auto; bottom: -60px; }
.state-page h1 { font: 900 110px/.85 var(--display); text-transform: uppercase; letter-spacing: -.02em; max-width: 14ch; }
.state-page p { font: 600 19px/1.35 var(--text); color: var(--mute); max-width: 46ch; }
.state-page .acts { margin-top: 8px; }
.skel .main-event, .skel .tower { pointer-events: none; }
.skel .tape { grid-template-columns: 1fr 260px 1fr; }

/* ---------- results crawl ---------- */
.crawl { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; height: calc(var(--crawl) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; align-items: stretch; background: var(--ink); color: var(--bg); }
.crawl-tag { display: grid; place-items: center; padding: 0 30px 0 26px; background: var(--gold); color: #000; font: 900 21px/1 var(--display); text-transform: uppercase; flex: none; }
.crawl-win { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.crawl-run { display: inline-flex; white-space: nowrap; }
.crawl-set { display: inline-flex; }
.crawl-set.dup { display: none; }
.crawl.moving .crawl-set.dup { display: inline-flex; }
.crawl.moving .crawl-run { animation: crawl var(--dur, 60s) linear infinite; }
.crawl:hover .crawl-run, .crawl:focus-within .crawl-run, .crawl.paused .crawl-run { animation-play-state: paused; }
.cr { display: inline-flex; align-items: center; gap: 9px; padding: 0 24px; min-height: 44px; font: 600 14px/1 var(--text); border-right: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); }
.cr em { font-style: normal; font-weight: 500; opacity: .62; font-size: 12px; }
.cr b { font: 900 21px/1 var(--display); text-transform: uppercase; }
.cr .g { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.cr-s { font: 900 21px/1 var(--display); }
.cr-o { font-weight: 700; }
.cr-r { font-size: 12px; font-weight: 800; padding: 4px 7px; }
.cr.w .cr-r { background: var(--bg); color: var(--ink); }
.cr.l .cr-r { box-shadow: inset 0 0 0 1px currentColor; opacity: .62; }
.cr.none { opacity: .7; border: 0; }
.crawl .src { display: flex; align-items: center; padding: 0 22px 0 18px; font: 500 12px/1 var(--text); color: color-mix(in srgb, var(--bg) 62%, transparent); white-space: nowrap; flex: none; }

/* ---------- hide scores ---------- */
.spoiler-safe [data-spoiler]:not(.revealed) { position: relative; cursor: pointer; }
.spoiler-safe [data-spoiler]:not(.revealed) > *, .spoiler-safe [data-spoiler]:not(.revealed) { color: transparent !important; -webkit-text-stroke: 0 !important; }
.spoiler-safe [data-spoiler]:not(.revealed)::after { content: ''; position: absolute; inset: 10% 0; background: var(--faint); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.spoiler-safe .fp[data-spoiler]:not(.revealed) .f, .spoiler-safe .rec-strip[data-spoiler]:not(.revealed) .tick { background: var(--faint); box-shadow: none; }
.spoiler-safe [data-spoiler]:not(.revealed) .pip { background: var(--faint) !important; animation: none; }
.spoiler-safe [data-spoiler]:not(.revealed) .pip::after { display: none; }
.spoiler-safe [data-spoiler]:not(.revealed) img { visibility: hidden; }
.spoiler-safe .rounds[data-spoiler]:not(.revealed)::after, .spoiler-safe .fp[data-spoiler]:not(.revealed)::after { display: none; }
.spoiler-safe .cr .cr-r { background: transparent !important; color: transparent !important; box-shadow: inset 0 0 0 1px var(--bg); opacity: .6; }
.spoiler-safe .cr .cr-r.revealed { color: var(--bg) !important; }
body:not(.spoiler-safe) .tri[data-outcome='lose'] { color: transparent; -webkit-text-stroke: 2px var(--ink); }

/* ---------- meaning colours: small marks only (text, letters, pips, thin lines).
   Win and loss show only while scores do, so every rule that uses them starts
   with body:not(.spoiler-safe) (test/render.test.js checks this). A loss is never
   a filled block: red text or a red outline. Live keeps the solid red block. ---------- */
body:not(.spoiler-safe) .f.w { background: var(--win); color: var(--win-on); }
body:not(.spoiler-safe) .f.l { box-shadow: inset 0 0 0 1.5px var(--loss); color: var(--loss); }
body:not(.spoiler-safe) .tick.w { background: var(--win); }
body:not(.spoiler-safe) .tick.l { position: relative; background: var(--loss); opacity: 1; }
body:not(.spoiler-safe) .tick.l::after { content: ''; position: absolute; inset: 1.5px; background: var(--panel); clip-path: inherit; }
body:not(.spoiler-safe) .history tr.w :is(.rr, .sc) { color: var(--win); }
body:not(.spoiler-safe) .history tr.l :is(.rr, .sc) { color: var(--loss); }
body:not(.spoiler-safe) :is(.row .who small.last b, .next-l b, .row .gap small span).w { color: var(--win); }
body:not(.spoiler-safe) :is(.row .who small.last b, .next-l b, .row .gap small span).l { color: var(--loss); }
body:not(.spoiler-safe) .rounds .pip.mine { background: var(--pip-mine, var(--win)); }
/* a finished match: the big tag stays ink; the winner's name under it turns green */
body:not(.spoiler-safe) :is(.corner, .bs-t):has(.tri[data-outcome='win']) .nm { color: var(--win); }
body:not(.spoiler-safe) :is(.bt-m, .lrow) b.won { color: var(--win); }
/* the crawl sits on the other theme's ground, so it takes the other theme's shades */
[data-theme='dark'] .crawl { --win: #087236; --win-on: #fff; --loss: #a61f3b; }
[data-theme='light'] .crawl { --win: #2fd36f; --win-on: #000; --loss: #ea4f66; }
body:not(.spoiler-safe) .cr.w .cr-r { background: var(--win); color: var(--win-on); }
body:not(.spoiler-safe) .cr.l .cr-r { box-shadow: inset 0 0 0 1px var(--loss); color: var(--loss); opacity: 1; }
body:not(.spoiler-safe) .cr.w .cr-s { color: var(--win); }
body:not(.spoiler-safe) .cr.l .cr-s { color: var(--loss); }
/* time to go: every countdown; the clock and the start time keep the ink */
.count, .count b, .count.due, .row .gap em[data-gap], .lrow small b[data-gap] { color: var(--time); }
/* what is at stake */
.prize { color: var(--gold-fg); }

/* ---------- popovers, settings, toast ---------- */
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 400px; max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--ink); display: none; z-index: 30; }
.pop.open { display: block; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.pop-head b { font: 900 24px/1 var(--display); text-transform: uppercase; margin-right: auto; }
.pop-head #markRead { font: 700 13px/1 var(--text); color: var(--mute); min-height: 44px; padding: 0 8px; }
.notif { width: 100%; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif.unread { box-shadow: inset 4px 0 0 var(--ink); }
.notif.live.unread { box-shadow: inset 4px 0 0 var(--red); }
.nk { display: inline-flex; align-items: center; gap: 6px; font: 800 12px/1.3 var(--text); color: var(--mute); }
.notif.live .nk { color: var(--ink); }
.nt { display: grid; gap: 4px; min-width: 0; }
.nt b { font: 700 14px/1.25 var(--text); }
.nt small { font: 500 12px/1.3 var(--text); color: var(--mute); }
.notif time { font: 500 12px/1.3 var(--text); color: var(--mute); white-space: nowrap; }
.pop-empty { padding: 20px 16px; color: var(--mute); }
.scrim { position: fixed; inset: 0; z-index: 18; background: rgba(0,0,0,.72); display: none; }
.scrim.on { display: block; }
.modal-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.86); display: grid; place-items: center; padding: 20px; animation: fade .15s both; }
.modal-overlay.out { opacity: 0; transition: opacity .15s; }
.modal { width: min(460px, 100%); background: var(--bg); border: 1px solid var(--ink); outline: none; }
.modal-head { padding: 22px 24px 12px; }
.modal-head h2 { font: 900 40px/1 var(--display); text-transform: uppercase; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 0 24px; border-top: 1px solid var(--line); font: 700 15px/1 var(--text); }
.sel { position: relative; }
.sel select { -webkit-appearance: none; appearance: none; min-height: 40px; min-width: 170px; padding: 0 34px 0 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 14px/1 var(--text); border-radius: 0; }
.sel::after { content: ''; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sel select:focus { border-color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border: 2px solid var(--ink); }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--ink); transition: transform .15s; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(22px); background: var(--bg); }
.switch input:focus-visible + i { outline: 3px solid var(--ink); outline-offset: 3px; }
.pref-note { padding: 14px 24px 0; border-top: 1px solid var(--line); font: 500 13px/1.4 var(--text); color: var(--mute); }
.modal-foot { padding: 16px 24px 22px; display: flex; justify-content: flex-end; }
.toast { position: fixed; z-index: 45; left: 50%; top: calc(var(--bar) + 14px); transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 14px 20px; background: var(--ink); color: var(--bg); font: 700 14px/1.35 var(--text); box-shadow: 0 0 0 1px var(--bg); animation: fade .15s both; overflow-wrap: anywhere; }
.toast.out { opacity: 0; transition: opacity .2s; }


/* ---------- pressing: hover only where there is a pointer, a press state everywhere ---------- */
@media (hover: hover) {
  .nav a:hover { color: var(--ink); }
  .ib:hover, .tb:hover { border-color: var(--ink); }
  .search-hit:hover, .search-hit.kbd-focus { background: var(--panel); }
  .btn:hover { background: var(--line); }
  .btn.ink:hover { opacity: .85; }
  .tile:hover { --tile-bg: var(--panel); }
  .calb:hover { color: var(--ink); background: var(--panel2); }
  .sq:hover { border-color: var(--ink); }
  .row:hover { background: var(--panel2); }
  .tower-foot:hover { color: var(--ink); }
  a.me-title:hover { text-decoration: underline; text-underline-offset: 4px; }
  a.corner:hover .nm { text-decoration: underline; text-underline-offset: 4px; }
  figure:hover .pic img { filter: none; }
  .pick-head .more:hover { color: var(--ink); }
  .tile:hover { background: var(--panel); }
  .gtab:hover { background: var(--panel2); }
  .cal-day:hover { background: var(--panel); }
  .bout:hover { background: var(--panel2); }
  .seg button:hover, .chip:hover { color: var(--ink); }
  .seg button[aria-pressed='true']:hover, .chip[aria-pressed='true']:hover { color: var(--bg); }
  .lrow:hover { background: var(--panel2); }
  .back:hover { color: var(--ink); }
  .next-v:hover b { text-decoration: underline; text-underline-offset: 4px; }
  .history th button:hover, .history th[aria-sort='ascending'] button, .history th[aria-sort='descending'] button { color: var(--ink); }
  .history .opp a:hover b { text-decoration: underline; }
  .cr:hover { background: color-mix(in srgb, var(--bg) 10%, transparent); }
  .pop-head #markRead:hover { color: var(--ink); }
  .notif:hover { background: var(--panel); }
}
.btn:active, .follow:active, .chip:active, .seg button:active, .gtab:active, .calb:active, .sq:active, .ib:active, .tb:active, .back:active, .strip-more:active { transform: translateY(1px); filter: brightness(.88); }
.row:active, .bout:active, .lrow:active, .tile:active, .search-hit:active, .notif:active, .cal-day:active, .cr:active, .sug-row:active, .history .opp a:active, .maps li:active { background: var(--panel2); }
a.corner:active .nm, a.me-title:active, .next-v:active b { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- motion: one build, one crawl, one tally ---------- */
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes crawl { to { transform: translateX(-50%); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .crawl-win { overflow-x: auto; mask-image: none; scrollbar-width: none; }
}

/* ---------- desktop: the stage fills its height ---------- */
@media (min-width: 1024px) {
  .main-event .plate.xl, .cage .plate.xl { width: clamp(112px, 14vh, 152px); height: clamp(112px, 14vh, 152px); }
  .corner .tri { font-size: min(calc(190cqi / var(--len, 2)), 34vh); }
  .bs-n { font-size: clamp(240px, 40vh, 380px); }
  .bs-d { font-size: clamp(120px, 18vh, 180px); }
  .bs-vs { font-size: clamp(120px, 18vh, 180px); }
  .bs-t .tri { font-size: min(calc(170cqi / var(--len, 2)), 24vh); }
  .tape { align-self: center; }
}

/* ---------- mid widths ---------- */
@media (max-width: 1360px) {
  .clock { display: none; }
  .search input { width: 210px; }
  .home, .calpage { grid-template-columns: minmax(0, 1fr) 400px; }
  .livepage { grid-template-columns: minmax(0, 1fr) 480px; }
  .tp-body { grid-template-columns: minmax(0, 1fr) 440px; }
  .lineup figure, .lineup .pic { width: 54px; } .lineup .pic { height: 54px; }
  .bell-when { font-size: 44px; }
}
@media (max-width: 1180px) {
  :root { --pad: 28px; }
  .word, .tb-t { display: none; }
  .nav { margin-left: 8px; }
  .tape { grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); }
  .lineup figure:nth-child(n+5) { display: none; }
  .fighter { grid-template-columns: auto minmax(0, 1fr); }
  .fighter .next { grid-column: 1 / -1; }
  .plate.xxl { width: 150px; height: 150px; }
  .gtabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- stacked (tablet and phone) ---------- */
@media (max-width: 1023px) {
  .home, .calpage, .livepage, .tp-body, .mp-body { display: block; height: auto; min-height: 0; }
  .main-event, .cage, .cal-main, .tp-roster { border-right: 0; border-bottom: 1px solid var(--line); }
  .tower-rows { overflow: visible; }
  .row { flex: none; }
  .mp-body > section + section { border-left: 0; }
  .main-event.bout, .main-event.preview { min-height: 0; }
  .main-event { min-height: 0; }
  .tp-left { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --bar: 100px; --crawl: 44px; --pad: 16px; }
  .bar { height: auto; top: -57px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'bug right' 'nav nav'; padding: 0; gap: 0; }
  .bar.searching { top: 0; }
  .bar.searching #searchBtn { display: none; }
  .bar.searching .bar-right { justify-content: flex-start; padding: 6px 12px; }
  .bar.searching .search { width: 100%; }
  .bar.searching .bar-right { margin-left: 0; width: 100%; padding-left: 12px; }
  .bug { grid-area: bug; margin: 0 0 0 16px; align-self: center; }
  .word { display: none; }
  .bar-right { grid-area: right; justify-content: flex-end; gap: 6px; padding: 6px 12px 6px 0; min-height: 56px; }
  .nav { grid-area: nav; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
  .nav a { height: 44px; justify-content: center; padding: 0 4px; font-size: 13px; }
  .n-long { display: none; } .n-short { display: inline; }
  .ib, .tb { height: 44px; min-width: 44px; padding: 0 10px; }
  #searchBtn { display: inline-flex; }
  .search { display: none; }
  .bar.searching { grid-template-areas: 'search search' 'nav nav'; }
  .bar.searching .bug, .bar.searching .ib, .bar.searching .tb, .bar.searching .pop-wrap { display: none; }
  .bar.searching .bar-right { grid-area: search; padding-left: 12px; }
  .bar.searching .search { display: flex; flex: 1; gap: 6px; }
  .bar.searching .search input { flex: 1; width: auto; height: 48px; min-width: 0; font-size: 16px; }
  .bar.searching .search-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); }
  .search-pop { position: fixed; left: 0; right: 0; top: 56px; width: auto; max-height: calc(100vh - 56px - var(--crawl)); border-left: 0; border-right: 0; }
  .search-pop .search-hit { min-height: 52px; }
  .pop { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; max-height: calc(100vh - 140px); }

  .strip-a { flex-wrap: nowrap; padding: 0 12px; gap: 8px; min-height: 48px; }
  .strip .plate, .strip-meta { display: none; }
  .onair { padding: 7px 13px 7px 12px; }
  .strip .sn, .strip .strip-g { display: none; }
  .strip .st { display: inline; }
  .strip-score { font-size: 26px; }
  .strip .rounds { margin-left: auto; }
  .strip-more { padding: 0 14px; }
  .stale { padding: 10px 16px; flex-wrap: wrap; gap: 4px 12px; }

  .main-event { padding: 18px 16px 20px; gap: 16px; }
  .bell-top { display: grid; justify-items: start; gap: 6px; }
  .bell-top .acts { width: 100%; margin-top: 6px; }
  .bell-top .acts .btn { flex: 1; padding: 0 14px; }
  .me-foot .bell, .main-event:not(.quiet) .me-acts { display: none; }
  .home .main-event:not(.quiet) .me-foot { display: none; }
  .pick-h { font-size: 64px; padding: 22px 16px 16px; }
  .pick-tabs { margin: 0 16px 8px; }
  .pick-tiles { margin: 0 16px; }
  .more-link { margin: 6px 16px 24px; }
  .picker .main-event.preview { min-height: 0; }
  .quiet-body .tri { font-size: min(calc(180cqi / var(--len, 2)), 30vh); }
  .me-head { flex-wrap: wrap; gap: 10px 12px; }
  .me-title { font-size: 14px; white-space: normal; flex: 1 1 60%; }
  .me-bo { margin-left: 0; width: 100%; }
  .me-acts { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .me-acts .btn { flex: 1; padding: 0 14px; }
  .spine-sub { margin-top: 0; }
  .bell-k.lv-k { font-size: 34px; }
  .pick-grid { grid-template-columns: 1fr; padding: 0 16px; }
  .bout.dated > a { grid-template-columns: 78px auto minmax(0, 1fr); }
  .tape { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 12px; }
  .spine { grid-column: 1 / -1; grid-row: 2; }
  .vs { display: none; }
  .spine-score { font-size: 72px; }
  .plate.xl { width: 64px; height: 64px; } .plate.xl b { font-size: 20px; }
  .corner .tri { margin-top: 8px; font-size: min(104px, calc(185cqi / var(--len, 2))); }
  .main-event .plate.xl { width: 52px; height: 52px; }
  .spine dl div { padding: 8px 0; }
  .home .main-event { gap: 12px; }
  .corner .nm { font-size: 14px; }
  .spine dd { font-size: 20px; }
  .me-foot { grid-template-columns: 1fr; gap: 18px; }
  .bell { grid-row: 1; justify-items: start; text-align: left; }
  .bell .acts { justify-content: flex-start; width: 100%; }
  .bell .acts .btn { flex: 1; }
  .bell-when { font-size: 46px; }
  .lineup, .lineup.r { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .lineup figure, .lineup .pic { width: 100%; } .lineup .pic { height: auto; aspect-ratio: 1; }
  .lineup figure:nth-child(n+5) { display: grid; }
  .lineup.r figcaption { text-align: left; }
  .lineup.r { direction: ltr; }
  .lineup figcaption b { font-size: 12px; }
  .ghost { top: 50px; }
  .main-event.quiet .tri { font-size: 120px; }

  .tower-head { padding: 20px 16px 12px; }
  .tower-head h1, .tower-head h2 { font-size: 28px; }
  .row .row-link { grid-template-columns: 22px 54px 30px minmax(0, 1fr) auto; column-gap: 9px; padding: 11px 4px 11px 14px; }
  .row.off .row-link { padding-right: 16px; }
  .row .pos { font-size: 24px; }
  .row .plate.sm { width: 30px; height: 30px; }
  .row .who b { font-size: 20px; }
  .row .gap em { font-size: 19px; }
  .row .g { font-size: 11px; padding: 0 7px; }
  .row .calb { margin-right: 4px; }
  .tw-sub { padding: 16px 16px 8px; }
  .sug-row { padding: 4px 16px 4px 14px; }
  .tower-foot { padding: 0 16px; }

  .pick-hero { padding: 26px 16px 22px; }
  .pick-hero h1 { font-size: 72px; }
  .pick-hero p { font-size: 16px; }
  .pick-group { padding: 26px 16px 0; }
  .pick-head h2, .div-head h2 { font-size: 24px; }
  .tiles { grid-template-columns: 1fr; }
  .pick-go { margin: 24px 16px 0; padding-left: 16px; }

  .page-head h1 { font-size: 64px; }
  .page-head { padding-top: 22px; }
  .gtabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .gtab { padding: 10px 12px 8px 12px; min-height: 52px; }
  .gtab b { font-size: 24px; }
  .gtab small { font-size: 11px; }

  .cal-main { padding: 20px 16px; }
  .cal-head h1 { font-size: 52px; width: 100%; }
  .cal-head .acts { margin-left: 0; width: 100%; }
  .cal-head .acts .btn { flex: 1; }
  .cal-nav { order: -1; }
  .cal-head { gap: 10px; }
  .cal-day { min-height: 56px; padding: 6px 5px; gap: 5px; align-items: center; }
  .cal-day .num { font-size: 20px; }
  .cbs { display: none; }
  .marks { justify-content: center; gap: 2px; }
  .marks .pip { width: 8px; height: 8px; }
  .cal-dow { padding: 8px 4px 6px; text-align: center; }
  .cal-key { gap: 12px; }
  .bout > a { grid-template-columns: 50px auto minmax(0, 1fr); padding-left: 16px; column-gap: 10px; }
  .bt-t { font-size: 18px; }
  .bt-m b { font-size: 18px; }
  .bouts { grid-template-columns: 1fr; }

  .cage { padding: 18px 16px; }
  .cage .ghost { bottom: -10px; }
  .bug-score { grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); gap: 8px; margin: 20px 0; }
  .bs-n { font-size: 96px; }
  .bs-d { font-size: 96px; line-height: .8; align-self: end; }
  .bs-vs { font-size: 60px; }
  .bs-t .tri { font-size: min(64px, calc(170cqi / var(--len, 2))); }
  .bs-t .nm { font-size: 12px; }
  .cage-none b { font-size: 64px; }
  .cage-foot .acts { margin-left: 0; width: 100%; }
  .cage-foot .acts .btn { flex: 1; }
  .filters { padding: 0 16px 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .seg button, .chip { min-height: 44px; flex: none; }
  .lrow > a { grid-template-columns: 18px 54px 22px auto auto auto 22px minmax(0, 1fr); gap: 6px; padding: 0 4px 0 14px; min-height: 52px; }
  .lrow b { font-size: 16px; max-width: 70px; }
  .lrow .g { font-size: 11px; padding: 0 6px; }
  .lrow .plate.xs { width: 22px; height: 22px; }
  .lrow small { font-size: 11px; }
  .livepage .tower-rows .none { padding: 14px 16px; }

  .back { margin-left: 8px; }
  .fighter { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 10px 16px 22px; }
  .fighter .ghost { font-size: 280px; right: -20px; bottom: -60px; }
  .plate.xxl { width: 84px; height: 84px; } .plate.xxl b { font-size: 26px; }
  .f-id { grid-column: 1 / -1; }
  .f-id h1 { margin: 12px 0 14px; font-size: min(96px, calc(150cqi / var(--len, 4))); }
  .f-id h1.long { font-size: 15cqi; }
  .f-rec { gap: 10px 20px; }
  .f-rec b { font-size: 26px; }
  .follow.big { width: 100%; }
  .next { padding: 18px 16px; }
  .next-v b { font-size: 26px; }
  .next .acts .btn { flex: 1; }
  .tp-roster { padding: 22px 16px; }
  .lineup-big { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .lineup-big figcaption b { font-size: 22px; }
  .record { padding: 22px 16px; }
  .history .opp b, .history .opp small { max-width: 150px; }
  .event-sec { padding: 24px 16px 30px; }
  .sec-h { font-size: 26px; }
  .mp-body > section { padding: 22px 16px; }
  .h2h { font-size: 28px; }
  .state-page { padding: 40px 16px; }
  .state-page h1 { font-size: 64px; }
  .state-page .acts { width: 100%; }
  .state-page .acts .btn { flex: 1; }

  .crawl-tag { padding: 0 16px 0 13px; font-size: 17px; }
  .bug { min-height: 44px; min-width: 64px; align-items: center; }
  a.me-title { min-height: 44px; }
  .follow, .follow.sm { min-height: 44px; }
  .history th button { min-height: 44px; min-width: 44px; }
  .history .opp a { min-height: 44px; }
  .pick-head .more { min-width: 44px; }
  .crawl .src { display: none; }
  .cr { padding: 0 16px; }
  .src-foot { display: block; padding: 18px 16px 8px; font: 500 12px/1 var(--text); color: var(--mute); }
  .modal-overlay { align-items: end; padding: 0; }
  .modal { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sel select { min-width: 150px; min-height: 44px; }
  .pref-row { padding: 0 16px; }
}
