/* THE COMMAND STATION · the showroom shell.
   Loaded AFTER showroom.css on purpose: it redefines what .on means for a
   station. Foundation/NJP tokens only — no new colour is invented here. */

/* ⛔⛔ THE STATION IS A FIXED HEIGHT AND EVERYTHING FITS INSIDE IT.
   First build measured the mounted mixer at 8,996 px tall, which turned the
   desk into a page you scroll for a minute. A real booth does not scroll:
   the panes are a fixed size and the CONTENT inside a pane scrolls. That is
   the whole difference between a cockpit and a document. */
.sh { position:relative; display:flex; flex-direction:column; gap:8px;
  margin:0 0 14px; height:min(90vh,940px); min-height:560px;
  /* ⛔ FULL BLEED. The station was 1,020 px inside a 1,440 px window
     because .block centres prose. A booth uses the whole desk; prose does
     not. No transform is used here on purpose — a transformed ancestor
     would make the fixed door position against IT instead of the screen. */
  /* ⛔ 100vw INCLUDES THE SCROLLBAR and 100% does not, so a full-bleed
     station is wider than the page by exactly the scrollbar and the whole
     document scrolls sideways. --sbw is measured in showroom-shell.js. */
  width:calc(100vw - var(--sbw, 0px));
  margin-left:calc(50% - 50vw + var(--sbw, 0px) / 2);
  padding:0 clamp(12px,2.2vw,30px); box-sizing:border-box; }

/* ── THE DOOR ───────────────────────────────────────────────────────────
   You do not land on a dashboard. You arrive outside a room, and you go in.
   ⛔ It sits OVER the station, never instead of it, so the boards mount
      underneath while the door is still shut. */
/* ⛔ FIXED, NOT ABSOLUTE. Absolute made the door 9,722 px tall — it covered
   the station and centred its card somewhere off the bottom of the screen.
   A door covers the VIEW, not the building. */
.sh__door { position:fixed; inset:0; z-index:90; display:grid;
  place-items:center; background:rgba(8,10,13,.95);
  backdrop-filter:blur(4px); }
.sh__door.is-open { opacity:0; pointer-events:none;
  transition:opacity .45s ease; }
.sh__doorcard { width:min(460px,88%); text-align:center;
  border:1px solid var(--rule,#2a3340); border-radius:12px;
  background:var(--bg-card,#141A21); padding:30px 26px 26px; }
.sh__doorplate { font:700 10px/1 'Courier New',monospace; letter-spacing:.22em;
  text-transform:uppercase; color:var(--gel,#C9A84C); }
.sh__doorcard h3 { margin:12px 0 6px; font:700 25px/1.15 'Segoe UI',sans-serif;
  color:var(--ink,#e7ecf2); }
.sh__doorcard p { margin:0 0 18px; font:400 13px/1.5 'Segoe UI',sans-serif;
  color:var(--ink-soft,#8c97a4); }
.sh__call { display:flex; justify-content:center; gap:22px; margin:0 0 20px;
  font:700 11px/1 'Courier New',monospace; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4); }
.sh__call b { display:block; margin-top:5px; font-size:15px;
  letter-spacing:.04em; color:var(--ink,#e7ecf2); }

/* ── THE BANDS ───────────────────────────────────────────────────────────
   ⛔ The bands SHARE the station's height. The layout buttons change the
      split between them and nothing else — the main pane in each band is
      always the big one, because that is what makes it a cockpit. The first
      build let "even" mean "all panes the same width", which cancelled
      is-main and produced three identical thumbnails and no main view. */
.sh__band { display:flex; gap:8px; align-items:stretch; min-height:0; }
.sh__world { flex:1 1 36%; }
.sh__desk { flex:1 1 56%; }
.sh[data-layout="world"] .sh__world { flex:1 1 62%; }
.sh[data-layout="world"] .sh__desk { flex:1 1 30%; }
.sh[data-layout="desk"] .sh__world { flex:1 1 20%; }
.sh[data-layout="desk"] .sh__desk { flex:1 1 72%; }

/* ══ THE TECH TABLE · three screens, and it is the DEFAULT ═══════════════
   Nathan, 13 Oct 2026: "I am sitting at my desk, and I have three screens
   in front of me, one in the middle, and two off to both sides... on the
   left screen I want my audio mixing board... My middle screen, I want my
   video switcher on the bottom half of the screen, and then the ability to
   put my 4 screen multiview right on top of that, and then for the screen
   on the right, I want my lighting board, and then a program and preview of
   the room."

   LEFT                    MIDDLE                 RIGHT
   receivers               multiview              program + room
   graphic EQ              video switcher         lighting board
   audio console

   ⛔⛔ display:contents ON THE BANDS, AND NOT ONE NODE MOVES.
      The screens live in .sh__world and the boards live in .sh__desk, so a
      three-column desk that interleaves them LOOKS like it needs the DOM
      rearranged. It does not. display:contents dissolves the two band
      wrappers for layout purposes only, which makes every screen and every
      board a direct grid item of .sh — and then grid-area puts each one
      where Nathan's hands expect it. The boards are still mounted exactly
      where they were mounted, which is the rule this whole file is built
      on: a board that gets re-parented loses the show the student is
      running.

   ⛔ Each column is its own screen, so the desk reads left-to-right as the
     real one does: audio under your left hand, video in front of you,
     lights under your right. That order is not a preference — it is ten
     years of Nathan's own table and it is what the curriculum teaches. */
.sh[data-layout="desk3"] { display:grid; gap:7px;
  /* ⛔ FOUR columns, not three. The right-hand screen carries TWO pictures
     side by side — program and the room — so it is two grid columns and the
     light board spans both of them. That is cheaper and safer than wrapping
     the two screens in a new container, which would have to be hidden in
     the other three layouts and would take both pictures with it. */
  /* ⛔ the LEFT column is the widest. The console is the widest surface on
     the desk by a long way — sixteen channel strips — and it is the one the
     operator's hands are on most of the night. The two right-hand pictures
     are the narrowest because they are things you LOOK at, not things you
     touch. */
  grid-template-columns:1.22fr 1fr 0.49fr 0.49fr;
  /* ⛔⛔ THE BOARD ROW IS THE BIGGEST ROW AND EVERY OTHER ROW IS A FRACTION,
     NOT auto. The first build made the EQ row `auto`, so it sized to its
     own content, pushed the whole bottom band off the station and left the
     three boards about 150 px tall — the consoles were there and unusable,
     which is the exact complaint ("almost zero functionality") this layout
     exists to answer. Hands live on the bottom row. It gets the height. */
  /* ⛔ The three rows are NOT equal and should not be. The receivers are a
     GLANCE — four lines, read in half a second — so they get the least. The
     EQ is a control surface with 31 sliders and an analyser behind them, so
     it gets enough to actually show a curve. The boards get the rest,
     because that is where the hands are. */
  grid-template-rows:auto minmax(68px,0.38fr) minmax(176px,0.86fr)
                     minmax(250px,1.85fr);
  grid-template-areas:
    "status status status status"
    "l-rx   m-mv   r-room r-pgm"
    "l-eq   m-mv   r-room r-pgm"
    "l-mix  m-sw   r-lb   r-lb"; }
.sh[data-layout="desk3"] .sh__band { display:contents; }
.sh[data-layout="desk3"] .sh__status { grid-area:status; }

/* ⛔ the four panes the tech table does not use are OUT of the grid, not
   display:none — they keep running, they keep their state, and they come
   straight back in the other three layouts. LEVELS in particular overlaps
   the graphic EQ, which is the redundancy Nathan called out: "I'm seeing a
   lot of redundancy." One of them belongs on the desk and it is the one
   with 31 bands and an analyser on it. */
.sh[data-layout="desk3"] .sh__screen[data-screen="lv"] { display:none; }

/* ⛔ THE RECEIVERS AND THE EQ ARE SCREENS, not a new kind of thing. Making
   them .sh__screen means they inherit every behaviour the other panes
   already have — promote on click, keyboard select, detach to a window, and
   a slot in the other three layouts — for no new code at all. A fifth pane
   type would have had to re-earn all of it. */
.sh[data-layout="desk3"] .sh__screen[data-screen="rx"] { grid-area:l-rx; }
.sh[data-layout="desk3"] .sh__screen[data-screen="eq"] { grid-area:l-eq; }
.sh[data-layout="desk3"] #srStation-sound { grid-area:l-mix; }
.sh[data-layout="desk3"] .sh__screen[data-screen="mv"] { grid-area:m-mv; }
.sh[data-layout="desk3"] #srStation-video { grid-area:m-sw; }
.sh[data-layout="desk3"] .sh__screen[data-screen="room"] { grid-area:r-room; }
.sh[data-layout="desk3"] .sh__screen[data-screen="pgm"] { grid-area:r-pgm; }
.sh[data-layout="desk3"] #srStation-lights { grid-area:r-lb; }
/* ⛔ the two pictures on the right screen are a PAIR and are labelled as
   one: the room is what your eye sees, program is what the camera sees, and
   the gap between them is lighting for camera. They sit side by side so
   that gap is visible in one glance instead of being a scroll. */
.sh[data-layout="desk3"] .sh__screen[data-screen="room"],
.sh[data-layout="desk3"] .sh__screen[data-screen="pgm"] {
  border-color:rgba(201,168,76,.3); }
/* ⛔ the rx/eq panes are handled once, unconditionally, further up — a
   layout-scoped copy of that rule is what left the floating EQ narrow. */
/* the running order tucks away rather than splitting the desk in half,
   which is what it did when it sat between two bands */
.sh[data-layout="desk3"] > .sr { display:none; }
/* ⛔⛔ ANY CHILD OF .sh WITH NO grid-area GETS AUTO-PLACED INTO AN IMPLICIT
   ROW. The desk note did exactly that and added a fifth row 120 px tall at
   the bottom of a station whose height is fixed — so every row above it was
   squeezed and the board row, the one that matters, lost the most. A grid
   with named areas still has to account for every item that is not in one. */
.sh[data-layout="desk3"] > .ftr-note { display:none; }

/* ⛔⛔ EVERY BOARD IS FULL SIZE AND EVERY BOARD TAKES THE MOUSE.
   Nathan: "I want the ability to use the mouse on the boards, Because a
   switcher is pushing buttons." In the two-band layouts only ONE board is
   .on and the other two are scaled to 18% behind a transparent click-
   catcher that selects them instead of operating them — correct there,
   fatal here. On the tech table all three are live at once, which is the
   entire point of one operator at three screens, so the scale is cancelled
   and the catcher is removed. */
.sh[data-layout="desk3"] .sh__board { flex:1 1 auto; cursor:default; }
.sh[data-layout="desk3"] .sh__board:not(.on) .sh__bdbody { overflow:auto;
  padding:8px; }
.sh[data-layout="desk3"] .sh__board:not(.on) .sh__bdbody > * {
  transform:none; width:auto; pointer-events:auto; }
.sh[data-layout="desk3"] .sh__bdclick { display:none; }
/* the board you are ON still gets the gold head, so you know which one has
   the keyboard — but none of them is dimmed */
.sh[data-layout="desk3"] .sh__screen { flex:1 1 auto; cursor:default; }

/* ══ A SURFACE MOUNTED IN A UNIT IS NOT ON ITS OWN PAGE ═══════════════════
   ⛔⛔⛔ THIS IS THE FAULT BEHIND "I ALMOST HAVE ZERO FUNCTIONALITY".
      desk.css centres the console against the VIEWPORT:

        .deskwrap { width:min(1240px, calc(100vw - 2rem));
                    position:relative; left:50%; transform:translateX(-50%) }

      Correct on /desk/, where the console IS the page and that rule makes it
      full-bleed. Fatal anywhere else: inside a 569 px column it computes a
      1,240 px box, shoves it right by half the COLUMN and then pulls it left
      by half of ITSELF — so roughly 380 px of channel strips sit permanently
      to the LEFT of the unit, at negative coordinates, unreachable at any
      scroll position because there is nothing there to scroll to. The
      transport, the first channels and the gain knobs were all in that
      380 px. They were rendered, they were mounted, they were alive, and
      they could not be clicked.
   ⛔ So inside the station a mounted surface is a PLAIN BLOCK and the unit it
     is in does the scrolling. The surface's own page is untouched. */
.sh .deskwrap { left:auto; transform:none; margin:0; }

/* ── the mixer switch. Two separate consoles, one at a time. ───────────── */
.sh__mxsel { display:flex; gap:3px; }
.sh__mxsel .sh__lbtn { padding:4px 8px; }
/* ⛔⛔ ONE CONSOLE IS ON THE DESK AT A TIME, and it is a class, not an
   unmount. Nathan: "build both mixers separate." The analog desk and the
   digital desk teach opposite halves of the same job and a student should
   be able to run the same show on either — but not on both at once, which
   is also true of the room: there is one PA. The hidden one keeps every
   knob where it was left. */
.sh__mx { display:none; }
.sh__mx.is-live { display:block; }

@media (max-width:1100px){
  /* ⛔ three screens need three screens. Below this the table folds into
     one column in the same reading order — receivers, EQ, console, then
     video, then the two pictures and lights — so nothing is lost and
     nothing is reordered. */
  .sh[data-layout="desk3"] { grid-template-columns:1fr;
    grid-template-rows:auto; height:auto; min-height:0;
    grid-template-areas:"status" "l-rx" "l-eq" "l-mix" "m-mv" "m-sw"
                        "r-room" "r-pgm" "r-lb"; }
  .sh[data-layout="desk3"] .sh__screen,
  .sh[data-layout="desk3"] .sh__board { min-height:190px; }
}

/* a screen. One is main, the other two are small and LIVE — not frozen
   thumbnails, because a cue firing on a screen you are not looking at is
   exactly the thing a student has to learn to catch. */
.sh__screen { position:relative; flex:0 0 16%; min-width:0;
  height:100%; min-height:0;
  display:flex; flex-direction:column; cursor:pointer;
  border:1px solid var(--rule,#2a3340); border-radius:8px; overflow:hidden;
  background:#05070a; transition:flex-basis .22s ease; }
.sh__screen.is-main { flex:1 1 auto; cursor:default; }
.sh__screen:focus-visible { outline:2px solid var(--gel,#C9A84C);
  outline-offset:2px; }
.sh__scrhead { display:flex; justify-content:space-between; align-items:center;
  gap:6px; padding:5px 8px; background:var(--bg-soft,#10151b);
  border-bottom:1px solid var(--rule,#2a3340);
  font:700 9px/1 'Courier New',monospace; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4); }
.sh__screen.is-main .sh__scrhead { color:var(--ink,#e7ecf2); }
.sh__scrbody { flex:1; position:relative; display:grid; place-items:center;
  min-height:0; }

/* ⛔⛔ A SCREEN THAT CARRIES A CONTROL SURFACE IS NOT A PICTURE.
   place-items:center is correct for a camera frame — the canvas keeps its
   aspect and sits in the middle of the pane. It is wrong for the receivers
   and the graphic EQ, because a centred GRID ITEM SHRINKS TO ITS CONTENT:
   the EQ chassis measured 759 px inside a 1,198 px pane and simply refused
   to grow, docked, floating or in its own window.
   ⛔ Unconditional, keyed on the pane, so it is true in every layout. It was
     first written three times — once scoped to the tech table, once to a
     windowed pane, and never for a floating one — which is how the floating
     EQ stayed narrow while the other two looked fixed. One rule. */
.sh__screen[data-screen="rx"] .sh__scrbody,
.sh__screen[data-screen="eq"] .sh__scrbody { display:block; overflow:auto;
  padding:8px; }

/* ⛔ the tally lamp is on the PROGRAM screen and it is red, because red means
   on air everywhere in this trade and inventing a colour here would teach a
   student the wrong reflex in a real room. */
.sh__tally { width:7px; height:7px; border-radius:50%;
  background:#3a4350; }
.sh__tally.is-live { background:#D64545; box-shadow:0 0 7px #D64545; }

/* ── THE DESK ──────────────────────────────────────────────────────────── */
.sh__desk { align-items:stretch; overflow:hidden; }

/* ⛔ .sr__station is display:none in showroom.css. Here all three are always
   present — minimised, not hidden — so the student can see all three boards
   at once, which is the whole point of a desk. Two classes beat one. */
.sh .sr__station { display:flex; }
/* ⛔⛔ height:100% AND min-height:0. Without them the board grew to its
   content — measured at 8,511 px — and dragged the band with it, which is
   the fixed-height station failing at the last hop. */
.sh__board { position:relative; flex:0 0 76px; min-width:0;
  height:100%; min-height:0;
  flex-direction:column; cursor:pointer;
  border:1px solid var(--rule,#2a3340); border-radius:8px;
  background:var(--bg-soft,#10151b); overflow:hidden;
  transition:flex-basis .22s ease; }
.sh__board.on { flex:1 1 auto; cursor:default;
  border-color:var(--gel,#C9A84C); }
.sh__bdhead { display:flex; justify-content:space-between; align-items:center;
  gap:8px; padding:7px 10px; border-bottom:1px solid var(--rule,#2a3340);
  font:700 9.5px/1 'Courier New',monospace; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4);
  white-space:nowrap; }
.sh__board.on .sh__bdhead { color:#17120a; background:var(--gel,#C9A84C); }
.sh__bdhead em { font-style:normal; opacity:.72; font-size:8.5px; }
/* ⛔ THE PANE IS FIXED, THE CONTENT SCROLLS. The mixer is nine thousand
   pixels tall when it mounts; a pane that grows to fit it is not a desk. */
.sh__bdbody { position:relative; flex:1; min-height:0; padding:8px;
  overflow:auto; }

/* ⛔⛔ A MINIMISED BOARD IS STILL MOUNTED AND STILL RUNNING. It is scaled and
   made unclickable, NOT unmounted — so no state is lost and no stray drag
   lands on a fader the student cannot see. The click-catcher on top selects
   the board instead. */
.sh__board:not(.on) .sh__bdbody { overflow:hidden; padding:5px; }
.sh__board:not(.on) .sh__bdbody > * { transform:scale(.18);
  transform-origin:0 0; width:555%; pointer-events:none; }
.sh__bdclick { position:absolute; inset:0; z-index:5; }
.sh__board.on .sh__bdclick { display:none; }

/* ── PLACEHOLDERS, until a venue is baked ──────────────────────────────── */
.sh__ph { width:100%; height:100%; min-height:120px; display:grid;
  place-items:center; text-align:center; padding:14px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 9px,
      transparent 9px 18px), #06080b; }
.sh__phlab { font:700 11px/1.3 'Courier New',monospace; letter-spacing:.18em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4); }
.sh__phsub { margin-top:7px; font:400 11.5px/1.45 'Segoe UI',sans-serif;
  color:#5d6873; max-width:30ch; }

/* ── THE RACK · a drawer, not a panel ──────────────────────────────────── */
.sh__rack { border:1px solid var(--rule,#2a3340); border-radius:8px;
  background:var(--bg-card,#141A21); overflow:hidden; }
.sh__rackhead { display:flex; justify-content:space-between; align-items:center;
  width:100%; padding:9px 12px; cursor:pointer; background:none; border:0;
  font:700 9.5px/1 'Courier New',monospace; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4); }
.sh__rackhead:hover { color:var(--ink,#e7ecf2); }
.sh__rackbody { display:none; padding:0 12px 12px; }
.sh__rack.is-open .sh__rackbody { display:grid; gap:9px;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

/* ── THE STATUS STRIP ──────────────────────────────────────────────────── */
.sh__status { display:flex; flex-wrap:wrap; align-items:center; gap:14px;
  padding:7px 11px; border:1px solid var(--rule,#2a3340); border-radius:7px;
  background:var(--bg-soft,#10151b);
  font:700 9.5px/1 'Courier New',monospace; letter-spacing:.13em;
  text-transform:uppercase; color:var(--ink-soft,#8c97a4); }
.sh__status b { color:var(--ink,#e7ecf2); letter-spacing:.05em; }
.sh__layout { margin-left:auto; display:flex; gap:4px; }
.sh__lbtn { cursor:pointer; border:1px solid var(--rule,#2a3340);
  border-radius:4px; background:transparent; color:var(--ink-soft,#8c97a4);
  padding:5px 9px; font:700 9px/1 'Courier New',monospace;
  letter-spacing:.13em; text-transform:uppercase; }
.sh__lbtn.on { background:var(--gel,#C9A84C); border-color:var(--gel,#C9A84C);
  color:#17120a; }

/* the running order sits between the bands and never grows */
.sh > .sr { flex:0 0 auto; max-height:112px; overflow:auto; }

/* ── THE KEYS, written down where the operator can see them ────────────── */
.sh__keys { display:flex; flex-wrap:wrap; gap:6px 16px; padding:8px 11px;
  font:400 11px/1.5 'Segoe UI',sans-serif; color:#5d6873; }
.sh__key { border:1px solid var(--rule,#2a3340); border-radius:3px;
  padding:1px 6px; margin-right:5px; font:700 10px/1.45 'Courier New',monospace;
  color:var(--ink-soft,#8c97a4); }

/* ── small screens: the bands stack, nothing is lost ───────────────────── */
@media (max-width:860px){
  .sh__band { flex-wrap:wrap; }
  .sh__screen { flex:1 1 30%; min-height:96px; }
  .sh__screen.is-main { flex:1 1 100%; min-height:190px; }
  .sh__board { flex:1 1 100%; }
  .sh__board:not(.on) .sh__bdbody { height:78px; }
}
