/* ===================================================================
   BLOCK — block-only rules (BLOCK-SPEC@REV1b; TIE-IN-DEV-BLOCK-M0 step 1.2)

   Loads LAST, after public/dev.css, design/dev-board.css and the skins
   (section 17.3). It adds the 3D stage and nothing the design system
   already has: every face is built from db-* classes, and every colour
   here is a token. There is not one hex value in this file, which is the
   point — the block inherits day, night and v0 for free.

   K11 is the constraint that shapes the whole sheet. Inside the
   perspective container, an element with `transform-style: preserve-3d`
   is forced back to `flat` if it carries overflow other than visible, a
   filter, opacity below 1, a clip-path, a mask or a blend mode. Any one
   of them, anywhere between the stage and a face, collapses the block to
   a picture of itself. So:

     - faces do NOT clip; the inner `.db-face-scroll` does
     - faces are SHADED with background-color, never with a filter
     - the dim, the lift panel and the options panel are all OUTSIDE the
       3D subtree, which is why they may have shadows and scrollers
   =================================================================== */

/* ---- the scene ----------------------------------------------------- */

html, body { margin: 0; height: 100%; }
body.db {
  overflow: hidden;              /* outside the 3D context — see the header */
  background: var(--page-sky, var(--paper));   /* MEND MN2 — the hour's sky (reveal.js), never paper cream */
  color: var(--ink);
}

.block-scene { position: relative; width: 100vw; height: 100vh; }

.block-sky { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the shore the block stands on (K1). A flat wash in tokens until M1
   replaces the whole backdrop with the saver scene. */
.block-water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(var(--water-near), var(--water-far));
}
/* The scene's own palette. It is declared per theme rather than reused
   from the type tokens, because the type tokens INVERT between day and
   night — `--ink` is near-black on paper and cream under lamplight — and
   a sky built from them comes out upside down at dusk. These five always
   run dark-to-light in the same direction, whatever the theme. */
:root {
  --sky-a: var(--paper); --sky-b: var(--surface-sunk); --sky-c: var(--band); --sky-d: var(--paper);
  --scene-far: var(--surface-sunk); --scene-near: var(--surface); --scene-lit: var(--ink);
  --water-near: var(--rule-strong); --water-far: var(--surface-sunk);
  --ground-shade: var(--paper); --ground-lit: var(--ink-2); --paper-veil: 72%;
  /* BALLOON-SPEC BN2 / BN16 — scene tokens, per theme, for the ground's reason; FPO */
  --wicker: color-mix(in srgb, var(--gold) 34%, var(--surface-sunk)); --wicker-shade: color-mix(in srgb, var(--gold) 22%, var(--paper)); --rig-line: var(--ink-2);
  --balloon-a: var(--gold); --balloon-b: color-mix(in srgb, var(--gold) 35%, var(--ink));
  --envelope: var(--oxblood);   /* COMPANION-SPEC CB3 — the companion's one colour, the brand oxblood; FPO */
  /* COMPANION-SPEC AS4 / AS5 (REV2e) — the airship's hull in the brand's sage green (the lid's `green`) and the dark ink of its lettering; FPO */
  --airship: var(--green); --airship-ink: var(--paper);
}
[data-theme="day"] {
  --sky-a: var(--surface-sunk); --sky-b: var(--rule); --sky-c: var(--gold); --sky-d: var(--paper);
  --scene-far: var(--rule-strong); --scene-near: var(--ink-3); --scene-lit: var(--paper);
  --water-near: var(--green); --water-far: var(--rule-strong);
  --ground-shade: var(--ink); --ground-lit: var(--paper); --paper-veil: 0%;
  --wicker: color-mix(in srgb, var(--gold) 46%, var(--paper)); --wicker-shade: color-mix(in srgb, var(--gold) 52%, var(--ink)); --rig-line: var(--ink-2);
  --balloon-a: var(--gold); --balloon-b: color-mix(in srgb, var(--gold) 35%, var(--paper)); --envelope: var(--oxblood); --airship: var(--green); --airship-ink: var(--ink);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --sky-a: var(--surface-sunk); --sky-b: var(--rule); --sky-c: var(--gold); --sky-d: var(--paper);
    --scene-far: var(--rule-strong); --scene-near: var(--ink-3); --scene-lit: var(--paper);
    --water-near: var(--green); --water-far: var(--rule-strong);
    --ground-shade: var(--ink); --ground-lit: var(--paper); --paper-veil: 0%;
    --wicker: color-mix(in srgb, var(--gold) 46%, var(--paper)); --wicker-shade: color-mix(in srgb, var(--gold) 52%, var(--ink)); --rig-line: var(--ink-2);
    --balloon-a: var(--gold); --balloon-b: color-mix(in srgb, var(--gold) 35%, var(--paper)); --envelope: var(--oxblood); --airship: var(--green); --airship-ink: var(--ink);
  }
}
[data-theme="v0"] {
  --sky-a: var(--surface-sunk); --sky-b: var(--rule); --sky-c: var(--rule-strong); --sky-d: var(--paper);
  --scene-far: var(--rule-strong); --scene-near: var(--ink-3); --scene-lit: var(--paper);
  --water-near: var(--surface-sunk); --water-far: var(--rule-strong);
  --ground-shade: var(--ink); --ground-lit: var(--paper); --paper-veil: 0%;
  --wicker: color-mix(in srgb, var(--gold) 46%, var(--paper)); --wicker-shade: color-mix(in srgb, var(--gold) 52%, var(--ink)); --rig-line: var(--ink-2);
  --balloon-a: var(--gold); --balloon-b: color-mix(in srgb, var(--gold) 35%, var(--paper)); --envelope: var(--oxblood); --airship: var(--green); --airship-ink: var(--ink);
}

/* ---- the stage ----------------------------------------------------- */

/* K2 — the perspective-origin is the VANISHING POINT, and the solver
   projects about the block's own centre. They have to be the same point.

   50% 42% was the mock's composition and it is what made the rendered
   diamond disagree with the solved one: a projection expands about the
   origin, so a point at depth z lands at o + (y - o)*k rather than at y*k,
   and every corner of the lid moves by o*(1 - k) — different per corner,
   because k is. Measured at REST on an 800x919 viewport, that stretched
   h/w from the solved 0.264 to 0.330 against the logo's 0.262, six times
   the tolerance the spec binds it to, while the HUD went on reporting the
   solver's own number. block.js rewrites this per layout to the block's
   centre (see `aimPerspective`); the value here is the fallback for the
   first frame, and `50% 50%` is the only one that is not a lie. */
.block-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  perspective: 2400px;
  perspective-origin: 50% 50%;
  --face-inset: var(--space-24);
  --face-text-scale: 1;
  --move-ms: 600ms;
}

.block {
  position: relative;
  transform-style: preserve-3d;
  /* No `will-change: transform` here, on purpose. Left on permanently it
     keeps the block on its own composited layer, and Chrome then hit-tests
     the faces against a STALE transform — the block draws rotated while
     clicks land as though it were square on, so the left face is
     unreachable and the right face swallows the whole stage. Measured in
     Chrome 2026-09-19; the reference mock has the same fault. The hint is
     applied for the length of a move and taken off again (see block.js). */
}
/* FOCUS (K9): the block steps back behind the panel. A background wash on
   the scene does the dimming — opacity on the block itself would flatten
   every face inside it. */
.block-dim {
  position: absolute; inset: 0; z-index: 4;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}
.block-dim.is-on { opacity: .55; pointer-events: auto; }

/* ---- faces ---------------------------------------------------------- */

.block-face {
  position: absolute;
  box-sizing: border-box;
  background-color: var(--surface);
  color: var(--ink);
  /* K17 RASTER — a wall's box is S × its solved size and scaled back by 1/S
     (layout()), so a length written in wall px is × `--raster` to draw the
     same on screen. The lid carries no `--raster` and takes the 1. */
  border: calc(var(--line-hair) * var(--raster, 1)) solid var(--rule-strong);
  /* NO overflow, NO filter, NO opacity — K11 */
}
/* K17 RASTER — the four corner probes solveRaster() reads M from */
.block-face__probe { position: absolute; width: 0; height: 0; pointer-events: none; }
/* Shading by background, not by filter: the two faces that turn away from
   the light read darker because they ARE darker, not because a filter has
   flattened them. */
/* `background-color`, not the shorthand: the shorthand resets
   `background-image`, and the walls carry the newsprint in theirs. */
.block-face[data-face="L"], .block-face[data-face="BR"] { background-color: var(--surface-sunk); }
.block-face:not(.is-facing) { background-color: var(--surface-sunk); }

/* ---- NEWSPRINT (Ilya, REV2b: "add some newspaper texture to the sides") --

   The walls are the paper the brief is printed on, so they are printed
   stock, not a flat fill. Three layers over the wall's own colour, all of
   them drawn rather than fetched (S1: no images, no network):

   SECOND ATTEMPT (REV2c). The first had a 4px HALFTONE dot grid, and Ilya's
   verdict was exact: "thats not newspaper texture ... not the right texture
   and its poor quality as well." Both halves were true. Halftone dots belong
   to printed PHOTOGRAPHS, not to the paper they are printed on, so a dot
   screen across the whole sheet is the wrong texture; and a regular 4px grid
   under a 3D transform aliases into a screen-door moire, on a 220px tile
   that the perspective then magnified into mush.

   Newsprint is uncoated groundwood pulp, and what that looks like is three
   things at three scales, all irregular:

     MOTTLE  — low-frequency unevenness in the sheet's tone (0.02). Faint:
               at any strength you can name it reads as concrete.
     FIBRE   — fine high-frequency grain (1.3). This is most of the effect.
     FLECKS  — sparse dark specks of bark and ink, slightly elongated
               (0.6 x 0.2), thresholded hard so there are only a few.

   One inline SVG, three turbulence filters, drawn not fetched (S1). An SVG
   filter primitive inside a background IMAGE is not a CSS filter on the
   element, so it flattens nothing (K11). The tile is 512px shown at 256 —
   twice the density — so it stays sharp when the perspective, or NORMAL's
   dolly, magnifies the wall.

   Under it, a 4% wash of `--ink` greys the stock toward newsprint's own
   grey-beige. Over it, a VEIL of the wall's colour at `--paper-veil`: the
   noise is a warm mid-grey, which darkens a pale wall and LIGHTENS a dark
   one, so by lamplight the same tile turns to stone. The veil is 0 by day
   and most of the way closed at night — a scene token, per theme, beside
   the sky's.

   Walls only: the lid is enamel (the mark), not paper. K12 `plain walls`
   turns it off. */
.block-stage:not(.is-plain-walls) .block-face[data-face] {
  background-image:
    linear-gradient(color-mix(in srgb, var(--surface-sunk) var(--paper-veil, 0%), transparent), color-mix(in srgb, var(--surface-sunk) var(--paper-veil, 0%), transparent)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512'><filter id='m' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.02' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.40  0 0 0 0 0.33  0 0 0 0 0.24  0 0 0 0.42 -0.15'/></filter><filter id='g' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.30  0 0 0 0 0.27  0 0 0 0 0.22  0 0 0 0.62 -0.20'/></filter><filter id='f' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.6 0.2' numOctaves='2' seed='23' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.20  0 0 0 0 0.17  0 0 0 0 0.13  0 0 0 8 -5.75'/></filter><rect width='512' height='512' filter='url(%23m)'/><rect width='512' height='512' filter='url(%23g)'/><rect width='512' height='512' filter='url(%23f)'/></svg>"),
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent), color-mix(in srgb, var(--ink) 4%, transparent));
  background-size: 100% 100%, calc(256px * var(--raster, 1)) calc(256px * var(--raster, 1)), 100% 100%;
  background-repeat: no-repeat, repeat, no-repeat;
}

/* K3 — THE LID IS THE MARK, BOTH KITES OF IT. The logo is two diamonds: a
   thin gold OUTER outline, and inside it the green kite, stroked heavier in
   gold, that the lettering lives in. At REST the lid projects to a kite
   (K2), so:

     the LID'S EDGE     is the outer outline  — 1.2 units on 361 wide;
     the RIM            is the band between them, and carries the menu;
     the INNER DIAMOND  (.block-centre, 3/5 of the side) is the green kite
                        — 4 units on 306 wide — and K3a registers the
                        lettering inside THAT, not inside the lid.

   The first REV2b build painted the whole lid green and registered against
   it; the word came out 1/0.6 too big and sat on the menu. Ilya: "you have
   it justified to the wrong diamond."

   `--green` and `--gold` are the design system's tokens and are already the
   mark's own values (5F8A70, C9A45C), the same in every theme: a logo does
   not change colour at dusk. Strokes are shares of the lid's side
   (`font-size` is set to it), converted from shares of a kite's width —
   which at 45 degrees is the square's DIAGONAL — by root two. */
.block-face--top {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 1fr 3fr 1fr;
  transform-style: preserve-3d;
  border: 0.0047em solid var(--gold);
  font-size: var(--lid-side, 420px);   /* so the stroke can be a share of the side */
  touch-action: none;                 /* the drag-to-turn handle (A2) */
  cursor: grab;
}
.block-face--top:active { cursor: grabbing; }
/* Stated with the `:not(.is-facing)` it has to beat: the lid never carries
   `is-facing` (that is the walls' business), so the rule above that sinks a
   turned-away wall would otherwise repaint the lid as one. */
/* THE RIM IS THE MARK'S OXBLOOD GROUND (Ilya, REV2b: "make the outer part of
   the top diamond oxblood"). `--oxblood` is the design system's token and
   the logo's own 6B2430, constant across themes like the green and gold. */
.block-face--top, .block-face--top:not(.is-facing) { background: var(--oxblood); }

/* K11's prescribed clip: an INNER scroller, so the face itself stays
   unclipped and the 3D subtree survives.

   K4/K5a — `--wall-spread` is how far the wall's BASE edge sits outside
   its top edge, written per wall by layout(). Insetting by it leaves a
   content box exactly as wide as the wall's TOP, centred, full height:
   square on the ruled cube. A trapezoid only widens going down, so that
   box lies inside the wall at every height and the taper's clip can never
   reach the text. Without it the box grew with the base — the top lines
   were sliced diagonally by the clip, and at the shared corner each wall's
   text ran to its own element edge and the two read as colliding.

   So the taper adds SPACE, it does not re-flow the text: the column is the
   same width at every taper, and what grows is the margin around it. */
/* K17 (REV2n) — the scroller IS the face viewport: 909 CSS px wide. 1136
   is what the text box covers on screen at NORMAL on a 1920×1080 window
   (text 1:1 when read); Ilya 2026-09-22 "increase the text size 25%" made
   it 1136 / 1.25, so the ramp stays exact and the type draws 25% larger.
   As tall as the wall's text box at that width, scaled onto the wall by
   `--fv-k` (the wall's top width ÷ 909, written by layout() with the
   spread). A 2D box inside the face; its transform flattens only its own
   2D children, never the 3D subtree (K11). `inset` still pins it to the
   spread on the left; the fixed width wins over the right edge. Density
   is a property of the face, not of the window: the viewport's size
   depends only on the block's shape. */
.db-face-scroll {
  position: absolute; inset: 0 var(--wall-spread, 0px);
  width: 909px; height: calc(100% / var(--fv-k, 1)); box-sizing: border-box;
  transform-origin: 0 0; transform: scale(var(--fv-k, 1));
  overflow: auto;
  padding: var(--face-inset);
  font-size: calc(13px * var(--face-text-scale));
  /* REV2 — a wall NEVER scrolls. A preview is sized to fit by construction
     (three rows, capped in preview.js), and what does not fit is what the
     fullscreen page is for. This also retires the scrollbar that used to
     run down the wall's edge beside the seam. */
  overflow: hidden;
}
.db-face-scroll.is-flat { position: static; overflow: visible; padding: 0; font-size: 13px; width: auto; height: auto; transform: none; }

/* K17 — the face ramp, in viewport px (tokens.json type group "Face";
   dev-board.css carries them after the next design export). Each size is
   × the K12 face text scale, default 1. Only these, and 28/32 (`counter`)
   for at most one display figure. */
.block-face {
  --fr-headline: calc(20px * var(--face-text-scale)); --fr-headline-lh: calc(24px * var(--face-text-scale));
  --fr-body: calc(13px * var(--face-text-scale));     --fr-body-lh: calc(18px * var(--face-text-scale));
  --fr-meta: calc(11px * var(--face-text-scale));     --fr-meta-lh: calc(15px * var(--face-text-scale));
  --fr-caption: calc(10px * var(--face-text-scale));  --fr-caption-lh: calc(14px * var(--face-text-scale));
}

/* ---- the PREVIEW (K4, REV2) --------------------------------------------

   One shape for every wall: a headline, one line, at most three rows, and
   the name of the page it opens. Sized to be read FROM REST — across the
   room, foreshortened, at 45 degrees — not to be read at all once you
   have walked up to it, because by then the page has opened.

   Every size is RELATIVE (K4c) so K12's face text scale moves all of it.

   This block replaces the REV1g "face-local trims" of the system's ledger
   and queue rows (K4b). Those rules existed to make a 960px table and a
   nowrap row survive in a 348px column; no wall carries either any more,
   so they are gone rather than kept for a component that cannot appear. */
.block-pv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.block-pv__headline {
  font: 400 var(--fr-headline)/var(--fr-headline-lh) var(--font-serif);
  color: var(--ink);
  margin: var(--space-8) 0 var(--space-4);
  overflow-wrap: break-word;
}
.block-pv__line {
  font: italic 400 var(--fr-body)/var(--fr-body-lh) var(--font-serif);
  color: var(--ink-2);
  margin: 0 0 var(--space-12);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.block-pv__rows {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  list-style: none; margin: 0; padding: 0;
  border-top: var(--line-hair) solid var(--rule-strong);
}
.block-pv__row {
  display: flex; align-items: center; gap: var(--space-12);
  padding: var(--space-8) 0;
  border-bottom: var(--line-hair) solid var(--rule);
  min-width: 0;
}
.block-pv__row .db-st { flex: none; }
/* K17 — Projects is text-heavy: two columns, column 1 then 2 (column-fill:
   auto against the list's fixed height), rows never split. Other walls one. */
.block-face[data-page="projects"] .block-pv__rows { columns: 2; column-gap: var(--space-24); column-fill: auto; }
.block-face[data-page="projects"] .block-pv__row { break-inside: avoid; }
/* K17 — the meta line under a row title, on the face ramp */
.block-pv__tag { font: 600 var(--fr-meta)/var(--fr-meta-lh) var(--font-sans); }
.block-pv__what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.block-pv__title {
  font: 600 var(--fr-body)/var(--fr-body-lh) var(--font-sans);
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.block-pv__tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-pv__foot {
  margin: auto 0 0;                   /* the door sits at the wall's foot */
  padding-top: var(--space-12);
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-8);
  font: 500 var(--fr-caption)/var(--fr-caption-lh) var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.block-pv__open { color: var(--accent); white-space: nowrap; }

/* K9 — the whole wall is the door, and says so. */
.block-face.is-door { cursor: pointer; }
.block-face.is-door.is-facing:hover .block-pv__open { text-decoration: underline; }

/* ---- the FACE PAGE (K15; COLUMN-LAYOUT-SPEC section 7) ------------------

   A newspaper FRONT page: masthead, two columns of headed units under
   spanning sub-heads, folio. facepage.js solves how many units fit and
   draws only those, so nothing here clamps a COUNT — the two line clamps
   below are 7.3's "head + at most four lines", which the solver has already
   measured with them applied.

   TEXTURE (section 4, host-mapped per S7/O-5 — the board's tokens, never the
   site's fonts): heads and body in the system's serif, sub-heads in its
   label sans, kicker and folio in its mono; every rule is `--line-hair`.
   Justified ONLY with hyphens on (S5), and `hyphens: auto` only works
   because the page root carries `lang`. Under 30ch the body is set ragged
   right instead (R5/O-4) — facepage.js measures that and says so.

   NO MARGINS on anything the solver measures: a unit's `offsetHeight` has to
   be its whole cost, so spacing is padding and the close rule is a border.
   Every size is RELATIVE (K4c), which is what makes K12's face text scale
   change the unit count rather than crop the page. */
.block-fp {
  --fp-gap: var(--space-16);
  position: relative;
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
}
.block-fp__masthead {
  margin: 0; padding: var(--space-2) 0 var(--space-4);
  border-top: var(--line-hair) solid var(--ink);          /* R7 — entry rule */
  border-bottom: var(--line-hair) solid var(--rule-strong);
  font: 400 var(--fr-headline)/var(--fr-headline-lh) var(--font-serif);
  letter-spacing: .02em; text-align: center; color: var(--ink);
}
/* FRONT-SPEC F3 — "generated at" under the masthead's name, inside it so the
   solver's measured masthead height includes it; STALE is a word as well as
   a StatusMark, so it reads without colour */
.block-fp__stamp {
  display: block; margin-top: var(--space-2);
  font: 500 var(--fr-caption)/var(--fr-caption-lh) var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.block-fp__stamp.is-stale { color: var(--ink-2); }
/* O-K36 — an empty section's calm line, no head over it */
.block-fp__calm { font-style: italic; }
.block-fp__page { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.block-fp__subhead {
  margin: 0; padding: var(--space-8) 0 var(--space-2);
  border-bottom: var(--line-hair) solid var(--rule-strong);
  font: 600 var(--fr-caption)/var(--fr-caption-lh) var(--font-sans);
  letter-spacing: .14em; text-transform: uppercase; text-align: center;
  color: var(--ink-2);
}
.block-fp__band {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--fp-gap); align-items: start;
}
/* an un-sectioned page fills column 1 to the foot, so its rule runs there too */
.block-fp__band[data-fill] { flex: 1 1 auto; }
/* R6 — the column rule, down the middle of the gap */
.block-fp__band::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  border-left: var(--line-hair) solid var(--rule-strong);
}
.block-fp__col { min-width: 0; }
.block-fp__unit {
  padding: var(--space-8) 0;
  border-bottom: var(--line-hair) solid var(--rule);      /* R2 — its own close */
}
.block-fp__head {
  margin: 0; padding-bottom: var(--space-2);
  font: 700 var(--fr-body)/var(--fr-body-lh) var(--font-serif); color: var(--ink);
  overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.block-fp__body {
  margin: 0;
  font: 400 var(--fr-body)/var(--fr-body-lh) var(--font-serif); color: var(--ink-2);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.block-fp.is-ragged .block-fp__body { text-align: left; }
.block-fp__kicker {
  font: 500 var(--fr-caption)/var(--fr-caption-lh) var(--font-mono);
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.block-fp__folio {
  margin: 0; padding-top: var(--space-4);
  border-top: var(--line-hair) solid var(--ink);          /* R7 — exit rule */
  display: flex; justify-content: space-between; gap: var(--space-8);
  font: 500 var(--fr-caption)/var(--fr-caption-lh) var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap;
}
.block-fp__probe { position: absolute; left: 0; top: 0; width: 100%; visibility: hidden; pointer-events: none; }
/* 7.3 — each unit is a door, and says so once the wall is facing you */
.block-face.is-door.is-facing .block-fp__unit:hover .block-fp__head { text-decoration: underline; }

.db-face__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-8);
  border-bottom: var(--line-hair) solid var(--rule);
  padding-bottom: var(--space-4);
  margin: var(--space-16) 0 var(--space-8);
}
.db-face__head:first-child { margin-top: 0; }
/* B12 / A3 — the one calm line an empty section gets. */
.db-face__empty {
  color: var(--ink-3);
  font: italic 400 var(--fr-body)/var(--fr-body-lh) var(--font-serif);
  margin: var(--space-8) 0 var(--space-16);
}
.db-block-pointer { margin-top: var(--space-16); }

/* K9 — what can be lifted says so on hover, and only on the face. */
.is-liftable { cursor: pointer; }
.is-liftable:hover { background: var(--pend-wash); }

/* ---- the ground (K1a) ------------------------------------------------ */

/* K1 says the block STANDS on the shore. Until REV2a it hovered: there was
   no plane under it, so below the base edges the scene simply carried on.

   THREE LAYERS, because the first build had one and it was not enough. A
   contact shadow alone is a dark mark on a dark shore at night — correct,
   and invisible; Ilya's question on seeing it was "how come I'm not getting
   the floor?", which is the only review a floor needs. So:

     1. the CONTACT SHADOW, hugging the footprint — what says "touching";
     2. a LIT PAD, a soft disc of `--ground-lit` — what says "a surface";
     3. one engraved RING near the pad's edge — what makes it a PLACE
        rather than a smudge, and it is the instrument's own vocabulary:
        the dial, the ATLAS half-dial, a plinth's scribed circle.

   A circle in perspective is an ellipse, so none of this draws a second
   HORIZON across the scene's own — which is what a straight-edged slab
   would do, and would show every time the block turned.

   `--foot` is how much of the plane the footprint covers (written by
   layout(), which also caps the plane by the camera). Both colours are
   SCENE tokens declared per theme beside the sky's, for the sky's reason:
   the type tokens invert between day and night, and a shadow made of
   `--ink` is a glow at dusk.

   A leaf in the 3D subtree: no children, so the gradients' transparency
   flattens nothing (K11). It takes no pointer events — the walls are doors
   (K9) and the ground must never be one. */
.block-ground {
  position: absolute;
  pointer-events: none;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--ground-shade) 78%, transparent) 0,
      color-mix(in srgb, var(--ground-shade) 62%, transparent) var(--foot, 45%),
      transparent min(calc(var(--foot, 45%) * 1.45), 97%)),
    radial-gradient(closest-side,
      transparent 89.2%,
      color-mix(in srgb, var(--ground-lit) 38%, transparent) 90%,
      color-mix(in srgb, var(--ground-lit) 38%, transparent) 90.6%,
      transparent 91.6%),
    radial-gradient(closest-side,
      color-mix(in srgb, var(--ground-lit) 20%, transparent) 0,
      color-mix(in srgb, var(--ground-lit) 15%, transparent) 78%,
      transparent 100%);
}

/* K10a — the pad fades out at IDLE (O-SV-13: "may"). Opacity on the pad
   ITSELF: it is a leaf of the 3D subtree, so it flattens nothing but its
   own gradient, which is flat already. Never on an ancestor (K11). */
.block-ground { transition: opacity 2s ease; }
body[data-preset="IDLE"] .block-ground { opacity: 0; }
body[data-preset="INLAND"] .block-ground { opacity: 0; }   /* O-TS-16 (b): INLAND draws the block as IDLE does */

/* K1 (REV2e) — the live scene. `#skyline` is a SIBLING of the stage,
   beneath it; skyline.js creates it only when the saver runs, and the
   saver fills it with one wrapper of its own. Nothing here goes on
   .block-scene or anything above it (K11). */
.block-skyline { position: absolute; inset: 0; pointer-events: none; }
/* SCOPE-SPEC REV0a SC2/SC3 (TIE-IN-DEV-SCOPE-M0) — a scene widget's canvas,
   a slot skyline.js appends INSIDE #skyline after the saver's wrapper: it
   stacks above the WebGL canvas and below the stage by DOM order alone. No
   z-index, no flattening property, no pointer (K11, SC2). The bitmap size
   is the slot's (skyline.js, on the saver's resize path); this is the box. */
.block-skyline canvas.block-scope { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* SAVER-SPEC S5c — the block's own vertical camera slider, left edge,
   vertically centred, outside the 3D subtree. Type is the system's
   (db-ovl on an overlay chip); this only places it. */
.block-lift {
  position: absolute; left: var(--space-24); top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-8);
}
.block-lift__range {
  writing-mode: vertical-lr; direction: rtl; height: 28vh; width: 24px; margin: 0;
  accent-color: var(--gold); cursor: ns-resize;
}
body.has-panel .block-lift { display: none; }

/* K12 `ground: fade` — the walls dissolve toward the foot instead. A mask on
   the WALL ITSELF is K11b's second self-applied property and costs what the
   taper's clip costs: nothing, since a wall's content already lies in its
   plane. The far walls' content is hidden while it is turned away, or the
   fade would show it through the near walls, mirrored. */
.is-ground-fade .block-face[data-face] {
  -webkit-mask-image: linear-gradient(to bottom, black 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 62%, transparent 100%);
}
.is-ground-fade .block-face[data-face]:not(.is-facing) .db-face-scroll { visibility: hidden; }

/* ---- BALLOON-SPEC — the block as a balloon basket (BN2, BN4, BN15, BN16)

   Everything below is behind `.is-balloon` on the stage, which layout()
   sets only in balloon form; in `ground` form (BN7) none of it applies and
   the walls are the newsprint above, on K1a's floor.

   BN16 THE WEAVE. A calm engraved basket, stake and strand: each weaver
   passes in front of one stake and behind the next, so what shows is rows
   of short rounded segments, staggered half a cell row by row, with the
   darker cane between them where a weaver goes under. Each segment is one
   radial gradient whose ellipse fits its half of a two-row tile exactly
   (closest-side from a centre a quarter of the tile down), the second row
   offset by half a cell; a hairline under each row; a mid tone beneath.
   Gradients only — no image and nothing fetched (the design system's
   rule). `--wv` is its strength (the `weave` row on the walls and corners,
   `weave under page` on the page's plate), carried into every tone by
   color-mix so 0 draws nothing. `--dim` darkens the sides K5-paper already
   carries darker. Lengths are wall px × the wall's `--raster` (K17d), so a
   cell is the same on screen at any S: 18 × 7, at least 6 screen px at
   REST on a 1080p window. The image list is a custom property declared on
   each element that draws it, so `--wv` resolves there, not on the stage. */
.block-stage.is-balloon .block-face[data-face],
.block-stage.is-balloon .block-facet,
.block-stage.is-balloon .db-face-scroll::before {
  --wv-r: var(--raster, 1);
  --wv-w: calc(18px * var(--wv-r));
  --wv-h: calc(7px * var(--wv-r));
  --wv-t: calc(1px * var(--wv-r));
  --wv-pil: color-mix(in srgb, var(--wicker) calc(var(--wv, 1) * 100%), transparent);
  --wv-mid: color-mix(in srgb, color-mix(in srgb, var(--wicker) 45%, var(--wicker-shade)) calc(var(--wv, 1) * 100%), transparent);
  --wv-ink: color-mix(in srgb, var(--wicker-shade) calc(var(--wv, 1) * 70%), transparent);
  --wv-dim: color-mix(in srgb, var(--wicker-shade) calc(var(--dim, 0) * var(--wv, 1) * 26%), transparent);
  --weave-img:
    linear-gradient(var(--wv-dim), var(--wv-dim)),
    radial-gradient(ellipse closest-side at 50% 25%, var(--wv-pil) 0, var(--wv-pil) 42%, transparent 100%),
    radial-gradient(ellipse closest-side at 50% 75%, var(--wv-pil) 0, var(--wv-pil) 42%, transparent 100%),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--wv-h) - var(--wv-t)), var(--wv-ink) calc(var(--wv-h) - var(--wv-t)) var(--wv-h)),
    linear-gradient(var(--wv-mid), var(--wv-mid));
  --weave-size: auto, var(--wv-w) calc(var(--wv-h) * 2), var(--wv-w) calc(var(--wv-h) * 2), auto, auto;
  --weave-pos: 0 0, 0 0, calc(var(--wv-w) / 2) 0, 0 0, 0 0;
}
.block-stage.is-balloon .block-face[data-face],
.block-stage.is-balloon .block-facet { --wv: var(--weave, 1); }
.block-stage.is-balloon .block-face[data-face] {
  background-color: var(--surface);
  background-image: var(--weave-img);
  background-size: var(--weave-size);
  background-position: var(--weave-pos);
  background-repeat: repeat;
  --plate: var(--surface);
}
/* the two walls K5-paper carries darker, and a wall turned away */
.block-stage.is-balloon .block-face[data-face="L"],
.block-stage.is-balloon .block-face[data-face="BR"],
.block-stage.is-balloon .block-face[data-face]:not(.is-facing) {
  background-color: var(--surface-sunk);
  --plate: var(--surface-sunk);
  --dim: 1;
}

/* BN15 — a corner facet: a leaf of the block, placed by its own matrix3d
   from the block's top-left (block.js layoutFacets). Weave at full
   strength, shaded by how far it faces the darker side (`--shade`). No
   text, no pointer — the walls are the doors (K9). */
.block-facet {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  pointer-events: none;
  box-sizing: border-box;
}
.block-stage.is-balloon .block-facet {
  --dim: var(--shade, 0);
  background-color: var(--surface);
  background-image: var(--weave-img);
  background-size: var(--weave-size);
  background-position: var(--weave-pos);
}

/* BN15 / BN16 — THE PAGE IS A PLATE MOUNTED ON THE BASKET. Its box is the
   wall's flat part at its narrowest plus the inset (layout() writes the
   face viewport's width for it, `--fv-wall`, at the type's own scale), and
   its ground is its own: K5-paper's newsprint, moved off the wall onto a
   plate a quarter of the inset inside the box (Ilya 2026-10-06: "get the
   sheet to be wider") — so the weave shows in the margin
   and on the corners, and with `weave under page` at 0 the page reads on
   the paper it always did (K17, K17d untouched). The plate sits behind the
   page's content in the scroller's own stacking context (its transform). */
.block-stage.is-balloon .block-face .db-face-scroll { width: var(--fv-wall, 909px); }
.block-stage.is-balloon .db-face-scroll::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: calc(var(--face-inset) / 4);
  --wv: var(--weave-under, 0);
  --np: calc(256px * var(--raster, 1) / var(--fv-k, 1));
  background-color: var(--plate, var(--surface));
  background-image:
    var(--weave-img),
    linear-gradient(color-mix(in srgb, var(--surface-sunk) var(--paper-veil, 0%), transparent), color-mix(in srgb, var(--surface-sunk) var(--paper-veil, 0%), transparent)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512'><filter id='m' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.02' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.40  0 0 0 0 0.33  0 0 0 0 0.24  0 0 0 0.42 -0.15'/></filter><filter id='g' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.30  0 0 0 0 0.27  0 0 0 0 0.22  0 0 0 0.62 -0.20'/></filter><filter id='f' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.6 0.2' numOctaves='2' seed='23' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.20  0 0 0 0 0.17  0 0 0 0 0.13  0 0 0 8 -5.75'/></filter><rect width='512' height='512' filter='url(%23m)'/><rect width='512' height='512' filter='url(%23g)'/><rect width='512' height='512' filter='url(%23f)'/></svg>"),
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent), color-mix(in srgb, var(--ink) 4%, transparent));
  background-size: var(--weave-size), 100% 100%, var(--np) var(--np), 100% 100%;
  background-position: var(--weave-pos), 0 0, 0 0, 0 0;
  background-repeat: repeat;
  box-shadow: 0 0 0 calc(1px / var(--fv-k, 1)) var(--rule-strong);
}
/* `plain walls` (K12) is a plain plate in balloon form */
.block-stage.is-balloon.is-plain-walls .db-face-scroll::before {
  background-image: var(--weave-img);
  background-size: var(--weave-size);
  background-position: var(--weave-pos);
}

/* BN4 — the one cast shadow, on K1a's ground element (block.js castShadow):
   soft, no pad, no ring, its strength from the sun (`--shadow-a`). */
.block-ground.is-cast {
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--ground-shade) calc(var(--shadow-a, 0) * 46%), transparent) 0,
    color-mix(in srgb, var(--ground-shade) calc(var(--shadow-a, 0) * 30%), transparent) 50%,
    transparent 100%);
}

/* BN2 — the rigging's overlay: the stage's own size, flat, beneath the
   block in paint order, never a door. Lines of one width whatever the
   window: `rope thickness`, 5 px by default (REV0l; block.js sets --rig-w;
   REV0k — Ilya: "make them 5 pixels"; REV0j 2 px, "a bit
   thicker so you can see them": the 1 px hairline was lost against the sky). */
.block-rig {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.block-rig line { stroke-width: var(--rig-w, 5px); stroke-linecap: round; vector-effect: non-scaling-stroke; fill: none; }

/* ---- the rim (K3, A2) ------------------------------------------------ */

.block-rim {
  display: flex; align-items: center; justify-content: space-around;
  /* gold hairlines on the green, the mark's own two colours; the lid's
     font-size is its side length (for the stroke), so the rim states its
     own size in px rather than inheriting that */
  border: var(--line-hair) solid color-mix(in srgb, var(--gold) 45%, transparent);
  /* F5 — `--rim-fit` (block.js fitRim) shrinks an edge's text to fit it;
     the edge never grows to fit the text. The tracks are px (block.js) and
     an edge's min size is 0, so no label can move the lid; no overflow
     clip here, which K11 bans inside the 3D subtree. */
  font: 600 calc(11px * var(--rim-fit, 1))/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  min-width: 0; min-height: 0;
}
/* FRONT-SPEC F5 — four EDGES (the middle track of each side) carry the nav
   cells; the four corners are the diamond's POINTS, which hold the turns and
   the rim toggle. The edges used to span the corners. */
.block-rim--tl { grid-column: 2; grid-row: 1; }
.block-rim--bl { grid-column: 2; grid-row: 3; }
/* The side edges run their labels ALONG the edge, as the front and back
   edges do, so every label on the lid lies on its own edge and reads at the
   diamond's 45 degrees at REST. Vertical writing turns the text a quarter in
   the lid's own plane; the left edge is turned a half more so both side
   edges read from the diamond's near side out. */
.block-rim--l { grid-column: 1; grid-row: 2; writing-mode: vertical-rl; }
.block-rim--r { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; }
.block-rim-pt { justify-content: center; }
.block-rim-pt--bl { grid-column: 1; grid-row: 1; }
.block-rim-pt--br { grid-column: 3; grid-row: 1; }
.block-rim-pt--fl { grid-column: 1; grid-row: 3; }
.block-rim-pt--fr { grid-column: 3; grid-row: 3; }
/* Half the rim is <a> and half is <button> — a page cell navigates, a turn
   cell and Settings act on this page — so the cell resets the button
   chrome and both elements read as one row of engraved labels. */
.block-rim__cell {
  padding: calc(var(--space-4) * var(--rim-fit, 1)) calc(var(--space-8) * var(--rim-fit, 1));
  /* gold on oxblood, the mark's own pairing. It used to be `--ink-2`, which
     inverts with the theme and is near-black on oxblood by day. */
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
/* FRONT-M0 — a rim cell that is a LINK must outrank the system's `.db a`
   (accent = oxblood by day, the rim's own colour: the label vanished) */
.db a.block-rim__cell { color: var(--gold); text-decoration: none; }
.block-rim__cell:hover, .block-rim__cell:focus-visible, .db a.block-rim__cell:hover, .db a.block-rim__cell:focus-visible { color: var(--paper); }
.block-rim__cell[aria-pressed="true"] { color: var(--accent); text-decoration: underline; }
.block-rim__cell[aria-disabled="true"] { color: color-mix(in srgb, var(--gold) 45%, transparent); cursor: not-allowed; }

.block-centre {
  grid-column: 2; grid-row: 2;
  display: flex; align-items: center; justify-content: center;
  transform-style: preserve-3d;
  /* the mark's green kite: 4 units of gold on a kite 305.8 wide is 1.31% of
     its width, 1.85% of its side, and its side is 3/5 of the lid's */
  background: var(--green);
  border: 0.0111em solid var(--gold);
}
/* (REV2b — the small engraved diamond that used to mark where the sign
   stands is gone: the whole lid is the diamond now, and a second, smaller
   one inside it read as a target rather than as the mark.) */
.block-engraved { display: none; }

/* ---- the billboard (K3, K14) ----------------------------------------- */

/* K3 — the sign. The box is centred on the block's own centre, and so is
   its transform-origin: `translateY(-H/2)` then lands the origin exactly
   on the lid's centre, which is the point camera.register() derives the
   lift and scale against. An origin at the box's BOTTOM edge (what M0 had)
   puts it 110px below that centre instead, at a different DEPTH once the
   block is pitched — so the sign and the diamond no longer share one
   perspective factor and the registration misses by a sign's half-height.
   Where the mark actually stands is the lift's job, not the origin's. */
.block-billboard {
  position: absolute; left: 50%; top: 50%;
  width: 300px; height: 220px;
  margin: -110px 0 0 -150px;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.block-modality {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--space-16);
  opacity: 0;
  transition: opacity 400ms ease;
}
.block-modality.is-on { opacity: 1; }

/* K14 + K3b — in NORMAL the header clone takes over, and the 3D sign has to
   stand down or the mark is on screen twice. Before K3b the sign hid itself:
   it sat at the lid's depth, and in NORMAL the lid goes edge-on and the faces
   swallowed it. Standing it clear of the block (K3b) means it is never
   swallowed again, so the hand-off is explicit now. The opacity is on the
   MODALITY, not on the billboard — the billboard is a 3D ancestor and K11
   forbids it there — and it reuses the modality's own 400ms cross-fade, so
   the sign leaves at the same pace the header arrives. */
.block-billboard.is-flat .block-modality { opacity: 0; }
.block-mark {
  font: 700 44px/1 var(--font-serif);
  letter-spacing: .04em;
  color: var(--accent);
}
/* K3 — the registered word. `inline-block` so it has a box of its own to
   measure: camera.register() sizes the sign from this word's width, and an
   inline span would report the line box instead. No visual change — it is
   the only thing on its line. */
.block-mark__word { display: inline-block; }
/* K3a — the logo modality is the mark's own lettering, as outlines. The box
   of this element IS the measured lettering box (the svg's viewBox), so the
   registration matches the logo in width, centre and height at once. Gold,
   in every theme. `line-height: 0` so the inline svg's box is the span's box
   and offsetHeight measures glyphs, not a line. */
.block-mark--logo { color: var(--gold); line-height: 0; }
.block-mark--logo .block-mark__word { width: 260px; }
.block-mark__svg { display: block; width: 100%; height: auto; overflow: visible; }
.block-mark small {
  display: block;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .3em;
  color: var(--ink-2);
  margin-top: var(--space-8);
}
.block-modality--alert .block-mark { color: var(--stop); }
.block-modality--alert p { font: 400 14px/1.4 var(--font-sans); color: var(--ink); max-width: 24ch; margin: var(--space-8) 0 var(--space-12); }
.block-dial {
  width: 150px; height: 150px;
  border-radius: var(--radius-disc);
  border: 2px solid var(--accent);
  position: relative;
  margin-bottom: var(--space-12);
}
.block-dial i { position: absolute; left: 50%; top: 50%; width: 2px; height: 62px; background: var(--accent); transform-origin: top center; }
.block-clock { font: 600 56px/1 var(--font-serif); font-variant-numeric: tabular-nums; color: var(--ink); }

/* K14 — the header clone. Fixed, outside the 3D subtree, so it may fade
   without flattening anything. */
.block-billboard-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: var(--space-12);
  padding: var(--space-8) var(--space-16);
  background: var(--surface);
  border-bottom: var(--line-hair) solid var(--rule-strong);
  font: 700 18px/1 var(--font-serif);
  letter-spacing: .04em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.block-billboard-header.is-on { opacity: 1; transform: none; }
.block-billboard-header span { font: 500 11px/1 var(--font-mono); letter-spacing: .3em; color: var(--ink-2); }

/* ---- HUD, panel, options (all outside the 3D subtree) ---------------- */

.block-hud {
  position: absolute; left: var(--space-16); bottom: var(--space-12);
  max-width: 60ch;
  font: 400 11px/1.5 var(--font-mono);
  letter-spacing: .06em;
  color: var(--ink-2);
  background: var(--surface);
  border: var(--line-hair) solid var(--rule);
  padding: var(--space-8);
  display: none;
}
body.has-hud .block-hud, body.has-options .block-hud { display: block; }
.block-hud b { color: var(--ink); }

/* The hint row (O-BM1-5): its type and ink are the overlay chip's
   (db-ovl on each run, S19); this only places the row and spaces the
   chips as the saver's overlay slots do. `left: 50%` alone would cap the
   row at half the window and break a chip across two lines; it sizes to
   its chips instead, and wraps whole chips on a narrow window. */
.block-hint {
  position: absolute; left: 50%; bottom: var(--space-12);
  transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 2 * var(--space-16));
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4);
}
body.has-hud .block-hint, body.has-options .block-hint { display: none; }
/* O-TS-16 (b) — "7 inland" only while skyline.js offers the pose (the Townsite option on, the district built) */
body:not([data-inland="1"]) .block-hint .db-ovl:has(> #hintInland) { display: none; }

.block-panel {
  position: fixed; z-index: 6;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--ink);
  border: var(--line-hair) solid var(--rule-strong);
  box-shadow: var(--shadow-lift);
  overflow: auto;
  opacity: 0;
  transition:
    left 450ms cubic-bezier(.2, .7, .2, 1),
    top 450ms cubic-bezier(.2, .7, .2, 1),
    width 450ms cubic-bezier(.2, .7, .2, 1),
    height 450ms cubic-bezier(.2, .7, .2, 1),
    opacity 200ms ease;
  pointer-events: none;
}
.block-panel.is-on { opacity: 1; pointer-events: auto; }
.db-block-panel__in { padding: var(--space-24) var(--space-32); }
.db-block-panel__in--face { padding: var(--space-24) var(--space-32); }
.db-block-panel__note { margin: var(--space-16) 0 0; color: var(--ink-2); }
.db-block-panel__acts { display: flex; gap: var(--space-8); margin-top: var(--space-24); flex-wrap: wrap; }
.db-block-panel__face-label { display: block; margin-bottom: var(--space-12); }
.block-panel__close {
  position: absolute; right: var(--space-8); top: var(--space-4);
  font: 400 14px/1 var(--font-mono);
  color: var(--ink-3);
  background: none; border: 0; cursor: pointer;
}

/* OPTIONS-SPEC §4 — the options drawer: full width on the bottom edge,
   OVER the view (R2 — the camera's fit never moves for it). Opaque ground;
   glass stays on the widget layer (OP11). Its height is written by
   options.js from §4's three heights. */
.block-options {
  position: fixed; z-index: 7; left: 0; right: 0; bottom: 0;
  height: 266px;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border-top: var(--line-rule) solid var(--ink);
  font: 400 13px/24px var(--font-sans);
  transform: translateY(100%);
  transition: transform var(--move-ms, 600ms) cubic-bezier(.2, .7, .2, 1);
}
.block-options.is-on { transform: none; }
.block-options[data-height="strip"] .db-drawer__body,
.block-options[data-height="strip"] .db-drawer__acts { display: none; }

/* the head, 36 px: the word, the tabs, then the tools at the right */
.db-drawer__head {
  flex: 0 0 36px; height: 36px; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--space-16);
  padding: 0 var(--space-16);
  border-bottom: var(--line-hair) solid var(--rule);
}
.db-drawer__title { white-space: nowrap; }
.db-drawer__tabs { display: flex; align-items: stretch; align-self: stretch; gap: var(--space-4); min-width: 0; overflow: hidden; }
.db-drawer__tab {
  font: 400 13px/16px var(--font-sans); color: var(--ink-2);
  background: none; border: 0; border-bottom: var(--line-rule) solid transparent;
  padding: 0 var(--space-8); cursor: pointer; white-space: nowrap;
}
.db-drawer__tab.is-current { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.db-drawer__n { font: 500 11px/16px var(--font-mono); color: var(--attn); margin-left: var(--space-4); }
.db-drawer__n[hidden] { display: none; }
.db-drawer__tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-8); }
.db-drawer__tools .db-btn, .db-drawer__acts .db-btn { height: 24px; padding: 0 var(--space-8); font-size: 12px; }
.db-drawer__filter { width: 168px; height: 24px; box-sizing: border-box; font-size: 12px; }

/* the body: a grid of 3 to 4 columns (options.js writes the count) */
.db-drawer__body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: var(--space-8) var(--space-16);
  display: grid; grid-template-columns: repeat(var(--drawer-cols, 3), minmax(0, 1fr));
  column-gap: var(--space-24); row-gap: var(--space-4);
  align-content: start;
}
.db-drawer__none { grid-column: 1 / -1; margin: 0; color: var(--ink-3); }
.db-drawer__panel { min-width: 0; }
.db-drawer__panel .db-table { width: 100%; }

/* a row: two lines of 24 px and a hairline */
.db-drow { min-width: 0; border-bottom: var(--line-hair) solid var(--rule); }
.db-drow__l1, .db-drow__l2 { height: 24px; display: flex; align-items: center; gap: var(--space-8); min-width: 0; }
.db-drow__label {
  flex: 0 0 auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 13px/24px var(--font-sans); color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px;
}
.db-drow__hint { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px/24px var(--font-sans); color: var(--ink-3); }
.db-drow__val {
  flex: 0 0 84px; width: 84px; height: 22px; box-sizing: border-box;
  font: 400 11px/20px var(--font-mono); text-align: right; color: var(--ink);
  background: var(--surface); border: var(--line-hair) solid var(--rule); padding: 0 var(--space-4);
}
.db-drow__spec {
  flex: 0 0 40px; width: 40px; height: 22px; box-sizing: border-box;
  font: 500 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  background: none; color: var(--ink-2); border: var(--line-hair) solid var(--rule); cursor: pointer;
}
.db-drow__spec[disabled] { color: var(--ink-3); border-style: dashed; cursor: default; }
.db-drow__spec:hover:not([disabled]) { color: var(--accent); border-color: var(--accent); }
.db-drow__range { flex: 1 1 auto; width: 100%; min-width: 0; margin: 0; accent-color: var(--accent); }
/* T2-20261005-day-colours (OPTIONS-SPEC REV0c) — a colour row: the browser's picker as a swatch */
.db-drow__color { inline-size: 3.5rem; block-size: 1.5rem; padding: 0; margin: 0; border: 1px solid var(--rule, currentColor); border-radius: 3px; background: none; cursor: pointer; }
.db-drow__color:disabled { cursor: default; opacity: .5; }
.db-drow__seg { display: flex; flex: 1 1 auto; min-width: 0; }
.db-drow__opt {
  flex: 1 1 0; min-width: 0; height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 12px/1 var(--font-sans); color: var(--ink-2);
  background: var(--surface); border: var(--line-hair) solid var(--rule); margin-left: calc(-1 * var(--line-hair));
  border-bottom-width: var(--line-rule); cursor: pointer;
}
.db-drow__opt:first-child { margin-left: 0; }
.db-drow__opt[aria-pressed="true"] { color: var(--ink); background: var(--surface-sunk); border-bottom-color: var(--accent); }
.db-drow__sel { flex: 1 1 auto; width: 100%; min-width: 0; height: 22px; font-size: 12px; }
.db-drow [disabled] { cursor: not-allowed; }
.db-drow.is-off { color: var(--ink-3); }
.db-drow.is-off .db-drow__label { color: var(--ink-3); }
/* modified (§4): words first — the hint line says it; these only weight it */
.db-drow.is-mod .db-drow__label { font-weight: 600; }
.db-drow.is-mod .db-drow__val { border-color: var(--ink); }
/* saved poses (K12a): one cell over two columns */
.db-drow--poses .db-drow__label { text-decoration: none; cursor: default; font-weight: 600; }
.db-drow--poses .db-drow__l2 { gap: var(--space-12); overflow: hidden; }
.db-drow__pose { display: inline-flex; align-items: center; gap: var(--space-4); white-space: nowrap; font: 400 12px/24px var(--font-mono); }

/* the action bar, 36 px */
.db-drawer__acts {
  flex: 0 0 36px; height: 36px; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--space-8);
  padding: 0 var(--space-16);
  border-top: var(--line-hair) solid var(--rule);
}
.db-drawer__say { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px/24px var(--font-sans); color: var(--ink-2); }
.db-drawer__tabacts { display: flex; gap: var(--space-8); }

/* OPTIONS-SPEC REV0f — the action row's feedback. The say line flashes the accent on every message
   (two names in turn, so the same text again restarts it); a button shows its result in the success
   or warning token, its width held by options.js; the Saved poses entry just saved flashes once.
   Under reduced motion the colour holds, then returns, with no easing. */
.db-drawer__say.is-flash-a { animation: db-say-a 1.6s ease-out; }
.db-drawer__say.is-flash-b { animation: db-say-b 1.6s ease-out; }
@keyframes db-say-a { from { color: var(--accent); } to { color: var(--ink-2); } }
@keyframes db-say-b { from { color: var(--accent); } to { color: var(--ink-2); } }
.db-drawer__acts .db-btn { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.db-drawer__acts .db-btn[data-flash] { overflow: hidden; white-space: nowrap; }
.db-drawer__acts .db-btn[data-flash="ok"] { color: var(--ok); background: var(--ok-wash); border-color: var(--ok); }
.db-drawer__acts .db-btn[data-flash="no"] { color: var(--attn); background: var(--attn-wash); border-color: var(--attn); }
.db-drow__pose.is-flash { animation: db-pose-flash 1.6s ease-out; }
@keyframes db-pose-flash { from { color: var(--ok); background: var(--ok-wash); } to { color: inherit; background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .db-drawer__say.is-flash-a, .db-drawer__say.is-flash-b, .db-drow__pose.is-flash { animation-timing-function: steps(1, end); }
  .db-drawer__acts .db-btn { transition: none; }
}

/* R4 — the note slip, above the drawer's left edge */
.db-drawer__slip {
  position: absolute; left: var(--space-16); bottom: calc(100% + var(--space-8));
  width: 560px; max-width: calc(100vw - 2 * var(--space-16)); box-sizing: border-box;
  padding: var(--space-12) var(--space-16);
  background: var(--surface); color: var(--ink);
  border: var(--line-hair) solid var(--rule-strong);
  box-shadow: var(--shadow-lift);
}
.db-drawer__slip[hidden] { display: none; }
.db-drawer__sliphead { margin: 0; font: 400 12px/16px var(--font-sans); color: var(--ink-2); }
.db-drawer__note { margin: var(--space-8) 0 var(--space-12); font: 400 13px/20px var(--font-sans); }

/* R3 — the reveal: the ground and its rule go clear, every other row, the
   head and the action bar drop out; the live row stays where it is */
.block-options.is-revealing { background: transparent; border-top-color: transparent; }
.block-options.is-revealing .db-drawer__head,
.block-options.is-revealing .db-drawer__acts,
.block-options.is-revealing .db-drawer__panel,
.block-options.is-revealing .db-drow:not(.is-live) { visibility: hidden; }
.block-options.is-revealing .db-drawer__head,
.block-options.is-revealing .db-drawer__acts { border-color: transparent; }
.block-options.is-revealing .db-drow.is-live { background: var(--surface); }

/* K12's debug grid, over everything, drawn from the solved projection. */
.block-grid { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.block-grid svg { width: 100%; height: 100%; }
.grid-diamond { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; }
.grid-bill { fill: none; stroke: var(--attn); stroke-width: 1; stroke-dasharray: 2 4; }

/* the gear for narrow viewports (K12) */
.block-gear {
  position: absolute; right: var(--space-16); top: var(--space-16); z-index: 3;
  font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  padding: var(--space-8);
  background: var(--surface); color: var(--ink-2);
  border: var(--line-hair) solid var(--rule-strong);
  cursor: pointer;
}
.block-gear:hover { color: var(--accent); }

/* ---- K9 — the fullscreen page (outside the 3D subtree) --------------- */

.block-page {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column;
  background: var(--paper);
  opacity: 0;
  transform: var(--from, scale(.92));
  transform-origin: 50% 50%;
  transition: opacity 260ms ease, transform 300ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.block-page[hidden] { display: none; }
.block-page.is-on { opacity: 1; transform: none; pointer-events: auto; }
.block-page__bar {
  flex: none;
  display: flex; align-items: center; gap: var(--space-16);
  padding: var(--space-8) var(--space-16);
  background: var(--surface);
  border-bottom: var(--line-hair) solid var(--rule-strong);
}
.block-page__title { flex: 1 1 auto; margin: 0; font: 700 18px/1 var(--font-serif); letter-spacing: .04em; color: var(--accent); }
.block-page__tab { font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.block-page__close {
  font: 400 14px/1 var(--font-mono);
  color: var(--ink); background: none; cursor: pointer;
  border: var(--line-hair) solid var(--rule-strong);
  padding: var(--space-4) var(--space-8);
}
.block-page__close:hover, .block-page__tab:hover { color: var(--accent); }
.block-page__frame { flex: 1 1 auto; width: 100%; border: 0; background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .block, .block-stage, .block-panel, .block-options, .block-modality, .block-billboard-header, .block-page { transition-duration: 0ms !important; }
}

/* ---- the scene's own paint (scene.svg, inlined at boot) -------------- */
/* Every shape in the file carries a class and takes its colour from the
   scene palette above, so the shore turns with the theme and there is not
   one hex value between the two files. */
.block-sky__svg { width: 100%; height: 100%; display: block; }
.sky-a { stop-color: var(--sky-a); }
.sky-b { stop-color: var(--sky-b); }
.sky-c { stop-color: var(--sky-c); }
.sky-d { stop-color: var(--sky-d); }
.scene-range { fill: var(--scene-far); }
.scene-peak, .scene-shore { fill: var(--scene-near); }
.scene-snow { fill: var(--scene-lit); }
.scene-city { fill: var(--scene-near); }
.scene-wheel, .scene-tower { stroke: var(--scene-near); }
.scene-beacon { fill: var(--stop); }
.scene-windows { fill: var(--gold); }

/* ---- FRONT-SPEC F6 — the permanent bar's strip -------------------------
   The bar (nav.js, dev.css) is fixed over the top `--header-h` of the page.
   Everything else fixed to the top edge starts under it, and the page
   overlay (K9) opens below it so the bar stays reachable over a page. The
   camera's own fit measures the same strip out (block.js barH). */
html.has-topbar .block-billboard-header { top: var(--header-h); }
html.has-topbar .block-page { top: var(--header-h); }
html.has-topbar .block-gear { top: calc(var(--header-h) + var(--space-16)); }

/* F5 — the rim's nav cells, the toggle, and the camera-facing label */
.block-rim__glyph { margin-right: .35em; font-family: var(--font-mono); }
.block-face--top[data-rim-state="more"] .block-rim__cell--nav,
.block-rim__cell--more { display: none; }
.block-face--top[data-rim-state="more"] .block-rim__cell--more { display: inline-flex; }
/* T2-20261121-desk-in-bar-beam-rows — the desk cell fills the far point (the click target); its words are turned an eighth, so they read level
   from the near side. The rim's own gold, weight and tracking, with a glyph like the page cells (Ilya 2026-11-21:
   "make the label match the rest better"); a little larger and taller than theirs, to read in REST's shallow view */
.block-rim__cell--desk { width: 100%; height: 100%; padding: 0; font-size: 13px; }
.block-rim__desk { display: inline-block; transform: rotate(45deg) scaleY(1.4); }
/* past 7 days: the count sits in a block of the rim's gold, so the sign is a shape and not a hue (Ilya 2026-11-21, "Add another signifier") */
.block-rim__cell--desk.is-late .block-rim__desk-n { padding: .1em .3em .1em .44em; background: var(--gold); color: var(--oxblood); }
.block-rim-label {
  position: fixed; z-index: 8; pointer-events: none;
  transform: translate(-50%, calc(-100% - var(--space-8)));
}
.block-rim-label[hidden] { display: none; }
/* F6 — the block is full-bleed UNDER its glass bar: the flat pages' body
   padding (dev.css) must not push the scene down; the strip is taken out of
   the camera's viewport instead (block.js barH). */
html.has-topbar:not(.is-embedded) body.db { padding-top: 0; }

/* ---- phone (MOBILE-PASS-SPEC REV0 B1–B3, F5, K8; ruled "take-all" 2026-09-24) ----
   The block's 3D projection reaches past the scene's box; on a phone that
   overflow widens the LAYOUT viewport (1073 px at 390) and the block then
   fits itself to a window nobody sees. `clip`, not `hidden`: clip is not a
   grouping property, so it does not flatten the 3D subtree (K11). */
@media (max-width: 480px) {
  html:not([data-phone="off"]) .block-scene { overflow: clip; }
  /* SCOPE-SPEC SC10 / O-SC5 — no skyline on the phone, so no scope */
  html:not([data-phone="off"]) .block-scope { display: none; }
  /* F5 — the glass layer starts hidden; the Menu's Widgets button shows it */
  html:not([data-phone="off"]):not(.glass-on) .block-glass { display: none; }
}
/* PHONE (K12b) — block.js puts .is-phone on the stage and the body. The face
   viewport takes the phone width (--fv-w, written by layout()) and the face
   page and the Projects preview run one column. Desktop is K17's 909. */
.block-stage.is-phone .db-face-scroll { width: var(--fv-w, 909px); }
.block-stage.is-phone .block-fp__band { grid-template-columns: minmax(0, 1fr); }
.block-stage.is-phone .block-face[data-page="projects"] .block-pv__rows { columns: 1; }
/* only the wall at the camera is live on a phone (phone.js marks it); the
   edge-on walls keep their paper, and the lid's rim is the Menu's */
.block-stage.is-phone .block-face:not(.block-face--top):not(.is-phone-front) .db-face-scroll { visibility: hidden; }
.block-stage.is-phone .block-face--top .block-rim { visibility: hidden; }
/* K8 — key chips, the K12 gear and the saver's lift slider are desk tools */
body.is-phone .block-hint, body.is-phone .block-gear, body.is-phone .block-lift { display: none; }
/* B1 — the bottom bar: ◀ · face · ▶, every control 44 px (C3) */
.block-phone { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; gap: var(--space-8);
  padding: var(--space-8) var(--space-8) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, var(--band) 80%, transparent); color: var(--on-band-strong); }
.block-phone[hidden] { display: none; }
/* under an open page the bar would sit on the page's own last lines */
body:has(.block-page.is-on) .block-phone { display: none; }
.block-stage.is-phone .block-fp__band::before { display: none; }
.block-phone__turn { flex: 0 0 auto; min-width: 48px; min-height: 48px; font: 400 20px/1 var(--font-sans); color: var(--on-band-strong);
  background: transparent; border: var(--line-hair) solid var(--on-band-strong); border-radius: var(--radius-2); }
.block-phone__say { flex: 1 1 auto; margin: 0; text-align: center; font: 400 13px/18px var(--font-sans); }
.block-phone__say b { display: block; font: 600 16px/22px var(--font-sans); color: var(--on-band); }
/* B3 — FLAT: the 3D goes, the face's own page scrolls under the bar */
/* visibility, not display: the faces must keep laying out (and polling) for
   the flat page to copy them */
body.is-flat .block-stage, body.is-flat .block-glass, body.is-flat .block-billboard-header { visibility: hidden; }
body.is-flat .block-phone { display: none; }
.block-flat { position: fixed; inset: 0; z-index: 20; overflow-y: auto; box-sizing: border-box; padding: calc(var(--header-h) + var(--space-16)) var(--space-16) var(--space-48);
  background: var(--paper); color: var(--ink); }
.block-flat__switch { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: var(--space-8) 0 var(--space-16); }
.block-flat__switch .db-btn { min-height: 44px; }
.block-flat { display: flex; flex-direction: column; padding-bottom: 0; }
.block-flat__page { flex: 1 1 auto; min-height: 0; display: flex; }
.block-flat__frame { flex: 1 1 auto; width: 100%; border: 0; background: var(--paper); }

/* T2-20261008-campus-tour (CT2, CT5) — the tour of the campus: the bar and everything in the scene but
   the live scene itself are out of view (the basket, its ropes, the widgets, the hints, the slider);
   the caption sits bottom left in the saver clock's chip. Only the name and the line fade. */
body.is-touring .db-header,
body.is-touring .block-scene > :not(.block-skyline) { visibility: hidden !important; }
.block-tour { position: absolute; left: var(--space-48); bottom: var(--space-48); z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-8); max-width: min(640px, 70vw); pointer-events: none; }
.block-tour p { margin: 0; }
.block-tour__name, .block-tour__line { background: var(--overlay-scrim); color: var(--overlay-ink); opacity: 0; transition: opacity .6s ease; }
.block-tour.is-on .block-tour__name, .block-tour.is-on .block-tour__line { opacity: 1; }
.block-tour__name { padding: 0 var(--space-8); font: 400 44px/48px var(--font-serif); }
.block-tour__line { padding: var(--space-4) var(--space-8); font: 400 18px/26px var(--font-serif); }
.block-tour__line:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .block-tour__name, .block-tour__line { transition: none; } }

/* LIGHTDAY-SPEC REV0 §L4–§L7 (TIE-IN-DEV-LIGHTDAY-M0) — Voyager 1's one-
   light-day countdown: an INVISIBLE card in the glass layer, centred over
   the W17 Scope; lightday.js places it with one transform. No background,
   border, radius, shadow or blur on the card (C3); every colour is a DS
   token (C7). Legibility is a 1 px halo in --overlay-scrim: the DS has no
   halo token, and the night --ink is the light one, so it cannot halo.
   The hit area is the content plus the 6 px padding (§L4). Lines never
   wrap, so the height does not depend on the width lightday.js writes. */
.block-lightday { position: absolute; left: 0; top: 0; box-sizing: border-box; margin: 0; padding: 6px;
  display: flex; flex-direction: column; gap: 4px; text-align: center; white-space: nowrap;
  color: var(--overlay-ink); text-shadow: 0 1px 1px var(--overlay-scrim); font-variant-numeric: tabular-nums lining-nums;
  pointer-events: auto; cursor: pointer; opacity: .85; transition: opacity .2s ease; outline: none; }
.block-lightday[hidden], .block-lightday__lt[hidden] { display: none; }
.block-lightday:hover, .block-lightday:focus-visible { opacity: 1; }
.block-lightday:focus-visible { outline: var(--line-hair) dashed var(--overlay-rule); outline-offset: 0; }
.block-lightday__bar { position: relative; display: block; height: 3px; margin: 2px 0; background: color-mix(in srgb, var(--overlay-rule) 35%, transparent); }
.block-lightday__fill { position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
.block-lightday__tick { position: absolute; right: 0; top: -3px; width: 1px; height: 9px; background: var(--gold); }
.block-lightday__when, .block-lightday__lt { opacity: .8; }
/* §L5 — the final day: one pulse of the fill as each minute turns */
.block-lightday__fill.is-pulse { animation: block-lightday-pulse 1.2s ease-in-out 1; }
@keyframes block-lightday-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .block-lightday { transition: none; }
  .block-lightday__fill.is-pulse { animation: none; }
}
/* SCOPE-SPEC SC10 / O-SC5 — no scope on the phone, so no card above it */
@media (max-width: 480px) {
  html:not([data-phone="off"]) .block-lightday { display: none; }
}

/* T2-20261029-deepfield DF10 — the countdown made small and out of the sky while
   Deep field shows: the label and the count on one line, the bar under them. The date and the
   light time are in Deep field's key and on the door. */
.block-lightday.is-compact { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.block-lightday.is-compact .block-lightday__bar { grid-column: 1 / -1; grid-row: 2; }
.block-lightday.is-compact .block-lightday__label { font-size: 10px; letter-spacing: .05em; }
.block-lightday.is-compact .block-lightday__count { font-size: 14px; line-height: 18px; }
.block-lightday.is-compact .block-lightday__when, .block-lightday.is-compact .block-lightday__lt { display: none; }

/* T2-20261029-deepfield DF7 — Deep field's key (public/block/deepfield-key.js):
   a chip where the band fades in, and a framed panel over the sky naming each
   layer. The board's panel treatment (a sunk header strip, caps serif, the
   oxblood badge, a gold double rule); every colour a DS token. The swatches'
   own colours are the drawing's inks, set by the module. Placed with one
   transform each, like the Lightday card. */
.block-dfkey__chip { position: absolute; left: 0; top: 0; margin: 0; border: 0; cursor: pointer; pointer-events: auto;
  border-left: var(--line-hair) solid var(--gold); opacity: .8; transition: opacity .2s ease; white-space: nowrap; }
.block-dfkey__chip:hover, .block-dfkey__chip:focus-visible, .block-dfkey__chip[aria-expanded="true"] { opacity: 1; }
.block-dfkey__chip:focus-visible { outline: var(--line-hair) dashed var(--overlay-rule); outline-offset: 2px; }
.block-dfkey__chip[hidden], .block-dfkey[hidden] { display: none; }
.block-dfkey { position: absolute; left: 0; top: 0; box-sizing: border-box; width: 720px; margin: 0; pointer-events: auto; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border: var(--line-hair) solid var(--rule-strong);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 28%, transparent); }
.block-dfkey__head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; background: var(--surface-sunk);
  border-bottom: 3px double var(--gold); }
.block-dfkey__badge { padding: 3px 6px; background: var(--band); color: var(--on-band); font: 600 11px/1 var(--font-mono); letter-spacing: .08em; }
.block-dfkey__title { flex: 1; margin: 0; font: 400 19px/1 var(--font-serif); letter-spacing: .14em; text-transform: uppercase; }
.block-dfkey__pill { padding: 3px 7px; border: var(--line-hair) solid var(--rule-strong); border-radius: 999px; font: 500 10px/1 var(--font-mono); letter-spacing: .06em; color: var(--ink-2); }
.block-dfkey__close { width: 24px; height: 24px; margin: 0; padding: 0; border: var(--line-hair) solid var(--rule); background: transparent;
  color: var(--ink); font: 400 16px/1 var(--font-sans); cursor: pointer; }
.block-dfkey__close:hover, .block-dfkey__close:focus-visible { border-color: var(--accent); color: var(--accent); }
/* T2-20261121-desk-in-bar-beam-rows — "turn off" beside the close: hides W19 (glass.js), the Widgets tab brings it back */
.block-dfkey__off { height: 24px; margin: 0; padding: 0 8px; border: var(--line-hair) solid var(--rule); background: transparent;
  color: var(--ink); font: 500 11px/1 var(--font-mono); letter-spacing: .04em; white-space: nowrap; cursor: pointer; }
.block-dfkey__off:hover, .block-dfkey__off:focus-visible { border-color: var(--accent); color: var(--accent); }
.block-dfkey__lede { margin: 0; padding: 9px 12px 4px; font: italic 400 13px/1.45 var(--font-serif); color: var(--ink-2); }
.block-dfkey__rows { list-style: none; margin: 0; padding: 2px 12px 6px; }
.block-dfkey__row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px 0; border-top: var(--line-hair) solid var(--rule); }
.block-dfkey__row:first-child { border-top: 0; }
/* two columns when the panel is wide enough (deepfield-key.js sets data-cols) */
.block-dfkey[data-cols="2"] .block-dfkey__rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
.block-dfkey[data-cols="2"] .block-dfkey__row:nth-child(2) { border-top: 0; }
.block-dfkey__swatch { display: block; width: 44px; height: 18px; margin-top: 1px; outline: var(--line-hair) solid var(--rule); }
.block-dfkey__swatch svg { display: block; }
.block-dfkey__name { display: block; font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.block-dfkey__text { margin: 3px 0; font: 400 12.5px/1.42 var(--font-sans); }
.block-dfkey__live { display: block; font: 500 11px/1.4 var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums lining-nums; }
.block-dfkey__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px;
  border-top: var(--line-hair) solid var(--rule-strong); background: var(--surface-sunk); font: 400 11px/1.3 var(--font-mono); color: var(--ink-2); }
.block-dfkey__page { margin: 0; padding: 3px 8px; border: var(--line-hair) solid var(--rule-strong); background: var(--surface);
  color: var(--ink); font: 500 11px/1.2 var(--font-mono); letter-spacing: .04em; cursor: pointer; }
.block-dfkey__page:hover, .block-dfkey__page:focus-visible { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .block-dfkey__chip { transition: none; } }
@media (max-width: 480px) {
  html:not([data-phone="off"]) .block-dfkey__chip, html:not([data-phone="off"]) .block-dfkey { display: none; }
}
