/* AudioPress public marketing, policy, and status-page components. */

/* ---- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-inner {
  max-inline-size: 44rem;
  /* Extra top room so the content isn't jammed under the sticky header. */
  padding-block: clamp(var(--space-2xl), 12vw, 8rem)
    clamp(var(--space-xl), 9vw, calc(var(--space-2xl) * 1.2));
  text-align: center;
}
.hero-title {
  font-size: var(--step-4, 3.5rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin-block: var(--space-xs) var(--space-s);
  text-wrap: balance;
}
.hero-lead {
  max-inline-size: 40ch;
  margin-inline: auto;
  margin-block-end: var(--space-l);
  color: var(--muted);
  font-size: var(--step-1);
  text-wrap: pretty;
}
/* "On-air" emblem: a studio mic in a soft halo, with sound rings rippling out
   (rings are CSS pseudo-elements; only they animate). Static halo + mic when
   motion is reduced. */
.hero-mic {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 3.6rem;
  block-size: 3.6rem;
  margin: 0 auto var(--space-m);
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 38%, transparent);
  border-radius: var(--radius-pill);
}
.hero-mic .mic-glyph {
  inline-size: 1.9rem;
  block-size: 1.9rem;
}
.hero-mic::before,
.hero-mic::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-mic::before {
    animation: mic-ring 3s var(--ease-out) infinite;
  }
  .hero-mic::after {
    animation: mic-ring 3s var(--ease-out) 1.5s infinite;
  }
}
@keyframes mic-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.3);
    opacity: 0;
  }
}

/* Living studio backdrop: filled, blurred colour blobs (no radial-gradient
   rings) that roam the hero, plus a slow hue drift over the whole field —
   "studio lights" energy in the background itself. */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Glow palette. Default (the "daylight studio") = a warm sun-glow + a soft
     lilac, so light mode reads cosy and bright — daylight through the studio
     window. The dark "night studio" swaps in the cool brand purples below. */
  --glow-a: hsl(36 96% 64%);
  --glow-a-op: 0.34;
  --glow-b: hsl(286 68% 72%);
  --glow-b-op: 0.26;
}
.hero-aurora::before,
.hero-aurora::after {
  content: "";
  position: absolute;
  inline-size: 42rem;
  block-size: 42rem;
  border-radius: 50%;
  filter: blur(96px);
}
.hero-aurora::before {
  background: var(--glow-a);
  opacity: var(--glow-a-op);
  inset-block-start: -24rem;
  inset-inline-start: -6rem;
}
.hero-aurora::after {
  background: var(--glow-b);
  opacity: var(--glow-b-op);
  inset-block-start: -26rem;
  inset-inline-end: -6rem;
}
/* Night studio (OS dark unless forced light) → the cool brand glow. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-aurora {
    --glow-a: var(--accent);
    --glow-a-op: 0.38;
    --glow-b: var(--focus);
    --glow-b-op: 0.3;
  }
}
/* Forced dark → the cool brand glow. */
:root[data-theme="dark"] .hero-aurora {
  --glow-a: var(--accent);
  --glow-a-op: 0.38;
  --glow-b: var(--focus);
  --glow-b-op: 0.3;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-aurora {
    animation: aurora-hue 14s ease-in-out infinite alternate;
  }
  /* Promoted only where it earns the layer. Each blob is 42rem square under a
     96px blur, so a compositor layer that never animates is the most expensive
     thing on the page for the readers least able to afford it. */
  .hero-aurora::before,
  .hero-aurora::after {
    will-change: transform;
  }
  .hero-aurora::before {
    animation: blob-a 19s ease-in-out infinite;
  }
  .hero-aurora::after {
    animation: blob-b 23s ease-in-out infinite;
  }
}
@keyframes aurora-hue {
  from {
    filter: hue-rotate(-20deg) saturate(1);
  }
  to {
    filter: hue-rotate(22deg) saturate(1.3);
  }
}
@keyframes blob-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(16%, 9rem, 0) scale(1.18);
  }
}
@keyframes blob-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-14%, 7rem, 0) scale(1.12);
  }
}

/* Subscribe form (inline in the hero) */
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  /* Row gap (when the input + submit wrap to two rows on a narrow card) is
     generous so the button doesn't crowd the field; column gap (side-by-side on
     a wide viewport) stays tight. Applies to both the marketing "Notify me" and
     the sign-in "Email me a link" forms. */
  gap: var(--space-m) var(--space-2xs);
  justify-content: center;
  max-inline-size: 32rem;
  margin-inline: auto;
}
.subscribe-form input {
  flex: 1 1 15rem;
  min-block-size: var(--min-tap);
  padding-inline: var(--space-m);
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.subscribe-form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.hero-fineprint {
  margin-block-start: var(--space-xs);
  color: var(--muted);
  font-size: var(--step--1);
}
/* Signed-in hero CTA: a single "go to dashboard" button where the subscribe
   form sits for signed-out visitors. */
.hero-cta {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-s);
}

/* ---- Panels ------------------------------------------------------------- */

.features-inner > h2 {
  font-size: var(--step-2);
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

/* ---- Features ----------------------------------------------------------- */

.panel-features {
  position: relative;
  isolation: isolate;
  /* Full-bleed band: the tinted background + borders span the viewport while
     `.features-inner` re-centres the content at `--page-max`. */
  max-inline-size: none;
  padding-block: clamp(var(--space-xl), 6vw, var(--space-2xl));
  padding-inline: 0;
  background: color-mix(in oklab, var(--surface) 50%, var(--bg));
  border-block: 1px solid var(--border);
  overflow: hidden;
}

/* Studio acoustic-foam texture: a faint quilted wedge pattern (cross-hatched
   gradients) for the "treated room" vibe, plus an animated TV-static grain on
   top via `::after`. Both decorative, low-contrast, behind the content. */
.studio-texture {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(
      45deg,
      color-mix(in oklab, var(--text) 4%, transparent) 0 2px,
      transparent 2px 16px
    ),
    repeating-linear-gradient(
      -45deg,
      color-mix(in oklab, var(--text) 4%, transparent) 0 2px,
      transparent 2px 16px
    );
  background-size: 22px 22px;
}
.studio-texture::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .studio-texture::after {
    animation: noise-jitter 0.5s steps(4) infinite;
  }
}
@keyframes noise-jitter {
  0% {
    background-position: 0 0;
  }
  25% {
    background-position: -22px 14px;
  }
  50% {
    background-position: 16px -18px;
  }
  75% {
    background-position: -14px -22px;
  }
  100% {
    background-position: 18px 18px;
  }
}

/* ---- Feature "mixing desk" ---------------------------------------------- */
/* Two panels — a colourful channel deck + an LED screen. Side-by-side on wide
   viewports, stacked on narrow. Pure CSS: hidden radios give free single-select
   + keyboard nav; sibling selectors light the pad and swap the screen. The
   screen idles on a level-meter animation until a channel is pushed. */
/* The studio hardware — the mixing console + the demo TV — is a dark device in
   BOTH themes (a desk and a screen stay dark whatever the room), so its
   neon-on-black readouts stay legible and it reads as a deliberate object, not
   a washed-out panel. But a real console catches the room light: in the light
   "daylight studio" it's a *brighter, lit* charcoal; in the dark "night studio"
   it falls to near-black. We re-declare the semantic palette (+ a `--screen`
   token for the emissive displays) on these subtrees, following base.css's own
   light/dark structure, so every inner `var(--surface)` / `color-mix(--bg…)`
   resolves to the lit-or-unlit device value with no per-element change.

   Default (`:root`, i.e. daylight / forced-light) = lit charcoal. Kept a notch
   brighter than a pure dark device so it doesn't punch a harsh black hole in
   the soft daytime page — dark hardware catching plenty of room light. */
.mixer,
.tv {
  --bg: hsl(234 11% 23%);
  --surface: hsl(234 10% 29%);
  --text: hsl(220 22% 95%);
  --muted: hsl(220 12% 74%);
  --border: hsl(234 9% 39%);
  --screen: hsl(232 22% 13%);
  --tv-screen: hsl(232 24% 11%);
  color-scheme: dark;
}
/* Night studio (OS dark, unless forced light) → near-black hardware. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mixer,
  :root:not([data-theme="light"]) .tv {
    --bg: hsl(230 18% 11%);
    --surface: hsl(230 16% 16%);
    --text: hsl(220 24% 92%);
    --muted: hsl(220 14% 66%);
    --border: hsl(230 12% 27%);
    --screen: #06070c;
    --tv-screen: #04050a;
  }
}
/* Forced dark → near-black hardware. */
:root[data-theme="dark"] .mixer,
:root[data-theme="dark"] .tv {
  --bg: hsl(230 18% 11%);
  --surface: hsl(230 16% 16%);
  --text: hsl(220 24% 92%);
  --muted: hsl(220 14% 66%);
  --border: hsl(230 12% 27%);
  --screen: #06070c;
  --tv-screen: #04050a;
}

.mixer {
  position: relative;
  display: grid;
  gap: var(--space-m);
  max-inline-size: 64rem;
  margin: var(--space-xl) auto 0;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .mixer {
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
  }
}
/* Radios: visually hidden but kept focusable (not display:none). */
.mixer-radio {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.mixer-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-2xs);
  align-content: start;
}
/* A channel pad — a uniform tile, each a distinct hue (`--pad`), matte until
   lit. Equal size (grid `1fr` rows + stretch), centred caption. */
.mixer-key {
  --pad: var(--accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: 3.6rem;
  padding: var(--space-2xs) var(--space-s);
  font-size: var(--step--1);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  color: color-mix(in oklab, var(--pad) 35%, var(--text));
  background:
    radial-gradient(
      130% 130% at 50% 0%,
      color-mix(in oklab, var(--pad) 20%, transparent),
      transparent 72%
    ),
    color-mix(in oklab, var(--surface) 72%, #000);
  border: 1px solid color-mix(in oklab, var(--pad) 32%, var(--border));
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}
.mixer-key:nth-child(1) {
  --pad: hsl(255 90% 74%);
}
.mixer-key:nth-child(2) {
  --pad: hsl(218 90% 70%);
}
.mixer-key:nth-child(3) {
  --pad: hsl(190 85% 62%);
}
.mixer-key:nth-child(4) {
  --pad: hsl(160 68% 56%);
}
.mixer-key:nth-child(5) {
  --pad: hsl(45 95% 64%);
}
.mixer-key:nth-child(6) {
  --pad: hsl(25 92% 64%);
}
.mixer-key:nth-child(7) {
  --pad: hsl(330 88% 70%);
}
.mixer-key:nth-child(8) {
  --pad: hsl(284 82% 72%);
}
.mixer-key:nth-child(9) {
  --pad: hsl(205 88% 66%);
}
.mixer-key:nth-child(10) {
  --pad: hsl(140 62% 58%);
}
.mixer-key:nth-child(11) {
  --pad: hsl(178 68% 60%);
}
/* Per-channel motif lives on the SCREEN, behind the readout text — hidden until
   its channel is active, then it glows faintly (replacing the idle meter). The
   pads themselves stay text-only. */
.mixer-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .mixer-art {
    transition: opacity var(--dur-default) var(--ease-out);
  }
}
.mixer-art-svg {
  inline-size: clamp(5rem, 30%, 9rem);
  block-size: auto;
  filter: drop-shadow(0 0 14px color-mix(in oklab, var(--accent) 45%, transparent));
}
/* Reveal the active channel's motif. (Per-id: label↔radio link is by id.) */
#mx-0:checked ~ .mixer-screen .art-0,
#mx-1:checked ~ .mixer-screen .art-1,
#mx-2:checked ~ .mixer-screen .art-2,
#mx-3:checked ~ .mixer-screen .art-3,
#mx-4:checked ~ .mixer-screen .art-4,
#mx-5:checked ~ .mixer-screen .art-5,
#mx-6:checked ~ .mixer-screen .art-6,
#mx-7:checked ~ .mixer-screen .art-7,
#mx-8:checked ~ .mixer-screen .art-8,
#mx-9:checked ~ .mixer-screen .art-9,
#mx-10:checked ~ .mixer-screen .art-10 {
  opacity: 0.2;
}
/* Each motif loops a small, *transform-only* motion (opacity stays governed by
   the active-channel rule, so inactive motifs never bleed through). Gentle —
   long durations, nothing that could induce motion sickness. */
@media (prefers-reduced-motion: no-preference) {
  .art-0 {
    animation: art-spin 20s linear infinite;
  }
  .art-1 {
    animation: art-spin 30s linear infinite;
  }
  .art-2 {
    animation: art-pulse 4.5s ease-in-out infinite;
  }
  .art-3 {
    animation: art-pulse 4s ease-in-out infinite;
  }
  .art-4 {
    animation: art-bob 4s ease-in-out infinite;
  }
  .art-5 {
    animation: art-float 8s ease-in-out infinite;
  }
  .art-6 {
    animation: art-pulse 5s ease-in-out infinite;
  }
  .art-7 {
    animation: art-pulse 4.5s ease-in-out infinite;
  }
  .art-8 {
    animation: art-float 8.5s ease-in-out infinite;
  }
  .art-9 {
    animation: art-float 9s ease-in-out infinite;
  }
  .art-10 {
    animation: art-pulse 5.5s ease-in-out infinite;
  }
}
@keyframes art-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes art-pulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.07);
  }
}
@keyframes art-bob {
  0%,
  100% {
    transform: translateY(-4px);
  }
  50% {
    transform: translateY(4px);
  }
}
@keyframes art-float {
  0%,
  100% {
    transform: translateY(-3px) rotate(-1.2deg);
  }
  50% {
    transform: translateY(3px) rotate(1.2deg);
  }
}
@media (hover: hover) and (pointer: fine) {
  .mixer-key:hover {
    color: var(--text);
    border-color: color-mix(in oklab, var(--pad) 60%, var(--border));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .mixer-key {
    transition:
      color var(--dur-quick) var(--ease-out),
      border-color var(--dur-quick) var(--ease-out),
      box-shadow var(--dur-quick) var(--ease-out),
      transform var(--dur-quick) var(--ease-out);
  }
  .mixer-key:active {
    transform: translateY(1px) scale(0.98);
  }
}

/* Active pad — lit in its own hue. (Per-id: a label↔radio link is by id.) */
#mx-0:checked ~ .mixer-deck [for="mx-0"],
#mx-1:checked ~ .mixer-deck [for="mx-1"],
#mx-2:checked ~ .mixer-deck [for="mx-2"],
#mx-3:checked ~ .mixer-deck [for="mx-3"],
#mx-4:checked ~ .mixer-deck [for="mx-4"],
#mx-5:checked ~ .mixer-deck [for="mx-5"],
#mx-6:checked ~ .mixer-deck [for="mx-6"],
#mx-7:checked ~ .mixer-deck [for="mx-7"],
#mx-8:checked ~ .mixer-deck [for="mx-8"],
#mx-9:checked ~ .mixer-deck [for="mx-9"],
#mx-10:checked ~ .mixer-deck [for="mx-10"] {
  color: #fff;
  border-color: var(--pad);
  background:
    radial-gradient(
      120% 130% at 50% 0%,
      color-mix(in oklab, var(--pad) 45%, transparent),
      transparent 78%
    ),
    color-mix(in oklab, var(--surface) 58%, #000);
  box-shadow:
    0 0 0 1px var(--pad),
    0 0 22px -4px var(--pad);
}
/* Keyboard focus ring on the visible pad (the radio itself is hidden). */
#mx-0:focus-visible ~ .mixer-deck [for="mx-0"],
#mx-1:focus-visible ~ .mixer-deck [for="mx-1"],
#mx-2:focus-visible ~ .mixer-deck [for="mx-2"],
#mx-3:focus-visible ~ .mixer-deck [for="mx-3"],
#mx-4:focus-visible ~ .mixer-deck [for="mx-4"],
#mx-5:focus-visible ~ .mixer-deck [for="mx-5"],
#mx-6:focus-visible ~ .mixer-deck [for="mx-6"],
#mx-7:focus-visible ~ .mixer-deck [for="mx-7"],
#mx-8:focus-visible ~ .mixer-deck [for="mx-8"],
#mx-9:focus-visible ~ .mixer-deck [for="mx-9"],
#mx-10:focus-visible ~ .mixer-deck [for="mx-10"] {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* The LED screen: a dark inset panel. An idle level-meter (`.mixer-eq`) + TV
   grain (`.mixer-noise`) animate behind; a readout line glows on top once a
   channel is pushed (the meter dims behind it). */
.mixer-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-block-size: 9rem;
  padding: var(--space-m);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: var(--step--1);
  line-height: 1.6;
  text-align: start;
  color: color-mix(in oklab, var(--accent) 76%, #fff);
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 3px,
      color-mix(in oklab, #000 26%, transparent) 3px 4px
    ),
    var(--screen);
  border: 1px solid color-mix(in oklab, var(--accent) 22%, var(--border));
  border-radius: var(--radius);
  box-shadow: inset 0 2px 16px rgb(0 0 0 / 0.85);
}
.mixer-eq {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  gap: 2.5%;
  padding: var(--space-m);
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .mixer-eq {
    transition: opacity var(--dur-default) var(--ease-out);
  }
}
.mixer-eq span {
  flex: 1;
  min-inline-size: 0;
  block-size: 100%;
  border-radius: 2px 2px 0 0;
  /* Layered fill: faint base → accent body → bright cap, so each bar reads like
     a lit LED column rather than a flat rectangle. */
  background: linear-gradient(
    to top,
    color-mix(in oklab, var(--accent) 18%, transparent) 0%,
    var(--accent) 60%,
    color-mix(in oklab, var(--accent) 45%, #fff) 100%
  );
  /* Outer bloom + a bright inner top edge — the glow of a real meter. */
  box-shadow:
    0 0 7px color-mix(in oklab, var(--accent) 45%, transparent),
    inset 0 1px 0 color-mix(in oklab, #fff 55%, transparent);
  transform: scaleY(0.4);
  transform-origin: bottom;
}
/* Per-bar resting heights → a believable frozen waveform when motion is
   reduced (8 distinct steps, repeating across the 16 bars). */
.mixer-eq span:nth-child(8n + 1) {
  transform: scaleY(0.34);
}
.mixer-eq span:nth-child(8n + 2) {
  transform: scaleY(0.7);
}
.mixer-eq span:nth-child(8n + 3) {
  transform: scaleY(0.46);
}
.mixer-eq span:nth-child(8n + 4) {
  transform: scaleY(0.92);
}
.mixer-eq span:nth-child(8n + 5) {
  transform: scaleY(0.28);
}
.mixer-eq span:nth-child(8n + 6) {
  transform: scaleY(0.6);
}
.mixer-eq span:nth-child(8n + 7) {
  transform: scaleY(0.8);
}
.mixer-eq span:nth-child(8n + 8) {
  transform: scaleY(0.4);
}
/* Gentle per-bar hue offset → the meter shimmers across a small spectrum while
   staying in the accent family (composes with the slow global drift below). */
.mixer-eq span:nth-child(8n + 1) {
  filter: hue-rotate(-20deg);
}
.mixer-eq span:nth-child(8n + 2) {
  filter: hue-rotate(-9deg);
}
.mixer-eq span:nth-child(8n + 4) {
  filter: hue-rotate(11deg);
}
.mixer-eq span:nth-child(8n + 5) {
  filter: hue-rotate(22deg);
}
.mixer-eq span:nth-child(8n + 6) {
  filter: hue-rotate(13deg);
}
.mixer-eq span:nth-child(8n + 7) {
  filter: hue-rotate(4deg);
}
.mixer-eq span:nth-child(8n + 8) {
  filter: hue-rotate(-8deg);
}
.mixer-noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.05;
  mix-blend-mode: screen;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mixer-readout {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  opacity: 0;
  text-wrap: pretty;
  text-shadow: 0 0 9px color-mix(in oklab, var(--accent) 55%, transparent);
}
/* Old-school readout header: channel no. + name, in bright LED caps. */
.rd-head {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: color-mix(in oklab, var(--accent) 35%, #fff);
}
.rd-body {
  color: color-mix(in oklab, var(--accent) 72%, #fff);
}
#mx-0:checked ~ .mixer-screen .rd-0,
#mx-1:checked ~ .mixer-screen .rd-1,
#mx-2:checked ~ .mixer-screen .rd-2,
#mx-3:checked ~ .mixer-screen .rd-3,
#mx-4:checked ~ .mixer-screen .rd-4,
#mx-5:checked ~ .mixer-screen .rd-5,
#mx-6:checked ~ .mixer-screen .rd-6,
#mx-7:checked ~ .mixer-screen .rd-7,
#mx-8:checked ~ .mixer-screen .rd-8,
#mx-9:checked ~ .mixer-screen .rd-9,
#mx-10:checked ~ .mixer-screen .rd-10 {
  opacity: 1;
}
/* Once a channel is selected the idle meter gives way entirely to that
   channel's motif (which fades in behind the readout text). */
.mixer:has(.mixer-radio:checked) .mixer-eq {
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .mixer-readout {
    transition: opacity var(--dur-default) var(--ease-out);
  }
  /* Bars bounce at staggered speeds + phases so it reads like a real meter, not
     a synchronised wave. The keyframe itself is irregular — spikes (someone
     speaking) and near-silent dips (a beat of silence) — so the desynced bars
     look like live audio. Durations are deliberately *slow* (2.5s–4.9s): a fast
     meter is hypnotic and can read as flicker; a relaxed one feels studio-grade
     and is comfortable to sit next to. */
  .mixer-eq span {
    animation: eq 4s ease-in-out infinite;
  }
  .mixer-eq span:nth-child(8n + 1) {
    animation-duration: 3.4s;
    animation-delay: -2.6s;
  }
  .mixer-eq span:nth-child(8n + 2) {
    animation-duration: 2.8s;
    animation-delay: -1s;
  }
  .mixer-eq span:nth-child(8n + 3) {
    animation-duration: 4.6s;
    animation-delay: -3.5s;
  }
  .mixer-eq span:nth-child(8n + 4) {
    animation-duration: 2.5s;
    animation-delay: -0.5s;
  }
  .mixer-eq span:nth-child(8n + 5) {
    animation-duration: 3.8s;
    animation-delay: -1.8s;
  }
  .mixer-eq span:nth-child(8n + 6) {
    animation-duration: 3s;
    animation-delay: -1.4s;
  }
  .mixer-eq span:nth-child(8n + 7) {
    animation-duration: 4.9s;
    animation-delay: -2.3s;
  }
  .mixer-eq span:nth-child(8n + 8) {
    animation-duration: 2.6s;
    animation-delay: -3.1s;
  }
  /* The whole meter drifts very slowly through a narrow hue arc — alive, but
     never leaving the accent family (composes with the per-bar offsets above). */
  .mixer-eq {
    animation: eq-hue 26s ease-in-out infinite;
  }
  .mixer-noise {
    animation: noise-jitter 0.5s steps(4) infinite;
  }
}
@keyframes eq-hue {
  0%,
  100% {
    filter: hue-rotate(-16deg);
  }
  50% {
    filter: hue-rotate(16deg);
  }
}
@keyframes eq {
  0% {
    transform: scaleY(0.1);
  }
  9% {
    transform: scaleY(0.92);
  }
  18% {
    transform: scaleY(0.34);
  }
  27% {
    transform: scaleY(0.06);
  }
  39% {
    transform: scaleY(0.7);
  }
  50% {
    transform: scaleY(1);
  }
  60% {
    transform: scaleY(0.22);
  }
  70% {
    transform: scaleY(0.08);
  }
  82% {
    transform: scaleY(0.55);
  }
  91% {
    transform: scaleY(0.28);
  }
  100% {
    transform: scaleY(0.1);
  }
}

/* ---- Demo --------------------------------------------------------------- */

/* Full-bleed studio band: a darker stage that spans the viewport, with the
   heading re-centred in `.demo-inner` and a glowing, deep-bezel "TV". */
.panel-demo {
  padding-block: clamp(var(--space-xl), 6vw, var(--space-2xl));
  text-align: center;
  background: color-mix(in oklab, var(--bg) 86%, #000);
  border-block: 1px solid var(--border);
}
.demo-inner {
  inline-size: 100%;
  max-inline-size: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(var(--space-s), 4vw, var(--space-xl));
}
.demo-name {
  color: var(--text);
  font-weight: 700;
}
/* The stage: near-full-width, with a soft studio spotlight behind the set. */
.tv-stage {
  position: relative;
  isolation: isolate;
  margin-block-start: var(--space-xl);
  padding-inline: clamp(var(--space-s), 4vw, var(--space-xl));
}
.tv-glow {
  position: absolute;
  inset: -6% 0 auto;
  z-index: -1;
  block-size: 70%;
  background: var(--accent);
  opacity: 0.18;
  filter: blur(120px);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tv-glow {
    animation: stage-glow 8s ease-in-out infinite alternate;
  }
}
@keyframes stage-glow {
  from {
    opacity: 0.12;
  }
  to {
    opacity: 0.24;
  }
}
/* The whole unit is one MATTE studio monitor: `.tv` is the graphite chassis
   (its padding is the bezel), `.tv-screen` is the inset display, and `.tv-chin`
   is a control strip that's part of the chassis. No gloss; depth from the matte
   frame + a dark drop shadow. */
.tv {
  --bezel: clamp(0.5rem, 1.1vw, 0.95rem);
  inline-size: 100%;
  max-inline-size: 84rem;
  margin-inline: auto;
  padding: var(--bezel);
  background: color-mix(in oklab, var(--bg) 64%, #000);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px color-mix(in oklab, #000 55%, transparent),
    inset 0 1px 0 color-mix(in oklab, #fff 4%, transparent),
    0 44px 100px -48px rgb(0 0 0 / 0.85),
    0 18px 44px -30px rgb(0 0 0 / 0.6);
}
.tv-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tv-screen);
  border-radius: 9px;
}
/* On small screens a 16:9 monitor is far too short to show anything useful of
   the live site, so the screen goes portrait — a much taller window. */
@media (max-width: 40rem) {
  .tv-screen {
    aspect-ratio: 4 / 5;
  }
}

.tv-frame {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  display: block;
}
/* The screen is a real power BUTTON: strip native chrome but keep the
   `.tv-screen` box. Off by default (snow + glyph); a click loads the demo and
   plays the CRT power-on. */
.tv-power {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  inline-size: 100%;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.tv-power[aria-pressed="true"] {
  cursor: default;
}
.tv-power:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
/* While off, the src-less iframe still renders an about:blank document that
   would swallow a real click into its own browsing context — so the power
   button never sees it (the static + glyph overlays above are already
   pointer-events:none and just fall through to it). Take the frame out of
   hit-testing until it's powered on; JS flips `aria-pressed` → it becomes
   interactive again with its real `src` loaded. */
.tv-power[aria-pressed="false"] .tv-frame {
  pointer-events: none;
}
/* Off-state face: a centred power glyph + hint over the snow. Decorative (the
   button owns the accessible label); fades out on power-on. */
.tv-poweroff {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  color: var(--text);
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.7);
  pointer-events: none;
}
.tv-power-glyph {
  display: inline-flex;
}
.power-glyph {
  display: block;
  inline-size: clamp(2.75rem, 6vw, 4rem);
  block-size: clamp(2.75rem, 6vw, 4rem);
  color: color-mix(in oklab, var(--accent) 55%, var(--text));
  filter: drop-shadow(0 0 12px color-mix(in oklab, var(--accent) 50%, transparent));
}
.tv-power-hint {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.01em;
}
/* Static-noise overlay — the visible default of the OFF screen; fades out when
   the TV is powered on. The noise is a rasterized-once data: SVG; `noise-jitter`
   only steps `background-position` (no per-frame filter), so it's cheap. */
.tv-static {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Powered on: the off-state face + snow disappear (instant under reduced motion;
   a smooth fade + CRT power-on only under no-preference, below). */
.tv-power[aria-pressed="true"] .tv-static,
.tv-power[aria-pressed="true"] .tv-poweroff {
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .tv-static {
    animation: noise-jitter 0.5s steps(4) infinite;
  }
  .tv-power[aria-pressed="true"] .tv-static,
  .tv-power[aria-pressed="true"] .tv-poweroff {
    transition: opacity 240ms var(--ease-out);
  }
  /* CRT power-on: a bright horizontal line snaps open, overshoots, settles.
     transform/opacity/filter only (compositor-friendly), ~480ms. */
  .tv-power[aria-pressed="true"] .tv-frame {
    animation: crt-on 480ms var(--ease-out) both;
  }
}
@keyframes crt-on {
  0% {
    transform: scaleY(0.002);
    filter: brightness(3);
    opacity: 0;
  }
  8% {
    transform: scaleY(0.004) scaleX(1.04);
    filter: brightness(3);
    opacity: 1;
  }
  30% {
    transform: scaleY(1.06);
    filter: brightness(1.7);
  }
  45% {
    transform: scaleY(0.98);
    filter: brightness(1.2);
  }
  60% {
    transform: scaleY(1.01);
    filter: brightness(1.05);
  }
  100% {
    transform: none;
    filter: none;
    opacity: 1;
  }
}
/* The monitor's control strip — a recessed bar in the chassis below the screen. */
.tv-chin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-block-size: 2.7rem;
  margin-block-start: var(--bezel);
  padding-inline: var(--space-m);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  color: color-mix(in oklab, var(--accent) 35%, var(--text));
  background: color-mix(in oklab, #000 35%, transparent);
  border-radius: 7px;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.6);
}
.tv-chin-dot {
  inline-size: 0.5em;
  block-size: 0.5em;
  border-radius: var(--radius-pill);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.visit-host {
  font-weight: 800;
  color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .tv-chin-arrow {
    transition: transform var(--dur-quick) var(--ease-out);
  }
}
@media (hover: hover) and (pointer: fine) {
  .tv-chin:hover {
    color: var(--text);
    background: color-mix(in oklab, var(--accent) 12%, color-mix(in oklab, #000 30%, transparent));
  }
  .tv-chin:hover .tv-chin-arrow {
    transform: translateX(3px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .tv-chin-dot {
    animation: beta-pulse 2.4s ease-in-out infinite;
  }
}

/* ---- Status pages ------------------------------------------------------- */

.panel-status {
  max-inline-size: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(var(--space-s), 4vw, var(--space-xl));
  text-align: center;
  min-block-size: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ---- Prose (privacy policy, …) ------------------------------------------ */

.panel-prose {
  /* A comfortable reading measure with generous breathing room. */
  max-inline-size: 44rem;
  padding-block: clamp(var(--space-xl), 7vw, calc(var(--space-2xl) * 1.3));
  line-height: 1.7;
}
.panel-prose h1 {
  margin-block-end: var(--space-s);
}
.panel-prose .panel-lead {
  /* Prose reads left-aligned, not centered like a marketing lead. */
  max-inline-size: none;
  margin-inline: 0;
  margin-block-end: var(--space-2xl);
  text-align: start;
}
.panel-prose h2 {
  margin-block: var(--space-2xl) var(--space-s);
  padding-block-start: var(--space-m);
  border-block-start: 1px solid var(--border);
  font-size: var(--step-1);
  text-align: start;
}
.panel-prose p {
  margin-block: 0 var(--space-s);
  color: var(--muted);
  text-wrap: pretty;
}
.panel-prose strong {
  color: var(--text);
}
.panel-prose ul {
  margin: 0 0 var(--space-s);
  padding-inline-start: var(--space-m);
}
.panel-prose li {
  margin-block-end: var(--space-s);
  padding-inline-start: var(--space-3xs);
  color: var(--muted);
}
.panel-prose a {
  color: var(--accent);
}
.prose-meta {
  margin-block-start: var(--space-2xl);
  color: var(--muted);
}

/* ---- Scroll liveliness -------------------------------------------------- */

/* Reveal `[data-reveal]` sections as they scroll into view. Driven by
   platform-reveal.js (IntersectionObserver), which works in every modern
   browser. The hidden start state is gated on `.js-reveal` (added by the
   script) so no-JS — and the reduced-motion / no-IntersectionObserver paths,
   where the script bails before adding the class — always render painted. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(2rem);
  }
  .js-reveal [data-reveal].in-view {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.6s var(--ease-out),
      transform 0.6s var(--ease-out);
  }
}
