/* ==========================================================================
   Story Group, "On Air" design system
   Broadcast studio grammar: tally lamps, chyrons, monitors, run-of-show.
   Dark "studio" segments carry the voice; light "run sheet" segments carry detail.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-italic-latin.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/martian-mono-latin.woff2") format("woff2"); font-weight: 300 600; font-stretch: 75% 112.5%; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Studio (dark) */
  --studio: #001738;          /* brand navy, the set */
  --control: #050d1c;         /* control room, deepest */
  --studio-2: #0a2349;        /* raised panel on studio */
  --studio-line: #1d3761;     /* hairlines on studio */
  --on-studio: #f5f7fa;       /* chyron white */
  --on-studio-2: #a9b6cb;     /* secondary text on studio (8.8:1) */
  --on-studio-3: #7486a3;     /* tertiary, large/meta only */

  /* Run sheet (light) */
  --sheet: #f2f4f7;
  --sheet-2: #e6eaf0;
  --paper: #ffffff;
  --ink: #0b1526;
  --ink-2: #445268;           /* 7.1:1 on sheet */
  --sheet-line: #cfd6e0;

  /* Tally (brand coral) */
  --tally: #ff244c;           /* lamps, marks, coral on navy (4.8:1) */
  --tally-fill: #e0143c;      /* fills under white text (4.85:1) */
  --tally-ink: #c8102e;       /* coral text on light (5.3:1) */
  --tally-dim: #5a1224;       /* unlit lamp */

  /* Type */
  --f-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-voice: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-time: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-display: clamp(2.75rem, 1.35rem + 5.6vw, 6rem);
  --t-h2: clamp(2.125rem, 1.35rem + 3.2vw, 4rem);
  --t-h3: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  --t-voice: clamp(1.625rem, 1.05rem + 2.3vw, 3rem);
  --t-voice-sm: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --t-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-label: 0.8125rem;
  --t-time: 0.75rem;

  /* Space (8pt) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem; --s-11: 11rem;
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --maxw: 1440px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cut: cubic-bezier(0.7, 0, 0.2, 1);
  --d-fast: 160ms; --d-med: 320ms; --d-slow: 700ms;

  --radius: 2px;
  --shadow-monitor: 0 30px 60px -30px rgba(0, 6, 20, 0.75), 0 12px 24px -12px rgba(0, 6, 20, 0.5);
  --shadow-sheet: 0 18px 40px -24px rgba(11, 21, 38, 0.35);

  color-scheme: dark light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0; background: var(--studio); color: var(--on-studio);
  font-family: var(--f-sans); font-size: var(--t-body); line-height: 1.6;
  font-feature-settings: "ss01" 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
blockquote, figure { margin: 0; }
:where(p) { max-width: 68ch; }
.prose li { max-width: 68ch; }
::selection { background: var(--tally-fill); color: #fff; }
:focus-visible { outline: 2px solid var(--tally); outline-offset: 3px; border-radius: 1px; }
.on-sheet :focus-visible, .sheet :focus-visible { outline-color: var(--tally-ink); }
html { scrollbar-color: var(--studio-line) var(--control); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--control); }
::-webkit-scrollbar-thumb { background: var(--studio-line); border: 2px solid var(--control); border-radius: 6px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -4rem; z-index: 100; background: var(--on-studio); color: var(--ink); padding: var(--s-3) var(--s-4); font-weight: 700; transition: top var(--d-fast) var(--ease-out); }
.skip-link:focus { top: var(--s-3); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.segment { position: relative; padding-block: clamp(4.5rem, 3rem + 7vw, 10rem); }
.segment--tight { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.studio { background: var(--studio); color: var(--on-studio); }
.control { background: var(--control); color: var(--on-studio); }
.sheet { background: var(--sheet); color: var(--ink); --line: var(--sheet-line); }
.paper { background: var(--paper); color: var(--ink); --line: var(--sheet-line); }
.studio, .control { --line: var(--studio-line); }
.muted { color: var(--on-studio-2); }
.sheet .muted, .paper .muted { color: var(--ink-2); }

main { min-width: 0; }
@media (min-width: 1200px) {
  }

/* ---------- Type roles ---------- */
.display { font-size: var(--t-display); font-weight: 820; letter-spacing: -0.04em; line-height: 0.92; }
.h2 { font-size: var(--t-h2); font-weight: 780; letter-spacing: -0.035em; line-height: 0.98; }
.h3 { font-size: var(--t-h3); font-weight: 720; letter-spacing: -0.02em; line-height: 1.12; }
.lead { font-size: var(--t-lead); line-height: 1.5; }
.voice { font-family: var(--f-voice); font-style: normal; font-weight: 640; font-size: var(--t-voice); line-height: 1.1; letter-spacing: -0.028em; text-wrap: balance; }
.voice--sm { font-size: var(--t-voice-sm); line-height: 1.25; }
.voice em, .voice strong { font-style: normal; font-weight: 800; color: var(--tally); }
.sheet .voice em, .paper .voice em, .sheet .voice strong, .paper .voice strong { color: var(--tally-ink); }
.label { font-size: var(--t-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; }
/* .time = small data label (dates, steps, facts) in the grotesk; real running timecodes use .tc (Martian Mono) */
.time { font-family: var(--f-sans); font-size: var(--t-time); font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tc, .monitor__tc, .clip__hud .time, .watch-pill .time { font-family: var(--f-time); font-stretch: 87.5%; font-weight: 400; letter-spacing: 0.02em; }
.tm { font-size: 0.42em; vertical-align: 0.95em; letter-spacing: 0; font-weight: 600; margin-left: 0.04em; }
.prose p + p { margin-top: 1.1em; }
.prose a { color: var(--tally); }
.sheet .prose a, .paper .prose a { color: var(--tally-ink); }

/* ---------- Tally lamp ---------- */
.lamp {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-size: var(--t-label); font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  padding: 0.45em 0.7em 0.45em 0.55em; border: 1px solid currentColor; border-radius: var(--radius);
  color: var(--on-studio-3);
}
.lamp::before {
  content: ""; width: 0.62em; height: 0.62em; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7a2638 0 30%, var(--tally-dim) 70%);
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.45);
  transition: background var(--d-fast) linear;
}
.lamp.is-live { color: var(--on-studio); border-color: var(--tally); background: var(--tally-fill); }
.lamp.is-live::before { background: radial-gradient(circle at 35% 35%, #fff4f6 0 18%, #ff8aa0 42%, #ffd1da 100%); box-shadow: inset 0 -1px 1px rgba(120,0,20,.35); }
.sheet .lamp { color: var(--ink-2); }

/* ---------- Chyron (lower third) ---------- */
.chyron { display: inline-grid; grid-template-columns: auto; justify-items: start; line-height: 1.1; }
.chyron__name {
  display: inline-block; background: var(--on-studio); color: var(--ink);
  font-weight: 800; letter-spacing: -0.005em; text-transform: uppercase;
  font-size: clamp(0.875rem, 0.8rem + 0.3vw, 1.0625rem);
  padding: 0.5em 0.9em 0.45em;
}
.chyron__title {
  display: inline-block; background: var(--tally-fill); color: #fff;
  font-weight: 650; font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.45em 0.9em 0.4em;
}
.chyron--sheet .chyron__name { background: var(--ink); color: var(--on-studio); }


/* ---------- Monitor ---------- */
.monitor {
  position: relative; background: var(--control); padding: 10px; border-radius: 4px;
  box-shadow: var(--shadow-monitor), inset 0 0 0 1px #22324d;
}
.monitor__screen { position: relative; overflow: hidden; background: #000; border-radius: 1px; }
.monitor__screen > video, .monitor__screen > img { width: 100%; height: 100%; object-fit: cover; }
.monitor__hud {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; padding: 0.9rem;
}
.monitor__hud-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.monitor__tc { color: #fff; background: rgba(0,6,20,.55); padding: 0.3em 0.5em; border-radius: 1px; }
/* title-safe corner brackets */
.monitor__safe { position: absolute; inset: 7%; pointer-events: none; }
.monitor__safe::before, .monitor__safe::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 1.5px solid rgba(255,255,255,.55);
}
.monitor__safe::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.monitor__safe::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.monitor__label { position: absolute; left: 10px; bottom: -1.9rem; color: var(--on-studio-3); }
.monitor--portrait .monitor__screen { aspect-ratio: 9 / 16; }
.monitor--wide .monitor__screen { aspect-ratio: 16 / 10; }
.monitor--four .monitor__screen { aspect-ratio: 4 / 3; }

.sound-btn {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 0.55em; min-height: 44px; padding: 0 1.1rem;
  background: rgba(245,247,250,.94); color: var(--ink); border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: var(--t-small); white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.6);
  transition: transform var(--d-fast) var(--ease-out), background var(--d-fast);
}
.sound-btn:hover { background: #fff; }
.sound-btn:active { transform: translateX(-50%) scale(0.97); }
.sound-btn svg { width: 18px; height: 18px; }
.monitor.is-playing .sound-btn { display: none; }

/* ---------- Buttons & links ---------- */
.btn {
  --bg: var(--tally-fill); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  min-height: 52px; padding: 0 1.4rem; border: 1px solid var(--bg); border-radius: var(--radius);
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  font-weight: 750; font-size: 1rem; letter-spacing: -0.005em; line-height: 1; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform var(--d-fast) var(--ease-out), background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast);
}
.btn::after { /* broadcast wipe on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; background: #b80d30;
  clip-path: inset(0 100% 0 0); transition: clip-path var(--d-med) var(--ease-cut);
}
.btn:hover::after { clip-path: inset(0 0 0 0); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .lamp-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: inset 0 -1px 1px rgba(120,0,20,.4); flex: none; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--d-med) var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: var(--on-studio); border-color: var(--studio-line); }
.btn--ghost::after { background: var(--studio-2); }
.sheet .btn--ghost, .paper .btn--ghost { --fg: var(--ink); border-color: var(--sheet-line); }
.sheet .btn--ghost::after, .paper .btn--ghost::after { background: var(--sheet-2); }
.btn--light { --bg: var(--on-studio); --fg: var(--ink); }
.btn--light::after { background: #fff; }
.btn--sm { min-height: 44px; padding: 0 1rem; font-size: var(--t-small); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] .lamp-dot { animation: blink 0.9s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em; font-weight: 650; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  min-height: 44px;
}
.link-arrow:hover { text-decoration-color: currentColor; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--d-med) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(3px); }

.cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.cta-micro { font-size: var(--t-small); color: var(--on-studio-2); display: flex; flex-wrap: wrap; gap: 0.35em 0.9em; }
.cta-micro span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; margin-right: 0.9em; vertical-align: middle; }
.sheet .cta-micro, .paper .cta-micro { color: var(--ink-2); }

/* ---------- Utility bar + header ---------- */
.utility {
  background: var(--control); color: var(--on-studio-2); font-size: var(--t-small);
  border-bottom: 1px solid var(--studio-line);
}
.utility .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 40px; }
.utility a { color: var(--on-studio); font-weight: 650; text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility__crisis { display: inline-flex; align-items: center; gap: 0.6em; }
.utility__crisis .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tally); }
.utility__meta { display: none; }
@media (min-width: 900px) { .utility__meta { display: inline; } }

.site-header {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--studio) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color var(--d-med), background-color var(--d-med);
}
.site-header.is-scrolled { border-bottom-color: var(--studio-line); background: color-mix(in srgb, var(--control) 94%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 72px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 30px; width: auto; }
.nav { display: none; }
.nav ul { display: flex; gap: clamp(1rem, 0.2rem + 1.4vw, 2rem); }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 0.96875rem;
  color: var(--on-studio-2); position: relative; transition: color var(--d-fast);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-studio); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--tally); }
.header-cta { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: 44px; min-width: 44px; padding: 0 0.9rem;
  background: transparent; border: 1px solid var(--studio-line); border-radius: var(--radius); color: var(--on-studio); cursor: pointer; font-weight: 700; font-size: var(--t-small);
}
.menu-btn svg { width: 18px; height: 18px; }
@media (min-width: 1024px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Mobile menu: a full-height control-room panel */
.menu-panel {
  position: fixed; inset: 0; z-index: 60; background: var(--control); color: var(--on-studio);
  display: flex; flex-direction: column; padding: var(--s-4) var(--gutter) var(--s-6);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 520ms var(--ease-cut), visibility 0s linear 520ms;
}
.menu-panel.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 520ms var(--ease-cut), visibility 0s; }
.menu-panel__top { display: flex; justify-content: space-between; align-items: center; min-height: 72px; }
.menu-panel ol { margin-top: var(--s-6); counter-reset: seg; }
.menu-panel li { border-top: 1px solid var(--studio-line); }
.menu-panel li:last-child { border-bottom: 1px solid var(--studio-line); }
.menu-panel ol a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 1.05rem 0; text-decoration: none; font-size: clamp(1.75rem, 1.2rem + 3vw, 2.5rem); font-weight: 780; letter-spacing: -0.03em; }
.menu-panel ol .time { color: var(--on-studio-3); }
.menu-panel__foot { margin-top: auto; display: grid; gap: var(--s-4); padding-top: var(--s-6); }

/* ---------- Mobile on-air bar (sticky CTA) ---------- */
.onair-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--control) 96%, transparent); border-top: 1px solid var(--studio-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translateY(110%); transition: transform 420ms var(--ease-out);
}
.onair-bar.is-visible { transform: translateY(0); }
.onair-bar__now { min-width: 0; display: grid; gap: 2px; }
.onair-bar__now .time { color: var(--tally); }
.onair-bar__seg { font-weight: 700; font-size: var(--t-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onair-bar .btn { min-height: 46px; padding: 0 1rem; font-size: 0.9375rem; }
.onair-bar__phone { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--studio-line); border-radius: var(--radius); flex: none; }
.onair-bar__phone svg { width: 20px; height: 20px; }
@media (min-width: 1024px) { .onair-bar { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--control); color: var(--on-studio-2); padding-block: var(--s-9) var(--s-7); border-top: 1px solid var(--studio-line); }
.footer-sign { display: grid; gap: var(--s-6); padding-bottom: var(--s-8); border-bottom: 1px solid var(--studio-line); }
.footer-sign .voice { color: var(--on-studio); max-width: 20ch; }
.footer-grid { display: grid; gap: var(--s-7); padding-top: var(--s-7); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
@media (min-width: 900px) { .footer-sign { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.footer-grid h2 { font-size: var(--t-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-studio-3); margin-bottom: var(--s-4); }
.footer-grid li + li { margin-top: 0.15rem; }
.footer-grid a { text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; color: var(--on-studio-2); }
.footer-grid a:hover { color: var(--on-studio); text-decoration: underline; }
.footer-brand img { height: 30px; width: auto; margin-bottom: var(--s-4); }
.footer-brand p { font-size: var(--t-small); max-width: 34ch; }
.footer-legal { padding-bottom: 4.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-top: var(--s-8); font-size: 0.8125rem; color: var(--on-studio-3); }
.footer-legal a { color: var(--on-studio-2); }

/* ---------- Forms ---------- */
.field { display: grid; gap: var(--s-2); }
.field label, .field legend { font-weight: 650; font-size: var(--t-small); }
.field .hint { font-size: 0.875rem; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.8rem 0.9rem; background: var(--paper); color: var(--ink);
  border: 1px solid var(--sheet-line); border-radius: var(--radius); font-size: 1rem;
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9aa7ba; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,21,38,.12); }
.field [aria-invalid="true"] { border-color: var(--tally-ink); }
.field .error { color: var(--tally-ink); font-size: 0.875rem; font-weight: 600; display: flex; gap: 0.4em; align-items: center; }
.field .error:empty { display: none; }
.req { color: var(--tally-ink); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start; font-size: 0.875rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.choice-grid { display: grid; gap: var(--s-2); }
.choice {
  position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: 0.8rem 1rem;
  border: 1px solid var(--sheet-line); border-radius: var(--radius); background: var(--paper); cursor: pointer; font-weight: 600;
  transition: border-color var(--d-fast), background-color var(--d-fast);
}
.choice:hover { border-color: #9aa7ba; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .lamp-mini { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--sheet-line); flex: none; transition: background-color var(--d-fast), border-color var(--d-fast); }
.choice:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:checked) .lamp-mini { background: var(--tally-fill); border-color: var(--tally-fill); }
.choice:has(input:focus-visible) { outline: 2px solid var(--tally-ink); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Generic rows (index lists) ---------- */
.rundown { border-top: 1px solid var(--line); }
.rundown > li { border-bottom: 1px solid var(--line); }
.rundown__row { display: grid; gap: var(--s-2) var(--s-5); padding-block: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 800px) { .rundown__row { grid-template-columns: 7.5rem minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: baseline; } }
a.rundown__row { text-decoration: none; transition: background-color var(--d-fast); }
a.rundown__row:hover { background: color-mix(in srgb, currentColor 4%, transparent); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(3.5rem, 2rem + 6vw, 8rem) clamp(3rem, 2rem + 4vw, 6rem); }
.page-hero .display { max-width: 16ch; }
.page-hero .lead { margin-top: var(--s-5); max-width: 58ch; color: var(--on-studio-2); }
.page-hero .cta-group { margin-top: var(--s-6); }

/* ---------- Motion helpers ---------- */
.wipe { clip-path: inset(0 0 0 0); }
[data-cut] { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Entrance guard: hero copy waits (max 2.6s) for the motion engine so it never flashes. */
.anim:not(.anim-ready) :is(#cold-open, .page-hero) :is([data-split], [data-fade], [data-take]) { opacity: 0; }
.btn { max-width: 100%; }
@media (max-width: 600px) {
  .btn { white-space: normal; text-align: center; line-height: 1.2; padding-block: 0.75rem; }
}

/* ---------- Accessibility panel ---------- */
.a11y-btn {
  position: fixed; left: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom)); z-index: 45;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--control); color: #fff; border: 1px solid var(--studio-line);
  box-shadow: 0 8px 20px -10px rgba(0,6,20,.8); transition: transform var(--d-fast) var(--ease-out), border-color var(--d-fast);
}
.a11y-btn svg { width: 24px; height: 24px; }
.a11y-btn:hover { transform: scale(1.06); border-color: var(--on-studio-2); }
html:not(.has-scrolled) .a11y-btn { opacity: 0; pointer-events: none; }
.a11y-btn { transition: opacity 200ms linear, transform var(--d-fast) var(--ease-out), border-color var(--d-fast); }
@media (max-width: 1023px) {
  .a11y-btn { bottom: calc(11px + env(safe-area-inset-bottom)); }
  .onair-bar { padding-left: calc(var(--gutter) + 56px); }
}
.a11y-panel {
  position: fixed; left: var(--gutter); bottom: calc(var(--gutter) + 60px); z-index: 46; width: min(22rem, calc(100vw - 2 * var(--gutter)));
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: var(--s-5); box-shadow: 0 30px 60px -24px rgba(0,6,20,.6);
  display: grid; gap: var(--s-2);
}
.a11y-panel[hidden] { display: none; }
@media (max-width: 1023px) { .a11y-panel { bottom: calc(130px + env(safe-area-inset-bottom)); } }
.a11y-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-2); }
.a11y-panel h2 { font-size: 1.125rem; letter-spacing: -0.01em; }
.a11y-x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; color: inherit; border-radius: var(--radius); }
.a11y-x svg { width: 20px; height: 20px; }
.a11y-x:hover { background: var(--sheet-2); }
.a11y-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 48px; font-weight: 650; font-size: var(--t-small); }
.a11y-seg { display: inline-flex; border: 1px solid var(--sheet-line); border-radius: var(--radius); overflow: hidden; }
.a11y-seg button { min-width: 48px; min-height: 44px; border: 0; background: var(--paper); cursor: pointer; font-weight: 750; color: var(--ink); }
.a11y-seg button + button { border-left: 1px solid var(--sheet-line); }
.a11y-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.a11y-toggle { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 0.1rem; border: 0; border-top: 1px solid var(--sheet-line); background: transparent; cursor: pointer; font-weight: 650; font-size: var(--t-small); color: var(--ink); text-align: left; }
.a11y-switch { width: 40px; height: 24px; border-radius: 99px; background: var(--sheet-line); position: relative; flex: none; transition: background-color var(--d-fast); }
.a11y-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform var(--d-med) var(--ease-out); }
.a11y-toggle[aria-pressed="true"] .a11y-switch { background: var(--tally-fill); }
.a11y-toggle[aria-pressed="true"] .a11y-switch::after { transform: translateX(16px); }
.a11y-foot { display: flex; justify-content: space-between; gap: var(--s-3); border-top: 1px solid var(--sheet-line); padding-top: var(--s-2); }
.a11y-foot button { background: none; border: 0; cursor: pointer; color: var(--ink); font-size: var(--t-small); padding: 0; }
.a11y-foot a { font-size: var(--t-small); color: var(--ink); }

/* Accessibility modes */
html[data-a11y-size="1"] { font-size: 112.5%; }
html[data-a11y-size="2"] { font-size: 125%; }
.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 0.2em !important; }
.a11y-spacing p, .a11y-spacing li, .a11y-spacing dd, .a11y-spacing summary { line-height: 1.85 !important; letter-spacing: 0.03em !important; word-spacing: 0.1em !important; }
.a11y-focus :focus-visible { outline: 4px solid #ffd400 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }
.a11y-still *, .a11y-still *::before, .a11y-still *::after { animation: none !important; transition: none !important; }
.a11y-contrast {
  --studio: #000814; --control: #000000; --studio-2: #0d1b33; --studio-line: #8a9bb8;
  --on-studio: #ffffff; --on-studio-2: #ffffff; --on-studio-3: #dfe6f1;
  --sheet: #ffffff; --paper: #ffffff; --ink: #000000; --ink-2: #1a1a1a; --sheet-line: #000000;
  --tally: #ff5c78; --tally-fill: #b8002a; --tally-ink: #a3001f;
}
.a11y-contrast .btn--ghost { border-width: 2px; }
.a11y-contrast .muted, .a11y-contrast .cta-micro { color: inherit !important; }

/* ---------- Popup ---------- */
.popup { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--gutter); }
.popup[hidden] { display: none; }
.popup__scrim { position: absolute; inset: 0; background: rgba(0, 6, 20, 0.72); opacity: 0; transition: opacity 260ms linear; }
.popup__card {
  position: relative; width: min(34rem, 100%); background: var(--studio); color: var(--on-studio); border: 1px solid var(--studio-line); border-top: 3px solid var(--tally-fill);
  border-radius: 0; padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); box-shadow: var(--shadow-monitor);
  clip-path: inset(49% 0 49% 0); transition: clip-path 520ms var(--ease-cut);
}
.popup.is-open .popup__scrim { opacity: 1; }
.popup.is-open .popup__card { clip-path: inset(0 0 0 0); }
.popup__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-5); }
.popup__bar .a11y-x { color: var(--on-studio); }
.popup__bar .a11y-x:hover { background: var(--studio-2); }
.popup h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem); letter-spacing: -0.035em; line-height: 1; }
.popup p { margin-top: var(--s-4); color: var(--on-studio-2); }
.popup .cta-group { margin-top: var(--s-6); }
.popup__fine { font-size: 0.875rem; color: var(--on-studio-3) !important; }

/* Secondary links wrap as text, arrow stays with the last word */
.cta-group .link-arrow { display: inline; line-height: 1.55; padding-block: 0.6rem; }
.cta-group .link-arrow svg { display: inline-block; vertical-align: -3px; margin-left: 0.35em; }
/* Crisis page: the mobile bar carries the phone line only */
body[data-page="urgent"] .onair-bar .btn { display: none; }
/* Conversion pages carry their own actions; the sticky bar would compete with the form. */
body:is([data-page="contact"], [data-page="assessment"], [data-page="assessment-results"], [data-page="booked"], [data-page="thank-you"]) .onair-bar { display: none; }

.popup__card .monitor__safe { inset: 14px; }
.popup__x { position: absolute; top: 0.6rem; right: 0.6rem; color: var(--on-studio); z-index: 2; }
.popup__x:hover { background: var(--studio-2); }
.popup h2 { padding-right: 2.5rem; }
.onair-bar__sub { font-size: 0.8125rem; color: var(--on-studio-2); }

/* ---------- Hover grammar: set, mark, cut ---------- */
/* Primary button: the lamp dot is dim until the wipe lands, then it goes live. */
.btn .lamp-dot { background: rgba(255,255,255,.5); transition: background-color 0ms linear 260ms; }
.btn:hover .lamp-dot, .btn:focus-visible .lamp-dot { background: #fff; }
.btn--light .lamp-dot { background: rgba(11,21,38,.35); }
.btn--light:hover .lamp-dot { background: var(--tally-fill); }
/* Secondary links: a coral lower-third bar wipes in under the text, and exits to the right. */
.link-arrow, .footer-grid a { text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; background-image: linear-gradient(color-mix(in srgb, currentColor 40%, transparent), color-mix(in srgb, currentColor 40%, transparent)), linear-gradient(var(--tally), var(--tally)); background-size: 100% 1px, 0% 2px; background-position: 0 100%, 0 100%; background-repeat: no-repeat; transition: background-size 380ms cubic-bezier(0.7, 0, 0.2, 1); }
.footer-grid a { background-size: 0 1px, 0% 2px; }
.link-arrow:hover, .footer-grid a:hover { background-size: 100% 1px, 100% 2px; text-decoration: none !important; }
.sheet .link-arrow, .paper .link-arrow { background-image: linear-gradient(color-mix(in srgb, currentColor 40%, transparent), color-mix(in srgb, currentColor 40%, transparent)), linear-gradient(var(--tally-ink), var(--tally-ink)); }
.a11y-links .link-arrow, .a11y-links .footer-grid a { background-image: none; }
/* FAQ: the open state is a lit lamp, not a navy disc */
.faq-list details[open] summary .pm { background: var(--tally-fill) !important; border-color: var(--tally-fill) !important; }

[hidden] { display: none !important; }
.booker__step { font-size: var(--t-small); font-weight: 650; color: var(--ink-2); }

.phone-line__lead, .next-read__lead { display: block; font-size: var(--t-small); font-weight: 600; color: inherit; opacity: .8; margin-bottom: 0.25rem; }

/* Masked line reveals: leave room for descenders (g, y, p) so headlines never clip */
[data-split] > div { padding-bottom: 0.16em; margin-bottom: -0.16em; }
