/* BackStagePass components — the WIRE round (2026-08-19 overnight).
   HOUSE LIGHTS product language (Big Shoulders Display marquee caps over
   Archivo, IBM Plex Mono numbers) + the brand-gold DOOR + PAPER covenant,
   on the tokens in tokens.css. Source: design-imports/WIRE-Directions.html,
   reconciled in DESIGN-FEATURE-RECONCILIATION.md.
   Class names are stable — the suite asserts several (.topbar .wall-tile
   .chip--live .density .heart-float .peak-jump .chat__*) — the styling under
   them is the adopted language. Laws that survive every mood:
   one primary action per screen · live-red strictly for live/cut · hairlines,
   not boxes · no gradient headings · no glow shadows · gold means money and
   the Pass in the house, the brand itself at the door. */

* { box-sizing: border-box; }
html { color-scheme: light dark; overflow-x: clip; } /* backstop only — real overflows get fixed at the source */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@view-transition { navigation: auto; }

/* ---------- house lights: one element at a time, nothing bounces ---------- */
@keyframes house-fade { from { opacity: 0; } to { opacity: 1; } }
main.shell > * { animation: house-fade var(--dur) ease-out backwards; }
main.shell > :nth-child(2) { animation-delay: 90ms; }
main.shell > :nth-child(3) { animation-delay: 180ms; }
main.shell > :nth-child(4) { animation-delay: 270ms; }
main.shell > :nth-child(n+5) { animation-delay: 360ms; }

/* ---------- type: the marquee voice ---------- */
h1, h2 {
  margin: 0; font-family: var(--display); font-weight: 700;
  letter-spacing: 0.01em; text-transform: uppercase;
  text-wrap: balance; line-height: 1.02;
}
h1 { font-size: clamp(2.2rem, 5.6vw, 3.4rem); font-weight: 800; line-height: 0.98; }
h2 { font-size: 1.6rem; }
h3 { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 1.02rem;
  letter-spacing: 0; text-wrap: balance; line-height: 1.25; }
p { margin: 0; }
/* Free text — a creator's name, a stream title, a bio, a pasted URL — must
   break a too-long unbroken token instead of pushing the page sideways on a
   phone (measured: creator profile at 320px). */
h1, h2, h3, p, .cluster > b { overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }

/* the label voice: letterspaced caps — the WIRE's kicker over every screen */
.eyebrow {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
.label {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
/* the stamp voice: mono meta — dates, house lines, foot-notes */
.meta {
  font-family: var(--mono); font-weight: 500; font-size: 0.66rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
.meta--accent { color: var(--accent); }
/* the spoken voice: plain sentences under the marquee */
.deck {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem); line-height: 1.65; color: var(--muted);
}
.headline { font-family: var(--display); font-weight: 800; line-height: 0.95;
  text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem); text-wrap: balance; }
.headline--md { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1; font-weight: 700; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 0.82rem; }
.num { font-variant-numeric: tabular-nums lining-nums; }
/* the moments where the number IS the copy: marquee 800, lit tungsten */
.figure { font-family: var(--display); font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0.01em; }
/* the preflight number block — display 800 with its small sans unit */
.marquee-num { display: flex; align-items: baseline; gap: 10px;
  font-family: var(--display); font-weight: 800; color: var(--accent);
  font-size: clamp(2.7rem, 8vw, 3.6rem); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums; }
.marquee-num small { font-family: var(--sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.gold { color: var(--gold); }
.accent { color: var(--accent); }

/* ---------- shell ---------- */
.shell { max-width: 1080px; margin: 0 auto; padding: 0 20px 96px; }
.shell--wide { max-width: 1280px; }

/* ---------- the masthead ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; row-gap: 6px; /* never clips — worst case the nav wraps */
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
body.door .topbar { border-bottom-color: var(--hair-25); }
/* The nameplate, extracted verbatim from the WIRE masthead (Todd 2026-08-20):
   a 26px gold rule + "BACKSTAGE PASS" at 12px/600/.3em tracking — #e0b669 on
   dark surfaces, #b8860b on paper, which is exactly what var(--gold) resolves
   to per mood. Every surface wears this; the old SVG lockup lives only in the
   /d reference gallery. */
.topbar__brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600; line-height: 1;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold);
  white-space: nowrap;
}
.topbar__brand::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: 0.6; }
.topbar__brand em { font-style: normal; color: inherit; }
.topbar__nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.topbar__link {
  padding: 7px 12px; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; font-variant-caps: all-small-caps; color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.topbar__link:hover { color: var(--text); }
.topbar__link--active { color: var(--accent); border-bottom-color: var(--accent); }
/* The Log out control is a button_to — without this it wears the UA's gray
   pill and reads as a broken/disabled control next to the nav links. */
button.topbar__link { appearance: none; background: none; border: 0; border-bottom: 1px solid transparent;
  font-family: inherit; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; cursor: pointer; }

/* condensed header on phones: secondary links hide, CTA shortens, nothing clips */
.btn--compact { padding: 8px 16px; font-size: 0.68rem; white-space: nowrap; }
.cta-short { display: none; }
@media (max-width: 639px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .topbar__brand { font-size: 0.62rem; letter-spacing: 0.26em; }
  .topbar__brand::before { width: 16px; }
  .topbar__nav { gap: 0; }
  .topbar__link { padding: 6px 8px; letter-spacing: 0.08em; }
  .topbar__link--collapsible { display: none; }
  .btn--compact { padding: 7px 12px; font-size: 0.66rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* ---------- buttons: one ink block per screen, hairlines for the rest ------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.1em; font-variant-caps: all-small-caps;
  padding: 11px 20px; color: var(--text); background: transparent;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
/* the live switch — Control Room: red means live or cut, nothing else */
.btn--live { background: var(--live); color: #fff; border-color: var(--live); }
.btn--live:hover { background: #ef5b60; border-color: #ef5b60; }
.btn--cut { background: transparent; border: 2px solid var(--live); color: var(--live); font-weight: 700; }
.btn--cut:hover { background: color-mix(in srgb, var(--live) 12%, transparent); }
.btn--ghost { border-color: var(--border-strong); color: var(--muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--text); background: transparent; }
/* the Pass wears the only gold in the house */
.btn--pass { border-color: var(--gold); color: var(--gold); }
.btn--pass:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: var(--gold); }
/* big CTAs speak marquee: Big Shoulders 800, letterspaced, real caps */
.btn--lg, .btn--xl {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-variant-caps: normal; letter-spacing: 0.12em;
}
.btn--lg { padding: 14px 28px; font-size: 1.2rem; }
.btn--xl { padding: 18px 44px; font-size: 1.45rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* the GO LIVE block — marquee 800 with its mono subline (WIRE preflight) */
.golive { display: inline-flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bg); border-radius: var(--radius-sm);
  padding: 16px 34px; text-align: center; cursor: pointer; font: inherit;
  transition: background 150ms ease; }
.golive .word { font-family: var(--display); font-weight: 800; font-size: 1.7rem;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.05; }
.golive .sub { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; }
.golive:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.golive--live { background: var(--live); border-color: var(--live); color: #fff; }
.golive--live:hover { background: #ef5b60; border-color: #ef5b60; }

/* ---------- cards & panels: the printed sheet ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 20px;
}
.card--flush { padding: 0; overflow: hidden; }
/* the program page: double-ruled, like a keepsake (Marquee receipt) */
.program { background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); position: relative; }
.program::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--border);
  border-radius: 2px; pointer-events: none; }
.program > * { position: relative; }

/* section rules: the label sits IN the rule (Marquee) */
.panel-title { display: flex; align-items: center; gap: 14px; margin: 42px 0 16px; }
.panel-title::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.panel-title .eyebrow { margin: 0; flex: none; }
.section-rule { display: flex; align-items: center; gap: 14px; margin: 42px 0 16px; }
.section-rule::before, .section-rule::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* enter choreography for stream/toast cards */
@starting-style {
  .enter { opacity: 0; transform: translateY(8px); }
}
.enter { transition: opacity 300ms ease, transform 300ms ease; }

/* ---------- live ring / avatars ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface-3); color: var(--accent);
  font-family: var(--sans); font-weight: 700; flex: none; overflow: hidden;
}
.avatar--sm { width: 34px; height: 34px; font-size: 0.85rem; }
.avatar--md { width: 52px; height: 52px; font-size: 1.15rem; }
.avatar--lg { width: 76px; height: 76px; font-size: 1.6rem; }
.ring { padding: 3px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; }
.ring--live { border-color: var(--live); animation: ringpulse 2s ease-in-out infinite; }
@keyframes ringpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); }
}

/* ---------- chips / badges: printed pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 4px 12px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.05em; font-variant-caps: all-small-caps; color: var(--muted);
  background: transparent;
}
.chip--live { color: #fff; background: var(--live); border-color: var(--live); }
.chip--gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.chip--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.chip--dim { color: var(--dim); }
.chip--input { cursor: pointer; user-select: none; }
/* Selection is LIT, never gold (§2.1): gold means money and the marquee. */
.chip--input:has(input:checked),
.chip--lit {
  color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg);
}
.chip--input input { position: absolute; opacity: 0; pointer-events: none; }
/* a single row of chips that scrolls in place on narrow screens (stage rail) */
.chip-rail { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chip-rail::-webkit-scrollbar { display: none; }
.chip-rail > * { flex: none; white-space: nowrap; }

/* the tally lamp (Control Room organ): steps, not fades */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: tally 1.2s steps(1) infinite; }
@keyframes tally { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.2; } }

/* ---------- rails (Live Now etc.) ---------- */
.rail { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail__item { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 76px; flex: none; text-align: center; }
.rail__name { font-size: 0.7rem; color: var(--muted); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- browse grids (the Encores wall lives in these) ---------- */
.grid { display: grid; gap: 16px; }
/* min(300px, 100%) keeps the track from ever exceeding its container. */
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

/* ---------- the playbill list (Marquee 1a·3) ---------- */
.bill-rows > * { padding: 18px 0; border-top: 1px solid var(--border); display: flex;
  flex-direction: column; gap: 6px; }
.bill-rows > *:last-child { border-bottom: 1px solid var(--border); }
.bill-rows .toprow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bill-rows h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.01em; line-height: 1.05; font-size: clamp(1.4rem, 3.4vw, 1.8rem); }
.bill-rows h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bill-rows .facts { font-size: 0.82rem; color: var(--muted); }
.lead-story { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.lead-story > * { min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-col > * { min-width: 0; }
/* a framed print: the hairline mat around a moving image */
.frame { border: 1px solid var(--border-strong); padding: 6px; background: var(--frame-mat); border-radius: var(--radius); }

/* ---------- density scrubber (A3: the room's loudest moments) ---------- */
.density { display: flex; align-items: flex-end; gap: 1px; height: 26px; width: 100%; }
.density--card { height: 18px; opacity: 0.9; }
.density span { flex: 1 1 0; min-width: 1px; background: color-mix(in srgb, var(--text) 20%, transparent); border-radius: 1px; }
.density span.hot { background: color-mix(in srgb, var(--text) 45%, transparent); }
.density span.peak { background: var(--accent); }

.scrubber { position: relative; padding-top: 4px; }
.scrubber .density { cursor: pointer; }
.scrubber__playhead {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent);
  border-radius: 2px; pointer-events: none; opacity: 0.9;
}
.peak-jump {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em;
  font-variant-caps: all-small-caps; color: var(--text); background: none;
  border: 1px solid var(--border-strong); border-radius: 2px; padding: 6px 12px; cursor: pointer;
}
.peak-jump:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- the room ---------- */
.room { display: grid; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); background: #000; }
.room__stage { position: relative; aspect-ratio: 16 / 9; background: #000; min-width: 0; }
.room__stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.room__topline { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; z-index: 3; flex-wrap: wrap; }
.room__topline .chip { background: rgb(10 8 6 / 0.78); border-color: transparent; color: #EFE7D6;
  backdrop-filter: blur(6px); font-family: var(--mono); font-weight: 500; letter-spacing: 0.08em; }
.room__topline .chip--live { background: var(--live); color: #fff; }
.room__hearts { position: absolute; right: 14px; bottom: 4px; width: 90px; height: 65%; pointer-events: none; overflow: hidden; z-index: 2; }
/* A6 #2: ingest loss shows the slate, never a frozen frame. Empty target when connected. */
.room__slate { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.room__slate-inner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.82); color: #EFE7D6; font-weight: 600;
}
.heart-float {
  position: absolute; bottom: 0; left: 50%; font-size: 20px; color: var(--live);
  animation: heartrise 2.4s ease-out forwards;
}
@keyframes heartrise {
  0% { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--drift, 0px)), -240px) scale(1.15); opacity: 0; }
}
.room__panel { background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; }
.chat__scroll { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chat__msg { font-size: 0.88rem; line-height: 1.4; overflow-anchor: none; overflow-wrap: anywhere; }
.chat__msg .who { font-weight: 600; color: var(--accent); margin-right: 6px; }
.chat__msg--creator .who { color: var(--gold); }
.chat__msg--pinned { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface-2); }
/* a tip is money: the one gold surface in the chat — a full hairline,
   never a one-sided accent (banned tell, A2) */
.chat__msg--tip { border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: var(--radius-sm);
  padding: 8px 10px; background: color-mix(in srgb, var(--gold) 10%, var(--surface-2)); }
.chat__msg--tip .who { color: var(--gold); }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat__form input[type="text"] { flex: 1; }
.tier-badge {
  display: inline-block; font-family: var(--mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  padding: 1px 6px; border-radius: 3px; margin-right: 6px; vertical-align: 1px;
}

/* ---------- B56: the drop (WIRE 7/8) — pinned over the room, confirmed on a sheet ---------- */
.drop-pin { display: block; }
.drop-pin__card {
  border: 1.5px solid var(--accent); border-radius: var(--radius-sm);
  background: rgb(11 10 9 / 0.86); backdrop-filter: blur(6px);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px;
  margin: 10px 12px 12px;
}
@media (min-width: 900px) {
  /* over the stage, clear of the 340px chat rail */
  .room { position: relative; }
  .drop-pin { position: absolute; left: 12px; right: calc(340px + 13px); bottom: 12px; z-index: 3; }
  .drop-pin__card { margin: 0; }
}
.drop-pin__title { font-weight: 700; font-size: 0.95rem; }
.drop-pin__count {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--live);
}
.drop-pin__price { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--accent); }
.drop-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; }
.drop-sheet__card {
  width: min(560px, 100%); background: var(--surface);
  border: 1px solid var(--border-strong); border-bottom: none;
  border-radius: 18px 18px 0 0; padding: 18px 22px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 48px rgb(0 0 0 / 0.55);
}
.drop-sheet__rows > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.drop-sheet__rows > div:last-child { border-bottom: none; }

/* ---------- B57: the greenroom (WIRE 16/21) — doors in m:ss ---------- */
.greenroom__clock {
  font-family: var(--display); font-weight: 800; font-size: clamp(56px, 14vw, 96px);
  line-height: 1; color: var(--accent); margin-top: 6px;
}

@media (min-width: 900px) {
  /* desktop: video left, chat rail right — same template, one breakpoint (A2). */
  .room { grid-template-columns: minmax(0, 1fr) 340px; }
  .room__panel { position: relative; border-left: 1px solid var(--border); }
  .room__panel .chat { position: absolute; inset: 0; }
}
@media (max-width: 899px) {
  .room__panel { max-height: 46vh; }
}

/* ---------- forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="url"], input[type="datetime-local"], select, textarea {
  /* 16px is not a taste call: anything smaller makes iOS Safari zoom the page
     on focus, and the field the fan is typing into scrolls off screen. */
  width: 100%; padding: 11px 14px; font-family: inherit; font-size: 16px;
  color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 150ms ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.checkbox-row input { margin-top: 3px; }
/* native toggles wear the house light, never the UA blue */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.form-errors { border: 1px solid color-mix(in srgb, var(--live) 55%, transparent); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--live); font-size: 0.85rem; margin-bottom: 16px; }
/* the marquee title line: the show's name in marquee caps, underlined
   (input.field-row outguns the generic input[type=text] attribute selector) */
input.field-row, .field-row { display: block; border: 0; border-bottom: 1px solid var(--hair-35); background: transparent;
  width: 100%; min-width: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 1.7rem; line-height: 1.05; padding: 8px 2px; border-radius: 0; color: var(--text); }
input.field-row:focus, .field-row:focus { outline: none; border-bottom: 2px solid var(--accent); }
input.field-row::placeholder, .field-row::placeholder { color: var(--dim); }

/* The one door's field: country picker and the number read as a single control. */
.identity-field { display: flex; gap: 8px; }
.identity-field__country {
  width: auto; flex: 0 1 auto; max-width: 40%; padding-right: 8px;
  color: var(--muted); text-overflow: ellipsis;
}
.identity-field__country[hidden] { display: none; }
.identity-field__input { flex: 1 1 auto; min-width: 0; }
.code-input { font-family: var(--mono); letter-spacing: 0.42em; font-variant-numeric: tabular-nums; }
/* Secondary links are not gold (§5.3 rule 1) — gold is the money and the marquee. */
.link { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- stats: the letterpress stat-row (Marquee program) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--text); border-bottom: 1px solid var(--border); }
.stat { padding: 16px 14px; border-right: 1px solid var(--border); background: transparent; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 2.1rem;
  letter-spacing: 0.01em; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; }
.stat span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em;
  font-variant-caps: all-small-caps; color: var(--muted); }

/* the tally: mono receipt lines — the WIRE's ledger language */
.tally { list-style: none; margin: 0; padding: 0; font-family: var(--mono); }
.tally li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; font-size: 0.82rem; }
.tally li .leader { flex: 1; border-bottom: 1px dotted var(--border-strong); transform: translateY(-4px); min-width: 20px; }
.tally li b { font-family: var(--mono); font-weight: 600; font-size: 0.9rem;
  font-variant-numeric: tabular-nums lining-nums; }
.tally li.held { color: var(--muted); font-size: 0.78rem; }
.tally li.held b { color: var(--accent); font-size: 0.82rem; }
/* the sum that proves itself: right-aligned, computed never typed */
.tally .reconcile { justify-content: flex-end; font-size: 0.7rem; color: var(--dim); }

/* ---------- tables / rows ---------- */
.rowlist { display: flex; flex-direction: column; }
.rowlist > * { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.rowlist > *:last-child { border-bottom: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(92vw, 560px); }
.toast {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 4px; padding: 10px 20px; font-size: 0.88rem;
  transition: opacity 300ms ease, transform 300ms ease;
}
/* Failure never dresses like success (QA P2-11): live-red hairline all the
   way around + red text — red means something went wrong, right now. */
.toast--alert { border-color: rgb(255 68 56 / 0.55); color: var(--live); }
@starting-style { .toast { opacity: 0; transform: translateY(10px); } }

/* ---------- the door (Gilt) ---------- */
.hero { padding: 72px 0 44px; max-width: 760px; }
.hero h1 { font-size: clamp(3rem, 9vw, 6rem); line-height: 0.94; }
.hero p { margin-top: 20px; font-size: 1.05rem; line-height: 1.65; color: var(--muted); max-width: 56ch; }
.hero .btn { margin-top: 30px; }

/* the graduated gold hairline stack — the door's signature (BRAND-ANCHOR) */
.hairstack { display: flex; flex-direction: column; gap: 7px; }
.hairstack span { display: block; border-top: 1px solid var(--border); transform-origin: left;
  animation: g-draw var(--dur) var(--ease) both; }
.hairstack span:nth-child(2) { animation-delay: 90ms; }
.hairstack span:nth-child(3) { animation-delay: 180ms; }
.hairstack span:nth-child(4) { animation-delay: 270ms; }
.hairstack span:nth-child(1) { border-color: var(--hair-25); }
.hairstack span:nth-child(2) { border-color: var(--hair-35); }
.hairstack span:nth-child(3) { border-color: var(--hair-48); }
.hairstack span:nth-child(4) { border-color: var(--hair-60); }
@keyframes g-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rise { animation: g-rise var(--dur) var(--ease) both; }
.rise--2 { animation-delay: 110ms; }
.rise--3 { animation-delay: 220ms; }
@keyframes g-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* the ink ledger panel — the roster proof (Gilt 2a) */
.ledger {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 9px;
  font-family: var(--mono); font-size: 12px;
}
.ledger .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ledger .theirs { color: var(--dim); }
.ledger .ours { color: var(--gold); }
.ledger hr { border: 0; border-top: 1px solid var(--border); margin: 0; width: 100%; }
body.door .ledger hr { border-color: var(--hair-25); }

/* pricing rungs / the ladder (Gilt 2a → paper too) */
.rung { border-top: 1px solid var(--hair-25); padding: 22px 0; }
.rung--marked { border-top-color: var(--hair-60); }
.rung .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.rung h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.5rem; }
.rung .price { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; color: var(--gold); white-space: nowrap; }
.rung .price small { font-size: 0.8rem; color: var(--dim); }
.rung p { margin-top: 8px; max-width: 60ch; }

/* the three moves (Gilt creators) */
.move { display: flex; gap: 16px; }
.move .n { font-family: var(--mono); font-size: 13px; color: var(--gold); padding-top: 8px; }
.move h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.55rem; }
.move p { margin-top: 6px; max-width: 52ch; color: var(--muted); }

/* ---------- the ticket (composer, Marquee 1a·1) ---------- */
.ticket { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: clamp(24px, 4.5vw, 44px) clamp(20px, 4vw, 44px) 0; }
.core { font-family: var(--sans); font-size: clamp(1.05rem, 2.3vw, 1.3rem); line-height: 1.6; text-wrap: balance; }
.core .num { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums lining-nums; }
.platform-rows > div { display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 0.95rem; }
.platform-rows > div:last-child { border-bottom: 1px solid var(--border); }
.platform-rows .state { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; }
.state--on { color: var(--ok); }
.state--off { color: var(--dim); }
.tear { border-top: 2px dashed color-mix(in srgb, var(--border-strong) 80%, var(--text)); margin: clamp(24px, 4vw, 40px) -1px 0; padding: 18px 0 22px; }

/* the pass line: the only gold rule in the house (Marquee) */
.pass-line { border-top: 1px solid var(--gold); margin-top: 44px; padding-top: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }

/* pull quotes: the crowd, on the record — full hairline, never one-sided */
.quote-block { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; }
.quote-block p { font-family: var(--sans); font-weight: 500; font-size: 1.1rem; line-height: 1.5; }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--border); border: 0; margin: 34px 0; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
/* gh#39: the push card shows ONE state at a time — .spread's display:flex
   outranks the UA's [hidden] rule (the identity-field lesson, line ~443). */
[data-controller="push"] [hidden] { display: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cluster { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prose { max-width: 68ch; color: var(--text); }
.prose p { margin: 0 0 1em; }
.transcript p { margin: 0 0 1.1em; color: var(--muted); }
.transcript p strong { color: var(--text); }
.checklist { display: flex; flex-direction: column; gap: 0; }
.checklist__item { display: flex; gap: 14px; align-items: center; padding: 13px 4px;
  border-top: 1px solid var(--border); font-size: 0.92rem; }
.checklist__item:last-child { border-bottom: 1px solid var(--border); }
.checklist__num { font-family: var(--mono); font-weight: 600; color: var(--accent); font-size: 0.95rem; width: 22px;
  text-align: center; flex: none; }
code { font-family: var(--mono); font-size: 0.85em; }

/* ---------- the Encores wall (IDEA-REACTION-OVERLAY-WALL) ----------
   A wall of tiles already playing, silently; the room's reactions rise and
   fade over the frame. On paper the tiles read as a printed contact sheet:
   square corners, ink hairline. Live-red stays on the LIVE chip; hearts are
   stage-white on every tile — a replay never borrows the red. */
.wall-tile {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 2px; border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); background: #000;
  transition: border-color 150ms ease;
}
.wall-tile:hover, .wall-tile:focus-within { border-color: var(--text); }
.wall-tile__frame { position: absolute; inset: 0; }
.wall-tile__frame video, .wall-tile__frame img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #000;
}
.wall-tile__chips { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; transition: opacity 200ms ease; }
.wall-tile__chips .chip { background: rgb(10 8 6 / 0.7); border-color: transparent; color: #EFE7D6; }
.wall-tile__chips .chip--live { background: var(--live); color: #fff; }
/* the reveal replaces the chips — never more than one layer of talk on the frame */
.wall-tile:hover .wall-tile__chips,
.wall-tile:focus-within .wall-tile__chips,
.wall-tile.is-revealed .wall-tile__chips { opacity: 0; }
.wall-tile__hearts {
  position: absolute; inset: 10% 4% 0; pointer-events: none; overflow: hidden; z-index: 1;
}
.wall-heart {
  position: absolute; bottom: -22px; left: 50%;
  color: rgb(245 245 247 / 0.85);
  animation: wallrise var(--dur, 4.2s) ease-out forwards;
  will-change: transform, opacity;
}
/* Live hearts arrive from the room's channel as .heart-float — on the wall
   they trade the room's quick red rise for the wall's slow white one. */
.wall-tile__hearts .heart-float {
  color: rgb(245 245 247 / 0.85);
  animation: wallrise var(--dur, 4.2s) ease-out forwards;
  will-change: transform, opacity;
}
@keyframes wallrise {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  14% { opacity: 0.8; }
  60% { opacity: 0.55; }
  100% { transform: translate(var(--drift, 0px), calc(-1 * var(--rise, 130px))) scale(1.05); opacity: 0; }
}
/* Reduced motion / save-data: the static density bloom — presence, no motion. */
.wall-heart--still { animation: none; bottom: auto; }

/* the second layer: title, creator, when, the numbers, the actions. */
.wall-tile__link { position: absolute; inset: 0; z-index: 3; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.wall-tile__link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 2px; }
.wall-tile__reveal {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 34px 14px 12px;
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.78)); /* the one sanctioned scrim (§8.2) */
  opacity: 0; transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  color: #F5F5F7;
}
.wall-tile__reveal h3 { font-size: 1.05rem; color: #F5F5F7; }
.wall-tile:hover .wall-tile__reveal,
.wall-tile:focus-within .wall-tile__reveal,
.wall-tile.is-revealed .wall-tile__reveal { opacity: 1; transform: none; }
.wall-tile:hover .wall-tile__reveal a, .wall-tile:hover .wall-tile__reveal button,
.wall-tile:focus-within .wall-tile__reveal a, .wall-tile:focus-within .wall-tile__reveal button,
.wall-tile.is-revealed .wall-tile__reveal a, .wall-tile.is-revealed .wall-tile__reveal button {
  pointer-events: auto;
}
.wall-tile__meta { display: block; font-size: 0.76rem; line-height: 1.45; color: rgb(245 245 247 / 0.75); }
.wall-tile__meta span { margin-right: 5px; }
.wall-tile__reveal .density { height: 14px; opacity: 0.9; }
.wall-tile__reveal .density span { background: rgb(245 245 247 / 0.28); }
.wall-tile__reveal .density span.hot { background: rgb(245 245 247 / 0.55); }
.wall-tile__reveal .density span.peak { background: #F5F5F7; }
.wall-tile__reveal .btn { color: #F5F5F7; border-color: rgb(245 245 247 / 0.4); }
.wall-tile__actions { gap: 8px; }

@media (max-width: 900px) {
  .lead-story, .two-col { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* A7 #1: vertical streams go portrait full-bleed instead of letterboxing. */
.room__stage--vertical video { aspect-ratio: 9 / 16; max-height: 78vh; margin: 0 auto; width: auto; }

/* S2: the one-tap report flag on chat messages. */
.chat__report { background: none; border: 0; color: inherit; cursor: pointer; opacity: 0.35; font-size: 0.75rem; padding: 0 4px; }
.chat__report:hover { opacity: 1; }
