/* Draig: an operator's console. Charcoal ground, hairlines. Electric blue is for things you act on
   (buttons, focus, selection, your team); red is for live signals (clock, points, open targets, first blood).
   Red only for errors. Mono carries data and controls; Archivo carries prose. */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --bg: #161719; --bg-1: #1c1e21; --bg-2: #232629; --bg-3: #2b2f33;
  --line: #26292d; --line-2: #33373c; --line-3: #454a51;
  --fg: #eeeeec; --fg-2: #a6abb0; --fg-3: #7a8087;
  --blue: #1f6bff; --blue-2: #3d8bff; --blue-ink: #8cc0ff; --blue-dim: rgb(31 107 255 / .2); --blue-glow: 0 0 18px rgb(61 139 255 / .45);
  --tang: #ff2e4d; --tang-2: #ff5c73; --live: #2ee59d; --live-dim: rgb(46 229 157 / .12);
  --tang-dim: rgb(255 46 77 / .13);
  --red: #ff6b5e;
  --land: #212428; --land-edge: #30353a;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top: 52px; --r: 2px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/1.6 var(--mono); font-variant-numeric: tabular-nums; caret-color: var(--tang); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
::selection { background: var(--blue); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 0; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: .25em; text-decoration-thickness: 1px; transition: text-decoration-color .15s, color .15s; }
a:hover { text-decoration-color: var(--blue-2); }
h1, h2, h3 { font-family: var(--mono); margin: 0; text-wrap: balance; letter-spacing: -0.03em; }
h1 { font-weight: 600; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.05em; }
h2 { font-weight: 600; font-size: 13px; letter-spacing: 0; color: var(--fg); }
h3 { font-weight: 500; font-size: 12px; letter-spacing: .02em; color: var(--fg-3); }
p { margin: 0; text-wrap: pretty; }
code, pre { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 90; background: var(--blue); color: #fff; padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 10px; }
.dim { color: var(--fg-3); } .muted { color: var(--fg-2); }
.note { color: var(--fg-2); font-size: 13px; }
.lede { font-family: var(--sans); color: var(--fg-2); font-size: 16px; line-height: 1.55; max-width: 60ch; margin-top: 14px; }
.code { color: var(--tang); font-size: 12px; margin-top: 10px; }

/* ---------- controls ---------- */
button, .btn { font: 600 13px/1 var(--mono); border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--r); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, transform .1s; }
button:hover, .btn:hover { background: var(--blue-2); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: progress; }
.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.ghost:hover { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.ghost.confirm, .danger { color: var(--red); box-shadow: inset 0 0 0 1px rgb(255 81 73 / .45); background: transparent; }
.danger:hover { background: rgb(255 81 73 / .08); }
.ghost.confirm { color: var(--tang); box-shadow: inset 0 0 0 1px var(--tang); background: var(--tang-dim); }
.small { padding: 7px 10px; font-size: 12px; }
button.icon { background: transparent; color: var(--fg-3); padding: 6px; }
button.icon:hover { color: var(--fg); background: var(--bg-2); }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; flex: none; }
.linklike { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: .25em; }
.linklike:hover { text-decoration-color: var(--blue-2); }
.linklike:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
input, textarea, select { font: 400 13px/1.4 var(--mono); color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
input::placeholder, textarea::placeholder { color: var(--fg-3); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }
select.small { width: auto; padding: 6px 8px; font-size: 12px; }
textarea { resize: vertical; }
.switch { position: relative; width: 34px; height: 18px; padding: 0; border-radius: 18px; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-3); }
.switch:hover { background: var(--bg-3); }
.switch .knob { position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--fg-3); transition: transform .25s var(--ease), background .2s; }
.switch[aria-checked=true] { background: var(--blue-dim); box-shadow: inset 0 0 0 1px var(--blue); }
.switch[aria-checked=true] .knob { transform: translateX(16px); background: var(--blue-2); }

/* team identity: hex + initials, so colour is never the only cue */
.swatch { --c: var(--fg-3); display: inline-grid; place-items: center; flex: none; width: 22px; height: 24px; background: var(--c); color: var(--bg);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font: 700 8.5px/1 var(--mono); letter-spacing: -.02em; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 28px;
  padding: 0 20px; background: rgb(22 23 25 / .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; letter-spacing: -0.02em; font-size: 14px; }
.brand-mark { width: 24px; height: 24px; background: url(/img/htf-mark.svg) center / contain no-repeat; filter: drop-shadow(0 0 8px rgb(79 232 168 / .35)); transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.sep { color: var(--line-3); }
.crumb-ev { color: var(--fg-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.crumb-ev:hover { color: var(--fg); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; padding: 6px 10px; text-decoration: none; color: var(--fg-3); font-size: 13px; white-space: nowrap; transition: color .15s; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current=page] { color: var(--fg); }
.tabs a::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -11px; height: 2px; background: var(--blue-2); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.tabs a[aria-current=page]::after { transform: scaleX(1); }
.clock { display: flex; align-items: baseline; gap: 10px; }
.clock-label { font-size: 11px; color: var(--fg-3); }
.clock-value { font-weight: 600; font-size: 14px; letter-spacing: -.02em; }
.clock[data-state=live] .clock-value { color: var(--live); }
.clock[data-state=before] .clock-value { color: var(--fg); }
.clock[data-state=ended] .clock-value { color: var(--fg-3); }
.me { display: flex; align-items: center; gap: 10px; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 8px 4px 4px; border-radius: var(--r); font-size: 13px; }
a.me-chip:hover { background: var(--bg-2); }
.me-name { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-score { color: var(--tang); font-weight: 600; }

/* ---------- picker ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 64px 32px 96px; }
.page-head { margin-bottom: 40px; }
.picker h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); min-height: 1.05em; }
.evlist { list-style: none; margin: 0 0 56px; padding: 0; border-top: 1px solid var(--line); }
.evlist li { border-bottom: 1px solid var(--line); }
.evrow { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto 70px; align-items: center; gap: 24px; padding: 24px 12px; text-decoration: none; position: relative; transition: background .2s; }
.evrow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--blue); transform: scaleY(0); transition: transform .35s var(--ease); }
.evrow:hover { background: var(--bg-1); }
.evrow:hover::before, .evrow:focus-visible::before { transform: scaleY(1); }
.ev-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); }
.ev-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-3); }
.ev-state[data-state=live] { color: var(--live); text-shadow: 0 0 12px rgb(46 229 157 / .45); } .ev-state[data-state=live]::before { background: var(--live); animation: pulse-live 2s infinite; }
.ev-state[data-state=before] { color: var(--fg); } .ev-state[data-state=before]::before { background: var(--fg-2); }
@keyframes pulse-live { 0% { box-shadow: 0 0 0 0 rgb(46 229 157 / .7); } 70% { box-shadow: 0 0 0 8px rgb(46 229 157 / 0); } 100% { box-shadow: 0 0 0 0 rgb(46 229 157 / 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(255 46 77 / .6); } 70% { box-shadow: 0 0 0 8px rgb(255 46 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 46 77 / 0); } }
.ev-main { display: grid; gap: 6px; min-width: 0; }
.ev-name { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.ev-tag { font-family: var(--sans); color: var(--fg-2); font-size: 15px; }
.ev-meta { display: flex; gap: 22px; font-size: 12px; color: var(--fg-3); }
.ev-clock { color: var(--fg); }
.ev-go { justify-self: end; font-size: 12px; color: var(--blue-ink); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .3s var(--ease); }
.evrow:hover .ev-go, .evrow:focus-visible .ev-go { opacity: 1; transform: none; }
.evlist li.off .ev-name { color: var(--fg-3); }
.codebox { display: grid; gap: 10px; max-width: 620px; padding: 28px; border: 1px solid var(--line); background: var(--bg-1); }
.codebox p { font-family: var(--sans); font-size: 14px; }
.codeform { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0; border: 1px solid var(--line-2); background: var(--bg); margin-top: 8px; }
.codeform:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.codeform input { border: 0; box-shadow: none !important; font-size: 15px; padding: 14px 12px; background: transparent; }
.codeform button { border-radius: 0; height: 100%; padding: 0 20px; }
.prompt { color: var(--tang); padding-left: 14px; font-size: 13px; white-space: nowrap; }
.shake { animation: shake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- map view ---------- */
.mapview { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: calc(100dvh - var(--top)); }
.stage { position: relative; overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 60% 50%, transparent 40%, var(--bg) 100%); }
.mapwrap { position: absolute; inset: 28px 28px 52px 34%; display: grid; place-items: center; z-index: 1; }
.mapwrap .hexmap { width: 100%; height: 100%; overflow: visible; }
.map-hero { position: absolute; z-index: 2; left: 36px; top: 40px; max-width: min(32%, 460px); pointer-events: none; }
.map-hero h1 { font-size: clamp(2.2rem, 3.8vw, 4rem); min-height: 1em; }
.map-hero .lede { margin-top: 18px; }
.map-hero .cta { margin-top: 22px; pointer-events: auto; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--fg-2); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); }
.status[data-state=live] { color: var(--live); } .status[data-state=live] .dot { background: var(--live); animation: pulse-live 2s infinite; }
.status[data-state=off] { color: var(--red); } .status[data-state=off] .dot { background: var(--red); }
.herostats { display: flex; gap: 32px; margin: 26px 0 0; }
.herostats div { display: grid; gap: 2px; }
.herostats dt { font-size: 11px; color: var(--fg-3); }
.herostats dd { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.04em; }
.herostats dd.small { font-size: 14px; letter-spacing: 0; font-weight: 400; padding-top: 8px; }
.countdown { margin-top: 22px; display: grid; gap: 4px; }
.countdown span { color: var(--fg-3); font-size: 12px; }
.countdown strong { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -0.05em; color: var(--tang); }
.legend { position: absolute; z-index: 2; left: 36px; bottom: 22px; display: grid; gap: 7px; font-size: 11px; color: var(--fg-3); }
.lhex { width: 13px; height: 13px; }
.lhex polygon { fill: var(--bg); stroke: var(--tang); stroke-width: 1.6; }
.lhex.held polygon { fill: oklch(0.7 0.16 162); stroke: none; }
.lhex.mine polygon { fill: var(--bg); stroke: var(--blue-2); stroke-width: 3; }
.ltoken { width: 7px; height: 8px; background: oklch(0.7 0.16 300); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: inline-block; box-shadow: 9px 0 0 oklch(0.7 0.16 60); margin-right: 9px; }
.larea { width: 12px; height: 12px; display: inline-block; background: color-mix(in oklab, oklch(0.7 0.16 162) 30%, var(--land)); border: 1px dashed var(--fg-3); }
.hud { position: absolute; z-index: 2; right: 22px; bottom: 22px; display: flex; gap: 16px; font-size: 11px; color: var(--fg-3); }
.hud:empty::before { content: 'hover the map'; }
.hud .hud-ch { color: var(--tang); }

/* the map: wireframe terrain, lit challenge cells */
.hexmap .land { fill: var(--land); stroke: var(--land-edge); stroke-width: .5; transition: fill .6s; }
.hexmap .land.ctrl { fill: color-mix(in oklab, var(--c) 24%, var(--land)); stroke: color-mix(in oklab, var(--c) 35%, var(--land-edge)); }
#main:focus { outline: none; }
.hexmap .land:hover { fill: #2b2f34; }
.hexmap .land.ctrl:hover { fill: color-mix(in oklab, var(--c) 34%, var(--land)); }
.hexmap .land.wave { animation: wave 1.1s var(--ease) var(--delay, 0ms) both; }
@keyframes wave { 25% { fill: var(--wave); } }
.hexmap .borders line { stroke: var(--fg-3); stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 1.6 1.4; opacity: .8; }
.hexmap .cell { cursor: pointer; outline: none; }
.hexmap .cell > * { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease); }
.hexmap .hex { fill: var(--bg); stroke: var(--tang); stroke-width: .9; transition: filter .25s; }
.hexmap .cell.held .hex { fill: var(--c); stroke: none; }
.hexmap .val { font: 600 5.4px var(--mono); fill: var(--tang); pointer-events: none; letter-spacing: -.03em; }
.hexmap .cell.held .val { fill: var(--bg); font-size: 5.6px; font-weight: 700; }
.hexmap .sub { font: 500 3.6px var(--mono); fill: var(--bg); opacity: .75; pointer-events: none; }
.hexmap .ring { fill: none; stroke: var(--blue-2); stroke-width: 1.6; }
.hexmap .cell:hover > *, .hexmap .cell:focus-visible > * { transform: scale(1.16); }
.hexmap .cell:hover .hex, .hexmap .cell:focus-visible .hex { filter: drop-shadow(0 0 3px rgb(255 46 77 / .7)); }
.hexmap .cell.held:hover .hex { filter: drop-shadow(0 0 3px var(--c)); }
.hexmap .cell.selected .hex { stroke: var(--blue-2); stroke-width: 2; }
.hexmap .cell.captured .hex { animation: pop .9s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 30% { transform: scale(1.55); } 100% { transform: scale(1); } }
.hexmap .ripple { fill: none; stroke: var(--c); stroke-width: .8; transform-box: fill-box; transform-origin: center; animation: ripple 1.6s var(--ease) both; pointer-events: none; }
@keyframes ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(6); opacity: 0; } }
.hexmap .rlabel text { pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 2.4px; stroke-linejoin: round; }
.hexmap .cat { font: 600 6.6px var(--mono); fill: var(--fg); letter-spacing: -.03em; }
.hexmap .region { font: 400 3.9px var(--mono); fill: var(--fg-3); }
.hexmap .holder { font: 600 4px var(--mono); fill: var(--c); }
.hexmap .orbit { fill: none; stroke: var(--land-edge); stroke-width: .4; stroke-dasharray: .8 1.6; }
.hexmap .token { fill: var(--c); stroke: var(--bg); stroke-width: .5; }
.hexmap .token.first { stroke: var(--tang); stroke-width: .6; }
.hexmap .token.me { stroke: #fff; stroke-width: .8; }
.hexmap .more { font: 600 2.8px var(--mono); fill: var(--fg-2); }
.hexmap .cell:hover .tokens, .hexmap .cell:hover .orbit { transform: none; }
.maptip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 14px)); background: var(--bg-2); border: 1px solid var(--line-3); padding: 10px 12px; display: grid; gap: 3px; min-width: 200px; max-width: 300px; pointer-events: none; font-size: 12px; line-height: 1.4; box-shadow: 0 12px 30px rgb(0 0 0 / .5); }
.maptip[hidden] { display: none; }
.maptip strong { font-size: 13px; }
.tip-meta { color: var(--fg-2); }
.tip-fb { display: inline-flex; align-items: center; gap: 6px; }
.tip-fb::before { content: ''; width: 9px; height: 10px; background: var(--c); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.tip-fb.none { color: var(--tang); } .tip-fb.none::before { background: var(--tang); }

/* side rail */
.side { background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 22px 32px; display: grid; align-content: start; gap: 30px; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.side-head a { font-size: 12px; color: var(--fg-3); }
.livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--tang); animation: pulse 2s infinite; }
.notice { border: 1px solid rgb(31 107 255 / .55); background: var(--blue-dim); padding: 12px 14px; display: grid; gap: 4px; font-size: 13px; }
.notice p { font-family: var(--sans); font-size: 14px; }
.notice-k { color: var(--blue-ink); font-size: 11px; }
.notice .when { color: var(--fg-3); font-size: 11px; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; }
.ranks li { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; font-size: 13px; }
.ranks li:nth-child(1) .sc { color: var(--tang); }
.ranks li.is-me { background: var(--blue-dim); box-shadow: inset 2px 0 0 var(--blue); }
.ranks li.gap { height: 1px; padding: 0; margin: 6px 0; background: repeating-linear-gradient(90deg, var(--line-3) 0 3px, transparent 3px 7px); }
.rk { color: var(--fg-3); font-size: 12px; }
.ranks .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ranks .nm:hover { text-decoration: underline; }
.sc { font-weight: 600; }
.feedlist { list-style: none; margin: 0; padding: 0; display: grid; }
.feedlist li { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 10px; padding: 7px 0; font-size: 12.5px; line-height: 1.5; animation: slidein .5s var(--ease) both; }
.feedlist time { color: var(--fg-3); }
.feedlist .what a { color: var(--c); text-decoration: none; font-weight: 600; }
.feedlist .what a:hover { text-decoration: underline; }
.feedlist .k { color: var(--fg-3); }
.feedlist li.blood .k { color: var(--tang); }
@keyframes slidein { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- drawer ---------- */
.drawer { position: fixed; z-index: 40; top: var(--top); right: 0; bottom: 0; width: min(420px, 100vw); background: var(--bg-1); border-left: 1px solid var(--line-2);
  box-shadow: -24px 0 48px rgb(0 0 0 / .5); overflow-y: auto; transform: translateX(104%); transition: transform .34s var(--ease); outline: none; }
.drawer.open { transform: none; }
.scrim { position: fixed; inset: var(--top) 0 0 0; z-index: 39; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .25s; }
.scrim.open { opacity: 1; }
@media (min-width: 1100px) { .scrim { background: transparent; } }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 24px; background: var(--bg-1); border-bottom: 1px solid var(--line); }
.where { display: flex; gap: 8px; font-size: 12px; }
.where .region { color: var(--fg-3); }
.drawer-body { padding: 22px 24px 40px; display: grid; gap: 22px; }
.drawer h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.05em; line-height: 1.1; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin: 0; border: 1px solid var(--line); }
.stats div { padding: 10px 14px; border-right: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.stats div:last-child { border-right: 0; }
.stats dt { font-size: 10.5px; color: var(--fg-3); }
.stats dd { margin: 0; font-size: 14px; font-weight: 600; }
.stats dd.big { color: var(--tang); font-size: 22px; line-height: 1; letter-spacing: -0.04em; }
.stats .fb { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; }
.stats .fb .swatch { width: 14px; height: 16px; font-size: 0; }
.prose { font-family: var(--sans); font-size: 15px; line-height: 1.65; max-width: 68ch; color: #cfd4d2; }
.prose p + p, .prose p + pre, .prose pre + p, .prose ul + p, .prose p + ul { margin-top: .8em; }
.prose code { font-size: .85em; background: var(--bg-3); padding: .12em .4em; color: var(--tang-2); }
.prose pre { background: var(--bg); border: 1px solid var(--line); padding: 14px 16px; overflow-x: auto; margin: 0; }
.prose pre code { background: none; padding: 0; color: var(--fg); }
.prose a { color: var(--blue-ink); }
.prose ul { padding-left: 1.2em; margin: 0; }
.byline { color: var(--fg-3); font-size: 12px; }
.block { display: grid; gap: 10px; }
.files, .hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; font-size: 13px; }
.files a { display: inline-flex; align-items: center; gap: 8px; }
.size { color: var(--fg-3); font-size: 12px; }
.sha { grid-column: 1 / -1; color: var(--fg-3); font-size: 10.5px; overflow-wrap: anywhere; }
.hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.hint.open { display: grid; }
.hint-n { font-size: 12px; color: var(--fg-3); }
.flagform { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border: 1px solid var(--line-2); background: var(--bg); }
.flagform:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.flagform input.flag { border: 0; box-shadow: none !important; background: transparent; font-size: 14px; padding: 14px 10px; }
.flagform button { border-radius: 0; align-self: stretch; padding: 0 18px; }
.flag-msg { min-height: 1.4em; margin-top: 10px; font-size: 13px; }
.flag-msg.err { color: var(--red); }
.flag-msg.ok { color: var(--live); font-weight: 600; }
.captured { border: 1px solid var(--c); background: color-mix(in oklab, var(--c) 14%, transparent); padding: 14px 16px; display: grid; gap: 4px; font-size: 13px; animation: develop .7s var(--ease); }
.captured strong { color: var(--c); font-size: 14px; }
@keyframes develop { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- board, scoreboard, team ---------- */
.board { display: grid; grid-template-columns: repeat(var(--cols), minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); overflow-x: auto; }
.col { display: grid; align-content: start; background: var(--bg); }
.col-head { padding: 16px 14px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.col-head h2 { font-size: 15px; }
.col-head p { color: var(--fg-3); font-size: 11px; }
.progress { display: flex; align-items: center; gap: 10px; color: var(--fg-2) !important; }
.bar { flex: 1; height: 2px; background: var(--line-2); position: relative; }
.bar::after { content: ''; position: absolute; inset: 0; background: var(--blue-2); transform: scaleX(var(--p)); transform-origin: left; }
.tile { --c: transparent; display: grid; justify-items: start; text-align: left; gap: 6px; padding: 16px 14px; background: var(--bg); color: var(--fg); border-radius: 0; border-bottom: 1px solid var(--line); font-weight: 400; position: relative; transition: background .15s; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: var(--c); }
.tile:hover { background: var(--bg-2); }
.tile .tv { font-size: 22px; font-weight: 600; color: var(--tang); letter-spacing: -0.05em; line-height: 1; }
.tile .tt { font-family: var(--sans); font-size: 14px; line-height: 1.3; }
.tile .ts { font-size: 11px; color: var(--fg-3); }
.tile.mine { background: color-mix(in oklab, var(--c) 12%, var(--bg)); }
.tile.mine .tv { color: var(--c); }
.tile.mine .ts { color: var(--c); }
.locked { display: grid; gap: 10px; padding: 28px; border: 1px solid var(--line); max-width: 520px; }
.chartbox { margin: 0 0 40px; border: 1px solid var(--line); padding: 22px 14px 10px; background: var(--bg-1); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .ytick, .chart .xtick { fill: var(--fg-3); font: 400 11px var(--mono); }
.chart .series { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linejoin: miter; }
.chart .series.other { opacity: .3; }
.chart .series.me { stroke-width: 2.6; }
.chart .endlabel { fill: var(--c); font: 500 11px var(--mono); }
.chart .endlabel.lbl.other { opacity: .5; }
.chart .endlabel.lbl.me { font-weight: 700; }
.ranks-table, .admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ranks-table th, .admin-table th { text-align: left; font-weight: 400; color: var(--fg-3); font-size: 11px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.ranks-table td, .admin-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ranks-table tbody tr, .admin-table tbody tr { transition: background .15s; }
.ranks-table tbody tr:hover, .admin-table tbody tr:hover { background: var(--bg-1); }
.ranks-table tr.is-me td { background: var(--blue-dim); }
.ranks-table td.rk { color: var(--fg-3); }
.ranks-table tr:nth-child(1) .rk, .ranks-table tr:nth-child(1) .strong { color: var(--tang); }
.num { text-align: right !important; }
.strong { font-weight: 600; }
.teamcell { display: inline-flex; align-items: center; gap: 10px; }
.tag { display: inline-block; margin-left: 10px; font-size: 10.5px; padding: 2px 7px; border: 1px solid var(--line-3); color: var(--fg-2); vertical-align: middle; }
.tag.blood { color: var(--tang); border-color: rgb(255 46 77 / .55); }
.tag.ok { color: var(--tang); border-color: rgb(255 46 77 / .5); }
.teamname { display: flex; align-items: center; gap: 18px; }
.bigswatch { display: inline-grid; place-items: center; width: 52px; height: 58px; background: var(--c); color: var(--bg); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-size: 16px; letter-spacing: -.03em; flex: none; }
.members { color: var(--fg-3); margin-top: 14px; font-size: 12px; }

/* ---------- auth ---------- */
.authview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr); min-height: calc(100dvh - var(--top)); }
.auth-map { display: grid; place-items: center; padding: 48px; border-right: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; }
.auth-map .hexmap { width: 100%; max-height: calc(100dvh - var(--top) - 96px); }
.authform { align-self: center; width: min(420px, 100%); justify-self: center; padding: 48px 28px; display: grid; gap: 18px; }
.authform .lede { margin-top: -4px; font-size: 15px; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 11px; color: var(--fg-3); }
.field small { color: var(--fg-3); font-size: 11px; }
.form-err { color: var(--red); min-height: 1.2em; font-size: 13px; }
.form-err:empty { display: none; }

p.swap { color: var(--fg-2); font-size: 13px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 60; top: calc(var(--top) + 12px); right: 12px; display: grid; gap: 6px; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--bg-2); border: 1px solid var(--line-2); padding: 11px 13px; display: grid; gap: 6px; font-size: 12.5px; box-shadow: 0 14px 34px rgb(0 0 0 / .55); animation: toastin .4s var(--ease); }
.toast.out { opacity: 0; transform: translateX(14px); transition: .3s; }
.toast .line { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; }
.toast-kind { font-size: 10.5px; color: var(--fg-3); }
.toast.blood { border-color: rgb(255 46 77 / .6); } .toast.blood .toast-kind { color: var(--tang); }
.toast.announce { border-color: var(--blue); } .toast.announce .toast-kind { color: var(--blue-ink); }
.toast.announce .ghost { justify-self: start; }
.toast.err { color: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- live / projector ---------- */
body.is-live header.top { display: none; }
body.is-live .toasts { top: 12px; }
.liveview { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 32vw, 560px); height: 100dvh; }
.live-map { display: grid; place-items: center; padding: 3vh 2vw;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; }
.live-map .hexmap { width: 100%; height: 94vh; overflow: visible; }
.live-map .cell { pointer-events: none; }
.live-side { border-left: 1px solid var(--line); padding: 5vh 2.4vw; display: grid; grid-template-rows: auto 1fr auto; gap: 4vh; overflow: hidden; }
.live-head h1 { font-size: clamp(1.8rem, 2.8vw, 3.2rem); }
.live-clock { display: grid; margin-top: 3vh; gap: 4px; }
.live-clock span { color: var(--fg-3); font-size: 13px; }
.live-clock strong { font-size: clamp(3rem, 5vw, 5.6rem); font-weight: 600; color: var(--tang); line-height: 1; letter-spacing: -0.06em; }
.live-ranks { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; border-top: 1px solid var(--line); }
.live-ranks li { display: grid; grid-template-columns: 2.6rem 30px minmax(0, 1fr) auto; gap: 14px; align-items: center; font-size: clamp(1rem, 1.25vw, 1.4rem); padding: 1vh 0; border-bottom: 1px solid var(--line); }
.live-ranks .swatch { width: 26px; height: 29px; font-size: 9px; }
.live-ranks .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.live-ranks li:first-child { font-size: clamp(1.2rem, 1.6vw, 1.8rem); }
.live-ranks li:first-child .sc, .live-ranks li:first-child .rk { color: var(--tang); }
.live-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: clamp(.8rem, .9vw, 1rem); }
.live-feed li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.live-feed time { color: var(--fg-3); }
.live-feed strong { color: var(--c); }
.live-feed .ch { color: var(--fg); }
.live-feed li.blood { color: var(--tang); }
.fs-btn { position: fixed; left: 14px; bottom: 14px; opacity: .3; }
.fs-btn:hover, .fs-btn:focus-visible { opacity: 1; }
.blood-banner { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; visibility: hidden; }
.blood-banner.show { visibility: visible; animation: bannerbg 6s linear both; }
@keyframes bannerbg { 0% { background: rgb(22 23 25 / 0); } 5%, 88% { background: rgb(22 23 25 / .9); } 100% { background: rgb(22 23 25 / 0); } }
.blood-inner { text-align: center; display: grid; gap: 2vh; }
.blood-banner.show .blood-inner { animation: bannerin 6s var(--ease) both; }
@keyframes bannerin { 0% { opacity: 0; } 4% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.bl-kicker { font-size: clamp(3.4rem, 11vw, 12rem); font-weight: 700; color: var(--tang); line-height: .9; letter-spacing: -0.07em; text-shadow: 0 0 48px rgb(255 46 77 / .4); }
.bl-team { font-size: clamp(1.8rem, 4.4vw, 4.8rem); font-weight: 600; color: var(--c); line-height: 1; letter-spacing: -0.05em; }
.bl-ch { font-size: clamp(1rem, 1.8vw, 2rem); color: var(--fg-2); }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-2); margin-bottom: 24px; overflow-x: auto; }
.admin-tabs button { background: transparent; color: var(--fg-3); border-radius: 0; padding: 12px 16px; font-weight: 500; box-shadow: inset 0 -1px 0 transparent; }
.admin-tabs button:hover { color: var(--fg); background: var(--bg-1); }
.admin-tabs button[aria-selected=true] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--blue-2); }
.scope:not(:empty) { margin-bottom: 22px; }
.scope-pick { display: inline-flex; align-items: center; gap: 12px; }
.scope-pick span { font-size: 11px; color: var(--fg-3); }
.scope-pick select { width: auto; min-width: 280px; }
.adminform { display: grid; gap: 22px; max-width: 1000px; }
.adminform h2 { font-size: 16px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 20px; align-items: start; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.checks { display: grid; gap: 10px; padding-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.adminform .actions { margin: 6px 0 0; }
.admin-table td.row-actions { text-align: right; white-space: nowrap; }
.admin-table td.row-actions > * { margin-left: 6px; vertical-align: middle; }
.admin-table td:has(.codechip) { white-space: nowrap; }
.adminview { max-width: 1400px; }
.admin-table tr.is-off td { color: var(--fg-3); }
.admin-table .clip { max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table .sub { display: block; font-size: 11px; color: var(--fg-3); margin-top: 3px; white-space: pre; }
.ev-link { font-weight: 600; text-decoration: none; } .ev-link:hover { text-decoration: underline; }
.codechip { font-size: 12px; color: var(--tang); padding: 3px 7px; border: 1px dashed rgb(255 46 77 / .5); white-space: nowrap; }
.state { font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; color: var(--fg-3); }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line-3); }
.state[data-state=live] { color: var(--live); } .state[data-state=live]::before { background: var(--live); animation: pulse-live 2s infinite; }
.state[data-state=before] { color: var(--fg); } .state[data-state=before]::before { background: var(--fg-2); }
.startctl { display: inline-flex; gap: 4px; }
.hint-line { font-family: var(--sans); color: var(--fg-3); font-size: 13px; margin-top: 18px; max-width: 80ch; }
.editor-host:not(:empty) { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.preview { border: 1px solid var(--line); padding: 14px 16px; min-height: 236px; margin-top: 6px; }
.hints-edit { display: grid; gap: 10px; justify-items: start; }
.hint-row { display: grid; grid-template-columns: 1fr 100px auto; gap: 10px; align-items: end; width: 100%; }
.inline { display: flex; gap: 10px; align-items: center; } .inline input { max-width: 420px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg button { background: transparent; color: var(--fg-3); padding: 7px 12px; font-size: 12px; border-radius: 0; }
.seg button[aria-pressed=true] { background: var(--bg-3); color: var(--fg); }
.ann-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; max-width: 760px; border-top: 1px solid var(--line); }
.ann-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ann-list p { font-family: var(--sans); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .mapview { grid-template-columns: 1fr; height: auto; }
  .stage { display: grid; gap: 20px; padding: 32px 22px 22px; }
  .map-hero { position: static; max-width: none; order: -1; }
  .mapwrap { position: relative; inset: auto; height: min(72vh, 720px); }
  .legend, .hud { position: static; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .authview { grid-template-columns: 1fr; } .auth-map { display: none; }
  .liveview { grid-template-columns: 1fr; height: auto; } .live-map .hexmap { height: 70vh; }
  .evrow { grid-template-columns: 100px 1fr; } .ev-meta { grid-column: 2; } .ev-go { display: none; }
}
@media (max-width: 720px) {
  :root { --top: 92px; }
  header.top { grid-template-columns: 1fr auto; height: auto; padding: 10px 14px 0; gap: 6px 12px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; } .tabs a::after { bottom: 0; }
  .clock { display: none; }
  .me-name, .me .ghost { display: none; }
  .page { padding: 36px 18px 64px; }
  .stage { padding: 24px 14px 16px; } .mapwrap { height: 62vh; }
  .hud { display: none; }
  .split { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .hint-row { grid-template-columns: 1fr; }
  .evrow { grid-template-columns: 1fr; gap: 10px; } .ev-meta { grid-column: 1; flex-wrap: wrap; gap: 12px; }
  .stats { grid-template-columns: repeat(2, auto); } .stats div:nth-child(2) { border-right: 0; } .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

.tip-tokens { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.tip-tokens i, .tile .tokens i { width: 8px; height: 9px; background: var(--c); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: inline-block; }
.tile .tokens { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.col-head .holder { color: var(--c); }
.areadot { width: 8px; height: 9px; background: var(--tang); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: inline-block; align-self: center; }
.where { align-items: center; }
.shopnote { font-family: var(--sans); font-size: 13px; color: var(--fg-3); }
.paid { color: var(--tang); font-size: 11px; }
.hud .hud-area { color: var(--fg); }
.drawer { overflow-x: hidden; }
.drawer-body > *, .block > *, .prose { min-width: 0; }
.tile { width: 100%; justify-content: start; align-content: start; }
.col { min-width: 0; }
.tile { min-width: 0; }
.tile .tt { overflow-wrap: anywhere; }
.tile { white-space: normal; }
/* locked flags */
.hexmap .cell.locked .hex { stroke: var(--fg-3); stroke-dasharray: 1.4 1; fill: var(--bg); }
.hexmap .cell.locked.held .hex { stroke: none; stroke-dasharray: none; fill: var(--c); }
.hexmap .padlock { fill: none; stroke: var(--fg-2); stroke-width: .8; stroke-linejoin: round; pointer-events: none; }
.tip-lock { color: var(--fg-2); }
.lockbox { border: 1px dashed var(--line-3); padding: 16px; font-family: var(--sans); color: var(--fg-2); }
.lockbox strong { color: var(--fg); }
.tile.locked .tv { color: var(--fg-3); }
.tile.locked .tt { color: var(--fg-2); }
.map-hero h1.long { font-size: clamp(1.7rem, 2.5vw, 2.5rem); line-height: 1.05; }
.live-head h1 { overflow-wrap: anywhere; }
.board { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; }
.board { background: none; gap: 0; border: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.board .col { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- landing ambience ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient svg { width: 100%; height: 100%; }
.ambient polygon { fill: none; stroke: #2a2e33; stroke-width: .8; }
.ambient polygon.on { animation: hexon 4.5s ease-in-out both; }
@keyframes hexon { 0%, 100% { stroke: #2a2e33; fill: transparent; } 50% { stroke: color-mix(in oklab, var(--c) 55%, #2a2e33); fill: color-mix(in oklab, var(--c) 10%, transparent); } }
.ambient-sweep { position: absolute; left: 0; right: 0; height: 30vh; top: -30vh; background: linear-gradient(180deg, transparent, rgb(31 107 255 / .06) 60%, rgb(90 128 240 / .14) 98%, transparent); animation: sweep 9s linear infinite; }
@keyframes sweep { to { transform: translateY(160vh); } }
.ambient-fade { position: absolute; inset: 0; background: radial-gradient(80% 70% at 30% 35%, transparent 0%, rgb(22 23 25 / .55) 55%, var(--bg) 100%); }
body:has(.ambient) { background: var(--bg); }
.picker .evlist li { background: rgb(22 23 25 / .78); backdrop-filter: blur(2px); }
.picker .codebox { background: rgb(28 30 33 / .9); }
@media (prefers-reduced-motion: reduce) { .ambient-sweep { display: none; } }

/* ---------- briefing ---------- */
.briefing { position: fixed; inset: 0; z-index: 85; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); background: rgb(22 23 25 / .97); opacity: 0; transition: opacity .35s var(--ease);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; }
.briefing.in { opacity: 1; }
.briefing.out { opacity: 0; }
.brief-map { display: grid; place-items: center; padding: 5vh 3vw; border-right: 1px solid var(--line); }
.brief-map .hexmap { width: 100%; max-height: 90vh; overflow: visible; }
.hexmap.assemble .land { animation: landin .7s var(--ease) both; animation-delay: calc(var(--ai, 0) * 260ms + var(--d, 0) * 900ms + 200ms); transform-box: fill-box; transform-origin: center; }
@keyframes landin { from { opacity: 0; transform: scale(.2); fill: var(--blue-2); } 60% { fill: color-mix(in oklab, var(--blue-2) 40%, var(--land)); } }
.hexmap.assemble .borders { animation: fadein .8s ease both; animation-delay: 2.2s; }
.hexmap.assemble .cell { animation: fadein .5s var(--ease) both; animation-delay: calc(var(--ai, 0) * 260ms + 1.4s); }
.hexmap.assemble .rlabel { animation: fadein .6s ease both; animation-delay: calc(var(--ai, 0) * 260ms + 1.8s); }
@keyframes fadein { from { opacity: 0; } }
.brief-text { display: flex; flex-direction: column; gap: 18px; height: 100vh; padding: 6vh 4vw 0; min-height: 0; }
.brief-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 18px; padding-right: 8px; scrollbar-width: thin;
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); }
.brief-actions { flex: none; position: relative; z-index: 2; padding: 16px 0 5vh; border-top: 1px solid var(--line); background: inherit; }
.brief-keyhint { font-size: 11px; color: var(--fg-3); }
.brief-status { display: inline-flex; align-items: center; gap: 8px; color: var(--live); font-size: 12px; }
.brief-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse-live 2s infinite; }
.brief-text h1 { font-size: clamp(2rem, 3.4vw, 3.4rem); min-height: 1.05em; overflow-wrap: anywhere; }
.brief-text .herostats { margin: 0; }
.brief-story { font-size: 16px; max-width: 60ch; }
.brief-story .reveal { animation: typein 1.1s steps(28, end) both; animation-delay: calc(var(--i) * 1.05s + .9s); }
.brief-story.done .reveal { animation: none; }
@keyframes typein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.brief-story strong { color: var(--tang); font-weight: 600; }
.brief-areas { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.brief-areas li { font-size: 12px; padding: 4px 9px; border: 1px solid var(--line-3); display: inline-flex; gap: 8px; animation: fadein .4s ease both; animation-delay: calc(var(--i) * 120ms + 1.6s); }
.brief-areas li span { color: var(--tang); }
.brief-actions { display: flex; gap: 12px; align-items: center; }
button.big { padding: 14px 24px; font-size: 14px; }
@media (max-width: 900px) { .briefing { grid-template-columns: 1fr; overflow-y: auto; } .brief-map { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); } .brief-text { height: auto; padding-bottom: 0; } .brief-body { overflow: visible; mask-image: none; } .brief-actions { position: sticky; bottom: 0; background: var(--bg); } }
@media (prefers-reduced-motion: reduce) { .hexmap.assemble *, .brief-story .reveal { animation: none !important; } }

/* ---------- players & teams ---------- */
.me-user { font-size: 12px; color: var(--fg-3); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
.seg button[aria-pressed=true] { background: var(--blue-dim); color: var(--fg); box-shadow: inset 0 0 0 1px var(--blue); }
.teambox { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); background: var(--bg-1); }
.teamchoice { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); max-width: 900px; }
.choice { display: grid; gap: 14px; padding: 26px; background: var(--bg); align-content: start; }
.choice p { font-family: var(--sans); font-size: 14px; }
.codecard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 18px; padding: 20px 22px; border: 1px dashed rgb(255 46 77 / .55); background: var(--tang-dim); max-width: 640px; margin-bottom: 28px; }
.codecard strong { font-size: 22px; color: var(--tang); letter-spacing: -0.02em; }
.codecard p { grid-column: 1 / -1; font-family: var(--sans); font-size: 13px; }
.members { list-style: none; padding: 0; margin: 0 0 28px; max-width: 640px; border-top: 1px solid var(--line); }
.members li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.members li.is-me { background: var(--blue-dim); }
.tag.decoy { color: #fff; background: var(--red); border-color: var(--red); }
.memberlist { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.memberlist button { padding: 1px 6px; font-size: 11px; }
.admin-table td.mono { white-space: nowrap; }
.members li span:not(.swatch):first-of-type { color: var(--fg); }
.briefing { background-color: var(--bg); }
.briefing .brief-map, .briefing .brief-text { background: transparent; }

/* ======================= v4: landing, fitting map, themes ======================= */
button, .btn { box-shadow: none; }
button:not(.ghost):not(.danger):not(.icon):not(.linklike):not(.switch):hover, .btn:not(.ghost):hover { box-shadow: var(--blue-glow); }

/* landing */
.landing { max-width: 1320px; margin: 0 auto; padding: 0 32px 96px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); align-items: center; gap: 40px; min-height: calc(100dvh - var(--top) - 40px); padding: 32px 0; }
.hero-text { display: grid; gap: 22px; align-content: center; }
.hero-status { display: inline-flex; align-items: center; gap: 9px; color: var(--live); font-size: 12px; }
.hero-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse-live 2s infinite; }
.hero-status.idle { color: var(--fg-3); } .hero-status.idle .dot { background: var(--fg-3); animation: none; }
.hero-title { font-size: clamp(2.8rem, 6.4vw, 6.2rem); line-height: .95; letter-spacing: -0.06em; min-height: 1.9em; }
.hero-text .lede { font-size: 17px; margin: 0; max-width: 46ch; }
.hero-auth { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.hero-auth .admin-link { margin-left: 8px; }
.hero-me { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.hero-me strong { color: var(--fg); }
.hero-graphic { position: relative; aspect-ratio: 0.82; width: 100%; max-height: calc(100dvh - var(--top) - 80px); justify-self: center; display: grid; place-items: center; }
.hero-graphic .hexmap { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 40px rgb(31 107 255 / .18)); }
.hero-ring { position: absolute; inset: 6%; border-radius: 50%; border: 1px dashed rgb(61 139 255 / .25); animation: spin 60s linear infinite; pointer-events: none; }
.hero-ring::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--tang); box-shadow: 0 0 14px var(--tang); }
@keyframes spin { to { transform: rotate(360deg); } }
.hexmap .land.glint { animation: glint 5s ease-in-out both; }
@keyframes glint { 0%, 100% { fill: var(--land); } 50% { fill: color-mix(in oklab, var(--wave) 55%, var(--land)); stroke: color-mix(in oklab, var(--wave) 60%, var(--land-edge, var(--land))); } }
.list-head { font-size: 13px; color: var(--fg-3); margin: 8px 0 14px; font-weight: 500; }
.landing .evlist { margin-bottom: 40px; }
.landing .evrow { grid-template-columns: 52px minmax(0, 1fr) auto 70px; }
.landing .ev-meta { align-items: center; }
.emblem { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-3); color: var(--blue-ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--bg-2); }
.emblem[data-theme=xmas] { color: #dff1ff; background: linear-gradient(160deg, #1b3a66, #11203a); }
.emblem[data-theme=spring] { color: #ffd59a; background: linear-gradient(160deg, #3c2a3c, #23202a); }
.emblem[data-theme=cyber] { color: var(--blue-2); background: linear-gradient(160deg, #0f2147, #10151f); }
.emblem[data-theme=default] { color: var(--tang); }
.evrow:hover .emblem { box-shadow: var(--blue-glow); }
.landing li[data-theme=xmas] .evrow:hover { background: linear-gradient(90deg, rgb(31 107 255 / .08), transparent 60%); }
.rolepick { margin-bottom: 4px; }
.rolepick a { flex: 1; text-align: center; padding: 8px 12px; font-size: 12px; color: var(--fg-3); text-decoration: none; }
.rolepick a.on { background: var(--blue-dim); color: var(--fg); box-shadow: inset 0 0 0 1px var(--blue); }
.brief-status .emblem { width: 26px; height: 26px; }
.brief-status .emblem svg { width: 15px; height: 15px; }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-graphic { max-width: 440px; order: -1; max-height: 52vh; }
  .landing .evrow { grid-template-columns: 44px 1fr; } .landing .ev-meta { grid-column: 2; flex-wrap: wrap; }
}

/* the map always fits: hero column + map column, map scales inside its cell */
.stage { display: grid; grid-template-columns: minmax(240px, 30%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 12px 24px; padding: 32px 28px 22px 36px; background-image: none; isolation: isolate; }
.stage::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; opacity: .8; }
.stage::after { z-index: 0; }
.map-hero { position: relative; z-index: 2; left: auto; top: auto; max-width: none; grid-column: 1; grid-row: 1; align-self: start; }
.mapwrap { position: relative; inset: auto; z-index: 1; grid-column: 2; grid-row: 1 / span 2; min-height: 0; min-width: 0; height: 100%; }
.mapwrap .hexmap { position: absolute; inset: 0; width: 100%; height: 100%; }
.legend { position: relative; z-index: 2; left: auto; bottom: auto; grid-column: 1; grid-row: 2; align-self: end; }
.hud { z-index: 3; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.live-map, .brief-map { position: relative; }
@media (max-width: 1100px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding: 28px 18px 18px; }
  .mapwrap { grid-column: 1; grid-row: 2; height: min(78vh, 118vw); }
  .legend { grid-column: 1; grid-row: 3; }
}

/* themes: land palettes + area tints */
[data-theme=xmas] { --land: #1c2636; --land-edge: #2e3d55; }
[data-theme=xmas] .stage::before, .briefing[data-theme=xmas], .liveview[data-theme=xmas] .live-map { background-color: #10151f; }
[data-theme=xmas] .hexmap .land { stroke: #3a4f70; }
[data-theme=xmas] .hexmap .cat { fill: #eaf4ff; }
[data-theme=xmas] .hexmap .hex { filter: drop-shadow(0 0 3px rgb(255 46 77 / .55)); }
[data-theme=xmas] .stage::after { background: radial-gradient(70% 70% at 60% 45%, transparent 35%, #0d1119 100%); }
[data-theme=spring] { --land: #26222b; --land-edge: #3a3342; }
[data-theme=spring] .hexmap .land { stroke: #4a3f55; }
[data-theme=cyber] { --land: #121a28; --land-edge: #1f2d47; }
[data-theme=cyber] .hexmap .land { stroke: #24406e; }
[data-theme=cyber] .mapwrap::after, .liveview[data-theme=cyber] .live-map::after { content: ''; position: absolute; inset: -4%; border-radius: 50%; pointer-events: none; z-index: 2;
  background: conic-gradient(from 0deg, rgb(61 139 255 / .22), transparent 14%, transparent); animation: spin 6s linear infinite; mask: radial-gradient(circle, #000 60%, transparent 71%); }

/* sleigh */
.fx-sleigh { position: absolute; left: 0; top: var(--y, 12%); z-index: 2; color: #eaf4ff; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 6px rgb(255 255 255 / .35)); }
.fx-sleigh.go { animation: sleigh 11s linear both; }
@keyframes sleigh { 0% { transform: translateX(-260px) translateY(10px); opacity: 0; } 6% { opacity: .9; } 50% { transform: translateX(50vw) translateY(-14px); } 94% { opacity: .9; } 100% { transform: translateX(110vw) translateY(6px); opacity: 0; } }
.fx-sleigh svg { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .hero-ring, [data-theme=cyber] .mapwrap::after { animation: none; } }
.hero-map .land { fill: #232830; stroke: #39414b; }
[data-theme=cyber] .mapwrap::after, .liveview[data-theme=cyber] .live-map::after { opacity: .6; }

/* =================== per-box themes: map palettes =================== */
[data-theme=network] { --land: #13202c; --land-edge: #20384d; --accent: #3d8bff; }
[data-theme=network] .hexmap .land { stroke: #275079; }
[data-theme=network] .stage::before, .briefing[data-theme=network], .liveview[data-theme=network] .live-map { background-color: #0e151d; }
[data-theme=osint] { --land: #1f2420; --land-edge: #333d35; --accent: #ff2e4d; }
[data-theme=osint] .hexmap .land { stroke: #4b5a4e; stroke-dasharray: 3 3; }
[data-theme=osint] .stage::before, .briefing[data-theme=osint], .liveview[data-theme=osint] .live-map { background-color: #121513;
  background-image: linear-gradient(rgb(255 255 255 / .03) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .03) 1px, transparent 1px); background-size: 48px 48px; }
[data-theme=forensics] { --land: #1a1d24; --land-edge: #2c3240; --accent: #8cc0ff; }
[data-theme=forensics] .hexmap .land { stroke: #3e475c; }
[data-theme=forensics] .stage::before, .briefing[data-theme=forensics], .liveview[data-theme=forensics] .live-map { background-color: #0f1116;
  background-image: repeating-linear-gradient(0deg, rgb(140 192 255 / .035) 0 1px, transparent 1px 4px); }
[data-theme=elf] { --land: #1b2a22; --land-edge: #2c4335; --accent: #3ddc84; }
[data-theme=elf] .hexmap .land { stroke: #3c6049; }
[data-theme=elf] .hexmap .hex { filter: drop-shadow(0 0 3px rgb(61 220 132 / .5)); }
[data-theme=elf] .stage::before, .briefing[data-theme=elf], .liveview[data-theme=elf] .live-map { background-color: #0f1712; }
[data-theme=elf] .stage::after { background: radial-gradient(70% 70% at 55% 45%, transparent 35%, #0b120e 100%); }
[data-theme=spring] { --accent: #ffb3c7; }
[data-theme=spring] .stage::before, .briefing[data-theme=spring], .liveview[data-theme=spring] .live-map { background-color: #1a171d; background-image: radial-gradient(60% 50% at 30% 20%, rgb(255 179 199 / .06), transparent), radial-gradient(50% 50% at 80% 80%, rgb(185 230 201 / .05), transparent); }
[data-theme=spring] .hexmap .hex { filter: drop-shadow(0 0 3px rgb(255 179 199 / .45)); }
[data-theme=cyber] { --accent: #3d8bff; }
[data-theme=cyber] .stage::before, .briefing[data-theme=cyber], .liveview[data-theme=cyber] .live-map { background-color: #0b0f17; }
[data-theme=xmas] { --accent: #ff2e4d; }
[data-theme=default] { --accent: #ff2e4d; }
.stage, .live-map, .brief-map { position: relative; }
.mapwrap, .live-map .hexmap, .brief-map .hexmap { position: relative; z-index: 1; }

/* fairy lights */
.fx-garland { position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 2; pointer-events: none; }
.fx-garland svg { width: 100%; height: 100%; overflow: visible; }
.fx-garland .bulb ellipse { fill: var(--c); filter: drop-shadow(0 0 6px var(--c)); animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); }
@keyframes twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .25; } 55% { opacity: .35; } }

/* bunny */
.fx-bunny { position: absolute; left: 0; bottom: 6%; z-index: 2; pointer-events: none; opacity: 0; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .4)); }
.fx-bunny.go { animation: bunny-run 9s linear both; }
.fx-bunny.go svg { animation: hop .6s cubic-bezier(.3, 0, .7, 1) infinite; }
@keyframes bunny-run { 0% { transform: translateX(-80px); opacity: 0; } 5%, 95% { opacity: 1; } 100% { transform: translateX(calc(100cqw + 80px)); opacity: 0; } }
@keyframes hop { 0%, 100% { transform: translateY(0) scaleY(.92); } 50% { transform: translateY(-26px) scaleY(1.04); } }
.stage, .live-map, .brief-map { container-type: inline-size; }

/* emblems */
.emblem[data-theme=elf] { color: #3ddc84; background: linear-gradient(160deg, #1d3b2a, #13201a); }
.emblem[data-theme=network] { color: var(--blue-2); background: linear-gradient(160deg, #10284a, #121820); }
.emblem[data-theme=osint] { color: #ff5c73; background: linear-gradient(160deg, #3a1d24, #1a1718); }
.emblem[data-theme=forensics] { color: #8cc0ff; background: linear-gradient(160deg, #1d2536, #14161c); }
.emblem[data-theme=cyber] .sweep { transform-origin: 12px 12px; animation: spin 3s linear infinite; }
.emblem[data-theme=xmas] svg { animation: spin 14s linear infinite; }
.emblem[data-theme=spring] svg { animation: wobble 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.emblem[data-theme=elf] svg { animation: wobble 3s ease-in-out infinite; transform-origin: 50% 90%; }
.emblem[data-theme=network] circle { animation: blink 2s ease-in-out infinite; }
.emblem[data-theme=network] circle:nth-child(3) { animation-delay: .4s; } .emblem[data-theme=network] circle:nth-child(4) { animation-delay: .8s; } .emblem[data-theme=network] circle:nth-child(5) { animation-delay: 1.2s; }
.emblem[data-theme=osint] svg { animation: search 4s ease-in-out infinite; }
.emblem[data-theme=forensics] svg { animation: blink 2.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes search { 0%, 100% { transform: translate(-2px, -1px); } 25% { transform: translate(2px, -2px); } 50% { transform: translate(2px, 2px); } 75% { transform: translate(-2px, 1px); } }

/* landing rows: each box gets its own colour, live ones animate constantly, others on hover */
.landing .evlist li, .picker .evlist li { position: relative; overflow: hidden; isolation: isolate; }
.evlist li .fx-canvas { z-index: 0; opacity: .75; mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.evlist li .evrow { z-index: 1; }
.evlist li .evrow::before { background: var(--accent, var(--blue)); }
.evlist li[data-theme] .evrow:hover { background: linear-gradient(90deg, color-mix(in oklab, var(--accent, var(--blue)) 10%, transparent), transparent 70%); }
.evlist li.is-live { border-left: 2px solid var(--live); background: linear-gradient(90deg, var(--live-dim), transparent 45%), rgb(22 23 25 / .78); }
.evlist li.is-live .emblem { box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in oklab, var(--accent) 50%, transparent); }
.evlist li.is-live .ev-name { text-shadow: 0 0 22px color-mix(in oklab, var(--accent) 35%, transparent); }
.landing .emblem, .picker .emblem { width: 46px; height: 50px; }

/* =================== hints: first free =================== */
.hint.free { border-color: rgb(46 229 157 / .35); background: var(--live-dim); }
.freebadge, .paid.free { margin-left: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--live); }
.freebadge { padding: 2px 6px; border: 1px solid rgb(46 229 157 / .5); }
button.freebtn { background: var(--live); color: #08140e; border-color: var(--live); }
button.freebtn:hover { background: #5cf0b6; box-shadow: 0 0 18px rgb(46 229 157 / .4); }

/* =================== scoreboard =================== */
.sb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.sb-stats > div { background: var(--bg-1); padding: 16px 18px; display: grid; gap: 6px; }
.sb-stats span { font-size: 11px; color: var(--fg-3); }
.sb-stats strong { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.04em; color: var(--tang); }
.sb-stats strong.hot { font-size: clamp(1.1rem, 1.8vw, 1.5rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-stats small { font-size: 12px; color: var(--fg-3); font-weight: 400; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: 8px auto 36px; max-width: 900px; }
.podium .step { --c: var(--blue); display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--fg); position: relative; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i) * 140ms + 100ms); }
.podium .step.empty { visibility: hidden; }
.pod-tag { display: grid; place-items: center; width: 62px; height: 70px; background: var(--c); color: var(--bg); font-weight: 700; font-size: 15px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); box-shadow: 0 0 30px var(--c); transition: transform .3s var(--ease); }
.podium .step:hover .pod-tag { transform: translateY(-6px) rotate(-4deg); }
.podium .step[data-place='1'] .pod-tag { width: 82px; height: 92px; font-size: 19px; animation: float 3.2s ease-in-out infinite; }
.pod-name { font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -0.05em; color: var(--c); }
.pod-badges { display: flex; gap: 6px; min-height: 20px; }
.plinth { width: 100%; display: grid; place-items: start center; padding-top: 12px; border-top: 2px solid var(--c); background: linear-gradient(180deg, color-mix(in oklab, var(--c) 18%, var(--bg-1)), var(--bg-1)); color: var(--fg-2); font-size: 13px; }
.step[data-place='1'] .plinth { height: 120px; color: var(--fg); font-size: 16px; }
.step[data-place='2'] .plinth { height: 82px; }
.step[data-place='3'] .plinth { height: 56px; }
.crown { width: 34px; height: 34px; fill: #ffd166; filter: drop-shadow(0 0 10px rgb(255 209 102 / .6)); animation: float 3.2s ease-in-out infinite; }
.step.is-me .pod-name::after { content: ' (you)'; color: var(--blue-ink); font-weight: 400; }
.step.bump .pod-score { animation: flash 1.4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes flash { 0% { color: var(--live); text-shadow: 0 0 20px var(--live); transform: scale(1.15); } 100% { transform: none; } }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 6px; border: 1px solid var(--line-2); white-space: nowrap; }
.badge .bi { width: 11px; height: 11px; fill: currentColor; }
.badge.blood { color: var(--tang-2); border-color: rgb(255 46 77 / .4); background: var(--tang-dim); }
.badge.fire { color: #ffb347; border-color: rgb(255 179 71 / .45); background: rgb(255 179 71 / .1); animation: blink 1.4s ease-in-out infinite; }
.badge.up { color: var(--live); border-color: rgb(46 229 157 / .4); }
.badge.down { color: var(--fg-3); }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ranks-table.fun tbody tr { animation: slidein .5s var(--ease) both; animation-delay: calc(var(--i) * 35ms); position: relative; }
.ranks-table.fun tbody tr td:first-child { box-shadow: inset 3px 0 0 var(--c); }
.ranks-table.fun tbody tr:nth-child(-n+3) .rk { color: var(--c); font-weight: 600; }
.ranks-table.fun tr.bump { background: rgb(46 229 157 / .07); }
.ranks-table.fun tr.climb .rk { color: var(--live); }
.ranks-table .aff { margin-left: 8px; font-size: 11px; color: var(--fg-3); }
.sharebar { display: inline-block; width: 90px; height: 6px; background: var(--bg-3); position: relative; vertical-align: middle; }
.sharebar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); box-shadow: 0 0 8px var(--c); animation: grow 1s var(--ease) both; }
.gain { color: var(--live); font-size: 11px; margin-right: 8px; animation: blink 1s 3; }
@keyframes slidein { from { opacity: 0; transform: translateX(-14px); } }
@keyframes grow { from { width: 0; } }
@media (max-width: 640px) { .sb-stats { grid-template-columns: 1fr; } .podium { gap: 6px; } .pod-tag { width: 46px; height: 52px; } .podium .step[data-place='1'] .pod-tag { width: 58px; height: 66px; } }

/* =================== admin overview =================== */
.overview { display: grid; gap: 24px; }
.ovtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ovtile { --c: var(--fg-2); position: relative; display: grid; gap: 6px; padding: 18px; background: var(--bg-1); border: 1px solid var(--line); overflow: hidden; animation: rise .6s var(--ease) both; }
.ovtile:nth-child(2) { animation-delay: .06s; } .ovtile:nth-child(3) { animation-delay: .12s; } .ovtile:nth-child(4) { animation-delay: .18s; } .ovtile:nth-child(5) { animation-delay: .24s; }
.ovtile::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.ovtile::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 110px; height: 110px; background: var(--c); opacity: .07; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.ovtile.blue { --c: var(--blue-2); } .ovtile.live { --c: var(--live); } .ovtile.red { --c: var(--tang); }
.tile-l { font-size: 11px; color: var(--fg-3); }
.ovtile strong { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--c); }
.ovtile:not(.blue):not(.live):not(.red) strong { color: var(--fg); }
.tile-s { font-size: 11px; color: var(--fg-3); font-family: var(--sans); }
.ov-card { padding: 20px; background: var(--bg-1); border: 1px solid var(--line); }
.ov-card h2, .ov-events h2 { font-size: 15px; margin: 0 0 12px; }
.ov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ovlegend { display: flex; gap: 14px; font-size: 11px; color: var(--fg-3); margin: 0; }
.ovlegend .k::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: -1px; }
.ovlegend .ok::before { background: var(--live); } .ovlegend .bad::before { background: var(--tang); }
.ovbars { display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; align-items: end; height: 150px; border-bottom: 1px solid var(--line-2); }
.ovbar { height: 100%; display: flex; flex-direction: column-reverse; gap: 1px; cursor: default; }
.ovbar span { display: block; height: var(--h); min-height: 0; transform-origin: bottom; animation: barup .7s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.ovbar .ok { background: linear-gradient(180deg, var(--live), #1a9c69); box-shadow: 0 0 10px rgb(46 229 157 / .3); }
.ovbar .wrong { background: rgb(255 46 77 / .55); }
.ovbar:hover span { filter: brightness(1.3); }
@keyframes barup { from { transform: scaleY(0); } }
.bars-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--fg-3); margin-top: 6px; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ov-ev { position: relative; display: grid; gap: 12px; padding: 18px; background: linear-gradient(160deg, color-mix(in oklab, var(--accent, var(--blue)) 9%, var(--bg-1)), var(--bg-1) 60%); border: 1px solid var(--line); border-top: 2px solid var(--accent, var(--blue)); }
.ov-ev-head { display: flex; gap: 12px; align-items: center; }
.ov-ev h3 { margin: 0 0 4px; font-size: 16px; color: var(--fg); }
.progress { height: 8px; background: var(--bg-3); overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--blue), var(--accent, var(--blue-2))); animation: grow 1.2s var(--ease) both; }
.ov-leaders { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ov-leaders li { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; }
.ov-leaders .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-leaders strong { color: var(--c); }
.medal { display: grid; place-items: center; width: 20px; height: 20px; font-size: 11px; border-radius: 50%; background: var(--bg-3); color: var(--fg-2); }
.ov-leaders li:first-child .medal { background: #ffd166; color: #2a2100; }
.ov-leaders li:nth-child(2) .medal { background: #c7ccd4; color: #1d2024; }
.ov-leaders li:nth-child(3) .medal { background: #c98a52; color: #24170b; }
.ov-ev .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.decoys { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.decoys li { display: grid; grid-template-columns: 80px 140px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.decoys code { color: var(--tang-2); font-size: 12px; }
@media (max-width: 720px) { .decoys li { grid-template-columns: 1fr 1fr; } }
.admin-tabs button[aria-selected=true] { box-shadow: inset 0 -2px 0 var(--blue), 0 8px 18px -12px var(--blue); }
@media (prefers-reduced-motion: reduce) { .emblem svg, .emblem .sweep, .emblem circle, .crown, .pod-tag, .badge.fire, .fx-garland .bulb ellipse { animation: none !important; } }

/* =================== landing: boxes as square cards =================== */
.evlist.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; border-top: 0; }
.evlist.cards li { border: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); aspect-ratio: 1; min-height: 250px; background: linear-gradient(165deg, color-mix(in oklab, var(--accent, var(--blue)) 12%, var(--bg-1)), rgb(22 23 25 / .9) 55%);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.evlist.cards li:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent, var(--blue)) 60%, transparent); box-shadow: 0 18px 40px -18px color-mix(in oklab, var(--accent, var(--blue)) 70%, transparent); }
.evlist.cards li.is-live { border-left: 1px solid var(--line-2); border-color: rgb(46 229 157 / .45); background: linear-gradient(165deg, color-mix(in oklab, var(--accent, var(--blue)) 14%, var(--bg-1)), rgb(22 23 25 / .9) 55%); }
.evlist.cards .evrow { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; height: 100%; padding: 22px; }
.evlist.cards .evrow::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 3px; transform: scaleX(0); transform-origin: left; }
.evlist.cards .evrow:hover::before, .evlist.cards .evrow:focus-visible::before, .evlist.cards li.is-live .evrow::before { transform: scaleX(1); }
.evlist.cards li.is-live .evrow::before { background: var(--live); }
.evlist.cards .evrow:hover { background: none; }
.evlist.cards .emblem { width: 58px; height: 64px; }
.evlist.cards .emblem svg { width: 28px; height: 28px; }
.evlist.cards .ev-main { gap: 8px; }
.evlist.cards .ev-name { font-size: clamp(1.25rem, 1.7vw, 1.55rem); }
.evlist.cards .ev-tag { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.evlist.cards .ev-meta { margin-top: auto; flex-wrap: wrap; gap: 8px 16px; }
.evlist.cards .ev-go { position: absolute; right: 22px; top: 26px; }
.evlist.cards li .fx-canvas { mask-image: linear-gradient(180deg, #000 30%, transparent 95%); opacity: .8; }
@media (max-width: 560px) { .evlist.cards li { aspect-ratio: auto; } }

/* =================== hero brand + credits =================== */
.hero-mark { display: inline-block; flex: none; width: 46px; height: 46px; background: url(/img/htf-mark.svg) center / contain no-repeat; filter: drop-shadow(0 0 10px rgb(79 232 168 / .35)); }
.hero-org .wordmark { font-size: 18px; color: var(--fg); }
.hero-org { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 13px; color: var(--fg-2); line-height: 1.35; }
.hero-org small { color: var(--fg-3); font-size: 11px; }
.site-foot { display: flex; align-items: center; gap: 16px; padding: 28px clamp(20px, 6vw, 92px) 34px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12px; position: relative; z-index: 1; background: var(--bg); }
.foot-text { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.foot-text strong { color: var(--fg); font-weight: 600; }
.foot-text .credit { color: var(--fg-2); }
body.in-event .site-foot, body.is-live .site-foot { display: none; }

/* =================== map key =================== */
.legend { display: grid; gap: 8px; padding: 12px 14px; max-width: 420px; background: rgb(16 17 19 / .78); border: 1px solid var(--line-2); backdrop-filter: blur(3px); }
.legend-h { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); cursor: pointer; }
.legend-h:hover { color: var(--fg); background: none; }
.legend-x { font-size: 15px; line-height: 1; color: var(--fg-2); }
.legend.closed { width: fit-content; padding: 8px 12px; justify-self: start; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.legend li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.legend li > span { display: grid; line-height: 1.25; min-width: 0; }
.legend strong { font-size: 12px; font-weight: 600; color: var(--fg); }
.legend small { font-size: 10.5px; color: var(--fg-3); font-family: var(--sans); }
.lkey { width: 30px; height: 30px; flex: none; overflow: visible; }
.lkey .k-open { fill: var(--bg); stroke: var(--tang); stroke-width: 1.6; }
.lkey .k-held { fill: #2ec4b6; stroke: none; }
.lkey .k-lock { fill: var(--bg-2); stroke: var(--line-3); stroke-width: 1.2; stroke-dasharray: 2 2; }
.lkey .k-pad { fill: none; stroke: var(--fg-2); stroke-width: 1.3; }
.lkey .k-mine { fill: none; stroke: var(--blue-2); stroke-width: 1.4; }
.lkey .k-tok.a { fill: #f15bb5; } .lkey .k-tok.b { fill: #fee440; } .lkey .k-tok.c { fill: #9b5de5; }
.lkey .k-area { fill: color-mix(in oklab, #2ec4b6 35%, var(--land, #2a2e33)); stroke: var(--land-edge, #3a3f45); stroke-width: .8; }
.lkey .k-t { font: 700 6.5px var(--mono, monospace); fill: var(--tang); text-anchor: middle; }
.lkey .k-t.dark { fill: #10201d; }
@media (max-width: 1100px) { .legend { max-width: none; } }
@media (max-width: 520px) { .legend ul { grid-template-columns: 1fr; } }

/* landing: once signed in, the hero shrinks so the boxes are on screen */
.landing.signed-in .hero { min-height: auto; padding-top: 4vh; padding-bottom: 2vh; }
.landing.signed-in .hero-title { font-size: clamp(2.2rem, 4.4vw, 4rem); min-height: 1.1em; }
.landing.signed-in .hero-graphic { max-height: 36vh; }
.landing.signed-in .hero-text .lede { display: none; }
.site-foot { justify-content: center; }

/* =================== per-box colour palettes (inside a box) =================== */
/* --p primary (buttons, focus, your team), --s secondary (points, open flags, highlights) */
body[data-box] { --p: #1f6bff; --s: #ff2e4d; }
body[data-box=xmas]      { --p: #e23d4f; --s: #f4c95d; }
body[data-box=elf]       { --p: #2fb36b; --s: #ffd166; }
body[data-box=spring]    { --p: #ff7eb6; --s: #8fd694; }
body[data-box=cyber]     { --p: #00c8e6; --s: #ff2bd6; }
body[data-box=network]   { --p: #2f8bff; --s: #19d3c5; }
body[data-box=osint]     { --p: #e8b931; --s: #ff2e4d; }
body[data-box=forensics] { --p: #8f6bff; --s: #7fd3ff; }
body[data-box=heist]     { --p: #d4af37; --s: #31c48d; }
body[data-box=dragon]    { --p: #e0313b; --s: #2fb36b; }
body[data-box=regime]    { --p: #4fd1ff; --s: #ff3b3b; }
body[data-accent] { --p: var(--box-accent); }
body[data-box]:not([data-box='']):not([data-box=default]), body[data-accent] {
  --blue: var(--p); --blue-2: color-mix(in oklab, var(--p) 82%, white); --blue-ink: color-mix(in oklab, var(--p) 55%, white);
  --blue-dim: color-mix(in oklab, var(--p) 22%, transparent); --blue-glow: 0 0 18px color-mix(in oklab, var(--p) 50%, transparent);
  --tang: var(--s); --tang-2: color-mix(in oklab, var(--s) 80%, white); --tang-dim: color-mix(in oklab, var(--s) 14%, transparent);
}
body[data-box]:not([data-box='']):not([data-box=default]) header.top { box-shadow: inset 0 -2px 0 var(--p); }
body[data-box=spring] button:not(.ghost):not(.linklike):not(.icon), body[data-box=heist] button:not(.ghost):not(.linklike):not(.icon), body[data-box=osint] button:not(.ghost):not(.linklike):not(.icon) { color: #1a1408; }

/* new theme maps */
[data-theme=heist] { --land: #1f1d17; --land-edge: #3a3424; --accent: #d4af37; }
[data-theme=heist] .hexmap .land { stroke: #4a412a; }
[data-theme=heist] .stage::before, .briefing[data-theme=heist], .liveview[data-theme=heist] .live-map { background-color: #12110d; }
[data-theme=dragon] { --land: #22191a; --land-edge: #3d2a2b; --accent: #e0313b; }
[data-theme=dragon] .hexmap .land { stroke: #5a3234; }
[data-theme=dragon] .hexmap .hex { filter: drop-shadow(0 0 3px rgb(224 49 59 / .55)); }
[data-theme=dragon] .stage::before, .briefing[data-theme=dragon], .liveview[data-theme=dragon] .live-map { background-color: #140f10; }
[data-theme=regime] { --land: #111a22; --land-edge: #1f3140; --accent: #4fd1ff; }
[data-theme=regime] .hexmap .land { stroke: #24506a; }
[data-theme=regime] .stage::before, .briefing[data-theme=regime], .liveview[data-theme=regime] .live-map { background-color: #0a1016;
  background-image: repeating-linear-gradient(0deg, rgb(79 209 255 / .04) 0 1px, transparent 1px 3px); }
.emblem[data-theme=heist] { color: #d4af37; background: linear-gradient(160deg, #3a3018, #17150f); }
.emblem[data-theme=dragon] { color: #ff5a5f; background: linear-gradient(160deg, #3d1416, #171010); }
.emblem[data-theme=regime] { color: #4fd1ff; background: linear-gradient(160deg, #0f2a3a, #0c1218); }
.emblem[data-theme=regime] svg { animation: blink 2.2s ease-in-out infinite; }
.emblem[data-theme=dragon] svg { animation: wobble 3.4s ease-in-out infinite; transform-origin: 50% 80%; }

/* =================== OT operator console =================== */
body.is-ot .site-foot { display: none; }
.otview { min-height: calc(100vh - 64px); display: grid; place-items: center; align-content: center; gap: 10px; padding: 14px 16px 18px;
  background: radial-gradient(60% 60% at 50% 40%, #13212f, #0b0e12 75%); }
.ot-back, .ot-note { margin: 0; width: min(1180px, 100%); font-size: 12px; color: var(--fg-3); }
.ot-back { margin-bottom: 10px; }
.ot-note { text-align: center; }
.ot-frame { width: min(1180px, 100%); background: linear-gradient(180deg, #f1ead9, #e2d8c2); border: 6px solid #1d4e8c; border-radius: 26px; padding: 14px 18px 12px;
  box-shadow: 0 0 0 2px #0e2a4d, 0 30px 80px rgb(0 0 0 / .6), inset 0 2px 0 rgb(255 255 255 / .7); color: #12253c; position: relative; }
.ot-frame::before, .ot-frame::after { content: ''; position: absolute; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: #a99f88; box-shadow: inset 0 1px 1px rgb(0 0 0 / .4); }
.ot-frame::before { left: 12px; } .ot-frame::after { right: 12px; }
.ot-title { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 auto 12px; padding: 8px 26px; width: fit-content; border: 2px solid #1d4e8c; border-radius: 10px; background: #f7f2e6; text-align: center; }
.ot-title strong { display: block; font: 800 clamp(1.1rem, 2.2vw, 1.7rem)/1.1 var(--mono, monospace); letter-spacing: .04em; color: #10233b; }
.ot-title small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #1d7fbf; }
.ot-chev { color: #f0a020; font-weight: 900; letter-spacing: -2px; }
.ot-body { display: grid; grid-template-columns: 92px minmax(0, 1fr) 92px; gap: 14px; }
.ot-side { display: grid; align-content: space-evenly; gap: 12px; }
.ot-btn { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 10px; background: #e9e1cd; border: 2px solid #c9bea4; border-radius: 14px; color: #12253c; box-shadow: inset 0 -3px 0 #c9bea4; }
.ot-btn:hover { background: #f4eddc; }
.ot-btn .ot-pip { width: 30px; height: 5px; border-radius: 3px; background: #46c6ff; box-shadow: 0 0 8px #46c6ff; }
.ot-ic { display: grid; place-items: center; width: 50px; height: 50px; background: #0f2a4a; color: #5fd0ff; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.ot-btn small { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ot-glass { display: grid; grid-template-rows: minmax(0, 1fr) 132px; height: min(62vh, 520px); min-height: 380px; background: #05080b; border: 4px solid #1d4e8c; border-radius: 14px; overflow: hidden;
  box-shadow: inset 0 0 40px rgb(70 198 255 / .12); color: #cfe9ff; font-family: var(--mono, monospace); }
.ot-screen { position: relative; padding: 14px 16px; display: grid; align-content: start; gap: 10px; overflow: auto; }
.ot-term { border-top: 1px solid #16324c; padding: 8px 14px; overflow-y: auto; font-size: 11.5px; line-height: 1.45; background: #04070a; }
.ot-term .l-info { color: #7fd8ff; } .ot-term .l-warn { color: #ffd166; } .ot-term .l-err { color: #ff5d6c; } .ot-term .l-ok { color: #3ddc84; } .ot-term .l-purple { color: #c69cff; }
.ot-mimic svg { width: 100%; height: auto; display: block; }
.ot-mimic .lbl { fill: #6d8aa6; font: 600 9px var(--mono, monospace); text-anchor: middle; letter-spacing: .1em; }
.ot-mimic .big { fill: #e6f5ff; font: 700 20px var(--mono, monospace); text-anchor: middle; }
.ot-mimic .sm { fill: #a9c8e0; font: 600 9px var(--mono, monospace); text-anchor: middle; }
.ot-mimic .vessel { fill: #0e2a40; stroke: #46c6ff; stroke-width: 2; } .ot-mimic .vessel.cold { stroke: #ff5d6c; }
.ot-mimic .pipe { fill: none; stroke: #23445f; stroke-width: 5; stroke-linecap: round; }
.ot-mimic .pipe.flow { stroke: #46c6ff; stroke-dasharray: 8 6; animation: otflow 1s linear infinite; }
@keyframes otflow { to { stroke-dashoffset: -14; } }
.ot-mimic .pump { fill: #102233; stroke: #6d8aa6; stroke-width: 2; } .ot-mimic .pump.on { stroke: #3ddc84; fill: #0f2e22; }
.ot-mimic .valve { fill: #1d3c57; stroke: #46c6ff; stroke-width: 1.4; }
.ot-mimic .turb { fill: #0e2233; stroke: #46c6ff; stroke-width: 2; stroke-dasharray: 10 4; } .ot-mimic .turb.spin { animation: otspin 1.2s linear infinite; transform-origin: 356px 96px; transform-box: view-box; }
@keyframes otspin { to { transform: rotate(360deg); } }
.ot-mimic .bus { fill: none; stroke: #f0a020; stroke-width: 3; }
.ot-mimic .fd line { stroke: #f0a020; stroke-width: 3; } .ot-mimic .fd rect { stroke-width: 2; }
.ot-mimic .fd.closed rect { fill: #0f2e22; stroke: #3ddc84; } .ot-mimic .fd.open rect { fill: #3a1218; stroke: #ff5d6c; } .ot-mimic .fd.open line { stroke: #4a3a20; }
.ot-mimic .fd text { fill: #e6f5ff; font: 700 10px var(--mono, monospace); text-anchor: middle; }
.ot-hint { margin: 0; color: #6d8aa6; font-size: 12px; }
.ot-panel { border: 1px solid #1f4566; background: #081320; padding: 10px 12px; display: grid; gap: 10px; }
.ot-panel-h { display: flex; justify-content: space-between; align-items: center; } .ot-panel-h strong { color: #5fd0ff; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.ot-panel .icon { color: #cfe9ff; background: none; border: 0; font-size: 18px; }
.ot-ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ot-ctl label { display: grid; grid-template-columns: 160px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 12px; }
.ot-ctl input[type=range] { accent-color: #46c6ff; }
.ot-row { display: grid; grid-template-columns: 110px 90px auto; gap: 10px; align-items: center; justify-items: start; font-size: 12px; }
.ot-row b.ok { color: #3ddc84; } .ot-row b.bad { color: #ff5d6c; } .ot-row input { min-width: 0; }
.ot-panel button.small, .ot-login button { background: #1d4e8c; border-color: #2c6db8; color: #fff; }
.ot-k, .ot-k2 { margin: 0; font-size: 12px; color: #8fb0c9; } .ot-k { color: #5fd0ff; letter-spacing: .14em; font-weight: 700; }
.ot-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.ot-checks li::before { content: '●'; margin-right: 8px; color: #ff5d6c; } .ot-checks li.ok::before { color: #3ddc84; }
.ot-login { display: grid; gap: 10px; max-width: 360px; margin: 40px auto; text-align: center; }
.ot-login input { background: #0a1520; border: 1px solid #2c6db8; color: #e6f5ff; text-align: center; font-size: 18px; letter-spacing: .12em; }
.ot-win, .ot-trip { position: absolute; inset: auto 16px 12px 16px; padding: 12px 14px; display: grid; gap: 4px; }
.ot-win { background: rgb(15 46 34 / .95); border: 1px solid #3ddc84; } .ot-win strong { color: #3ddc84; letter-spacing: .1em; } .ot-win code { color: #fff; font-size: 15px; }
.ot-trip { background: rgb(58 18 24 / .95); border: 1px solid #ff5d6c; } .ot-trip strong { color: #ff5d6c; letter-spacing: .1em; }
.ot-win p, .ot-trip p { margin: 0; font-size: 12px; color: #cfe9ff; }
.ot-foot { display: grid; grid-template-columns: 1fr auto auto auto 1fr; gap: 18px; align-items: center; margin-top: 12px; }
.ot-hazard { height: 34px; border-radius: 6px; background: repeating-linear-gradient(-45deg, #f0a020 0 10px, #e9e1cd 10px 20px); max-width: 140px; }
.ot-hazard:last-child { justify-self: end; width: 100%; }
.ot-core, .ot-status { display: grid; justify-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ot-knob { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #2b4f78, #0f2440); border: 3px solid #cfd6de; box-shadow: 0 0 0 2px #46c6ff, 0 0 14px #46c6ff; }
.ot-mode[data-mode=manual] { color: #c2410c; } .ot-mode[data-mode=auto] { color: #1d7fbf; } .ot-mode[data-mode=locked] { color: #8a8070; }
.ot-led { width: 16px; height: 16px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; border: 2px solid #c9bea4; }
.ot-led.bad { background: #ff3b3b; box-shadow: 0 0 12px #ff3b3b; animation: blink .8s infinite; } .ot-led.win { background: #46c6ff; box-shadow: 0 0 12px #46c6ff; }
.ot-estop { width: 64px; height: 64px; border-radius: 50%; border: 6px solid #f0c020; background: radial-gradient(circle at 40% 35%, #ff6b6b, #c41d2b); color: #fff; font-weight: 800; letter-spacing: .06em; box-shadow: 0 4px 0 #8a1520; }
.ot-estop:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a1520; }
@media (max-width: 820px) { .ot-body { grid-template-columns: 1fr; } .ot-side { grid-auto-flow: column; } .ot-ctl label { grid-template-columns: 1fr; } .ot-foot { grid-template-columns: auto auto auto; } .ot-hazard { display: none; } }

/* =================== admin: static honeycomb, no motion =================== */
.adminview { position: relative; isolation: isolate; }
body:has(.adminview) { background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M28 1 54 16v31L28 62 2 47V16z'/%3E%3Cpath d='M28 62v35M0 97l2-50M56 97l-2-50'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 97px; background-attachment: fixed; }
.adminview .ovtile, .adminview .ovbar span, .adminview .progress span, .adminview .state::before { animation: none !important; }
.adminview .ovtile::before { box-shadow: none; }

.mappick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 6px; }
.mapopt { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 8px; border: 1px solid var(--line-2); background: var(--bg-1); cursor: pointer; text-align: center; }
.mapopt input { position: absolute; opacity: 0; pointer-events: none; }
.mapopt:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px var(--blue-dim); }
.mapopt:has(input:focus-visible) { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.mapthumb { display: block; width: 92px; height: 72px; }
.mapthumb svg { width: 100%; height: 100%; fill: var(--fg-2); }
.mapopt:has(input:checked) .mapthumb svg { fill: var(--blue-2); }
.mapopt strong { font-size: 12px; } .mapopt small { font-size: 10.5px; color: var(--fg-3); }
.colourpick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 28px; height: 28px; padding: 0; border: 2px solid var(--line-2); background: var(--c); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.sw.on { border-color: #fff; transform: scale(1.15); }
.colourpick input[type=color] { width: 40px; height: 30px; padding: 0; border: 1px solid var(--line-2); background: none; }
.colourpick .inline { display: inline-flex; gap: 8px; align-items: center; }
.guesses { border: 1px solid var(--line-2); background: var(--bg-1); padding: 18px; margin-bottom: 20px; display: grid; gap: 14px; }
.guesses .gh { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .guesses h2 { font-size: 16px; margin: 0; }
.guesses h3 { font-size: 13px; margin: 0 0 8px; }
.guesses code { overflow-wrap: anywhere; }
.recentg { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; max-height: 360px; overflow: auto; }
.recentg li { display: grid; grid-template-columns: 64px 18px minmax(0, 110px) minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.recentg li.ok code { color: var(--live); } .recentg li.decoy code { color: var(--tang-2); }
.recentg .swatch { width: 14px; height: 16px; font-size: 0; }
button.linklike.num { font-variant-numeric: tabular-nums; text-decoration: underline dotted; }
.adminview .emblem svg, .adminview .emblem .sweep, .adminview .emblem circle { animation: none !important; }

/* signed in: the landing background calms down */
body.calm-bg .ambient-sweep { display: none; }
body.calm-bg .ambient { opacity: .55; }
body.calm-bg .hero-ring { animation-duration: 160s; }
body.calm-bg .evlist .emblem svg, body.calm-bg .evlist .emblem .sweep, body.calm-bg .evlist .emblem circle { animation: none; }
body.calm-bg .evlist li:hover .emblem svg { animation: wobble 2.4s ease-in-out infinite; }
.legend ul[hidden] { display: none; }
.players-table td { vertical-align: middle; }
.players-table .teamcell { margin-right: 8px; }
.players-table select.small { max-width: 180px; }
.addplayer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding: 14px; border: 1px solid var(--line-2); background: var(--bg-1); }
.addplayer input, .addplayer select { min-width: 0; flex: 1 1 150px; }
.actions input[type=search] { min-width: 260px; }
.soundbtn { color: var(--fg-2); background: none; border: 1px solid var(--line-2); width: 32px; height: 32px; display: grid; place-items: center; padding: 0; }
.soundbtn:hover { color: var(--fg); border-color: var(--line-3); }
.soundbtn[aria-pressed=false] { color: var(--fg-3); }

/* =================== Workshop Line 3 console (festive skin) =================== */
.facview { background: radial-gradient(60% 60% at 50% 40%, #2a1418, #0d0a0b 75%); }
.ot-frame.fac { background: linear-gradient(180deg, #fbf6ec, #efe4cf); border-color: #b3202e; box-shadow: 0 0 0 2px #6d121b, 0 30px 80px rgb(0 0 0 / .6), inset 0 2px 0 rgb(255 255 255 / .7); }
.fac .ot-title { border-color: #b3202e; } .fac .ot-title small { color: #1f7a45; } .fac .ot-chev { color: #d4a017; }
.fac .ot-ic { background: #1f4d33; color: #ffd166; }
.fac .ot-btn .ot-pip { background: #ff4d5e; box-shadow: 0 0 8px #ff4d5e; }
.fac .ot-glass { border-color: #b3202e; }
.fac .ot-hazard { background: repeating-linear-gradient(-45deg, #b3202e 0 10px, #fbf6ec 10px 20px); }
.fac .ot-knob { box-shadow: 0 0 0 2px #ffd166, 0 0 14px #ffd166; }
.fac .ot-estop { border-color: #1f7a45; }
.ot-opts { display: inline-flex; gap: 6px; } .ot-opts button.on { background: #1f7a45; border-color: #2fb36b; }
.ot-mimic .belt { fill: #1b2733; stroke: #4a6378; stroke-width: 2; } .ot-mimic .belt.run { stroke-dasharray: 6 6; animation: otflow .6s linear infinite; }
.ot-mimic .gift { transform: translate(calc(40px + var(--i, 0) * 48px), 64px); transform-box: view-box; }
.ot-mimic .gift rect { fill: #c0392b; stroke: #ffd166; stroke-width: 1.5; } .ot-mimic .gift path { stroke: #ffd166; stroke-width: 2; }
.ot-mimic .gift:nth-child(2n) rect { fill: #1f7a45; }
.ot-mimic .gift.mv { animation: giftmove var(--dur, 2s) linear infinite; animation-delay: calc(var(--i, 0) * var(--dur, 2s) / -5); }
@keyframes giftmove { from { transform: translate(30px, 64px); } to { transform: translate(262px, 64px); } }
.ot-mimic .box { fill: #0e1d15; stroke-width: 2; } .ot-mimic .box.good { stroke: #3ddc84; } .ot-mimic .box.bad { stroke: #ff5d6c; fill: #2a0e12; }
.ot-mimic .big.good, .ot-mimic .sm.good { fill: #3ddc84; } .ot-mimic .big.bad, .ot-mimic .sm.bad { fill: #ff5d6c; }
.ot-mimic .big { font-size: 15px; }
.ot-mimic .pivot { fill: #ffd166; } .ot-mimic .gate { stroke: #ffd166; stroke-width: 5; stroke-linecap: round; }
.ot-mimic .chute { fill: #0e1520; stroke: #4a6378; stroke-width: 2; } .ot-mimic .chute.nice.on { stroke: #3ddc84; fill: #0f2e22; } .ot-mimic .chute.naughty.on { stroke: #ff5d6c; fill: #2a0e12; }
@media (prefers-reduced-motion: reduce) { .ot-mimic .gift.mv, .ot-mimic .belt.run { animation: none; } }
.results { border: 1px solid var(--line-2); background: var(--bg-1); padding: 16px 18px; margin-bottom: 22px; display: grid; gap: 12px; }
.results-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .results-h h2 { font-size: 15px; margin: 0; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.result-btn { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); font-weight: 400; }
.result-btn:hover { border-color: var(--blue); background: var(--bg-2); }
.result-btn strong { font-size: 13px; } .result-btn small { font-size: 11px; color: var(--fg-3); font-family: var(--sans); line-height: 1.35; } .result-btn .dl { font-size: 11px; color: var(--blue-ink); }
button.result-btn { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-content: start; white-space: normal; height: auto; min-height: 92px; overflow: hidden; }
button.result-btn > * { min-width: 0; }

/* OT consoles: the plant diagram scales to fit the screen, and control panels float over it, so they are always in view */
.ot-screen { display: block; overflow: hidden; }
.ot-screen > .ot-mimic { position: absolute; inset: 10px 14px 24px; }
.ot-screen > .ot-mimic svg { width: 100%; height: 100%; }
.ot-screen > .ot-hint { position: absolute; left: 16px; bottom: 6px; }
.ot-screen > .ot-panel { position: absolute; left: 12px; right: 12px; bottom: 10px; max-height: calc(100% - 20px); overflow: auto; z-index: 3;
  background: rgb(8 19 32 / .97); box-shadow: 0 -10px 30px rgb(0 0 0 / .55); }
.ot-screen > .ot-win, .ot-screen > .ot-trip { top: 10px; bottom: auto; z-index: 4; }
.ot-screen > .ot-login { position: relative; }

/* HackTheFlag wordmark */
.wordmark { font-family: var(--mono); font-weight: 700; letter-spacing: -0.02em; }
.wordmark .wm-the { color: #4fe8a8; }
.brand-mark { filter: drop-shadow(0 0 8px rgb(79 232 168 / .3)); }
.foot-text .build { color: var(--fg-3); font-size: 11px; }

/* ---- beginner route: a numbered serpentine trail through the box ---- */
:root { --route-1: #2ee59d; --route-2: #3d8bff; --route-3: #f5b83d; --route-4: #ff5c73; --route-5: #b78cff; --route-6: #4fd6e0; --route-7: #a6abb0; }
.map-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.small { padding: 8px 12px; font-size: 12px; }
.route-cta { text-decoration: none; }
.routeview { max-width: 1240px; }
.route-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.route-head .lede { max-width: 62ch; }
.route-progress { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; min-width: 220px; }
.route-progress strong { font-size: 28px; letter-spacing: -0.04em; }
.route-progress span { color: var(--fg-3); font-size: 12px; }
.route-progress .rp-bar { grid-column: 1 / -1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.route-progress .rp-bar i { display: block; height: 100%; width: var(--w); background: var(--live); border-radius: 3px; transition: width .6s var(--ease); }
.route-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .route-body { grid-template-columns: 1fr; } .route-cardbox { order: -1; position: static; } }
.route-map { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.route-svg { width: 100%; height: auto; display: block; overflow: visible; }
.route-svg .trail { fill: none; stroke: var(--ch); stroke-width: 4; stroke-dasharray: 2 10; stroke-linecap: round; opacity: .55; }
.route-svg .trail.walked { stroke-dasharray: none; opacity: 1; }
.route-svg .ch-label text { fill: var(--ch); font: 600 13px var(--mono); letter-spacing: .02em; }
.route-svg .stop { cursor: pointer; outline: none; }
.route-svg .stop .dot { fill: var(--bg-2); stroke: var(--ch); stroke-width: 3; transition: fill .2s, transform .2s var(--ease); }
.route-svg .stop .num { fill: var(--fg); font: 700 16px var(--mono); pointer-events: none; }
.route-svg .stop .name { fill: var(--fg-2); font: 500 12px var(--mono); pointer-events: none; }
.route-svg .stop .lvl { fill: #f5b83d; font: 400 13px var(--mono); letter-spacing: 2px; pointer-events: none; }
.route-svg .stop:hover .dot, .route-svg .stop:focus-visible .dot { transform: scale(1.12); }
.route-svg .stop:focus-visible .dot { stroke: var(--blue-2); stroke-width: 4; }
.route-svg .stop.done .dot { fill: var(--ch); }
.route-svg .stop.done .num { fill: #0b0c0d; }
.route-svg .stop.locked .dot { stroke-dasharray: 4 4; opacity: .6; }
.route-svg .stop.locked .name, .route-svg .stop.locked .lvl { opacity: .5; }
.route-svg .stop.locked .num { font-size: 14px; }
.route-svg .stop.next .name { fill: var(--fg); font-weight: 700; }
.route-svg .stop.next .halo { fill: none; stroke: var(--ch); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: routepulse 1.8s ease-out infinite; }
@keyframes routepulse { from { transform: scale(.75); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .route-svg .stop.next .halo { animation: none; opacity: .7; } }
.route-cardbox { position: sticky; top: calc(var(--top) + 16px); }
.route-card { background: var(--bg-1); border: 1px solid var(--line-2); border-left: 4px solid var(--live); border-radius: 10px; padding: 18px; display: grid; gap: 8px; }
.route-card.locked { border-left-color: var(--fg-3); }
.route-card.done { border-left-color: var(--blue-2); }
.route-card h2 { font-size: 20px; letter-spacing: -0.02em; }
.rc-k { margin: 0; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; color: var(--live); }
.route-card.locked .rc-k { color: var(--fg-3); } .route-card.done .rc-k { color: var(--blue-ink); }
.rc-meta { margin: 0; color: var(--fg-3); font-size: 12px; }
.rc-note { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--fg); }
.rc-lock { margin: 0; color: var(--fg-2); font-size: 12px; }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.route-chapters { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.route-chapters li { border: 1px solid var(--line); border-top: 3px solid var(--ch); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; background: var(--bg-1); }
.route-chapters strong { color: var(--ch); font-size: 13px; }
.route-chapters span { color: var(--fg-2); font: 13px/1.4 var(--sans); }
.route-chapters small { color: var(--fg-3); }
@media (max-width: 900px) { .route-cardbox { position: static; } }

/* ---- pricing ---- */
.pricing { max-width: 1180px; --mint: #4fe8a8; }
.pr-hero { padding: 24px 0 8px; max-width: 760px; }
.pr-kicker { margin: 0 0 12px; color: var(--mint); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.pr-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.pr-hero .lede { font-size: 18px; margin-top: 16px; }
.pr-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.pr-edu { margin-top: 20px; color: var(--fg-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--sans); }
.pr-pill { background: rgb(79 232 168 / .14); color: var(--mint); border: 1px solid rgb(79 232 168 / .35); border-radius: 99px; padding: 2px 10px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.pr-why { list-style: none; padding: 0; margin: 48px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pr-why li { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.pr-why h3 { color: var(--fg); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pr-why p { margin: 0; color: var(--fg-2); font: 15px/1.5 var(--sans); }
.pr-h2 { font-size: 26px; letter-spacing: -0.03em; margin: 40px 0 6px; scroll-margin-top: 80px; }
.pr-sub { color: var(--fg-3); margin: 0 0 20px; }
.pr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1100px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pr-grid { grid-template-columns: 1fr; } }
.pr-card { position: relative; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.pr-card.popular { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint), 0 12px 40px rgb(79 232 168 / .12); }
.pr-badge { position: absolute; top: -11px; left: 20px; margin: 0; background: var(--mint); color: #06261a; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 3px 10px; border-radius: 99px; }
.pr-card h3 { color: var(--fg); font-size: 16px; font-weight: 700; }
.pr-price { margin: 0; display: grid; gap: 2px; }
.pr-price strong { font-size: 38px; letter-spacing: -0.04em; }
.pr-price span { color: var(--fg-3); font-size: 12px; }
.pr-blurb { margin: 0; color: var(--fg-2); font: 14px/1.5 var(--sans); min-height: 4.5em; }
.pr-feat { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 7px; flex: 1; }
.pr-feat li { padding-left: 22px; position: relative; font: 14px/1.4 var(--sans); color: var(--fg); }
.pr-feat li::before { content: '✓'; position: absolute; left: 0; color: var(--mint); font-weight: 700; }
.pr-go { width: 100%; text-decoration: none; }
.pr-card:not(.popular) .pr-go { background: transparent; color: var(--fg); border: 1px solid var(--line-3); }
.pr-card:not(.popular) .pr-go:hover { border-color: var(--mint); box-shadow: none; }
.pr-card.popular .pr-go { background: var(--mint); color: #06261a; }
.pr-talk { align-self: center; font-size: 12px; }
.pr-ent { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, var(--bg-1), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px 24px; }
.pr-ent h3 { color: var(--fg); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pr-ent p { margin: 0; color: var(--fg-2); font: 15px/1.5 var(--sans); max-width: 70ch; }
.pr-faq { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 14px 28px; margin: 12px 0 0; }
@media (max-width: 700px) { .pr-faq { grid-template-columns: 1fr; gap: 4px; } .pr-faq dd { margin-bottom: 12px; } }
.pr-faq dt { font-weight: 700; color: var(--fg); }
.pr-faq dd { margin: 0; color: var(--fg-2); font: 15px/1.5 var(--sans); }
.pr-formwrap { margin-top: 24px; padding-bottom: 40px; scroll-margin-top: 70px; }
.pr-form { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; display: grid; gap: 14px; max-width: 860px; }
.pr-form textarea { width: 100%; }
.pr-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pr-status { color: var(--red); margin: 0; }
.pr-done { background: var(--bg-1); border: 1px solid var(--mint); border-radius: 14px; padding: 4px 22px 18px; max-width: 860px; }
.pr-done p { font: 16px/1.5 var(--sans); }
.small { font-size: 12px; }
.formhead { margin: 26px 0 10px; color: var(--fg); font-size: 14px; }
.tablewrap { overflow-x: auto; }
.signups-table td { vertical-align: top; }
.signups-table td.msg { max-width: 280px; white-space: pre-wrap; font-family: var(--sans); color: var(--fg-2); }
.signups-table .ok { color: var(--live); }

.route-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.route-links .btn { text-decoration: none; }
.pr-from { color: var(--fg-3); font-weight: 400; font-size: 13px; margin-left: 6px; }
.su-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.su-tile { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; }
.su-tile strong { font-size: 24px; letter-spacing: -0.03em; }
.su-tile span { color: var(--fg-2); font-size: 12px; }
.su-tile small { color: var(--fg-3); font-size: 11px; }

/* ---------- next-box countdown, register ahead ---------- */
.signup-card { margin: 18px 0 6px; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid #4fe8a8; background: color-mix(in srgb, #4fe8a8 5%, transparent); max-width: 560px; display: grid; gap: 8px; }
.signup-card.compact { margin-top: 14px; padding: 14px 16px; }
.signup-card .kicker { margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #4fe8a8; }
.signup-card h2 { margin: 0; font-size: 20px; }
.signup-card p { margin: 0; }
.bigclock { display: flex; gap: 8px; }
.bigclock span { display: grid; justify-items: center; min-width: 64px; padding: 8px 6px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.bigclock strong { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--fg); }
.bigclock small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); }
.compact .bigclock span { min-width: 52px; padding: 6px 4px; }
.compact .bigclock strong { font-size: 1.5rem; }
.signup-card .when { font-size: 13px; color: var(--fg-2); }
.signup-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.signup-actions .registered { color: #4fe8a8; font-weight: 600; }
.signup-actions .small-link { font-size: 13px; }
.signup-msg:empty { display: none; }
.signup-msg { font-size: 13px; color: var(--fg-2); }
label.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-2); cursor: pointer; }
label.check input { width: auto; margin: 0; }

/* ---------- Cardiff University edition ---------- */
.cu-logo { width: 56px; height: 56px; object-fit: contain; margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); box-sizing: content-box; }
.cu-foot { width: 40px; height: 40px; object-fit: contain; }
.site-foot .cu-foot[hidden] { display: none; }
.edition-cardiff .pricing-link { display: none; }

/* ---------- your own capture: green ---------- */
.toast.ok { border-color: rgb(46 229 157 / .7); background: linear-gradient(90deg, rgb(46 229 157 / .16), var(--bg-2) 70%); color: var(--fg); }
.toast.ok .ok-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--live); color: #0b2a1d; font-weight: 700; font-size: 13px; }
.toast.ok strong { color: var(--live); }

/* ---------- every flag captured ---------- */
.toast.ok.gold { border-color: #ffd166; background: linear-gradient(90deg, rgb(255 209 102 / .18), var(--bg-2) 70%); }
.toast.ok.gold .ok-tick { background: #ffd166; color: #3a2a00; }
.toast.ok.gold strong { color: #ffd166; }
.celebrate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgb(46 229 157 / .18), rgb(10 11 12 / .88) 60%); animation: wowin .5s var(--ease); }
.celebrate.out { opacity: 0; transition: opacity .4s; }
.celebrate-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate-card { position: relative; text-align: center; padding: 36px 44px 30px; max-width: min(560px, 92vw); background: var(--bg-1); border: 1px solid var(--c, var(--live)); box-shadow: 0 0 0 6px rgb(0 0 0 / .3), 0 0 80px color-mix(in srgb, var(--c, var(--live)) 45%, transparent); animation: wowpop .7s cubic-bezier(.2, 1.6, .4, 1); }
.celebrate .trophy { font-size: 64px; line-height: 1; animation: wowbounce 1.4s ease-in-out infinite; }
.celebrate .wow { margin: 10px 0 4px; font-size: clamp(3.4rem, 9vw, 6rem); letter-spacing: -.04em; color: #4fe8a8; text-shadow: 0 0 30px rgb(79 232 168 / .55); }
.celebrate .wow-sub { font-size: 18px; margin: 0 0 18px; color: var(--fg); }
.wow-stats { display: flex; justify-content: center; gap: 12px; margin: 0 0 16px; }
.wow-stats div { border: 1px solid var(--line-2); padding: 8px 16px; min-width: 84px; }
.wow-stats dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); }
.wow-stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; }
.wow-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
@keyframes wowin { from { opacity: 0; } }
@keyframes wowpop { from { transform: scale(.6) rotate(-3deg); opacity: 0; } }
@keyframes wowbounce { 50% { transform: translateY(-8px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .celebrate, .celebrate-card, .celebrate .trophy { animation: none; } }
.blood-inner.cleared .bl-kicker { color: #ffd166; }
/* Cardiff University logo on the projector view */
.cu-live { display: block; width: 88px; height: 88px; object-fit: contain; margin-bottom: 14px; }
