/* ==========================================================================
   Orchestra — THE DESK skin
   The site is a synth mixing console. Every project is a channel strip; the
   master bus is Nimbus; the arcade ship lives in a round oscilloscope; POWER
   is the coin slot. Two authored palettes: "studio at night" (dark, default)
   and "white-face" (light). Everything is CSS-drawn; system fonts only.
   Motion lives ONLY under html.powered and is removed by reduced-motion.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — dark ("studio at night") is the root palette
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark light;

  --display: "Avenir Next Condensed", Bahnschrift, "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --body-size: 17px;
  --body-lh: 1.55;
  --measure: 62ch;
  --wrap: 1180px;

  --panel: #14161A;
  --module: #1F2228;
  --module-2: #262A31;
  --well: #0B0C0E;
  --text: #E8E4DC;
  --muted: #A8A49C;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --hi: rgba(255, 255, 255, .10);          /* the 1px inset highlight on hardware */
  --shadow: rgba(0, 0, 0, .55);

  --amber: #FFB020;
  --amber-dim: #7A5410;
  --amber-glow: rgba(255, 176, 32, .55);
  --sig: #35D0E6;
  --sig-dim: #17606B;
  --sig-glow: rgba(53, 208, 230, .5);
  --peak: #FF4D6D;
  --peak-glow: rgba(255, 77, 109, .55);

  --focus: var(--amber);
  --link: var(--sig);
  --link-hover: var(--peak);

  --tape-bg: #0A0B0D;
  --tape-fg: #E8E4DC;
  --tape-hi: rgba(255, 255, 255, .14);
  --tape-amber-fg: var(--amber);

  --led-off: #2B2F36;
  --seg-off: #23272E;
  --knob-a: #3B4049;
  --knob-b: #171A1F;
  --cap-a: #3A3F48;
  --cap-b: #1C1F24;

  --scope-face-a: #0B2A30;
  --scope-face-b: #061417;
  --scope-face-c: #03090B;
  --scope-bezel: #2A2E35;
  --scope-bezel-2: #0D0F12;

  --code-bg: rgba(255, 255, 255, .08);
  --brush: rgba(255, 255, 255, .025);

  /* Widgets (base.css) wear the desk: module surfaces, amber accent, the
     signal-cyan well. Aliases, so white-face switches them for free. */
  --widget-mono: var(--mono);
  --widget-surface: var(--module);
  --widget-surface-2: var(--module-2);
  --widget-border: var(--line);
  --widget-border-strong: var(--line-strong);
  --widget-radius: 8px;
  --widget-control-radius: 3px;
  --widget-hi: var(--hi);
  --widget-shadow: var(--shadow);
  --widget-text: var(--text);
  --widget-muted: var(--muted);
  --widget-accent: var(--amber);
  --widget-accent-fg: #111;
  --widget-accent-glow: var(--amber-glow);
  --widget-hot: var(--peak);
  --widget-well: var(--well);
  --widget-well-fg: var(--sig);
  --widget-control: var(--tape-bg);
  --widget-marquee-bg: var(--tape-bg);
  --widget-marquee-fg: var(--tape-amber-fg);
}

/* Light ("white-face") — an authored palette, not an inversion. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --panel: #E6E7E3;
    --module: #F7F7F5;
    --module-2: #FFFFFF;
    --well: #D5D6D1;
    --text: #1A1B1E;
    --muted: #55585E;
    --line: rgba(0, 0, 0, .10);
    --line-strong: rgba(0, 0, 0, .20);
    --hi: rgba(255, 255, 255, .85);
    --shadow: rgba(20, 22, 26, .22);

    --amber: #C46A00;
    --amber-dim: #E3B27A;
    --amber-glow: rgba(196, 106, 0, .35);
    --sig: #0A7F8C;
    --sig-dim: #9CCBD1;
    --sig-glow: rgba(10, 127, 140, .35);
    --peak: #C5203F;
    --peak-glow: rgba(197, 32, 63, .35);

    --tape-bg: #FBFBF9;
    --tape-fg: #1A1B1E;
    --tape-hi: rgba(255, 255, 255, .9);
    --tape-amber-fg: var(--amber);

    --led-off: #C9CBC6;
    --seg-off: #D9DAD5;
    --knob-a: #FFFFFF;
    --knob-b: #C4C6C1;
    --cap-a: #FDFDFC;
    --cap-b: #B9BBB6;

    --scope-bezel: #C9CBC6;
    --scope-bezel-2: #9A9C97;

    --code-bg: rgba(0, 0, 0, .06);
    --brush: rgba(0, 0, 0, .025);
  }
}
:root[data-theme="light"] {
  --panel: #E6E7E3;
  --module: #F7F7F5;
  --module-2: #FFFFFF;
  --well: #D5D6D1;
  --text: #1A1B1E;
  --muted: #55585E;
  --line: rgba(0, 0, 0, .10);
  --line-strong: rgba(0, 0, 0, .20);
  --hi: rgba(255, 255, 255, .85);
  --shadow: rgba(20, 22, 26, .22);
  --amber: #C46A00;
  --amber-dim: #E3B27A;
  --amber-glow: rgba(196, 106, 0, .35);
  --sig: #0A7F8C;
  --sig-dim: #9CCBD1;
  --sig-glow: rgba(10, 127, 140, .35);
  --peak: #C5203F;
  --peak-glow: rgba(197, 32, 63, .35);
  --tape-bg: #FBFBF9;
  --tape-fg: #1A1B1E;
  --tape-hi: rgba(255, 255, 255, .9);
  --led-off: #C9CBC6;
  --seg-off: #D9DAD5;
  --knob-a: #FFFFFF;
  --knob-b: #C4C6C1;
  --cap-a: #FDFDFC;
  --cap-b: #B9BBB6;
  --scope-bezel: #C9CBC6;
  --scope-bezel-2: #9A9C97;
  --code-bg: rgba(0, 0, 0, .06);
  --brush: rgba(0, 0, 0, .025);
}

/* --------------------------------------------------------------------------
   2. Surfaces
   -------------------------------------------------------------------------- */
body.skin-desk {
  background:
    repeating-linear-gradient(0deg, var(--brush) 0 1px, transparent 1px 3px),
    radial-gradient(120% 80% at 50% -10%, var(--module) 0%, var(--panel) 60%);
  background-attachment: fixed;
}
.panel {
  background: linear-gradient(180deg, var(--module-2), var(--module));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--hi), 0 6px 18px -8px var(--shadow);
}

/* --------------------------------------------------------------------------
   3. Type
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: .98;
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--text);
}
.display--hero { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
.display__line { display: block; }
.display__line:nth-child(2) { color: var(--sig); }
.display__line:nth-child(3) { color: var(--amber); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.summary { font-size: 1.12rem; max-width: var(--measure); }

/* Label tape ("Dymo"): dark strip / light text at night; reversed on white-face.
   The 1px inset highlight makes it read embossed. */
.tape {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .72rem;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .32em .65em;
  color: var(--tape-fg);
  background: var(--tape-bg);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 var(--tape-hi), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 1px 1px var(--shadow);
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tape--amber { color: var(--tape-amber-fg); }
.tape--eyebrow { color: var(--tape-amber-fg); }
.tape--kicker { font-size: .66rem; }
.tape--instr { font-size: .7rem; line-height: 1.6; letter-spacing: .1em; color: var(--sig); padding: .6em .9em; }
.tape--hint { font-size: .62rem; color: var(--muted); }
.tape--wordmark { font-size: .8rem; letter-spacing: .18em; }
.tape--title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  letter-spacing: .06em;
  padding: .18em .5em;
  line-height: 1.05;
}
a.tape:hover, a.tape:focus-visible { color: var(--tape-amber-fg); }

/* --------------------------------------------------------------------------
   4. LEDs
   -------------------------------------------------------------------------- */
.led {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--led-off);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .25);
  vertical-align: middle;
  flex: none;
  transition: background-color .35s, box-shadow .35s;
}
.led.is-on, .led--amber.is-on { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
.powered .led--amber { background: var(--amber); box-shadow: 0 0 7px var(--amber-glow); }
.powered .led--sig   { background: var(--sig);   box-shadow: 0 0 7px var(--sig-glow); }

.led-strip {
  display: flex;
  gap: 8px;
  padding: 6px clamp(16px, 4vw, 40px) 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--well);
}
.led-strip .led { width: 7px; height: 7px; }
.powered .led-strip .led:nth-child(odd)  { background: var(--sig);   box-shadow: 0 0 6px var(--sig-glow); }
.powered .led-strip .led:nth-child(even) { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
.led-strip .led:nth-child(1)  { transition-delay: .00s; }
.led-strip .led:nth-child(2)  { transition-delay: .05s; }
.led-strip .led:nth-child(3)  { transition-delay: .10s; }
.led-strip .led:nth-child(4)  { transition-delay: .15s; }
.led-strip .led:nth-child(5)  { transition-delay: .20s; }
.led-strip .led:nth-child(6)  { transition-delay: .25s; }
.led-strip .led:nth-child(7)  { transition-delay: .30s; }
.led-strip .led:nth-child(8)  { transition-delay: .35s; }
.led-strip .led:nth-child(9)  { transition-delay: .40s; }
.led-strip .led:nth-child(10) { transition-delay: .45s; }
.led-strip .led:nth-child(11) { transition-delay: .50s; }
.led-strip .led:nth-child(12) { transition-delay: .55s; }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.console-head {
  background: linear-gradient(180deg, var(--module-2), var(--module));
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 0 var(--line);
}
.console-head__row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.console-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-inline-start: auto;
}
.tape--nav { display: inline-flex; align-items: center; gap: .5em; }
.tape--nav__ch { color: var(--muted); font-weight: 600; }
.tape--nav[aria-current="page"] { color: var(--tape-amber-fg); box-shadow: inset 0 1px 0 var(--tape-hi), 0 0 0 1px var(--amber-dim), 0 0 10px var(--amber-glow); }
.tape--nav[aria-current="page"] .tape--nav__ch { color: var(--tape-amber-fg); }

.power-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--module-2), var(--module));
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px var(--shadow);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.power-mini[aria-pressed="true"] { color: var(--text); border-color: var(--amber-dim); }

/* --------------------------------------------------------------------------
   6. Hero: scope + copy + POWER
   -------------------------------------------------------------------------- */
.hero { padding-block: clamp(28px, 6vw, 72px) clamp(20px, 4vw, 48px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.scope-well { display: grid; justify-items: center; gap: 12px; }

.scope {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, var(--scope-face-a) 0%, var(--scope-face-b) 58%, var(--scope-face-c) 100%);
  box-shadow:
    inset 0 0 44px rgba(0, 0, 0, .85),
    0 0 0 10px var(--scope-bezel),
    0 0 0 12px var(--scope-bezel-2),
    0 14px 34px var(--shadow);
  transition: box-shadow .8s ease;
}
.scope--small { width: 220px; max-width: 80vw; flex: none; }
.scope__grid {
  position: absolute;
  inset: 0;
  opacity: .55;
  background-image:
    linear-gradient(rgba(53, 208, 230, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 208, 230, .16) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center center;
  transition: opacity .8s ease;
}
.scope__grid::before, .scope__grid::after {
  content: "";
  position: absolute;
  background: rgba(53, 208, 230, .35);
}
.scope__grid::before { left: 0; right: 0; top: 50%; height: 1px; }
.scope__grid::after  { top: 0; bottom: 0; left: 50%; width: 1px; }
.scope__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  outline-offset: -4px;
  border-radius: 50%;
}
.powered .scope__canvas { cursor: crosshair; }
.scope__canvas:focus-visible { outline: 3px solid var(--amber); }
.scope__glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse 60% 40% at 30% 18%, rgba(255, 255, 255, .12), transparent 60%);
}
.scope__bezel {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .05), inset 0 -10px 24px rgba(0, 0, 0, .55);
}
.scope__flatline {
  position: absolute;
  left: 8%; right: 8%; top: 50%;
  height: 2px;
  background: var(--sig);
  box-shadow: 0 0 8px var(--sig-glow);
}
/* CRT bloom when powered */
.powered .scope {
  box-shadow:
    inset 0 0 44px rgba(0, 0, 0, .85),
    0 0 0 10px var(--scope-bezel),
    0 0 0 12px var(--scope-bezel-2),
    0 14px 34px var(--shadow),
    0 0 70px var(--sig-glow);
}
.powered .scope__grid { opacity: .9; }

.hero__copy { display: grid; gap: 18px; justify-items: start; }
.hero__thesis { max-width: var(--measure); font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 6px; }

/* POWER — the coin slot */
.power {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 10px 12px;
  border-radius: 999px;
  border: 2px solid var(--amber-dim);
  background: linear-gradient(180deg, var(--module-2), var(--module));
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  box-shadow: inset 0 1px 0 var(--hi), 0 3px 0 var(--shadow), 0 8px 18px -8px var(--shadow);
  transition: border-color .3s, box-shadow .3s, transform .1s;
}
.power:hover { border-color: var(--amber); }
.power:active { transform: translateY(2px); box-shadow: inset 0 1px 0 var(--hi), 0 1px 0 var(--shadow); }
.power:disabled { cursor: default; }
.power__ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 32%, var(--knob-a), var(--knob-b) 75%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 1px 0 var(--hi);
}
.power__led {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--amber-dim);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
  transition: background-color .35s, box-shadow .35s;
}
.power[aria-pressed="true"] .power__led,
.powered .power__led {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber-glow), 0 0 30px var(--amber-glow);
}
.power[aria-pressed="true"] { border-color: var(--amber); }
.power__text { display: grid; line-height: 1.05; }
.power__sub {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .6rem;
  letter-spacing: .16em;
  color: var(--muted);
}
.power[aria-pressed="true"] .power__sub { color: var(--amber); }

/* Tape buttons (links + buttons) */
.btn-tape {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tape-fg);
  background: var(--tape-bg);
  padding: .7em 1em;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 var(--tape-hi), 0 2px 0 var(--shadow);
  transition: transform .1s, color .2s, box-shadow .2s;
}
.btn-tape:hover { color: var(--tape-amber-fg); }
.btn-tape:active { transform: translateY(1px); box-shadow: inset 0 1px 0 var(--tape-hi), 0 1px 0 var(--shadow); }
.btn-tape--amber { color: var(--tape-amber-fg); border-color: var(--amber-dim); }
.btn-tape--amber:hover { color: var(--tape-fg); box-shadow: inset 0 1px 0 var(--tape-hi), 0 2px 0 var(--shadow), 0 0 12px var(--amber-glow); }

/* --------------------------------------------------------------------------
   7. Routing modules + nameplate (home)
   -------------------------------------------------------------------------- */
.routing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding-block: 10px 30px;
}
.module {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: start;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--module-2), var(--module));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--hi), 0 6px 18px -8px var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.module:hover { border-color: var(--sig-dim); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--sig-dim), 0 8px 24px -8px var(--shadow); }
.module__title { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .05em; line-height: 1.05; }
.module__meta { color: var(--muted); font-size: .95rem; }

.nameplate-row { padding-block: 8px 48px; }
.nameplate {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 var(--hi);
}
.nameplate--strip { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; padding: 8px 10px; margin-top: 8px; text-align: center; }

/* --------------------------------------------------------------------------
   8. The rack — buses, channel strips, knob, meter, fader, SOLO / MUTE
   -------------------------------------------------------------------------- */
.rack-head { display: grid; gap: 14px; justify-items: start; padding-block: clamp(24px, 5vw, 56px) 18px; }
.rack-head__lead { color: var(--muted); max-width: var(--measure); }

.rack { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-bottom: 64px; }
.bus {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, var(--module-2), var(--module));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 var(--hi), 0 10px 30px -14px var(--shadow);
}
.tape--bus { display: inline-flex; gap: .8em; align-items: baseline; margin-bottom: 14px; }
.tape--bus__n { color: var(--muted); font-weight: 600; }
.bus--master { border-color: var(--amber-dim); }
/* A bus holding a soloed strip takes the whole row so the strip can expand. */
.bus.has-solo, .bus:has(.strip.is-solo) { flex-basis: 100%; }

.bus__strips { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }

.strip {
  --fader-pos: 40%;
  --knob-rot: -40deg;
  position: relative;
  flex: 0 0 156px;
  width: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 14px;
  background: linear-gradient(180deg, var(--module), var(--panel));
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--hi), inset 0 -1px 0 rgba(0, 0, 0, .3);
  transition: opacity .3s, filter .3s, flex-basis .3s, box-shadow .3s;
}
.strip.is-featured { border-color: var(--line-strong); }
.strip__top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tape--ch { font-size: .6rem; }
.strip__label { width: 100%; text-align: center; font-size: 1rem; line-height: 1.2; }
.tape--label { display: block; white-space: normal; text-align: center; line-height: 1.35; font-size: .7rem; }
.strip__scribble {
  width: 100%;
  font-size: .82rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  min-height: 3.3em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Status → fader position (top = live) */
.status-live       { --fader-pos: 92%; }
.status-shipped    { --fader-pos: 76%; }
.status-beta,
.status-building   { --fader-pos: 50%; }
.status-on-hold,
.status-foundation { --fader-pos: 16%; }
.status-unknown    { --fader-pos: 40%; }
.strip--master     { --fader-pos: 96%; }

/* Knob rotation variety per position in a bus */
.bus__strips .strip:nth-child(3n + 1) { --knob-rot: -55deg; }
.bus__strips .strip:nth-child(3n + 2) { --knob-rot: 10deg; }
.bus__strips .strip:nth-child(3n + 3) { --knob-rot: 60deg; }

.strip__controls {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "knob knob" "meter fader";
  justify-content: center;
  align-items: end;
  column-gap: 14px;
  row-gap: 12px;
}
.knob {
  grid-area: knob;
  justify-self: center;
  position: relative;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--knob-a), var(--knob-b) 72%);
  box-shadow: 0 2px 5px var(--shadow), inset 0 1px 0 var(--hi);
  margin: 8px 0 2px;
}
.knob::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 225deg, var(--sig) 0deg 270deg, transparent 270deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%, #000 100%);
  mask: radial-gradient(circle, transparent 62%, #000 64%, #000 100%);
  opacity: .5;
}
.knob__cap {
  position: absolute;
  left: 50%; top: 5px;
  width: 3px; height: 14px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--amber);
  transform-origin: 50% 18px;
  transform: rotate(var(--knob-rot));
}

.meter {
  grid-area: meter;
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  width: 16px;
  height: 150px;
  padding: 4px 3px;
  background: var(--well);
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 1px 0 var(--hi);
}
.seg {
  --seg-color: var(--sig);
  --seg-glow: var(--sig-glow);
  flex: 1 1 0;
  min-height: 3px;
  border-radius: 1px;
  background: var(--seg-off);
  transition: background-color .25s, box-shadow .25s, opacity .25s;
}
.seg--hot  { --seg-color: var(--amber); --seg-glow: var(--amber-glow); }
.seg--peak { --seg-color: var(--peak);  --seg-glow: var(--peak-glow); }
.seg.on { background: var(--seg-color); }
.powered .seg.on { box-shadow: 0 0 6px var(--seg-glow); }
/* jump-settle stagger on power-on */
.seg:nth-child(1)  { transition-delay: .00s; }
.seg:nth-child(2)  { transition-delay: .03s; }
.seg:nth-child(3)  { transition-delay: .06s; }
.seg:nth-child(4)  { transition-delay: .09s; }
.seg:nth-child(5)  { transition-delay: .12s; }
.seg:nth-child(6)  { transition-delay: .15s; }
.seg:nth-child(7)  { transition-delay: .18s; }
.seg:nth-child(8)  { transition-delay: .21s; }
.seg:nth-child(9)  { transition-delay: .24s; }
.seg:nth-child(10) { transition-delay: .27s; }
.seg:nth-child(11) { transition-delay: .30s; }
.seg:nth-child(12) { transition-delay: .33s; }
.meter--inline {
  flex-direction: row;
  width: 160px;
  height: 16px;
  padding: 3px 4px;
  vertical-align: middle;
}
.meter--inline .seg { min-width: 4px; min-height: 0; }

.fader {
  grid-area: fader;
  position: relative;
  width: 28px;
  height: 150px;
}
.fader__track {
  position: absolute;
  left: 50%; top: 6px; bottom: 6px;
  width: 5px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: var(--well);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 1px 0 var(--hi);
}
.fader__cap {
  position: absolute;
  left: 50%;
  bottom: var(--fader-pos);
  width: 24px; height: 36px;
  transform: translate(-50%, 50%);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--cap-a), var(--cap-b));
  box-shadow: 0 2px 5px var(--shadow), inset 0 1px 0 var(--hi), inset 0 -1px 0 rgba(0, 0, 0, .4);
  transition: bottom .5s cubic-bezier(.2, .9, .3, 1.1);
}
.fader__cap::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--text);
  opacity: .8;
}
.strip--master .fader__cap::after { background: var(--amber); opacity: 1; }
.tape--status { font-size: .62rem; }
.status-live .tape--status,
.strip--master .tape--status { color: var(--sig); }
.status-beta .tape--status,
.status-building .tape--status { color: var(--tape-amber-fg); }
.status-on-hold .tape--status,
.status-foundation .tape--status { color: var(--muted); }

.strip__btns { display: flex; gap: 6px; }
.sbtn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .5em .8em;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--module-2), var(--module));
  color: var(--muted);
  box-shadow: inset 0 1px 0 var(--hi), 0 2px 0 var(--shadow);
  transition: color .2s, background-color .2s, box-shadow .2s, transform .1s;
}
.sbtn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 var(--hi), 0 1px 0 var(--shadow); }
.sbtn--solo[aria-pressed="true"] { color: #111; background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.sbtn--mute[aria-pressed="true"] { color: #fff; background: var(--peak); border-color: var(--peak); box-shadow: 0 0 10px var(--peak-glow); }

.strip__detail { width: 100%; display: grid; gap: 10px; }
.strip__summary { font-size: .95rem; }
.strip__links { display: flex; flex-wrap: wrap; gap: 8px; }
.strip__admin { margin-top: 2px; }

/* SOLO: the soloed strip expands (grid: controls left, detail right); the rest dim. */
.rack.has-solo .strip:not(.is-solo) { opacity: .38; filter: saturate(.25); }
.strip.is-solo {
  flex: 1 1 100%;
  width: auto;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  grid-template-areas:
    "top detail"
    "label detail"
    "scribble detail"
    "controls detail"
    "status detail"
    "btns detail"
    "admin detail"
    "plate detail";
  align-items: start;
  column-gap: 20px;
  border-color: var(--amber-dim);
  box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--amber-dim), 0 0 24px var(--amber-glow);
}
.strip.is-solo .strip__top { grid-area: top; }
.strip.is-solo .strip__label { grid-area: label; }
.strip.is-solo .strip__scribble { grid-area: scribble; }
.strip.is-solo .strip__controls { grid-area: controls; }
.strip.is-solo .tape--status { grid-area: status; justify-self: center; }
.strip.is-solo .strip__btns { grid-area: btns; justify-self: center; }
.strip.is-solo .strip__admin { grid-area: admin; justify-self: center; }
.strip.is-solo .nameplate--strip { grid-area: plate; }
.strip.is-solo .strip__detail { grid-area: detail; align-self: center; padding: 8px 4px; }
.strip.is-solo .strip__scribble { -webkit-line-clamp: unset; min-height: 0; }

/* MUTE: the strip folds — controls collapse, signal off. */
.strip.is-muted { opacity: .6; }
.strip.is-muted .strip__scribble,
.strip.is-muted .strip__controls,
.strip.is-muted .strip__detail { display: none; }
.strip.is-muted .tape--status { color: var(--peak); }

/* MASTER strip */
.strip--master { border-color: var(--amber-dim); background: linear-gradient(180deg, var(--module-2), var(--module)); }
.strip--master .knob::before { background: conic-gradient(from 225deg, var(--amber) 0deg 270deg, transparent 270deg 360deg); }

/* Meters breathe when powered (topmost lit segment) */
@keyframes desk-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes desk-flicker {
  0%, 92%, 100% { opacity: 1; }
  95% { opacity: .5; }
}
.powered .seg.on.top { animation: desk-breathe 2.4s ease-in-out infinite; }
.powered .seg.on.seg--peak { animation: desk-flicker 5s linear infinite; }
.powered .bus__strips .strip:nth-child(2n) .seg.on.top { animation-delay: -.8s; }
.powered .bus__strips .strip:nth-child(3n) .seg.on.top { animation-delay: -1.5s; }
.powered .strip.is-muted .seg.on { background: var(--seg-off); box-shadow: none; animation: none; }

/* --------------------------------------------------------------------------
   9. Channel edit view (one project)
   -------------------------------------------------------------------------- */
.channel-edit { padding-block: clamp(24px, 5vw, 56px) 48px; display: grid; gap: 28px; }
.channel-edit__head { display: grid; gap: 14px; justify-items: start; }
.channel-edit__grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.spec { padding: 18px; display: grid; gap: 16px; position: sticky; top: 16px; }
.spec__list { display: grid; gap: 10px; }
.spec__list > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.spec__list dt { font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec__list dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }

.channel-edit__body { display: grid; gap: 28px; }
.channel-edit__section { display: grid; gap: 14px; }
.prose { color: var(--text); }
.prose h2, .prose h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.25rem; color: var(--sig); }
.prose strong { color: var(--amber); font-weight: 700; }
.prose a { color: var(--sig); }
.prose a:hover { color: var(--peak); }

.diagram { padding: 18px; display: grid; gap: 12px; overflow-x: auto; }
.diagram__svg svg { width: 100%; height: auto; max-width: 100%; }
.channel-edit__foot { padding-top: 8px; }

/* --------------------------------------------------------------------------
   10. Patch bay (generic collection; OSS)
   -------------------------------------------------------------------------- */
.patchbay { list-style: none; padding: 0; margin: 0 0 56px; display: grid; gap: 10px; }
.patch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--module-2), var(--module));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--hi), 0 6px 18px -10px var(--shadow);
}
.jack {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--well) 0 32%, var(--knob-b) 34% 60%, var(--knob-a) 62% 100%);
  box-shadow: 0 1px 2px var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, .3);
}
.patch__main { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.patch__title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text); text-decoration: none; line-height: 1.1; }
.patch__title:hover { color: var(--sig); }
.patch__blurb { color: var(--muted); font-size: .95rem; }
.patch__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; font-family: var(--mono); font-size: .7rem; color: var(--muted); letter-spacing: .04em; }
.patch__ext { color: var(--sig); font-size: 1.1rem; text-decoration: none; padding: .2em .45em; border: 1px solid var(--line-strong); border-radius: 3px; }
.patch__ext:hover { color: var(--peak); border-color: var(--peak); }

.pill {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .14em;
  padding: .35em .6em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.pill--merged   { color: var(--sig);   border-color: var(--sig-dim); }
.pill--open     { color: var(--amber); border-color: var(--amber-dim); }
.pill--proposed,
.pill--planned  { color: var(--muted); }
.pill--closed   { color: var(--peak);  border-color: var(--peak); }

.pager { display: flex; align-items: center; gap: 14px; justify-content: center; padding-bottom: 48px; }

/* --------------------------------------------------------------------------
   11. Generic page (about / colophon / notes)
   -------------------------------------------------------------------------- */
.page { padding-block: clamp(24px, 5vw, 56px) 48px; display: grid; gap: 28px; }
.page__head { display: grid; gap: 14px; justify-items: start; }
.page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.page__grid:has(> .page__body:only-child) { grid-template-columns: minmax(0, 1fr); }
.page__body { font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   12. 404 — no signal
   -------------------------------------------------------------------------- */
.nosignal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: center; padding-block: clamp(32px, 8vw, 96px); }
.nosignal__copy { display: grid; gap: 16px; justify-items: start; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.console-foot {
  margin-top: 24px;
  background: linear-gradient(180deg, var(--module), var(--panel));
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi);
}
.console-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  padding-block: 32px 20px;
}
.console-foot__brand { display: grid; gap: 12px; justify-items: start; }
.console-foot__route { color: var(--muted); font-size: .92rem; max-width: 42ch; }
.foot-nav { display: grid; gap: 8px; align-content: start; }
.foot-nav a { color: var(--text); text-decoration: none; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.foot-nav a:hover { color: var(--sig); }
.skin-switch { display: grid; gap: 10px; align-content: start; }
.skin-switch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.skin-switch a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.skin-switch a:hover { color: var(--amber); }
.skin-switch a[aria-current="true"] { color: var(--amber); }
.foot-legal { padding-block: 8px 28px; }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .scope-well { justify-items: center; }
  .channel-edit__grid { grid-template-columns: minmax(0, 1fr); }
  .spec { position: static; }
  .page__grid { grid-template-columns: minmax(0, 1fr); }
  .console-foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nosignal { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .nosignal__copy { justify-items: center; }
}

/* DAW-portrait: the rack turns into horizontal rows — nothing lost. */
@media (max-width: 640px) {
  .console-head__row { gap: 12px; }
  .console-nav { margin-inline-start: 0; width: 100%; }
  .tape--nav { font-size: .64rem; padding: .35em .5em; }
  .power-mini { margin-inline-start: auto; }

  .scope { width: min(300px, 82vw); }
  .display--hero { font-size: clamp(2rem, 11vw, 2.8rem); }
  .power { width: 100%; justify-content: flex-start; }

  .bus { padding: 12px; }
  .bus__strips { flex-direction: column; gap: 10px; }
  .strip,
  .strip.is-solo {
    flex-basis: auto;
    width: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "top btns"
      "label label"
      "scribble scribble"
      "controls controls"
      "status status"
      "detail detail"
      "admin admin"
      "plate plate";
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    padding: 10px 12px;
  }
  .strip__top { grid-area: top; }
  .strip__label { grid-area: label; text-align: left; }
  .tape--label { display: inline-block; text-align: left; }
  .strip__scribble { grid-area: scribble; text-align: left; min-height: 0; -webkit-line-clamp: 2; }
  .strip__controls {
    grid-area: controls;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "knob meter fader";
    align-items: center;
    column-gap: 12px;
  }
  .knob { width: 34px; height: 34px; margin: 0; }
  .knob::before { inset: -5px; }
  .knob__cap { height: 10px; top: 4px; transform-origin: 50% 13px; }
  .meter { flex-direction: row; width: auto; height: 16px; padding: 3px 4px; }
  .seg { min-height: 0; min-width: 3px; }
  .fader { width: auto; height: 28px; }
  .fader__track { left: 6px; right: 6px; top: 50%; bottom: auto; width: auto; height: 5px; margin: -2.5px 0 0; }
  .fader__cap {
    left: var(--fader-pos);
    bottom: auto;
    top: 50%;
    width: 36px; height: 24px;
    transform: translate(-50%, -50%);
    transition: left .5s cubic-bezier(.2, .9, .3, 1.1);
  }
  .fader__cap::after { left: 50%; right: auto; top: 4px; bottom: 4px; width: 2px; height: auto; margin: 0 0 0 -1px; }
  .strip .tape--status, .strip.is-solo .tape--status { grid-area: status; justify-self: start; }
  .strip .strip__btns, .strip.is-solo .strip__btns { grid-area: btns; justify-self: end; }
  .strip .strip__detail, .strip.is-solo .strip__detail { grid-area: detail; padding: 4px 0 0; }
  .strip .strip__admin, .strip.is-solo .strip__admin { grid-area: admin; justify-self: start; }
  .nameplate--strip { grid-area: plate; text-align: left; }
  .strip.is-solo { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--amber-dim), 0 0 18px var(--amber-glow); }

  .patch { grid-template-columns: auto minmax(0, 1fr); }
  .patch__meta { grid-column: 2; justify-content: flex-start; }
  .console-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .spec__list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .meter--inline { width: 100%; max-width: 220px; }
}

@media (max-width: 400px) {
  .wrap { padding-inline: 14px; }
  .scope { width: min(260px, 80vw); }
  .strip__controls { column-gap: 8px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn-tape { width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   14b. Widgets on the desk — the cabinet marquee is a Dymo label, the coin
   prompt only blinks (and the marquee only glows) under POWER, like the rest
   of the console. Structure lives in base.css.
   -------------------------------------------------------------------------- */
.skin-desk .rx__marquee {
  font-size: .8rem;
  letter-spacing: .18em;
  box-shadow: inset 0 1px 0 var(--tape-hi), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 1px 1px var(--shadow);
}
.skin-desk .rx__coin { animation: none; opacity: .55; }
.powered .rx__coin { animation: widget-blink 1.2s steps(2, jump-none) infinite; opacity: 1; }
.powered .rx__marquee { box-shadow: inset 0 1px 0 var(--tape-hi), 0 0 14px var(--amber-glow); }
.skin-desk .pk__cmd { box-shadow: inset 0 2px 8px var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, .3); }

/* --------------------------------------------------------------------------
   15. Reduced motion — the desk is fully readable with zero motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .powered .seg.on.top,
  .powered .seg.on.seg--peak { animation: none; }
  .scope, .scope__grid, .led, .seg, .fader__cap, .power, .power__led, .strip { transition: none; }
}

/* --------------------------------------------------------------------------
   Meter bridge — the home stat strip (_stats.php / base.css .stats) as a row of
   console readouts: each figure sits in a dark readout well in amber mono
   (glowing once the desk is powered), captioned by a strip of label tape.
   -------------------------------------------------------------------------- */
.meter-bridge { margin-bottom: clamp(18px, 3vw, 32px); }
.meter-bridge .stats { gap: 10px; }
.meter-bridge .stat {
  gap: 10px;
  justify-items: start;
  padding: 14px 14px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--module-2), var(--module));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi), 0 8px 22px -12px var(--shadow);
}
.meter-bridge .stat__num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  letter-spacing: -.02em;
  color: var(--amber);
  transition: text-shadow .35s;
}
.powered .meter-bridge .stat__num { text-shadow: 0 0 12px var(--amber-glow); }
.meter-bridge .stat__label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .62rem;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .32em .65em;
  color: var(--tape-fg);
  background: var(--tape-bg);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 var(--tape-hi), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 1px 1px var(--shadow);
  max-width: 100%;
}
