/**
 * blast-brand.css — the Stage Zero CI (October 2026, skill "stage-zero-brand") on Solar Blast's screens.
 *
 * Loaded by blast.html ONLY, after tokens.css + style.css, so Zero Heroes keeps its own look.
 * Scope (decided 2026-10-30): the screens AROUND the game — top bar, tabs, leaderboard, details/consent form,
 * how-to card, buttons, footer. The game itself (canvas, sun, score/timer in the arcade face, toasts, MEGA,
 * tracking chips, stage colours) is deliberately left as it is.
 *
 * CI values used (exact): Dark Blue #00144B · Brand Blue #0C45ED · White · Green #0EBE9E (success only) ·
 * Grey #192B5C (panels) · Mid Grey #49577D · Grey 4 #78829F · Grey 5 #B3B9C9 · Grey 7 #E6E8ED.
 * Fonts: Termina (headings, buttons, tracked uppercase labels) + Aktiv Grotesk Extended (prose, inputs),
 * from Stage Zero's Adobe Fonts kit gnh6zaa (only 400/500/700 exist; 600/800/900 map to 700).
 * If the kit does not load (offline kiosk, domain not on the kit's list), the bundled Montserrat takes over.
 */

:root {
  --sz-dark-blue: #00144b;
  --sz-brand-blue: #0c45ed;
  --sz-green: #0ebe9e;
  --sz-grey: #192b5c;
  --sz-mid-grey: #49577d;
  --sz-grey-4: #78829f;
  --sz-grey-5: #b3b9c9;
  --sz-grey-6: #ccd0db;
  --sz-grey-7: #e6e8ed;
  --sz-glow: radial-gradient(circle at 50% 50%, #00d1ff 0%, #0c45ed 70%);

  --font-head: "termina", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-core: "aktiv-grotesk-extended", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ground, panels, text: Dark Blue ground, Grey panels, white/grey text */
  --surface-ground: var(--sz-dark-blue);
  --surface-raised: var(--sz-grey);
  --surface-card: var(--sz-grey);
  --surface-glass: rgba(255, 255, 255, 0.06);
  --text-hero: #ffffff;
  --text-body: var(--sz-grey-7);
  --text-muted: var(--sz-grey-6);   /* ink-muted on Reversed */
  --text-faint: var(--sz-grey-4);
  --text-charge: var(--sz-green);

  /* CI radii: 4px for buttons, fields, chips; 10px for panels */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 10px;

  /* no heavy shadows, no decorative gradients */
  --shadow-panel: none;
  --ring-focus: 0 0 0 2px var(--sz-dark-blue), 0 0 0 4px #00d1ff;   /* focus on Reversed: 2px glow ring, 2px offset */
}

/* flat Dark Blue ground: no blue wash, no drifting dot-grid */
.bg, body[data-phase="done"] .bg { background: var(--sz-dark-blue); }
.bg i { display: none; }

/* ── type ───────────────────────────────────────────────────────────── */
body { font-weight: 400; }
h1, h2, h3, .attract-title, .signup-title, .lb-head h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0; }
.micro { font-family: var(--font-head); font-weight: 400; letter-spacing: 0.12em; }
.micro-prose, .footer .micro { font-family: var(--font-core); font-weight: 400; letter-spacing: 0; }
.micro-charge::before { background: var(--sz-green); box-shadow: none; }
.parent-line, .consent, .details-note, .field-hint, .signup-error, .rec-state, .lb-note, .lb-range { font-family: var(--font-core); }

/* ── top bar: Dark Blue band with a hairline ────────────────────────── */
.topbar { background: var(--sz-dark-blue); backdrop-filter: none; border-bottom-color: rgba(255, 255, 255, 0.12); }
body .sb-logo { color: #ffffff; text-shadow: none; }
.powered .micro { color: var(--sz-grey-5); }
.endorse { opacity: 1; }
body .sb-tab { font: 700 13px/1 var(--font-head); letter-spacing: 0.1em; color: #ffffff; }
body .sb-tab:hover:not(:disabled), body .sb-tab[aria-expanded="true"] { color: #ffffff; border-bottom-color: #ffffff; }

/* ── buttons: CI 42 / 70 px, 4px radius, Termina Bold tracked uppercase, ONE Brand Blue primary ── */
.btn {
  font: 700 13px/1 var(--font-head);
  letter-spacing: 0.16em;   /* CI 'button' tracking is 0.2em: slightly tighter so four buttons fit beside the tabs */
  text-transform: uppercase;
  height: 42px;
  border-radius: 4px;
  box-shadow: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
}
.btn:hover { filter: none; }
.btn-lg { height: 70px; padding: 0 var(--space-8); font-size: 14px; }
.btn-sm { height: 32px; }
.btn-charge { background: var(--sz-brand-blue); border-color: var(--sz-brand-blue); color: #ffffff; box-shadow: none; }
.btn-charge:hover:not(:disabled) { background: var(--sz-glow); }
.btn-glass:hover:not(:disabled) { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.btn-ghost { border-color: transparent; color: var(--sz-grey-5); }
.btn-ghost:hover:not(:disabled) { color: #ffffff; }
.btn:disabled { opacity: 0.4; filter: none; }
body .btn-charge:disabled { opacity: 1; background: #86a2f6; border-color: #86a2f6; }   /* action-disabled */
/* The narrow game column: a 70px button would push the attract card off a short screen. */
@media (max-height: 760px) { .viewport .btn-lg { height: 56px; } }

/* ── panels: Grey, 10px, hairline, no shadow ───────────────────────── */
body .howto, body #sideLeft .details, body .lb-card { background: var(--sz-grey); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; box-shadow: none; }
body .howto li b { font-weight: 700; }
body #cam-box { border-radius: 10px; }

/* ── competition stations (11-02) ──────────────────────────────────────── */
.station-note { margin: 0; padding: 10px 12px; border-radius: 4px; font: 400 13px/1.4 var(--font-core); background: rgba(247, 147, 26, 0.14); border: 1px solid #f7931a; color: #ffffff; }
.station-note.ok { background: rgba(14, 190, 158, 0.14); border-color: var(--sz-green); }
/* not a station while entries are limited to stations: no form, just the note and Play without recording */
.details.no-entries .field, .details.no-entries .consent, .details.no-entries #dRecord, .details.no-entries #recState, .details.no-entries .details-note,
.details.no-entries .micro-charge, .details.no-entries .signup-error { display: none !important; }
.stationtag { white-space: nowrap; opacity: 0.85; }

/* ── form ───────────────────────────────────────────────────────────── */
.field-wide input {
  border-radius: 4px;
  height: 48px;
  background: #ffffff;
  color: var(--sz-dark-blue);
  border: 1px solid var(--sz-grey-6);
  box-shadow: none;
  font: 400 15px/1 var(--font-core);
  text-align: left;
}
.field-wide input::placeholder { color: var(--sz-grey-4); font-weight: 400; }
.consent input { border-radius: 4px; border: 2px solid var(--sz-grey-5); background: transparent; }
.consent input:checked { background: var(--sz-brand-blue); border-color: #ffffff; box-shadow: none; }
.consent input:checked::after { color: #ffffff; font-weight: 700; }
.signup-error { color: #ffffff; }
.signup-error::before { content: "! "; color: #ff274b; font-weight: 700; }

/* ── leaderboard ────────────────────────────────────────────────────── */
body .lb { background: rgba(0, 20, 75, 0.7); }
body .lb-head h2 { color: #ffffff; font-size: 18px; }
body .lb-close { color: #ffffff; }
body .lb-period { font: 700 12px/1 var(--font-head); letter-spacing: 0.08em; border-radius: 4px; color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
body .lb-period.active { background: var(--sz-brand-blue); border-color: var(--sz-brand-blue); color: #ffffff; }
body .lb-table th { font-family: var(--font-head); font-weight: 400; color: var(--sz-grey-5); opacity: 1; }
body .lb-table td { border-top-color: rgba(255, 255, 255, 0.1); font-family: var(--font-core); }
body .lb-table td.num { font-family: var(--font-head); }
body .lb-table tr.top td:first-child { color: var(--sz-green); font-weight: 700; }

/* ── footer ─────────────────────────────────────────────────────────── */
body .footer { border-top-color: rgba(255, 255, 255, 0.12); }
body .footer .micro { color: var(--sz-grey-5); font-size: 11px; line-height: 1.4; }
/* footer (Jacques, 10-31): smaller text, thinner bar */
body .footer { padding-top: 6px; padding-bottom: 8px; }

/* ── layout (Jacques, 2026-10-30): Start / Stop / Restart / Sound sit in the top bar right after the
   Leaderboard / How to play tabs; "Powered by StageZero" + logo at the RIGHT end. Desktop only: on a phone
   the buttons stay in the burger drawer. ── */
@media (min-width: 861px) {
  .topbar .sb-left { order: 0; }
  .topbar .topbar-end { order: 1; gap: 0; margin-left: clamp(16px, 2vw, 32px); }
  .topbar .sb-right { order: 2; margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 1.6vw, 24px); }
  .topbar .powered { position: static; transform: none; display: flex; }
  .topbar .controls { gap: 10px; }
  .topbar .controls .btn { height: 42px; padding: 0 18px; }
}
/* not enough room for the "Powered by" words beside the buttons: keep the logo, drop the words */
@media (min-width: 861px) and (max-width: 1500px) { .topbar .powered .micro { display: none; } body .powered .endorse { height: 42px; } }
/* tablets in full screen are ~1024-1340 px wide: keep the logo (smaller), only drop it where there is truly no room */
@media (min-width: 861px) and (max-width: 1300px) { body .powered .endorse { height: 34px; } }
@media (min-width: 861px) and (max-width: 999px) { .topbar .powered { display: none; } }
/* wide enough (>= 1440 px): the buttons sit in the MIDDLE of the top bar = centred over the game (the game column is centred on the page).
   Narrower than that they would run into the Leaderboard tab, so they stay right after it (rule above). */
/* desktop/tablet landscape: the buttons are centred over the GAME (blast.js placeControls sets left; if the tabs leave no room there,
   they sit as close to the centre as fits, never on top of the tabs or the logo on the right) */
@media (min-width: 861px) {
  .topbar .controls { position: absolute; top: 50%; transform: translateY(-50%); }
}

/* ── HOW TO PLAY (step 2): fills the left column after Next, big enough to read from a step back; Play at the bottom.
   Stays up during the round (the Play button goes). ── */
.sb-tabs { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); }
body.how-step #sideLeft .details { display: none !important; }
body #sideLeft .howto { display: flex; flex-direction: column; gap: 14px; min-height: 100%; box-sizing: border-box; padding: clamp(18px, 2vw, 30px); }
body #sideLeft .howto[hidden] { display: none !important; }
body #sideLeft .howto h2 { margin: 0; font: 700 clamp(20px, 1.8vw, 28px)/1.15 var(--font-head); color: #ffffff; }
body #sideLeft .howto ul { flex: 1; margin: 4px 0 0; display: flex; flex-direction: column; justify-content: space-evenly; gap: 10px; }
body #sideLeft .howto li { grid-template-columns: 34px 1fr; gap: 10px; font-size: clamp(13px, 1.05vw, 16px); line-height: 1.3; }
body #sideLeft .howto li b { font: 700 clamp(13px, 1.05vw, 16px)/1.25 var(--font-head); color: #ffffff; margin-bottom: 3px; }
body #sideLeft .howto li small { display: block; font: 400 clamp(12px, 0.85vw, 14px)/1.4 var(--font-core); color: var(--sz-grey-6); }
body #sideLeft .howto .ic { font-size: clamp(20px, 1.6vw, 26px); }
body #sideLeft #howPlay { width: 100%; flex: none; }

/* ── the camera preview: beside the game, centred on it (blast.js sets left/top/width) ── */
@media (min-width: 861px) {
  body #rightDock { right: auto; bottom: auto; transform: translateY(-50%); }
  body #cam-box { margin-top: 0; }
}

/* ── once a round starts, the details form steps away (the space stays, so the game does not jump) ── */
body.round-on:not(.how-step) #sideLeft { visibility: hidden; }

/* ── footer: centred on the page ── */
body .footer { padding-right: clamp(var(--space-4), 3vw, var(--space-8)); }


/* ── LANDSCAPE ONLY on touch devices (tablets, phones): upright = this cover, nothing else is usable. Desktop/kiosk screens (fine pointer) never see it. ── */
.rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  .rotate { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    padding: 24px; text-align: center; background: var(--sz-dark-blue); color: #ffffff; }
  .rotate-title { margin: 0; font: 700 24px/1.2 var(--font-head); }
  .rotate-sub { margin: 0; font: 400 15px/1.4 var(--font-core); color: var(--sz-grey-6); }
  body { overflow: hidden; }
}

/* the "Round stopped" card: Play again / Next player, side by side (stacked when the game column is narrow) */
.stop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 14px; }
.stop-actions .btn { min-width: 180px; }
/* shorter screens (e.g. 1366 x 768): the How to play column must still show its Play button. Tighter first, then the
   small explanation lines go (the bold line of each step stays). */
@media (min-width: 861px) and (max-height: 900px) {
  body #sideLeft .howto { gap: 10px; padding: 16px 18px; }
  body #sideLeft .howto ul { gap: 6px; }
}
@media (min-width: 861px) and (max-height: 820px) {
  body #sideLeft .howto li small { display: none; }
  body #sideLeft .howto ul { justify-content: space-around; }
}
@media (min-width: 861px) { .topbar .topbar-end { margin-left: clamp(24px, 2.4vw, 40px); } }
/* shorter screens: the details form must show Next AND Play without recording without scrolling inside the panel */
@media (min-width: 861px) and (max-height: 900px) {
  body #sideLeft .details { gap: 6px; padding: 14px 16px; }
  body #sideLeft .details .details-note { display: none; }
  body #sideLeft .details .signup-title { font-size: 20px; }
  body #sideLeft .details .field-wide input { height: 40px; }
  body #sideLeft .details .field-wide { gap: 2px; }
  body #sideLeft .details .consent { font-size: 11px; line-height: 1.3; }
  body #sideLeft .details .consent input { width: 22px; height: 22px; }
  body #sideLeft .details .btn-lg { height: 48px; }
  body #sideLeft .details .signup-form { gap: 6px; }
}

/* ── SHORT landscape screens (tablets in a browser: the address bar, tabs and Android's nav bar leave ~450-650 px).
   Seen on JP's Samsung tablet cast to a TV 10-30: the game card's title ran over the timer and score, How to play lost its
   Play button, the footer took a big share of the height. ── */
@media (min-width: 861px) and (max-height: 700px) {
  .topbar { padding-top: 6px; padding-bottom: 6px; }
  body .sb-logo { font-size: 20px; }
  body .powered .endorse { height: 32px; }
  .topbar .controls .btn { height: 34px; padding: 0 14px; font-size: 12px; }
  .stage { padding-top: 10px; padding-bottom: 10px; gap: 14px; }
  body .footer { padding-top: 3px; padding-bottom: 4px; }
  body .footer .micro { font-size: 10px; line-height: 1.35; }
  .viewport .attract-word, .viewport .attract .prize, .viewport .attract .micro-prose { display: none; }
  body .viewport .attract-title { font-size: 18px; }
  body .viewport .attract-sub { font-size: 12px; }
  body .viewport .attract .btn-lg { height: 44px; min-height: 44px; }
  body #sideLeft .details #recState, body #sideLeft .details #lastUpload:empty { display: none; }
  body #sideLeft .details .consent { line-height: 1.25; }
  body #sideLeft .details { gap: 4px; padding: 10px 14px; }
  body #sideLeft .details .signup-form { gap: 4px; }
  body #sideLeft .details #dSkip { height: 32px; }
  body #sideLeft .howto { gap: 6px; padding: 12px 14px; }
  body #sideLeft .howto h2 { font-size: 18px; }
  body #sideLeft .howto li small { display: none; }
  body #sideLeft .howto li { font-size: 12px; grid-template-columns: 26px 1fr; gap: 6px; }
  body #sideLeft .howto li b { font-size: 12px; margin: 0; }
  body #sideLeft .howto .ic { font-size: 16px; }
  body #sideLeft .howto ul { gap: 2px; }
  body #sideLeft #howPlay { height: 44px; }
  body #sideLeft .details .signup-title { font-size: 16px; }
  body #sideLeft .details > .micro { display: none; }
  body #sideLeft .details .field-wide input { height: 34px; }
  body #sideLeft .details .consent { font-size: 10px; }
  body #sideLeft .details .btn-lg { height: 40px; }
  .score-hud { font-size: 16px; }
}

/* ── SLIDESHOW (screensaver): full screen, black ground, the video or the promo picture shown whole ── */
.showcase { position: fixed; inset: 0; z-index: 900; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.showcase video, .showcase img { width: 100%; height: 100%; object-fit: contain; display: block; }
.showcase-hint { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; text-align: center;
  font: 700 clamp(13px, 1.4vw, 18px)/1.2 var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: #ffffff; opacity: 0.8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); pointer-events: none; animation: showhint 2.4s ease-in-out infinite; }
@keyframes showhint { 50% { opacity: 0.35; } }
/* narrower desktops / tablets (861-1599 px): a more compact top bar, so Start/Stop/Restart/Sound can still sit centred over the game
   next to the Leaderboard + Slideshow tabs (blast.js only pushes them right when there is truly no room) */
@media (min-width: 861px) and (max-width: 1599px) {
  body .sb-logo { font-size: 22px; }
  .sb-left { gap: 16px; }
  .sb-tabs { gap: 14px; }
  body .sb-tab { font-size: 11px; letter-spacing: 0.06em; padding: 8px 2px; }
  .topbar .controls { gap: 6px; }
  .topbar .controls .btn { padding: 0 11px; font-size: 11px; letter-spacing: 0.08em; height: 36px; }
}
/* phones: the Slideshow tab sits on the right of the bar, before the burger */
.sb-right { display: flex; align-items: center; gap: 12px; }
/* small tablets in full screen (861-1179 px, e.g. 1024 x 768): everything one step tighter so the tabs, the buttons and the logo all fit */
@media (min-width: 861px) and (max-width: 1179px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  body .sb-logo { font-size: 18px; }
  .sb-left { gap: 12px; }
  body .sb-tab { font-size: 10px; letter-spacing: 0.04em; }
  .topbar .sb-right { gap: 12px; }
  .topbar .controls { gap: 4px; }
  .topbar .controls .btn { padding: 0 8px; font-size: 10px; letter-spacing: 0.04em; height: 32px; }
  body .powered .endorse { height: 28px; }
}

/* Leaderboard + Slideshow as ICONS (10-31: saves top-bar room on tablets); the word shows next to the icon only on wide screens */
body .sb-icontab { display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; }
body .sb-icontab .tab-ic { width: 26px; height: 26px; flex: none; }
body .sb-icontab .tab-text { display: none; }
@media (min-width: 1600px) { body .sb-icontab .tab-text { display: inline; } }
@media (max-height: 700px) { body .sb-icontab .tab-ic { width: 22px; height: 22px; } }

/* How to play icons: white line icons (same style as the Leaderboard / Slideshow tabs), sized with the row's own font-size rules */
.howto .ic { color: #ffffff; display: inline-flex; }
.howto .ic svg { width: 1.7em; height: 1.7em; display: block; }
body #sideLeft .howto li { grid-template-columns: 44px 1fr; }

/* prompt icons: the white stick figures from How to play (no emoji); none = no gap above the title */
.state-icon:empty { display: none; }
.state-icon svg { width: 64px; height: 64px; color: #ffffff; display: block; margin: 0 auto; }

/* details form buttons (11-02, Jacques): a thinner Next, and Play without recording as a real GREEN button
   (Dark Blue text: white on Green fails contrast in the CI) */
body #sideLeft .details #dRecord, body .details #dRecord { height: 48px; min-height: 48px; }
body #sideLeft .details #dSkip, body .details #dSkip {
  height: 48px; min-height: 48px; width: 100%;
  background: var(--sz-green); border: 1px solid var(--sz-green); color: var(--sz-dark-blue);
}
body .details #dSkip:hover:not(:disabled) { filter: brightness(1.08); color: var(--sz-dark-blue); }
body .details #dSkip:disabled { opacity: 0.45; }
@media (min-width: 861px) and (max-height: 700px) { body #sideLeft .details #dRecord, body #sideLeft .details #dSkip { height: 38px; min-height: 38px; } }
body .details #dSkip { letter-spacing: 0.06em; white-space: nowrap; font-size: 12px; }

/* start card in the MIDDLE of the game (11-02): a second flexible spacer below the block balances the one above it (style.css),
   so the stack is centred; a very tall stack still overflows downwards and scrolls, never off the top */
body .viewport .attract::after { content: ""; flex: 1 1 0; min-height: 0; }
body .viewport .attract { padding-bottom: var(--space-3); background: radial-gradient(70% 45% at 50% 50%, rgba(0, 20, 75, 0.55), transparent 75%); }

/* the middle wordmark = the top-left logo, big (Jacques 11-02: not the pixel font); shown on short screens too, now that the block is centred */
body .viewport .attract-logo { display: block; margin: 0 0 var(--space-2); text-shadow: none; }
body .viewport .attract-logo .sb-logo { font-size: clamp(30px, 3.6vw, 56px); text-shadow: 3px 3px 0 rgba(0, 0, 0, .4), 6px 6px 0 rgba(0, 0, 0, .15); }
@media (min-width: 861px) and (max-height: 700px) { body .viewport .attract-logo .sb-logo { font-size: clamp(28px, 3.4vw, 46px); } }
@media (max-width: 860px) { body .viewport .attract-logo .sb-logo { font-size: 32px; } }


/* consent links (Nick 11-10): the Privacy Policy and the Competition Ts & Cs on stagezero.co.za, opened in a new tab. White + underlined
   (the CI never puts Brand Blue text on Dark Blue). */
.consent .consent-link { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.consent .consent-link:hover, .consent .consent-link:focus-visible { color: var(--sz-green); }

/* the station / home note beside the game (11-19): a card above the camera preview, not inside the details form */
#rightDock .station-note { width: 100%; max-width: 340px; box-sizing: border-box; font-size: 13px; line-height: 1.45; background: var(--sz-grey); }
#rightDock .station-note:not(.ok) { border-color: #f7931a; }
