/* ============================================================
   Console homepage. Loaded after style.css, which supplies the
   fonts and the site tokens (--bg, --text, --accent and friends).
   Every size on the desk is in cqi, a percent of the desk's own
   width, so the whole object scales as one piece; text is clamped
   so it never drops below legible on a small laptop.
   ============================================================ */

/* The same Archivo file style.css loads, declared again with its width
   axis open so the executor displays on a phone can run condensed.
   style.css pins Archivo to 100% wide on purpose; this name leaves
   that alone. */
@font-face {
  font-family: "Archivo Desk";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-variable.woff2") format("woff2");
}

:root {
  /* Desk hardware */
  --desk-body: #1c1d22;
  --desk-body-hi: #2a2b31;
  --desk-edge: #3a3b42;
  --desk-well: #121317;
  --desk-print: #8d8e98;
  --key-face: #2c2d33;
  --key-face-lo: #212227;
  --key-text: #d6d6dc;
  --key-shadow: #0b0b0e;
  --led: var(--accent);
  --led-rgb: var(--accent-rgb);

  /* Screens */
  --screen-bg: #07080b;
  --screen-bar: #171b25;
  --screen-line: rgba(255, 255, 255, 0.07);
  --screen-text: #dfe3ea;
  --screen-muted: #8a92a2;
  --cue-active: #26553a;
  --cue-active-text: #cdebd6;
  --cmd-ok: #9fd3ad;
  --cmd-err: #e39a8e;

  /* Pool appearances, one per section. Muted on purpose: the photos
     on the main screen carry the real colour, same rule as the site. */
  --app-work: #5ea4ad;

  /* Light colours for the row 1 tours. These ARE saturated: each one is
     the colour that tour's photos are lit in, and the rig behind the
     desk plays it when the fader comes up. */
  --lx-white: #eef0f4;
  --lx-orange: #ff7f1e;
  --lx-cto: #ffbd7a;
  --lx-magenta: #e93cd2;
  --lx-red: #f2302b;
  --lx-green: #2ee86a;
  --lx-blue: #2f55e6;
  --app-woh: var(--lx-white);
  --app-forever: var(--lx-orange);
  --app-australia: var(--lx-cto);
  --app-atreyu: var(--lx-magenta);
  --app-edm: var(--lx-red);

  --app-scratch: #88a978;
  --app-plugins: #7f93c8;
  --app-studio: #c4907f;
  --app-pixels: #c8b27a;
  --app-about: #a984a1;
  --app-contact: #e3dccb;
  --app-demo: #b48ad8;
  --app-lab: #6fc3c9;

  /* Color Picker Demo. Group outlines follow the System Builder's own
     appearances (mode green, saturation red, layer amber, clear red,
     Type grey, fade blue), lifted a little so they read on a dark
     screen. The rainbow marks fader 306. */
  --cbd-mode: #00ff80;
  --cbd-delay: #3d6bff;
  --cbd-sat: #ff3b30;
  --cbd-type: #8a8f9c;
  --cbd-layer: #ffbe00;
  --cbd-clear: #d23a3a;
  --cbd-fade: #78c8ff;
  --demo-rainbow: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #00ffff, #0082ff, #8000ff, #ff00ff);
  --demo-drop: clamp(120px, 26svh, 290px);

  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

@property --beam-color {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2e9d5;
}
/* One rig head's own colour, so a cue can lay a gradient across the
   truss. Registered so it fades with the rest of the rig. */
@property --bc {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2e9d5;
}
@property --v {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

body.console-page {
  background: var(--bg);
  height: 100svh;
  overflow: hidden;
  font-size: 1rem;
}

/* ---------- Scene ---------- */
.scene {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 14px;
}

.tagline {
  position: absolute;
  top: 18px; left: 22px;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  pointer-events: none;
}
.tagline strong { color: var(--text); font-weight: 700; }

.corner {
  position: absolute;
  top: 14px; right: 18px;
  z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.corner-link {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.corner-link:hover, .corner-link:focus-visible { color: var(--text); border-color: rgba(var(--accent-rgb), 0.4); }
.corner-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.corner-btn svg { width: 18px; height: 18px; }
.corner-btn .wave { display: none; }
.corner-btn[aria-pressed="true"] { color: var(--text); }
.corner-btn[aria-pressed="true"] .wave { display: inline; }
.corner-btn[aria-pressed="true"] .mute { display: none; }

/* ---------- Rig: truss, beams, haze behind the desk ---------- */
.rig {
  --gm: 1;
  --haze: 0.55;
  --beam-color: var(--accent);
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: --beam-color 0.9s ease;
}
.truss {
  position: absolute;
  top: 0; left: 4%; right: 4%;
  height: 14px;
  background:
    repeating-linear-gradient(60deg, transparent 0 9px, #26272d 9px 11px),
    repeating-linear-gradient(-60deg, transparent 0 9px, #26272d 9px 11px);
  border-top: 2px solid #2d2e35;
  border-bottom: 2px solid #2d2e35;
  opacity: 0.8;
}
.beams { position: absolute; inset: 0; }
.beam {
  position: absolute;
  top: 12px;
  width: 22vw;
  height: 130vh;
  margin-left: -11vw;
  transform-origin: 50% 0;
  --bc: var(--beam-color);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bc) 90%, white) 0%,
    color-mix(in srgb, var(--bc) 55%, transparent) 30%,
    transparent 78%);
  clip-path: polygon(48.5% 0, 51.5% 0, 100% 100%, 0 100%);
  filter: blur(5px);
  mix-blend-mode: screen;
  opacity: calc(var(--gm) * var(--lvl, 1) * (0.12 + 0.5 * var(--haze)));
  transition: opacity 0.6s ease, --bc 0.9s ease;
}
.head {
  --bc: var(--beam-color);
  position: absolute;
  top: 6px;
  width: 16px; height: 12px;
  margin-left: -8px;
  border-radius: 3px 3px 6px 6px;
  background: #34353c;
  box-shadow: 0 6px 14px -2px color-mix(in srgb, var(--bc) calc(50% * var(--gm)), transparent);
  transition: --bc 0.9s ease;
}

/* Laser fan: the EDM cue swaps every other head for a spread of thin
   white lines. Each fan swings with the head it replaces. */
.laser {
  position: absolute;
  top: 12px;
  width: 0; height: 130vh;
  transform-origin: 50% 0;
  opacity: calc(var(--gm) * var(--on, 0) * (0.45 + 0.55 * var(--haze)));
  transition: opacity 0.6s ease;
  mix-blend-mode: screen;
}
.laser i {
  position: absolute;
  top: 0; left: -1px;
  width: 2px; height: 100%;
  transform-origin: 50% 0;
  transform: rotate(var(--a));
  background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0.75) 25%, rgba(255, 255, 255, 0.25) 60%, transparent 85%);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
}
.haze {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 30%, color-mix(in srgb, var(--beam-color) 18%, transparent), transparent 70%);
  opacity: calc(var(--haze) * var(--gm) * 0.8);
  transition: opacity 0.4s ease;
}

/* ---------- Power hint (first visit only) ---------- */
.power-hint {
  position: absolute;
  z-index: 4;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  text-shadow: 0 2px 16px #000;
  pointer-events: none;
  animation: hint-pulse 2.2s ease-in-out infinite;
}
.power-hint-sub { font-size: 14px; color: var(--muted); }
.power-hint[hidden] { display: none; }
@keyframes hint-pulse { 50% { opacity: 0.55; } }

/* ---------- The desk ---------- */
.console-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%, calc((100svh - 72px) * 1.29));
  perspective: 2200px;
  perspective-origin: 50% 0%;
}
.console {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1cqi;
  padding: 1.8cqi 1.8cqi 1.3cqi;
  border-radius: 1.4cqi 1.4cqi 0.8cqi 0.8cqi;
  background:
    linear-gradient(to bottom, var(--desk-body-hi), var(--desk-body) 18%, var(--desk-body) 82%, #17181c);
  border: 1px solid var(--desk-edge);
  box-shadow:
    0 0 0 0.35cqi #101115,
    0 3cqi 6cqi -1cqi rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: rotateX(7deg);
  transform-origin: 50% 100%;
}
.console.is-off { cursor: pointer; }

/* ---------- Screens ---------- */
.deck-screens {
  display: grid;
  grid-template-columns: 2.35fr 1fr;
  gap: 1.3cqi;
  height: 29cqi;
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--screen-bg);
  border: 0.55cqi solid #0c0d10;
  border-radius: 0.6cqi;
  outline: 1px solid #2f3036;
  overflow: hidden;
  color: var(--screen-text);
  font-family: var(--font-body);
}
.screen-glass {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045) 0%, transparent 38%);
}
.console.is-off .screen > :not(.screen-glass) { visibility: hidden; }
/* The last beat of a shutdown: screens dim out before the desk goes dark. */
.screen > :not(.screen-glass) { transition: opacity 0.6s ease; }
.console.is-fading .screen > :not(.screen-glass) { opacity: 0; }

.screen-bar {
  flex: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1cqi;
  padding: 0 0.9cqi;
  height: max(22px, 2.3cqi);
  background: var(--screen-bar);
  border-bottom: 1px solid var(--screen-line);
  font-size: clamp(10.5px, 1.02cqi, 13px);
  color: var(--screen-muted);
  white-space: nowrap;
}
.screen-title { color: var(--screen-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.screen-meta { display: flex; gap: 1.2cqi; font-family: var(--font-mono); }

.screen-body {
  flex: 1;
  min-height: 0;
  position: relative;
  filter: brightness(var(--screen-bright, 1));
  transition: filter 0.3s ease;
}
.screen-foot {
  flex: none;
  display: flex; align-items: center; gap: 1.4cqi;
  padding: 0 0.9cqi;
  height: max(26px, 2.6cqi);
  border-top: 1px solid var(--screen-line);
  font-size: clamp(10.5px, 1cqi, 13px);
  color: var(--screen-muted);
  white-space: nowrap;
  overflow: hidden;
}
.screen-foot .count { margin-left: auto; font-family: var(--font-mono); }

/* ---------- Strip screen: the live cue's photos as a pool ----------
   It sits in the lower deck above the faders, where the encoders were,
   so it costs the desk no height. */
.screen-strip {
  flex: none;
  flex-direction: row;
  height: 7cqi;
  border-width: 0.4cqi;
}
.strip-title {
  flex: none;
  display: grid; place-items: center;
  width: max(18px, 1.8cqi);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--screen-bar);
  border-left: 1px solid var(--screen-line);
  font-family: var(--font-display);
  font-size: clamp(8.5px, 0.8cqi, 11px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--screen-muted);
}
.strip {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.4cqi;
  padding: 0.4cqi;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  filter: brightness(var(--screen-bright, 1));
  transition: filter 0.3s ease;
}
.strip::-webkit-scrollbar { display: none; }
.strip-tile {
  --app: var(--accent);
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 1.2;
  padding: 0;
  border: 1px solid #000;
  border-radius: 0.25cqi;
  overflow: hidden;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--app) 20%, #161922), #0d0f14);
  color: var(--screen-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.strip-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: opacity 0.2s ease;
}
.strip-tile:hover img, .strip-tile.is-on img { opacity: 1; }
.strip-tile .st-no {
  position: absolute; top: 0.35cqi; left: 0.45cqi;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.8cqi, 11px);
  color: var(--screen-text);
  text-shadow: 0 1px 2px #000;
}
.strip-tile .st-word {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(10px, 1.05cqi, 14px);
  color: var(--app);
}
.strip-tile .st-nm {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.7cqi 0.45cqi 0.35cqi;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.82));
  font-family: var(--font-display);
  font-size: clamp(9px, 0.85cqi, 12px);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.strip-tile::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 0.2cqi;
  background: var(--app);
  opacity: 0.85;
}
.strip-tile.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 1.2cqi -0.2cqi rgba(var(--accent-rgb), 0.5);
}
.strip-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hint-btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer;
}
.hint-btn:hover { color: var(--screen-text); }
/* The Please hint in the footer is the call to action, so it reads as one */
.hint-btn.primary {
  padding: 0.25em 0.75em 0.25em 0.3em;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  font-weight: 600;
}
.hint-btn.primary kbd { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); }
.hint-btn.primary:hover { background: rgba(var(--accent-rgb), 0.2); color: var(--accent); }
.is-link { cursor: pointer; }
.item-media.is-link:hover img { filter: brightness(1.12); }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.1em 0.45em;
  border-radius: 3px;
  background: #22252e;
  border: 1px solid #343846;
  color: var(--screen-text);
  font: 600 0.92em/1.3 var(--font-body);
  text-align: center;
}

/* Boot log */
.boot {
  height: 100%;
  padding: 1.4cqi 1.6cqi;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.15cqi, 15px);
  line-height: 1.6;
  color: var(--screen-text);
  white-space: pre-wrap;
  overflow: hidden;
}
.boot .dim { color: var(--screen-muted); }
.boot .ok { color: var(--cmd-ok); }
.boot .big { font-family: var(--font-display); font-weight: 700; font-size: 1.25em; color: var(--accent); }
.caret {
  display: inline-block; width: 0.55em; height: 1.05em;
  vertical-align: -0.15em;
  background: var(--screen-text);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Home: the pool */
.home {
  height: 100%;
  display: flex; flex-direction: column;
  padding: 1.2cqi 1.4cqi;
  gap: 1cqi;
}
.home-intro h1 {
  font-size: clamp(16px, 2.2cqi, 28px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.home-intro p { font-size: clamp(11px, 1.1cqi, 14.5px); color: var(--screen-muted); line-height: 1.4; margin-top: 0.3em; }
.pool {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.8cqi;
}
.pool-tile {
  --app: var(--accent);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 0.6cqi 0.8cqi 0.9cqi;
  min-height: 0;
  background: linear-gradient(to bottom, #161922, #11131a);
  border: 1px solid #2a2e3a;
  border-radius: 0.4cqi;
  color: var(--screen-text);
  font: 600 clamp(11px, 1.15cqi, 15px)/1.2 var(--font-display);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}
.pool-tile::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.45cqi;
  background: var(--app);
}
.pool-tile .pool-no {
  position: absolute; top: 0.4cqi; left: 0.6cqi;
  font: 500 clamp(9px, 0.85cqi, 11px) var(--font-mono);
  color: var(--screen-muted);
}
.pool-tile:hover { border-color: #444a5a; }
.pool-tile.is-sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 1.4cqi -0.2cqi rgba(var(--accent-rgb), 0.45);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--app) 22%, #161922), #11131a);
}
.pool-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Section item */
.item {
  height: 100%;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
}
.item-media {
  position: relative;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
.item-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: fade-in 0.35s ease;
}
.item-media.contain { background: #0d0f14; padding: 1cqi; }
.item-media.contain img { object-fit: contain; }
.item-media::after {
  /* a touch of scanline so the photo reads as "on a screen" */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.item-nav {
  position: absolute; top: 50%; z-index: 2;
  transform: translateY(-50%);
  width: max(28px, 2.6cqi); height: max(40px, 4.4cqi);
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  color: var(--screen-text);
  font-size: clamp(11px, 1.1cqi, 15px);
  cursor: pointer;
}
.item-nav:hover { background: rgba(0, 0, 0, 0.8); }
.item-nav.prev { left: 0; border-radius: 0 4px 4px 0; }
.item-nav.next { right: 0; border-radius: 4px 0 0 4px; }

.item-art {
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  background:
    radial-gradient(80% 80% at 50% 40%, color-mix(in srgb, var(--app) 22%, transparent), transparent 70%),
    #0b0d12;
  animation: fade-in 0.35s ease;
}
.item-art.grid-art {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(80% 80% at 50% 40%, color-mix(in srgb, var(--app) 22%, transparent), transparent 70%);
  background-size: 2.2cqi 2.2cqi, 2.2cqi 2.2cqi, auto;
  background-color: #0b0d12;
}
.art-word {
  font: 900 clamp(22px, 4.2cqi, 54px)/1 var(--font-display);
  color: var(--app);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0 1cqi;
  overflow-wrap: anywhere;
}
.art-word.small { font-size: clamp(15px, 2.1cqi, 28px); font-weight: 700; }
/* Contact: Instagram on the art side (2026-11-06), its own link. */
.ig-art { align-content: center; gap: 1.1cqi; text-decoration: none; cursor: pointer; }
.ig-art svg {
  width: clamp(48px, 7cqi, 96px); height: auto;
  fill: none; stroke: var(--app); stroke-width: 1.8;
  filter: drop-shadow(0 0 1.2cqi color-mix(in srgb, var(--app) 45%, transparent));
}
.ig-art svg .dot { fill: var(--app); stroke: none; }
.ig-art:hover svg, .ig-art:hover .art-word { filter: brightness(1.2); }
.item-email {
  display: inline-block;
  margin-top: 0.7em;
  font: 700 clamp(14px, 1.75cqi, 24px)/1.25 var(--font-display);
  color: var(--screen-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.item-email:hover { color: var(--app); }
/* A card's second way out (the Scratchpad's way into the Client Studio,
   since the Studio left fader 303 on 2026-11-10). */
.item-also {
  display: inline-block;
  margin-top: 0.9em;
  padding: 0.3em 0.75em;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  font: 600 clamp(11px, 1.05cqi, 14px)/1.3 var(--font-body);
  color: var(--screen-muted);
  text-decoration: none;
}
.item-also:hover, .item-also:focus-visible { color: var(--screen-text); border-color: var(--app); }
.px-face {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55cqi;
  width: 62%;
  max-width: 260px;
}
.px-face i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1d2029;
  box-shadow: inset 0 0 0 1px #2b2f3b;
}
.px-face i.on {
  background: var(--app);
  box-shadow: 0 0 1cqi color-mix(in srgb, var(--app) 70%, transparent);
}

.item-panel {
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 1.2cqi 1.4cqi;
  border-left: 1px solid var(--screen-line);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #343846 transparent;
}
.item-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5em;
  font: 500 clamp(9.5px, 0.9cqi, 12px)/1 var(--font-mono);
  color: var(--screen-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.item-tag::before {
  content: "";
  width: 0.9em; height: 0.9em; border-radius: 2px;
  background: var(--app);
}
.item-panel h2 {
  margin-top: 0.55em;
  font-size: clamp(15px, 1.9cqi, 25px);
  font-weight: 700;
  color: var(--screen-text);
}
.item-sub {
  margin-top: 0.4em;
  font-size: clamp(11px, 1.1cqi, 14.5px);
  color: var(--app);
  line-height: 1.4;
}
.item-body {
  margin-top: 0.8em;
  font-size: clamp(11px, 1.12cqi, 14.5px);
  line-height: 1.55;
  color: #c3c8d2;
}
.item-body + .item-body { margin-top: 0.6em; }
.dots { display: flex; gap: 0.45cqi; margin-top: auto; padding-top: 1cqi; }
.dots i { width: 0.7cqi; height: 0.7cqi; min-width: 6px; min-height: 6px; border-radius: 1px; background: #2c303c; }
.dots i.on { background: var(--app); }

/* Help */
.help {
  height: 100%;
  padding: 1.2cqi 1.6cqi;
  overflow-y: auto;
  font-size: clamp(11px, 1.08cqi, 14px);
  line-height: 1.5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.4cqi;
  align-content: start;
}
.help h2 { grid-column: 1 / -1; font-size: clamp(14px, 1.6cqi, 21px); color: var(--accent); margin-bottom: 0.5em; }
.help h3 { font: 600 0.95em var(--font-body); color: var(--screen-muted); margin: 0.6em 0 0.3em; text-transform: uppercase; letter-spacing: 0.06em; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25em 0.9em; }
.help dt { font-family: var(--font-mono); color: var(--screen-text); white-space: nowrap; }
.help dd { color: #b9bfca; }

@keyframes fade-in { from { opacity: 0; } }

/* Side screen: the cue list */
.cue-sheet {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: clamp(10.5px, 1.05cqi, 13.5px);
  filter: brightness(var(--screen-bright, 1));
  scrollbar-width: none;
}
.cue-row {
  display: grid;
  grid-template-columns: 3.2em 0.5em 1fr 2.2em;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  padding: 0.28em 0.8em;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--screen-line);
  color: var(--screen-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cue-row:hover { background: rgba(255, 255, 255, 0.03); }
.cue-row .no { font-family: var(--font-mono); color: var(--screen-muted); }
.cue-row .sw { width: 0.5em; height: 1em; border-radius: 1px; background: var(--app); }
.cue-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-row .ct { font-family: var(--font-mono); color: var(--screen-muted); text-align: right; }
.cue-row.is-active { background: var(--cue-active); color: var(--cue-active-text); }
.cue-row.is-active .no, .cue-row.is-active .ct { color: var(--cue-active-text); }
.cue-row.is-head { cursor: default; color: var(--screen-muted); font-size: 0.9em; background: #10131a; }
.cue-row.is-head:hover { background: #10131a; }
.side-status {
  flex: none;
  display: flex; justify-content: space-between;
  padding: 0.5em 0.8em;
  border-top: 1px solid var(--screen-line);
  font: clamp(10px, 0.95cqi, 12.5px) var(--font-mono);
  color: var(--screen-muted);
}
.side-status b { color: var(--screen-text); font-weight: 500; }
#pauseReadout { color: var(--cmd-err); }

/* ---------- Bottom strip: nameplate, command line, power ---------- */
.deck-bottom {
  display: flex; align-items: center; gap: 1.4cqi;
  padding: 0 0.4cqi;
}
.deck-bottom .cmdline { flex: 1; min-width: 0; }

.cmdline {
  display: flex; align-items: center; gap: 0.8cqi;
  height: max(30px, 3.3cqi);
  padding: 0 1cqi;
  background: var(--screen-bg);
  border: 0.3cqi solid #0c0d10;
  outline: 1px solid #2f3036;
  border-radius: 0.4cqi;
  font: clamp(11px, 1.12cqi, 14.5px) var(--font-mono);
}
.console.is-off .cmdline > * { visibility: hidden; }
.cmd-prompt { color: var(--accent); white-space: nowrap; }
.cmdline input {
  flex: 1 1 30%;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--screen-text);
  font: inherit;
  caret-color: var(--accent);
}
.cmdline input::placeholder { color: #4b5160; }
.cmd-feedback {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--screen-muted);
}
.cmd-feedback.ok { color: var(--cmd-ok); }
.cmd-feedback.err { color: var(--cmd-err); }

/* ---------- Lower deck ---------- */
.deck-lower {
  display: grid;
  grid-template-columns: 1fr 22cqi 5cqi;
  gap: 1.6cqi;
  height: 39cqi;
  padding: 1.1cqi 1.2cqi;
  background: var(--desk-well);
  border-radius: 0.6cqi;
  box-shadow: inset 0 0.25cqi 0.8cqi rgba(0, 0, 0, 0.6);
}
.deck-left { display: flex; flex-direction: column; gap: 1cqi; min-width: 0; }

/* Executors: two rows of six, the second row's last one a spare */
.exec-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1cqi;
}
.exec-row + .exec-row {
  padding-top: 1cqi;
  border-top: 1px solid #1f2025;
}
.exec-empty { opacity: 0.38; pointer-events: none; }
.exec-empty .fader-knob { bottom: 0; }
.exec {
  --app: var(--accent);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.6cqi;
  min-height: 0;
  min-width: 0;
}
.exec-display {
  display: flex; flex-direction: column;
  padding: 0.3cqi 0.5cqi 0.35cqi;
  background: #08090c;
  border: 1px solid #26272d;
  border-radius: 0.25cqi;
  border-bottom: 0.3cqi solid var(--app);
  font-size: clamp(9px, 0.85cqi, 11.5px);
  line-height: 1.2;
  overflow: hidden;
}
.console.is-off .exec-display > * { visibility: hidden; }
.exec-no { font-family: var(--font-mono); color: var(--screen-muted); font-size: 0.9em; }
.exec-name { color: var(--screen-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Faders, shared by executors and the Grand Master */
.fader {
  --v: 0;
  position: relative;
  min-height: 0;
  cursor: ns-resize;
  touch-action: none;
  transition: --v 0.7s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.fader.dragging { transition: none; }
.fader:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.fader-track {
  position: absolute;
  top: 0.8cqi; bottom: 0.8cqi; left: 50%;
  width: 0.45cqi; margin-left: -0.225cqi;
  background: #050506;
  border-radius: 1px;
  box-shadow: 0 0 0 1px #2a2b31;
  overflow: hidden;
}
.fader-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--v) * 100%);
  background: color-mix(in srgb, var(--app, var(--led)) 70%, transparent);
}
.fader-knob {
  position: absolute;
  left: 50%;
  bottom: calc(var(--v) * (100% - 1.6cqi));
  width: 3.1cqi; height: 1.6cqi;
  margin-left: -1.55cqi;
  border-radius: 0.25cqi;
  background: linear-gradient(to bottom, #55565e, #3a3b42 45%, #2b2c32 55%, #4a4b53);
  box-shadow: 0 0.25cqi 0.5cqi rgba(0, 0, 0, 0.8);
}
.fader-knob::after {
  content: "";
  position: absolute; left: 12%; right: 12%; top: 50%;
  height: 1px; background: #d7d7dc;
}

/* Keys */
.key {
  position: relative;
  display: grid; place-items: center;
  min-width: 0;
  padding: 0 0.3cqi;
  background: linear-gradient(to bottom, var(--key-face), var(--key-face-lo));
  border: 1px solid #3a3b42;
  border-radius: 0.35cqi;
  box-shadow: 0 0.3cqi 0 var(--key-shadow), 0 0.35cqi 0.6cqi rgba(0, 0, 0, 0.5);
  color: var(--key-text);
  font: 600 clamp(9px, 0.95cqi, 12.5px)/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.05s, box-shadow 0.05s, background 0.15s;
}
.key:hover { background: linear-gradient(to bottom, #34353c, #26272c); }
.key:active, .key.is-down {
  transform: translateY(0.25cqi);
  box-shadow: 0 0.05cqi 0 var(--key-shadow), 0 0.1cqi 0.3cqi rgba(0, 0, 0, 0.5);
}
.key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.key.is-lit {
  color: var(--ink-on-accent);
  background: linear-gradient(to bottom, var(--led), color-mix(in srgb, var(--led) 78%, black));
  box-shadow: 0 0.3cqi 0 var(--key-shadow), 0 0 1.2cqi rgba(var(--led-rgb), 0.45);
}
.key.arrow { font-size: clamp(9px, 1cqi, 13px); }
.exec-key { height: 2.3cqi; }
.exec.is-active .exec-key {
  color: var(--ink-on-accent);
  background: linear-gradient(to bottom, var(--app), color-mix(in srgb, var(--app) 70%, black));
  box-shadow: 0 0.3cqi 0 var(--key-shadow), 0 0 1.2cqi color-mix(in srgb, var(--app) 55%, transparent);
}

/* On the desk the executor key just says Go; the name lives on its
   little display above the fader. On a phone it is the other way. */
.exec-key .k-name { display: none; }

.deck-right { display: flex; flex-direction: column; gap: 1.2cqi; min-width: 0; }
.keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.8cqi;
}

/* Please: the biggest, brightest key on the desk, because it is the one
   that opens things. It breathes softly so the eye finds it. */
.key-please {
  flex: none;
  height: 9cqi;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5cqi;
  border: 1px solid rgba(var(--accent-rgb), 0.7);
  background: linear-gradient(to bottom, #3a3832, #24231f);
  color: var(--accent);
  box-shadow:
    0 0.3cqi 0 var(--key-shadow),
    0 0 1.6cqi rgba(var(--accent-rgb), 0.28),
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  animation: please-breathe 2.8s ease-in-out infinite;
}
.key-please:hover { background: linear-gradient(to bottom, #46433b, #2b2924); }
.please-word { font: 900 clamp(13px, 2cqi, 26px)/1 var(--font-display); letter-spacing: 0.08em; }
.please-sub {
  font: 500 clamp(9px, 0.95cqi, 12px)/1.1 var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  color: rgba(var(--accent-rgb), 0.75);
  max-width: 95%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@keyframes please-breathe {
  50% { box-shadow: 0 0.3cqi 0 var(--key-shadow), 0 0 2.6cqi rgba(var(--accent-rgb), 0.5), inset 0 0 0 1px rgba(var(--accent-rgb), 0.25); }
}
.console.is-off .key-please { animation: none; box-shadow: 0 0.3cqi 0 var(--key-shadow); }
.console.is-off .please-sub { visibility: hidden; }

.playback {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.8cqi;
  height: 5cqi;
}
.key-go { font-size: clamp(10px, 1.1cqi, 14px); }
.key-goplus { border-color: #4b4c54; }
.key[data-key="pause"].is-lit { color: var(--ink-on-accent); }

.deck-gm { display: flex; flex-direction: column; align-items: center; gap: 0.6cqi; min-height: 0; }
.fader-gm { flex: 1; width: 100%; --app: var(--led); }
.gm-label {
  font: 700 clamp(9px, 0.95cqi, 12px) var(--font-display);
  color: var(--desk-print);
  letter-spacing: 0.1em;
}

/* Nameplate + power */
.nameplate {
  flex: none;
  display: flex; align-items: center; gap: 0.5em;
  font: 700 clamp(10px, 1.05cqi, 13px) var(--font-display);
  letter-spacing: 0.35em;
  color: var(--desk-print);
  white-space: nowrap;
}
.nameplate span { color: var(--accent); letter-spacing: 0.2em; }
.power-key {
  flex: none;
  width: 1.5cqi; height: 1.5cqi;
  min-width: 14px; min-height: 14px;
  border-radius: 50%;
  border: 1px solid #45464e;
  background: #2a2b31;
  cursor: pointer;
  box-shadow: 0 0 0.8cqi rgba(var(--led-rgb), 0.55), inset 0 0 0 0.3cqi #1c1d22;
}
.console.is-off .power-key {
  background: #d36b5b;
  box-shadow: 0 0 1.2cqi rgba(211, 107, 91, 0.75);
  animation: hint-pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   Color Picker Demo (fader 306)
   ============================================================ */

/* The swinging rig fades out and the stage (round 13, .stage below)
   fades in over it; the desk takes its demo place under the stage. */
.console-wrap { transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.2, 1); }
.scene.is-demo .console-wrap { transform: translateY(var(--demo-drop)); }
.tagline { transition: opacity 0.5s ease; }
.scene.is-demo .tagline { opacity: 0; }
/* The corner buttons would sit on the stage right tower, so they step
   out while the demo is open; Esc brings them back. */
.corner { transition: opacity 0.4s ease, visibility 0s linear 0s; }
.scene.is-demo .corner { opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.rig .beams, .rig > .head { transition: opacity 0.6s ease; }
.rig.is-demo .beams, .rig.is-demo > .head { opacity: 0; }

/* Fader 306 */
.exec-demo .exec-display {
  position: relative;
  border-bottom: 1px solid #26272d;
  padding-bottom: 0.65cqi;
}
.exec-demo .exec-display::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.3cqi;
  background: var(--demo-rainbow);
}
.exec-demo .exec-name { font-size: 0.9em; letter-spacing: -0.01em; }
/* Fader 305, MAtricks Lab: a symmetric green > CTO > green gradient
   (Chris, 2026-11-10) instead of 306's rainbow. */
.exec-lab .exec-display::after { background: linear-gradient(90deg, var(--lx-green), var(--lx-cto), var(--lx-green)); }
/* Cue faders with a `bar` in CUES (console.js) wear the same kind of
   symmetric underline (2026-11-10): Scratchpad dark blue > CTO,
   Plugins its blue > white, Pixels orange > CTO. The strip sets --bar. */
.exec-bar .exec-display {
  position: relative;
  border-bottom: 1px solid #26272d;
  padding-bottom: calc(0.65cqi - 1px);   /* the 1px border, so the faders line up with a plain strip */
}
.exec-bar .exec-display::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.3cqi;
  background: var(--bar);
}

/* Side screen: the command log */
.cue-sheet[hidden], .demo-log[hidden] { display: none; }
.demo-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.3em 0.8em;
  font: clamp(9.5px, 0.86cqi, 12px)/1.4 var(--font-mono);
  filter: brightness(var(--screen-bright, 1));
  scrollbar-width: none;
}
.dl { padding: 0.25em 0; border-bottom: 1px solid var(--screen-line); color: var(--screen-text); }
.dl-cmd { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
.dl-note { display: block; color: var(--cmd-ok); }
.dl-macro .dl-cmd { color: var(--screen-muted); }
.dl-recall .dl-cmd { color: var(--cbd-layer); }

/* Main screen: the punt page. A 14 x 4 grid on the desk; every cell
   says where it sits with --dc / --dr (and --pc / --pr on a phone). */
.cbd {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0.5cqi;
  padding: 0.8cqi 0.9cqi;
  animation: fade-in 0.3s ease;
}
.cbd > *, .cbd-types > * { grid-column: var(--dc); grid-row: var(--dr); min-width: 0; min-height: 0; }
/* The Type row (round 10): a wrapper only on a desktop, where it is its
   own flex row; elsewhere its buttons sit in the picker's grid. */
.cbd-types { display: contents; }
.ro-hint { color: var(--accent); font-family: var(--font-body); }
.cbd-hint { display: none; }
.cbd .gs { margin-left: 0.55cqi; }
.cb {
  --g: var(--screen-muted);
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.12em;
  padding: 0.2cqi;
  background: #0b0c10;
  border: max(1.5px, 0.17cqi) solid var(--g);
  border-radius: 0.3cqi;
  color: var(--screen-text);
  font: 600 clamp(8px, 0.78cqi, 11px)/1.1 var(--font-display);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, box-shadow 0.15s;
}
.cb b { font-size: 1.3em; font-weight: 700; }
.cb small {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--screen-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cb:hover { background: color-mix(in srgb, var(--g) 16%, #0b0c10); }
.cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cb.on {
  background: color-mix(in srgb, var(--g) 70%, #000);
  color: #fff;
  box-shadow: 0 0 1.1cqi -0.3cqi var(--g);
}
.cb.on small { color: rgba(255, 255, 255, 0.82); }
.cb-fade { --g: var(--cbd-fade); }
.cb-fade b { font-size: 1.9em; }
.cb-mode { --g: var(--cbd-mode); }
.cb-mode b, .cb-layer b { font-size: 1.12em; letter-spacing: -0.01em; }
.cb-mode.on { background: color-mix(in srgb, var(--g) 55%, #000); }
.cb-delay { --g: var(--cbd-delay); }
.cb-sat { --g: var(--cbd-sat); }
.cb-layer { --g: var(--cbd-layer); }
.cb-layer.on { background: color-mix(in srgb, var(--g) 55%, #000); }
.cb-clear { --g: var(--cbd-clear); }
.cb-type { --g: var(--cbd-type); }
.cb svg {
  width: 58%; max-width: 30px; height: auto;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.cb-delay:not(.on) svg { color: var(--cbd-mode); }
.cb .mem {
  position: absolute; top: 0.35cqi; right: 0.35cqi;
  width: max(5px, 0.5cqi); height: max(5px, 0.5cqi);
  border-radius: 50%;
  background: var(--cbd-layer);
}
.cb-layer.on .mem { background: #fff; }
.cb-swatch {
  --g: var(--sw);
  justify-content: flex-end;
  padding-bottom: 0.3cqi;
  border-width: max(2px, 0.24cqi);
}
.cb-swatch span { font-size: 0.82em; font-weight: 500; color: var(--screen-muted); }
.cb-swatch:hover { background: color-mix(in srgb, var(--sw) 22%, #0b0c10); }
.cb-swatch.on { background: var(--sw); box-shadow: 0 0 1.4cqi -0.2cqi var(--sw); }
.cb-swatch.on span { color: #fff; text-shadow: 0 0 3px #000, 0 0 1px #000; }

.cbd-readout {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 0.3em;
  padding: 0.55cqi 0.75cqi;
  background: #0d1016;
  border: 1px solid #262a35;
  border-radius: 0.3cqi;
  font: clamp(9px, 0.82cqi, 11.5px)/1.3 var(--font-mono);
  color: var(--screen-muted);
}
.ro-top { display: flex; flex-wrap: wrap; gap: 0.3em 0.9em; }
.ro-big {
  font: 700 clamp(12px, 1.4cqi, 19px)/1.15 var(--font-display);
  color: var(--screen-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ro-mem { display: flex; gap: 0.4em; }
.ro-mem i {
  font-style: normal;
  padding: 0.05em 0.4em;
  border: 1px solid #2a2e3a;
  border-radius: 2px;
}
.ro-mem i.has { color: var(--cbd-layer); border-color: color-mix(in srgb, var(--cbd-layer) 45%, transparent); }
.ro-mem i.cur { background: #1b1f2a; color: var(--screen-text); }
.cbd-hint {
  align-self: center;
  padding: 0 0.3cqi;
  font-size: clamp(9.5px, 0.95cqi, 12.5px);
  line-height: 1.3;
  color: var(--accent);
}

.noscript {
  position: fixed; inset: auto 16px 16px;
  z-index: 10;
  padding: 16px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.noscript a { color: var(--accent); }

/* ---------- Short or narrow windows: drop the tilt ---------- */
@media (max-height: 640px), (max-width: 980px) {
  .console { transform: none; }
}

/* ---------- Phones and small tablets: stack the desk ---------- */
@media (max-width: 760px) {
  body.console-page { height: auto; overflow: auto; }
  .scene {
    height: auto;
    min-height: 100svh;
    display: block;
    padding: 86px 16px 16px;
  }
  .tagline { top: 12px; left: 16px; right: 140px; font-size: 13px; line-height: 1.35; }
  .tagline p:not(:first-child) { display: inline; margin-right: 0.3em; }
  .tagline p:first-child { margin-bottom: 1px; }
  .corner { top: 12px; right: 16px; gap: 8px; }
  .corner-link { font-size: 13px; padding: 6px 8px; }
  .power-hint { top: 34%; font-size: 17px; width: 90%; text-align: center; }

  .console-wrap { width: 100%; perspective: none; }
  .console {
    gap: 10px;
    padding: 10px 10px 8px;
    border-radius: 14px;
  }
  .deck-screens { display: block; height: auto; }
  .screen-main { height: min(72svh, 620px); min-height: 420px; border-width: 4px; border-radius: 6px; }
  .screen-side { display: none; }
  .screen-strip { height: 84px; border-width: 4px; border-radius: 6px; }
  .strip { gap: 5px; padding: 5px; }
  .strip-title { width: 18px; font-size: 9px; }
  .strip-tile { border-radius: 3px; }
  .strip-tile .st-no { font-size: 10px; top: 4px; left: 5px; }
  .strip-tile .st-nm { font-size: 10.5px; padding: 8px 5px 4px; }
  .strip-tile::after { height: 2px; }

  .screen-bar { font-size: 11.5px; padding: 0 10px; }
  .screen-foot { font-size: 11.5px; gap: 14px; padding: 0 10px; }

  .home { padding: 14px; gap: 12px; }
  .home-intro h1 { font-size: 22px; }
  .home-intro p { font-size: 13px; }
  .pool { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .pool-tile { font-size: 12.5px; border-radius: 5px; padding: 14px 6px 10px; }
  .pool-tile::after { height: 4px; }
  .pool-tile .pool-no { font-size: 10px; top: 5px; left: 7px; }

  .item { grid-template-columns: 1fr; grid-template-rows: 42% 1fr; }
  .item-panel { border-left: 0; border-top: 1px solid var(--screen-line); padding: 12px 14px; }
  .item-panel h2 { font-size: 18px; }
  .item-sub, .item-body { font-size: 13.5px; }
  .item-tag { font-size: 10.5px; }
  .dots { gap: 5px; padding-top: 12px; }
  .art-word { font-size: 30px; }
  .px-face { gap: 6px; width: 46%; }
  .help { grid-template-columns: 1fr; padding: 14px; font-size: 13px; }
  .help h2 { font-size: 18px; }
  .boot { padding: 14px; font-size: 12.5px; }

  .cmdline {
    flex-wrap: wrap;
    height: auto;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
    border-width: 3px;
    border-radius: 5px;
    gap: 2px 8px;
  }
  .cmd-feedback { display: none; }
  .cmdline.has-feedback .cmd-feedback { display: block; flex-basis: 100%; order: 3; font-size: 11.5px; }

  .deck-lower {
    display: flex; flex-direction: column;
    height: auto;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
  }
  /* The faders stay on a phone (2026-11-06, option A of
     mockups/mobile-faders.html): both rows of six, shrunk, each name on
     its little condensed display. A finger grabs a fader by its knob
     only, so the page still scrolls over the tracks; makeFader() in
     console.js turns a plain tap on a track into a throw. */
  .deck-gm { display: none; }
  .deck-left { gap: 8px; }
  .exec-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .exec-row + .exec-row { padding-top: 8px; }
  .exec { grid-template-rows: auto 112px auto; gap: 5px; }
  .exec-display {
    gap: 1px;
    padding: 3px;
    border-radius: 3px;
    border-bottom-width: 2px;
    font: 600 9.5px/1.08 "Archivo Desk", var(--font-display);
    font-stretch: 62%;
  }
  .exec-no { font-size: 8.5px; line-height: 1; }
  .exec-name, .exec-demo .exec-name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 3.24em;
    font-size: 1em;
    letter-spacing: 0;
    white-space: normal;
    text-overflow: clip;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  .exec.is-active .exec-display { background: color-mix(in srgb, var(--app) 16%, #08090c); }
  .exec-demo .exec-display, .exec-bar .exec-display { padding-bottom: 5px; }
  .exec-demo .exec-display::after, .exec-bar .exec-display::after { height: 2px; }
  .exec .fader { touch-action: pan-y; }
  .exec .fader-track { top: 9px; bottom: 9px; width: 5px; margin-left: -2.5px; }
  .exec .fader-knob {
    bottom: calc(var(--v) * (100% - 18px));
    width: 32px; height: 18px;
    margin-left: -16px;
    border-radius: 3px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
    touch-action: none;
  }
  /* A bigger target than the cap itself, for a thumb. */
  .exec .fader-knob::before { content: ""; position: absolute; inset: -9px -6px; }
  .exec.is-active .fader-knob::after { background: var(--app); box-shadow: 0 0 4px var(--app); }
  .exec-key {
    height: 30px;
    font-size: 10.5px;
    border-radius: 6px;
    box-shadow: 0 2px 0 var(--key-shadow);
    padding: 0 2px;
  }
  .keys { grid-template-rows: repeat(3, 46px); gap: 8px; }
  .playback { height: 48px; gap: 8px; }
  .key { font-size: 12px; border-radius: 6px; box-shadow: 0 2px 0 var(--key-shadow); }
  .key:active, .key.is-down { transform: translateY(2px); box-shadow: none; }
  .key.arrow { font-size: 13px; }
  .key-please { height: 64px; border-radius: 8px; }
  .please-word { font-size: 20px; }
  .please-sub { font-size: 12px; }

  .deck-bottom { flex-wrap: wrap; gap: 8px 10px; padding: 0; }
  .deck-bottom .cmdline { order: -1; flex-basis: 100%; }
  .nameplate { font-size: 11px; margin: 0 auto; padding-left: 26px; }
  .power-key { width: 16px; height: 16px; }
}

/* ---------- Color Picker Demo on a phone ---------- */
@media (max-width: 760px) {
  .cb-sat small { font-size: 0.66em; }
  .scene.is-demo .console-wrap { transform: none; }

  .cbd {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(9, minmax(0, 1fr));
    gap: 5px;
    padding: 8px;
  }
  .cbd > *, .cbd-types > * { grid-column: var(--pc); grid-row: var(--pr); }
  .cbd-hint { display: block; }
  .ro-hint { display: none; }
  .cbd .gs { margin-left: 0; }
  .cb { font-size: 9.5px; border-width: 1.5px; border-radius: 4px; padding: 2px; }
  .cb small { font-size: 0.74em; letter-spacing: 0; }
  .cb-fade b { font-size: 1.6em; }
  .cb-swatch span { font-size: 0.78em; }
  .cb .mem { top: 3px; right: 3px; }
  .cbd-readout { flex-direction: row; align-items: center; padding: 4px 8px; border-radius: 4px; font-size: 10.5px; }
  .ro-top { flex-wrap: nowrap; gap: 0 0.6em; }
  .ro-top span:not(:first-child), .ro-mem { display: none; }
  .ro-big { flex: 1; font-size: 13.5px; text-align: right; }
  .cbd-hint { font-size: 11.5px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .power-hint, .console.is-off .power-key, .caret, .key-please { animation: none; }
  .fader, .rig { transition: none; }
  .item-media img, .item-art { animation: none; }
  .console-wrap, .scene, .tagline, .corner, .rig .beams, .rig > .head, .stage { transition: none; }
  .cbd { animation: none; }
}

/* ============================================================
   The punt page under the Color Picker Demo (punt-demo.js)
   While the demo is open the lower deck gives way to one wide
   screen with the rest of the System Builder's punt page, and the
   desk is sized (fitDesk in color-demo.js) to sit whole under the
   stage band instead of sliding off the bottom.
   ============================================================ */
:root {
  /* The Builder's own category appearances, lifted to read on a dark
     screen like the --cbd-* set above. */
  --pb-pos: #3d73ff;
  --pb-cfx: #ff2fc0;
  --pb-mov: #00c850;
  --pb-zoom: #00c8c8;
  --pb-gobo: #ff8c00;
  --pb-prism: #dcdc00;
  --pb-frost: #9696ff;
  --pb-dform: #ffaa00;
  --pb-dpat: #00c8ff;
  --pb-axis: #c8c8c8;
  --pb-surprise: #ff00b4;
  --pb-offall: #ff2828;
}

.screen-punt[hidden] { display: none; }
.scene.is-demo .console-wrap { transform: none; }
.scene.is-demo .deck-lower { display: none; }
.scene.is-demo .deck-screens {
  height: var(--demo-screens-h, 50cqi);
  grid-template-rows: minmax(0, 1fr) var(--pb-h, 19cqi);
  row-gap: 1cqi;
}
/* Square picker buttons: fitDesk() sets --cell from the screen width. */
@media (min-width: 761px) {
  .scene.is-demo .cbd {
    grid-template-columns: repeat(14, var(--cell, minmax(0, 1fr)));
    grid-template-rows: repeat(3, var(--cell, minmax(0, 1fr))) var(--cell-type, minmax(0, 1.4fr));
    justify-content: center;
    align-content: center;
  }
  /* Types a size up from the picker: ten square units across the full
     width, All Types two of them (fitDesk() works out --cell-type). */
  .scene.is-demo .cbd-types {
    display: flex;
    justify-content: space-between;
    grid-column: 1 / -1;
    grid-row: 4;
  }
  .scene.is-demo .cbd-types .cb { flex: 0 0 var(--cell-type); font-size: clamp(9px, 0.95cqi, 13px); }
  .scene.is-demo .cbd-types .cb[data-v="0"] { flex-basis: calc(2 * var(--cell-type) + 0.5cqi); }
  .scene.is-demo .cbd-types .cb b { font-size: 1.6em; }
  .scene.is-demo .cbd-types .cb[data-v="0"] b { font-size: 1.35em; }
}
.scene.is-demo .screen-main { grid-column: 1; grid-row: 1; }
.scene.is-demo .screen-side { grid-column: 2; grid-row: 1; }
.screen-punt { grid-column: 1 / -1; grid-row: 2; }

.pb-page {
  height: 100%;
  display: grid;
  grid-template-columns: 4fr 2fr 3fr 4fr 4fr 2fr;
  gap: 1.1cqi;
  padding: 0.55cqi 0.9cqi 0.75cqi;
  filter: brightness(var(--screen-bright, 1));
  animation: fade-in 0.3s ease;
}
.pb-sec { display: flex; flex-direction: column; gap: 0.35cqi; min-width: 0; min-height: 0; }
.pb-title {
  padding-bottom: 0.25cqi;
  border-bottom: 1px solid var(--screen-line);
  font: 600 clamp(8px, 0.72cqi, 10px)/1.1 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--screen-muted);
}
.pb-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.45cqi;
}
.pb b { font-size: 1.08em; letter-spacing: -0.01em; }
.pb small { font-size: 0.68em; }
.pb-pos { --g: var(--pb-pos); }
.pb-cfx { --g: var(--pb-cfx); }
.pb-cfxc { --g: var(--sw); }
.pb-cfxc.on { background: var(--sw); }
.pb-cfxc.on b { text-shadow: 0 0 3px #000; }
.pb-mov { --g: var(--pb-mov); }
.pb-zoom { --g: var(--pb-zoom); }
.pb-gobo { --g: var(--pb-gobo); }
.pb-prism { --g: var(--pb-prism); }
.pb-frost { --g: var(--pb-frost); }
.pb-dform { --g: var(--pb-dform); }
.pb-dpat { --g: var(--pb-dpat); }
.pb-axis { --g: var(--pb-axis); }
.pb-temp { --g: var(--cbd-layer); }
.pb-surprise { --g: var(--pb-surprise); }
.pb-surprise b { font-size: 1.3em; }
.pb-offall { --g: var(--pb-offall); background: color-mix(in srgb, var(--pb-offall) 28%, #0b0c10); }

/* Phones: the punt page follows the picker down the page, in two
   columns of sections. */
@media (max-width: 760px) {
  .scene.is-demo .deck-screens { height: auto; }
  .screen-punt { margin-top: 8px; border-width: 4px; border-radius: 6px; }
  .pb-page { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 10px 8px; height: auto; }
  /* The four-wide sections take the full width; Position and Movement share a row. */
  .sec-dfx, .sec-cfx, .sec-beam { grid-column: 1 / -1; }
  .pb-title { font-size: 9.5px; padding-bottom: 3px; }
  .pb-grid { grid-template-rows: repeat(3, 40px); gap: 4px; }
  .pb { font-size: 9.5px; border-width: 1.5px; border-radius: 4px; padding: 1px; }
  .pb small { font-size: 0.72em; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pb-page { animation: none; }
}

/* Square picker buttons on a phone too (round 8): the main screen grows
   to fit instead of squeezing nine rows into a fixed height. All Types
   spans two rows and the readout and hint rows size to their text. */
@media (max-width: 760px) {
  .scene.is-demo .screen-main { height: auto; min-height: 0; }
  .scene.is-demo .screen-main .screen-body { flex: none; }
  .scene.is-demo .cbd { height: auto; grid-template-rows: repeat(7, auto) auto auto; }
  .scene.is-demo .cbd > .cb, .scene.is-demo .cbd-types > .cb:not([data-v="0"]) { aspect-ratio: 1; }
}


/* Round 10: the demo's Patreon and Close buttons live in the main
   screen's top bar (console.js puts them in #screenCue), so its footer
   goes, and the side screen drops the GM readout (and the whole status
   line unless Pause has something to say). */
.scene.is-demo .screen-main .screen-foot { display: none; }
.scene.is-demo #screenCue { display: flex; align-items: center; gap: 1.2cqi; font-family: var(--font-body); }
.scene.is-demo #screenCue .hint-btn.primary { padding-block: 0.1em; }
.scene.is-demo .side-gm { display: none; }
.scene.is-demo .side-status:has(#pauseReadout:empty) { display: none; }
/* Punt page help: three columns, packed to fit the picker's height. */
.help-punt { grid-template-columns: 1fr 1fr 1fr; font-size: clamp(10px, 0.9cqi, 12.5px); line-height: 1.35; padding: 0.9cqi 1.2cqi; }
.help-punt dt { white-space: normal; }
.help-punt h2 { margin-bottom: 0.2em; }
@media (max-width: 760px) {
  .help-punt { grid-template-columns: 1fr; }
  .scene.is-demo #screenCue kbd { display: none; }
  .scene.is-demo #clock { display: none; }
}

/* ============================================================
   Round 13 (PLAN-PUNT-STAGE.md): the stage.
   The whole stage is one opaque canvas (stage-gl.js) in .stage, a box
   above the desk: scenery, fixtures, beams, pools and lenses. No beam,
   glow or head is in the DOM any more. color-demo.js sizes the box to
   the gap above the desk; on a phone it is a sticky box at the top and
   the desk scrolls under it, so every press is seen.
   ============================================================ */
/* The home rig stops while the stage is up (rigSleep in console.js). */
.rig.is-asleep .beams, .rig.is-asleep > .head { display: none; }

.stage {
  position: absolute;
  z-index: 1;
  top: 0; left: 0; right: 0;
  height: 50svh;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.scene.is-demo .stage {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease 0.15s, visibility 0s;
}
.stage-canvas { display: block; width: 100%; height: 100%; }
/* The stage's lower edge melts into the page above the desk. */
.stage::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 18px;
  background: linear-gradient(transparent, var(--bg));
}

/* The command log as a HUD: the last five lines, small and see-through,
   in the stage's lower left corner. "auto" marks the idle show. */
.stage-hud {
  position: absolute;
  z-index: 1;
  left: 18px; bottom: 16px;
  max-width: min(46%, 560px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  font: 11px/1.4 var(--font-mono);
  color: var(--text);
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
  opacity: 0.7;
}
.stage-hud .hl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.55; }
.stage-hud .hl:last-child { opacity: 1; }
.stage-hud .hl-macro { color: var(--muted); }
.stage-hud .hl-recall { color: var(--cbd-layer); }
.hud-auto {
  margin-bottom: 4px;
  padding: 0 6px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The wing: on a wide window the desk is a low strip along the bottom,
   the picker and the punt page side by side across the full width
   (fitDesk in color-demo.js sets --wing-main, the picker screen's
   width, and the square --cell). It keeps the bezel, the nameplate and
   the command line, so it is still the console. */
.scene.is-wing .console-wrap { width: 100%; perspective: none; }
.scene.is-wing .console { transform: none; padding: 14px 18px 12px; gap: 12px; border-radius: 12px 12px 8px 8px; }
.scene.is-wing .deck-screens {
  grid-template-columns: var(--wing-main, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: var(--demo-screens-h);
  row-gap: 0;
}
.scene.is-wing .screen-side { display: none; }
.scene.is-wing .screen-punt { grid-column: 2; grid-row: 1; }
.scene.is-wing .deck-screens { column-gap: 12px; }
.scene.is-wing .screen { border-width: 5px; }
.scene.is-wing .cmdline { height: 34px; font-size: 13px; }
/* Spacing in px on the wing, which fitDesk mirrors (WING_GAP): the
   console is the full window wide here, so cqi spacing would balloon. */
.scene.is-wing .cbd { gap: 4px; padding: 7px 8px; }
.scene.is-wing .cbd .gs { margin-left: 5px; }
.scene.is-wing .cbd-types .cb[data-v="0"] { flex-basis: calc(2 * var(--cell-type) + 4px); }
/* The punt page folds into two bands of three sections, so its buttons
   keep a usable width beside a square-celled picker: DimmerFX,
   Position, Movement over ColorFX, Beam, Random. */
.scene.is-wing .pb-page {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 6px 8px 8px;
}
.scene.is-wing .sec-dfx, .scene.is-wing .sec-mov, .scene.is-wing .sec-cfx, .scene.is-wing .sec-beam { grid-column: span 4; }
.scene.is-wing .sec-pos, .scene.is-wing .sec-fx { grid-column: span 2; }
.scene.is-wing .pb-sec { gap: 3px; }
.scene.is-wing .pb-grid { gap: 4px; }
.scene.is-wing .pb-title { font-size: 9px; padding-bottom: 2px; }
.scene.is-wing .pb { font-size: 10px; padding: 1px; }
.scene.is-wing .cbd-readout { padding: 5px 8px; gap: 2px; font-size: 10px; }
.scene.is-wing .ro-big { font-size: 16px; }

/* Stage view: the wing slides down to one row of keys and the stage
   takes nearly the whole window. */
.stage-strip { display: none; }
.scene.is-stageview .deck-screens { display: none; }
.scene.is-stageview .stage-strip {
  display: flex; align-items: stretch; gap: 10px;
  height: 46px;
}
.stage-strip .cb { flex: 1 1 0; font-size: 12px; }
.stage-strip .cb b { font-size: 1.1em; }
.stage-strip .hint-btn { flex: none; padding: 0 6px; color: var(--screen-muted); font-size: 12.5px; }
.stage-strip .hint-btn:hover { color: var(--screen-text); }

@media (max-width: 760px) {
  .stage { display: none; }
  .scene.is-demo { padding-top: 0; }
  .scene.is-demo .stage {
    display: block;
    position: sticky;
    top: 0;
    z-index: 3;
    height: 34svh;
    margin: 0 -16px 10px;
  }
  .scene.is-demo.is-stageview .stage { height: 64svh; }
  .stage-hud { left: 10px; bottom: 9px; max-width: 78%; font-size: 9.5px; }
  .stage-hud .hl:nth-last-child(n+4) { display: none; }
  .scene.is-stageview .stage-strip { flex-wrap: wrap; height: auto; gap: 6px; }
  .stage-strip .cb { flex: 1 1 28%; height: 40px; font-size: 10.5px; }
  .stage-strip .hint-btn { flex-basis: 100%; justify-content: center; height: 30px; }
}

/* ============ Pixel Shapes on the desk (fader 304, 2026-11-06; 303 since 2026-11-10) ============
   Drawn by js/pixels-console.js, data in js/pixel-shapes.js. Round 2
   (same day, Chris's call): every shape on the main screen, the big lens
   on the side screen, the colours on the strip, and the 3x3 keys swapped
   for the four face keys plus Clear, Invert, All on and Back. The --px-*
   greys are a drawing of a fixture, not site chrome, so they are fixed on
   purpose; --lit is the swatch colour. */
:root {
  --px-housing: #2a303c;
  --px-lens: #1a1e27;
  --px-off: #394153;
  --lit: #ffcf7a;
}
.pxs .px-housing { fill: var(--px-housing); }
.pxs .px-lens { fill: var(--px-lens); }
.pxs .px { fill: var(--px-off); }
.pxs .px.on { fill: url(#pxLit); }
.pxs .px-glow { fill: var(--lit); opacity: 0.55; filter: url(#pxBlur); pointer-events: none; }
.px-stop { stop-color: var(--lit); }
.ic-shadow { fill: #000; opacity: 0.35; }
.ic-hi { fill: #fff; opacity: 0.18; }

/* Main screen: a scrolling grid of small lenses filling the whole body
   (no glow on these: dozens of blurred layers ran graphics memory out on
   the demo, round 12). Round 3: the cards are sized from the body HEIGHT
   so exactly two rows always fit; the category tabs live in the footer
   row and Esc in the title bar. .pxc-lib is a size container, so inside
   it cqh/cqi mean the library box, not the desk: the grid uses px. */
.pxc-lib { height: 100%; min-height: 0; container-type: size; }
.pxc-tabs {
  flex: 1;
  min-width: 0;
  display: flex; align-items: center;
  gap: 0.4cqi;
  overflow-x: auto;
  scrollbar-width: none;
}
.pxc-tabs::-webkit-scrollbar { display: none; }
.pxc-tab {
  flex: none;
  display: inline-flex; align-items: baseline; gap: 0.55em;
  padding: 0.3em 0.75em;
  background: #10131a;
  border: 1px solid var(--screen-line);
  border-radius: 3px;
  color: var(--screen-muted);
  font: 600 clamp(9.5px, 0.88cqi, 12px)/1 var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.pxc-tab span { font: 500 0.85em var(--font-mono); opacity: 0.75; }
.pxc-tab:hover { color: var(--screen-text); }
.pxc-tab[aria-pressed="true"] { background: var(--cue-active); border-color: transparent; color: var(--cue-active-text); }
.pxc-grid {
  --pad: 7px;
  --gap: 6px;
  --label: 13px;                                            /* one line of card name */
  --row: calc((100cqh - 2 * var(--pad) - var(--gap)) / 2);  /* two rows, exactly */
  --lens: calc(var(--row) - var(--label) - 12px);           /* minus name, padding, gap */
  height: 100%;
  overflow-y: auto;
  display: grid;
  grid-auto-rows: var(--row);
  grid-template-columns: repeat(auto-fill, minmax(max(56px, calc(var(--lens) + 10px)), 1fr));
  align-content: start;
  gap: var(--gap);
  padding: var(--pad);
  scroll-padding: var(--pad);
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
  scrollbar-color: #343846 transparent;
}
.pxc-card {
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 3px;
  background: #0d0f14;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  color: var(--screen-muted);
  font: 600 11px/var(--label) var(--font-display);
  cursor: pointer;
  scroll-snap-align: start;
}
.pxc-card svg { display: block; flex: none; height: var(--lens); width: auto; max-width: 100%; aspect-ratio: 1; }
.pxc-card span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pxc-card:hover { border-color: color-mix(in srgb, var(--app) 55%, transparent); color: var(--screen-text); }
.pxc-card.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--screen-text); }
.pxc-card:focus-visible, .pxc-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pxc-esc { font-family: var(--font-body); }
.pxc-esc[hidden] { display: none; }

/* Side screen: the lens you draw on, filling what the cue list had. */
.pxc-side {
  flex: 1;
  min-height: 0;
  display: flex; flex-direction: column; gap: 0.6cqi;
  padding: 0.8cqi 0.9cqi 0.6cqi;
  background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--lit) 9%, transparent), transparent 72%);
}
.pxc-side[hidden] { display: none; }
.pxc-big { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.pxc-big svg { display: block; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); }
.pxc-big .px { cursor: pointer; }
.pxc-big .px:focus { outline: none; }
.pxc-big .px:focus-visible { stroke: var(--accent); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .pxc-big .px { transition: fill 0.12s ease; }
}
.pxc-info { flex: none; display: flex; justify-content: space-between; align-items: baseline; gap: 0.6em; }
.pxc-name {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 clamp(13px, 1.45cqi, 19px)/1.1 var(--font-display);
  color: var(--screen-text);
}
.pxc-meta { flex: none; font: 500 clamp(10px, 0.95cqi, 12.5px) var(--font-mono); color: var(--app-pixels); }

/* Strip: the eight colours, each tile lit in its own colour. */
.pxc-col {
  aspect-ratio: 1.25;
  background: radial-gradient(65% 60% at 50% 40%, var(--sw), color-mix(in srgb, var(--sw) 40%, #0b0d12));
}

/* Keypad: the face keys and settings take the 3x3 block's place. */
.pxc-keys { display: none; }
.scene.is-pixels .keys:not(.pxc-keys) { display: none; }
.scene.is-pixels .pxc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.pxc-keys .key { font-size: clamp(8.5px, 0.85cqi, 11.5px); }
.pxc-facekey { padding: 0.2cqi; }
.pxc-facekey svg { display: block; height: 86%; width: auto; aspect-ratio: 1; max-width: 100%; }
.pxc-facekey.is-on {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--app-pixels) 55%, var(--key-face)), color-mix(in srgb, var(--app-pixels) 28%, var(--key-face-lo)));
  border-color: var(--app-pixels);
  box-shadow: 0 0.3cqi 0 var(--key-shadow), 0 0 1.1cqi color-mix(in srgb, var(--app-pixels) 45%, transparent);
}

/* Phone: the side screen is normally hidden, so while the cue is live it
   comes back ABOVE the main screen, lens first, shapes under it. */
@media (max-width: 760px) {
  .scene.is-pixels .deck-screens { display: flex; flex-direction: column; gap: 10px; }
  .scene.is-pixels .screen-side { display: flex; order: -1; height: min(50svh, 400px); border-width: 4px; border-radius: 6px; }
  /* The shapes screen shrinks to its two rows: a tall body would only
     blow each card up to one per row. */
  .scene.is-pixels .screen-main { height: auto; min-height: 0; }
  .scene.is-pixels .screen-main .screen-body { flex: none; height: 196px; }
  .scene.is-pixels .pxc-keys { grid-template-rows: repeat(2, 56px); gap: 8px; }
  .pxc-keys .key { font-size: 11px; }
  .pxc-tabs { gap: 6px; }
  .pxc-tab { padding: 4px 8px; font-size: 10.5px; }
  .pxc-side { padding: 10px 10px 8px; gap: 8px; }
  .pxc-name { font-size: 16px; }
  .pxc-meta { font-size: 11px; }
  .pxc-col { aspect-ratio: 1; }
}

/* ============ Matrix Lab (fader 305, 2026-11-10) ============
   PLAN-MATRICKS-PLAYGROUND.md. Drawn by js/matricks-play.js, maths in
   js/matricks-brain.js. The stage box is console.js's stageBox, shared
   with the Punt Page Demo: each toy draws in its own .stage-layer. The
   scene carries is-demo (the toy layout: lower deck hidden, stage up)
   and is-matrix (one row of screens, no punt page). */
.stage-layer { position: absolute; inset: 0; }
.stage-layer[hidden] { display: none; }

/* Fader 305 wears the toy rainbow like 306 (it shares .exec-demo). */

.scene.is-matrix .deck-screens { grid-template-rows: minmax(0, 1fr); }
.scene.is-matrix .side-status { display: none; }

/* The overlay: each head's selection number over the truss and its step
   colour as a chip under it, placed from the engine's projection. */
.mx-overlay { position: absolute; inset: 0; pointer-events: none; }
.mx-num {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 17px; margin: -9px 0 0 -11px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  background: rgba(5, 6, 9, 0.72);
  color: var(--screen-text);
  font: 600 10.5px/15px var(--font-mono);
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.2s;
}
.mx-num:hover { border-color: var(--app-lab); }
.mx-chip {
  position: absolute; left: 0; top: 0;
  width: 16px; height: 5px; margin: -2px 0 0 -8px;
  border-radius: 2px;
  background: var(--c, #fff);
  transition: opacity 0.2s, background 0.3s;
}
.mx-num.is-out, .mx-chip.is-out { opacity: 0.3; }

/* Main screen: the X fields on the left, recipes, stepping, the plain
   words and the commands on the right. */
.mx {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 0 clamp(10px, 1.6cqi, 22px);
  padding: clamp(6px, 0.9cqi, 12px) clamp(8px, 1.2cqi, 16px);
  font-size: clamp(10.5px, 1cqi, 13.5px);
  filter: brightness(var(--screen-bright, 1));
  animation: fade-in 0.3s ease;
}
.mx-fields { display: flex; flex-direction: column; gap: clamp(3px, 0.45cqi, 6px); min-height: 0; }
.mx-axis, .mx-title {
  font: 600 0.78em/1.1 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--screen-muted);
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--screen-line);
}
.mx-field {
  flex: 1 1 0;
  min-height: 0;
  max-height: 3.4em;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.3em minmax(5.6em, 1.1fr) 2.3em;
  align-items: stretch;
  gap: 0.35em;
}
.mx-lab { align-self: center; color: var(--screen-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-field.is-set .mx-lab { color: var(--screen-text); }
.mx-btn {
  min-width: 0;
  padding: 0.2em 0.4em;
  background: #0b0c10;
  border: 1px solid #2c2e36;
  border-radius: 4px;
  color: var(--screen-text);
  font: 600 1em/1.1 var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mx-btn:hover { border-color: var(--app-lab); }
.mx-btn:active { background: #15171d; }
.mx-pm { font-size: 1.15em; padding: 0; }
.mx-val { font-family: var(--font-mono); font-weight: 500; }
.mx-field.is-set .mx-val { border-color: color-mix(in srgb, var(--app-lab) 70%, transparent); color: var(--app-lab); }
.mx-input {
  width: 100%;
  padding: 0; border: 0; outline: 0;
  background: transparent;
  color: var(--screen-text);
  font: inherit;
  text-align: center;
}
.mx-val:has(.mx-input) { border-color: var(--app-lab); background: #10141a; }
/* The desk's corrected Phase To (0 thru 360 on 24 heads reads 345)
   beside the value as typed, which stays. */
.mx-val:has(.mx-fix) { display: flex; align-items: center; justify-content: center; gap: 0.45em; }
.mx-fix { font: 500 0.82em/1 var(--font-mono); color: var(--screen-muted); white-space: nowrap; }
.mx-fix::before { content: "\2192\00a0"; }
.mx-note { margin: 0.1em 0 0; font-size: 0.86em; color: var(--app-lab); }
.mx-note[hidden] { display: none; }

.mx-side { display: flex; flex-direction: column; gap: clamp(3px, 0.45cqi, 6px); min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.mx-recipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35em; }
.mx-recipe { padding-block: 0.75em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-recipe.is-on { border-color: var(--app-lab); color: var(--app-lab); background: color-mix(in srgb, var(--app-lab) 9%, #0b0c10); }
.mx-cmds {
  margin: 0;
  padding: 0.4em 0.6em;
  border-radius: 4px;
  background: #0b0c10;
  color: var(--screen-muted);
  font: 0.86em/1.45 var(--font-mono);
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Side screen: the fixture sheet. Rows in the same step share the chip
   colour; a row lights while its head is the one picked. */
.mx-sheet {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: clamp(10px, 0.98cqi, 13px);
  filter: brightness(var(--screen-bright, 1));
  scrollbar-width: thin;
}
.mx-sheet[hidden] { display: none; }
.mx-row {
  display: grid;
  grid-template-columns: 3em 3em minmax(0, 1fr) 5em;
  align-items: center;
  gap: 0.4em;
  padding: 0.2em 0.8em;
  border-bottom: 1px solid var(--screen-line);
  font-family: var(--font-mono);
  cursor: default;
}
.mx-row.is-head {
  position: sticky; top: 0; z-index: 1;
  background: var(--screen-bg);
  color: var(--screen-muted);
  font: 600 0.82em/1.6 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mx-row .mx-no { color: var(--screen-text); }
.mx-row > span:nth-child(2) { color: var(--screen-muted); }
.mx-st i { display: inline-block; width: 0.55em; height: 0.95em; margin-right: 0.5em; border-radius: 1px; background: var(--c); vertical-align: -0.12em; }
.mx-ph { text-align: right; }
.mx-row:not(.is-head):hover, .mx-row.is-on { background: color-mix(in srgb, var(--c) 15%, transparent); }
.mx-row.is-flash { animation: mx-flash 1.2s ease; }
@keyframes mx-flash { 0%, 30% { background: color-mix(in srgb, var(--c) 45%, transparent); } }
.help-mx dd { color: #b9bfca; }

/* Phones: the stage is the sticky box at the top (as the punt demo),
   the sheet folds to a strip of chips under it, and the fields stack in
   two columns. */
@media (max-width: 760px) {
  .scene.is-matrix .deck-screens { display: flex; flex-direction: column; gap: 8px; height: auto; }
  .scene.is-matrix .screen-side { display: flex; order: -1; height: auto; border-width: 4px; border-radius: 6px; }
  .scene.is-matrix .screen-main { height: auto; min-height: 0; }
  .scene.is-matrix .screen-main .screen-body { flex: none; }
  .mx-sheet { display: flex; gap: 4px; padding: 6px; overflow-x: auto; overflow-y: hidden; font-size: 10px; }
  .mx-row {
    flex: none;
    display: flex; flex-direction: column; align-items: center;
    width: 44px; gap: 1px; padding: 3px 2px;
    border: 1px solid #23252c; border-bottom: 3px solid var(--c);
    border-radius: 3px;
  }
  .mx-row.is-head, .mx-row > span:nth-child(2) { display: none; }
  .mx-st i { display: none; }
  .mx-ph { text-align: center; font-size: 9px; color: var(--screen-muted); }
  .mx { grid-template-columns: 1fr; gap: 10px; height: auto; padding: 10px 8px; font-size: 12px; }
  .mx-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .mx-axis, .mx-note { grid-column: 1 / -1; }
  .mx-field { grid-template-columns: 34px minmax(0, 1fr) 34px; grid-template-rows: auto 36px; max-height: none; gap: 3px; }
  .mx-lab { grid-column: 1 / -1; font-size: 11px; }
  .mx-side { overflow: visible; gap: 6px; }
  .mx-recipe { padding-block: 9px; }
  .mx-num { width: 16px; height: 14px; margin: -7px 0 0 -8px; font-size: 8.5px; line-height: 12px; }
  .mx-chip { width: 9px; height: 4px; margin-left: -4.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .mx { animation: none; }
  .mx-row.is-flash { animation: none; }
}
