/* ============================================================================
   NILLA WIDGETS — the one implementation
   ----------------------------------------------------------------------------
   Chapter 1, ONE WIDGET, ONE IMPLEMENTATION. Everything in this file is the
   approved design as ruled by Nili, August 13 and 14, 2026. A surface may hold a
   widget, size it, and feed it content. A surface may NOT restyle it.

   Every class here is prefixed nw- so a page's own CSS cannot reach in by
   accident. That prefix is the fence: if it starts with nw-, this file owns it.

   THE PROPORTION LAW. Sizes move, proportions do not. Every internal ratio is
   written in cqw, a share of the widget's own outer width, so padding and gap
   resolve against the SAME reference. The parent must therefore declare
   container-type:inline-size. Use .nw-wrap, or set it yourself.

   BRAND CONSTANTS never scale: radius 20 on a board, radius 10 on a pad, radius
   2 on anything sunken, 44px minimum target, and the two shadows.

   THE STACKING LAW. Widgets that sit on the same vertical line are the same
   outer width. Where two are JOINED, the corners at the seam square off on BOTH,
   a 2px hairline of paper runs between them, and the padding at the seam is
   halved on each side so the two together read as ONE padding, not two.
   ========================================================================== */

/* THE WIDGET OWNS ITS OWN BOX MODEL. It used to inherit box-sizing from
   whatever reset the host page happened to carry. Every demo in this repo has
   `*{box-sizing:border-box}` at the top, so this never showed here, and it would
   have broken silently on the first surface that did not: measured on a page
   with no reset, the board went content-box and its padding fell from the law's
   4.76% to 4.35%. A widget that only holds its proportions on pages that happen
   to be set up correctly is not a widget. */
.nw-wrap,.nw-wrap *,.nw-wrap *::before,.nw-wrap *::after,
.nw-board,.nw-pad,.nw-card,.nw-display,.nw-stage,.nw-screen,.nw-win{
 box-sizing:border-box !important}

.nw-wrap{container-type:inline-size;width:100%}
.nw-stack{display:flex;flex-direction:column}
.nw-stack.nw-joined{gap:2px}


/* ==============================  THE LOCK  ================================
   Below, every declaration that is LAW carries !important. Everything else does
   not. That split is the whole rule of this file:

     LAW           what a widget IS. The ratios, the brand constants, the press.
                   A host may not change these, and now cannot.
     NOT LAW       where a widget stands and how big it is: width, max-width,
                   margin, and the host's own layout around it. Untouched, so a
                   surface can still size a widget freely.

   This is not defensive style for its own sake. It is measured. A host page that
   declares its own rules on the same element the widget lives on beat the widget
   on 8 of 11 conformance checks, purely because its stylesheet came later in the
   cascade. Three of those breakages reached Nili as real bugs: pads with a 20px
   corner instead of 10, pads with no white and no lift, and a board that squared
   off its bottom with nothing to sit against. All three surfaces in this repo
   predate the widget and all three carry such rules.

   !important is the only thing in CSS that means "not negotiable", and a brand
   constant is exactly that. Run 07_surfaces/widgets/conformance.py to prove it.
   ========================================================================= */

/* ============================== GRID ======================================
   Four columns of square pads on a white surf board. Which pads are in it is
   content; everything below is the widget.
   board padding 4.76% of outer width · gap 2.86% · pad 20.48%
   Ch.5 law 12: always a white surf board, radius 20, floating shadow, on paper.
   Ch.5 law 9: every pad has two hardcoded artworks, unpressed and pressed.
   ========================================================================= */
.nw-board{display:grid !important;grid-template-columns:repeat(4,1fr) !important;
 padding:4.76cqw !important; gap:2.86cqw !important;
 background:#FFFFFF !important; border-radius:20px !important;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important;
 width:100%}
.nw-pad{position:relative;border:0 !important;padding:0 !important;background:#FFFFFF !important;border-radius:10px !important;
 cursor:pointer;aspect-ratio:1 !important;overflow:hidden !important;display:block;min-height:44px !important;
 box-shadow:0 3px 8px rgba(29,29,27,.20) !important;transition:box-shadow .12s ease}
.nw-pad img{width:100%!important;height:100%!important;display:block!important;
 object-fit:cover!important;border-radius:0!important;transform:none!important}
/* a glyph bank letting its artwork breathe inside the square, rather than a
   photographic face that IS the square */
.nw-pad.nw-glyph img{object-fit:contain!important}
/* THE PRESS. The lift collapses, the well appears OVER the artwork, the artwork
   swaps. 120ms. The well is an ::after overlay because an inset shadow on the
   pad itself paints UNDER full bleed artwork and is never seen. Artwork inset is
   ZERO; the margin lives in the file, per bank. */
.nw-pad::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
 transition:box-shadow .12s ease}
.nw-pad:active,.nw-pad.nw-down{box-shadow:none !important}
.nw-pad:active::after,.nw-pad.nw-down::after{box-shadow:inset 0 4px 10px rgba(29,29,27,.30) !important}
/* THE STUDIO MINDSET EXCEPTION. 0-3 only: the symbol carries its word, because a
   child who cannot read is being read TO. The label is content sitting in the
   pad, never a change to the pad. */
.nw-pad .nw-lab{position:absolute;left:0;right:0;bottom:0;font-size:13px;font-weight:800;
 letter-spacing:.1em;text-transform:uppercase;text-align:center;padding:3px 2px;
 color:rgba(29,29,27,.72);background:rgba(255,255,255,.86);pointer-events:none}

/* ============================== SCREEN ====================================
   The sunken square window: wave or frequencies, playhead, bars and beats.
   Square cornered and recessed, because radius belongs to things that FLOAT.
   ========================================================================= */
.nw-screen{position:relative;border-radius:2px !important;overflow:hidden;
 background:linear-gradient(180deg,#D6D4D6 0%,#E2E0E2 20%,#E8E6E8 100%);
 display:flex;flex-direction:column;
 height:30.7cqw;--nw-tint:3.88cqw;--nw-barh:5.2cqw}
/* THE GLASS EDGE IS ABOVE THE CONTENTS. An inset shadow on the screen itself
   paints under its children, so the bars-and-beats floor covered the bottom of
   the recess and the screen read as sunken at the top only. Same lesson as the
   pad well: a recess that must survive full bleed content is an OVERLAY. */
.nw-screen::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:7;
 border-radius:inherit;
 box-shadow:inset 0 4px 9px rgba(29,29,27,.30),
            inset 0 -1px 0 rgba(255,255,255,.85),
            inset 0 -2px 4px rgba(29,29,27,.07),
            inset 0 0 0 1px rgba(29,29,27,.12)}
/* NO FLOOR IN THE FREQUENCY VIEW, so the recess does the whole job itself. The
   bottom lip is only shared out when there is a floor to share it with. This is
   why WF and FQ are two tenants of one screen and not one drawing with a flag. */
/* A SAMPLE HAS NO BARS EITHER. One sound has no tempo to rule, and the ruler
   never guesses one, so a sample display shares the frequency view's floorless
   treatment rather than inventing a third. */
.nw-screen.nw-freq::after,.nw-screen.nw-sample::after{box-shadow:inset 0 4px 9px rgba(29,29,27,.30),
            inset 0 -1px 0 rgba(255,255,255,.85),
            inset 0 -5px 9px rgba(29,29,27,.20),
            inset 0 0 0 1px rgba(29,29,27,.12)}
/* the wave zone runs from the top of the screen down to the TOP OF THE FLOOR,
   and the wave's midline is the middle of that zone, which is what makes the bar
   ticks read as standing on something. */
.nw-scr-wave{position:absolute;left:0;right:0;top:0;bottom:var(--nw-tint)}
.nw-scr-wave canvas,.nw-scr-wave svg{position:absolute;inset:0;width:100%;height:100%}
/* THE FLOOR. A cool, light band with a big feather at its top, drawn in CSS so
   nothing shares an svg id. No dark line on top: the bars rise clear of it. */
.nw-scr-ruler{position:absolute;left:0;right:0;bottom:0;height:var(--nw-barh);
 background:linear-gradient(180deg,
   rgba(30,62,96,0)    25.4%,
   rgba(30,62,96,.035) 40%,
   rgba(30,62,96,.085) 56%,
   rgba(30,62,96,.125) 74%,
   rgba(30,62,96,.150) 88%,
   rgba(30,62,96,.158) 100%)}
/* a canvas has an intrinsic 300x150 and will happily overflow its box, so the
   floor's drawing surface is sized here the same way the svg one is */
.nw-scr-ruler svg,.nw-scr-ruler canvas{width:100%!important;height:100%!important;display:block}
.nw-screen.nw-freq .nw-scr-ruler,.nw-screen.nw-sample .nw-scr-ruler{display:none}
.nw-screen.nw-freq .nw-scr-wave,.nw-screen.nw-sample .nw-scr-wave{bottom:0}
/* the playhead runs OVER the bars and beats, not behind them. Ch.5 law 13.

   THE WHITE DOT WITH AN INK RIM, ruled by Nili on September 3 2026 and built on
   September 4. It was a red line with a red dot. Her words: the white dot wins,
   box-shadow 0 0 0 2px #1D1D1B, and it applies to DISPLAY as well as SONG CARD,
   so the two surfaces agree again. Red returns to meaning record and the primary
   CTA only, which closes the contradiction open since 19 July 2026 between ch.5
   rule 4 and ch.5 law 13.

   THIS IS THE SAME DOT THE SONG CARD ALREADY CARRIES, deliberately: one marker,
   one drawing, wherever a playhead appears. The LINE stays, because on a screen
   the playhead has to cross the bars and beats, but it is ink now rather than
   red. A red dot on a transport reads as record.

   ⚠ STILL OWED TO NILI: chapter 5 law 13 still says the playhead is a red dot.
   The amendment text is hers to write; the code now matches the ruling and not
   the chapter, which by the standing rule is a disagreement she has to close. */
.nw-ph{position:absolute;left:0;top:3%;bottom:calc(0px - var(--nw-tint));width:2px;
 background:#1D1D1B;z-index:6}
.nw-ph::before{content:"";position:absolute;left:50%;top:-6px;width:13px;height:13px;
 border-radius:50%;background:#FFFFFF;transform:translateX(-50%);
 box-shadow:0 0 0 2px #1D1D1B, 0 1px 3px rgba(29,29,27,.28)}
/* the two silhouettes that mark the ends of the frequency range. Both halos are
   the same light grey: a white core so the silhouette cuts out cleanly and a
   small grey spread past it, so nothing competes with the lines behind them. */
.nw-se{position:absolute;width:auto;z-index:5;opacity:.95}
.nw-se.nw-high{right:1.8%;top:6%;height:6.2cqw;
 filter:drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 3px rgba(163,160,156,.85))}
.nw-se.nw-low{left:1.8%;bottom:0;height:12.4cqw;
 filter:drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 3.5px rgba(163,160,156,.90))}

/* ============================== DISPLAY ===================================
   Holds exactly ONE screen, the song or sound name, the tickers, and
   optionally play, next and previous. Its own play/next/previous appear ONLY
   when no TRANSPORT BAR is on screen. One set of controls per screen, never two.
   ========================================================================= */
.nw-display{background:#FFFFFF !important;border-radius:20px !important;padding:4.76cqw !important;width:100%;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important}
/* THE LOGO SITS IN THE DISPLAY'S TOP PADDING (Nili, September 16 2026). A display
   standing on its own, with no chrome above it, is the app as far as the eye can
   tell, and every NILLA surface carries the logo at its top. It is an OPTIONAL
   element: a display that already has chrome above it simply does not include one.
   The padding law is untouched, 4.76cqw on all four sides; this row stands inside
   it and gives the top a little more room, which is what the logo needs to breathe. */
.nw-dtop{display:flex;align-items:center;justify-content:center;height:6.2cqw;margin-bottom:3.2cqw}
.nw-dtop img{height:100%;width:auto;display:block}

.nw-dbar{display:flex;align-items:center;gap:2.9cqw;margin-top:2.4cqw;padding:8px 0 0}
/* top aligned in the no-TB form, so the name screen's top edge is exactly the
   toggle's top edge and its bottom edge is exactly the toggle's midline */
.nw-dbar.nw-notb{align-items:flex-start}
/* A white pad on a white card is read only by its shadow, so it carries TWO: a
   tight contact shadow that separates the top edge, and the softer floating one.
   No frame. Frames are not on brand. */
.nw-pp{width:54px;height:54px;flex:none;border:0;border-radius:12px;background:#FFFFFF;
 cursor:pointer;display:flex;align-items:center;justify-content:center;
 box-shadow:0 1px 3px rgba(29,29,27,.30), 0 6px 14px rgba(29,29,27,.28);
 transition:box-shadow .12s ease}
.nw-pp:active{box-shadow:inset 0 5px 12px rgba(29,29,27,.34)}
.nw-pp img{width:20px;height:20px;object-fit:contain;display:block}
/* OPEN, FOR NILI: NILLA has no pause glyph. TRANSPORT-BAR.svg carries play, stop,
   record and loop only. These two bars are invented, which the standing rule of
   April 2 forbids. Either a pause glyph is drawn, or play toggles to STOP. */
.nw-pause{display:block;width:16px;height:19px;background:
 linear-gradient(90deg,#1D1D1B 0 6px,transparent 6px 10px,#1D1D1B 10px 16px)}
.nw-vtog{display:flex;gap:5px;background:#E8E6E8;border-radius:12px;padding:5px;flex:none}
.nw-vt{width:44px;height:44px;border:0;border-radius:10px;cursor:pointer;padding:6px;
 background:#FFFFFF;
 box-shadow:0 1px 3px rgba(29,29,27,.26), 0 3px 8px rgba(29,29,27,.24);
 display:flex;align-items:center;justify-content:center;transition:background .12s,box-shadow .12s}
.nw-vt img{width:100%;height:100%;object-fit:contain;display:block}
/* The chosen pad is the only STATE on this widget, and a state is what WCAG
   1.4.11 actually asks about, so it is the deepest well in the display and
   carries a real fill rather than a tint you have to hunt for. No frame, only
   shade. PRESS IS NOT STATE: the chosen pad presses too, and goes deeper still,
   so pressing the one already chosen still answers rather than doing nothing. */
.nw-vt.nw-on{background:rgba(29,29,27,.15);box-shadow:inset 0 5px 12px rgba(29,29,27,.38)}
.nw-vt:active{box-shadow:inset 0 4px 10px rgba(29,29,27,.30)}
.nw-vt.nw-on:active{background:rgba(29,29,27,.19);box-shadow:inset 0 6px 15px rgba(29,29,27,.44)}
.nw-dnav{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px;height:54px}
/* THE NAME SCREEN. An older machine's readout, not a second waveform screen.
   Defined but quiet: a hairline and the faintest recess, no gradient and no heavy
   inner shadow. The text is the tape, and it scrolls only when it is longer than
   the window. 13px is Ch.5's floor. */
.nw-namescreen{height:22px;display:block;overflow:hidden;border-radius:2px;
 background:rgba(29,29,27,.045);
 box-shadow:inset 0 1px 2px rgba(29,29,27,.10), inset 0 0 0 1px rgba(29,29,27,.10);
 font-size:13px;font-weight:400;letter-spacing:.1em;text-transform:uppercase;
 color:rgba(29,29,27,.66);line-height:22px;white-space:nowrap;text-align:center;
 text-overflow:clip}
.nw-namescreen span{display:inline-block;padding:0 4px}
.nw-namescreen.nw-roll span{padding-left:100%;animation:nw-tape 11s linear infinite}
@keyframes nw-tape{from{transform:translateX(0)}to{transform:translateX(-100%)}}
.nw-dbar.nw-notb .nw-dnav{height:54px;gap:0;justify-content:flex-start}
.nw-dbar.nw-notb .nw-drow{height:32px}
/* prev/next left, both tickers right, one line, vertically centred on each other.
   True horizontal centring of prev/next does not FIT at 420: it needs 268px and
   the nav column is 199px. Measured, not guessed. */
.nw-drow{display:flex;align-items:center;justify-content:space-between;gap:8px}
.nw-drow .nw-dtime{white-space:nowrap}
.nw-dbar.nw-withtb .nw-dnav{height:auto}
.nw-dsong{display:flex;gap:6px;justify-content:center}
.nw-dsong button{position:relative;height:24px;width:36px;flex:none;border:0;border-radius:8px;
 background:#FFFFFF;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;
 box-shadow:0 1px 2px rgba(29,29,27,.26), 0 3px 7px rgba(29,29,27,.24);
 transition:box-shadow .12s ease}
.nw-dsong button:active{box-shadow:inset 0 3px 8px rgba(29,29,27,.32)}
.nw-dsong button img{height:11px;width:auto;display:block}
/* the visible pill is short so the row keeps its height; the real target is
   extended to 44 x 44 on BOTH axes by this pseudo element. */
.nw-dsong button::before{content:"";position:absolute;left:-4px;right:-4px;top:50%;
 height:44px;transform:translateY(-50%)}
.nw-dtime{font-size:16px;font-weight:400;font-variant-numeric:tabular-nums;color:#A3A09C;flex:none}
.nw-dtime i{font-style:normal;opacity:.6;font-size:13px}

/* ============================== SONG CARD =================================
   The GRID board's twin, so it stacks on the same vertical lines. It carries a
   SCRUB, not a wave: this is the pre-Waveform state of Ch.4. The song icon is
   the card's own; DISPLAY has no icon.
   ========================================================================= */
.nw-card{background:#FFFFFF !important;border-radius:20px !important;padding:4.76cqw !important;width:100%;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important}
.nw-crow{display:flex;align-items:center;gap:3.2cqw}
/* THE ICON IS A PAD. Two artworks, and PRESSED MEANS PLAYING (ch.1). It presses
   with the same language as every pad. */
.nw-icon{position:relative;width:54px;height:54px;flex:none;border:0;padding:0;overflow:hidden;
 border-radius:10px;background:#FFFFFF;cursor:pointer;
 box-shadow:0 3px 8px rgba(29,29,27,.20);transition:box-shadow .12s ease}
.nw-icon img{width:100%;height:100%;object-fit:cover;display:block}
.nw-icon::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
 transition:box-shadow .12s ease}
.nw-icon:active,.nw-card.nw-on .nw-icon{box-shadow:none}
.nw-icon:active::after,.nw-card.nw-on .nw-icon::after{box-shadow:inset 0 4px 10px rgba(29,29,27,.30)}
.nw-title{flex:1;min-width:0;font-size:17px;font-weight:800;letter-spacing:0;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:none;border:0;
 font-family:inherit;color:inherit;text-align:left;cursor:pointer;padding:0}
/* the scrub: a cut-in track, square cornered like every sunken thing */
.nw-scrub{position:relative;height:8px;margin-top:4.2cqw;border-radius:2px !important;cursor:pointer;
 background:linear-gradient(180deg,#D6D4D6 0%,#E2E0E2 60%,#E8E6E8 100%);
 box-shadow:inset 0 2px 5px rgba(29,29,27,.26),inset 0 -1px 0 rgba(255,255,255,.85),
            inset 0 0 0 1px rgba(29,29,27,.12)}
.nw-played{position:absolute;left:0;top:0;bottom:0;border-radius:2px 0 0 2px;
 background:rgba(29,29,27,.42);width:0}
/* THE PLAYHEAD IS NOT RED. Ch.5 rule 4 reserves red for record and the primary
   CTA, and a red dot on a transport reads as record. White with an ink ring: it
   is a marker, not a button, so the ring is a rim rather than a frame. */
.nw-cph{position:absolute;top:50%;left:0;width:13px;height:13px;border-radius:50%;
 background:#FFFFFF;transform:translate(-50%,-50%);pointer-events:none;
 box-shadow:0 0 0 2px #1D1D1B, 0 1px 3px rgba(29,29,27,.28)}
/* tickers at the ends, prev and next dead centre between them */
.nw-cfoot{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin-top:2.6cqw}
.nw-tick{font-size:14px;font-weight:400;font-variant-numeric:tabular-nums;color:#A3A09C}
.nw-tick.nw-r{text-align:right}
.nw-cnav{display:flex;gap:8px}
.nw-cnav button{position:relative;width:44px;height:36px;border:0;border-radius:10px;
 background:#FFFFFF;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;
 box-shadow:0 1px 2px rgba(29,29,27,.26), 0 3px 7px rgba(29,29,27,.24);
 transition:box-shadow .12s ease}
.nw-cnav button:active{box-shadow:inset 0 3px 8px rgba(29,29,27,.32)}
.nw-cnav button::before{content:"";position:absolute;left:0;right:0;top:50%;height:44px;
 transform:translateY(-50%)}
.nw-cnav img{height:12px;width:auto;display:block}
/* IDLE, ch.1: scrub empty, no title, play is LIVE. The idle app is a loaded
   needle on the record. */
.nw-card.nw-idle .nw-title{visibility:hidden}
.nw-card.nw-idle .nw-icon{opacity:.5}
.nw-card.nw-idle .nw-cph{display:none}
.nw-card.nw-idle .nw-tick{color:rgba(163,160,156,.5)}

/* ============================== SONG STAGE ================================
   The GRID board's twin: same outer width, same padding, radius 20, white surf.
   Header, body, footer. MOVE, SING, LEARN, always that order, always in place.

   THE STAGE OWNS ITS OWN HEIGHT. This is the fix for the skills scroll: the
   height used to arrive from a parent that happened to be absolutely positioned,
   so the widget scrolled in one layout and silently failed everywhere else.
   ========================================================================= */
.nw-stage{--nw-pad:4.76cqw;
 background:#FFFFFF !important;border-radius:20px !important;padding:var(--nw-pad) !important;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important;width:100%;
 /* a FLOOR rather than a ceiling: the stage always fills at least this, and
    grows when a cue runs long, because a cue is content and content is never
    cut off. */
 min-height:170cqw;
 display:flex;flex-direction:column}
/* A FLOOR IS NOT A HEIGHT. min-height lets the MOVE view grow, but a widget view
   needs a DEFINITE height or its reading has nothing to scroll inside: the box
   simply grows to fit and the scroll silently disappears. */
.nw-stage[data-view="lyrics"],.nw-stage[data-view="skills"]{height:170cqw}

.nw-hdr{display:flex;gap:6px;justify-content:center;flex:none}
.nw-tab{border:0;cursor:pointer;font-family:inherit;font-size:13px;font-weight:800;letter-spacing:.1em;
 padding:8px 16px;min-height:44px;border-radius:999px;background:#E8E6E8;color:#6E6B68;
 display:inline-flex;align-items:center;transition:background .12s,color .12s}
.nw-tab.nw-on{background:#1D1D1B;color:#fff}

/* the cut: padding, hairline edge to edge, padding. Parts are independent. */
.nw-hair{height:1px;background:rgba(29,29,27,.14);flex:none;
 margin:var(--nw-pad) calc(var(--nw-pad) * -1)}
/* THE REGULAR SCROLLING SIGNAL. A thin line at the side of anything that
   scrolls, so the possibility is visible before anyone tries. */
.nw-lyrfull,.nw-skread{scrollbar-width:thin;scrollbar-color:rgba(29,29,27,.28) transparent}
.nw-lyrfull::-webkit-scrollbar,.nw-skread::-webkit-scrollbar{width:5px}
.nw-lyrfull::-webkit-scrollbar-track,.nw-skread::-webkit-scrollbar-track{
 background:rgba(29,29,27,.07);border-radius:3px}
.nw-lyrfull::-webkit-scrollbar-thumb,.nw-skread::-webkit-scrollbar-thumb{
 background:rgba(29,29,27,.30);border-radius:3px}

.nw-body{flex:1;min-height:0;display:flex;flex-direction:column}

/* THE WINDOW = a SCREEN. Same material, same recess, same square corners as the
   waveform screen, because it is the same kind of thing. */
.nw-win{position:relative;border-radius:2px !important;overflow:hidden;
 background:linear-gradient(180deg,#D6D4D6 0%,#E2E0E2 20%,#E8E6E8 100%)}
.nw-win::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:5;border-radius:inherit;
 box-shadow:inset 0 4px 9px rgba(29,29,27,.30),
            inset 0 -1px 0 rgba(255,255,255,.85),
            inset 0 -5px 9px rgba(29,29,27,.20),
            inset 0 0 0 1px rgba(29,29,27,.12)}
/* the clips are shot black on white, so multiply drops the white into the
   window's own ground and leaves only the shadow, which is what a silhouette is
   (ch.5 rule 3). */
.nw-mvwin video,.nw-mvwin img.nw-figure{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;
 background:transparent;mix-blend-mode:multiply}
/* FULL SCREEN, top right of the moves window. Geometric, straight angles, one
   stroke weight, per ch.5 rule 6 for non-music icons. */
.nw-fs{position:absolute;top:8px;right:8px;z-index:6;width:36px;height:36px;border:0;padding:0;
 border-radius:10px;background:#FFFFFF;cursor:pointer;display:flex;align-items:center;
 justify-content:center;box-shadow:0 1px 3px rgba(29,29,27,.26), 0 3px 8px rgba(29,29,27,.24);
 transition:box-shadow .12s ease}
.nw-fs::before{content:"";position:absolute;left:-4px;right:-4px;top:50%;height:44px;
 transform:translateY(-50%)}
.nw-fs:active{box-shadow:inset 0 3px 8px rgba(29,29,27,.32)}
.nw-fs svg{width:16px;height:16px;display:block}
.nw-fs path{fill:none;stroke:#1D1D1B;stroke-width:2.2;stroke-linecap:butt;stroke-linejoin:miter}

/* MOVE, SING and LEARN rows are TRIPLETS: same slot, same gap, so the pills line
   up down the card. THE PILL NEVER MOVES. An empty slot on the right mirrors the
   pill slot on the left, so the middle column's centre IS the card's centre, and
   the row GROWS with a long cue instead of overlaying it. */
.nw-cuerow{position:relative;display:flex;align-items:center;gap:2.6cqw;flex:none;
 padding-top:12px;min-height:56px}
.nw-cuerow.nw-strip{padding-top:0;min-height:34px}
.nw-cueslot{width:19.5cqw;flex:none;display:flex}
.nw-cuerow::after{content:"";width:19.5cqw;flex:none}
.nw-cuepill{width:100%;display:inline-flex;align-items:center;justify-content:center;height:26px;
 border-radius:999px;font-size:13px;font-weight:800;letter-spacing:0;text-transform:uppercase;
 color:#fff}
.nw-cuepill.nw-move{background:#46D393}
.nw-cuepill.nw-sing{background:#16A0C1}
/* LEARN is INK, not a colour. Every other channel owns one: MOVE green, SING
   blue. LEARN cannot take a colour because the five domains UNDER it each own
   one, and colour is meaning in NILLA. Ink says "this is the container", and lets
   the dots below it do the talking. */
.nw-cuepill.nw-learn{background:#1D1D1B}
.nw-cuetext{flex:1;min-width:0;min-height:56px;display:flex;align-items:center;
 justify-content:center;text-align:center;font-size:19px;font-weight:400;
 line-height:1.35;color:#1D1D1B}
.nw-cuetext i{font-style:normal}
.nw-lyrline{flex:1;min-width:0;min-height:34px;display:flex;align-items:center;
 justify-content:center;text-align:center;
 font-size:16px;font-weight:400;line-height:1.3;color:#1D1D1B}

/* LYRICS as the widget: the whole song in a pane that scrolls. NOT sunken. A
   screen is where the song shows itself; these are words to read.
   THE WORDS GET THE ROOM. Centred, large, no rules between them: a lyric sheet
   is read as a shape, and a line between every sentence chops it into a table.
   PAGE LAW 1's couplet rule: a line HUGS its translation, and the space belongs
   BETWEEN couplets, not inside one. */
.nw-lyrfull{display:none;padding:2px 6px 0 0;overflow-y:auto;-webkit-overflow-scrolling:touch;
 background:none;box-shadow:none}
.nw-lyrfull .nw-ln{padding:0;border:0;margin-bottom:18px;text-align:center}
.nw-lyrfull .nw-ln:last-child{margin-bottom:0}
.nw-lyrfull .nw-ln b{display:block;font-size:25px;font-weight:800;line-height:1.3;
 color:rgba(29,29,27,.42)}
.nw-lyrfull .nw-ln.nw-on b{color:#1D1D1B}
.nw-lyrfull .nw-ln i{display:block;font-style:italic;font-size:17px;font-weight:500;
 line-height:1.35;color:rgba(29,29,27,.55);margin-top:2px}

/* ---------------------------- SKILLS -------------------------------------
   AS A STRIP: one line that SCROLLS SIDEWAYS. The strip is kept down there so a
   parent can explore the domains quickly while the silhouettes are playing and
   the lyrics are running, so every domain has to be reachable without leaving
   the view. (Page law 2's "no scroll there" governs the skills POPUP, a
   different surface.)
   ONE PILL PER DOMAIN. Nili, August 14: a song that touches a domain twice keeps
   ONE pill, and the reading below carries both skills, each under its own title,
   together on that domain's colour.
   ------------------------------------------------------------------------- */
.nw-skwrap{display:flex;flex-direction:column;min-height:0;flex:none;gap:10px}
/* the widget names itself, where the strip has the LEARN pill instead */
.nw-sktitle{display:none;font-size:13px;font-weight:800;letter-spacing:.1em;
 text-transform:uppercase;color:#6E6B68;text-align:center;flex:none}
.nw-stage[data-view="skills"] .nw-sktitle{display:block}
/* the LEARN row is [pill][rail], so no row is spent on one word and the three
   pills keep one left edge, which is the card's vertical rhythm. */
.nw-learnrow{align-items:center}
.nw-learnrow::after{display:none}
.nw-learnrow .nw-skrail{flex:1;min-width:0}
/* no pill in the widget: the tab above already says LEARN, and the rail takes
   the whole width so more domains are on the line. */
.nw-stage[data-view="skills"] .nw-learnrow .nw-cueslot{display:none}
.nw-skrail{position:relative;flex:none}
/* THE FADE says the line continues. It is the card's own white running out, not
   a frame, and it sits UNDER the arrow so pills slide beneath both. */
.nw-skrail::before,.nw-skrail::after{content:"";position:absolute;top:0;bottom:0;width:38px;
 pointer-events:none;z-index:2;opacity:0;transition:opacity .15s}
.nw-skrail::before{left:0;background:linear-gradient(90deg,#FFFFFF,rgba(255,255,255,0))}
.nw-skrail::after{right:0;background:linear-gradient(270deg,#FFFFFF,rgba(255,255,255,0))}
.nw-skrail.nw-more-l::before,.nw-skrail.nw-more-r::after{opacity:1}
.nw-skarrow{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:44px;
 border:0;background:none;padding:0;cursor:pointer;z-index:3;display:none;
 align-items:center;justify-content:center}
.nw-skrail.nw-more-l .nw-skarrow.nw-l,.nw-skrail.nw-more-r .nw-skarrow.nw-r{display:flex}
.nw-skarrow.nw-l{left:-4px;justify-content:flex-start}
.nw-skarrow.nw-r{right:-4px;justify-content:flex-end}
.nw-skarrow svg{width:11px;height:18px;display:block}
.nw-skarrow path{fill:none;stroke:#1D1D1B;stroke-width:2.4;stroke-linecap:butt;stroke-linejoin:miter;
 opacity:.5}
.nw-skarrow:active path{opacity:1}
.nw-skpills{display:flex;gap:8px;flex:none;flex-wrap:nowrap;
 overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;
 -webkit-overflow-scrolling:touch;scrollbar-width:none;
 padding:4px 1px;margin:-4px -1px}
.nw-skpills::-webkit-scrollbar{display:none}
.nw-skillpill{scroll-snap-align:center;flex:none;
 display:inline-flex;align-items:center;gap:8px;border:0;cursor:pointer;font-family:inherit;
 font-size:13px;font-weight:400;padding:0 16px;border-radius:999px;background:#FFFFFF;
 color:#1D1D1B;min-height:44px;white-space:nowrap;
 box-shadow:0 1px 3px rgba(29,29,27,.26), 0 3px 8px rgba(29,29,27,.24);
 transition:box-shadow .12s ease}
.nw-skillpill:active{box-shadow:inset 0 4px 10px rgba(29,29,27,.30)}
.nw-skillpill .nw-dot{width:13px;height:13px;border-radius:50%;flex:none}
/* CH.5 LAW 11: pressed, the pill floods with its domain colour and the text and
   dot turn white, or BLACK on the light colours per the adaptive rule. The pill
   is the doorway, so it holds its flood while its section is being read. */
.nw-skillpill.nw-lit{color:#fff;box-shadow:0 1px 3px rgba(29,29,27,.30), 0 4px 10px rgba(29,29,27,.26)}
.nw-skillpill.nw-lit .nw-dot{background:#fff !important}
.nw-skillpill.nw-lit.nw-darktext{color:#1D1D1B}
.nw-skillpill.nw-lit.nw-darktext .nw-dot{background:#1D1D1B !important}

/* THE SKILL TEXT IS NOT A SCREEN. The colour is carried by the flooded pill and
   the words sit on the card's own white. Nothing sunken here, because this is a
   thing to read, not a place the song shows itself. */
.nw-skread{position:relative;margin-top:12px;overflow-y:auto;scroll-snap-type:y proximity;
 -webkit-overflow-scrolling:touch;text-align:left;background:none;box-shadow:none;
 display:flex;flex-direction:column;gap:8px;padding-right:6px}
/* CLOSED AT REST. ONLY THE PILLS.
   Nili, August 14: "when it opens, the learn part should only have the pills. It
   should not open on the text... otherwise it stays closed, and we only open it
   when we're interested in it."
   So in the MOVE view the reading has no height at all until someone asks for it.
   The stage opens on the silhouette and the words, which is what a family is
   there for, and the science waits politely underneath.
   THREE THINGS OPEN IT, all of them a press, never a scroll: the LEARN tab in the
   header, the LEARN pill beside the rail, or any domain pill. Any tab press
   closes it again. */
.nw-stage[data-view="moves"] .nw-skread{height:0;margin-top:0;flex:none;
 overflow:hidden;transition:height .22s ease, margin-top .22s ease}
/* THE STRIP IN USE TAKES THE ROOM. Once it is open, the SING strip stands down
   and gives LEARN its space. A strip nobody is using should not hold space from
   one somebody is. */
.nw-stage[data-view="moves"].nw-learning .nw-lyrstrip,
.nw-stage[data-view="moves"].nw-learning .nw-hair-b{display:none}
.nw-stage[data-view="moves"].nw-learning .nw-skread{height:56cqw;margin-top:12px;
 overflow-y:auto}
/* the LEARN pill is a door, so it says so to a finger and to a screen reader */
.nw-cuepill.nw-learn{cursor:pointer;border:0;font-family:inherit}
.nw-stage[data-view="skills"] .nw-skread{flex:1;min-height:0}
/* NO AIR AT THE ENDS. There used to be half a window of blank top and bottom, so
   the first and last domain could reach the CENTRE. It cost more than it bought:
   in the strip the window is 34cqw, so 38% at each end left barely a line of
   reading, and at rest the very first title sat above the top edge and looked
   like nothing had opened. The spy already selects the first domain outright at
   scrollTop 0 and the last one at the bottom, so the ends never needed the air.
   See also: a reading TALLER than its window is top aligned, not centred. */
/* ONE CONTINUOUS READ, SCROLLED DOWN. Every domain is present and stacked; you
   can read your way through instead of choosing. Whichever one is CENTRED is the
   current one: it takes its domain's light gel, its pill lights, and the rail
   scrolls that pill into view. Choosing and reading are the same act from two
   directions. */
.nw-sect{display:block;border-radius:12px;padding:13px 15px;transition:background .18s;
 scroll-snap-align:center}
.nw-sect h5{font-size:17px;font-weight:800;letter-spacing:0;text-transform:uppercase;
 margin-bottom:5px}
.nw-sect p{font-size:16px;line-height:1.5;color:#1D1D1B;text-align:left}
/* a domain the song touches TWICE: two titles, two readings, one gel, one pill */
.nw-sect .nw-skill + .nw-skill{margin-top:13px}

/* THE FOOTER FOLLOWS THE SKILLS. Big Brains is the deep end of skills, so it
   appears wherever skills appear: under the strip in the MOVE view, and under the
   reading in the LEARN view. In SING there are no skills on screen, so the words
   get the room and the footer offers the fridge sheet instead. */
.nw-foot{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px}
.nw-deep{font-size:13px;font-weight:400;color:#6E6B68}
.nw-bb{display:inline-flex;align-items:center;gap:9px;border:0;cursor:pointer;font-family:inherit;
 font-size:14px;font-weight:800;color:#1D1D1B;background:#FFFFFF;
 padding:0 18px;min-height:44px;border-radius:14px;
 box-shadow:0 1px 3px rgba(29,29,27,.30), 0 6px 14px rgba(29,29,27,.28);
 transition:box-shadow .12s ease}
.nw-bb:active{box-shadow:inset 0 5px 12px rgba(29,29,27,.34)}
.nw-bb img{height:26px;width:auto;display:block}
.nw-print{border:0;cursor:pointer;font-family:inherit;font-size:14px;font-weight:800;color:#1D1D1B;
 background:#FFFFFF;padding:0 18px;min-height:44px;border-radius:14px;display:none;
 box-shadow:0 1px 3px rgba(29,29,27,.30), 0 6px 14px rgba(29,29,27,.28)}
.nw-print:active{box-shadow:inset 0 5px 12px rgba(29,29,27,.34)}
.nw-stage[data-view="lyrics"] .nw-deep,.nw-stage[data-view="lyrics"] .nw-bb{display:none}
.nw-stage[data-view="lyrics"] .nw-print{display:inline-flex;align-items:center}

/* ---- what is on in each view ---- */
.nw-stage[data-view="moves"] .nw-mvblock{display:flex;flex-direction:column;flex:none}
.nw-stage[data-view="moves"] .nw-lyrfull{display:none}
.nw-stage[data-view="lyrics"] .nw-mvblock,
.nw-stage[data-view="lyrics"] .nw-skwrap,
.nw-stage[data-view="lyrics"] .nw-skread,
.nw-stage[data-view="lyrics"] .nw-hair-b,
.nw-stage[data-view="lyrics"] .nw-hair-c,
.nw-stage[data-view="lyrics"] .nw-lyrstrip{display:none}
.nw-stage[data-view="lyrics"] .nw-lyrfull{display:block;flex:1;min-height:0}
.nw-stage[data-view="skills"] .nw-mvblock,
.nw-stage[data-view="skills"] .nw-lyrstrip,
.nw-stage[data-view="skills"] .nw-hair-b,
.nw-stage[data-view="skills"] .nw-hair-c{display:none}
.nw-stage[data-view="skills"] .nw-skwrap{flex:1;min-height:0}
.nw-stage[data-view="skills"] .nw-skread{display:block;flex:1;min-height:0;margin-top:12px}

/* ============ FULL SCREEN ============
   The moves window and the SING strip only: the silhouette gets the whole screen
   and the live lyric stays under it, because those two are what a family
   watches. Everything else steps out of the way. */
.nw-stage.nw-fullscreen{position:fixed;inset:0;z-index:60;max-width:none;width:100%;
 height:100%;min-height:0;border-radius:0;margin:0;justify-content:center}
.nw-stage.nw-fullscreen .nw-hdr,.nw-stage.nw-fullscreen .nw-skwrap,
.nw-stage.nw-fullscreen .nw-lyrfull,.nw-stage.nw-fullscreen .nw-foot,
.nw-stage.nw-fullscreen .nw-hair-foot,.nw-stage.nw-fullscreen .nw-hair-c,
.nw-stage.nw-fullscreen .nw-hair-b{display:none}
.nw-stage.nw-fullscreen .nw-mvwin video{aspect-ratio:auto;height:auto;max-height:62vh}
.nw-stage.nw-fullscreen .nw-body{flex:none;justify-content:center}


/* ============================== POPUP =====================================
   PAGE LAW 3, and the popup family it belongs to. Approved July 19, 2026.

   THE POPUP IS THE WIDGET. WHAT IS IN IT IS CONTENT. This is the grid's rule
   again: the shell owns the eyebrow, the title, the close, the row rhythm, the
   hairlines and the way it arrives. MENU is a list of rows handed to it. LYRICS
   is words handed to it. SKILLS is chips handed to it. Three surfaces, one
   frame. The alternative is three frames that agree today and disagree in a
   month, which is exactly how the pads ended up with four different presses.

   TWO LAWS THAT ARE NOT ABOUT PIXELS. Music never stops when a popup opens, and
   the transport stays. A popup is a place to look at something while the song
   keeps playing, never a modal that takes the room over.

   THE TITLE SAYS WHOSE POPUP IT IS. The menu belongs to the APP, so the logo is
   its title. A lyrics or skills popup belongs to a SONG, so the song's name is.
   ========================================================================= */
.nw-pop{background:#FFFFFF !important;border-radius:20px !important;
 padding:4.76cqw !important;width:100%;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important;
 display:flex;flex-direction:column;max-height:100%;
 --nw-row:48px}
.nw-pop-head{display:flex;align-items:flex-start;gap:12px;flex:none}
.nw-pop-titles{flex:1;min-width:0}
.nw-eyebrow{display:block;font-size:13px;font-weight:800;letter-spacing:.1em;
 text-transform:uppercase;color:#A3A09C}
.nw-pop-title{display:block;margin-top:7px;font-size:24px;font-weight:800;
 letter-spacing:0;color:#1D1D1B}
/* THE LOGO AS A TITLE. Nili, August 14: the logo looked very small, and asked
   whether there should be a rule. There was none. Chapter 1 says the logo is
   PROMINENT and chapter 5 rule 5 says what the logo IS; neither says how big.

   THE FIRST HALF OF THE RULE IS THE FILE, NOT THE NUMBER. NILLA-LOGO.svg is a
   3840x2160 artboard and the mark occupies 2665x1004 of it, so 54% of the file
   is empty air. Ask that file for 30px and the letters come out about 14. A logo
   whose file carries padding cannot be sized by anyone, because "height" stops
   meaning the height of the mark. So: THE CANONICAL LOGO FILE IS TIGHT TO ITS
   ARTWORK, at 06_brand-assets/brand/logo/NILLA-LOGO-tight.svg. The padded file
   stays as the master artboard and is never placed in an interface.

   THE SECOND HALF IS ONE NUMBER, HERE. Every surface takes it from this variable
   rather than choosing its own, so the mark is the same object everywhere.

   THIRTY, chosen by Nili on August 14 from the four rendered side by side in
   07_surfaces/decks/demos/logo-size.html. Worth noting how that went: 30 was the
   number the popup already had. It looked wrong only because the padded file was
   delivering 14 of it. Once the file was tight, 30 was right after all, which is
   the whole argument for measuring before redesigning. */
.nw-pop{--nw-logo:30px}
.nw-pop-title img{height:var(--nw-logo) !important;width:auto;display:block}
/* the close is a pad, like everything else pressable in NILLA. No frame. */
.nw-pop-x{position:relative;width:44px;height:44px;flex:none;border:0;padding:0;
 border-radius:12px;background:#FFFFFF;cursor:pointer;
 display:flex;align-items:center;justify-content:center;
 box-shadow:0 1px 3px rgba(29,29,27,.26), 0 3px 8px rgba(29,29,27,.24);
 transition:box-shadow .12s ease}
.nw-pop-x:active{box-shadow:inset 0 4px 10px rgba(29,29,27,.30)}
.nw-pop-x svg{width:15px;height:15px;display:block}
.nw-pop-x path{stroke:#1D1D1B;stroke-width:2.2;fill:none;stroke-linecap:butt}
/* the body is the only thing that scrolls, and it always says that it can */
.nw-pop-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
 margin-top:4.76cqw;padding-right:6px;
 scrollbar-width:thin;scrollbar-color:rgba(29,29,27,.28) transparent}
.nw-pop-body::-webkit-scrollbar{width:5px}
.nw-pop-body::-webkit-scrollbar-track{background:rgba(29,29,27,.07);border-radius:3px}
.nw-pop-body::-webkit-scrollbar-thumb{background:rgba(29,29,27,.30);border-radius:3px}

/* THE ROW. 48px minimum with a hairline, per page law 3. One row, one idea:
   compound rows were split in the July 19 pass because unambiguous labels beat
   fewer clever ones. */
.nw-row{display:flex;align-items:center;gap:12px;width:100%;
 min-height:var(--nw-row) !important;padding:10px 2px !important;border:0 !important;
 background:none !important;font-family:inherit;color:#1D1D1B;text-align:left;
 cursor:pointer;box-shadow:inset 0 -1px 0 rgba(29,29,27,.12) !important;
 transition:background .12s ease}
.nw-row:last-child{box-shadow:none !important}
.nw-row:active{background:rgba(29,29,27,.05) !important}
.nw-row b{flex:1;min-width:0;font-size:16px;font-weight:800;letter-spacing:0}
/* the row's current value sits at the end, quiet, before the chevron */
.nw-row i{font-style:normal;font-size:15px;font-weight:400;color:#6E6B68;flex:none}
.nw-row svg{width:8px;height:14px;flex:none}
.nw-row svg path{fill:none;stroke:#A3A09C;stroke-width:2.2;stroke-linecap:butt;stroke-linejoin:miter}
/* LEGAL LAST, and quieter. Order principle: frequency of use, invitation above
   story, legal last. */
.nw-row.nw-quiet b{font-weight:800;color:#6E6B68}

/* THE ACCOUNT BLOCK. No tier label anywhere: tier is internal jargon. Earned
   pills only, and absent by default. */
.nw-acct{padding:2px 2px 16px;box-shadow:inset 0 -1px 0 rgba(29,29,27,.12)}
.nw-acct span{display:block;font-size:13px;font-weight:400;letter-spacing:0;color:#A3A09C}
.nw-acct b{display:block;margin-top:4px;font-size:17px;font-weight:800;letter-spacing:0;
 overflow-wrap:anywhere}
.nw-pills{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
.nw-pill{font-size:13px;font-weight:800;letter-spacing:0;padding:5px 11px;border-radius:999px}
/* the version line closes the sheet, quiet, and it is what the support mail carries */
.nw-ver{flex:none;margin-top:14px;font-size:13px;font-weight:400;color:#A3A09C;text-align:center}

/* ============================== THE JOIN ==================================
   Square on BOTH, 2px hairline between, and the padding at the seam is HALVED
   on each side so the two together read as one padding, not two.

   A WIDGET IS ONLY JOINED WHERE A NEIGHBOUR IS ACTUALLY THERE. This is the rule
   that was missing, and it showed: the grid kept a flat bottom while the song
   card under it was hidden, so a widget standing alone had a squared edge with
   nothing to square off against. A join is a statement about TWO widgets. When
   only one of them is on screen it is not a join, it is a standalone widget, and
   a standalone widget is rounded on all four corners.

   nw-joined is therefore a LIVE class, not a permanent one. Call
   NILLA.widgets.join(stack) whenever a widget in the stack is shown or hidden;
   it counts the visible ones and adds or removes the class for you.
   ========================================================================= */
.nw-joined > .nw-above{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;
 padding-bottom:calc(4.76cqw/2)!important}
.nw-joined > .nw-below{border-top-left-radius:0!important;border-top-right-radius:0!important;
 padding-top:calc(4.76cqw/2)!important}

/* ========================= THE POPUP OVERLAY ==============================
   A popup needs somewhere to arrive. .nw-pop is the FRAME; this is the room it
   opens into. It was missing, so every surface that wanted a popup built its own
   overlay, which is how the pads ended up with four different presses.

   MUSIC NEVER STOPS WHEN A POPUP OPENS (page law 3). Nothing here touches audio,
   and nothing here should ever be given the chance to.

   The shell resolves its padding in cqw, so the overlay hands it a .nw-wrap to
   sit in: the wrap is the container the ratios measure against.
   ========================================================================= */
.nw-pop-ov{position:fixed;inset:0;z-index:60;display:none;
 align-items:center;justify-content:center;padding:24px;
 background:rgba(29,29,27,.42)}
.nw-pop-ov.nw-on{display:flex}
.nw-pop-ov > .nw-wrap{width:100%;max-width:440px;max-height:100%;display:flex}
.nw-pop-ov > .nw-wrap > .nw-pop{max-height:100%}

/* ============================== GET NILLA ================================
   THE OFFER IS A WIDGET (Nili, September 3 2026). It used to be markup written
   into the nursery rhymes body, so the price, the list and the button lived in
   one file and could only be changed there. It is now one widget: the surface
   holds it, the widget draws it, and updating the offer is one edit that reaches
   every place it stands. Its natural home is the shared popup shell, but nothing
   here assumes a popup, so it can also sit inline on a page.

   WHAT IS LAW HERE. The dot colours are chapter 5's palette and the primary CTA
   is red, which chapter 5 reserves for record and the primary call to action and
   nothing else. The rest is rhythm, and it moves with the widget's own width.
   ========================================================================= */
.nw-get{display:block;text-align:center}
.nw-get-cta{display:inline-block;border:0;font-family:inherit;cursor:pointer;
 background:#FF313C !important;color:#FFFFFF !important;
 font-size:17px;font-weight:800;letter-spacing:0;
 padding:14px 34px;border-radius:14px !important;min-height:44px !important;
 text-decoration:none;box-shadow:0 3px 8px rgba(29,29,27,.2) !important;
 transition:box-shadow .12s ease}
.nw-get-cta:active{box-shadow:inset 0 4px 10px rgba(29,29,27,.30) !important}
.nw-get-price{margin-top:14px;font-size:17px;font-weight:800;color:#1D1D1B}
.nw-get-note{margin:8px auto 0;max-width:470px;font-size:13px;line-height:1.55;color:#6E6B68}
.nw-get-list{margin-top:28px;text-align:left}
.nw-get-h{font-size:13px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
 color:#A3A09C;margin-bottom:10px}
/* one row, one thing you get. The dot is the only colour in the row, so the eye
   counts the list before it reads it. */
.nw-get-row{display:flex;gap:10px;align-items:flex-start;width:100%;
 font-size:13px;line-height:1.55;color:#6E6B68;text-align:left;
 padding:9px 2px !important;border:0 !important;background:none !important;
 font-family:inherit;box-shadow:inset 0 -1px 0 rgba(29,29,27,.12) !important}
.nw-get-row:last-child{box-shadow:none !important}
.nw-get-row.nw-act{cursor:pointer;transition:background .12s ease}
.nw-get-row.nw-act:active{background:rgba(29,29,27,.05) !important}
.nw-get-dot{width:9px;height:9px;border-radius:50% !important;flex:none;margin-top:6px}
.nw-get-row b{font-weight:800;color:#1D1D1B}
.nw-get-fine{margin-top:18px;font-size:13px;color:#A3A09C;text-align:center}

/* THE MITTENS, AN ADD ON (Nili, September 4 2026, four passes, and the last one
   was the one that mattered). It went to the bottom of the list, became its own
   board, got its padding fixed, and still read as messy. It was messy, and for
   two reasons that were both mine.

   A FLOATING SHADOW ON WHITE IS NOT A NILLA SHADOW. The board shadow exists so a
   WHITE surf board reads against PAPER. This block sits inside the popup, which
   is already white, so the shadow had no tonal difference to work with and was
   doing the job of a border. Ch.5: NILLA has no frames. A shadow standing in for
   one is the same thing wearing a hat.

   AND THE GREEN PILL WAS BORROWED, NOT BRAND. A coloured commerce badge is a
   convention from somebody else's shop. In NILLA a colour carries a meaning, and
   there is no meaning here that green owns.

   SO IT IS A SECTION, NOT A CARD, and it is built from what the popup already
   has. The account block a few rules down solves this exact problem: a hairline
   above, a quiet grey eyebrow to name it, then the content. That is the brand's
   own answer, already approved, and it needs no new object and no new colour.

   THE OFFER POPS BY TYPOGRAPHY, which is how NILLA distinguishes anything: the
   struck price against the live one, and the price heavier than the sentence.
   Nothing here shouts to be noticed. */
.nw-get-addonwrap{container-type:inline-size}
.nw-get-addon{margin-top:4.76cqw;padding-top:4.76cqw;
 box-shadow:inset 0 1px 0 rgba(29,29,27,.12)}
.nw-get-mitts{display:grid;grid-template-columns:1fr auto;align-items:center;
 gap:7px 14px;width:100%;padding:0 !important;border:0 !important;background:none !important;
 font-family:inherit;text-align:left;cursor:pointer;color:#1D1D1B;box-shadow:none !important}
.nw-get-mitts .nw-eyebrow{grid-column:1;grid-row:1;justify-self:start}
/* 700, not 800. The offer above it is the thing being bought. */
.nw-get-mitts b{grid-column:1;grid-row:2;min-width:0;
 font-size:14px;font-weight:800;letter-spacing:.1em;line-height:1.5}
.nw-get-mitts i.nw-plus{grid-column:2;grid-row:1 / span 2;align-self:center;
 font-style:normal;font-size:19px;font-weight:400;color:#A3A09C;
 transition:transform .16s ease,color .12s ease}
.nw-get-mitts:active i.nw-plus{color:#1D1D1B}
.nw-get-mitts.nw-open i.nw-plus{transform:rotate(45deg)}
/* THE GLYPH STANDS IN FOR THE WORD (Nili, September 4 2026). PSRP is an
   initialism nobody outside the studio reads, and the symbol is the thing the
   child is actually being taught. It carries the words as its alt text, so a
   screen reader still hears "play, stop, record and pause".
   BIG ENOUGH TO BE THE WORD IT REPLACED: at 1.45em the four quadrants closed up
   into a smudge, which is worse than the initialism. A glyph carrying meaning
   has to be legible or it is decoration. */
.nw-get-glyph{height:2.2em;width:auto;display:inline-block;vertical-align:-.72em;margin:0 3px}
/* the two prices are the whole emphasis: struck and quiet, then live and heavy */
.nw-get-was{font-size:13px;font-weight:400;color:#A3A09C;text-decoration:line-through;margin-right:6px}
.nw-get-now{font-size:16px;font-weight:800;color:#1D1D1B;font-style:normal}
.nw-get-why{display:none;padding-top:4.76cqw}
.nw-get-why.nw-on{display:block}
/* on paper, because a photograph is not a surf and should not pretend to float */
.nw-get-bigpics{display:grid;grid-template-columns:1fr 1fr;gap:2.86cqw}
.nw-get-bigpics img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;display:block;
 border-radius:10px !important}
.nw-get-why p{margin-top:4.76cqw;font-size:13px;line-height:1.55;color:#6E6B68}
.nw-get-why .nw-get-cta{margin-top:4.76cqw;font-size:14px;padding:12px 22px;
 width:100%;text-align:center}

/* =============================== PITCH ===================================
   THE PITCH SHIFTER (Nili, September 3 and 4 2026). A fader running up and
   down, the bird at the top and the whale at the bottom, the pair the Pitch
   symbol already teaches, so the control and the drawing say the same thing.
   Under it a sound button and a song button; the song button opens a second row
   of song pads.

   The song pads are .nw-pad, so the press language is the widget's own and this
   control inherits it rather than inventing a fifth press.
   ========================================================================= */
.nw-pitch{display:flex;gap:7.5cqw;justify-content:center;align-items:flex-start;flex-wrap:wrap;
 container-type:inline-size}
.nw-pitch-fader{display:flex;flex-direction:column;align-items:center;gap:10px;flex:none}
/* HOME, the mark on the line where the sound is its own pitch. It is a tick, the
   same short ink mark the bars and beats ruler uses, because NILLA already has a
   way to mark a position on a line and it is not a new drawing.

   IT GROWS WHEN THE BLOCK IS CAUGHT THERE. Not a colour change: at home the mark
   simply reaches the full width of the block, so the two read as one object
   sitting in its slot. Red is record and green is the pulse; this is neither, and
   an ink mark getting longer says "here" with nothing borrowed. */
.nw-pitch-throw{position:relative;display:flex;align-items:center;justify-content:center}
.nw-pitch-home{position:absolute;top:50%;left:50%;
 width:22px;height:2px;background:#1D1D1B;transform:translate(-50%,-50%);
 pointer-events:none;transition:width .10s ease-out,opacity .10s ease-out;opacity:.55}
.nw-athome .nw-pitch-home{width:var(--nw-fader-block-w);opacity:1}
/* THE ENDS ARE THE FEEDBACK (Nili asked what the feedback should be, September
   4 2026). The end you are travelling towards comes forward and the other one
   recedes, continuously, as the block moves. It is wordless, which 0-3 has to
   be, it needs no number, which a pre-reader cannot use, and it teaches the one
   idea the Pitch symbol already carries: up is the bird, down is the whale. No
   new glyph and no new colour, so nothing here is invented.

   The size is the carrier, not colour: a scale reads at arm's length and does
   not depend on seeing hue. */
.nw-pitch-end{display:block;width:46px;height:auto;transform-origin:center;
 transition:transform .10s ease-out, opacity .10s ease-out}
.nw-pitch-end.nw-low{width:58px}   /* the whale is the bigger animal, and the drawing has it so */
/* THE FADER IS NILLA'S OWN, NOT THE BROWSER'S (Nili, September 4 2026). The
   default range control draws a round knob on a grooved rail, which is nobody's
   drawing. NILLA already has a fader and the child is taught it:
   09-STUDIO-MINDSET_FADER_DIGI-1.png, a thin ink line with a wide rectangular
   block riding it. April 2 standing rule, the glyph is NILLA's own.

   THE PROPORTIONS ARE MEASURED FROM THAT FILE, not eyeballed. On its 512 canvas
   one fader runs 322 tall, its track is 5 wide and its block is 100 by 47. So:
   track 1.55% of the travel, block 31% wide and 14.6% tall, and the block is
   2.13 to 1. At 190px of travel that is a 3px line and a 59 by 28 block. One
   fader, not the two the icon happens to show. */
/* THE LINE IS DRAWN ON THE INPUT, NOT ON THE TRACK. A 3px track pseudo-element
   sits at the START of a vertical range rather than the middle, so the block
   rode beside the line instead of on it. Painting the line as a centred
   background on the input itself, and letting the track fill the full width,
   puts the block on the line in every engine and needs no per-browser nudge.

   THE THREE NUMBERS ARE VARIABLES, AND THAT IS NOT DECORATION. A range thumb is
   not in the DOM, so getComputedStyle cannot reach it and neither can the
   approved sheet: measured through the pseudo element it reports the input's own
   box and lies. Declaring the geometry here, and having the pseudo elements read
   it, gives the sheet something real to measure that is the SAME value the
   browser draws with. Change a number and both the drawing and the sheet move
   together, which is the only arrangement in which a spec cannot go stale.

   THE NUMBERS COME FROM NILLA'S OWN FADER, 09-STUDIO-MINDSET_FADER_DIGI-1.png,
   measured off the file: one fader runs 322 tall on the 512 canvas, its track is
   5 wide and its block is 100 by 47. So the line is 1.55% of the travel and the
   block is 31% wide, 14.6% tall, 2.13 to 1. At 190 of travel: 3, 59 and 28. */
.nw-pitch-slide{-webkit-appearance:none;appearance:none;
 writing-mode:vertical-lr;direction:rtl;
 --nw-fader-travel:190px; --nw-fader-line:3px;
 --nw-fader-block-w:59px; --nw-fader-block-h:28px; --nw-fader-block-r:0px;
 width:60px;height:var(--nw-fader-travel);cursor:pointer;padding:0;border:0;
 min-height:44px !important;
 background:linear-gradient(#1D1D1B,#1D1D1B) no-repeat center center /
            var(--nw-fader-line) 100% !important}
.nw-pitch-slide:focus{outline:none}
.nw-pitch-slide::-webkit-slider-runnable-track{
 width:100%;height:100%;background:transparent !important;border:0}
/* THE BLOCK IS THE SAME MATERIAL, AND A DIFFERENT SHAPE (Nili, September 4
   2026, in two steps). First: it was solid ink, which made the one thing your
   hand grabs a different substance from everything else you press in NILLA, so
   it is white now with the pad's own lift. Then: it is NOT a pad, and it should
   not borrow the pad's corner. A FADER BLOCK HAS SQUARE CORNERS. That is the
   standing rule for every fader NILLA ever draws, not a one off for this one.

   AND IT IS EMBOSSED, so it reads as popping out of the surface rather than
   lying on it: a white highlight along the top edge, a soft ink line along the
   bottom, and a barely there gradient down the face. Those three are what a
   raised object does to light, and none of them is a colour: the block is still
   white surf, per ch.5 law 12.

   The proportions are still the artwork's. Only the material and the corner
   changed. */
.nw-pitch-slide::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;
 width:var(--nw-fader-block-w);height:var(--nw-fader-block-h);
 border:0;border-radius:var(--nw-fader-block-r) !important;   /* square, and readable */
 background:linear-gradient(180deg,#FFFFFF 0%,#FFFFFF 55%,#F0EEF0 100%) !important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.95),
            inset 0 -1px 0 rgba(29,29,27,.16),
            0 3px 8px rgba(29,29,27,.2) !important}
.nw-pitch-slide::-moz-range-track{width:100%;height:100%;background:transparent;border:0}
.nw-pitch-slide::-moz-range-thumb{
 width:var(--nw-fader-block-w);height:var(--nw-fader-block-h);
 border:0;border-radius:var(--nw-fader-block-r);
 background:linear-gradient(180deg,#FFFFFF 0%,#FFFFFF 55%,#F0EEF0 100%);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.95),
            inset 0 -1px 0 rgba(29,29,27,.16),
            0 3px 8px rgba(29,29,27,.2)}
/* CAUGHT AT HOME. The block's face darkens a shade, so the moment of landing is
   visible on the thing your finger is holding as well as on the line under it. */
.nw-athome .nw-pitch-slide::-webkit-slider-thumb{
 background:linear-gradient(180deg,#F7F5F7 0%,#F7F5F7 55%,#E4E2E4 100%) !important}
.nw-athome .nw-pitch-slide::-moz-range-thumb{
 background:linear-gradient(180deg,#F7F5F7 0%,#F7F5F7 55%,#E4E2E4 100%)}
/* GRABBED IS PRESSED. The emboss inverts and the lift collapses, so the block
   goes from popping out to pushed in. Same answer a pad gives, one shape down. */
.nw-pitch-slide:active::-webkit-slider-thumb{
 background:linear-gradient(180deg,#F0EEF0 0%,#FFFFFF 45%,#FFFFFF 100%) !important;
 box-shadow:inset 0 4px 10px rgba(29,29,27,.30) !important}
.nw-pitch-slide:active::-moz-range-thumb{
 background:linear-gradient(180deg,#F0EEF0 0%,#FFFFFF 45%,#FFFFFF 100%);
 box-shadow:inset 0 4px 10px rgba(29,29,27,.30)}
.nw-pitch-side{display:flex;flex-direction:column;align-items:center;gap:14px;min-width:0;flex:1}
.nw-pitch-row{display:flex;gap:12px}
.nw-pitch-door{display:flex;flex-direction:column;align-items:center;gap:6px}
.nw-pitch-word{font-size:13px;font-weight:400;letter-spacing:0;text-transform:uppercase;color:rgba(29,29,27,.62);line-height:1}
.nw-pitch-row .nw-pad{width:74px}
/* ONE ROW AT A TIME (Nili, September 4 2026). Sounds or songs, never both:
   two rows of pads open at once is two questions asked at once, and the child
   has to answer one of them before the fader means anything. Each button is a
   door, and opening one closes the other. */
.nw-pitch-songs,.nw-pitch-sounds{display:none;width:100%;max-width:300px}
.nw-pitch-songs.nw-on,.nw-pitch-sounds.nw-on{display:block}
/* THE OPTIONAL SCREEN. Off by default, because inside the studio the display is
   already on screen and a second one is noise. A surface that has no display of
   its own asks for it. */
.nw-pitch-screen{display:none;width:100%;margin-top:12px}
.nw-pitch-screen.nw-on{display:block}
/* THE SCREEN IS SCRUBBABLE. Touch anywhere in it and the sound goes there. The
   whole screen is the target rather than the 2px line, because a playhead is far
   too thin to grab and a child aiming at a hairline is a child failing. */
.nw-pitch-screen .nw-screen{cursor:pointer;touch-action:none}
.nw-pitch-now{min-height:18px;font-size:13px;font-weight:400;color:#6E6B68;text-align:center}

/* ================================ BPM ====================================
   TAP TEMPO (Nili, September 3 2026): a button with a pulsing side light and an
   outer circle, and a live readout beneath it. Pressing the screen to feel the
   tempo is PHYSICAL FEEDBACK, which the September 3 amendment puts on 0-3.

   THE LIGHT IS GREEN (Nili, September 4 2026). It was red for one day and that
   was wrong: chapter 5 reserves red for record and the primary CTA, and a tempo
   light is neither. Green is the pulse.
   ========================================================================= */
.nw-bpm{display:flex;flex-direction:column;align-items:center;gap:16px}
/* THE READOUT CENTRES ON THE BIG BUTTON, not on the button plus the light
   (Nili, September 4 2026). The light is lifted out of the flow so the row is
   exactly as wide as the button, and the number sits under its middle. */
.nw-bpm-row{position:relative;display:flex;align-items:center;justify-content:center}
.nw-bpm-tap{position:relative;width:148px;height:148px;padding:20px;cursor:pointer;
 border-radius:50% !important;border:3px solid #1D1D1B !important;background:#FFFFFF !important;
 display:flex;align-items:center;justify-content:center;
 box-shadow:0 5px 12px rgba(29,29,27,.18) !important;
 transition:box-shadow .12s ease, border-color .09s ease}
/* THE RING IS THE BEAT, NOT THE BUNNY (Nili asked for one or the other,
   September 4 2026). Blinking the bunny would flicker the identity, and a logo
   that flashes reads as a fault rather than as a pulse. The ring around it is
   already a circle drawn for exactly this job: it goes green on every beat and
   the artwork inside stays perfectly still. Green because that is the pulse
   colour here, the same green as the side light, so the big signal and the small
   one are plainly the same event. */
.nw-bpm-tap.nw-beat{border-color:#46D393 !important;
 box-shadow:0 5px 12px rgba(29,29,27,.18), 0 0 0 5px rgba(70,211,147,.22) !important}
.nw-bpm-tap:active{box-shadow:inset 0 5px 12px rgba(29,29,27,.28) !important}
.nw-bpm-tap img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.nw-bpm-light{position:absolute;left:100%;top:50%;margin-left:18px;transform:translateY(-50%);
 width:26px;height:26px;flex:none;border-radius:50% !important;
 background:rgba(29,29,27,.14);transition:background .09s ease,transform .09s ease}
/* GREEN (Nili, September 4 2026). It was red, and red belongs to record and the
   primary CTA. A tempo light is not a record light. */
.nw-bpm-light.nw-lit{background:#46D393;transform:translateY(-50%) scale(1.22)}
/* THE METRONOME SITS OPPOSITE THE LIGHT, and out of the flow like it, so the row
   stays exactly as wide as the button and the readout keeps its centre. */
.nw-bpm-met{position:absolute;right:100%;top:50%;margin-right:18px;transform:translateY(-50%);
 width:64px;height:64px}
/* INERT UNTIL THERE IS A TEMPO TO RUN. Tap first, then set it going: a metronome
   with no tempo has nothing to play, and dimming says so without a word. */
.nw-bpm-met[aria-disabled="true"]{opacity:.35;pointer-events:none}
.nw-bpm-read{text-align:center}
.nw-bpm-read b{display:block;font-size:44px;font-weight:800;letter-spacing:0;line-height:1;color:#1D1D1B}
.nw-bpm-read span{display:block;margin-top:4px;font-size:13px;font-weight:800;letter-spacing:0;
 text-transform:uppercase;color:#A3A09C}

/* ============================= JOB BOARD =================================
   WHO IS ON THIS (Nili, September 4 2026). One widget, so the roster is edited
   once and every surface carrying it updates, which is the same argument that
   moved the offer out of the page.

   NO PHOTOS (Nili, September 4 2026). Four of the eleven have a picture and
   seven do not, so a photo row was mostly empty frames pretending to be a
   gallery. Names and roles carry it, which is what the original crew cards did
   before anyone had a photo at all.

   THE DESCRIPTIONS SIT AT THE BOTTOM, not under each name. A name and a role is
   what you scan; a paragraph under every card turns a roster into an essay and
   nobody reads the fourth one. So the board is a list you can take in at a
   glance, and what everyone actually does is one block underneath it.

   THE ROSTER IS A WORKING DOCUMENT, not a public claim. Anyone under a heading
   the widget marks as a wish is someone NILLA wants, not someone NILLA has, and
   the widget prints that distinction rather than leaving it to the reader. That
   is the Annie Hiatt rule generalised: right name, right title, and never imply
   a relationship that does not exist yet.
   ========================================================================= */
.nw-job{display:block}
.nw-job-h{font-size:13px;font-weight:800;letter-spacing:0;text-transform:uppercase;
 color:#A3A09C;margin:0 0 16px;text-align:center}
.nw-job-h.nw-wish{color:#FF9100}
.nw-job-grid{display:flex;flex-wrap:wrap;gap:14px 34px;justify-content:center;margin-bottom:34px}
.nw-job-card{width:210px;text-align:center}
.nw-job-name{font-size:17px;font-weight:800;letter-spacing:0;color:#1D1D1B}
.nw-job-role{margin-top:3px;font-size:13.5px;font-weight:800;color:#6E6B68}
.nw-job-at{margin-top:2px;font-size:13px;font-weight:800;color:#A3A09C;line-height:1.4}
/* what everyone does, once, at the bottom */
.nw-job-notes{margin-top:6px;padding-top:26px;box-shadow:inset 0 1px 0 rgba(29,29,27,.12);
 max-width:620px;margin-left:auto;margin-right:auto;text-align:left}
.nw-job-notes .nw-job-h{text-align:left;margin-bottom:14px}
.nw-job-note{font-size:13.5px;line-height:1.6;color:#6E6B68}
.nw-job-note + .nw-job-note{margin-top:11px}
.nw-job-note b{font-weight:800;color:#1D1D1B}

/* ============================== PRINT =====================================
   THE FRIDGE SHEET (page law 1). window.print() opens the system dialog, which
   carries Save as PDF on macOS and iOS, so one button gives both. Only the words
   print: no chrome, no pills, no card.
   ========================================================================= */
@media print{
  .nw-stage .nw-hdr,.nw-stage .nw-hair,.nw-stage .nw-mvblock,.nw-stage .nw-skwrap,
  .nw-stage .nw-skread,.nw-stage .nw-foot,.nw-stage .nw-cuerow.nw-strip{display:none !important}
  .nw-stage{box-shadow:none;border-radius:0;padding:0;min-height:0;height:auto;max-width:none}
  .nw-lyrfull{display:block !important;overflow:visible;height:auto}
  .nw-lyrfull .nw-ln b{color:#000 !important;font-size:15pt;line-height:1.5}
}
