@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* Theme tokens  --  default: dark; toggle via html[data-theme] */
:root,
html[data-theme="dark"] {
  --bg: #0d1a14; --card: #142820; --border: #2a4a3a; --text: #e8f4fa; --muted: #8fa89a; --accent: #8b1a2b; --accent-dim: #3a1020; --accent-cyan: #c8e7f5; --accent-green: #1e3d2f; --live: #c8e7f5; --danger: #a02040; --warning: #b8a060; --frost-silver: #b8c8d0; --forest-green: #1e3d2f; --chrome-bg: rgba(13, 26, 20, 0.94); --chrome-h: 4.5rem;
  --serif: Georgia, 'Times New Roman', serif; --sans: 'DM Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
html[data-theme="light"] {
  --bg: #eef6f2; --card: #ffffff; --border: #c5d8cc; --text: #142820; --muted: #4a6658; --accent: #8b1a2b; --accent-dim: #f5e0e4; --accent-cyan: #2a6a80; --accent-green: #1e3d2f; --live: #2a6a80; --danger: #a02040; --warning: #8a7020; --frost-silver: #5a7080; --forest-green: #1e3d2f; --chrome-bg: rgba(255, 255, 255, 0.94); --chrome-h: 4.5rem;
  --serif: Georgia, 'Times New Roman', serif; --sans: 'DM Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Optional broadcast scanline overlay */
body.winter-frost::before,
body.broadcast-scanlines::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
  0deg,
  transparent,
  transparent 2px,
  rgba(0, 0, 0, 0.06) 2px,
  rgba(0, 0, 0, 0.06) 4px
  );
  opacity: 0.45;
}

body.winter-frost::after,
body.broadcast-scanlines::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(13, 26, 20, 0.4) 100%);
}

body.has-chrome { padding-top: var(--chrome-h); }

/* ── Broadcast chrome header ── */
.system-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--chrome-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.7rem;
  box-shadow: 0 2px 24px rgba(139, 26, 43, 0.12);
}
.system-chrome.hidden { display: none; }

.broadcast-chrome {
  border-bottom-color: rgba(200, 231, 245, 0.25);
}

.chrome-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  flex-wrap: wrap;
}
.chrome-sub { padding-top: 0; opacity: 0.85; }

.chrome-brand {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(200, 231, 245, 0.12);
  color: var(--live);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.58rem;
  border: 1px solid rgba(200, 231, 245, 0.35);
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.tier-pill {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  border: 1px solid rgba(139, 26, 43, 0.35);
}

.rating-meter-wrap,
.compliance-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.label-system {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.58rem;
}

.rating-meter,
.meter {
  width: 4rem;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}

.rating-fill,
.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  transition: width 0.4s ease, background 0.3s;
  box-shadow: 0 0 8px rgba(200, 231, 245, 0.35);
}

.meter-fill.mid { background: var(--warning); box-shadow: 0 0 6px rgba(255, 179, 71, 0.4); }
.meter-fill.low { background: var(--danger); box-shadow: 0 0 6px rgba(255, 68, 102, 0.4); }

.mono { font-family: var(--mono); font-size: 0.65rem; color: var(--accent-cyan); }

.memory-pips,
.audience-pips { display: flex; gap: 0.25rem; }

.memory-pips .pip,
.audience-pips .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.memory-pips .pip.filled,
.audience-pips .pip.filled {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(139, 26, 43, 0.45);
}

.chrome-earnings { color: var(--accent-cyan); margin-left: auto; }

.violation-badge {
  background: rgba(255, 68, 102, 0.2);
  color: var(--danger);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(255, 68, 102, 0.35);
}
.violation-badge.hidden { display: none; }

body.glitch-level-1 .chrome-brand { animation: labelGlitch 4s steps(2) infinite; }
body.glitch-level-2 .system-chrome { animation: chromeFlicker 6s infinite; }
body.glitch-level-3 .prose.card { animation: proseGlitch 8s infinite; }

@keyframes labelGlitch {
  0%, 97%, 100% { opacity: 1; }
  98% { opacity: 0.7; transform: translateX(1px); color: var(--accent-cyan); }
}
@keyframes chromeFlicker {
  0%, 99%, 100% { filter: none; }
  99.5% { filter: hue-rotate(20deg) brightness(1.1); }
}
@keyframes proseGlitch {
  0%, 96%, 100% { transform: none; }
  97% { transform: skewX(0.4deg); }
  98% { transform: skewX(-0.3deg); }
}

/* ── Main app shell ── */
.app {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
  will-change: opacity, transform;
}

.app.is-leaving {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  filter: blur(2px);
}

.app.is-entering {
  animation: pageEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.prose-reveal p {
  animation: proseIn 0.55s ease backwards;
}
.prose-reveal p:nth-child(1) { animation-delay: 0.05s; }
.prose-reveal p:nth-child(2) { animation-delay: 0.14s; }
.prose-reveal p:nth-child(3) { animation-delay: 0.23s; }
.prose-reveal p:nth-child(4) { animation-delay: 0.32s; }

@keyframes proseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0.25rem 0;
  text-shadow: 0 0 24px rgba(200, 231, 245, 0.2);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
}

.byline, .tagline, .hook { color: var(--muted); }

.hook {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); font-family: var(--sans); font-size: 0.9rem; }

.node-header .act {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.node-header h2 {
  font-weight: 400;
  margin: 0.25rem 0 1rem;
}

.choice-list { display: flex; flex-direction: column; gap: 0.5rem; }

.choice {
  position: relative;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(180deg, #1e3d2f 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.95rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1rem;
  box-shadow: 0 2px 0 rgba(255, 45, 149, 0.06), 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s, background 0.15s, box-shadow 0.12s;
  touch-action: manipulation;
  user-select: none;
}

.choice:hover:not(:disabled):not(.is-busy) {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(255, 45, 149, 0.15), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.choice.is-pressed {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 45, 149, 0.04);
}

.choice:disabled { opacity: 0.45; cursor: not-allowed; }

.choice.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.25), 0 2px 12px rgba(255, 45, 149, 0.15);
}

.choice-label { display: block; }
.choice-meta {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}
.choice-meta.warn { color: var(--warning); }
.choice-meta.danger { color: var(--danger); }

.choice.is-committing {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.25);
}

.choice-enter {
  animation: choiceIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes choiceIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 45, 149, 0.35);
  transform: scale(0);
  animation: rippleOut 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

.btn {
  position: relative;
  overflow: hidden;
  font-family: var(--sans);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 2px 0 rgba(255, 45, 149, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.15s;
  touch-action: manipulation;
}

.btn.is-pressed { transform: translateY(2px) scale(0.98); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #e8f4fa;
  font-weight: 600;
}

.btn.primary:hover { box-shadow: 0 0 16px rgba(255, 45, 149, 0.4); }

.btn.text { background: transparent; border: none; color: var(--muted); }

.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}

/* ── Act I interstitial ── */
.interstitial {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 105;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.interstitial.hidden { display: none; }

.interstitial-inner {
  max-width: 26rem;
  width: 100%;
  text-align: center;
  border-color: rgba(0, 240, 255, 0.3);
}

.interstitial-inner h2 {
  margin: 0.25rem 0 1rem;
  font-family: var(--serif);
}

.interstitial-stat {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.interstitial-teaser {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* ── Paywall modal ── */
.paywall {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.paywall.hidden { display: none; }

.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 10, 46, 0.78);
  backdrop-filter: blur(6px);
}

.paywall-modal {
  position: relative;
  max-width: 28rem;
  width: 100%;
  background: #ffffff;
  color: #1a1028;
  border: 1px solid #e8d4f0;
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.25rem;
  box-shadow: 0 24px 48px rgba(26, 10, 46, 0.45), 0 0 0 1px rgba(255, 45, 149, 0.08);
  font-family: var(--sans);
  max-height: 92vh;
  overflow-y: auto;
}

.paywall-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f5eef8;
  color: #7a5a8a;
  border-radius: 8px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.paywall-close:hover { background: #ebe0f0; color: #4a2a6e; }

.paywall-header { margin-bottom: 1.25rem; padding-right: 2rem; }

.paywall-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b1a2b;
  background: rgba(139, 26, 43, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(139, 26, 43, 0.2);
}

.paywall-modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0d1a14;
  font-family: var(--sans);
}

.paywall-sub {
  margin: 0;
  font-size: 0.88rem;
  color: #6b5080;
  line-height: 1.5;
}

.paywall-progress { margin-bottom: 1.25rem; }

.paywall-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  color: #5a4068;
  margin-bottom: 0.4rem;
}

.paywall-progress-pct { color: #8b1a2b; font-weight: 600; }

.paywall-progress-track {
  height: 6px;
  background: #ebe0f0;
  border-radius: 999px;
  overflow: hidden;
}

.paywall-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b1a2b, #c8e7f5);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.paywall-plans {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.paywall-plan {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  background: #faf5fc;
  border: 2px solid #ebe0f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-family: var(--sans);
  color: inherit;
}

.paywall-plan:hover { border-color: #d4b8e8; background: #f5eef8; }

.paywall-plan.is-selected {
  border-color: #8b1a2b;
  background: rgba(139, 26, 43, 0.06);
  box-shadow: 0 0 0 1px rgba(139, 26, 43, 0.15);
}

.paywall-plan-featured { position: relative; }

.paywall-plan-radio input { accent-color: #8b1a2b; pointer-events: none; }

.paywall-plan-body { flex: 1; min-width: 0; }

.paywall-plan-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0d1a14;
}

.paywall-plan-desc {
  display: block;
  font-size: 0.75rem;
  color: #6b5080;
  margin-top: 0.1rem;
}

.paywall-plan-save {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #00a8c0;
  background: rgba(0, 240, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.paywall-plan-price {
  font-size: 1rem;
  font-weight: 700;
  color: #0d1a14;
  white-space: nowrap;
}

.paywall-cta {
  width: 100%;
  background: #8b1a2b;
  border-color: #8b1a2b;
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
}

.paywall-cta:hover { background: #6d1522; border-color: #6d1522; }

.paywall-notify { margin-bottom: 1rem; }

.paywall-notify-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a2a6e;
  margin-bottom: 0.45rem;
}

.paywall-notify-row {
  display: flex;
  gap: 0.5rem;
}

.paywall-notify-row input[type="email"] {
  flex: 1;
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid #b8c8d0;
  border-radius: 8px;
  color: #0d1a14;
  font-size: 0.88rem;
}

.paywall-notify-btn {
  background: #f5eef8;
  border-color: #d4b8e8;
  color: #4a2a6e;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.65rem 0.9rem;
}

.paywall-notify-status {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: #00a8c0;
}

.paywall-notify-status.is-error { color: #ff4466; }

.paywall-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.72rem;
  color: #a08bc4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.paywall-divider::before,
.paywall-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ebe0f0;
}

.paywall-unlock {
  display: flex;
  gap: 0.5rem;
}

.paywall-unlock input[type="text"] {
  flex: 1;
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid #b8c8d0;
  border-radius: 8px;
  color: #0d1a14;
  font-size: 0.88rem;
}

.paywall-unlock-btn {
  background: #faf5fc;
  border-color: #d4b8e8;
  color: #4a2a6e;
  font-weight: 600;
  white-space: nowrap;
}

.paywall-error {
  color: #ff4466;
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  min-height: 1.1rem;
}

.paywall-dev-hint {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: #a08bc4;
}

.paywall-dev-hint code {
  background: #f5eef8;
  color: #4a2a6e;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.paywall-return {
  width: 100%;
  margin-top: 0.75rem;
  background: transparent;
  border: none;
  color: #7a5a8a;
  font-size: 0.85rem;
}

.paywall-return:hover { color: #4a2a6e; }

.paywall-note { color: var(--accent); font-family: var(--sans); }

/* ── Broadcast stamp (audience pick) ── */
.choice.memory-approved,
.choice.audience-pick {
  position: relative;
  overflow: visible;
}

.choice .approved-stamp,
.choice .broadcast-stamp {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%) rotate(-12deg) scale(2);
  opacity: 0;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  border: 3px solid var(--accent-cyan);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 240, 255, 0.08);
  z-index: 2;
}

.choice.memory-approved .approved-stamp,
.choice.audience-pick .broadcast-stamp {
  animation: approvedStamp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes approvedStamp {
  0% {
  opacity: 0;
  transform: translateY(-50%) rotate(-12deg) scale(2.4);
  }
  55% {
  opacity: 1;
  transform: translateY(-50%) rotate(-8deg) scale(0.92);
  }
  75% {
  transform: translateY(-50%) rotate(-14deg) scale(1.06);
  }
  100% {
  opacity: 0.92;
  transform: translateY(-50%) rotate(-12deg) scale(1);
  }
}

.hidden-line { border-left: 3px solid var(--accent-cyan); }

.stats-card { text-align: center; }

.stats-card canvas { display: block; margin: 0 auto; border-radius: 8px; }

.blurb { font-style: italic; color: var(--muted); margin-top: 1rem; }

.choice-log {
  margin: 0;
  padding-left: 1.2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.choice-log li { margin-bottom: 0.35rem; }

.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer a { color: var(--accent-cyan); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

code {
  font-family: ui-monospace, monospace;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── Traps & decoys ── */
.choice-decoy { border-style: dashed; opacity: 0.92; }
.choice-trap-bait { border-color: #6b2040; }

.covenant-doc,
.sponsor-doc { border-color: #6b2040; }
.covenant-text,
.sponsor-text {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.trap-bait { border-color: var(--danger); color: var(--danger); }

.trap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 0, 30, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.trap-overlay.hidden { display: none; }
.trap-inner { max-width: 26rem; border-color: var(--danger); }
.trap-title {
  color: var(--danger);
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.trap-flash { animation: trapFlash 0.6s ease; }
@keyframes trapFlash {
  0%, 100% { background: var(--bg); }
  30%, 70% { background: #3a0a28; }
}

.violations { border-left: 3px solid var(--danger); }

.node-header {
  animation: proseIn 0.45s ease backwards;
}

/* ── Broadcast-specific utilities ── */
.viewer-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.signal-bar {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}
.signal-bar span {
  width: 3px;
  background: var(--accent-cyan);
  border-radius: 1px;
}
.signal-bar span:nth-child(1) { height: 4px; }
.signal-bar span:nth-child(2) { height: 7px; }
.signal-bar span:nth-child(3) { height: 10px; }
.signal-bar span:nth-child(4) { height: 12px; opacity: 0.4; }

.countdown-timer {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.sponsor-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px dashed var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.host-quote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  font-style: italic;
  color: var(--muted);
}

.audience-reaction {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  animation: reactionPop 0.4s ease;
}

@keyframes reactionPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  body.broadcast-scanlines::before,
  body.broadcast-scanlines::after { display: none; }
  .live-dot { animation: none; }
  .app, .choice, .btn, .prose-reveal p, .choice-enter, .node-header,
  .choice.memory-approved .approved-stamp,
  .choice.audience-pick .broadcast-stamp {
  animation: none !important;
  transition: none !important;
  }
  .choice.memory-approved .approved-stamp,
  .choice.audience-pick .broadcast-stamp {
  opacity: 0.92;
  transform: translateY(-50%) rotate(-12deg) scale(1);
  }
  .app.is-leaving, .app.is-entering { opacity: 1; transform: none; filter: none; }
}

@media (min-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
}

/* Wave A  --  doorway + trial honesty */
.product-job {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.92rem;
  color: var(--muted, #9a94ad);
  line-height: 1.45;
}
.product-job strong { color: var(--text, #f2f0f8); font-weight: 600; }
.trial-note {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted, #9a94ad);
}
.trial-note.trial-open {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(125, 206, 160, 0.35);
  background: rgba(125, 206, 160, 0.08);
  color: var(--text, #f2f0f8);
}
/* Commerce chrome only meaningful when paywall is enabled (I12) */
body.trial-open #paywall [data-commerce],
body.trial-open .paywall-plans,
body.trial-open #paywall-checkout,
body.trial-open .paywall-plan-price,
body.trial-open .paywall-plan-save,
body.trial-open .paywall-divider,
body.trial-open .paywall-unlock,
body.trial-open #unlock-form {
  display: none !important;
}

/* Wave B  --  cold open + studio flow */
.cold-open-beats {
  margin: 0.85rem 0 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.cold-trap {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text, #f2f0f8);
}
.cold-beat-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted, #9a94ad);
  font-size: 0.88rem;
  line-height: 1.45;
}
.cold-beat-list li { margin: 0.35rem 0; }
.cold-beat-list strong { color: var(--text, #f2f0f8); }
.studio-flow-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.9rem;
  font-size: 0.88rem;
}
.studio-flow-nav a {
  color: var(--accent, #c9a0ff);
  font-weight: 600;
  text-decoration: none;
}
.studio-flow-nav a:hover { text-decoration: underline; }
.flow-end h3 { margin-top: 0; }
.flow-end-lede { margin: 0 0 0.85rem; }
.flow-end-row { margin-bottom: 0.85rem; }
.flow-end-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.flow-end-links a {
  color: var(--accent, #c9a0ff);
  font-weight: 600;
  text-decoration: none;
}
.flow-end-links a:hover { text-decoration: underline; }
.flow-next {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.25rem;
}
.flow-next-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #9a94ad);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.flow-next-title { font-size: 1.05rem; color: var(--text, #f2f0f8); }
.flow-next-job { font-size: 0.85rem; color: var(--muted, #9a94ad); font-weight: 500; }
.flow-end-foot { margin: 0.85rem 0 0; font-size: 0.82rem; }
.footer-flow a { color: var(--accent, #c9a0ff); font-weight: 600; }

.save-progress-note {
  margin: 0.65rem 0 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #30363d);
  background: rgba(255,255,255,0.03);
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 0.82rem;
  line-height: 1.45;
}
