/* ============================================================================
 * AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
 * ============================================================================
 *
 * file_id: 27ad1544-eeee-420e-94f1-8b33a97df2ad
 * generated_timestamp: 2026-10-28T12:55:47.801950+00:00Z
 * database_name: folio_cdb
 *
 * ============================================================================
 */

/* =============================================================================
   FOLIO DESIGN SYSTEM — TOKENS
   -----------------------------------------------------------------------------
   Style identity: Dark Soft 3D with cool tones.
   Touchable, pillowy, cohesive, digital, timeless.

   These tokens are the single source of truth for the entire site.
   Every color, spacing, shadow, and radius used anywhere in Folio MUST
   reference a token from this file. No magic values.
   ============================================================================ */

:root {
  /* -------- Colors: Backgrounds (deep blue-gray) -------- */
  --bg-deep:      hsl(220, 15%, 10%);
  --bg-surface:   hsl(220, 15%, 14%);
  --bg-raised:    hsl(220, 15%, 18%);

  /* Feature-card body color \u2014 the actual surface material is shifted toward
     the accent hue (220 \u2192 200, a tick cooler/mintier) while keeping the same
     lightness as --bg-surface. Captain's v2 feedback: the mint tint lived
     only in the top highlight, so the card read as \"same material, just lit
     differently\". v3 shifts the BASE material itself so halo + tinted light
     reinforce what the body already whispers. Subtle on purpose \u2014 if you can
     see the color, it's too loud. */
  --bg-surface-feature: hsl(200, 14%, 15%);

  /* Layered surface lighting — top highlight catches light, bottom settles into shadow.
     Two gradients composited over bg-surface give every card visible tonal variation
     so the eye never sees big flat areas — the root cause of "flat not 3D" feedback. */
  --surface-top-gradient: linear-gradient(
      180deg,
      hsla(220, 20%, 100%, 0.07) 0%,
      hsla(220, 20%, 100%, 0.03) 15%,
      hsla(220, 20%, 100%, 0) 40%
    ),
    linear-gradient(
      0deg,
      hsla(220, 40%, 0%, 0.18) 0%,
      hsla(220, 40%, 0%, 0) 30%
    );
  --surface-inner-edge: hsla(220, 20%, 100%, 0.08);
  /* Hairline top-edge light catch — painted via ::before in .surface */
  --surface-edge-highlight: linear-gradient(
    180deg,
    hsla(220, 20%, 100%, 0.12) 0%,
    hsla(220, 20%, 100%, 0) 20%
  );

  /* -------- Colors: Accent -------- */
  --accent:           hsl(168, 45%, 50%);
  --accent-soft:      hsl(168, 35%, 40%);
  --accent-glow:      hsl(168, 50%, 65%);
  --accent-secondary: hsl(195, 45%, 50%);

  --accent-gradient: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-secondary) 100%
  );

  /* -------- Colors: Text -------- */
  --text-primary:   hsl(220, 10%, 88%);
  --text-secondary: hsl(220, 10%, 58%);
  --text-muted:     hsl(220, 10%, 38%);

  /* -------- Component color one-offs (themeable) --------
     These five tokens were hardcoded hsla() values living directly in
     component chunks (nav / buttons / styleguide avatar+icon). They are
     hoisted here so the [data-theme] override blocks can retheme them for
     light without touching component CSS. Each names the exact site it
     replaces so the relationship stays legible.

     KEEP THE DARK VALUES IDENTICAL to what they replaced — this migration
     is a pure refactor in dark mode (zero visual change); only the light
     override block gives them new values. */

  /* Fixed nav frosted-glass fill — was hsla(220,15%,10%,0.85) inline in
     .folio-nav. bg-deep at 85% alpha: opaque enough for text contrast,
     translucent enough for the backdrop-blur to read as frosted glass. */
  --nav-glass-bg: hsla(220, 15%, 10%, 0.85);

  /* The mobile navigation DRAWER's fill, and the reason it is a token of its
     own rather than a reuse of --nav-glass-bg one line up.

     IT IS hsl(), NOT hsla(), AND THAT IS THE ENTIRE POINT. There is no alpha
     term to tune and no backdrop-filter anywhere near the drawer rule. The
     drawer this replaced was --nav-glass-bg at 85% with a 12px blur, and it
     was rejected on feel: at 85% you still read the page through it, so it
     lands as an overlay PRINTED ON the page rather than as a surface arriving
     IN FRONT of it. 95% would fail the same way. Opaque is not a target here,
     it is a binary.

     --nav-glass-bg is glass BY DESIGN and must keep meaning exactly one thing
     ("the frosted bar's fill in the current theme"). Reaching for it because
     it is the nav-coloured token nearby is the specific mistake this token
     exists to intercept.

     VALUE: matches --bg-surface in this theme — the design system's "one step
     raised off the page" plane, which is exactly what a drawer is relative to
     the --bg-deep page behind it. Written as a literal rather than
     var(--bg-surface) for two reasons: it sits beside --nav-glass-bg in the
     same shape as its neighbour (every component one-off in this file is a
     literal), and the drawer can be retuned without dragging every card in
     the design system with it. Retheme it in all FOUR blocks the way
     --nav-glass-bg is rethemed, or light mode gets a dark drawer. */
  --nav-drawer-bg: hsl(220, 15%, 14%);

  /* The dim cast over the rest of the page while the drawer is open — the
     depth cue that makes the drawer read as foreground rather than as a panel
     glued to the left edge.

     THE ONLY TRANSLUCENT MEMBER OF THIS PAIR, and it has to be: its whole job
     is to let the covered page stay legible-but-receded. Fully opaque would
     be a second drawer; too faint and the page competes with the panel.

     A SCRIM IS ALWAYS A SHADOW, NEVER A WASH — it DARKENS in both themes, so
     the light-mode value is also a dark colour, just weaker (a bright page
     needs less dimming to read as pushed back, and a heavy scrim on an
     off-white site feels punitive). It carries the theme's own hue rather
     than a neutral grey so it never reads as a foreign layer.

     Dark: 0.6 over --bg-deep lands the page around 5-7% lightness against the
     drawer's 14% — a clear step without crushing the hero art to black. */
  --nav-scrim-bg: hsla(220, 15%, 4%, 0.6);

  /* Primary-button top rim highlight — was hsla(0,0%,100%,0.2) repeated at
     4 sites in .btn--primary (base/hover/active/is-hover). Pure white at 0.2
     rather than the cool 220-hued rim because it sits on the bright accent
     gradient, where a cool rim reads as dirty. */
  --btn-primary-rim: hsla(0, 0%, 100%, 0.2);

  /* Styleguide bio-avatar gradient stops — was two inline hsla mint stops in
     the .sg-bio-card__avatar top-light-catch gradient. Mint-tinted white so
     the highlight glows at the disc's own temperature, not chalky neutral. */
  --avatar-light-catch-strong: hsla(168, 60%, 80%, 0.2);
  --avatar-light-catch-fade:   hsla(168, 50%, 60%, 0);

  /* Styleguide project-icon accent halo — was 0 0 24px hsla(168,45%,50%,0.1)
     stacked on .sg-project-card__icon. The same mint atmosphere as
     --shadow-feature-halo but tuned for a small 56px icon. */
  --icon-accent-halo: 0 0 24px hsla(168, 45%, 50%, 0.1);

  /* -------- Theme-toggle switch (soft-3D pill) — DARK -------------------
     The nav theme control is a carved inset TRACK holding a raised KNOB that
     slides between a sun (left) and moon (right). These six tokens give it the
     same depth language as the rest of the system so it reads native in both
     themes; the light override block re-tunes every one for warm-on-off-white.
       track-bg/track-shadow  = the recessed well (inset depth, near-black here)
       knob-bg/knob-shadow    = the raised slider (gradient lit top + drop+rim)
       icon-idle/icon-active  = the dim vs. emphasized end-icon colors. Active
                                emphasis is CSS-driven from [data-theme] (the
                                moon glows mint in dark, the sun in light) — the
                                same attribute that positions the knob, so both
                                are correct from first paint (FOUC-safe). */
  --toggle-track-bg: hsl(220, 15%, 12%);
  --toggle-track-shadow:
    inset 0 2px 5px hsla(220, 40%, 2%, 0.6),
    inset 0 -1px 1px hsla(220, 20%, 100%, 0.04);
  --toggle-knob-bg:
    linear-gradient(180deg, hsl(220, 15%, 26%) 0%, hsl(220, 15%, 19%) 100%);
  --toggle-knob-shadow:
    0 2px 5px hsla(220, 50%, 1%, 0.6),
    0 1px 2px hsla(220, 50%, 1%, 0.5),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.18);
  --toggle-icon-idle:   hsl(220, 12%, 45%);
  --toggle-icon-active: hsl(168, 45%, 55%);

  /* -------- Themeable surface-material tokens (Batch 2) -------------------
     These four families used to be HARDCODED inside component CSS, which made
     those surfaces stay dark in light mode (the styleguide demo-panel problem).
     They are now tokens so .wall-object, .wall-shadow*, .card--feature, and
     .sg-bio-card__avatar follow the theme. DARK values here are byte-identical
     to what the component CSS hardcoded before — pure refactor in dark mode,
     zero visual change. The two light blocks below give them light values.

     IMPORTANT: a dark-scoped panel ([data-theme="dark"]) re-asserts these from
     the [data-theme="dark"] block at the bottom of this chunk; keep the dark
     values in the two places in sync. */

  /* .wall-object body — was an inline 3-stop white top-gradient over
     --bg-surface + a white inset rim. The wall-distance card material. */
  --wall-object-gradient:
    linear-gradient(
      180deg,
      hsla(220, 20%, 100%, 0.08) 0%,
      hsla(220, 20%, 100%, 0.03) 20%,
      hsla(220, 20%, 100%, 0)    45%
    ),
    var(--bg-surface);
  --wall-object-rim: inset 0 1px 0 hsla(220, 20%, 100%, 0.1);

  /* .card--feature material — body color + the mint-tinted top light-catch
     gradient that marks the card special without a flat bar. */
  --feature-card-bg: var(--bg-surface-feature);
  --feature-card-gradient:
    linear-gradient(
      180deg,
      hsla(168, 30%, 60%, 0.08) 0%,
      hsla(168, 20%, 50%, 0.03) 20%,
      hsla(220, 20%, 100%, 0) 40%
    ),
    linear-gradient(
      0deg,
      hsla(220, 40%, 0%, 0.18) 0%,
      hsla(220, 40%, 0%, 0) 30%
    );

  /* .sg-bio-card__avatar — the mint accent disc + its hand-authored soft 3D.
     Gradient = mint top light-catch over the mint→blue accent gradient.
     Shadow = ambient drop + tight contact + inset mint rim + inner darkening. */
  --avatar-gradient:
    linear-gradient(
      180deg,
      var(--avatar-light-catch-strong) 0%,
      var(--avatar-light-catch-fade) 40%
    ),
    linear-gradient(
      135deg,
      hsl(168, 45%, 50%) 0%,
      hsl(195, 45%, 50%) 100%
    );
  --avatar-shadow:
    0 12px 24px hsla(220, 50%, 1%, 0.6),
    0 4px 8px hsla(220, 50%, 1%, 0.4),
    inset 0 1px 0 hsla(168, 60%, 100%, 0.25),
    inset 0 -2px 4px hsla(220, 40%, 0%, 0.15);

  /* -------- Spacing -------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* -------- Page measure --------
     ONE CONTENT WIDTH FOR EVERY PAGE OF THE SITE. Captain's ruling,
     2026-08-19: the landing page, both legal pages and the 404 must present
     the SAME content area, so the footer hairline, the headings and the
     gutters land on the same two vertical lines whichever page a visitor is
     on. Until that day it lived as THREE SEPARATE LITERALS (900px on
     .folio-main, 700px on .folio-impressum, and 700px mirrored by hand onto
     .folio-notfound), which is exactly how /impressum and /datenschutz came
     to sit visibly narrower than the page that links to them. A ruling that
     three numbers must agree, written as three numbers, is a ruling waiting
     to drift. Written here it is one knob.

     CONSUMERS. All three set `max-width: var(--site-content-width)` AND pair
     it with a var(--space-8) inline gutter that drops to var(--space-4) in
     the 760px tier, because matching the outer edge without matching the
     gutter would still leave the content boxes 32px apart:
       .folio-main       tokens.css §portfolio-layout   /
       .folio-impressum  tokens.css §portfolio-layout   /impressum /datenschutz
       .folio-notfound   tokens.css §notfound-layout    the 404
     Resolved content box: 836px above the 760px tier, (viewport - 32px)
     below it. Identical on all four pages, which is the whole point.

     *** THIS IS NOT THE READING MEASURE, AND CONFLATING THE TWO IS THE ONE
         MISTAKE TO AVOID AT THIS TOKEN. *** Line length is capped separately
     and much earlier by `p { max-width: 65ch }` in tokens.css
     §base-reset-typography, which resolves to roughly 572px at the 16px body
     size and is therefore NARROWER than this container at every value it has
     ever held (636px content box before the ruling, 836px after). That
     independence is what makes this token free to express PAGE IDENTITY
     rather than legibility: raising it widens the footer band, the headings
     and the gutters and moves no line of running text at all. It is also
     what made the 700px value safe to abandon with no readability trade,
     German legal prose included. THE INDEPENDENCE HAS A FLOOR THOUGH: drop
     this below about 65ch plus both gutters (~636px) and the container starts
     clipping the measure instead of clearing it, at which point the two stop
     being separate decisions and the comment beside `p` becomes the one to
     read first.

     NOT CONSUMED BY /styleguide, /lab OR /experiments, and that is a ruling
     too, not an oversight. Those three are internal build tools withheld at
     nginx in production, and their widths are purpose-built rather than
     site-consistent: .sg-page and .exp-page run 1100px because they lay
     specimens out in 2, 3 and 4 column grids, and .lab-page declares no
     max-width at all because it is a full-viewport stage for one experiment.
     Pointing any of them here would shrink a showcase by 200px to win an
     agreement no visitor is ever in a position to see. */
  --site-content-width: 900px;

  /* -------- Radius -------- */
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-pill: 9999px;

  /* -------- Shadows (the soft 3D magic — always layered) --------
     Three-layer recipe: deep wide drop + tight contact shadow + top rim highlight.
     Values pushed harder than typical web-dark shadows — the aesthetic demands
     that cards read as physical objects resting on the page, not as painted
     rectangles. If a shadow here looks "too much" in isolation it is probably
     correct in context; the soft 3D illusion collapses at subtle values. */

  /* v3 push: Captain asked for \"even more 3D\". Drop shadows deepened (higher
     alpha), contact shadows tightened and darkened, top rim highlights nudged
     brighter. The alpha bump is the main lever \u2014 each shadow moves ~+5 to
     +10% opacity. Stops short of the point where the dark bleeds look muddy. */
  --shadow-soft:
    0 8px 24px hsla(220, 50%, 1%, 0.75),
    0 3px 6px hsla(220, 50%, 1%, 0.5),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.07);

  --shadow-float:
    0 20px 48px hsla(220, 50%, 1%, 0.85),
    0 6px 12px hsla(220, 50%, 1%, 0.6),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.1);

  --shadow-hover:
    0 28px 64px hsla(220, 50%, 1%, 0.9),
    0 8px 16px hsla(220, 50%, 1%, 0.65),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.12);

  --shadow-press:
    inset 0 6px 16px hsla(220, 40%, 2%, 0.7),
    inset 0 -1px 2px hsla(220, 20%, 100%, 0.02);

  /* Inset (pressed into plane) — for tags, inputs, carved-in elements.
     Visual inverse of soft/float: the element feels recessed below surface. */
  --shadow-inset:
    inset 0 2px 6px hsla(220, 40%, 2%, 0.55),
    inset 0 -1px 1px hsla(220, 20%, 100%, 0.03);

  /* Deep inset — for emphasized carved elements (textareas, focused search). */
  --shadow-inset-deep:
    inset 0 4px 10px hsla(220, 40%, 2%, 0.7),
    inset 0 -1px 2px hsla(220, 20%, 100%, 0.04);

  --shadow-accent-glow: 0 0 24px hsla(168, 45%, 50%, 0.25);

  /* Feature-card mint halo — subtle ambient glow that marks a card as special
     without requiring a flat accent bar. Pairs with surface--float shadow
     and the --bg-surface-feature tinted body color. v3 bumps radius 40→48
     and alpha 0.08→0.1 so the halo is detectable as the card's own atmosphere
     rather than something the eye has to search for. */
  --shadow-feature-halo: 0 0 48px hsla(168, 45%, 50%, 0.1);

  /* ======================================================================
     WALL-DISTANCE SHADOW SCALE — the PRIMARY elevation system
     ----------------------------------------------------------------------
     DESIGN LANGUAGE NOTE — two shadow systems live side-by-side in Folio:

       1. SELF-DEFINITION shadows (--shadow-soft/float/hover/press/inset*)
          are applied on the element itself as box-shadow. They describe
          the element's OWN material — "this object has a top rim, a
          contact shadow, an internal press state". They are small, tight,
          and geometrically linked to the element's own edges.

       2. WALL-DISTANCE shadows (--wall-close/medium/far) are cast onto
          the WALL (the page background) by a separate pseudo-element
          sibling behind the object. They describe the element's
          RELATIONSHIP to the page — "this object floats 2cm, 10cm, or
          30cm in front of the wall". They are large, soft, and
          geometrically linked to the object's distance from the wall,
          not to its own edges.

     The two systems DO NOT compose inside one element. The wall-distance
     card body is built from .wall-card-body (a clean-panel recipe with
     NO outer drop shadow) so the wall shadow carries all the elevation
     work without fighting .surface's own drop shadow. See the
     .wall-stage / .wall-shadow / .wall-object explicit-markup classes
     in the surfaces chunk and the /experiments wall-distance lab for
     the verbatim reference.

     PHYSICAL PRINCIPLE — what changes with object-to-wall distance:
       CLOSE  → shadow is tight and SHARP, same size as object, small
                offset. Concentrated darkness (higher alpha) because the
                umbra dominates over a narrow penumbra band.
       MEDIUM → shadow is bigger and softer, moderate offset. Penumbra
                widens as the light source subtends a larger angle.
       FAR    → shadow is significantly LARGER than the object, VERY
                soft, noticeably OFFSET. Alpha DROPS (counterintuitive
                but physically correct: total light energy stays similar,
                but penumbra spreads it across a wider band, so per-pixel
                darkness decreases).

     All three deltas — size, blur, offset — scale together because they
     come from the same cause (distance). Tweaking one in isolation reads
     as a bigger object, not a more-distant one. These values were locked
     in the /experiments wall-distance rig; they are the control points
     that work; do not drift them without revisiting the experiment.

     USE SPARINGLY — wall-distance is the emphasis lever for a
     content-light portfolio. Use --wall-far at most ONCE per view (the
     hero or the featured project), --wall-medium for standard cards,
     --wall-close for inline elements (tags, labels, badges). If every
     element is pushed far from the wall, nothing stands out.
     ====================================================================== */

  /* Shadow color — deep blue-black, same across all three distances so
     the ambient-light reading is consistent (all shadows cast by the
     same implied upper-left key light). */
  --wall-shadow-color: 220, 50%, 1%;  /* H,S,L channels only — consumed as hsla(var(--wall-shadow-color), <alpha>) */

  /* CLOSE — "almost touching the wall, like a sticker held a centimeter
     off the surface." Use for: tags-in-context, footnotes, labels, inline
     chips. Small elements that belong to their container. */
  --wall-close-offset:     6px;
  --wall-close-size-delta: 8px;
  --wall-close-blur:       4px;
  --wall-close-alpha:      0.55;

  /* MEDIUM — "lifted, like a card held a few centimeters in front of the
     wall." The DEFAULT elevation for standard project cards and surfaces
     that are part of the content flow without claiming hero status. */
  --wall-medium-offset:     16px;
  --wall-medium-size-delta: 28px;
  --wall-medium-blur:       16px;
  --wall-medium-alpha:      0.5;

  /* FAR — "floating well in front of the wall, like a card held at
     hand's distance." Maximum emphasis. The hero title lands here. The
     ONE featured project card lands here. One per view, two absolute
     maximum — three+ collapses the hierarchy. */
  --wall-far-offset:     28px;
  --wall-far-size-delta: 56px;
  --wall-far-blur:       32px;
  --wall-far-alpha:      0.45;

  /* ======================================================================
     RELIEF — the deepest carved-in inset (inverse of wall-far)
     ----------------------------------------------------------------------
     Promoted from /experiments exp3 (deep relief / pressure well). Five
     composited shadow layers create a cavity that reads as SUNKEN, not
     just pressed:
       layer 1+2  aggressive inset top darkness (12/24 and 6/12 stacked)
                  — the deep umbra inside the cavity
       layer 3    faint inset bottom highlight (hsla white 0.04)
                  — bounced light skipping off the cavity floor
       layer 4    deep top lip (inset 0 2px 0 dark) — a razor-sharp dark
                  line right at the mouth of the cavity
       layer 5    external 1px top rim highlight — the surrounding
                  material surface curls slightly UP at the cavity edge

     The three inset tiers form a scale of carved-in depth:
       --shadow-inset        (2-6px blur, 0.55 alpha) — shallow, for tags
       --shadow-inset-deep   (4-10px blur, 0.7 alpha) — well, for inputs
       --shadow-relief       (12-24px blur, 0.7 alpha + rim) — socket

     Relief is the maximum inset. Use for a drilled socket, a pressure
     cavity, or any element that should read as carved DEEPLY into its
     surrounding panel. Pairs conceptually with --wall-far on the outset
     side: both are the extreme end of their respective scales.
     ====================================================================== */
  --shadow-relief:
    inset 0 12px 24px hsla(220, 50%, 1%, 0.7),
    inset 0 6px 12px hsla(220, 50%, 1%, 0.5),
    inset 0 -3px 6px hsla(220, 20%, 100%, 0.04),
    inset 0 2px 0   hsla(220, 50%, 1%, 0.5),
    0    1px 0     hsla(220, 20%, 100%, 0.08);

  /* -------- Typography -------- */
  --font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", system-ui, sans-serif;

  --font-size-display: 3.815rem;
  --font-size-h1:      3.052rem;
  --font-size-h2:      2.441rem;
  --font-size-h3:      1.953rem;
  --font-size-h4:      1.563rem;
  --font-size-lead:    1.25rem;
  --font-size-body:    1rem;
  --font-size-small:   0.875rem;
  --font-size-caption: 0.75rem;

  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight: 1.1;
  --line-height-snug:  1.3;
  --line-height-body:  1.5;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.1em;

  /* -------- Motion --------
     Material "standard" curve (0.4, 0, 0.2, 1) at 250ms produces a smoother
     hover-lift / settle-press feel than the earlier quick-ease curve. The extra
     50ms is imperceptible as sluggishness but reads as weight — tactile objects
     settle, they don't snap. */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 250ms;

  /* Staggered-reveal pair, added 2026-08-14 for the nav's mobile menu. Read
     the two together — they are calibrated so that they COMPOSE EXACTLY into
     --duration-fast for a three-item list:

         last item starts at   2 x --stagger-step    =  90ms
         last item runs for        --duration-fastest = 160ms
         last item settles at                          250ms == --duration-fast

     so the final staggered child lands on the same frame as the 250ms
     container fade wrapping it. Nothing trails its container and nothing
     waits for it. That identity is the entire reason these two numbers are
     the numbers they are: change one and re-derive the other, or the sequence
     starts finishing after the thing it is unfolding inside.

     WHY --duration-fastest HAS TO EXIST rather than the stagger reusing
     --duration-fast: a delayed child cannot also run for 250ms. 90 + 250 =
     340ms, and a three-entry menu that takes a third of a second to finish
     arriving reads as sluggish, not as considered. 160ms is the longest a
     staggered child can run while the whole sequence still lands inside the
     250ms envelope.

     NAMING: "fastest" is deliberately a FLOOR, not just a comparative. If
     something ever genuinely needs to be shorter than 160ms, rename this pair
     onto a numeric scale (--duration-1 / -2 / -3) rather than inventing
     --duration-quicker; a set of near-synonymous speed adjectives is exactly
     the terminology drift that makes a token palette unreadable. */
  --duration-fastest: 160ms;
  --stagger-step: 45ms;

  /* color-scheme tells the UA to render dark form controls / scrollbars by
     default; the light override block flips it to light. Keeps native UI
     in lockstep with our token theme without extra JS. */
  color-scheme: dark;
}

/* =============================================================================
   LIGHT THEME — co-equal soft-3D counterpart (FIRST DRAFT, Batch 1)
   -----------------------------------------------------------------------------
   ARCHITECTURE: dark is the DEFAULT/baseline (the :root values above). Light
   is layered on top by re-declaring the same custom properties under two
   selectors so EVERY var()-consuming rule across the whole site retheme for
   free — no component CSS changes needed.

     1. @media (prefers-color-scheme: light)  → OS-aware automatic default,
        but ONLY when the user has NOT made a manual choice. The :not([data-theme="dark"])
        guard means: if the user explicitly picked dark, the OS-light
        media query must NOT win.
     2. [data-theme="light"]                  → manual toggle override, wins
        over OS preference because the toggle JS sets it on <html> and the
        FOUC init script sets it before first paint.

   *** THIS IS A FIRST-DRAFT PALETTE. Batch 2 perfects it against dark in the
   styleguide side-by-side compare. *** The goal here is only to prove the
   mechanism flips correctly end-to-end, not to ship final light design.

   DESIGN PREMISE for light soft-3D (NOT inverted dark values):
     - Backgrounds: warm off-white, NOT pure white. Pure #fff has no surface
       for shadows to read against. A faint warm gray (hue 40, very high
       lightness) gives contact shadows something to sit on.
     - Surfaces lighter than the page so cards still read as "raised" — in
       light mode raised = closer to white, the inverse of dark mode.
     - Shadows: SOFT, WARM, LOW-ALPHA contact shadows (warm gray hue ~30,
       alpha 0.06–0.18) instead of dark mode's near-black 0.45–0.9. Light
       shadows are gentle ambient occlusion, not dramatic drops — push the
       dark-mode alphas here and the page looks dirty/bruised.
     - Rim highlights: in dark mode the top rim is white-on-dark. In light
       mode a white rim still reads as the "lit edge" but we lean on the
       shadow side for the depth cue.
     - Accent: nudge the mint/teal DARKER and slightly more saturated so it
       holds contrast on a light ground (a mid-light mint vanishes on white).
     - Text: dark-on-light. Near-black primary, mid-gray secondary, light-gray
       muted — the tonal inverse of the dark text ramp.
   ============================================================================ */

/* Light token values are authored under BOTH the OS-preference media query and
   the manual [data-theme="light"] selector. CSS has no block-level mixin, so
   the honest DRY move is to keep the two light blocks byte-identical and
   adjacent — drift between them is then obvious in review and counts as a bug. */

/* --- 1. OS preference: light, ONLY when no manual dark choice was made --- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    /* Backgrounds — warm off-white ramp (raised = closer to white) */
    --bg-deep:      hsl(40, 30%, 95%);
    --bg-surface:   hsl(40, 28%, 97%);
    --bg-raised:    hsl(40, 25%, 99%);
    --bg-surface-feature: hsl(180, 28%, 96%);

    /* Surface lighting — top highlight is a soft white catch, bottom settles
       into a faint warm shadow. Lower alphas than dark; light surfaces need
       only a whisper of tonal variation to read as non-flat. */
    --surface-top-gradient:
      linear-gradient(180deg,
        hsla(0, 0%, 100%, 0.9) 0%,
        hsla(0, 0%, 100%, 0.4) 15%,
        hsla(0, 0%, 100%, 0) 40%),
      linear-gradient(0deg,
        hsla(30, 30%, 40%, 0.06) 0%,
        hsla(30, 30%, 40%, 0) 30%);
    --surface-inner-edge: hsla(30, 20%, 30%, 0.1);
    --surface-edge-highlight:
      linear-gradient(180deg,
        hsla(0, 0%, 100%, 0.95) 0%,
        hsla(0, 0%, 100%, 0) 20%);

    /* Accent — darker + more saturated mint/teal so it holds on light ground */
    --accent:           hsl(168, 55%, 38%);
    --accent-soft:      hsl(168, 45%, 32%);
    --accent-glow:      hsl(168, 60%, 30%);
    --accent-secondary: hsl(195, 55%, 42%);

    /* Text — dark-on-light, tonal inverse of the dark ramp */
    --text-primary:   hsl(220, 18%, 16%);
    --text-secondary: hsl(220, 12%, 38%);
    --text-muted:     hsl(220, 10%, 55%);

    /* Self-definition shadows — Batch 2 TUNED for warm off-white.
       KEPT BYTE-IDENTICAL-BY-VALUE with the manual [data-theme="light"] block
       below — see that block's comment for the full design rationale. Darker
       warm shadow color (hsl 30,25%,28%), wide soft ambient + tight contact
       layer, near-white high-alpha top rim. Drift between the two light blocks
       is a bug. */
    --shadow-soft:
      0 8px 24px hsla(30, 25%, 28%, 0.10),
      0 2px 5px hsla(30, 25%, 28%, 0.14),
      inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
    --shadow-float:
      0 16px 40px hsla(30, 25%, 28%, 0.12),
      0 4px 10px hsla(30, 25%, 28%, 0.16),
      inset 0 1px 0 hsla(0, 0%, 100%, 0.95);
    --shadow-hover:
      0 28px 56px hsla(30, 25%, 28%, 0.16),
      0 8px 18px hsla(30, 25%, 28%, 0.18),
      inset 0 1px 0 hsla(0, 0%, 100%, 1);
    --shadow-press:
      inset 0 4px 12px hsla(30, 25%, 25%, 0.18),
      inset 0 -1px 2px hsla(0, 0%, 100%, 0.7);
    --shadow-inset:
      inset 0 2px 5px hsla(30, 25%, 25%, 0.16),
      inset 0 -1px 1px hsla(0, 0%, 100%, 0.7);
    --shadow-inset-deep:
      inset 0 4px 9px hsla(30, 25%, 25%, 0.20),
      inset 0 -1px 2px hsla(0, 0%, 100%, 0.8);
    --shadow-accent-glow: 0 0 24px hsla(168, 55%, 40%, 0.22);
    --shadow-feature-halo: 0 0 48px hsla(168, 55%, 42%, 0.16);
    --shadow-relief:
      inset 0 12px 22px hsla(30, 25%, 25%, 0.18),
      inset 0 6px 12px hsla(30, 25%, 25%, 0.12),
      inset 0 -3px 6px hsla(0, 0%, 100%, 0.7),
      inset 0 2px 0   hsla(30, 25%, 25%, 0.14),
      0    1px 0     hsla(0, 0%, 100%, 0.9);

    /* Wall-distance — TUNED light (geometry in :root, color + alpha here).
       Byte-identical-by-value with the manual block. */
    --wall-shadow-color: 30, 28%, 32%;  /* H,S,L channels only — consumed as hsla(var(--wall-shadow-color), <alpha>) */
    --wall-close-alpha:  0.26;
    --wall-medium-alpha: 0.20;
    --wall-far-alpha:    0.15;

    /* Component one-offs retheme for light */
    --nav-glass-bg: hsla(40, 30%, 96%, 0.82);
    /* Opaque drawer fill — hsl(), no alpha, matching --bg-surface in light.
       A translucent drawer is the bug this token exists to prevent. */
    --nav-drawer-bg: hsl(40, 28%, 97%);
    /* The scrim still DARKENS on a bright page — weaker than dark mode's 0.6
       because an off-white page needs less dimming to read as pushed back,
       and warm-hued so it belongs to the light palette rather than reading
       as a grey sheet dropped on top of it. */
    --nav-scrim-bg: hsla(30, 20%, 18%, 0.38);
    --btn-primary-rim: hsla(0, 0%, 100%, 0.55);
    --avatar-light-catch-strong: hsla(168, 70%, 95%, 0.55);
    --avatar-light-catch-fade:   hsla(168, 50%, 75%, 0);
    --icon-accent-halo: 0 0 24px hsla(168, 55%, 42%, 0.16);

    /* Theme-toggle switch (soft-3D pill) — LIGHT (OS-pref path).
       Byte-identical-by-value with the manual [data-theme=light] block.
       Warm carved well + bright raised knob + warm contact shadow; active end
       icon takes the darker light-mode mint. */
    --toggle-track-bg: hsl(40, 22%, 90%);
    --toggle-track-shadow:
      inset 0 2px 5px hsla(30, 25%, 25%, 0.18),
      inset 0 -1px 1px hsla(0, 0%, 100%, 0.8);
    --toggle-knob-bg:
      linear-gradient(180deg, hsl(40, 30%, 100%) 0%, hsl(40, 25%, 96%) 100%);
    --toggle-knob-shadow:
      0 2px 5px hsla(30, 25%, 28%, 0.20),
      0 1px 2px hsla(30, 25%, 28%, 0.16),
      inset 0 1px 0 hsla(0, 0%, 100%, 1);
    --toggle-icon-idle:   hsl(40, 10%, 55%);
    --toggle-icon-active: hsl(168, 55%, 38%);

    /* Themeable surface-material tokens (Batch 2) — LIGHT values.
       Byte-identical-by-value with the manual block. */
    --wall-object-gradient:
      linear-gradient(
        180deg,
        hsla(0, 0%, 100%, 0.75) 0%,
        hsla(0, 0%, 100%, 0.3) 20%,
        hsla(0, 0%, 100%, 0)   45%
      ),
      var(--bg-surface);
    --wall-object-rim: inset 0 1px 0 hsla(0, 0%, 100%, 0.95);

    --feature-card-bg: var(--bg-surface-feature);
    --feature-card-gradient:
      linear-gradient(
        180deg,
        hsla(168, 45%, 78%, 0.30) 0%,
        hsla(168, 35%, 72%, 0.10) 20%,
        hsla(0, 0%, 100%, 0) 40%
      ),
      linear-gradient(
        0deg,
        hsla(30, 25%, 40%, 0.05) 0%,
        hsla(30, 25%, 40%, 0) 30%
      );

    --avatar-gradient:
      linear-gradient(
        180deg,
        var(--avatar-light-catch-strong) 0%,
        var(--avatar-light-catch-fade) 40%
      ),
      linear-gradient(
        135deg,
        hsl(168, 55%, 42%) 0%,
        hsl(195, 55%, 46%) 100%
      );
    --avatar-shadow:
      0 12px 24px hsla(30, 25%, 30%, 0.18),
      0 4px 8px hsla(30, 25%, 30%, 0.16),
      inset 0 1px 0 hsla(168, 70%, 100%, 0.5),
      inset 0 -2px 4px hsla(30, 30%, 25%, 0.12);

    color-scheme: light;
  }
}

/* --- 2. Manual toggle / descendant scope: explicit light, wins over OS pref ---
   SCOPABLE (Batch 2): selector is [data-theme="light"] WITHOUT the :root
   prefix, so it matches ANY element carrying data-theme="light" and cascades
   the light token values into that element's whole subtree. The global toggle
   still sets data-theme on <html> (so the manual choice themes the page), but
   dropping :root means a <div data-theme="light"> nested anywhere ALSO gets the
   full light palette — the styleguide's side-by-side dark|light compare lab
   depends on exactly this. Custom properties cascade, so every var()-consuming
   descendant retheme for free with no per-component CSS. Specificity: an
   attribute selector (0,1,0) beats the OS @media block's :root:not(...) only
   because the media block targets :root (also 0,1,0) and source order puts the
   manual blocks later — the byte-identical-and-adjacent invariant below keeps
   that ordering honest. */
[data-theme="light"] {
  /* Backgrounds — warm off-white ramp (raised = closer to white) */
  --bg-deep:      hsl(40, 30%, 95%);
  --bg-surface:   hsl(40, 28%, 97%);
  --bg-raised:    hsl(40, 25%, 99%);
  --bg-surface-feature: hsl(180, 28%, 96%);

  /* Surface lighting */
  --surface-top-gradient:
    linear-gradient(180deg,
      hsla(0, 0%, 100%, 0.9) 0%,
      hsla(0, 0%, 100%, 0.4) 15%,
      hsla(0, 0%, 100%, 0) 40%),
    linear-gradient(0deg,
      hsla(30, 30%, 40%, 0.06) 0%,
      hsla(30, 30%, 40%, 0) 30%);
  --surface-inner-edge: hsla(30, 20%, 30%, 0.1);
  --surface-edge-highlight:
    linear-gradient(180deg,
      hsla(0, 0%, 100%, 0.95) 0%,
      hsla(0, 0%, 100%, 0) 20%);

  /* Accent — darker + more saturated mint/teal so it holds on light ground */
  --accent:           hsl(168, 55%, 38%);
  --accent-soft:      hsl(168, 45%, 32%);
  --accent-glow:      hsl(168, 60%, 30%);
  --accent-secondary: hsl(195, 55%, 42%);

  /* Text — dark-on-light */
  --text-primary:   hsl(220, 18%, 16%);
  --text-secondary: hsl(220, 12%, 38%);
  --text-muted:     hsl(220, 10%, 55%);

  /* Self-definition shadows — Batch 2 TUNED for warm off-white.
     DESIGN PASS: soft-3D on light is NOT inverted dark. Two changes from the
     first draft. (1) The shadow color is a DARKER warm gray — hsl(30,25%,28%)
     not hsl(30,30%,40%) — because a mid-gray shadow on a 95%-light page is
     nearly invisible; pulling the lightness down gives the shadow enough
     contrast to read as a real contact. (2) Each token carries a WIDE soft
     ambient layer at low alpha PLUS a TIGHT contact layer at a slightly higher
     alpha — the tight contact is what roots the object on the page (the single
     most important light-mode depth cue). The top rim flips meaning vs dark:
     on light a near-white high-alpha inset rim reads as the lit top lip of a
     physical edge, and it does most of the "this is a raised object" work that
     the dark drop shadow does in dark mode. Warm + soft + low-alpha CONTACT +
     bright rim — never near-black drops with thin white rims. */
  --shadow-soft:
    0 8px 24px hsla(30, 25%, 28%, 0.10),
    0 2px 5px hsla(30, 25%, 28%, 0.14),
    inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
  --shadow-float:
    0 16px 40px hsla(30, 25%, 28%, 0.12),
    0 4px 10px hsla(30, 25%, 28%, 0.16),
    inset 0 1px 0 hsla(0, 0%, 100%, 0.95);
  --shadow-hover:
    0 28px 56px hsla(30, 25%, 28%, 0.16),
    0 8px 18px hsla(30, 25%, 28%, 0.18),
    inset 0 1px 0 hsla(0, 0%, 100%, 1);
  --shadow-press:
    inset 0 4px 12px hsla(30, 25%, 25%, 0.18),
    inset 0 -1px 2px hsla(0, 0%, 100%, 0.7);
  --shadow-inset:
    inset 0 2px 5px hsla(30, 25%, 25%, 0.16),
    inset 0 -1px 1px hsla(0, 0%, 100%, 0.7);
  --shadow-inset-deep:
    inset 0 4px 9px hsla(30, 25%, 25%, 0.20),
    inset 0 -1px 2px hsla(0, 0%, 100%, 0.8);
  --shadow-accent-glow: 0 0 24px hsla(168, 55%, 40%, 0.22);
  --shadow-feature-halo: 0 0 48px hsla(168, 55%, 42%, 0.16);
  --shadow-relief:
    inset 0 12px 22px hsla(30, 25%, 25%, 0.18),
    inset 0 6px 12px hsla(30, 25%, 25%, 0.12),
    inset 0 -3px 6px hsla(0, 0%, 100%, 0.7),
    inset 0 2px 0   hsla(30, 25%, 25%, 0.14),
    0    1px 0     hsla(0, 0%, 100%, 0.9);

  /* Wall-distance — Batch 2 TUNED. Geometry (offset/size/blur) stays in :root;
     only COLOR + ALPHA change for light. The first draft (0.16/0.13/0.1) was
     too faint — wall cards barely lifted off the off-white. These warm, darker
     (hsl 30,28%,32%), higher-alpha fills give genuine distance: the close card
     casts a tight dense contact, the far card a wide soft penumbra. Alpha still
     DECREASES with distance (wider blur spreads the same light thinner). */
  --wall-shadow-color: 30, 28%, 32%;  /* H,S,L channels only — consumed as hsla(var(--wall-shadow-color), <alpha>) */
  --wall-close-alpha:  0.26;
  --wall-medium-alpha: 0.20;
  --wall-far-alpha:    0.15;

  /* Component one-offs retheme for light */
  --nav-glass-bg: hsla(40, 30%, 96%, 0.82);
  /* Opaque drawer fill — hsl(), no alpha, matching --bg-surface in light.
     A translucent drawer is the bug this token exists to prevent. */
  --nav-drawer-bg: hsl(40, 28%, 97%);
  /* The scrim still DARKENS on a bright page — weaker than dark mode's 0.6
     because an off-white page needs less dimming to read as pushed back, and
     warm-hued so it belongs to the light palette rather than reading as a
     grey sheet dropped on top of it. */
  --nav-scrim-bg: hsla(30, 20%, 18%, 0.38);
  --btn-primary-rim: hsla(0, 0%, 100%, 0.55);
  --avatar-light-catch-strong: hsla(168, 70%, 95%, 0.55);
  --avatar-light-catch-fade:   hsla(168, 50%, 75%, 0);
  --icon-accent-halo: 0 0 24px hsla(168, 55%, 42%, 0.16);

  /* Theme-toggle switch (soft-3D pill) — LIGHT (manual [data-theme=light]).
     Byte-identical-by-value with the @media OS-pref block above. Warm carved
     well + bright raised knob + warm contact shadow; the sun end glows the
     darker light-mode mint when this theme is active. */
  --toggle-track-bg: hsl(40, 22%, 90%);
  --toggle-track-shadow:
    inset 0 2px 5px hsla(30, 25%, 25%, 0.18),
    inset 0 -1px 1px hsla(0, 0%, 100%, 0.8);
  --toggle-knob-bg:
    linear-gradient(180deg, hsl(40, 30%, 100%) 0%, hsl(40, 25%, 96%) 100%);
  --toggle-knob-shadow:
    0 2px 5px hsla(30, 25%, 28%, 0.20),
    0 1px 2px hsla(30, 25%, 28%, 0.16),
    inset 0 1px 0 hsla(0, 0%, 100%, 1);
  --toggle-icon-idle:   hsl(40, 10%, 55%);
  --toggle-icon-active: hsl(168, 55%, 38%);

  /* Themeable surface-material tokens (Batch 2) — LIGHT values.
     The wall-object, feature card, and avatar that previously hardcoded dark
     surface tokens now get light material here. */

  /* Wall card body — bright white top light-catch over the off-white surface,
     and a near-white inset top rim (the lit lip). */
  --wall-object-gradient:
    linear-gradient(
      180deg,
      hsla(0, 0%, 100%, 0.75) 0%,
      hsla(0, 0%, 100%, 0.3) 20%,
      hsla(0, 0%, 100%, 0)   45%
    ),
    var(--bg-surface);
  --wall-object-rim: inset 0 1px 0 hsla(0, 0%, 100%, 0.95);

  /* Feature card — mint-tinted top catch on the mint-tinted light surface,
     plus a faint warm bottom settle. The mint tint is lighter and a touch
     stronger than dark so it stays visible against the bright body. */
  --feature-card-bg: var(--bg-surface-feature);
  --feature-card-gradient:
    linear-gradient(
      180deg,
      hsla(168, 45%, 78%, 0.30) 0%,
      hsla(168, 35%, 72%, 0.10) 20%,
      hsla(0, 0%, 100%, 0) 40%
    ),
    linear-gradient(
      0deg,
      hsla(30, 25%, 40%, 0.05) 0%,
      hsla(30, 25%, 40%, 0) 30%
    );

  /* Avatar — mint→blue accent disc (accents nudged darker so they hold on
     light), bright mint top catch, warm contact + inner darkening shadow. */
  --avatar-gradient:
    linear-gradient(
      180deg,
      var(--avatar-light-catch-strong) 0%,
      var(--avatar-light-catch-fade) 40%
    ),
    linear-gradient(
      135deg,
      hsl(168, 55%, 42%) 0%,
      hsl(195, 55%, 46%) 100%
    );
  --avatar-shadow:
    0 12px 24px hsla(30, 25%, 30%, 0.18),
    0 4px 8px hsla(30, 25%, 30%, 0.16),
    inset 0 1px 0 hsla(168, 70%, 100%, 0.5),
    inset 0 -2px 4px hsla(30, 30%, 25%, 0.12);

  color-scheme: light;
}

/* --- 3. Explicit dark choice / descendant scope: re-assert FULL dark ---------
   SCOPABLE (Batch 2): this block does TWO jobs now.
     (a) Specificity anchor for the OS @media block's :root:not([data-theme="dark"])
         guard — an explicit dark choice on a light-OS device must NOT inherit
         the OS-light values. (unchanged from Batch 1.)
     (b) DESCENDANT RE-ASSERTION — the selector dropped its :root prefix so a
         <div data-theme="dark"> nested inside a light-themed page (the compare
         lab's dark panel) gets the COMPLETE dark palette back. Batch 1 left this
         block empty because :root already defaulted to dark — fine when dark was
         only ever the page root, fatal for descendant scoping: a dark-scoped div
         inside [data-theme="light"] would have inherited the LIGHT custom props
         from its light ancestor and rendered light. So every dark value is now
         re-declared here verbatim from the :root defaults. The two are kept
         byte-identical-by-value on purpose; drift between :root and this block is
         a bug. Mirrors the light block's "re-declare everything" honesty. */
[data-theme="dark"] {
  color-scheme: dark;

  /* Backgrounds — deep blue-gray ramp (re-asserted from :root) */
  --bg-deep:      hsl(220, 15%, 10%);
  --bg-surface:   hsl(220, 15%, 14%);
  --bg-raised:    hsl(220, 15%, 18%);
  --bg-surface-feature: hsl(200, 14%, 15%);

  /* Surface lighting */
  --surface-top-gradient: linear-gradient(
      180deg,
      hsla(220, 20%, 100%, 0.07) 0%,
      hsla(220, 20%, 100%, 0.03) 15%,
      hsla(220, 20%, 100%, 0) 40%
    ),
    linear-gradient(
      0deg,
      hsla(220, 40%, 0%, 0.18) 0%,
      hsla(220, 40%, 0%, 0) 30%
    );
  --surface-inner-edge: hsla(220, 20%, 100%, 0.08);
  --surface-edge-highlight: linear-gradient(
    180deg,
    hsla(220, 20%, 100%, 0.12) 0%,
    hsla(220, 20%, 100%, 0) 20%
  );

  /* Accent */
  --accent:           hsl(168, 45%, 50%);
  --accent-soft:      hsl(168, 35%, 40%);
  --accent-glow:      hsl(168, 50%, 65%);
  --accent-secondary: hsl(195, 45%, 50%);

  /* Text — light-on-dark */
  --text-primary:   hsl(220, 10%, 88%);
  --text-secondary: hsl(220, 10%, 58%);
  --text-muted:     hsl(220, 10%, 38%);

  /* Self-definition shadows — near-black drops + white rim highlights */
  --shadow-soft:
    0 8px 24px hsla(220, 50%, 1%, 0.75),
    0 3px 6px hsla(220, 50%, 1%, 0.5),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.07);
  --shadow-float:
    0 20px 48px hsla(220, 50%, 1%, 0.85),
    0 6px 12px hsla(220, 50%, 1%, 0.6),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.1);
  --shadow-hover:
    0 28px 64px hsla(220, 50%, 1%, 0.9),
    0 8px 16px hsla(220, 50%, 1%, 0.65),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.12);
  --shadow-press:
    inset 0 6px 16px hsla(220, 40%, 2%, 0.7),
    inset 0 -1px 2px hsla(220, 20%, 100%, 0.02);
  --shadow-inset:
    inset 0 2px 6px hsla(220, 40%, 2%, 0.55),
    inset 0 -1px 1px hsla(220, 20%, 100%, 0.03);
  --shadow-inset-deep:
    inset 0 4px 10px hsla(220, 40%, 2%, 0.7),
    inset 0 -1px 2px hsla(220, 20%, 100%, 0.04);
  --shadow-accent-glow: 0 0 24px hsla(168, 45%, 50%, 0.25);
  --shadow-feature-halo: 0 0 48px hsla(168, 45%, 50%, 0.1);
  --shadow-relief:
    inset 0 12px 24px hsla(220, 50%, 1%, 0.7),
    inset 0 6px 12px hsla(220, 50%, 1%, 0.5),
    inset 0 -3px 6px hsla(220, 20%, 100%, 0.04),
    inset 0 2px 0   hsla(220, 50%, 1%, 0.5),
    0    1px 0     hsla(220, 20%, 100%, 0.08);

  /* Wall-distance — near-black blue shadow color, full dark alphas */
  --wall-shadow-color: 220, 50%, 1%;  /* H,S,L channels only — consumed as hsla(var(--wall-shadow-color), <alpha>) */
  --wall-close-alpha:  0.55;
  --wall-medium-alpha: 0.5;
  --wall-far-alpha:    0.45;

  /* Component one-offs (dark) — values match :root verbatim (byte-identical-by-value) */
  --nav-glass-bg: hsla(220, 15%, 10%, 0.85);
  /* Opaque drawer fill — hsl(), no alpha, matching --bg-surface in dark. */
  --nav-drawer-bg: hsl(220, 15%, 14%);
  /* Page dim behind the open drawer. */
  --nav-scrim-bg: hsla(220, 15%, 4%, 0.6);
  --btn-primary-rim: hsla(0, 0%, 100%, 0.2);
  --avatar-light-catch-strong: hsla(168, 60%, 80%, 0.2);
  --avatar-light-catch-fade:   hsla(168, 50%, 60%, 0);
  --icon-accent-halo: 0 0 24px hsla(168, 45%, 50%, 0.1);

  /* Theme-toggle switch (soft-3D pill) — re-asserted DARK.
     Byte-identical-by-value with :root, so a dark-scoped panel inside a light
     page (the styleguide compare lab) renders the dark toggle treatment. */
  --toggle-track-bg: hsl(220, 15%, 12%);
  --toggle-track-shadow:
    inset 0 2px 5px hsla(220, 40%, 2%, 0.6),
    inset 0 -1px 1px hsla(220, 20%, 100%, 0.04);
  --toggle-knob-bg:
    linear-gradient(180deg, hsl(220, 15%, 26%) 0%, hsl(220, 15%, 19%) 100%);
  --toggle-knob-shadow:
    0 2px 5px hsla(220, 50%, 1%, 0.6),
    0 1px 2px hsla(220, 50%, 1%, 0.5),
    inset 0 1px 0 hsla(220, 20%, 100%, 0.18);
  --toggle-icon-idle:   hsl(220, 12%, 45%);
  --toggle-icon-active: hsl(168, 45%, 55%);

  /* Themeable surface-material tokens (Batch 2) — re-asserted dark.
     These route the previously-HARDCODED dark values in .wall-object,
     .wall-shadow*, .card--feature, and .sg-bio-card__avatar through tokens
     so those demo surfaces follow the theme instead of staying dark in light. */
  --wall-object-gradient:
    linear-gradient(
      180deg,
      hsla(220, 20%, 100%, 0.08) 0%,
      hsla(220, 20%, 100%, 0.03) 20%,
      hsla(220, 20%, 100%, 0)    45%
    ),
    var(--bg-surface);
  --wall-object-rim: inset 0 1px 0 hsla(220, 20%, 100%, 0.1);

  --feature-card-bg: var(--bg-surface-feature);
  --feature-card-gradient:
    linear-gradient(
      180deg,
      hsla(168, 30%, 60%, 0.08) 0%,
      hsla(168, 20%, 50%, 0.03) 20%,
      hsla(220, 20%, 100%, 0) 40%
    ),
    linear-gradient(
      0deg,
      hsla(220, 40%, 0%, 0.18) 0%,
      hsla(220, 40%, 0%, 0) 30%
    );

  --avatar-gradient:
    linear-gradient(
      180deg,
      var(--avatar-light-catch-strong) 0%,
      var(--avatar-light-catch-fade) 40%
    ),
    linear-gradient(
      135deg,
      hsl(168, 45%, 50%) 0%,
      hsl(195, 45%, 50%) 100%
    );
  --avatar-shadow:
    0 12px 24px hsla(220, 50%, 1%, 0.6),
    0 4px 8px hsla(220, 50%, 1%, 0.4),
    inset 0 1px 0 hsla(168, 60%, 100%, 0.25),
    inset 0 -2px 4px hsla(220, 40%, 0%, 0.15);
}
/* ============================================================================
   FONT DELIVERY — Space Grotesk, self-hosted
   ----------------------------------------------------------------------------
   --font-family above has named "Space Grotesk" since the design system was
   written, but nothing in this codebase ever delivered it. The only delivery
   path was a <link> to fonts.bunny.net in every template — a third-party
   request on first paint, which is precisely what folio's no-CDN / GDPR /
   stdlib-only principle forbids. This rule is the self-hosted replacement.

   PATH CONTRACT — the one thing here that must never drift.
   Break any link in this chain and the browser 404s the font, silently falls
   back to system-ui, and reports nothing anywhere. The bug presents as "the
   brand font just doesn't apply", which is how it survived this long.

     CDB    directory  folio/static/fonts
            file       space-grotesk-variable.woff2
     disk   generated/folio/static/fonts/space-grotesk-variable.8e085aa43809.woff2
            (generate_all writes <workspace_root>/<directory.path>/<file_name>,
            byte-exact — assets get no provenance header, unlike code files)
     image  COPY static/ ./static/  under  WORKDIR /app  ->  /app/static/fonts/…
     Go     handleStatic owns the /static/ subtree since 2026-09-12 (it
            replaced the stock FileServer). Only the manifest BUILD resolves
            relative to CWD, and CWD is /app: branch A is an in-memory lookup
            of bytes already read at boot and touches no path at all, while
            branch B opens through http.Dir(staticDir) for un-hashed names.
     URL    /static/fonts/space-grotesk-variable.8e085aa43809.woff2   <- the url() below
     nginx  location / proxy_passes everything to :8001; there is no /static
            location and no rewrite, so the path arrives verbatim

   THE url() BELOW IS THE SOURCE FORM, NOT THE SERVED ONE (2026-09-12).
   At boot, assetManifestBuild rewrites every "/static/<logical>" occurrence
   inside each CSS file to that asset's hashed URL and only THEN hashes the
   result, so the hashed tokens.css twin a visitor actually downloads names the
   HASHED woff2 and carries it into the immutable cache class with it. The
   un-hashed /static/css/tokens.css keeps this literal, which is what the lab's
   hot-reload polling still reads. KEEP THE LITERAL EXACTLY AS WRITTEN: it is
   the string the rewrite matches on. A hand-written hash here would match
   nothing, freeze at whatever digest was current when it was typed, and 404
   on the next change to the binary.

   ONE VARIABLE FILE, NOT FOUR STATIC CUTS. The design system uses 400/500/600/
   700 (--font-weight-regular/medium/semibold/bold). Upstream's static set is
   Light 300 / Regular 400 / Medium 500 / Bold 700 — there is no 600 cut, so
   --font-weight-semibold would be synthetically emboldened from 500. The wght
   axis interpolates a true 600, and costs ~49 KB against ~168 KB for four cuts.
   The declared range is the axis's real range (300–700), not just the four
   weights in use, so future design work can reach for 300 without shipping a
   second file.

   font-display: swap — text paints immediately in the -apple-system/system-ui
   fallback and re-renders when the font arrives. Never invisible text.

   The family name below must stay byte-identical to the first entry of
   --font-family in the :root block above. CSS matches faces by exact family
   string; rename one side and the font silently stops applying.

   SIL Open Font License 1.1 — OFL.txt ships next to the binary in
   static/fonts/ and must stay there for as long as the font does.
   ============================================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk-variable.8e085aa43809.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
/* =============================================================================
   BASE — reset + page defaults
   ============================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* HORIZONTAL OVERFLOW GUARD — `clip`, NEVER `hidden`, and the distinction is
     load-bearing (added 2026-08-16 with the fluid wall-distance variant).

     WHY IT IS NEEDED AT ALL: .wall-stage__shadow paints a solid rectangle and
     softens it with filter: blur(). A blur feathers roughly 3x its radius in
     every direction, so a wall shadow ALWAYS overhangs its own stage. On the
     landing page's 760px tier --wall-fluid-reserve drops to 0, which puts the
     shadow's own geometry past the container's right edge on purpose (it lands
     inside the 16px page gutter and reads as a shadow escaping the block, which
     is correct). Without a guard, that overhang is scrollable width: a phone
     gets a horizontal scrollbar and can pan the page sideways into empty space.

     WHY NOT `hidden`: overflow on the root propagates to the viewport, and a
     `hidden` value would make the viewport a SCROLL CONTAINER. Three things
     break quietly when that happens - scroll-behavior: smooth stops animating
     the anchor jumps the nav links depend on, `scroll-margin-top` is resolved
     against a different scrollport, and nav.js's window.scrollY readings no
     longer describe the box the CSS is reasoning about. `clip` does none of
     that: it clips the paint and creates no scroll container at all.

     WHY BOTH html AND body: the root's used overflow propagates to the viewport
     and the BODY's value is then NOT propagated. Declaring it in both places
     means the guard holds regardless of which element the engine ends up
     treating as the propagation source. */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  /* Second half of the overflow guard - see the html rule above for why this
     is `clip` and why it is stated twice. */
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--accent-glow);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* SKIP LINK — the first focusable element in the document, offscreen until it
   is focused (added 2026-08-16; index.html has carried the markup since the
   Noxarc rebuild and this rule did not exist, so "Skip to content" rendered as
   ordinary visible text at the top of every page).

   *** THE OFFSCREEN STATE IS A POSITION OFFSET, NEVER display OR visibility. ***
   Both of those remove the element from the TAB ORDER, which destroys the only
   thing a skip link is for. `left: -9999px` moves it out of the painted area
   while leaving it focusable, announced by screen readers, and reachable by the
   very first Tab press. If you ever "tidy" this to display: none, the link
   becomes unreachable and the page silently loses its keyboard bypass.

   HORIZONTAL offscreen, not vertical, and that is deliberate. Translating it
   up by its own height would put its BOX above the viewport but its drop
   shadow (--shadow-soft reaches ~44px below the box) could still bleed back
   into the top of the page as a stray smudge. 9999px to the left puts the
   whole thing — shadow included — nowhere near the viewport, and the root's
   overflow-x: clip means it can never become scrollable width.

   *** z-index: 200 IS LOAD-BEARING AND MUST STAY ABOVE THE NAV'S 100. ***
   .folio-nav is position: fixed at z-index 100 and creates a stacking context.
   This element is a SIBLING of that nav and a direct child of <body>, so both
   compete in the root stacking context and the higher z-index wins outright.
   Drop this below 100 and the link is still focusable but paints BEHIND the
   bar — which is strictly worse than having no skip link at all, because a
   keyboard user gets a focus stop that appears to do nothing.
   (Nothing traps it: `overflow: clip` on html/body does NOT create a
   containing block for fixed-position descendants — only transform, filter,
   perspective, contain, will-change and backdrop-filter do. That is the same
   trap documented for .folio-nav in knowledge 1b128745.)

   position: fixed, not absolute. Absolute would resolve against the initial
   containing block, i.e. the top of the DOCUMENT, so a visitor who tabs into
   the page after scrolling would move focus to something above the fold and
   see nothing happen. Fixed keeps it at the top of the VIEWPORT wherever the
   page is scrolled to.

   No transition. An accessibility affordance should arrive the instant it is
   focused; a fade would mean the first frames of a keyboard user's focus stop
   show nothing.

   Every colour here is an existing themed token (--bg-raised, --text-primary,
   --surface-inner-edge, --accent), so it follows both palettes automatically
   and no new token had to be threaded through the four theme blocks. */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: -9999px;
  z-index: 200;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  background-color: var(--bg-raised);
  background-image: var(--surface-top-gradient);
  box-shadow:
    inset 0 1px 0 0 var(--surface-inner-edge),
    var(--shadow-soft);
  color: var(--text-primary);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

/* :focus AND :focus-visible together, deliberately. A skip link is activated
   by keyboard alone, so :focus-visible alone would be correct in theory — but
   it is the very first tab stop and must appear even in engines that resolve
   focus-visible conservatively on a freshly-loaded document. The pair costs
   nothing and removes an entire class of "it works in my browser". */
.skip-link:focus,
.skip-link:focus-visible {
  left: var(--space-4);
  color: var(--text-primary);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =============================================================================
   TYPOGRAPHY — display, headings, body
   Classes let non-semantic elements (e.g. mock H1 in a demo) take the look.
   ============================================================================ */

.display,
h1.display {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

h1,
.h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

h2,
.h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

h3,
.h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

h4,
.h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  margin: 0;
}

.lead {
  font-size: var(--font-size-lead);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--text-secondary);
  max-width: 65ch;
  margin: 0;
}

p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text-secondary);
  max-width: 65ch;
  margin: 0;
}

.small {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
}

.caption {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
}

/* Accent text — for gradient-filled emphasis on display/hero */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}
/* =============================================================================
   SURFACES — the soft 3D recipe made into reusable classes
   -----------------------------------------------------------------------------
   .surface is the base "pillow" look — every card, panel, swatch container
   builds on it. Captain's iteration feedback: "not 3D enough, not enough depth,
   big even-color spaces break the illusion". This class is the direct answer.

   The recipe (four compounding layers — remove any one and it collapses):
     1. bg-surface color
     2. --surface-top-gradient: TWO gradients composited — bright at the top
        edge + darkness settling at the bottom. Guarantees no card ever shows
        a big flat area of even color.
     3. ::before hairline — a 1px bright rim on the TOP edge only (mask trick),
        simulating light catching the physical edge of the object.
     4. --shadow-soft — deep drop + contact + rim highlight, all in one token.
     5. generous radius, smooth 250ms ease transitions.
   ============================================================================ */

.surface {
  position: relative;
  background-color: var(--bg-surface);
  background-image: var(--surface-top-gradient);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

/* Hairline top-edge light catch.
   Painted with a 1px padding-box gradient clipped to the border only — the
   mask trick creates a bright rim exclusively on the top edge that curves
   perfectly into the rounded corners. Simulates light catching a physical
   lip. pointer-events:none so it never eats interaction. */
.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--surface-edge-highlight);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.surface--float {
  box-shadow: var(--shadow-float);
}

.surface--lg {
  border-radius: var(--radius-lg);
}

.surface--sm {
  border-radius: var(--radius-sm);
}

/* Interactive lift — cards and buttons opt in */
.surface--interactive {
  cursor: pointer;
}

.surface--interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.surface--interactive:active {
  transform: translateY(0);
  box-shadow: var(--shadow-press);
}

/* Pressed / inset variant — for inputs and "pressed" shadow demos.
   Background is --bg-deep (darker than surface) so the element visibly sits
   BELOW the surrounding plane. No top-gradient, no ::before rim — the whole
   point is the absence of the lit-from-above cues. */
.surface--pressed {
  background-color: var(--bg-deep);
  background-image: none;
  box-shadow: var(--shadow-press);
}

.surface--pressed::before {
  display: none;
}

/* Shallow inset — carved-in element (tags, small input chips).
   Use when you want "this receives input" or "this is grouped into the card". */
.surface--inset {
  background-color: var(--bg-deep);
  background-image: none;
  box-shadow: var(--shadow-inset);
}

.surface--inset::before {
  display: none;
}

/* Deep inset — carved-in emphasised element (textareas, focused search).
   Deeper well than --inset, stronger top shadow suggesting more depth. */
.surface--inset-deep {
  background-color: var(--bg-deep);
  background-image: none;
  box-shadow: var(--shadow-inset-deep);
}

.surface--inset-deep::before {
  display: none;
}

/* Relief — the DEEPEST carved-in variant (promoted from experiments exp3).
   Five-layer --shadow-relief stack creates a cavity that reads as SUNKEN,
   not just pressed. The top lip is razor-sharp dark (light blocked at the
   upper-left edge of the cavity), the interior carries heavy inset
   darkness, the floor has a faint bounce highlight at the bottom, and the
   outer edge gets a 1px top rim of white to suggest the surrounding
   material curls slightly UP at the cavity perimeter.

   Use for: a drilled socket (circular + relief), an aggressively carved
   panel cavity, any element that must read as carved DEEPLY into its
   surrounding surface. This is the maximum inset — conceptually the
   inverse counterpart of .wall-far on the outset side.

   Like the other inset variants this suppresses ::before (no lit rim on
   sunken elements) and swaps the lifted surface gradient for a flat dark
   bg. Asymmetric light direction is baked into --shadow-relief itself
   (top darker than bottom) — do NOT flip it, the whole page shares one
   upper-left key light. */
.surface--relief {
  background-color: var(--bg-deep);
  background-image: none;
  box-shadow: var(--shadow-relief);
}

.surface--relief::before {
  display: none;
}

/* Accent-glow halo — for the single most important CTA */
.surface--glow {
  box-shadow:
    var(--shadow-float),
    var(--shadow-accent-glow);
}

/* =============================================================================
   SHAPE VARIANTS — not just rounded rectangles anymore
   -----------------------------------------------------------------------------
   Captain's v3 feedback: "we also have to add some shapes that are not just
   round or boxes". The soft 3D recipe is shape-agnostic — the hairline, the
   gradient, and the layered shadow all follow border-radius automatically.
   These three modifiers introduce organic primitives without breaking any
   of the recipe's assumptions.

   --circle     perfectly round. Avatar, icon button, decorative medallion.
   --squircle   asymmetric radius (35% / 50%) reads as a blobby, organic
                pillow shape — softer than a rounded rectangle, more tactile.
                Great as a project icon slot or a decorative accent.
   --inset-circle   circular version of the inset well. Reads as a drilled
                    hole / button socket. Pairs with --inset for variety in
                    the elevation section demos.

   All three keep the ::before hairline and the --shadow-soft base, so they
   sit on the page with the exact same light grammar as everything else.
   The dimensions are set on the element (width/height inline or via a demo
   class) — the shape modifiers only alter border-radius.
   ============================================================================ */

.surface--circle {
  border-radius: 50%;
  /* Perfectly round elements have no "top" in the flat sense, but the light
     grammar still works: the ::before rim becomes a crescent at the top of
     the circle and the shadow underneath grounds it. Reads as a sphere
     pressed flat against the page, which is the aesthetic we want for
     avatars and icon medallions. */
}

.surface--squircle {
  /* The 35%/50% asymmetric radius is the secret — a symmetric 35% gives a
     super-ellipse (iOS-app-icon look), but pulling the vertical radius to
     50% while leaving horizontal at 35% produces a slightly elongated
     organic pillow. Leans away from "geometric primitive" toward "pebble". */
  border-radius: 35% / 50%;
}

.surface--inset-circle {
  background-color: var(--bg-deep);
  background-image: none;
  border-radius: 50%;
  box-shadow: var(--shadow-inset-deep);
}

.surface--inset-circle::before {
  display: none;
}

/* =============================================================================
   CARDS
   -----------------------------------------------------------------------------
   Padding bumped to --space-8 (32px) on .card and --space-12 (48px) on
   .card--feature. Larger padding is counterintuitive as a fix for "too much
   flat area" — but the surface gradient is strongest at the edges, so MORE
   padding means the gradient's tonal variation is actually visible inside
   the card instead of hiding behind content packed to the rim.
   ============================================================================ */

.card {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* =============================================================================
   FEATURE CARD — the "specialness" is communicated via light, not via a bar.
   -----------------------------------------------------------------------------
   Captain's verdict on v1: "the feature card doesn't fit the style". Diagnosis:
   the flat accent-gradient top bar was a flat colored slab — the exact enemy
   of the soft 3D aesthetic. Flat color breaks the illusion instantly.

   v2 approach: the feature card earns its specialness through THREE subtle
   light cues, none of them flat:
     1. A tinted mint layer in the top surface gradient (~5% alpha) — the
        "light catching the edge" is warm-mint tinted instead of neutral white.
     2. --shadow-float (more lift than resting cards).
     3. --shadow-feature-halo — a soft 40px mint glow hugging the edges.
   No hard borders, no flat bars. The card simply feels a bit more lit.
   ============================================================================ */
.card--feature {
  position: relative;
  padding: var(--space-12);
  border-radius: var(--radius-lg);
  /* v3: the BODY color shifts toward the accent hue (--bg-surface-feature is
     hsl(200, 14%, 15%) instead of the neutral hsl(220, 15%, 14%)). That tiny
     hue shift is what makes the card feel "cast from a slightly different
     material" rather than just "lit differently". The tinted top highlight
     and the mint halo are there to confirm what the material already
     whispers — without the body shift they would feel imported from outside. */
  /* THEMED (Batch 2): body color + the mint-tinted top light-catch gradient now
     come from --feature-card-bg / --feature-card-gradient. Previously both were
     hardcoded with dark-premise stops (168-hued mint over a 220 dark settle), so
     the "Surfaces at rest" feature card stayed dark in light mode. The tokens
     carry the dark recipe verbatim in dark and a lighter, slightly stronger mint
     catch on the mint-tinted light surface in light. --shadow-float and
     --shadow-feature-halo already theme on their own. */
  background-color: var(--feature-card-bg);
  background-image: var(--feature-card-gradient);
  box-shadow:
    var(--shadow-float),
    var(--shadow-feature-halo);
}

.card__title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: var(--line-height-snug);
  margin: 0;
}

.card__description {
  color: var(--text-secondary);
  line-height: var(--line-height-body);
  margin: 0;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* =============================================================================
   WALL-DISTANCE PRODUCTION CLASSES — explicit markup, lab-verbatim pixel math
   -----------------------------------------------------------------------------
   THE HIERARCHY SYSTEM: three tiers (close/medium/far) that describe how
   FAR an element floats in front of the page background. Close elements
   belong to their container; medium elements sit lifted in front of the
   page; far elements claim the viewer's attention. Use --far at most once
   per view (hero or featured project) — overuse collapses the hierarchy.

   ---------------------------------------------------------------------------
   DECISION RECORD — why explicit markup, not a ::after pseudo-element
   ---------------------------------------------------------------------------
   v1 of this system used a single-class ::after-on-host approach
   (.wall-close/medium/far applied directly to the card). It failed for
   two reasons that became visible when Captain reviewed the styleguide
   against the /experiments lab:

     1. COMPOSITION CONFLICT with .surface. The .surface class composites
        its OWN material shadow (--shadow-soft: deep drop + contact + rim
        highlight) onto the card. Stacking that drop shadow UNDER a wall
        shadow produces a double-shadow mess — the two shadows fight and
        neither reads cleanly.

     2. PIXEL POSITIONING APPROXIMATION. The ::after math (percentage
        width/height + negative margins + translate) can reproduce the
        lab's (top, left, width, height) rectangle — but only when the
        card's own size matches the lab's 200x140 assumption AND the
        ancestor gives the halo enough breathing room. In the styleguide
        demo grid neither was true, so the halo clipped, feathered into
        the wrong places, and the "distance" perception died.

   The LAB (.exp-walldistance-*) solves both at once:
     - The card body (.exp-walldistance__object) has NO drop shadow. Just
       a subtle top-gradient + a 1px inset rim highlight. Clean material.
     - The wall shadow is a SEPARATE sibling div (.exp-walldistance__shadow)
       with explicit absolute (top, left, width, height) in pixels. The
       math is literal and exact — no percentage translation, no ancestor
       dependencies.
     - A stage wrapper (.exp-walldistance--close / --far) provides the
       canvas with enough padding for the blur halo to feather into clean
       page background without clipping.

   v2 (this block) promotes the lab's three-element structure verbatim:
     .wall-stage           outer canvas (position: relative, consumer sizes)
       .wall-shadow        separate sibling div, explicit px positioning
       .wall-object        the card body (may use .wall-card-body or not)

   The consumer positions shadow and object directly via inline style or a
   per-instance rule. That's more markup than a single utility class, but
   it's the only way the pixel-perfect lab effect composes. Captain's
   verdict: "trashy vs beautiful" comes down to this.

   ---------------------------------------------------------------------------
   EXTENSION PLAYBOOK — add a new tier (e.g. --veryfar)
   ---------------------------------------------------------------------------
     1. Add --wall-veryfar-offset / -size-delta / -blur / -alpha tokens in
        the :root chunk (scale up from --far: 48/96/48/0.35 is a good start).
     2. No new class rule needed here — consumers just use .wall-stage
        plus an inline-styled .wall-shadow with the new token values
        applied to its top/left/width/height/filter/background.
     3. If a tier is used often enough to warrant its own shortcut, add
        a .wall-stage--veryfar modifier that preset-sizes the stage AND
        a per-tier .wall-stage--veryfar .wall-shadow rule that reads
        straight from the new tokens (following the pattern below).
     4. Keep the down-right offset direction. The whole site shares one
        upper-left key light. Alpha should DECREASE with distance.

   ---------------------------------------------------------------------------
   CONTAINMENT — never clip an ancestor of .wall-stage
   ---------------------------------------------------------------------------
   The blur halo feathers past .wall-stage by roughly the blur radius.
   ANY ancestor with overflow:hidden kills the effect silently. The stage
   itself has overflow:visible by default (CSS default) and we rely on
   that. If a parent panel needs overflow:hidden for some other reason,
   you cannot use .wall-stage inside it — lift the stage out.

   ---------------------------------------------------------------------------
   WHY .wall-card-body EXISTS (and does NOT compose with .surface)
   ---------------------------------------------------------------------------
   .surface's ::before rim + --shadow-soft drop is the WRONG grammar for
   a wall-distance card. The lab cards have only an inner top-gradient
   and a single 1px inset rim — the body is a "plain clean panel" that
   lets ALL the drop shadow come from the wall system. .wall-card-body
   encodes exactly that recipe: surface color, subtle top-gradient, 1px
   inset top highlight, NO outer drop shadow, NO ::before. Use it inside
   .wall-object unless you deliberately want a different card body.
   ============================================================================ */

/* ---- Stage: the outer canvas --------------------------------------------
   Positions the shadow + object children absolutely. The consumer sets
   width/height (rule of thumb: object size + enough padding on the
   bottom-right for the tier's blur halo to feather into clean page).
   overflow:visible is the default but stated explicitly here because
   the entire effect depends on it — a refactor that ever flips it would
   silently kill the halo feathering. */
.wall-stage {
  position: relative;
  overflow: visible;
}

/* ---- Shadow: the wall projection ----------------------------------------
   Absolute-positioned sibling that sits BEHIND the object (z-index: 1
   vs object's 2). Consumer-positioned via inline style for tier-specific
   (top, left, width, height). Common properties across all tiers are
   factored out here; the tier modifier below adds background alpha and
   blur radius.

   border-radius: inherit would fail (no sensible parent to inherit from);
   defaults to --radius-lg which matches the lab's card corner. */
.wall-shadow {
  position: absolute;
  z-index: 1;
  border-radius: var(--radius-lg);
  pointer-events: none;
  /* PRIMARY SHADOW — crisp-shaped, dense, standard blur. Solid hsla() fill
     so the shadow keeps its rectangular silhouette and preserves the
     perceived depth of the object hovering over the wall. A radial gradient
     here (tried and reverted) collapsed the shape into a diffuse blob and
     lost the "object casts a shape" reading entirely.

     The ringy halo artifact that a blurred solid normally produces at its
     boundary is addressed by PAIRING this element with a sibling
     .wall-shadow-outer behind it (z-index 0, slightly larger, double the
     blur, half the alpha). The outer layer only shows WHERE this primary
     shadow is already fading — so its softer, larger feathering replaces
     the hard ring boundary with a natural falloff. The core stays crisp
     and deep; only the edges feather further. Neither layer alone
     produces the effect; together they do.

     Default alpha 0.5 matches the medium-tier baseline. Tier modifiers
     (.wall-stage--close|--medium|--far) set --_wall-alpha and --_wall-blur
     on the STAGE so that both this primary element AND the outer softener
     sibling read the same tuned values — the :root tier tokens propagate
     through the custom properties to both layers in lock-step. */
  /* THEMED (Batch 2): the shadow fill now reads --wall-shadow-color (an H,S,L
     channel triplet) composed with the tier's --_wall-alpha. Previously this
     hardcoded hsla(220,50%,1%,...) — a near-black blue that stayed dark even in
     light mode, leaving wall cards casting a wrong-colored shadow on the
     off-white page. Routing through the token means the close/medium/far cards
     cast a warm low-alpha contact in light and the near-black blue in dark,
     each from the same one-line definition. */
  background: hsla(var(--wall-shadow-color), var(--_wall-alpha, 0.5));
  filter: blur(var(--_wall-blur, 16px));
}

/* ---- Outer shadow softener: the second layer that kills the ring --------
   Sits BEHIND .wall-shadow (z-index 0 vs primary's 1). Positioned by the
   consumer 10px up-and-left of the primary and sized 20px larger on each
   axis (same center, wider extent). Carries HALF the primary alpha and
   DOUBLE the primary blur — a lower-density, more-feathered version of
   the same silhouette. Because it's larger and blurrier, its visible
   pixels are only at the outer edge where the primary shadow has already
   faded; inside the primary's dense core it's drowned out. The net
   perceptual effect is that the shadow's core keeps its depth and shape
   while the outer edge loses the hard ring boundary a blurred solid
   normally shows.

   Why NOT fold this into a single-element multi-pass effect (box-shadow
   stack, filter chain, ::before pseudo): the primary .wall-shadow is
   already an absolutely-positioned sibling with consumer-set (top, left,
   width, height); keeping the outer layer as a parallel sibling with its
   own per-instance geometry preserves the same pattern consumers already
   know. A ::before would couple it to the primary's box (inheriting its
   size/position), but this layer needs to be LARGER — an inset negative
   offset works but obscures the "it's a bigger, softer copy" intent.
   Box-shadow stacking with large spread doesn't compound filter:blur,
   so it can't produce the needed soft-feathered silhouette.

   Reads --_wall-alpha and --_wall-blur from the tier modifier on the
   stage (same custom properties the primary reads) and halves the alpha
   / doubles the blur via calc() — one place to tune the tier, two layers
   stay in sync. Defaults match the medium tier (0.5 alpha, 16px blur),
   so unscoped .wall-stage without a tier modifier still gets the
   softened outer edge. */
.wall-shadow-outer {
  position: absolute;
  z-index: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  /* THEMED (Batch 2): same --wall-shadow-color token as the primary, at half
     the tier alpha (the softer outer feather). Was hardcoded near-black blue. */
  background: hsla(var(--wall-shadow-color), calc(var(--_wall-alpha, 0.5) * 0.5));
  filter: blur(calc(var(--_wall-blur, 16px) * 2.5));
}

/* ---- Object: the card itself (IS the visible card body) -----------------
   v3 pivot: the object IS the card. Previously there was a separate
   .wall-card-body wrapper that held the visible-card material recipe
   (top-gradient + inset rim highlight), but the styleguide markup never
   actually applied the material to .wall-object — it sat empty and the
   card body class was only referenced on an inner div that had no size,
   so the scene rendered as shadow-only (just a blurred smudge, no card).
   The /experiments lab proves the correct model: a SINGLE element is
   both the positioned object AND the visible card material. There is
   no inner wrapper. Consumers who want custom content put it INSIDE
   the .wall-object directly.

   Styling merged here (from the retired .wall-card-body):
     - --radius-lg corner matching the lab's card.
     - Two-stop top-gradient over --bg-surface (subtle light catch,
       no bottom darkening — wall shadow does all the grounding).
     - ONE 1px inset rim highlight at the top edge (hsla white 0.1).
     - NO outer drop shadow. The wall shadow supplies ALL elevation.
     - NO ::before rim (that belongs to .surface's grammar, not here).

   Absolute-positioned in front of the shadow. z-index: 2 so it always
   renders OVER the shadow. Consumer sets (top, left, width, height)
   inline to place the card inside the stage. */
.wall-object {
  position: absolute;
  z-index: 2;
  border-radius: var(--radius-lg);
  /* THEMED (Batch 2): the card material now reads from tokens. Previously the
     top-gradient + inset rim were hardcoded with 220-hued white stops, so the
     wall card stayed dark-tinted in light mode. --wall-object-gradient supplies
     a bright white top light-catch over the off-white surface in light, the
     subtle dark-mode gradient over --bg-surface in dark; --wall-object-rim is a
     near-white lit lip in light, a faint white inset in dark. */
  background: var(--wall-object-gradient);
  box-shadow: var(--wall-object-rim);
}

/* ---- Tier modifiers: preset the shadow's distance properties -------------
   These rules target the .wall-shadow child so that adding the tier class
   to the STAGE switches the shadow's alpha + blur without the consumer
   having to repeat the tier tokens inline. Consumer still sets the
   shadow's (top, left, width, height) inline because those values depend
   on the object's position+size, not just the tier.

   Values read directly from the :root --wall-*-{alpha,blur} tokens so
   any global tuning of the wall-distance scale propagates here.        */
.wall-stage--close .wall-shadow {
  --_wall-alpha: var(--wall-close-alpha);
  --_wall-blur: var(--wall-close-blur);
}

.wall-stage--medium .wall-shadow {
  --_wall-alpha: var(--wall-medium-alpha);
  --_wall-blur: var(--wall-medium-blur);
}

.wall-stage--far .wall-shadow {
  --_wall-alpha: var(--wall-far-alpha);
  --_wall-blur: var(--wall-far-blur);
}

/* =============================================================================
   WALL DISTANCE — FLUID VARIANT (added 2026-08-16 for the Noxarc landing page)
   -----------------------------------------------------------------------------
   SAME PHYSICS, SAME TOKENS, SAME THREE TIERS. The only thing that differs from
   the v2 explicit-markup API above is HOW the shadow rectangle is addressed.

   WHY A SECOND ADDRESSING MODE EXISTS. v2 asks the consumer for four inline
   pixel values per instance (top / left / width / height on .wall-shadow, and
   again on .wall-object). That is exact and it is why v2 beat v1 — but it needs
   the object's size to be KNOWN AT AUTHORING TIME. It cannot express "a block
   as wide as the 900px column, as tall as whatever copy lands in it", which is
   every block on the landing page. The v1 answer to that was percentage math,
   and percentage math is precisely what failed Captain's quality bar.

   THE FLUID VARIANT KEEPS THE PIXEL-EXACT GEOMETRY and simply states it from
   the opposite side of the box. v2's formula is

       shadow_top    = object_top    + offset
       shadow_left   = object_left   + offset
       shadow_width  = object_width  + size_delta
       shadow_height = object_height + size_delta

   Expressed as insets against a stage whose in-flow object defines its size,
   that becomes exactly the same rectangle with no size term anywhere:

       top    :  offset
       left   :  offset
       right  :  reserve - offset - size_delta      (width  grows by size_delta)
       bottom : -(offset + size_delta)              (height grows by size_delta)

   Arithmetically identical, resolves at any fluid width, and there is not a
   single percentage in it.

   --wall-fluid-reserve IS THE ONE KNOB. The object is inset from the stage's
   right edge by this much (margin-right), which is what buys the solid part of
   the shadow somewhere to land INSIDE the stage instead of past the page
   gutter. Set it once on the page container so every block on the page shares
   one right edge; the 84px fallback here is the FAR tier's own offset +
   size-delta, i.e. the worst case, so an unset consumer is safe at any tier.

   THE OBJECT IS A CLEAN PANEL, NOT A .surface. Surface colour + top gradient +
   1px rim, and deliberately NO outer drop shadow and NO ::before — composing
   .surface here is the v1 double-shadow antipattern (knowledge 3fefb762).

   Key light is upper-left site-wide, so the offset direction stays down-right.
   Alpha DECREASES with distance: the penumbra widens, so per-pixel density
   drops. Physically correct, not a mistake.
   ============================================================================ */

/* Tier presets, declared on the STAGE (v2's presets are scoped to the .wall-
   shadow child instead, which is why these four names are distinct — the two
   addressing modes never read each other's custom properties and can sit on
   the same element without interfering).

   .wall-stage carries the MEDIUM values as its own defaults so an untiered
   fluid stage renders as the documented default tier rather than collapsing:
   an undefined custom property inside top/left/right/bottom makes those
   declarations invalid at computed-value time, and the shadow would silently
   fall back to `auto` on all four sides — a bug that looks like "the shadow
   just isn't there" with nothing in the CSS to point at. The three modifiers
   below carry equal specificity and sit later in the file, so they win. */
.wall-stage {
  --_wall-fluid-offset:     var(--wall-medium-offset);
  --_wall-fluid-size-delta: var(--wall-medium-size-delta);
  --_wall-fluid-blur:       var(--wall-medium-blur);
  --_wall-fluid-alpha:      var(--wall-medium-alpha);
}

.wall-stage--close {
  --_wall-fluid-offset:     var(--wall-close-offset);
  --_wall-fluid-size-delta: var(--wall-close-size-delta);
  --_wall-fluid-blur:       var(--wall-close-blur);
  --_wall-fluid-alpha:      var(--wall-close-alpha);
}

.wall-stage--medium {
  --_wall-fluid-offset:     var(--wall-medium-offset);
  --_wall-fluid-size-delta: var(--wall-medium-size-delta);
  --_wall-fluid-blur:       var(--wall-medium-blur);
  --_wall-fluid-alpha:      var(--wall-medium-alpha);
}

.wall-stage--far {
  --_wall-fluid-offset:     var(--wall-far-offset);
  --_wall-fluid-size-delta: var(--wall-far-size-delta);
  --_wall-fluid-blur:       var(--wall-far-blur);
  --_wall-fluid-alpha:      var(--wall-far-alpha);
}

/* The visible panel. IN FLOW (position: relative, not absolute) — that is the
   whole trick: the object's own content height becomes the stage's height, so
   the shadow's bottom inset has something real to be negative against. Going
   absolute here would collapse the stage to zero and take the shadow with it. */
.wall-stage__object {
  position: relative;
  z-index: 2;
  margin-right: var(--wall-fluid-reserve, 84px);
  border-radius: var(--radius-lg);
  background: var(--wall-object-gradient);
  box-shadow: var(--wall-object-rim);
}

/* PRIMARY SHADOW — crisp-shaped, dense, standard blur. A SOLID hsla() fill, so
   the shadow keeps a rectangular silhouette and the object reads as hovering
   over a wall. (A radial gradient was tried in v1 and reverted: it collapsed
   the shape into a diffuse blob and lost the depth entirely.) */
.wall-stage__shadow {
  position: absolute;
  z-index: 1;
  top: var(--_wall-fluid-offset);
  left: var(--_wall-fluid-offset);
  right: calc(
    var(--wall-fluid-reserve, 84px)
    - var(--_wall-fluid-offset)
    - var(--_wall-fluid-size-delta)
  );
  bottom: calc(-1 * (var(--_wall-fluid-offset) + var(--_wall-fluid-size-delta)));
  border-radius: var(--radius-lg);
  background: hsla(var(--wall-shadow-color), var(--_wall-fluid-alpha));
  filter: blur(var(--_wall-fluid-blur));
  pointer-events: none;
}

/* OUTER SOFTENER — the wide feather the primary cannot supply on its own.
   2.5x the blur at half the alpha, nudged 10px up-and-left and grown 10px on
   every side so its halo emerges from behind the primary rather than tracing
   its edge. Both layers read the SAME two tier properties, so retuning a tier
   moves them together and they cannot drift. */
.wall-stage__shadow--outer {
  z-index: 0;
  top: calc(var(--_wall-fluid-offset) - 10px);
  left: calc(var(--_wall-fluid-offset) - 10px);
  right: calc(
    var(--wall-fluid-reserve, 84px)
    - var(--_wall-fluid-offset)
    - var(--_wall-fluid-size-delta)
    - 10px
  );
  bottom: calc(
    -1 * (var(--_wall-fluid-offset) + var(--_wall-fluid-size-delta) + 10px)
  );
  background: hsla(var(--wall-shadow-color), calc(var(--_wall-fluid-alpha) * 0.5));
  filter: blur(calc(var(--_wall-fluid-blur) * 2.5));
}

/* -----------------------------------------------------------------------------
   OPEN PROPOSAL — THE FAR TIER GOES SLAB-LIKE ON WIDE BLOCKS. NOT SHIPPED.
   -----------------------------------------------------------------------------
   Observed while building the landing page and worth writing down before it is
   rediscovered: stretched across a ~820px full-width block, `--far` stops
   reading as "at hand's distance" and reads as a flat, square-edged slab. It is
   why MEDIUM was chosen for all five blocks on that page.

   DIAGNOSIS — it is the SIZE DELTA, not the blur. Every far value is an
   absolute pixel quantity tuned against the ~300px-wide canvas the styleguide
   demonstrates it on, and only one of them stops working when the object gets
   wide:

     offset 28px   still correct. Offset encodes the light's angle, which is
                   genuinely independent of object size. Leave it alone.
     blur   32px   still correct, for the same reason: penumbra width is a
                   property of the light source and the wall gap, not of the
                   object. Scaling blur with width is the intuitive move and it
                   is the WRONG one - it would make a wide block's shadow look
                   like a different, softer light.
     delta  +56px  THIS is the one that degenerates. On a 300 x 240 card, +56px
                   is +19% of width and +23% of height, so a generous margin of
                   shadow shows on every side and the whole thing reads as a
                   cushion. On an 820 x 320 block the SAME +56px is only +6.8%
                   of width — the shadow's long edges now sit almost flush with
                   the object's, the visible shadow degenerates into two thin
                   horizontal bands, and a 32px feather stretched along an 820px
                   straight edge reads as a gradient stripe rather than a
                   penumbra. Flat. Square. Exactly what was seen.

   PROPOSED FIX — make the size delta proportional ONLY where it degenerates,
   and only for the fluid variant, so no existing card moves by one pixel:

     .wall-stage { container-type: inline-size; }
     .wall-stage--far {
       --_wall-fluid-size-delta: max(var(--wall-far-size-delta), 7cqw);
     }

   max() means the card case is untouched (7cqw of 300px = 21px, so the 56px
   token still wins) while a wide block gets a delta that keeps the same ~19%
   protrusion the tier was designed around (7cqw of 820px = 57px... which is
   the point at which this needs a real render to tune, not arithmetic).

   WHY IT IS NOT SHIPPED. Two things need a human eye first. (1) The multiplier
   is a guess until someone looks at it; the honest number comes from a render,
   not from this comment. (2) `container-type: inline-size` applies
   `contain: layout style inline-size`, and containment creates a containing
   block for fixed-position descendants — the exact class of trap documented for
   .folio-nav in knowledge 1b128745. It is almost certainly harmless on
   .wall-stage (no fixed descendants today), but "almost certainly" is not the
   bar for a change to the primitive every elevated block on the site is built
   from. Ship it as its own reviewed change, with a render, or not at all. */

/* .wall-card-body has been retired in v3. The visible-card material
   recipe it encoded (top-gradient, inset rim highlight, no outer drop
   shadow) now lives on .wall-object itself — see the .wall-object rule
   above. Consumers who want content inside a wall card put the content
   as children of .wall-object directly (the object IS the card). This
   eliminates the empty-inner-div failure mode where the card material
   never got painted because the wrapper had no size. */
/* =============================================================================
   BUTTONS
   -----------------------------------------------------------------------------
   Three variants:
     .btn.btn--primary    accent gradient, the single strong CTA
     .btn.btn--secondary  bg-raised surface, soft 3D, quiet
     .btn.btn--ghost      transparent with accent border, minimal visual weight

   All three share the .btn base and use the same interactive motion:
   lift -3px on hover, settle on press. The --shadow-* tokens already include
   a top rim highlight in their inset layer, so button class rules don't need
   to stack a separate inset-highlight anymore.
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-normal);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Primary: accent gradient, lit top edge, strong shadow ----
   Uses a dedicated inset highlight (white 0.2) instead of --shadow-*'s
   220-hued rim because the gradient background is bright; a cool rim
   would read as dirty. */
.btn--primary {
  color: var(--bg-deep);
  background-image: var(--accent-gradient);
  box-shadow:
    inset 0 1px 0 0 var(--btn-primary-rim),
    var(--shadow-float);
}

/* `color` is restated on every interactive state, and that is not redundant.
   The global `a:hover { color: var(--accent) }` has specificity (0,1,1), which
   BEATS `.btn--primary` at (0,1,0). Any `<a class="btn btn--primary">` therefore
   had its label repainted accent-teal on hover — on top of an accent-teal
   gradient, i.e. invisible. Restating it here at (0,2,0) wins.
   This never showed up in /styleguide because the styleguide demos buttons as
   `<button>`, where `a:hover` cannot apply. Only real anchor CTAs hit it. */
.btn--primary:hover {
  color: var(--bg-deep);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 0 var(--btn-primary-rim),
    var(--shadow-hover),
    var(--shadow-accent-glow);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 0 var(--btn-primary-rim),
    var(--shadow-press);
}

/* Demonstration helper — shows hover state statically */
.btn--primary.is-hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 0 var(--btn-primary-rim),
    var(--shadow-hover),
    var(--shadow-accent-glow);
}

/* ---- Secondary: soft 3D surface, quiet ---- */
.btn--secondary {
  color: var(--text-primary);
  background-color: var(--bg-raised);
  background-image: var(--surface-top-gradient);
  box-shadow: var(--shadow-soft);
}

.btn--secondary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn--secondary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-press);
}

/* ---- Ghost: transparent with accent border ---- */
.btn--ghost {
  color: var(--accent-glow);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.btn--ghost:hover {
  color: var(--accent);
  background-color: hsla(168, 45%, 50%, 0.08);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.btn--ghost:active {
  background-color: hsla(168, 45%, 50%, 0.12);
}

/* ---- Disabled: identity STRIPPED, not merely dimmed ----
   Added 2026-08-17 with the contact form's suppression (knowledge 37d649e4).
   One rule covers all three variants, and IT MUST STAY BELOW THEM.

   SPECIFICITY, stated because it is the whole reason this block works.
   .btn:disabled is (0,2,0) and beats .btn--primary (0,1,0) outright. But
   .btn--primary:hover is ALSO (0,2,0), so hover and active are listed
   explicitly at (0,3,0) rather than relying on source order alone. Move this
   block above the variants and the accent gradient wins back on hover.

   WHY STRIP RATHER THAN FADE. A disabled button still wearing the accent
   gradient reads as "I pressed it and nothing happened", which is worse than
   reading as inactive: the visitor blames the site rather than understanding
   the state. So the gradient goes, the -3px lift goes, the float shadow goes,
   and what remains is a flat recessed plate. --bg-deep sits BELOW the
   --bg-surface panel in both palettes (dark 10% vs 14%, light 95% vs 97%), so
   the recessed reading survives the theme switch with no second rule.

   --text-muted ON --bg-deep IS ~2.7:1 AND THAT IS DELIBERATE. WCAG 1.4.3
   exempts inactive user-interface components from the contrast requirement, and
   this is the one place on the site where reading QUIETER THAN BODY TEXT is the
   entire message. Do NOT "fix" it to --text-secondary: the dead Send button
   would then compete with the live email address directly beneath it, which is
   the only working route to a conversation while the form is off.
   -webkit-text-fill-color is restated for the same iOS Safari reason as the
   fields below. */
.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active {
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  background-color: var(--bg-deep);
  background-image: none;
  box-shadow: inset 0 0 0 1px var(--surface-inner-edge);
  transform: none;
  opacity: 1;
  cursor: not-allowed;
}

/* =============================================================================
   FORM ELEMENTS — inputs and textareas feel CARVED INTO the page.
   -----------------------------------------------------------------------------
   The aesthetic rule: anything that receives input (inputs, textareas, search,
   tags) is inset. Anything that dispatches action (buttons, interactive cards)
   is lifted. Inputs use --shadow-inset-deep because they're the strongest
   carved-in element in the form grammar — enough depth to read as "well" at
   a glance. Background darker than the surrounding card (--bg-deep) reinforces
   the illusion.
   ============================================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* LABELS ARE PROMPTS, NOT CAPTIONS — raised from medium/--text-secondary to
   semibold/--text-primary on 2026-08-16 with the contact form.

   Persistent visible labels are non-negotiable here: placeholder-as-label is a
   documented usability trap, because the prompt disappears the moment typing
   starts, which is precisely when the visitor is mid-thought. That decision
   only pays off if the label is actually the thing the eye lands on.

   Two of the three fields on the contact form carry NO placeholder at all —
   an invented example name told the visitor nothing they did not already know,
   so it was removed — which leaves the label as the ONLY prompt on those
   fields. A quiet secondary-coloured label cannot carry that alone. The third
   field's placeholder is a full example answer, and the label above it has to
   stay clearly more prominent than the hint below it or the pair inverts.

   Contrast is comfortable in both themes against the --bg-surface panel the
   form sits on, and --text-primary keeps a wide separation from the
   placeholder's --text-secondary, so label / hint / entered-value read as
   three distinct tiers rather than two similar greys. */
.field__label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.input,
.textarea {
  width: 100%;
  padding: var(--space-4) var(--space-4);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow:
    var(--shadow-inset-deep),
    inset 0 0 0 1px hsla(220, 20%, 100%, 0.02);
  font-family: inherit;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  transition:
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

/* PLACEHOLDER CONTRAST — raised from --text-muted to --text-secondary on
   2026-08-16, and this is an accessibility FIX, not a taste change.

   MEASURED, both themes, placeholder colour against the field's own
   --bg-deep fill (WCAG 2.x relative-luminance ratio):

     --text-muted     light  hsl(220,10%,55%) on hsl(40,30%,95%)   3.21 : 1  FAIL
     --text-muted     dark   hsl(220,10%,38%) on hsl(220,15%,10%)  2.71 : 1  FAIL
     --text-secondary light  hsl(220,12%,38%) on hsl(40,30%,95%)   6.00 : 1  pass
     --text-secondary dark   hsl(220,10%,58%) on hsl(220,15%,10%)  5.55 : 1  pass

   BOTH themes failed the 4.5:1 body-text bar, dark worse than light — the
   original report only caught the light-mode 3.2:1. Placeholders are usually
   allowed to be quiet because they only ever restate a label, but the contact
   form breaks that assumption on purpose: its message placeholder carries an
   EXAMPLE ANSWER ("e.g. assigning 400 people to workshops takes us three days,
   every year.") whose job is to demonstrate the level of detail wanted. That is
   the single hardest-working string on the conversion surface and it has to be
   comfortably readable, not merely present.

   WHY THIS RULE AND NOT THE TOKEN. --text-muted is untouched and stays exactly
   what it is; it is still correct for footer links, the stack footnote, the
   scroll hairline and the caption role, none of which are input affordances.
   The change is scoped to the two selectors that paint placeholder text, so its
   entire blast radius is the contact form plus the /styleguide form demo — and
   the styleguide SHOULD show the accessible value, because it is the reference
   every future form is copied from. A form-scoped override would have left the
   styleguide demonstrating the failing colour and created two placeholder
   treatments to keep in sync.

   The pair stays visually distinct from real input, which is the other thing a
   placeholder must do: entered text is --text-primary, which is 16% lightness
   in light mode against this 38%, and 88% in dark against this 58%. Wide margin
   in both directions — nobody will mistake the hint for a filled field. */
.input::placeholder,
.textarea::placeholder {
  color: var(--text-secondary);
}

.input:focus,
.textarea:focus {
  outline: none;
  box-shadow:
    var(--shadow-inset-deep),
    inset 0 0 0 1px var(--accent),
    0 0 0 4px hsla(168, 45%, 50%, 0.15);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

/* DISABLED FIELDS — THE WELL IS SEALED, NOT BROKEN.
   -----------------------------------------------------------------------------
   Added 2026-08-17 with the contact form's suppression (knowledge 37d649e4), and
   deliberately written as a DESIGN-SYSTEM rule rather than a contact-form one:
   every future disabled control on this site inherits it, /styleguide's form
   demo included, so there is only ever one disabled treatment to keep in sync.

   THE LOOK IS DERIVED FROM THIS FILE'S OWN GRAMMAR, not invented. The rule at
   the top of this section says anything that RECEIVES input is inset and
   anything that DISPATCHES action is lifted. A control that receives NOTHING
   should therefore be neither, so the disabled state FLATTENS the well: the
   --shadow-inset-deep depth goes, a single hairline ring stays, and the
   --bg-deep fill stays so the field still reads as a FIELD. Flat + filled +
   outlined reads as "sealed"; a bare or collapsed box would read as a rendering
   fault, which on a page this carefully designed is the failure to avoid.

   THE TEXT AND THE PLACEHOLDER DO NOT DIM, AND THAT IS THE CONSIDERED CALL.
   WCAG 1.4.3 exempts inactive user-interface components from the 4.5:1 bar, so
   burying them at --text-muted would be permitted — and it would be wrong here.
   The contact form's message placeholder carries a full EXAMPLE ANSWER whose job
   is to demonstrate the level of detail wanted, and while the form is inactive
   that string is what tells the visitor what to put in the EMAIL they are about
   to send instead. It stays on the measured-accessible --text-secondary (6.00:1
   light, 5.55:1 dark, see the placeholder block above). The "you cannot type
   here" signal comes from the flattened well and the cursor, never from
   destroying content.

   THREE BROWSER DEFAULTS ARE CLOSED HERE ON PURPOSE. Remove any one of them and
   the carefully-themed field falls through to a grey the palette never chose.
     1. opacity: 1 — iOS Safari applies its own opacity to disabled inputs.
     2. -webkit-text-fill-color — iOS Safari IGNORES `color` on a disabled input
        and honours only this. The two are set to the SAME token; change one and
        you must change the other or the themes diverge on iOS alone.
     3. opacity: 1 on ::placeholder — Firefox lowers placeholder opacity by
        default, which would undo the contrast fix above.

   No :focus counterpart is needed: a disabled control cannot receive focus, so
   .input:focus can never apply here. */
.input:disabled,
.textarea:disabled {
  background-color: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--surface-inner-edge);
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  opacity: 1;
  cursor: not-allowed;
}

.input:disabled::placeholder,
.textarea:disabled::placeholder {
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  opacity: 1;
}

/* A drag handle on a textarea nobody can type into is a LIVE affordance bolted
   to a dead control — precisely the "looks broken" reading the flattened well
   exists to prevent. */
.textarea:disabled {
  resize: none;
}

/* =============================================================================
   BADGES / TAGS — pill-shaped, CARVED INTO the card surface.
   -----------------------------------------------------------------------------
   Captain's v2 verdict: "I don't think we can do tags with colors. Because
   that destroys the illusion and looks weird." — absolutely right. Mint-colored
   text on a sunken well sent contradictory signals: color said "I am interactive,
   look at me", while the inset shadow said "I am carved into the surface".
   Two fights two, and the illusion loses.

   v3 rule: tags are SILENT ENGRAVED LABELS. Neutral gray text on a sunken
   pill well. Pure inset, pure texture, zero color emphasis. The reader
   registers "this object categorizes the card" without the tag ever stealing
   a glance from the title.

   Recipe:
     1. background darker than surface (--bg-deep + 0-to-25% dark gradient)
     2. --shadow-inset for the carved-in illusion
     3. --radius-pill for the fully-round, touchable feel
     4. text-secondary color for the label — quietly readable, stays as
        surface texture, never competes with the card's actual content
     5. generous horizontal padding (14px) so pills never feel cramped
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-deep);
  background-image: linear-gradient(
    180deg,
    hsla(220, 40%, 0%, 0.25) 0%,
    hsla(220, 40%, 0%, 0.1) 100%
  );
  color: var(--text-secondary);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-inset);
  border: 0;
}

/* Emphasised variant — slightly deeper well + slightly brighter neutral text.
   Use for "Featured", "Live", "2025" — still zero mint color. The emphasis is
   purely tonal: the eye reads this as "a touch more engraved, a touch more
   legible" without any hue shift that would break the carved-in illusion. */
.badge--accent {
  color: var(--text-primary);
  background-image: linear-gradient(
    180deg,
    hsla(220, 40%, 0%, 0.35) 0%,
    hsla(220, 40%, 0%, 0.18) 100%
  );
  box-shadow:
    var(--shadow-inset-deep);
}
/* =============================================================================
   STYLEGUIDE PAGE LAYOUT
   -----------------------------------------------------------------------------
   These styles support the /styleguide route specifically. Page-level
   composition (the outer wrapper, section rhythm, demo grids). Components
   above are reusable across the entire site; these are specific to the
   showcase page.
   ============================================================================ */

.sg-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-24);
}

/* ---- Hero of the styleguide itself ---- */
.sg-hero {
  padding: var(--space-16) var(--space-8);
  margin-bottom: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sg-hero__eyebrow {
  color: var(--accent-glow);
}

.sg-hero__title {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.sg-hero__subtitle {
  font-size: var(--font-size-lead);
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0;
}

/* ---- Section rhythm ---- */
.sg-section {
  margin-bottom: var(--space-24);
}

.sg-section__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--surface-inner-edge);
}

.sg-section__eyebrow {
  color: var(--text-muted);
}

.sg-section__title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--line-height-tight);
  margin: 0;
}

.sg-section__description {
  color: var(--text-secondary);
  max-width: 65ch;
  margin: 0;
  margin-top: var(--space-2);
}

/* ---- Generic grid for demos ---- */
.sg-grid {
  display: grid;
  gap: var(--space-4);
}

.sg-grid--2 { grid-template-columns: repeat(2, 1fr); }
.sg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sg-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 760px) {
  .sg-grid--2,
  .sg-grid--3 {
    grid-template-columns: 1fr;
  }
  /* --4 collapses to 2-col on tablet/mobile, not 1-col.
     Reason: the elevation section uses .sg-grid--4 with square aspect-ratio
     shadow cards. Collapsing to 1-col would render four full-width squares
     with big dead space between their labels — the exact "flat even color"
     sin Captain called out. 2-col keeps the shadow cards compact and
     visually busy on small screens. */
  .sg-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  /* Very narrow phones: even --4 gives up to 1-col; the shadow cards
     switch to auto-height (see .sg-shadow-card rule below) so they stay
     reasonable heights instead of huge squares. */
  .sg-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ---- Color swatches ---- */
.sg-swatch {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 140px;
}

.sg-swatch__chip {
  height: 72px;
  border-radius: var(--radius-sm);
  /* --shadow-soft already includes the inset rim highlight, no need to stack. */
  box-shadow: var(--shadow-soft);
}

.sg-swatch__label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.sg-swatch__value {
  font-size: var(--font-size-caption);
  color: var(--text-muted);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: none;
}

.sg-gradient-bar {
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  box-shadow:
    inset 0 1px 0 0 hsla(0, 0%, 100%, 0.15),
    var(--shadow-float);
}

/* ---- Text sample on a surface (for text color swatches) ---- */
.sg-text-sample {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sg-text-sample__text {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
}

.sg-text-sample--primary   .sg-text-sample__text { color: var(--text-primary); }
.sg-text-sample--secondary .sg-text-sample__text { color: var(--text-secondary); }
.sg-text-sample--muted     .sg-text-sample__text { color: var(--text-muted); }

/* ---- Typography specimen ---- */
.sg-type-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--surface-inner-edge);
}

.sg-type-row:last-child { border-bottom: 0; }

.sg-type-row__label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
}

.sg-weight-row {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding-top: var(--space-6);
}

.sg-weight-row__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sg-weight-row__sample {
  font-size: var(--font-size-h4);
}

/* ---- Spacing visualizer ---- */
.sg-spacing {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  padding: var(--space-8);
  overflow-x: auto;
}

.sg-spacing__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  min-width: 60px;
}

.sg-spacing__bar {
  width: 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-shadow:
    inset 0 1px 0 0 hsla(0, 0%, 100%, 0.15),
    var(--shadow-soft);
}

.sg-spacing__label {
  font-size: var(--font-size-caption);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}

.sg-spacing__value {
  font-size: var(--font-size-caption);
  color: var(--text-secondary);
}

/* ---- Radius visualizer ---- */
.sg-radius-box {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.sg-radius-box__label {
  font-size: var(--font-size-caption);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Shadow demo card ----
   Square aspect at desktop/tablet so all four elevations visually compare
   as equivalent objects. On narrow phones the aspect drops (see the
   480px breakpoint below in responsive adjustments) so a single-column
   stack doesn't produce four huge squares. */
.sg-shadow-card {
  aspect-ratio: 1;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 180px;
}

/* ---- Wall-distance demo showcase ----
   Grid of .wall-stage rigs — each a full scene (stage + shadow + object)
   reproducing the /experiments wall-distance lab verbatim.

   v3 recipe (Captain's design invariant: same-height objects, only
   shadows differ) — dimensions locked to the geometry in the template:
     - Each stage is a 400×340 canvas. Same canvas for ALL tiers. 400×340
       is sized to hold the far tier's shadow (bottom-right corner at
       334×264) plus ~48px breathing room for its 32px blur halo to
       feather cleanly into clean page background.
     - Object inside is 200×140 at a FIXED (top: 40, left: 50) across
       all three tiers. Only the .wall-shadow geometry differs per
       tier. The eye reads "same card, different distance" because
       the only thing changing IS the shadow.
     - grid-template-columns uses auto-fit + minmax(400px, 1fr): each
       cell is AT LEAST 400px wide so the stage never has to squeeze,
       and the column count adapts to available width — 3-up when the
       viewport is wide enough, 2-up or 1-up on narrower pages. This
       guarantees halos never spill into a neighbor cell regardless
       of viewport size, which was the non-negotiable quality bar.
     - Grid gap is space-16 (64px) — enough horizontal clearance for
       the 32px blur halo on the right side of one stage to feather
       to zero before the next stage's shadow region begins.
     - Vertical padding keeps the halo feathering cleanly into
       background above and below without touching the section border
       or the next section's content.

   v2 predecessor used repeat(3, 1fr) with 300×240 stages and three
   different object top positions (50 / 42 / 30) — the objects rose
   to different heights per tier, which defeated the purpose: distance
   was being cued by object position AND by shadow. v3 fixes by making
   object position constant AND widens stages to the proper lab-faithful
   proportions.

   overflow:visible on every ancestor (the grid + the page main wrapper)
   is load-bearing — any clip kills the halo feathering silently.     */
.sg-wall-showcase {
  display: grid;
  /* auto-fit + minmax(400px, 1fr):
       - 400px minimum guarantees every cell is wide enough for the
         400px stage. No squeezing.
       - 1fr maximum lets extra space distribute evenly.
       - auto-fit collapses the track count to whatever fits, so we
         get 3-up on wide pages, 2-up on medium, 1-up on narrow —
         without needing a media query for each breakpoint. */
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-16);
  /* Top+bottom padding so the far-tier halo (32px blur + 28px offset,
     total ~60px reach from the shadow rectangle) always feathers into
     clean page background, never into the section border or the
     following section's content. */
  padding: var(--space-8) 0 var(--space-16);
  overflow: visible;
}

/* On narrow viewports collapse to a single column and BUMP the vertical
   gap — with three stacked scenes the halos would otherwise feather
   into the neighbor below. space-24 = 96px safely clears the 60px reach
   of the far tier's halo. */
@media (max-width: 760px) {
  .sg-wall-showcase {
    grid-template-columns: 1fr;
    gap: var(--space-24);
  }
}

/* ---- Wall-distance item wrapper ----
   Stacks a stage above its caption. The stage itself carries the
   wall-distance mechanics; this wrapper just vertically arranges and
   centers the caption. gap space-8 matches the lab's label distance
   from the scene — enough breathing room so the halo doesn't visually
   merge into the text below. */
.sg-wall-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

/* ---- Wall-distance caption block ----
   Stacked tier name + use-case hint below the scene. Caption typography
   (small+mono for the tier, caption muted for the use text) matches the
   other styleguide section captions so the whole page reads cohesively.
   max-width 24ch wraps the hint to a readable 2-3 line block. */
.sg-wall-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.sg-wall-caption__tier {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: none;
}

.sg-wall-caption__use {
  font-size: var(--font-size-caption);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  max-width: 24ch;
  line-height: var(--line-height-snug);
}

.sg-shadow-card__label {
  font-size: var(--font-size-caption);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--accent-glow);
  text-transform: none;
  letter-spacing: 0;
}

.sg-shadow-card__usage {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
}

/* ---- Group of demos ---- */
.sg-demo-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.sg-demo-note {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  font-style: italic;
  margin-left: var(--space-2);
}

/* ---- Project card mock ---- */
.sg-project-card {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
}

.sg-project-card__tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sg-project-card__title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

.sg-project-card__desc {
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.sg-project-card__footer {
  margin-top: var(--space-4);
}

/* ---- Mini composition (final "does it all fit together" test) ---- */
.sg-composition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 760px) {
  .sg-composition {
    grid-template-columns: 1fr;
  }
}

.sg-bio-card {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* v4 avatar: a single-layer circle. The previous version nested an accent
   disc inside a .surface--circle wrapper so the wrapper could supply the
   soft 3D recipe (rim + layered shadow). Visual failure mode: the wrapper
   was larger than the inner disc, so its dark ambient drop shadow + inset
   dark border rim peeked around the bright mint disc as a dark halo that
   read as an artifact — exactly the sort of dirty edge the accent color
   should never have.

   Fix: collapse to one circle. The accent gradient IS the surface, and
   the soft 3D is hand-authored here (not inherited from .surface) so the
   top light-catch can be mint-tinted rather than neutral white — warmer,
   consistent with the disc color, zero dark ring because there is no
   outer element to cast it. One circle, not two. */
.sg-bio-card__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  /* THEMED (Batch 2): the disc material + its hand-authored soft 3D now come
     from --avatar-gradient / --avatar-shadow. Previously the gradient and the
     four-layer shadow were hardcoded (near-black 220 drops, fixed mint→blue
     accent), so the "Together" Melwin bio card's avatar stayed a dark-shadowed
     disc in light mode. The tokens carry the dark recipe verbatim in dark, and
     in light give a warm low-alpha contact + slightly darker accents that hold
     against the off-white. The mint top light-catch still reads through
     --avatar-light-catch-strong/-fade, which the gradient token references. */
  background: var(--avatar-gradient);
  box-shadow: var(--avatar-shadow);
}

/* ---- Shape system demo grid ----
   Dedicated grid: four cells, each a stacked (shape + label + hint) column.
   The shapes themselves are sized 128px so the light catch and hairline
   rim are readable at a glance. On narrow screens collapses to 2-col,
   keeping the shapes visible side-by-side rather than stacking four
   isolated shapes vertically. */
.sg-shape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 760px) {
  .sg-shape-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sg-shape-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-2);
}

.sg-shape {
  /* Every demo shape is 128px by default — the circle and squircle need
     equal width and height. The oval and rect subclasses override width
     to show the stretched variants. */
  width: 128px;
  height: 128px;
}

.sg-shape--circle,
.sg-shape--squircle {
  /* Sizes match the default; listed for clarity in case tokens change. */
  width: 128px;
  height: 128px;
}

.sg-shape--oval {
  /* Elongated pill — uses radius-pill on a non-square element to produce
     a stadium/oval shape, not a circle. Same soft 3D recipe. */
  width: 200px;
  height: 96px;
  border-radius: var(--radius-pill);
}

.sg-shape--rect {
  /* Rounded rect comparison baseline — this is what the whole design
     system has been made of until the shape system arrived. */
  width: 128px;
  height: 128px;
  border-radius: var(--radius-md);
}

.sg-shape__label {
  font-size: var(--font-size-caption);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  text-align: center;
}

.sg-shape__hint {
  font-size: var(--font-size-caption);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  text-align: center;
}

/* ---- Inset socket demo (in elevation section) ----
   Shows .surface--inset-circle at a demo size inside the same aspect-ratio
   shadow-card grid cell. The socket itself is 96px; the surrounding cell
   centers it and shows the label below. */
.sg-shadow-card--inset-socket {
  /* Same --shadow-card dimensions so it aligns with inset/inset-deep cells. */
  align-items: center;
  text-align: center;
}

.sg-socket {
  width: 96px;
  height: 96px;
  margin-top: var(--space-2);
}

/* ---- Project card header (composition section) ----
   Row holding the squircle project icon next to the tag row. */
.sg-project-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.sg-project-card__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Squircle icon gets a gentle accent halo so it reads as the card's
     primary visual object — just enough presence, never enough to
     compete with the card title. */
  box-shadow:
    var(--shadow-soft),
    var(--icon-accent-halo);
}

.sg-project-card__icon-glyph {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-size: var(--font-size-body);
  letter-spacing: -0.02em;
}

/* =============================================================================
   DUAL-THEME COMPARE LAB (Batch 2) — the heart of the design lab
   -----------------------------------------------------------------------------
   Two scoped panels side by side: a [data-theme="dark"] panel next to a
   [data-theme="light"] panel, each rendering the SAME set of representative
   surfaces. This is where light depth gets tuned against dark in real time —
   adjust a soft-3D token in tokens.css, regenerate, and both panels update so
   the light/dark relationship is visible in one glance instead of toggling the
   whole page back and forth.

   HOW IT WORKS (depends on the Batch-2 scopable-theming refactor):
   the [data-theme="light"] and [data-theme="dark"] token blocks dropped their
   :root prefix, so setting the attribute on a .sg-compare__panel div cascades
   the full palette + soft-3D values into that panel's subtree. Each panel paints
   its OWN page background (--bg-deep) and text color (--text-primary) so it reads
   as a self-contained mini-page in its theme, not a floating card group.

   The panels themselves are NOT .surface — they are the "wall" each demo surface
   sits on, so the wall-distance + drop shadows have correct ground to cast onto.
   ============================================================================ */

/* Two equal columns on desktop; stacks to one column under 760px (see the
   media query below). gap is generous so neither panel's shadows feather into
   the other. */
.sg-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  /* The grid sits in clean page background; align stretch so both panels are
     equal height regardless of content rounding. */
  align-items: stretch;
}

/* Each panel is a self-contained mini-page in its own theme. It paints the
   theme's page background + a generous inner padding, rounds its corners, and
   carries a hairline border so the panel edge reads even when its background is
   close to the surrounding page (the light panel on the dark styleguide page,
   or vice-versa once the toggle flips). overflow:visible so wall-distance halos
   inside can feather (they stay within the panel's padding by design). */
.sg-compare__panel {
  background: var(--bg-deep);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  box-shadow: inset 0 0 0 1px var(--surface-inner-edge);
  transition: background-color var(--duration-fast) var(--ease-out);
}

/* Panel label — a mono caption pinned at the top of each panel naming its
   theme, so the side-by-side stays legible when both backgrounds drift toward
   the same off-white/charcoal midpoint during tuning. */
.sg-compare__label {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* A labelled group of demo surfaces inside a panel — a small caption above a
   surface so the reader knows which soft-3D primitive they're comparing. */
.sg-compare__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sg-compare__group-label {
  font-size: var(--font-size-caption);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* The wall-distance scene inside a compare panel is smaller than the canonical
   Section-05 rig (the panel is narrower than a full grid cell). 280x180 holds a
   160x110 object at (24,28) plus room for the medium-tier halo to feather. */
.sg-compare__wall-stage {
  width: 280px;
  max-width: 100%;
  height: 180px;
}

/* Row of buttons / badges inside a panel — wraps so it never overflows the
   narrower panel width. */
.sg-compare__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

@media (max-width: 760px) {
  /* Stack the two panels vertically on narrow screens. Each still renders its
     own theme — the comparison becomes top/bottom instead of left/right. */
  .sg-compare {
    grid-template-columns: 1fr;
  }
}

/* ---- Responsive page adjustments ---- */
@media (max-width: 640px) {
  .sg-page {
    padding: var(--space-8) var(--space-4) var(--space-16);
  }

  .sg-hero {
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-16);
  }

  .sg-hero__title {
    font-size: var(--font-size-h1);
  }

  .sg-section {
    margin-bottom: var(--space-16);
  }

  .sg-type-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

@media (max-width: 480px) {
  /* Drop the 1:1 aspect on the shadow cards once they stack single-column.
     A 375px-wide square is 375px tall with 180px of content in the middle —
     reads as dead space (exactly the Captain feedback). Let the card flow
     to its natural content height instead. */
  .sg-shadow-card {
    aspect-ratio: auto;
    min-height: 140px;
  }

  .sg-radius-box {
    aspect-ratio: auto;
    min-height: 120px;
  }
}
/* =============================================================================
   PORTFOLIO PAGE LAYOUT (.folio-*)
   -----------------------------------------------------------------------------
   Page-specific layout scaffolding for the main portfolio at /. Follows the
   same namespace convention as .sg-* for /styleguide. Handles:
     - Fixed nav header with frosted-glass effect
     - Hero section (full-viewport, centered, wall-far title)
     - Section rhythm with generous breathing room
     - Project card grid (holds 1 now, scales to 2-3 later)
     - Contact section with icon links
     - Footer with separator
     - Impressum page layout
     - Responsive collapse to single column on mobile
     - Smooth scroll via html scroll-behavior

   All visual tokens (colors, shadows, radii, spacing) come from chunks 0-3.
   This chunk adds ONLY layout composition — positioning, sizing, grid, flex.
   ============================================================================ */

html {
  scroll-behavior: smooth;
}

/* ---- Fixed navigation bar ------------------------------------------------
   Frosted-glass header pinned to top. z-index 100 clears all wall-distance
   stages (z-index 0-2). THAT NUMBER IS UNCHANGED AND MUST STAY UNCHANGED.
   The mobile drawer and its scrim are layered INSIDE this element's stacking
   context — scrim 0, drawer 1, this bar's own surface 2, the bar's controls 3
   — so the entire nav still occupies exactly ONE global layer at 100 and none
   of the new layers competes with the page's 0-2 wall-distance scheme.
   The bg-deep at 85% alpha gives enough contrast for text readability while
   letting the dark page show through. The bottom border is the same subtle
   surface-inner-edge used in styleguide section separators.

   THE SURFACE IS NOT DECLARED HERE ANY MORE — it lives on ::before below, for
   two independent reasons written out on that rule. This element is now purely
   the bar's LAYOUT BOX plus the local layering root. Do not put background,
   backdrop-filter or a visible border back on it. */
.folio-nav {
  /* One source for the kebab's WCAG 2.5.5 touch target. Read twice: by the
     button's own box further down, and by --_nav-bar-h in the mobile block,
     which needs the height of the tallest thing in this bar so the drawer can
     inset its first row clear of the bar that passes over it. */
  --_nav-btn-size: 44px;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  /* RESERVES THE HAIRLINE'S 1px AND PAINTS NOTHING. The visible border moved
     to ::before (which paints ABOVE the drawer); this transparent one exists
     purely so the bar's BORDER BOX keeps the exact height it had when the
     border was painted here. Delete it as "dead" and every rect in the bar
     rises 1px and nav.js's cached brandThreshold silently shifts with it.
     Same trap, and the same defusal, as when the border used to be added on
     scroll rather than merely recoloured. */
  border-bottom: 1px solid transparent;
}

/* THE BAR'S SURFACE, AS ITS OWN PAINTED LAYER. This was a plain background on
   .folio-nav until the drawer arrived. It has to be a separate layer now, and
   there are TWO independent reasons, either of which alone would force it.

   (1) PAINT ORDER — this is what lets the drawer pass BEHIND the bar at all.
       .folio-nav is position:fixed with z-index:100, so it forms a stacking
       context, and a stacking context's own background is painted FIRST,
       beneath every descendant, with no z-index on any descendant able to
       change that (not even a negative one). The drawer IS a descendant and
       has to be: the same <ul> is an inline flex item of this bar above 760px,
       so moving it out of the nav would destroy both the desktop layout and
       the kebab -> Noxarc -> About -> Projects -> Contact -> switch tab order.
       While the surface lived on .folio-nav, an opaque drawer would therefore
       always cover it, and the bar would read as truncated at the drawer's
       right edge. Lifting the surface onto ::before makes it an ordinary
       positioned descendant that can be ordered ABOVE the drawer.

   (2) THE CONTAINING-BLOCK TRAP, which is invisible until it bites.
       backdrop-filter creates a containing block for FIXED-position
       descendants (Filter Effects 2, same clause as `filter`). While the blur
       was on .folio-nav, `position: fixed` on the drawer would have resolved
       against the ~61px BAR instead of the viewport — and only in the states
       where the blur is switched on, so the drawer would have worked at
       scrollY 0 and collapsed into a 61px band the instant the visitor
       scrolled. With the blur here instead, .folio-nav carries no filter, no
       transform and no other containing-block trigger in ANY state, so fixed
       descendants always resolve against the viewport. Do not reintroduce
       backdrop-filter, filter, transform, perspective, will-change or contain
       on .folio-nav.

   GEOMETRY IS EXACT, NOT APPROXIMATE. inset is 0 on three sides and -1px at
   the bottom, so this box covers the bar's padding box PLUS the 1px
   .folio-nav reserves with its transparent border. box-sizing is border-box
   globally (the reset includes *::before), so this element's own border-bottom
   lands precisely in that 1px — pixel-identical to the border .folio-nav used
   to paint, with zero change to any measured rect in any state.

   position:absolute is load-bearing for a second reason too: a ::before on a
   flex container becomes an anonymous FLEX ITEM unless it is out of flow.
   Remove the absolute and this pseudo-element joins the bar's flex row and
   shoves the wordmark sideways.

   NOT pointer-events:none, deliberately. A click on empty bar chrome should
   hit the bar exactly as it did before this change, not fall through to the
   scrim underneath and dismiss the drawer from somewhere the visitor reads as
   "the bar" rather than as "outside it". */
.folio-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -1px 0;
  z-index: 2;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-inner-edge);
}

.folio-nav__brand {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}

.folio-nav__brand:hover {
  color: var(--text-primary);
}

/* margin-left:auto is load-bearing. The bar has THREE flex children now
   (__start, __links, __end) and justify-content:space-between would push the
   links to the CENTRE of the bar — a desktop layout change nobody asked for.
   The auto margin absorbs the free space instead, so the links sit hard
   against the right cluster and desktop renders exactly as it did when the
   bar had two children. */
.folio-nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  /* LAYER 3 — with the bar's other two groups, ABOVE the bar's surface.
     The surface is now a painted layer of its own at z-index 2
     (.folio-nav::before), and an in-flow, non-positioned element paints BELOW
     the positioned descendants of the same stacking context — so without
     these two lines the desktop links would vanish behind the frosted glass.
     position:relative with no offsets moves nothing and takes nothing out of
     flow; it is here purely to make z-index apply. Under 760px the mobile
     rule re-declares BOTH, dropping this element to position:fixed and
     z-index 1 so the drawer passes UNDER the bar rather than over it. */
  position: relative;
  z-index: 3;
}

.folio-nav__link {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-nav__link:hover {
  color: var(--text-primary);
}

/* Left cluster — the mobile kebab and the wordmark travel together. On desktop
   the kebab is display:none, and a display:none flex item generates no box AND
   no gap, so the wordmark sits flush against the bar's padding edge exactly as
   it did before this wrapper existed. */
.folio-nav__start {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  /* LAYER 3 — see .folio-nav__links. This is the pair that keeps the rotating
     kebab and the "Noxarc" wordmark legible ON TOP of an open drawer: the
     drawer is layer 1, the bar's surface is layer 2, and this cluster rides
     above both. Captain asked for both affordances explicitly; covering them
     with the drawer would be the regression. */
  position: relative;
  z-index: 3;
}

/* Right cluster — holds the theme switch, which used to be the last <li> of
   .folio-nav__links. It had to leave that list because under 760px the list
   becomes the dropdown panel and the switch must stay in the bar at every
   width. margin-left reproduces the space-6 gap the <ul> used to give it, so
   the switch keeps its exact desktop position. */
.folio-nav__end {
  display: flex;
  align-items: center;
  margin-left: var(--space-6);
  /* LAYER 3 — see .folio-nav__links. The theme switch sits on the strip of
     bar the drawer does not reach, but it must ride above the bar's surface
     layer regardless, and above the drawer at the narrowest viewports where
     min(78vw, 320px) brings the drawer's right edge closest to it. */
  position: relative;
  z-index: 3;
}

/* ---- The drawer's scrim ---------------------------------------------------
   The dim over the rest of the page while the drawer is open. Two jobs: it
   pushes the covered page back so the drawer reads as FOREGROUND rather than
   as a panel glued to the left edge, and it is the tap-anywhere-to-dismiss
   target every drawer is expected to have.

   A REAL ELEMENT, NOT A ::before ON THE NAV, and that is a correctness
   decision rather than a style preference. A pseudo-element is not
   independently hit-testable: a click on it reports its ORIGINATING element
   as event.target, so every dismissal branch in nav.js would be reasoning
   about "the nav" at the moment the visitor actually clicked "the page behind
   the drawer" — the kind of miss that silently disables click-outside and
   looks like nothing at all in a code review. A real <div> gives the handler
   a target it can tell apart, which is exactly why that handler needed NO
   CHANGE to dismiss on a scrim click: the scrim is neither the button nor the
   panel, so the existing "clicked outside both" branch already fires on it.

   THIS BASE RULE IS UNGATED ON PURPOSE — no `.js`, no media query. Its job is
   to make the element inert in EVERY situation it can be rendered in: with
   JavaScript off, above the breakpoint, and in the very first painted frame
   before nav.js has written any attribute. Two declarations carry that:

     position:fixed is the zero-layout-shift half. An out-of-flow box is never
     a flex item of the bar, so this element cannot join the bar's flex row,
     cannot perturb justify-content:space-between, and cannot move the kebab,
     the wordmark or the switch by a sub-pixel at any width — regardless of
     which rules below it do or do not match.

     visibility:hidden is the other half and it is NOT optional. opacity:0
     alone leaves a full-viewport, fully hit-testable sheet permanently
     swallowing every click on the page.

   LAYER 0: below the drawer (1) and below the bar's surface (2), inside
   .folio-nav's z-index-100 stacking context — so it dims the entire page
   while the page's own 0-2 wall-distance layers keep their scheme intact.

   No cursor:pointer. A scrim's job is to recede; a pointer cursor promotes it
   to a control and pulls the eye back to the thing that is supposed to be
   getting out of the way. The discoverable dismissals are the kebab and
   Escape; clicking the dimmed page is the convention on top of those. */
.folio-nav__scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--nav-scrim-bg);
  opacity: 0;
  visibility: hidden;
}

/* ---- Kebab (mobile menu button) ------------------------------------------
   display:none is the BASE state at EVERY width. It is revealed only by the
   mobile rule further down, which is gated behind `.js`. That gate is the
   whole point: a disclosure button that cannot disclose anything is worse
   than no button, so with JavaScript off this never renders and the links
   stay inline instead. */
.folio-nav__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  /* A REAL 44x44 box, not a pseudo-element hit expansion — WCAG 2.5.5 and the
     iOS HIG target the project already applies to .folio-hero__cta. Making it
     real means what devtools measures is what a thumb actually hits, and the
     hit area cannot silently overlap the wordmark beside it.
     THE 44 IS DECLARED ONCE, as --_nav-btn-size on .folio-nav, because the
     mobile drawer needs the same number: this button is the tallest thing in
     the bar, so it sets the bar's height, and the drawer has to inset its
     first row past exactly that height to clear the bar passing over it. Two
     literal 44s would drift and the symptom would be a drawer row hiding a
     few pixels under the bar — subtle enough to ship. */
  width: var(--_nav-btn-size);
  height: var(--_nav-btn-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-nav__menu-btn:hover {
  color: var(--text-primary);
}

/* The uniform system focus ring — same 2px accent at 3px offset as every
   other focusable control in this file. */
.folio-nav__menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 24px glyph inside the 44px target: the icon carries the meaning, the box
   carries the ergonomics. currentColor ties the dots to the button's own
   colour transition, so hover and theme need no second declaration. */
.folio-nav__menu-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* ---- ENHANCED NAV (JavaScript available) ---------------------------------
   Everything below is gated behind the `js` class the inline <head> script
   puts on <html>. Two things to understand before editing any of it:

   1. THE CLASS LANDS BEFORE FIRST PAINT, in the same pre-paint slot as the
      theme FOUC guard and inside the same IIFE. So the transparent-at-top
      state is already correct on the very first painted frame — there is no
      flash of the opaque bar.
   2. THE TRANSPARENT STATE IS THE `.js` DEFAULT; the frosted state is the
      ADDITIVE one, keyed on data-nav-scrolled="true". It has to be that way
      round. nav.js has not run at first paint, so no data-nav-* attribute
      exists yet, and whichever state is written WITHOUT an attribute selector
      is what the visitor sees first. Invert this pair and you reintroduce the
      flash the gate exists to prevent.

   nav.js writes the flags and never touches a style property. Everything
   visual is here.

   ZERO LAYOUT SHIFT IS THE HARD REQUIREMENT and it is won by what these rules
   DON'T do: no state below changes a box. Colour, opacity, visibility and
   transform only. */

/* At rest: no surface at all.
   backdrop-filter must be `none` — NOT blur(0), and emphatically not "just an
   uncoloured background". A backdrop-filter with a transparent fill still
   visibly blurs everything behind it, which across the top of the hero reads
   as a smeared band. The blur is switched OFF, not decoloured.
   It is also the one property here deliberately NOT transitioned: `none` does
   not interpolate with a filter function, so it would snap whatever we wrote.
   That snap is imperceptible because at the crossover point the only thing
   behind the bar is empty hero canvas, while the tint fading in over the same
   250ms is what the eye actually tracks.

   NOTE THE SELECTOR — this targets ::before, the bar's surface LAYER, not the
   bar element. The surface moved there when the drawer arrived so that it can
   paint ABOVE the drawer; the full reasoning (and the backdrop-filter
   containing-block trap that independently forces it) is on the
   .folio-nav::before rule further up. The state rule below moved with it, and
   the two have to move TOGETHER: a state rule left behind on .folio-nav would
   set a background that the ::before layer then paints straight over — a rule
   that looks correct, matches correctly, and does nothing at all. */
.js .folio-nav::before {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-bottom-color var(--duration-fast) var(--ease-out);
}

/* SURFACE ON — one appearance, THREE independent reasons (a third arrived
   2026-08-17 with the subpage nav; see (c) below).

   (a) data-nav-scrolled="true" — the visitor has started scrolling, so the
       bar materialises. The original reason, unchanged.
   (b) data-nav-menu-open="true" — the drawer is open. This clause predates
       the drawer (it existed so a frosted dropdown could not hang off a fully
       transparent bar with no ground under it) and the drawer makes it
       STRONGER, not redundant. The drawer runs floor to ceiling and passes
       BEHIND the bar; with no surface here the bar would be invisible exactly
       where it crosses the drawer, so the rotating kebab and the wordmark
       would read as printed ON the drawer rather than as controls on a bar
       above it — the drawer would look like it had swallowed the header.
       An open drawer is therefore a reason for the surface in its own right,
       INDEPENDENT of scroll position.

   Consequence worth stating because it looks like a bug and is not: opening
   the menu at scrollY 0 fades the bar in, and closing it there fades the bar
   back to fully transparent. The surface is a function of (scrolled OR open),
   so removing one reason while the other is absent correctly removes the
   surface.

   DELIBERATELY A SECOND SELECTOR, NOT A SECOND FLAG. The state that means
   "the menu is open" already exists on this element. Asking CSS to treat it
   as a second trigger costs one selector line and keeps nav.js's output
   surface at exactly three booleans with no new code path to keep in sync.
   If you ever find yourself about to add a fourth attribute to drive
   appearance, check first whether an OR of the three that exist says the same
   thing — this rule is the worked example.

   STRUCTURALLY MOBILE-ONLY despite living outside the 760px query:
   data-nav-menu-open can only become "true" via the kebab, the kebab is
   display:none above 760px, and nav.js closes the menu if a resize takes the
   button away. Kept here rather than in the media query on purpose, so that
   both reasons for the SAME appearance sit in one rule instead of the same
   four declarations being written twice in two blocks.

   Note this changes border-bottom-COLOUR only. The 1px border itself is
   declared once — on ::before now — and is present in every state; adding it
   on scroll instead would grow that layer by 1px and visibly jump the bar's
   bottom edge. .folio-nav separately reserves a matching 1px of its own with
   a TRANSPARENT border, so the bar's border box is constant too, which is the
   guarantee the 84px scroll-margin-top on .folio-section is tuned against.
   That is trap number one, and those two declarations together are where it
   is defused. (An older version of this note called the constant height a
   guarantee nav.js's CACHED navHeight depended on. nav.js has cached no
   element height since 2026-08-16 - the reveal threshold is derived from
   scroll-margin-top instead - so the consequence today is the visual jump
   plus the anchor-clearance tuning, not a hidden JS cache.)

   (c) .folio-nav--static - ADDED 2026-08-17, and it is a page MODE, not a
       state. /impressum, /datenschutz and the 404 have no hero, so there is
       nothing for a transparent bar to reveal and no reveal threshold that
       can even be computed (no nav link's fragment resolves on those pages).
       They carry the modifier in the MARKUP and therefore get the surface on
       the FIRST PAINTED FRAME.
       MARKUP RATHER THAN AN ATTRIBUTE nav.js WRITES, for exactly the polarity
       reason this whole section is built on: nav.js is a body-end script, so
       anything it writes lands after the first paint, and a JS-announced
       static bar would paint transparent for one frame and snap. nav.js reads
       the class and skips its scroll and brand logic instead of fighting it.
       A THIRD COMMA HERE RATHER THAN A RULE OF ITS OWN, for the same reason
       (b) is a second comma: one appearance, now THREE independent reasons,
       and one place to retune the glass rather than two that drift.
       ONE THING TO KNOW BEFORE MOVING ANY OF THIS: the static selector and
       the `.js .folio-nav::before` transparent default are BOTH (0,2,1), so
       this rule wins on SOURCE ORDER alone. Reorder the two blocks and the
       subpage bar silently goes transparent, with the wordmark still visible
       on it - which breaks the standing "the wordmark never appears on a
       fully transparent bar" invariant from a file that never mentions it. */
.js .folio-nav[data-nav-scrolled="true"]::before,
.js .folio-nav[data-nav-menu-open="true"]::before,
.js .folio-nav--static::before {
  background: var(--nav-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--surface-inner-edge);
}

/* The wordmark holds its box in EVERY state. Trap number two lives here:
   display:none would reflow the row and shove the kebab sideways the instant
   the brand appears. opacity alone is not enough either — it would leave an
   invisible link sitting in the tab order and under the pointer. visibility
   removes it from both while still reserving exactly the same space, and it
   is transitionable, so the pair fades cleanly in both directions. */
.js .folio-nav__brand {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-fast) var(--ease-out),
    visibility var(--duration-fast) var(--ease-out);
}

/* WORDMARK ON — the same shape of argument as the surface rule above: one
   appearance, two independent reasons.

   (a) data-nav-branded="true" — the bar has cleared the hero. Original
       reason, unchanged.
   (b) data-nav-menu-open="true" — the menu is showing. Without this clause a
       visitor who taps the kebab at the top of the page gets three dots and a
       panel and NO BRAND, which is both a hole in the composition and a
       functional defect: the wordmark is hidden with `visibility`, so an
       invisible "Noxarc" is not merely unreadable, it is unclickable and out
       of the tab order. This clause is what makes it a working link to / at
       EVERY scroll position rather than only after the hero.

   TAB ORDER, since this rule is what changes it. With the menu open the brand
   becomes focusable and the sequence through the bar is DOM order:
   kebab → Noxarc → About → Projects → Contact → theme switch. That is also
   the visual order (kebab top-left, wordmark immediately right of it, panel
   below them, switch at the far right), so no tabindex is needed and none is
   used. Closing the menu at scrollY 0 returns the brand to visibility:hidden
   and removes it from the sequence again — correct, and symmetric with the
   surface disappearing at the same moment.

   (c) .folio-nav--static — ADDED 2026-08-17. On /impressum, /datenschutz and
       the 404 the wordmark is the page's way home and there is no hero for it
       to wait behind, so it is visible from the first painted frame. It is
       ALSO the reason those pages could drop their "Back to portfolio" links:
       same destination, permanently visible, and it survives scrolling down a
       long legal document instead of leaving the top of the screen.
       This clause and clause (c) on the surface rule above MUST TRAVEL
       TOGETHER. Delete this one and a static bar shows no brand; delete that
       one and this brand sits on a fully transparent bar, which is precisely
       the invariant the whole component is built to protect. */
.js .folio-nav[data-nav-branded="true"] .folio-nav__brand,
.js .folio-nav[data-nav-menu-open="true"] .folio-nav__brand,
.js .folio-nav--static .folio-nav__brand {
  opacity: 1;
  visibility: visible;
}

/* ---- STATIC-NAV PAGE OFFSET (2026-08-17) ---------------------------------
   The three static-nav pages are chrome-less shells that were laid out back
   when nothing was pinned over them, so their only top offset was their own
   rhythm: --space-24 on .folio-impressum at every width, and --space-16 at
   <=760px on .folio-notfound. A ~61px bar fits inside 96px BY ACCIDENT and
   does not fit inside 64px at all, so the 404 was one breakpoint away from a
   solid bar sitting on its numeral. This rule makes the clearance explicit
   instead of leaving it to a coincidence between two unrelated values.

   KEYED ON THE BAR'S PRESENCE, NOT ON THE PAGE. The sibling combinator means
   the offset applies only where a static bar actually precedes the shell, so
   it can never outlive the thing it exists to clear, and .folio-impressum
   keeps working unchanged anywhere the bar is absent. It also keeps the whole
   arrangement in ONE place beside the mode it belongs to, rather than as two
   padding overrides scattered into two page-layout sections that would then
   have to be found together.

   DELIBERATELY UNGATED (no `.js`). .folio-nav is position:fixed in its
   ungated base rule, so the bar overlaps content with JavaScript off too. A
   `.js`-gated offset would clear the bar for everyone except the visitors who
   cannot see the enhancement in the first place.

   THE VALUE IS TWO TOKENS DOING TWO DIFFERENT JOBS, and neither is a second
   copy of the bar's height.
     --space-16 (64px)  THE RESERVE. The smallest step on the spacing scale
                        that exceeds the bar at BOTH tiers: 61px at <=760px
                        where the 44px kebab is the tallest child, and ~59px
                        above it where the 26px theme switch is (the kebab is
                        display:none there). A scale step ON PURPOSE rather
                        than a measured 61px, so this is not a duplicate of a
                        number declared elsewhere that could drift out of
                        agreement with it. RE-DERIVE IF THE BAR EVER GAINS A
                        TALLER CONTROL: 2 x vertical padding + tallest child +
                        the 1px .folio-nav reserves, which is exactly the
                        arithmetic --_nav-bar-h already performs in the mobile
                        block further up.
     --space-24 (96px)  THE GAP BELOW THE BAR. The page's own top rhythm. It
                        is what --space-24 always meant on a shell with no
                        chrome; it now measures from the bar rather than from
                        the viewport edge.

   SPECIFICITY (0,2,0) beats both .folio-impressum and the 760px
   .folio-notfound override at (0,1,0), at every width and regardless of
   source order. That is deliberate: the offset must not depend on where in
   this file it happens to sit. */
.folio-nav--static ~ .folio-impressum,
.folio-nav--static ~ .folio-notfound {
  padding-top: calc(var(--space-16) + var(--space-24));
}

/* KEBAB AFFORDANCE — the dots turn a quarter circle while the panel is open,
   so the vertical ⋮ reads as a horizontal ⋯. This is the same job a
   hamburger→X flip does elsewhere: the glyph itself says "expanded", so the
   control's state is legible without the visitor having to find the panel to
   infer it. It is the only part of this component whose state is carried by
   SHAPE rather than by opacity.

   ROTATION IS LAYOUT-FREE BY CONSTRUCTION, which is exactly why it is the
   right tool under a zero-layout-shift requirement. transform never
   participates in layout, and the glyph's box is a 24x24 SQUARE, so a 90deg
   turn maps the box onto itself: the 44x44 button, the wordmark beside it and
   every other rect in the bar are byte-identical open and closed. Any
   alternative that swapped the icon's markup, its width or its content would
   reflow the bar instead — that is the wrong turn to avoid here.

   THE PIVOT IS THE MIDDLE DOT, and that is not luck. The default
   transform-origin (50% 50%) resolves to 12,12 in a 24x24 box, which is
   precisely where the middle circle is centred. So the middle dot stays put
   while the outer two sweep around it, and the eye reads one glyph turning
   rather than three dots rearranging. Do not move the origin.

   90deg positive (clockwise) is arbitrary in the END STATE — a row of three
   dots is symmetric — but not in the SWEEP, and clockwise is the conventional
   "opening" direction.

   Runs at --duration-fast so the turn, the panel's fade and the wordmark's
   fade are one 250ms gesture rather than three events that happen to overlap.
   Declared on the icon and not the button because the button also owns a
   `color` transition; keeping the two on separate elements means neither
   shorthand can clobber the other. */
.js .folio-nav__menu-icon {
  transition: transform var(--duration-fast) var(--ease-out);
}

.js .folio-nav[data-nav-menu-open="true"] .folio-nav__menu-icon {
  transform: rotate(90deg);
}

/* ---- Mobile nav: kebab + slide-in drawer (under 760px) -------------------
   Colocated with the component rather than filed in the page-wide responsive
   block at the bottom of this chunk, following the precedent the theme switch
   and the wall-shadow rig both set: a component's own media queries live
   beside the component. THIS IS NOW THE ONLY PLACE .folio-nav IS TOUCHED
   RESPONSIVELY — the bottom block deliberately has no nav rules any more.

   760px is the design system's ONE mobile breakpoint and is not duplicated
   for this component. It does mean the kebab appears on tablet portrait; that
   is accepted and defensible. nav.js never hardcodes the number either — it
   asks the DOM whether the button is currently rendered. */
@media (max-width: 760px) {
  .folio-nav {
    /* --_nav-pad-x is the single source for the bar's inline padding at this
       breakpoint: the drawer uses the same value for its own inline padding,
       so the drawer's link text and the kebab's box share one left edge and
       stay in lockstep if the padding ever changes.
       Vertical padding drops from space-3 to space-2 because the kebab's 44px
       compliant touch target is 18px taller than the theme switch beside it;
       at space-3 the bar would have grown to ~69px on a phone. At space-2 it
       lands at ~61px — a 10px growth over the pre-kebab bar, which is the
       honest price of a real touch target. */
    --_nav-pad-x: var(--space-4);
    padding: var(--space-2) var(--_nav-pad-x);

    /* THE BAR'S OWN HEIGHT AT THIS BREAKPOINT, DERIVED RATHER THAN MEASURED.
       The drawer runs floor to ceiling and the bar passes over its top, so the
       drawer has to start its first row below exactly this much:

           2 x --space-2      the bar's vertical padding          16px
           --_nav-btn-size    the kebab, the bar's tallest child  44px
           1px                the hairline .folio-nav reserves     1px
                                                                 -----
                                                                  61px

       Derived, so it tracks the two knobs it depends on automatically. The one
       assumption it encodes: THE KEBAB IS THE TALLEST CHILD OF THE BAR. That
       is true today (44px against the theme switch's 26px and the wordmark's
       ~20px line box). Add a taller control to the bar and this stops being
       the bar's height, with the symptom being the drawer's first row hiding a
       few pixels under the bar — visible, but easy to misread as a padding
       problem. Consumed exactly once, by the drawer's padding-top. */
    --_nav-bar-h: calc(
      (2 * var(--space-2)) + var(--_nav-btn-size) + 1px
    );
  }

  .folio-nav__links {
    gap: var(--space-4);
  }

  /* The kebab appears only where JavaScript can actually open the panel. */
  .js .folio-nav__menu-btn {
    display: inline-flex;
  }

  /* THE DRAWER. This <ul> is an inline row of links above 760px and a
     full-height panel that slides in from the left edge below it. It replaced
     a translucent dropdown that was rejected on feel: at 85% alpha over a
     12px blur it read as an overlay PRINTED ON the page rather than as a
     surface arriving IN FRONT of it.

     FOUR PROPERTIES MAKE IT READ AS A DRAWER RATHER THAN A POPUP, and every
     one of them is load-bearing:

     1. IT TRAVELS. translateX(-100%) -> translateX(0). It does not fade in
        place, and it has NO opacity ramp at all — a thing that materialises
        where it already was reads as a print; a thing that arrives from
        off-screen reads as an object. The rows still fade (see below); the
        panel itself only moves.
     2. IT IS GENUINELY OPAQUE. --nav-drawer-bg is hsl(), with no alpha term
        anywhere and deliberately NO backdrop-filter. --nav-glass-bg is the
        obvious neighbouring token and it is exactly the one that must NOT be
        used here: it is glass by design, and glass is what got the previous
        version rejected.
     3. IT RUNS FLOOR TO CEILING and passes BEHIND the bar. top:0 / bottom:0
        with z-index 1, under the bar's surface (2) and the bar's controls (3),
        so the rotating kebab and the "Noxarc" wordmark stay legible on top of
        it. padding-top clears --_nav-bar-h so the first row can never hide
        under the bar it passes beneath.
     4. A STRIP OF PAGE SURVIVES. width: min(78vw, 320px) leaves the page
        visible (and scrim-dimmed) down the right side, so the drawer reads as
        covering something rather than as being the whole screen. The 320px cap
        stops a large phone turning it into a full-bleed sheet, which is a
        different component with a different dismissal grammar. At 320px the
        drawer is 250px; at 430px it is capped at 320px.

     position: fixed, NOT absolute, AND THAT IS THE ZERO-LAYOUT-SHIFT HALF OF
     THE DESIGN. An out-of-flow box has no say in the layout of the bar's
     remaining flex children, so opening and closing this cannot move a single
     pixel of the kebab, the wordmark or the theme switch. fixed additionally
     pins it to the VIEWPORT rather than to the bar, which is what lets it be
     full height at all — and it only resolves against the viewport because
     .folio-nav no longer carries backdrop-filter (that property creates a
     containing block for fixed descendants; the full trap is written out on
     the .folio-nav::before rule). Nothing on html or body creates one either.

     THE OLD ANCHORING NOTE NO LONGER APPLIES and is deliberately not carried
     forward: this is fixed to the viewport, so it neither needs nor uses a
     positioned ancestor. --_nav-pad-x survives in a different role — it is now
     the drawer's own inline padding, which lands the link text on the same
     left edge as the kebab's box instead of anchoring the panel's border.

     CLOSED IS THE STATE-SELECTOR-FREE DEFAULT, per the polarity rule the whole
     component follows: nav.js has not run at first paint, so no data-nav-*
     attribute exists yet, and whichever state is written without an attribute
     selector is what the visitor sees on the first painted frame.

     visibility, AND transform ALONE IS NOT ENOUGH. translateX(-100%) parks the
     drawer off-screen but leaves its three links FOCUSABLE and hit-testable —
     a keyboard visitor would tab into an invisible menu. visibility:hidden
     removes them from both, is transitionable, and interpolates in a way that
     happens to be exactly right here: any progress strictly between 0 and 1
     computes to `visible`, so the drawer stays painted for the whole slide OUT
     and becomes visible immediately on the way IN. That asymmetry is what a
     drawer wants, and it comes for free.

     NO overflow ON THIS ELEMENT, on purpose. A scroll container would be the
     defensive choice for a full-height panel, but overflow other than visible
     clips on BOTH axes, and these rows are full-width blocks whose focus ring
     sits at outline-offset 3px — it would be clipped left and right, which is
     a real accessibility regression traded for a hypothetical. Three rows
     cannot overflow a 100vh panel. If this list ever grows past what a 568px
     phone can show, add `overflow-y: auto` AND give .folio-nav__link an inset
     focus treatment in the same change.

     NO will-change. One 250ms transform on one element does not justify a
     compositor layer that outlives the animation — the same stance the rows
     below take, for the same reason. */
  .js .folio-nav__links {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: calc(var(--_nav-bar-h) + var(--space-4))
             var(--_nav-pad-x)
             var(--space-6);
    border: 0;
    /* The drawer's own edge against the dimmed page. The tonal step does most
       of the separating (an opaque panel against a scrimmed page) — this
       hairline and the float shadow are the finish on top of it. */
    border-right: 1px solid var(--surface-inner-edge);
    border-radius: 0;
    background: var(--nav-drawer-bg);
    box-shadow: var(--shadow-float);

    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform var(--duration-fast) var(--ease-out),
      visibility var(--duration-fast) var(--ease-out);
  }

  .js .folio-nav[data-nav-menu-open="true"] .folio-nav__links {
    transform: translateX(0);
    visibility: visible;
  }

  /* The scrim's motion and its open state. The inert base rule lives with the
     component further up, ungated, so the element is safe at every width and
     with JavaScript off; only the two rules that can make it VISIBLE are
     gated behind `.js` and behind this breakpoint. Same 250ms as the drawer,
     so the page recedes over exactly the span the drawer takes to arrive —
     one gesture, not two events that overlap.

     visibility is transitioned alongside opacity for the same reason it is on
     the drawer: it holds the scrim painted through the whole fade OUT and
     un-hides it instantly on the way IN, and it is what makes the scrim stop
     intercepting clicks the moment it is gone. */
  .js .folio-nav__scrim {
    transition:
      opacity var(--duration-fast) var(--ease-out),
      visibility var(--duration-fast) var(--ease-out);
  }

  .js .folio-nav[data-nav-menu-open="true"] .folio-nav__scrim {
    opacity: 1;
    visibility: visible;
  }

  /* Full-width rows: the whole line is the tap target, not just the glyph
     width of the word. 12px top and bottom around a ~20px line box gives each
     entry its own 44px target, and gap:0 above keeps the rows contiguous so
     there are no dead strips between them.

     STAGGERED REVEAL — this is what keeps the drawer reading as CRAFTED
     rather than as a slab that appears. The rows carry their own arrival on
     top of the drawer's, each one --stagger-step behind the last, so About
     lands, then Projects, then Contact.

     THE ROWS TRAVEL ON THE DRAWER'S AXIS. They used to come from 4px ABOVE,
     echoing a dropdown that arrived downward. The drawer arrives from the
     LEFT, so the rows now come from 12px to the left and settle — one motion
     vocabulary, one axis, everything moving the same way. 12px rather than
     4px because these rows ride inside a panel that itself travels 250-320px:
     at 4px the follow-through falls below the threshold of reading as motion
     at all, and the stagger quietly degrades into three rows fading.

     THE TIMING IS AN IDENTITY, NOT A GUESS, AND IT IS UNCHANGED:

         third row starts at   2 x --stagger-step     =  90ms
         third row runs for        --duration-fastest = 160ms
         third row settles at                           250ms == --duration-fast

     i.e. THE LAST ROW SETTLES WITH THE DRAWER, NOT AFTER IT — it lands on the
     exact frame the drawer's 250ms slide finishes. Nothing trails the drawer
     and nothing waits for it, and that property is precisely what made this
     read as crafted rather than sluggish. It survives the change from a
     fading dropdown to a sliding drawer untouched, because both numbers are
     defined relative to --duration-fast and the drawer still travels for
     --duration-fast. The whole sequence stays inside the 300ms budget a
     three-item menu on a minimal site deserves. Both numbers live beside
     --duration-fast in the token chunk with that arithmetic written out —
     change one and re-derive the other.

     NO visibility ON THE ROWS, ON PURPOSE. The drawer already carries
     visibility:hidden when closed, which takes every descendant out of the
     tab order and out of hit-testing in ONE place. Repeating it per row would
     add three more declarations that all have to agree about when a link is
     focusable, for no gain, and would give reduced-motion three more things
     to suppress.

     THE ROWS ARE THE ONLY THING THAT FADES NOW. The old panel faded too, so a
     row's alpha compounded with its container's and that product gave the
     sequence a soft start. The drawer does NOT fade — it travels, opaque,
     because a drawer that fades reads as an overlay, which is the entire
     reason this component was rebuilt. The compounding is therefore gone and
     the rows' own 160ms ramp is doing all of the softening. Do not "restore"
     an opacity transition on the drawer to get the old feel back: that is
     literally the rejected version.

     NO will-change. Three rows over 160ms do not need a permanent compositor
     layer each, and the ones it would create would outlive the animation. */
  .js .folio-nav__links > li {
    width: 100%;
    opacity: 0;
    transform: translateX(-12px);
    transition:
      opacity var(--duration-fastest) var(--ease-out),
      transform var(--duration-fastest) var(--ease-out);

    /* Position in the sequence, consumed by the single calc() below. Held as
       DATA on the row rather than as three hardcoded delay values so the
       timing rule exists exactly once: a fourth link needs one more index
       line, not another copy of the multiplication. Underscore-prefixed to
       mark it component-private, same convention as --_nav-pad-x above. */
    --_stagger-index: 0;

    /* CLOSING MUST NOT STAGGER, and this zero is why the delay is declared
       HERE and applied in the [data-nav-menu-open="true"] rule rather than
       the other way round. transition-delay applies in BOTH directions: a
       delay left on the row unconditionally would leave the third link fully
       visible for 90ms after the visitor asked the menu to CLOSE, inside a
       panel already fading out from under it. Because the delay only exists
       while the menu is open, the closing transition falls back to this 0s
       and every row leaves together, as one collapse.
       Written explicitly even though the `transition` shorthand above already
       resets delay to 0s — same reason nav.js writes "false" rather than
       removing the attribute: the contract should be readable at the point it
       matters, not inferred from a shorthand's initial values. */
    transition-delay: 0s;
  }

  /* The sequence. Two rules, because the first row is index 0 by default. */
  .js .folio-nav__links > li:nth-child(2) {
    --_stagger-index: 1;
  }

  .js .folio-nav__links > li:nth-child(3) {
    --_stagger-index: 2;
  }

  .js .folio-nav[data-nav-menu-open="true"] .folio-nav__links > li {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(var(--_stagger-index) * var(--stagger-step));
  }

  .js .folio-nav__link {
    display: block;
    padding: var(--space-3) 0;
  }
}

/* Honor reduced-motion: every nav state must still READ correctly — the bar
   still becomes opaque, the wordmark still appears, THE DRAWER IS STILL THERE
   AND STILL FULL HEIGHT (it simply appears in place rather than sliding in),
   THE SCRIM STILL DIMS THE PAGE, THE DOTS ARE STILL TURNED A QUARTER, and all
   three rows are still visible — it just snaps instead of animating. Same
   treatment the theme switch's knob gets further down. Suppressing motion must
   never suppress STATE: a visitor who asked for less motion still needs the
   kebab to look expanded and still needs a drawer they can actually read.

   THE DRAWER IS THE CASE WHERE GETTING THIS WRONG IS WORST, and it is worth
   naming because the failure is total rather than cosmetic. Its closed state
   is transform: translateX(-100%) — entirely off-screen. Suppress the STATE
   rule here instead of the BASE rule and the drawer never comes back on
   screen at all: reduced motion would silently turn the menu into a dead
   button. That is not a degraded animation, it is a broken control, and it is
   the sharpest illustration of the rule stated at the end of this comment.

   Scoped to the rules that actually animate STATE. The two colour-only hover
   transitions (.folio-nav__link, .folio-nav__menu-btn) are left alone
   deliberately: prefers-reduced-motion is about motion, not colour fades, and
   .folio-nav__link has never been suppressed here. That scoping is the
   established precedent in this file and every addition below keeps to it.

   THE STAGGER NEEDS NO SEPARATE RESET, which is worth knowing before someone
   adds one. `transition: none` is the SHORTHAND, so it sets transition-property
   to none AND transition-delay back to 0s on the rows. The higher-specificity
   delay calc on the [data-nav-menu-open="true"] rule still resolves, but with
   no property in the transition list there is nothing left for it to delay —
   the rows all arrive together, instantly.

   SUPPRESS THE BASE RULE, NEVER THE STATE RULE. Every selector in this block
   is (0,2,x) and every rule it overrides is (0,2,x) declared earlier in the
   file, so this block wins purely on source order and nothing here needs an
   attribute selector to reach its target. Adding one would raise this block's
   specificity above the base rules it exists to override, and would also risk
   cancelling the END VALUES (rotate(90deg), opacity 1) instead of just the
   transitions — which is the one thing this block must not do. */
@media (prefers-reduced-motion: reduce) {
  .js .folio-nav::before,
  .js .folio-nav__brand,
  .js .folio-nav__menu-icon,
  .js .folio-nav__scrim,
  .js .folio-nav__links,
  .js .folio-nav__links > li {
    transition: none;
  }
}

/* ---- Theme-toggle: soft-3D pill switch -----------------------------------
   A real switch (role="switch" + aria-checked on the <button>) styled as a
   carved INSET TRACK holding a raised KNOB that slides between a SUN (left,
   light) and a MOON (right, dark). It replaced the old text-label button while
   keeping the exact same data-theme-toggle hook and JS controller.

   DEPTH: the track is a recessed well (--toggle-track-bg + --toggle-track-shadow
   inset), the knob is a raised slider (--toggle-knob-bg gradient + --toggle-knob-
   shadow drop+lit-rim). Both token families are themed in tokens.css so the
   control reads native in dark AND light.

   KNOB POSITION IS CSS-DRIVEN FROM [data-theme] — NOT JS. The knob's resting
   transform is RIGHT (dark / data-theme absent or "dark"); a [data-theme="light"]
   ancestor moves it LEFT. Because the inline FOUC head script sets data-theme on
   <html> before first paint, the knob is in the correct end from the very first
   paint — no flash of wrong position, and JS only flips the attribute + aria.
   The active end-icon emphasis is driven the same way (same attribute), so icon
   glow and knob side can never disagree.

   The button strips UA chrome; the focusable element is the <button> itself so
   the focus ring lands on the whole pill. Sizes are fixed (no layout shift in
   the nav across themes — the control reserves the same box in both). */

/* Track geometry — single source for the slide distance maths below. */
.folio-theme-toggle {
  --_toggle-track-w: 52px;
  --_toggle-track-h: 26px;
  --_toggle-knob-d:  20px;
  --_toggle-pad:     3px;
  /* Knob travel = track width − knob diameter − 2×inner padding. */
  --_toggle-travel: calc(
    var(--_toggle-track-w) - var(--_toggle-knob-d) - (2 * var(--_toggle-pad))
  );

  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* The recessed well. position:relative anchors the absolutely-placed knob;
   the two end-icons sit inside via flex with the knob floating above them. */
.folio-theme-toggle__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: var(--_toggle-track-w);
  height: var(--_toggle-track-h);
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--toggle-track-bg);
  box-shadow: var(--toggle-track-shadow);
}

/* The two end-icons. Both currentColor-driven (see __icon color binding below)
   so they theme; idle = dim, the active-side one brightens via [data-theme]. */
.folio-theme-toggle__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  color: var(--toggle-icon-idle);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
  z-index: 1; /* sit under the knob so the knob can pass over visually */
}

/* The raised slider. Absolutely placed; its left edge starts at --_toggle-pad
   and it slides by --_toggle-travel via transform (GPU-friendly, no reflow). */
.folio-theme-toggle__knob {
  position: absolute;
  top: 50%;
  left: var(--_toggle-pad);
  width: var(--_toggle-knob-d);
  height: var(--_toggle-knob-d);
  border-radius: 50%;
  background: var(--toggle-knob-bg);
  box-shadow: var(--toggle-knob-shadow);
  /* DEFAULT (dark): knob at the RIGHT end (by the moon). translateY centers it
     on the track; translateX carries it across the travel distance. */
  transform: translate(var(--_toggle-travel), -50%);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  z-index: 2;
}

/* LIGHT (manual toggle OR OS-pref — the FOUC script sets data-theme="light"
   before paint): knob slides to the LEFT end (by the sun). Scoped to a
   [data-theme="light"] ANCESTOR so it also works inside the styleguide
   compare lab's light-scoped panel, not only on <html>. */
[data-theme="light"] .folio-theme-toggle__knob {
  transform: translate(0, -50%);
}

/* Active-icon emphasis — the icon on the knob's current side glows the accent.
   Default (dark): the MOON (right) is active. Light: the SUN (left) is active.
   Driven by the SAME [data-theme] attribute as the knob, so they stay in sync
   from first paint. */
.folio-theme-toggle__icon--moon {
  color: var(--toggle-icon-active);
}

.folio-theme-toggle__icon--sun {
  color: var(--toggle-icon-idle);
}

[data-theme="light"] .folio-theme-toggle__icon--sun {
  color: var(--toggle-icon-active);
}

[data-theme="light"] .folio-theme-toggle__icon--moon {
  color: var(--toggle-icon-idle);
}

/* Hover: a touch more knob lift via the hover shadow, keeping the affordance. */
.folio-theme-toggle:hover .folio-theme-toggle__knob {
  box-shadow: var(--toggle-knob-shadow), var(--shadow-accent-glow);
}

/* Focus ring on the whole pill — :focus-visible only, so mouse clicks stay
   clean while keyboard users get a clear target. Matches the accent ring used
   across the design system. */
.folio-theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

/* Honor reduced-motion: the knob still moves (position must read correctly),
   it just snaps instead of sliding. */
@media (prefers-reduced-motion: reduce) {
  .folio-theme-toggle__knob {
    transition: none;
  }
}

/* ---- Hero section: ONE SCREEN, TEXT ANCHORED LOW -------------------------
   THE HERO IS EXACTLY THE FIRST SCREEN AND THE CTA IS ALWAYS ABOVE THE FOLD.
   That sentence is the contract of this whole block; everything below is how
   it is enforced.

   WHAT THIS REPLACED AND WHY (2026-08-14, a conversion bug):
   the hero used to be sized purely by its content — the crane was
   width: min(540px, 60vw) with NO height term — so the stack came to a fixed
   1058px regardless of viewport height. Measured in a real browser: at
   1366x768 the <h1> was clipped mid-sentence and BOTH the offer line and the
   CTA sat below the fold; at 1440x900 the CTA was 62px under it; only
   >=1920x1080 fitted. On an ordinary business laptop a paying visitor saw a
   paper crane and half a sentence — no offer, no button.

   THE INVERSION: the text is rigid, the image is elastic.
     - the copy stack (statement -> offer -> CTA) keeps its type sizes and its
       spacing at every viewport and is anchored to the BOTTOM of the screen;
     - the crane takes whatever vertical space is left over above it, down to
       zero if it must.
   Before, the image was rigid and the text got pushed off-screen. Read the
   flex chain top-down: .folio-hero (this rule) -> .folio-hero__title-wrap
   (flex: 1 1 auto + min-height: 0) -> .folio-hero__object (same, holds the
   elastic art) and .folio-hero__copy (flex: 0 0 auto, never shrinks).

   min-height, NOT height. If the copy alone ever exceeds the viewport — a
   very short window, a large accessibility text size, a longer future
   headline — the hero GROWS past one screen and the page scrolls. The text
   is never clipped. A fixed height would clip it, which is the exact failure
   mode this block exists to prevent.

   100svh, NOT 100dvh. dvh tracks mobile browser chrome as it collapses, so
   the hero would visibly resize mid-scroll and the CTA would jump under the
   visitor's thumb. svh is the SMALLEST (chrome-expanded) viewport, i.e. the
   worst case — sizing to it guarantees the CTA is reachable even before any
   chrome collapses. The plain 100vh line above it is the fallback for engines
   with no svh support; they ignore the second declaration and get the
   pre-existing behaviour, not a regression.

   PADDING IS ASYMMETRIC ON PURPOSE. The old symmetric 96px top/bottom made
   sense when the object was rigid; it does not now.
     top    = var(--space-16) = 64px. Its ONLY job is clearing the fixed nav
              bar (~56px) so the art never tucks under it. Every pixel above
              64px here is stolen from the image.
     bottom = 10vh (the air under the CTA)
              + --_hero-scroll-lane (the band the scroll indicator owns).
   The bottom is a calc rather than a literal so the scroll indicator and the
   CTA CANNOT collide: the lane is derived from the indicator's own line
   height, so retuning the line retunes the reservation with it.

   *** THE BOTTOM GAP IS A vh FRACTION, NOT A FIXED PIXEL VALUE, AND THAT IS
   THE POINT (2026-08-16, Noxarc landing rebuild). *** It used to be
   var(--space-6) = 24px. A fixed 24px is a generous gap on a 768px laptop and
   a crumb on a 1440px display — the taller the screen, the more the whole
   stack sank toward the bottom edge and the more the hero read as
   bottom-heavy. A viewport-relative floor scales with the screen instead of
   with nothing, so the composition holds its proportions rather than its
   pixel offsets. The stack keeps its own internal spacing untouched; only the
   floor moves.

   *** THE FRACTION ITSELF CAME DOWN 22vh -> 10vh ON 2026-08-19, AND IT IS THE
   KNOB THAT ACTUALLY CREATED THE ROOM. *** Captain reviewed the hero at
   2560x1256, where 22vh was 276px of empty canvas under the CTA — air the art
   could not reach, because the copy stack is rigid and the object gets only
   what is left once the padding has been taken. Cutting the floor to 10vh
   hands ~151px of that back: the slot goes 547px -> ~698px there.
   MIND THE TWO NUMBERS, they are the reason this retune reads as inexplicable
   from the outside: 547px was the SLOT's height, while the crane inside it was
   rendering at 520px, hard against its WIDTH cap. Slot height and crane size
   are different measures and only coincide once the width cap goes slack.

   READ THE THREE 2026-08-18/19 KNOBS AS ONE CHANGE, because TWO OF THE THREE
   ARE EXACTLY ZERO ON THEIR OWN. The crane's rendered size is min() of THREE
   bounds — the slot's leftover HEIGHT, the slot's own vh CEILING
   (.folio-hero__object), and the image's WIDTH cap (.folio-hero__image) — and
   a min() only moves when you move the SMALLEST term. Worked out at 2560x1256
   from the before state (22vh floor / 50vh ceiling / 520px cap; slot 547px,
   crane 520px = ~20% of the window):
       cap 760 alone ................... 547px  (+27; slot height stops it)
       floor 10vh alone ................ 520px  (ZERO; the 520 cap stops it)
       ceiling 62vh alone .............. 520px  (ZERO; the 520 cap stops it)
       floor + ceiling, cap still 520 .. 520px  (ZERO)
       cap + ceiling, floor still 22vh . 547px  (+27)
       cap + floor, ceiling still 50vh . 628px  (+108; the 50vh cap stops it)
       ALL THREE ....................... 698px  (+178, +34%, ~27% of window)
   So: change one knob, measure, and you will correctly observe that nothing
   happened — and wrongly conclude the knob was the wrong one. That is a real
   property of a min()-of-bounds layout, not a mistake. Retune and review the
   three together, or not at all.

   THE TRADE, STATED PLAINLY, BECAUSE THIS EXACT LEVER WAS TESTED AND REJECTED
   ON 2026-08-18 AND YOU WILL MEET THAT ARGUMENT AGAIN ON .folio-hero__object
   BELOW. Spending the bottom air grows the crane by moving the whole copy
   stack DOWN — true then, still true now. What changed is that Captain looked
   at the result live and approved it ("looks pretty awesome, lets go with that
   change"). It is a COMPOSITION RULING that reverses a prior one, not a
   correction of the old measurement. DO NOT REVERT THE FLOOR TO 22vh ON THE
   STRENGTH OF THE PRESERVED 2026-08-18 PARAGRAPH; it has been amended to say
   so, and knowledge 2179efc4 carries the same reversal.

   IT CANNOT PUSH ANYTHING OFF-SCREEN — and this is now MORE true, not less.
   On a short viewport 10vh is small in absolute terms, and whatever it does
   take is absorbed by the crane first (.folio-hero__object is flex: 1 1 auto
   with min-height: 0, so it shrinks to 0 before the rigid copy stack gives up
   a single pixel). The one-screen guarantee is structural, not arithmetic.

   WHERE THE WORDMARK LANDS, RE-DERIVED FOR 10vh (2026-08-19). The brand
   word's TOP now settles at roughly 41% of viewport height at 568, 48% at
   768, 54% at 900 and 64% at 1256 — it SINKS as the screen grows, because
       brand_top / H  =  (1 - floor_fraction) - (lane + copy) / H
   and only the second term shrinks with height. The old 22vh band was 36-52%
   over the same range, so the whole composition moved down by the floor
   difference. Derived from the same copy heights the fold proof below uses —
   re-derive both together or neither. Captain approved the 1256px end of this
   band on sight; the rest is computed, not measured in a browser.

   FOLD ARITHMETIC at 1366x768 (the laptop the original fold bug was reported
   on), RE-DERIVED 2026-08-19 for the 10vh floor:
     bottom  = 10vh (77) + 72 (lane: 32 offset + 40 line)      = 149px
     768 - 64 (top) - 149 (bottom)                             = 555px box
     555 - 32 (title-wrap gap) - 249 (copy)                    = 274px crane
   where copy = 67 brand + 16 + 98 lead (3 lines) + 24 + 44 CTA. The CTA's
   bottom edge lands at y=619 of 768 and the hairline occupies y=696..736, so
   the CTA-to-indicator gap is the full 77px of 10vh. Neither of the crane's
   two caps binds on this laptop: the 62vh ceiling is 476px and the width cap
   resolves to 683px (50vw of 1366), both far above 274 — the LEFTOVER is the
   binding term here, which is why the floor is the only knob that moves it.
   (Under the 22vh floor those three numbers were 241 / 463 / 182 with the CTA
   at y=527 and a 169px gap. The crane gained 92px and the copy stack moved
   the same 92px down; the freed padding goes entirely to the art.)

   THE HAIRLINE'S BAND DOES NOT MOVE WITH THE FLOOR, and that is exactly why
   the bottom is a calc. The indicator is anchored to the hero's bottom EDGE
   through --_hero-scroll-lane, so y=696..736 is identical at 22vh and at 10vh
   and only the CTA travels toward it. Shrinking the floor therefore spends
   CTA-to-indicator clearance and NOTHING ELSE — the lane is structurally out
   of this knob's reach, so the two can never collide however low the floor
   goes. A floor of 0 would still leave the full lane standing.

   Taller viewports hand the crane more of the leftover until one of its two
   caps stops it — the width cap on .folio-hero__image or the 62vh ceiling on
   .folio-hero__object, whichever is smaller at that viewport (since 2026-08-19
   that is the width cap essentially everywhere). The surplus then appears
   ABOVE the crane (title-wrap packs to flex-end), so nothing below the crane
   moves. */
.folio-hero {
  /* Single knob for the scroll indicator. The band it occupies (its offset
     from the hero's bottom edge PLUS its own length) is reserved in this
     rule's bottom padding, so the indicator can never land on the CTA no
     matter how the copy wraps. Retuned once, at <=480px. */
  --_hero-scroll-line: 40px;
  --_hero-scroll-lane: calc(var(--space-8) + var(--_hero-scroll-line));

  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* flex-end anchors the copy to the bottom of the content box. In practice
     .folio-hero__title-wrap grows to fill that box so there is no free space
     left for this to distribute — it is the declaration of intent, and the
     safety net if that child is ever made inflexible again. */
  justify-content: flex-end;
  padding: var(--space-16) var(--space-8)
           calc(10vh + var(--_hero-scroll-lane));
  position: relative;
  text-align: center;
}

/* Outer wrapper keeping the object + the copy stack vertically stacked and
   centered. gap carries the vertical rhythm between object and typography
   (tightened at <=760px, see the responsive block).

   width: 100% is the OUTER half of the overflow fix (.folio-hero__copy holds
   the inner half). Both levels of this nesting were shrink-to-fit before, so
   a wide child could push either of them past the viewport. Pinning both to
   the hero's content box means the available width flows DOWN the tree as a
   definite number instead of being negotiated back UP from content. No
   max-width here on purpose: the children cap their own measure
   (.folio-hero__image caps its own max-width with one continuous expression on
   its base rule — deliberately NOT restated here, because a second copy of that
   number is what silently went stale through the 2026-08-18 AND 2026-08-19
   retunes; .folio-hero__lead at 34ch), so
   adding a wrapper cap would only create a second, competing limit that a
   future editor would have to reconcile.

   justify-content: flex-end PACKS THE CHILDREN TO THE BOTTOM of this column,
   and it is what lands the wordmark in the lower half on load (2026-08-16).
   Without it, object and copy distribute from the top and the crane — which is
   supporting cast, not the event — ends up owning the optical centre of the
   screen. Packing to the bottom puts any surplus vertical space ABOVE the
   crane, so the crane grows upward into the clearance under the nav and
   nothing at or below the wordmark moves as the viewport gets taller.

   gap is var(--space-8) at EVERY width now (2026-08-16). It used to be 48px
   here and 32px under 760px; once the crane gained a height cap of its own
   (38vh at the time, 50vh on 2026-08-18, 62vh since 2026-08-19) the extra
   16px on desktop bought nothing but a lower wordmark, so the breakpoint
   override was DELETED rather than left restating a value that no longer
   differs — a media query that repeats the base value is a trap that reads as
   an intentional difference. */
.folio-hero__title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-8);
  width: 100%;
  /* THE ELASTIC LINK IN THE CHAIN (added 2026-08-14 with the one-screen hero).
     flex: 1 1 auto makes this column claim the hero's whole content box, so
     its last child — the copy stack — comes to rest on the bottom padding
     edge. THAT is what actually anchors the text low; the hero's
     justify-content: flex-end is the statement of intent behind it.

     min-height: 0 IS LOAD-BEARING. Flex items default to min-height: auto,
     which refuses to shrink below content size — with it left out, this
     column would keep its natural height, the crane inside would keep its
     540px, and the whole rebuild would be a no-op. If the hero ever looks
     1058px tall again, check this line first. */
  flex: 1 1 auto;
  min-height: 0;
}

/* Hero object — the ELASTIC SLOT the brand crane lives in. It takes every
   pixel the copy stack does not need and gives them all back when the
   viewport is short; flex: 1 1 auto together with min-height: 0 is the pair
   that allows both directions (see .folio-hero__title-wrap for why the
   min-height is not optional).

   position: relative because the two theme renders inside are absolutely
   positioned. That is not a styling preference — it is the mechanism that
   makes the whole leftover-space model work. The reasoning lives on
   .folio-hero__image directly below; read it before changing either rule. */
.folio-hero__object {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  /* CEILING ON THE ELASTIC SLOT (added 2026-08-16). flex: 1 1 auto happily
     claims every leftover pixel, and on a tall display that meant a crane the
     size of a dinner plate with the wordmark pushed down behind it. 62vh caps
     how much of the screen the art may own, and the surplus goes somewhere
     useful rather than nowhere: .folio-hero__title-wrap packs to flex-end, so
     space this rule refuses lands ABOVE the object as clearance under the nav.
     The wordmark and everything below it do not move.

     max-height, not height. The slot must still SHRINK on short screens (that
     is the whole rigid-copy / elastic-art bargain), so this can only ever be
     an upper bound. Pairs with the image's own min(760px, 50vw) width cap: the
     object is bounded on both axes and the crane is never distorted, because
     the img resolves its intrinsic ratio against both bounds.

     RAISED 38vh -> 50vh ON 2026-08-18, together with the image's width cap, on
     Captain's "make the crane bigger in proportion to the page". MEASURED, and
     the measurement is the whole justification: at 2560x1256 the crane goes
     380px -> 520px (+37%) while .folio-hero__brand's top stays at y=643 and the
     CTA's bottom stays at y=908 — BYTE-IDENTICAL. Nothing at or below the
     wordmark moves, because the surplus this cap releases is claimed ABOVE the
     object by title-wrap's flex-end packing, exactly as the paragraph above
     describes. The crane grows upward into the nav clearance instead.

     RAISED AGAIN 50vh -> 62vh ON 2026-08-19, in the same pass that cut the
     hero's bottom floor 22vh -> 10vh. THE TWO ARE ONE CHANGE, not two: cutting
     the floor grows this slot's LEFTOVER, and at 50vh this ceiling then ate
     the gain. Worked at Captain's 2560x1256, where the slot measured 547px
     before the pass: the 10vh floor lifts the leftover to ~698px, but 50vh is
     628px there — so the crane would have stopped at 628 and ~70px of the new
     room would have gone nowhere, silently. 62vh is 779px there and lets the
     leftover through untouched.

     WHERE 62 COMES FROM, so it is not read as a taste number. This ceiling
     only BINDS while it is the smallest of three terms: the leftover, itself,
     and the image's width cap. At 50vh, on a 2560-wide screen, that window is
     roughly 1082px-1520px of viewport HEIGHT — which is almost every desktop
     display in use, Captain's 1256 included. At 62vh the window is EMPTY: the
     width cap always gets there first. 62 clears the 2560x1256 leftover by
     ~80px, enough that a shorter copy render (a two-line lead) cannot pull the
     ceiling back into play.

     SO THIS CEILING IS NOW SLACK AT EVERY VIEWPORT, and that is the intended
     end state, not an oversight. It is kept as a STRUCTURAL GUARD rather than
     an active constraint: it re-engages the instant the bottom floor is raised
     again or the copy stack shrinks hard — exactly the two situations where a
     dinner-plate crane comes back. Deleting it because "it does nothing today"
     would remove the brake and leave nothing to notice its absence.

     *** THE NEXT PARAGRAPH IS PRESERVED 2026-08-18 REASONING THAT CAPTAIN
     OVERRULED ON 2026-08-19. READ THIS VERDICT BEFORE YOU ACT ON IT. *** On
     2026-08-18 the bottom padding was examined as a lever and rejected, on the
     analysis below. On 2026-08-19 it was SPENT anyway, deliberately: the floor
     went 22vh -> 10vh and Captain approved the result live at 2560x1256
     ("looks pretty awesome, lets go with that change"). THE ANALYSIS WAS NOT
     WRONG — the copy stack does move down, exactly as it predicted, and the
     wordmark band did widen to 41-64% (see .folio-hero). It was a COMPOSITION
     JUDGEMENT that has since been made the other way, because 22vh had left
     276px of canvas under the CTA that the art could not reach. It is kept
     here because the MEASUREMENT is still good and still the right thing to
     reason from — only its recommendation is dead.
     DO NOT REVERT THE FLOOR TO 22vh ON THE STRENGTH OF IT. Knowledge 2179efc4
     carries the same reversal; if you find a third copy of this argument that
     has not been amended, that copy is the stale one.

     [2026-08-18 — measurement live, recommendation SUPERSEDED]
     WHY THIS LEVER AND NOT THE BOTTOM PADDING, which is the other candidate and
     the wrong one. Reducing the hero's 22vh floor also grows the crane, but it
     grows it by moving the whole copy stack DOWN: at 1440x900 the wordmark goes
     41% -> 48% of viewport height, and at 1920x1200 it goes 50% -> 57% while the
     crane does not grow AT ALL because the width cap is what binds there. That
     is a pure regression on tall screens and it re-creates the bottom-heavy
     composition the 22vh decision was made to fix. This cap costs nothing.

     WHAT THIS CAP DOES NOT DO, so nobody re-measures it hoping. Moving the cap
     is a no-op wherever the crane is LEFTOVER-bound or WIDTH-bound rather than
     cap-bound. Under the 22vh floor that was everything at 1440x900 and below,
     including every phone. Under the 10vh floor it is now EVERYWHERE, because
     the cap is slack at every viewport (see WHERE 62 COMES FROM above) — so if
     you are here to make the crane bigger, this is still the wrong rule to
     edit. The lever that actually moves the art on a short screen is the
     bottom floor on .folio-hero, and spending it still moves the copy. */
  max-height: 62vh;
}

/* The rendered brand crane. Bounded on BOTH axes: never wider than 760px (or
   50vw), never taller than the space left above the copy stack — which is now
   itself capped at 62vh by .folio-hero__object.

   THE WIDTH CAP CAME DOWN FROM min(540px, 60vw) ON 2026-08-16. Not a fitting
   fix — the flex chain guarantees the fit — a COMPOSITION one. At 540px the
   crane was the loudest thing in a hero whose job is to deliver a name and a
   claim, and 60vw let it keep growing on wide displays where it was already
   too big. 380px square is the value Captain approved: present, clearly the
   brand object, and quiet enough that the wordmark reads as the event.

   *** WHY position: absolute — READ THIS BEFORE "SIMPLIFYING" IT AWAY ***
   The obvious shape for "the image fills the leftover space" is to leave the
   img in flow and cap it with max-height: 100%. That silently does nothing,
   and the reason is worth carrying forward:
     1. .folio-hero has min-height, not height, so its used height is
        CONTENT-BASED — it grows to fit its content rather than forcing the
        content to fit inside a screen.
     2. An in-flow img with width: min(540px, 60vw) has a definite 540px
        height (via its 1:1 ratio) and therefore contributes 540px to that
        content-based height. The hero grows to 1058px, the flex free space
        is never negative, and so min-height: 0 and flex-shrink never even
        get a chance to act. That IS the bug this rebuild fixes.
     3. max-height: 100% cannot rescue it either: while the containing
        block's height is still being computed it is indefinite, and a
        percentage against an indefinite size is treated as none for
        intrinsic sizing. Circular, so ignored.
   Absolute positioning breaks the circle. An out-of-flow child contributes
   NOTHING to its ancestors' intrinsic height, so the hero's content-based
   height collapses to paddings + gap + copy — always less than one screen —
   and min-height: 100svh then wins and hands the flex layout a DEFINITE
   height to distribute. The object receives its leftover as a real number,
   and max-height: 100% here resolves against it (an absolutely positioned
   element's containing block is always definite by the time it is laid out).
   No hard-coded reserve, no copy-height constant to keep in sync with the
   copy: the art simply takes what is left.

   inset: 0 + margin: auto is absolute centering. With width and height auto
   on a replaced element the browser resolves the intrinsic size, clamps it
   against BOTH max-width and max-height while preserving the ratio, then
   splits the leftover inset equally on each axis. So the crane is centred in
   its slot both ways and is never distorted; object-fit: contain is the belt
   to that pair of braces.

   NO aspect-ratio DECLARATION ANY MORE. It existed to reserve a square slot
   before decode so the image could not shift layout — a guarantee that is
   now STRUCTURAL, because an out-of-flow box cannot shift anything, ever.
   Keeping it would also force a future non-square render into a square box
   and letterbox it, a silent quality regression on the brand object. The
   intrinsic ratio of whatever ships now drives the box. (The width/height
   attributes in index.html stay: they still supply that intrinsic ratio
   before the PNG decodes.)

   AT THE LIMIT: if the copy alone outgrows the viewport, the object's
   leftover is 0, max-height: 100% resolves to 0, and the crane renders 0x0.
   The art absorbs all the pressure so the text is never clipped — the
   priority stated at the top of this section. */
.folio-hero__image {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  /* ONE CONTINUOUS EXPRESSION, NO BREAKPOINT OVERRIDES (2026-08-16). Reads
     outside-in: never wider than 760px, never narrower than the small-screen
     rule, and 50vw in between.

         min( 760px,  max( 50vw,  min(240px, 56vw) ) )
              ^cap        ^desktop     ^phone rule

     ALL THREE NUMBERS WENT UP ON 2026-08-18 (380/40/220/52 -> 520/50/240/56) on
     Captain's "make the crane bigger in proportion to the page". THE SHAPE OF
     THE EXPRESSION IS UNCHANGED and that is deliberate: the continuity argument
     below is a property of the shape, not of the values, so it survives the
     retune. Verified after: the handover still lands where the two rules are
     equal (480px now, was ~550px) and there is still no jump anywhere.

     THE CAP ALONE WENT UP AGAIN 520px -> 760px ON 2026-08-19 AND NOTHING ELSE
     IN THIS EXPRESSION MOVED. The phone rule (240px / 56vw) and the 50vw
     desktop term are byte-identical, so the handover point is still EXACTLY
     480px, the continuity argument below still holds unmodified (it is a
     property of the shape, not of the values), and every resolved value under
     1040px is unchanged. Captain reviewed the hero at 2560x1256 where 520px
     read as ~20% of the window — too small to carry a brand object at that
     scale; 760px is ~30% there.
     THE PHONE NUMBERS WERE DELIBERATELY NOT TOUCHED. 240px on a 375px screen
     is already 64% of the width; this pass was about wide displays only, and
     touching the phone terms would have moved the 480px handover and every
     320px proof downstream of it.

     WHAT THE CAP ACTUALLY BUYS, BECAUSE ON ITS OWN IT BOUGHT ALMOST NOTHING.
     At 2560x1256 the crane sat in a 547px slot, so raising the cap from 520
     to 760 could only ever deliver 547 — 27 pixels. The size moved for real
     only once .folio-hero's bottom floor came down 22vh -> 10vh (which grows
     the slot's leftover to ~698px) and .folio-hero__object's ceiling went
     50vh -> 62vh (so the newly-grown leftover is not clamped back to 628px).
     520 -> 698px, +34%, all three together. The full combination table is on
     .folio-hero; read it before concluding any one of these three is inert.

     WHY A BIGGER vw FRACTION ON PHONES. 50vw is the right proportion on a wide
     screen and a postage stamp on a narrow one — 50vw of a 375px phone is
     188px, small enough that the crane stops registering as the brand object.
     56vw (capped at 240px so it cannot dominate) restores it. The max() picks
     whichever rule is currently larger, which is the phone rule below ~480px
     and the desktop rule above it, and the handover happens exactly where the
     two are equal — so the size is CONTINUOUS. Resolved values, RE-DERIVED
     2026-08-19 (only the right-hand column moved: 50vw reaches the cap at
     1520px now, where it used to reach it at 1040px):
         320px -> 179    480px -> 240    1040px  -> 520
         375px -> 210    550px -> 275    1280px  -> 640
         429px -> 240    760px -> 380    1520px+ -> 760 (cap)

     This replaced two media-query overrides (min(240px, 48vw) at 760 and
     min(200px, 46vw) at 480) that were tuned against a 60vw base and, once the
     base came down to 40vw, had inverted into making the art LARGER than the
     base rule with a visible 28px jump at the 480px boundary. One expression
     has no boundary to jump at and nothing to keep in sync.

     max-width, NOT width. The crane is bounded on both axes and its height cap
     is the leftover space above the copy (max-height below); a definite width
     would fight that clamp instead of cooperating with it. Whatever art
     replaces the crane inherits this automatically — it targets both theme
     renders, not a specific asset. */
  max-width: min(760px, max(50vw, min(240px, 56vw)));
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  /* *** THE CRANE PNG IS NOT CENTRED INSIDE ITS OWN BOX. THIS SHIFT IS THE
     COMPENSATION (added 2026-08-19). ***
     MEASURED 2026-08-19 from the shipped renders' ALPHA CHANNEL
     (hero-crane-dark.png / hero-crane-light.png, square, 1400x1400 out of
     Blender): the fully transparent margin around the visible bird is ~14% of
     the height at the TOP, ~28% at the BOTTOM, ~3% left, ~0% right. The BOX is
     centred in its slot perfectly — inset: 0 + margin: auto does exactly that
     and always did — but the CRANE inside the box is not, so it rides high and
     opens a gap between the art and the wordmark that reads as the composition
     having come apart. Every attempt to close that gap by resizing the image
     fails, because resizing scales the dead band with it.

     translateY(14%) is 14% OF THE IMAGE'S OWN HEIGHT — a percentage
     translation resolves against the element's own border box, never the
     container's — so it moves the visible crane down into its own empty bottom
     band by exactly what the empty top band was costing. Three properties make
     this a correction rather than a nudge:
       1. IT CANNOT REACH THE COPY. The bottom band is 28% and the shift is
          14%, so the visible crane still ends 14% of its own height ABOVE the
          box's bottom edge at every size — the margin is proportional, so this
          holds identically at 137px on a phone and ~700px on a desktop. The
          only thing that crosses the box edge is the soft grounding halo (the
          drop-shadow pair on the second .folio-hero__image rule below, 18px
          offset + 32px blur at 12-18% alpha). Worst case is the phone: a 137px
          crane leaves 19px of band under it and the halo reaches ~31px past
          the box, which the 32px title-wrap gap absorbs.
       2. ZERO LAYOUT SHIFT, STRUCTURALLY. transform is paint-time only and
          never feeds layout, so the "an out-of-flow box cannot shift anything"
          guarantee above is untouched — this adds a second independent reason
          on top of it rather than leaning on it.
       3. NO BREAKPOINT. One percentage is correct at every width, so there is
          nothing here to keep in sync with the responsive tiers.
     It does make the img a stacking context, which is harmless: its only
     sibling is the other theme render and that one is display:none.

     THE ROOT-CAUSE FIX IS A RE-EXPORT, NOT THIS LINE, and it was deliberately
     NOT done in this pass. Trimming the dead band in render/hero-origami.py
     and re-running the pngquant/oxipng pipeline (knowledge 2179efc4) would
     delete this declaration AND give the crane more displayed height for the
     same bytes. It is deferred because it changes the PNG's intrinsic ratio
     away from square, which means the width/height attributes in index.html
     must move with it — and index.html was out of scope here. Parked.
     IF YOU DO RE-EXPORT: DELETE THIS DECLARATION IN THE SAME CHANGE. Against a
     trimmed asset the shift has no dead band to move into and would push the
     crane genuinely low, into the copy. */
  transform: translateY(14%);
  /* Hint browsers to render the transparent PNG crisply */
  image-rendering: -webkit-optimize-contrast;
  transition: filter var(--duration-fast) var(--ease-out);
}

/* ---- Hero object: theme-aware matched-pair swap (Batch 3 — shipped) ------
   NAMING NOTE (2026-08-19): the object is the ORIGAMI PAPER CRANE, swapped in
   on 2026-08-14. The word "cube" throughout this block is the pre-swap wording
   and is left standing because the Batch-3 ARGUMENT it makes is unaffected by
   which object ships — but THE TWO FILENAMES WERE STALE UNTIL TODAY and are
   now corrected. A grep for hero-cube-dark.png used to land right here and
   point at a file that has not existed since 2026-08-14; the live pair is
   confirmed against index.html, which sources hero-crane-{dark,light}.png.
   The object ships as a MATCHED PAIR of purpose-built renders (the same
   object relit), each an approved, web-optimized transparent PNG:
     hero-crane-dark.png   — the dark hero (default / data-theme absent or "dark")
     hero-crane-light.png  — the light counterpart (data-theme="light")
   This replaces the Batch-2 honest placeholder (one dark render shown in both
   themes, grounded by a filter). A real light render now carries its own
   material, so no fake-light-glass filtering is needed — the swap is a clean
   asset exchange driven entirely by CSS display.

   HOW THE SWAP WORKS (robust attribute-based, manual-toggle-aware):
   index.html renders BOTH imgs (.folio-hero__image--dark + --light). The
   default state (data-theme absent OR ="dark") shows dark / hides light; the
   [data-theme="light"] ancestor inverts that. The FOUC init script sets
   data-theme on <html> before first paint for BOTH the manual toggle and the
   OS-preference path, so a light visitor sees the light cube from first paint
   with no flash of the dark render. Only one img is ever display:block, so the
   square slot is occupied by exactly one element at a time.

   GROUNDING: the warm contact-shadow halo that seats the cube on the page is
   applied to .folio-hero__image (both renders), so whichever cube is visible
   gets grounded — never double-applied (the hidden img is display:none and
   paints nothing). The transparent PNGs have no baked floor shadow, so this
   filter is what makes either cube read as resting rather than floating. Tuned
   warm (hue 30) + low-alpha to sit on the off-white light bg AND the dark bg
   without looking heavy; same halo, both themes, by design. */

/* Default state (dark, or data-theme absent): dark render visible, light hidden. */
.folio-hero__image--light {
  display: none;
}

/* Light theme (manual toggle OR OS preference — the FOUC script sets
   data-theme="light" for both): swap dark out, light in. */
[data-theme="light"] .folio-hero__image--dark {
  display: none;
}

[data-theme="light"] .folio-hero__image--light {
  display: block;
}

/* Warm contact-shadow grounding halo — seats whichever cube is visible on the
   page. Applies to BOTH renders so dark-on-dark and light-on-off-white are both
   grounded; only the visible img paints, so there is no double-application. */
.folio-hero__image {
  filter:
    drop-shadow(0 18px 32px hsla(30, 25%, 30%, 0.18))
    drop-shadow(0 4px 8px hsla(30, 25%, 30%, 0.12));
}

/* ---- Hero copy stack: statement → offer → CTA (rebuilt 2026-08-14) ------
   The three text beats under the rendered object. Renamed from
   .folio-hero__quote, which had become a lie: the hero stopped being a
   <blockquote>+<cite> aphorism and a class called "quote" wrapped around an
   <h1> and a button would mislead the next reader. The old names ARE GONE,
   not aliased — .folio-hero__quote and .folio-hero__cite no longer exist in
   this stylesheet or in any template. Nothing but index.html ever referenced
   them (verified across the whole corpus before deletion).

   width: 100% IS LOAD-BEARING, NOT DECORATION. Without it this column is a
   shrink-to-fit flex item, and a shrink-to-fit box resolves to at least its
   min-content width — meaning a child whose min-content exceeds the viewport
   drags the whole column past the screen edge. That is precisely how the
   previous hero overflowed 58px off both sides at 375px. Pinning the column
   to 100% of the hero's content box hands every child a DEFINITE width to
   wrap inside, so overflow becomes structurally impossible rather than
   merely unlikely. Keep it.

   gap is the TIGHT beat (statement → offer, 16px). The looser second beat
   (offer → CTA, 24px) comes from the CTA's own margin-top stacked on this
   gap, so both intervals stay expressible in spacing tokens. */
.folio-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  margin: 0;
  text-align: center;
  /* NEVER SHRINKS (added 2026-08-14). This is the rigid half of the hero's
     bargain: the three text beats keep their type sizes and their spacing at
     every viewport, and the crane above absorbs all the vertical pressure
     instead. flex-shrink: 0 is what turns "the CTA is always visible" from a
     hope into a structural guarantee — no amount of viewport shortening can
     squeeze this column, so the only thing a short screen can take away is
     picture. */
  flex: 0 0 auto;
}

/* THE WORDMARK — "Noxarc". The page's only <h1> and its largest beat.
   (Quoting the live string here is deliberate — the overflow proof below is
   derived FROM it, so the two must be read together or the proof cannot be
   verified.)

   WHY THE H1 IS THE BRAND NAME AND NOT A CLAIM (2026-08-16). Traffic to this
   page is warm referral: visitors arrive ALREADY holding the name and already
   believing they have the problem, so the page is a VERIFICATION surface, not
   a persuasion surface. Big-name-first is instant confirmation they are in the
   right place. The usual "nobody knows this name" objection applies only to
   cold traffic Noxarc does not get. It also fixes brand-presence-on-first-
   paint: the nav wordmark is visibility: hidden until data-nav-branded flips
   past the hero, so before this change the brand appeared NOWHERE on the first
   painted frame.
   CONSEQUENCE TO CARRY WHEN EDITING: with the h1 spent on the name,
   .folio-hero__lead below now does 100% of the selling, which is why it is
   typeset as a genuine subhead rather than as caption text.

   FONT-SIZE IS A CLAMP, NOT var(--font-size-display), AND THAT IS THE FIX.
   That token is a flat 3.815rem = 61.04px at EVERY viewport; on a 375px phone
   that is roughly a sixth of the screen per character. The clamp keeps
   61.04px — byte-identical to the old token — from 644px of viewport width
   upward, so every desktop is untouched, and ramps down to 40px on the
   smallest phones:
     min   2.5rem    = 40px    floor; binding at <= 320px
     pref  1.2rem + 6.5vw      40.0px @320  (continuous with the floor, no jump)
                               43.6px @375
                               47.2px @430
     max   3.815rem  = 61.04px reached at 644px viewport
   THE FLOOR ROSE FROM 2rem TO 2.5rem because the headline lost two thirds of
   its glyphs: a six-letter wordmark at 32px looks timid where a three-phrase
   sentence at 32px looked full. The 320px proof below was RE-DERIVED against
   the new floor, never inherited.
   The clamp is scoped to THIS RULE on purpose rather than shrinking
   --font-size-display: that token is shared with .display, .sg-hero__title
   and .folio-notfound__code, and retuning it would have silently moved three
   unrelated surfaces in order to fix one hero.

   320px NO-OVERFLOW PROOF — RE-DERIVED 2026-08-16 FOR "Noxarc". This proof is
   COPY-DEPENDENT and must never be inherited unchecked; the version before
   this one was derived for "One sheet. Every shape." and the one before that
   for "Every arc starts in the dark.". Every rewrite of the h1 invalidates it.
   Hero padding below 760px is var(--space-4) = 16px per side, so the content
   box is 320 − 32 = 288px, and at a 320px viewport this clamp sits exactly on
   its 2.5rem floor (1.2rem + 6.5vw = 19.2 + 20.8 = 40px) — so 40px is the
   binding size.
   The constraint is the longest UNBREAKABLE TOKEN, never the sentence length.
   THE HEADLINE IS NOW A SINGLE SIX-LETTER TOKEN, "Noxarc", which is the most
   comfortable this proof has ever been: there is no second word, so there is
   nothing for the browser to break BETWEEN, and min-content simply is the
   width of the word.
   Even at an absurd 1em per glyph (an upper bound no Latin glyph reaches;
   Space Grotesk lowercase advances run ~0.4–0.6em, capitals ~0.7em) that is
   6 × 40px = 240px < 288px. Real metrics put "Noxarc" near 170px, and
   --tracking-tight (-0.02em) subtracts a further ~5px — comfortable.
   The clamp reaches its 61.04px ceiling at a 644px viewport (19.2 + 0.065W =
   61.04), much earlier than the multi-word headline it replaced needed. Spot
   checks at the sizes that matter, all against their own content box:
     320px  40.0px x 6 = 240 < 288      430px  47.2px x 6 = 283 < 398
     375px  43.6px x 6 = 261 < 343      760px  61.0px x 6 = 366 < 728
   IF YOU CHANGE THE COPY OR THE FLOOR, REDO THIS ARITHMETIC:
   longest-token-glyph-count × floor-px must stay under (320 − 2 × horizontal
   hero padding).

   NO &nbsp; ANYWHERE, EVER — the rule survives the copy change even though a
   one-word headline has no spaces to make non-breaking. A future editor who
   restores a multi-word h1 will be tempted to weld the phrases together for a
   pretty line break; that is exactly what pinned min-content at 490px and
   clipped letters off both edges of every phone. There is also no
   text-wrap: balance here any more: balance exists to even out MULTIPLE lines
   and a single word has none, so it would be a declaration that does nothing
   while implying the headline is expected to wrap.
   overflow-wrap: break-word is kept as the last-resort net for any future word
   longer than the line box. */
.folio-hero__brand {
  font-size: clamp(2.5rem, 1.2rem + 6.5vw, 3.815rem);
  /* bold, not semibold: this is a wordmark now, not a sentence. One short word
     at display size needs the extra weight to hold the composition against the
     crane directly above it — the largest object in the hero at every width,
     and larger again since its cap went to 760px on 2026-08-19. No pixel value
     is restated here on purpose; .folio-hero__image owns that number, and the
     copy of it that used to sit in this sentence went stale twice. */
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  /* No max-width. The old 12em cap existed to force the two-beat sentence onto
     two lines; against one unbreakable word a max-width can only ever be
     ignored or create an overflow, never help. */
  margin: 0;
  overflow-wrap: break-word;
}

/* THE LEAD — "Most systems get complicated as they grow. We work out why -
   and fold them back into something clean." (Quoting the live string here is
   deliberate, exactly as on .folio-hero__brand above: the overflow proof below
   is derived FROM it, so the two must be read together or the proof cannot be
   verified.) Renamed from .folio-hero__subtitle on 2026-08-16 with the wordmark
   rebuild, because "subtitle" understated what this line now does: with the h1
   spent on the brand name, THIS LINE CARRIES 100% OF THE SELLING. It is the
   whole pitch, and it is typeset accordingly.

   COPY CHANGED 2026-08-19 (Captain's text pass): the opening word went from
   "Some" to "Most", SUPERSEDING the 2026-08-16 approved wording. Only that one
   word moved, which is why the proof below survives unaltered - but it was
   RE-DERIVED rather than assumed, and the arithmetic is spelled out there.
   index.html's <meta name="description"> carries this same sentence and moved
   in the same edit; the two are byte-identical by standing rule.

   PROTECT THE VERB "fold". Once the sheet/shape line moved out of the hero and
   onto the work section's heading — where it reads "One sheet. Infinite
   shapes." since the 2026-08-19 retune — the word *fold* in this sentence
   became the load-bearing tie from the origami crane above it to any meaning.
   Lose it and the brand object degrades from a metaphor the visitor can SEE
   into decoration. Change the crane and this line together, or neither.
   (Section 2's h2 "The way we fold" and workflow step 3's "the right folds"
   now echo it, both landed 2026-08-19, so the metaphor pays off three times
   down the page. That is reinforcement, not redundancy, and it does NOT
   relieve this line: the hero is the only one of the three the crane is
   actually standing beside.)

   IT NO LONGER COMPOSES .lead, AND THAT IS DELIBERATE — the markup carries
   only .folio-hero__lead now. .lead is 1.25rem body-coloured supporting text
   for a line that sits UNDER a headline carrying the argument; this line IS
   the argument, so it needs its own colour, its own snug leading and a size a
   full step above .lead. Composing .lead and then overriding four of its five
   declarations would have left a class in the markup that contributes almost
   nothing while implying a relationship that no longer holds. Everything this
   rule needs is therefore stated here; the base `p` rule (0,0,1) supplies
   nothing that survives.

   font-size is a clamp, one step ABOVE --font-size-lead with the ceiling at
   --font-size-h4:
     min   1.125rem  = 18px    floor; binding at <= 320px
     pref  0.95rem + 0.9vw     18.1px @320, 18.6px @375, 19.1px @430
     max   1.563rem  = 25px   reached at 1089px viewport
   320px NO-OVERFLOW PROOF, copy-dependent, RE-DERIVED 2026-08-19 against the
   live string above and never inherited unchecked: the content box below 760px
   is 288px and the longest unbreakable token is "complicated" at 11 glyphs. At
   the binding 18.1px and an absurd 1em-per-glyph upper bound that is
   11 x 18.1 = 199px < 288px.
   WHY THE 2026-08-19 COPY CHANGE DID NOT MOVE THIS PROOF: the constraint is
   the longest TOKEN, never the sentence length, and "Some" and "Most" are both
   4 glyphs - so the word that changed was never the binding one. Do NOT read
   that as licence to skip the check next time. A one-word swap that happened
   to be harmless is precisely the case that teaches the wrong habit; the check
   is cheap and the failure it prevents (letters clipped off both edges of every
   phone) is invisible on a desktop review. RE-DERIVE ON EVERY REWRITE:
   longest-token-glyph-count x floor-px must stay under 288.
   The lone hyphen in "why - and" is its own token and breaks freely, which is
   one of the reasons the house style forbids em-dashes in visitor-facing copy.

   34ch, NOT 45ch. A short measure is what makes three lines of pitch read as
   a deliberate stanza rather than as a paragraph, and it keeps the line block
   visually narrower than the crane above it. (Written when the crane capped at
   380px; the cap is 760px since 2026-08-19, so the clearance this argument
   depends on only grew — the measure never needed re-tuning, only the number
   in this sentence did.) balance then evens those
   lines out instead of orphaning "clean." on its own. */
.folio-hero__lead {
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.563rem);
  line-height: var(--line-height-snug);
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* THE CTA — "Let’s talk" (typographic apostrophe U+2019, not U+0027 — the
   ASCII straight quote is a visible regression on the page's one strong CTA).
   Composes .btn.btn--primary from the design
   system instead of hand-rolling a hero button. That variant is documented in
   the BUTTONS chunk as "the single strong CTA", one per page, and index.html
   had no primary button at all until this hero shipped (the project card uses
   the quieter .btn--ghost) — so the hero CTA claims that slot exactly as the
   system intends. Reuse buys the accent gradient, the -3px hover lift, the
   press settle, and the 2px --accent / 3px-offset :focus-visible ring for
   free, and guarantees the hero can never drift from /styleguide.

   This rule adds ONLY what the hero context needs on top of the base:

   - min-height 44px. The .btn base measures 12px + 16px line-box + 12px =
     40px, which is under the 44px minimum touch target (WCAG 2.5.5 /
     iOS HIG). It is deliberately NOT fixed on .btn itself: that base is
     shared with eleven styleguide demos and the project-card button, and
     silently resizing all of them is a change nobody asked for and nobody
     would have reviewed. Raising the base to 44px system-wide is a good
     future a11y pass — do it as its own deliberate change, not as a side
     effect of a hero rebuild.
   - padding-inline var(--space-8) = 32px (base is 24px). A lone CTA on a vast
     dark canvas needs more presence than a button tucked inside a card.
   - margin-top var(--space-6), stacking on .folio-hero__copy's 16px gap to
     make the lead→CTA beat 40px — two and a half times the wordmark→lead beat,
     so the eye reads "here is the claim ... and here is the door". Raised from
     var(--space-2) (a 24px beat) on 2026-08-16: once the lead grew into a
     genuine three-line subhead, 24px let the button crowd the last line and
     the two read as one block instead of as claim-then-invitation.
   - tap-highlight suppression, matching .folio-theme-toggle, so a mobile tap
     does not flash a grey rectangle across the accent gradient. */
.folio-hero__cta {
  min-height: 44px;
  padding-inline: var(--space-8);
  margin-top: var(--space-6);
  -webkit-tap-highlight-color: transparent;
}

/* Scroll indicator — a 1px hairline fading downward at the bottom of the
   hero. (The old comment here called it "a subtle animated chevron". There is
   no chevron and no animation; it has been a static gradient rule the whole
   time. Corrected rather than left to mislead the next reader.)

   KEPT, NOT REMOVED, when the hero became exactly one screen (2026-08-14) —
   the alternative was seriously considered. It earns its place MORE now than
   before: the hero used to run 1058px on a 768px laptop, so content was
   visibly sliced by the fold and "there is more below" needed no hint. Now
   the hero ends FLUSH with the fold and nothing peeks under it, which is the
   canonical case where a visitor mistakes the first screen for the whole
   page. A muted hairline is the cheapest possible cure and, unlike a second
   button or a label, does not compete with the CTA for attention.

   COLLISION WITH THE CTA IS STRUCTURALLY IMPOSSIBLE, not merely unlikely.
   This element is absolutely positioned, so it takes no part in the flex
   stack that anchors the copy — left to itself it would sit ON the button
   (before this rebuild it did exactly that: bottom: 32px + 40px of line
   reached up to y=696 while the CTA ended at y=704). Instead .folio-hero
   reserves --_hero-scroll-lane — this element's offset from the bottom edge
   PLUS its own length — inside its bottom padding, so the CTA's bottom edge
   always stops at least var(--space-6) = 24px above the top of the hairline.
   Both numbers derive from the same custom property, so retuning the line
   retunes the reservation and they cannot drift apart.
   At 1366x768: CTA bottom y=672, hairline y=696..736. */
.folio-hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

/* The hairline is drawn from currentColor, so lifting the link's colour on
   hover lifts the gradient with it — one declaration, and the affordance is
   that the whole indicator responds rather than an invisible hit area. */
.folio-hero__scroll:hover {
  color: var(--text-secondary);
}

.folio-hero__scroll-line {
  width: 1px;
  /* Declared once on .folio-hero and read back here, so the reserved lane and
     the drawn line can never disagree. Retuned to 24px at <=480px. */
  height: var(--_hero-scroll-line);
  background: linear-gradient(
    180deg,
    var(--text-muted) 0%,
    transparent 100%
  );
}

/* ---- Page content wrapper ------------------------------------------------
   Max-width container for sections below the hero. Centers content and
   provides horizontal padding.

   THE WIDTH STOPPED BEING THIS PAGE'S ALONE ON 2026-08-19, and that is why it
   now reads from a token instead of stating 900px. Captain ruled that every
   served page of the site presents the SAME content area, so this value is
   --site-content-width in tokens.css §design-tokens and .folio-impressum plus
   .folio-notfound resolve the identical one. The gutter below is half of that
   agreement: matching the outer edge while the gutters differ would still
   leave the content boxes apart, so all three pair this token with
   var(--space-8) here and var(--space-4) in the 760px tier.
   RETUNE AT THE TOKEN, NEVER HERE. A literal restored to this rule wins for /
   and silently leaves the other three pages behind at the old number, which is
   exactly the drift that produced the visibly narrower legal pages the token
   was minted to end. */
.folio-main {
  max-width: var(--site-content-width);
  margin: 0 auto;
  padding: 0 var(--space-8);

  /* THE WALL-DISTANCE RIGHT EDGE FOR THE WHOLE PAGE, DECLARED EXACTLY ONCE
     (2026-08-16). Every elevated block below the hero — the three workflow
     steps and the case block — is a .wall-stage whose object is inset from the
     stage's right edge by this much, so the SOLID part of its shadow lands
     inside the container instead of out in the page gutter.
     Declaring it here rather than per-block is what makes all four blocks share
     ONE right edge; four local copies would be four values to keep in step,
     which is exactly the drift the design system exists to prevent.
     *** THE FAMILY WENT FROM FIVE TO FOUR ON 2026-08-19 EVENING. *** The
     contact panel was the fifth, and Captain's ruling retired it: that section
     is a full-bleed colour band now (.folio-section.contact__band below) and
     casts no wall shadow at all. THIS PROPERTY'S VALUE DID NOT MOVE AND MUST
     NOT - only its readership shrank, and 44px is still the medium tier's
     offset + size-delta for the four stages that remain. A note anywhere in
     this file still counting five predates that ruling.
     44px = the MEDIUM tier's offset (16) + size-delta (28), because medium is
     the tier every block on this page uses. This number and the page's tier
     choice are NOT independent — change one and you must change the other. */
  --wall-fluid-reserve: 44px;
}

/* ---- Section rhythm ------------------------------------------------------
   Each content section gets generous vertical spacing. space-24 (96px)
   between sections creates the "calm confidence" the brief asks for. */
.folio-section {
  padding: var(--space-24) 0;

  /* *** LOAD-BEARING. DO NOT DELETE OR RETUNE WITHOUT READING THIS. ***
     This is the single source of truth for "where does section N start", and it
     has TWO consumers that must never be allowed to disagree:

       1. THE BROWSER, for every in-page anchor. #how, #work and #contact are
          all reached by clicking a nav link or the hero CTA, so without this
          offset each target would land underneath the ~61px fixed bar.
       2. nav.js, for the WORDMARK REVEAL THRESHOLD. It measures the reveal
          point off the element the #how anchor resolves to and then SUBTRACTS
          that element's own computed scrollMarginTop — the same quantity the
          browser subtracts when it performs the anchor jump. That is what makes
          "click Workflow" and "scroll there by hand" cross the identical y.

     So retuning 84px here silently MOVES THE POINT AT WHICH THE BRAND WORDMARK
     APPEARS in the nav, and deleting it moves the reveal AND drops every anchor
     under the bar. There is deliberately no second number in nav.js to keep in
     sync — the script reads this computed value back rather than carrying its
     own copy — which means this declaration is the only place the offset exists
     and there is nothing in the JavaScript to point at when it goes wrong.
     84px = the bar's height plus a little air, chosen so a section's eyebrow
     clears the hairline rather than touching it. */
  scroll-margin-top: 84px;
}

/* ---- Section header pattern ----------------------------------------------
   Eyebrow + H2, applied IDENTICALLY by sections 2, 3 and 4. The consistency is
   doing real work: three sections that open the same way read as one document,
   so the visitor never has to re-learn the hierarchy at a scroll stop. If a
   fourth section is added, it opens this way too — the pattern is the rule, not
   a coincidence of three.

   *** THE TWO SLOTS TRADED CONTENT ON 2026-08-19 (Captain's ruling), AND THIS
   CSS DID NOT MOVE AT ALL. *** The short section NAME is now the H2 and the
   phrase is now the EYEBROW, in all three:
                   eyebrow (as it PAINTS)      h2
     section 2     THE WAY WE FOLD.            Workflow
     section 3     ONE SHEET. INFINITE SHAPES. Successful Project
     section 4     SEND US A PAPER PLANE.      Contact
   A MARKUP-ONLY change: the elements, their order and both roles are untouched,
   which is precisely why only the overflow proof below had to be redone. The
   eyebrow column is written in caps here because that is how it PAINTS
   (.caption sets text-transform: uppercase), NOT because the source says so —
   the source is sentence case with a trailing period on each. Do not "correct"
   either end of that mismatch; it is the role doing its job.

   THE EYEBROWS NOW CARRY MUCH LONGER STRINGS than the one-word labels they used
   to hold, and that is safe by a wide margin, which is why no eyebrow proof is
   written here: at .caption's 12px the longest token now sitting in an overline
   is "Infinite" (8 glyphs, ~96px at a pessimistic 1em per glyph) against the
   same 288px content box the H2 proof uses. The threshold to watch is roughly
   20 glyphs in a single overline word, allowing for the wide tracking. Nothing
   is close.

   The eyebrow composes the design system's .caption role (12px, uppercase,
   wide tracking, --text-muted) and this rule adds block display, the gap AND
   THE COLOUR; the H2 composes the h2 role and this rule adds the measure.
   RETUNING .caption TO SUIT THESE THREE OVERLINES WOULD BE A MISTAKE - it is
   shared with the case stat labels and the footer, so fixing three lines would
   silently move all of them. THAT IS PRECISELY WHY THE COLOUR BELOW IS DECLARED
   HERE, ON THE EYEBROW CLASS, AND NOT ON .caption.

   *** THE OVERLINES ARE BLUE SINCE 2026-08-20 (Captain's ruling: a highlighted
   blue from the existing tokens, for more dynamics), AND ALL THREE ARE BLUE,
   THE ONE ON THE CONTACT BAND INCLUDED. *** --accent-secondary is the palette's
   only blue: the far end of the brand's mint-to-blue --accent-gradient and the
   crane's hue neighbourhood, so this borrows a value the identity already owns
   instead of minting a token. Do NOT mint one. A fourth accent would need
   theming twice and would sit outside the gradient the whole brand is built on.

   THIS SINGLE RULE PAINTS ALL THREE OVERLINES, AND THAT IS THE POINT. A scoped
   `.contact__band .folio-section__eyebrow` override lived below from 2026-08-19
   until 2026-08-20 and was REMOVED by this change rather than restated in blue;
   its history and the contrast trade it made are recorded in full at the band
   rule. Re-adding any per-section eyebrow colour re-opens the exact sibling
   inconsistency this ruling closed: three overlines that read as one family must
   never paint in two colours.

   IT BEATS .caption BY SOURCE ORDER, NOT BY WEIGHT, AND THAT IS LOAD-BEARING.
   Both selectors are single classes at (0,1,0), so the cascade is settled purely
   by position: .caption is declared in tokens.css §base-reset-typography and
   this chunk (§portfolio-layout) is generated after it into the same stylesheet.
   There is no @layer, no @scope and no !important anywhere in this file, so
   nothing can reorder them. REORDER THE CHUNKS SO §portfolio-layout PRECEDES THE
   TYPOGRAPHY CHUNK AND ALL THREE OVERLINES SILENTLY GO GREY - no error, no
   warning, nothing in either rule to point at.

   CONTRAST, COMPUTED RATHER THAN ESTIMATED (WCAG 2.x relative luminance, both
   themes). --accent-secondary is hsl(195,45%,50%) dark / hsl(195,55%,42%) light.
     on the page background (--bg-deep) - sections 2 and 3:
       --accent-secondary   5.68:1 dark   3.64:1 light   (now)
       --text-muted         2.71:1 dark   3.21:1 light   (was)
     on the contact band (--bg-surface) - section 4:
       --accent-secondary   5.11:1 dark   3.79:1 light   (now)
       --text-secondary     5.00:1 dark   6.24:1 light   (was, the 08-19 fix)
   THREE OF THE FOUR CELLS IMPROVE, and dark mode clears the 4.5:1 AA bar on all
   three overlines for the first time. THE ONE REGRESSION IS THE BAND IN LIGHT
   MODE, 6.24:1 -> 3.79:1, back under AA. It still clears the 3.34:1 that
   --text-muted measured there before the 08-19 fix, and it edges the 3.64:1 its
   two siblings sit at on the page background, so the band is no longer the
   weakest overline on the page. Captain took the aesthetic call with these
   numbers in hand; the trade is written up at the band rule. */
.folio-section__eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--accent-secondary);
}

.folio-section__title {
  margin-bottom: var(--space-8);

  /* H2s sit above the ~2rem display threshold, so they are clamp-scoped AT THE
     RULE rather than by retuning --font-size-h2 — that token is shared with
     every h2 and .h2 on the site, and shrinking it to fix three landing-page
     headings would silently move the styleguide and the Impressum with it
     (knowledge fc30de10).
       min   1.75rem   = 28px   floor; binding at <= 320px
       pref  1.3rem + 2.2vw     27.8px @320, 29.1px @375, 30.3px @430
       max   2.441rem  = 39px   reached at 872px viewport
     320px NO-OVERFLOW PROOF, RE-DERIVED 2026-08-19 — THE SECOND TIME THAT DAY —
     for the live headings after Captain's HEADER-ROLE SWAP: "Workflow",
     "Successful Project", "Contact". All three h2s changed in that swap. The
     phrases that used to sit here moved up into the eyebrows and the short
     section names came down into the h2s; the full mapping is in the
     section-header pattern comment above.
     SECTION 3'S H2 SHIPPED AS THE PLURAL "Successful Projects" for a few hours
     that day; Captain then ruled the SINGULAR, so the noun agrees with the nav
     link label "Project". THE PROOF WAS RE-CHECKED AGAINST THAT CHANGE AND DID
     NOT MOVE, because only the shorter word lost a letter.
     The content box below 760px is 288px, and the longest unbreakable token
     across all three is now "Successful" at 10 glyphs ("Workflow" 8,
     "Project" 7, "Contact" 7). At the 28px clamp floor and an absurd
     1em-per-glyph upper bound that is 10 x 28 = 280px < 288px.

     *** EIGHT PIXELS OF SLACK — THE TIGHTEST THIS PROOF HAS EVER BEEN. *** The
     heading set before this one left 64px and the one before that 120px, so the
     margin is now essentially spent: an ELEVEN-glyph token in ANY of the three
     h2s overflows (11 x 28 = 308 > 288) and there is nothing left to absorb it.
     BE PRECISE ABOUT WHAT THOSE 8px MEAN, because the number invites both panic
     and dismissal and neither is right. The 1em-per-glyph bound is DELIBERATELY
     ABSURD: no Latin glyph reaches it, Space Grotesk lowercase advances run
     ~0.4-0.6em and capitals ~0.7em, so "Successful" really paints nearer 170px
     than 280px and the true clearance is comfortable. The 8px is slack on the
     PESSIMISTIC bound — the bound this proof has always used, and the reason it
     has never once been wrong. Keep using it. Do NOT "recover" headroom by
     switching to measured metrics: the entire value of the pessimistic bound is
     that it can be re-derived by anyone, in their head, without opening a font
     file or a browser.
     RE-DERIVE THIS on any H2 rewrite. The binding constraint is the longest
     TOKEN, never the heading's total length, and the proof covers all three
     headings JOINTLY — so a change to ONE h2 can invalidate it, and at 8px of
     slack it very likely will.
     text-wrap: balance IS NOW NEARLY INERT, AND IS KEPT DELIBERATELY. Its old
     justification read "these headings are 3 to 4 words, exactly the case it
     helps" — true of the PHRASES that lived here before the 2026-08-19
     header-role swap, false of the NAMES that replaced them. "Workflow" and
     "Contact" are single tokens with nothing to balance, and balance can only
     ever act on MULTIPLE lines (the same reasoning that removed it from
     .folio-hero__brand when the h1 became one word). It stays for the one case
     that survives: "Successful Project" can wrap to two lines on a narrow
     phone, and balance is what stops that wrap orphaning "Project" alone on
     the second. Deleting it would be harmless today and wrong again the moment
     a multi-word heading returns, so keeping it costs less than re-reasoning
     about it later. */
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.441rem);
  text-wrap: balance;
}

/* =============================================================================
   SECTION 2 — HOW WE WORK (the numeral rail)
   -----------------------------------------------------------------------------
   NAMESPACE NOTE, recorded once for the three component blocks below: .how__*,
   .case* and .contact__* are page components and by this file's own convention
   would be .folio-*-prefixed like everything else here. They are unprefixed
   because these exact class names are the agreed contract with the template
   that renders them, transcribed verbatim from the approved design. Worth a
   consolidation pass later — `.case` in particular is a generic name living in
   a stylesheet five templates share — but renaming them is a coordinated
   template+CSS change, never a unilateral CSS one.

   Three stacked prose blocks read as a wall of text with no rhythm. The numeral
   rail gives the section the structure its copy already implies WITHOUT turning
   it into a generic Discover-Design-Build-Deploy diagram: 01/02/03 is a quiet
   left-hand index, not four labelled boxes. Captain rejected the four-box
   treatment explicitly — it turns a distinctive offer into an ordinary one.
   THIS PARAGRAPH USED TO QUOTE THE STEP COPY, as "First we..." and "Then you
   decide" — the two phrases that made the sequence merely IMPLIED. Captain's
   2026-08-19 text pass retired both: the three step titles are now IMPERATIVES,
   "Get in contact." / "Receive your plan." / "Decide your future.", so the
   sequence is stated outright rather than inferred. The rail's job is unchanged
   and if anything easier, since it now numbers three verbs instead of ordering
   three descriptions. NOTHING IN THE CSS BELOW MOVED FOR THAT REWRITE, and
   that is the point worth keeping: the rail is content-agnostic (auto 1fr
   columns sized by the numeral, not by the heading), which is exactly why a
   full copy replacement could land above it without touching one declaration.

   STACKED, NOT A 3-UP GRID. Three reasons, each load-bearing: a 270px column
   would set a 60-word paragraph as ten thin lines; a vertical run reads as a
   SEQUENCE where a row reads as a menu of alternatives; and each block needs
   room around it for its wall shadow to breathe.

   ALL THREE STEPS SHARE ONE ELEVATION TIER — MEDIUM. An earlier draft expressed
   the sequence as increasing wall distance (close -> medium -> far, each step
   physically further off the wall). Captain killed it: across SIBLING blocks a
   varying shadow reads as an inconsistency rather than as a progression, and
   the eye spends its attention deciding whether the difference is meaningful
   instead of reading the copy. The sequence is already asserted by the numerals
   and by a third step that literally opens with "Then".
   DO NOT REINTRODUCE VARIATION BETWEEN SIBLING BLOCKS. The case block is on
   medium for the same reason, so all four blocks below the hero sit at one
   consistent distance from the wall.
   IT READ FIVE UNTIL 2026-08-19 EVENING, and the fifth was the contact panel.
   Captain retired that panel outright in favour of a full-bleed colour band
   which casts no shadow at all, so the count moved and the RULE did not: every
   surviving sibling still sits at one distance, and a sixth block added later
   joins them at medium.
   ============================================================================ */
.how__steps {
  display: flex;
  flex-direction: column;
  /* 96px, comfortably clear of the medium tier's 44px bottom overhang, so one
     step's shadow never lands on the block below it. */
  gap: var(--space-24);
}

.how__body {
  padding: var(--space-12);
  /* auto 1fr, not a fixed rail width: the numeral column is exactly as wide as
     "01" renders at the current clamp, so retuning the numeral size can never
     leave a mis-sized gutter behind. */
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: start;
}

.how__num {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.441rem);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--accent);
  /* tabular-nums keeps 01/02/03 identically wide, so all three headings start
     on the same x even though the glyphs differ. Proportional figures would
     shift each heading a pixel or two and the rail would stop reading as one. */
  font-variant-numeric: tabular-nums;
  /* Optical alignment: line-height 1 puts the numeral's cap top flush with its
     box top, while the heading's caps sit lower inside their own leading. This
     nudge lands the two cap-heights on one line. em-based, so it tracks the
     clamp instead of drifting as the numeral scales. */
  padding-top: 0.12em;
}

.how__title {
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

/* 58ch, not the global 65ch. Beside a numeral rail the text column already
   starts ~80px in, so the same measure would run the paragraph closer to the
   block's right edge than the heading above it, and the ragged edge would stop
   looking deliberate. */
.how__text {
  max-width: 58ch;
}

/* =============================================================================
   SECTION 3 — THE WORK (the case block)
   -----------------------------------------------------------------------------
   NOT A CARD IN A GRID, AND THIS IS THE SECTION'S KEY LAYOUT DECISION. One card
   sitting in a grid reads as two MISSING cards. A full-width case treatment
   makes a single project read as CHOSEN rather than as all there was. The
   layout accepts a second case by stacking the same block, and can become a
   grid at three — but until then, one at full width looks deliberate.
   That is why .folio-projects__grid is deliberately not used here.
   ============================================================================ */
.case {
  padding: var(--space-12);
}

.case__title {
  /* Clamp-scoped, and the proof is CHECKED AGAINST THE LIVE TITLE, which reads
     "Workshop Assignment Tool" since Captain's 2026-08-19 text pass (it was
     "Workshop Assignment"). THE ADDED WORD DID NOT MOVE THE ARITHMETIC, and
     saying so beats leaving the next agent to re-derive it: the binding
     constraint is the longest unbreakable TOKEN, never the string length, and
     "Assignment" at 10 glyphs still beats "Workshop" (8) and "Tool" (4).
     WHY THE CLAMP EXISTS AT ALL: at the flat --font-size-h3 token, 10 x 31.25px
     = 312px > the 288px content box at 320px, so the plain h3 role overflows a
     small phone on this title alone. The 24px floor gives 10 x 24 = 240px <
     288px.
     RE-DERIVE if a future case title introduces a longer token. Against the
     24px floor the failure line is THIRTEEN glyphs: twelve is exactly flush
     (12 x 24 = 288, zero slack) and thirteen overflows (13 x 24 = 312 > 288). */
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 1.953rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: var(--line-height-snug);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.case__rule {
  height: 1px;
  background: var(--surface-inner-edge);
  margin: var(--space-8) 0;
}

.case__stats {
  display: grid;
  /* THE MIDDLE COLUMN IS 1.4fr ON PURPOSE. The outer two cells hold numerals
     ("400", "1 year"); the middle one holds "hours -> seconds", a PHRASE among
     numerals. Equal columns force one of two bad outcomes: a wrap in the middle
     of that phrase, which destroys the before/after reading that makes it the
     single most repeatable fact on the page, or a shrink of the numerals to
     accommodate it. The extra track buys the phrase its own line and leaves the
     numerals alone. */
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: var(--space-8);
}

.case__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.case__stat-value {
  /* Clamped so "seconds" (7 glyphs) fits the 288px box at its 24px floor:
     7 x 24 = 168px < 288px. */
  font-size: clamp(1.5rem, 1.1rem + 2vw, 1.953rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

/* Accent-coloured and NOT bold, so the arrow reads as a connector between two
   states rather than as a third value competing with them. */
.case__stat-arrow {
  color: var(--accent);
  font-weight: var(--font-weight-regular);
}

/* SENTENCE CASE, NOT the uppercase .caption role — a content decision wearing
   CSS clothes. "1 year" + "of ongoing work" has to read as ONE continuous
   phrase meaning ONGOING, i.e. that Noxarc was still there a year later, which
   is a trust signal. Caps and wide tracking would sever the value from its
   label and let the pair read as "took a year", which is a duration and says
   something else entirely. */
.case__stat-label {
  font-size: var(--font-size-small);
  line-height: var(--line-height-snug);
  color: var(--text-secondary);
  max-width: 22ch;
}

/* THE BLOCK IS FULL-WIDTH; THE PROSE IS NOT. The gap between the container's
   edge and the text's measure is precisely what makes this read as a case study
   rather than as a very wide card. Do not stretch the narrative to the block. */
.case__narrative {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 58ch;
}

.case__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--surface-inner-edge);
}

/* Stack and repo are DEMOTED to a plain footer line — deliberately NOT .badge
   chips, which would re-elevate them into the pitch. Naming the technique in
   the pitch actively repels the buyer, who does not know the words; these two
   exist as reassurance for the one technical person who may be asked to look. */
.case__stack {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.case__repo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-small);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.case__repo:hover {
  color: var(--accent);
}

.case__repo svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* =============================================================================
   SECTION 4 — CONTACT (the conversion surface, and the one section that breaks
   the page's rhythm on purpose)
   -----------------------------------------------------------------------------
   *** THIS SECTION STOPPED BEING AN ELEVATED BLOCK ON 2026-08-19 EVENING. ***
   Captain's ruling retired the .wall-stage rig and the .contact__panel that
   stood on it. The invitation line, the two channels and the reply promise are
   ordinary in-flow section content now, and the section announces itself with a
   FULL-VIEWPORT-WIDTH BACKGROUND COLOUR instead of with elevation.
   FIVE RULINGS LANDED TOGETHER and each is implemented and reasoned at its own
   rule below: (1) the invitation sits above the channels, (2) no raised box,
   (3) the full-bleed band, (4) icon-only channels equal at rest, (5) one shared
   typographic format for the two text lines.

   WHAT WAS DELETED IN THE SAME PASS, each one verified index.html-only with
   css_lens BEFORE deleting (the same check that retired .contact__email and
   `.contact__direct .small` earlier the same day): .contact__panel and its
   760px counterpart in §responsive, .contact__direct, .contact__channel-icon
   plus its svg rule, .contact__channel-label, both .contact__channel--mail
   colour rules, .contact__channel--mail:hover's accent halo, the chip's
   lift-and-settle transforms, the 760px .contact__channels stacking override,
   and the prefers-reduced-motion block that existed ONLY to neutralise those
   transforms. Deleted rather than parked: this file already carries one
   graveyard of orphaned rules further down, and a second one starts a habit.
   THE CLASS VOCABULARY THAT SURVIVED did so because the NAMES still describe
   what the elements are - .contact__channels is still a row of channels and
   .contact__channel is still one channel; only their rendering changed, from
   raised chip to icon-only mark. Renaming them would have cost every note and
   memory that cites them for no gain.
   ============================================================================ */

/* THE BAND - a 100vw colour change reached from INSIDE a 900px container, which
   is the only genuinely non-obvious rule in this block. Read the whole comment
   before touching either declaration; they are one decision in two halves and
   changing one alone shifts the entire section's content off the page grid.

   THE TECHNIQUE. This section is a child of .folio-main (max-width:
   var(--site-content-width), margin: 0 auto, padding: 0 var(--space-8)), so by
   ordinary means it can never be wider than that container. Two paired
   declarations solve it without touching the template's container nesting:
     margin-inline:  calc(50% - 50vw)   pushes both edges out to the viewport
     padding-inline: calc(50vw - 50%)   brings the CONTENT back where it was
   BOTH PERCENTAGES RESOLVE AGAINST THE SAME QUANTITY - the containing block's
   inline size, i.e. .folio-main's content-box width W - so they are exact
   mirror images and cancel to the pixel.
   THE PROOF, written out because "roughly aligned" would be a visible defect on
   a page whose other four blocks share one grid. Centring a W-wide box in the
   viewport puts its content-box left edge at x = 50vw - W/2. The negative
   margin is exactly -(50vw - W/2), so the band's left edge lands on x = 0 and
   its used width resolves to W + 2(50vw - W/2) = 100vw. The padding then
   re-inserts that identical (50vw - W/2), so every child starts on the same x
   it started on before this rule existed. *** ZERO CONTENT SHIFT IS A
   CONSEQUENCE OF THE ARITHMETIC, NOT A TUNING. ***

   IT IS SELF-TUNING ACROSS THE BREAKPOINTS, which is why §responsive carries no
   counterpart for it and must not grow one. The expression names a RELATIONSHIP
   rather than a number, so when .folio-main's gutter drops from 32px to 16px at
   the 760px tier, (50vw - W/2) follows it down by itself. Resolved value: 32px
   at every viewport up to 900px, 16px at and below 760px, and growing with the
   centring slack above 900px. Checked at 320, 375, 760, 900 and 1440.

   *** THE SELECTOR IS COMPOUND ON PURPOSE - .folio-section.contact__band AT
       (0,2,0) - AND DEMOTING IT TO A BARE .contact__band SILENTLY BREAKS THE
       BAND BELOW 760px. *** tokens.css §responsive restates `.folio-section {
   padding: var(--space-16) 0 }` inside the 760px query, which sets the inline
   padding back to ZERO at (0,1,0). A media query adds no specificity and that
   chunk sits LATER in the generated file, so a (0,1,0) rule here would lose to
   it on source order and the band's content would jump flush against both
   screen edges on every phone. The compound outranks it at every width instead,
   which is ONE rule rather than a duplicate of this expression in the tier.
   padding-INLINE and not the shorthand, for the mirror-image reason: the
   section's vertical rhythm belongs to .folio-section at both tiers (96px, and
   64px below 760px) and must keep flowing through untouched. Inline sides here,
   block sides there, no overlap and nothing to keep in step.

   NO HORIZONTAL SCROLLBAR, AND THE GUARD IS ALREADY IN THE FILE: html and body
   both carry overflow-x: clip in §base-reset-typography. That matters because
   `vw` INCLUDES the classic scrollbar's width, so on a platform that reserves
   one the band overshoots by roughly 7-8px per side. Overshoot is the harmless
   direction - the band still reaches both edges and the excess is clipped -
   while undershoot would leave a visible stripe of page colour down one side.
   Do NOT "fix" it with 100% or with a container query: both undershoot.

   THE COLOUR IS --bg-surface, one step up the SAME background ramp the page
   already uses, so it themes itself and needed no new custom property and no
   [data-theme] edit:
     dark    band #1E2229 on page #16181D    light   band #F9F8F5 on page #F6F4EE
   WHY THE HAIRLINES ARE NOT DECORATION. The light ramp is compressed near white
   by design (deep 95%, surface 97%, raised 99%), so the band-versus-page step is
   4.8 L* in dark but only 1.6 L* in light - visible, but not enough on its own
   to read as a deliberate rhythm break, which is the whole point of the ruling.
   border-block restores that reading in BOTH themes using the design system's
   own edge token, the same one .folio-footer's hairline and .case__rule use. It
   is an EDGE, not material: no gradient, no shadow, no radius, because
   --surface-top-gradient would re-introduce exactly the panel this ruling
   removed and the band would read as a very wide card.

   CONTRAST ON THE BAND, MEASURED (WCAG 2.1 relative luminance), dark / light:
     --text-primary   (sub-line, promise, both marks at rest)  12.0:1 / 14.2:1
     --text-secondary (the overline, see its own rule below)    5.0:1 /  6.2:1
     --accent         (marks on hover and on focus)             6.6:1 /  3.4:1
   The accent figure is the only one under 4.5 and it is measured against the
   right bar: a 24px icon is a non-text graphical object, where AA asks 3:1
   (SC 1.4.11), and it is a HOVER state whose resting state carries 12:1 or
   better. IF A LATER PASS WANTS MORE THERE, --accent-glow is the lever and the
   arithmetic is already done: 9.0:1 dark / 4.9:1 light, clearing even the text
   bar. It was not taken here for two reasons - Captain's ruling names --accent,
   and the focus RING is drawn in --accent, so mark and ring agree at the moment
   of focus rather than showing two greens.

   NOTHING ABOVE THE BAND NEEDS CLEARANCE: the case block's wall shadow overhangs
   its object by 44px at the medium tier and sits inside that section's own 96px
   bottom padding, so it can never land on this band's top edge. */
.folio-section.contact__band {
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  background-color: var(--bg-surface);
  border-block: 1px solid var(--surface-inner-edge);
}

/* THE BAND CARRIES NO OVERLINE OVERRIDE ANY MORE, AND THIS BLOCK IS THE RECORD
   OF THE ONE THAT STOOD HERE. From 2026-08-19 until 2026-08-20 this position
   held
     .contact__band .folio-section__eyebrow { color: var(--text-secondary) }
   at (0,2,0), and it was an ACCESSIBILITY fix rather than a taste one. The
   overline composed .caption, which paints --text-muted, and on this band that
   measured 2.44:1 dark / 3.34:1 light, both under the 4.5:1 AA bar for text,
   while Captain's ruling required everything on the band to be readable.
   --text-secondary bought 5.00:1 dark / 6.24:1 light. The shortfall was never
   the band's doing: --text-muted was already only 2.71:1 dark / 3.21:1 light on
   the page background, and the band merely made a site-wide condition worse.

   *** SUPERSEDED 2026-08-20 BY THE SITE-WIDE BLUE-EYEBROW RULING (Captain). ***
   All three section overlines now paint --accent-secondary from the single
   .folio-section__eyebrow rule up in the section-header block, so the readability
   this override existed to deliver is delivered site-wide instead of locally.
   IT WAS REMOVED RATHER THAN RESTATED IN BLUE, and that was deliberate: a scoped
   rule repeating the value its own base rule already sets is a second place to
   forget, and the next colour change would silently split the family in two
   again. DO NOT RE-ADD IT IN ANY FORM - not with the blue, not with a "more
   readable" grey. The three overlines are one family and paint in one colour.

   WHAT THE REMOVAL COSTS, STATED PLAINLY BECAUSE IT IS NOT FREE.
   --accent-secondary on this band (--bg-surface) measures 5.11:1 dark and
   3.79:1 light, so against the rule this block replaces:
     dark    5.00:1 -> 5.11:1   marginally BETTER than the fix it supersedes
     light   6.24:1 -> 3.79:1   a real regression, back under the 4.5:1 AA bar
   THE LIGHT NUMBER IS THE ONE TO KNOW ABOUT. It still clears the 3.34:1 this
   overline measured here before the 08-19 fix, and it edges the 3.64:1 its two
   siblings sit at on the page background, so the 08-19 finding that the band is
   the worst place on the page for this element NO LONGER HOLDS - the band is now
   the best of the three. But it sits below what that fix bought, and rounding
   that away is exactly the quiet drift this file exists to prevent.
   NO CHEAPER FIX IS AVAILABLE. --accent-secondary is the palette's only blue, so
   a darker one means minting a token (Captain ruled against that) and a readable
   grey means re-splitting the family. Captain took the aesthetic call on
   2026-08-20 with these numbers in front of him.
   EVERY RATIO ABOVE WAS RE-DERIVED FROM THE HSL TOKENS ON 2026-08-20 and
   reproduces the figures recorded here on 08-19 exactly (2.4 / 3.3 / 2.7 / 5.0),
   which is why the four-cell table at the .folio-section__eyebrow rule above -
   both backgrounds, both themes - can be trusted without re-deriving it. */

/* THE TWO TEXT LINES SHARE ONE FORMAT, BY RULING (Captain, 2026-08-19 evening,
   ruling 5), AND THE SHARED SELECTOR IS THE MECHANISM rather than a tidiness
   choice. Declared together, the invitation and the reply promise CANNOT drift
   apart in a later edit the way two parallel rules silently would. If either
   ever needs a different size, colour or weight, both move or the ruling is
   broken - so a future agent who wants to change one has to decide about both,
   which is exactly the friction this shape is buying.

   WHAT EACH DECLARATION IS DOING.
     font-size    --font-size-lead (20px). The invitation was already at lead;
                  the promise came up from body. Captain's word was "well
                  readable", and one size for both is what makes them read as
                  one voice speaking twice rather than as a headline plus fine
                  print.
     colour       --text-primary, measured on the band at 12.0:1 dark and
                  14.2:1 light. The invitation came up from --text-secondary
                  (5.0:1) and the promise was already primary.
     weight       --font-weight-medium (500) for both. NOT semibold: at 20px on
                  a band, semibold starts competing with the h2 above it, and
                  these are sentences meant to be read rather than scanned.
     measure      48ch. Sized so the INVITATION one-lines on desktop and the
                  PROMISE wraps to two balanced lines - it is the longer of the
                  two at 66 characters against the invitation's 47, and in
                  Space Grotesk prose runs about 0.5em per glyph against a ch of
                  roughly 0.6em, so 47 characters need about 39ch and 66 need
                  about 55ch. Cap below ~40ch and the invitation starts wrapping
                  too; above ~56ch the promise stops wrapping and the pair loses
                  its shape. This also overrides the element-level `p` rule's
                  global 65ch, deliberately - a band is wider than a column and
                  would otherwise run both lines long.
     text-wrap    balance, which is inert on the one-line invitation and does
                  the real work on the promise's two lines, stopping the second
                  from orphaning a word.

   320px NO-OVERFLOW PROOF: at that width the content box is 288px and the cap
   does not bind at all, so the binding constraint is the longest unbreakable
   TOKEN, as everywhere else in this file. The longest token across BOTH lines
   is 7 glyphs ("message", "usually"); at the flat 20px size and this file's
   deliberately pessimistic 1em-per-glyph bound that is 7 x 20 = 140px against
   288px. Roughly 14 glyphs is where a future rewrite would start to bind, so
   there is a lot of room - unlike the display-sized rules on this page. */
.contact__sub,
.contact__promise {
  font-size: var(--font-size-lead);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-body);
  color: var(--text-primary);
  max-width: 48ch;
  text-wrap: balance;
}

/* SPACING IS NOT PART OF THE SHARED FORMAT and is stated per line, because the
   two sit in different places in the stack: the invitation belongs to the
   heading block above it, the promise answers the marks above IT. Ruling 5 is
   about TYPE, so splitting the margins here does not weaken it.
   THE NEGATIVE TOP MARGIN pulls the invitation up against the H2's own
   margin-bottom so it reads as part of the heading block rather than as a
   loose third line. calc() off the same spacing token the H2 uses, so retuning
   the section header keeps the two in step.
   THE BOTTOM MARGIN IS 32px AND NOT THE 48px IT USED TO BE: the marks below are
   centred in a 44px box, so they carry 10px of their own air at the top. 32 +
   10 reads as the same 44px optical gap the promise gets from the other side,
   which is what makes the icon row sit evenly between the two lines rather
   than crowding one of them. */
.contact__sub {
  margin: calc(-1 * var(--space-4)) 0 var(--space-8);
}

/* The mirror of the invitation's bottom margin: 32px plus the marks' own 10px
   of bottom air is the same 44px optical gap. Zero bottom, because
   .folio-section's own 96px padding owns the distance to the band's edge. */
.contact__promise {
  margin: var(--space-8) 0 0;
}

/* THE PANEL AND ITS CONTENT WRAPPER WERE DELETED HERE ON 2026-08-19 EVENING.
   Their history lives in this one note so the absence reads as a decision
   rather than as something lost in an edit.
   WHAT WENT: `.contact__panel { padding: var(--space-12) }` together with its
   var(--space-8) counterpart in the 760px tier, and `.contact__direct {
   display: flex; flex-direction: column; gap: var(--space-4) }`. Both were
   consumed by index.html and by nothing else corpus-wide - checked with
   css_lens BEFORE deleting, which is this file's standing condition for
   removing a rule rather than parking it.
   WHY THEY COULD GO CLEANLY, stated as the argument rather than as the outcome.
   The panel existed to make the conversion point a distinct, TANGIBLE OBJECT so
   the last section read as a peer of the workflow steps rather than as a line
   of text floating loose at the end of the page. The band above does that same
   job with COLOUR instead of elevation, and does it at full viewport width
   rather than at container width - which is a stronger version of the same
   intent, not an abandonment of it. The flex column existed only to space the
   panel's children; .contact__sub, .contact__channels and .contact__promise
   each carry their own margin now, which is exactly why those margins are
   stated and reasoned above instead of being inherited from a wrapper.
   A NARROWER CONTENT COLUMN WAS TRIED AND REJECTED back when the panel was
   built, on the grounds that it made the last section look like a different
   page. THAT DECISION SURVIVES THE REDESIGN and is now carried by the band's
   padding-inline, which puts this section's content on exactly the same grid
   as .case and the workflow steps.
   THE FORM HISTORY, PRESERVED because it is the reason a form cannot simply be
   dropped back in: a three-field form stood in that panel from 2026-08-16, was
   disabled on 2026-08-17 (no POST handler ever existed), and was REMOVED
   outright on 2026-08-19 along with the .contact__panel--form-inactive state
   and the form-only rules .contact__form/__fields/__fieldset/__notice/__submit.
   The state went because a state modifier with exactly one permanent value is
   just indirection. A returning form comes back through the full gate set in
   knowledge 37d649e4, with fresh CSS against the design-system
   .field/.input/.textarea primitives, which are alive in the design-system
   chunk for /styleguide.
   `.contact__direct .small` DIED EARLIER THE SAME DAY, with the guidance
   lead-in it styled. THE BASE `.small` ROLE IS UNTOUCHED and still consumed by
   /styleguide, lab.html and typography-preview.html - only the scoped override
   went. If a guidance line ever returns to this section it inherits plain
   .small, and whether to promote it again is a fresh decision rather than an
   inherited one. */

/* ---- THE TWO CHANNELS ----------------------------------------------------
   Replaced the bare .contact__email text link on 2026-08-19 (Captain: the panel
   should read CLEAN and INTERACTIVE, with a small logo per channel). Two chips:
   MAIL, whose label IS the statutory address, and GITHUB, an org-level presence
   link. Both are raised soft-3D objects that lift on hover and settle on press,
   which is the interactive grammar .btn and .surface--interactive already speak
   here - so the panel gains an object without gaining a dialect.
   .contact__email and its :hover were DELETED in the same pass rather than left
   behind. index.html was their only consumer corpus-wide, and this file already
   carries one graveyard of orphaned rules further down; a second one starts a
   habit.

   MATERIAL. The chips sit ON the panel, and the panel is a .wall-stage__object
   whose body colour is --bg-surface. A chip therefore takes --bg-raised, the
   next step up the SAME ramp ("raised = closer to white" in both themes), plus
   --surface-top-gradient and --shadow-soft: the .surface recipe exactly, one
   tone brighter so the chip separates from the ground it rests on. No new
   colour value and no new custom property was needed for any of it.
   WHY --shadow-soft IS SAFE HERE, given that the wall-distance decision record
   warns against exactly this token: that warning is about ONE element carrying
   a material shadow AND a wall shadow, where the two fight. These chips carry
   no wall shadow at all. They are ordinary raised children inside the wall
   object, which is the case .surface was written for.

   THE LAYOUT IS SELF-TUNING, AND THAT IS THE WHOLE DESIGN. flex-wrap plus
   `flex: 1 1 auto` makes each chip's flex BASE size its max-content width, so a
   flex line forms only when both chips fit at full width, and growth can then
   only ADD. The consequence is a guarantee rather than a measurement: WHENEVER
   THE TWO CHIPS SHARE A ROW, THE ADDRESS IS ON ONE LINE. No breakpoint has to
   know the address's pixel width and no ratio has to be re-tuned when the copy
   changes. When the row cannot hold both (roughly below a 794px viewport, where
   the panel's content box falls under the ~590px the pair needs) they wrap to a
   stack by themselves and each takes the full width.
   A 50/50 GRID WAS TRIED AND REJECTED ON ARITHMETIC, so nobody re-proposes it:
   an equal split hands the mail chip half of the panel's ~696px content box,
   i.e. ~340px, while a one-line address needs ~352px (268 text + 36 icon and
   gap + 48 padding). Equal columns therefore cannot one-line the address at ANY
   viewport width, and an asymmetric fr ratio would be a magic number that stops
   being right the day the address or the GitHub label changes.

   THE 320px PROOF, RE-DERIVED FOR THE CHIP GEOMETRY. The old rule proved this
   for a bare text link and that proof no longer describes the element. At 320px
   .folio-main drops to a 16px gutter and surrenders the wall reserve, so the
   panel's border box is 288px; its --space-8 padding leaves 224px; the chip's
   --space-6 side padding leaves 176px; the 24px icon slot plus the --space-3
   gap leave roughly 140px for the address, which needs roughly 214px at the
   clamp floor. IT THEREFORE RENDERS ON TWO LINES THERE, BY DESIGN, AND CANNOT
   OVERFLOW: overflow-wrap: anywhere collapses the label's MIN-CONTENT width to
   a single glyph, so the chip's automatic minimum size can never exceed the
   panel whatever the viewport, the font fallback or the theme does. `anywhere`
   rather than `break-word` precisely because break-word does NOT affect
   min-content sizing, and min-content is the half doing the load-bearing work.
   THE CLAMP FLOOR MOVED DOWN, from --font-size-lead to --font-size-body, and it
   is the one knob a later pass would turn to buy a one-line render on a small
   phone. 16px is where it stops: below that the page's conversion element would
   be typeset at the same size as the fine print beneath it, which is not worth
   an unbroken line. For reference the address one-lines from a ~394px viewport
   at 16px and only from ~448px at 20px, so the floor already buys the 400-430px
   phones outright.
   THE CEILING MOVED DOWN TOO, from --font-size-h3 to --font-size-lead. Inside a
   fixed slot a bigger address does not read bigger, it just makes the pair wrap
   to a stack at a wider viewport; the chip's raised surface now carries the
   emphasis that font size alone used to have to carry. */
.contact__channels {
  /* TWO PRIVATE NUMBERS, DECLARED ONCE AND CONSUMED THREE TIMES, so the control
     box, the glyph and the row's optical pull can never drift out of agreement.
     Leading underscore marks them private, matching --_wall-fluid-offset and
     --_hero-scroll-line elsewhere in this file. */
  /* SIZED UP 2026-08-20 BY CAPTAIN'S RULING (was 44/24): the marks are the
     section's only interactive elements and earn more presence. The 44px
     thumb floor is now comfortably exceeded rather than exactly met. */
  --_channel-box: 56px;
  --_channel-glyph: 32px;

  display: flex;
  align-items: center;
  gap: var(--space-2);

  /* THE OPTICAL PULL, DERIVED RATHER THAN EYEBALLED. Each mark is centred in
     its box, so without this the first GLYPH would start
     (box - glyph) / 2 = 10px inside the column while the invitation above and
     the promise below start at 0, and the three would read as a misalignment
     rather than as a stack. It is computed off the MAIL glyph because mail is
     first; the GitHub mark is deliberately 4px smaller and is not the thing
     that has to align.
     IT CANNOT CAUSE OVERFLOW AT ANY WIDTH, which is the check this kind of
     negative margin usually fails: it spends 12px of the BAND'S OWN inline
     padding (the 2026-08-20 size-up moved it from 10px), and that padding is
     16px at its narrowest (a 320px viewport, where .folio-main's gutter is
     16px), so the row still starts 4px inside the band.
     From 900px up the padding is 32px or more and the pull is a rounding error
     against it. Retune --_channel-box and this follows automatically. */
  margin-inline-start: calc(-0.5 * (var(--_channel-box) - var(--_channel-glyph)));
}

.contact__channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* A FIXED SQUARE RATHER THAN PADDING AROUND A GLYPH, and that is what keeps
     the two controls IDENTICAL IN SIZE while their marks are deliberately
     different sizes. Padding around each glyph would render the mail control at
     48px and the GitHub one at 44px - a visible 4px asymmetry in a pair of two,
     and the kind that reads as a bug rather than as a choice.
     THE 44px THUMB FLOOR is comfortably exceeded since the 2026-08-20 size-up
     (box 56px); it stays stated as a hard box because there is no label left
     to grow the target for us. The retired chips got their 44px almost for
     free from label height plus padding; these do not. */
  width: var(--_channel-box);
  height: var(--_channel-box);
  /* Guards a future third channel on a narrow phone. Two 56px boxes plus an 8px
     gap is 120px against a 288px content box, so nothing shrinks today - but a
     flex item with a definite width is still shrinkable by default, and a
     squashed hit target is a silent accessibility regression. */
  flex-shrink: 0;
  /* THE SHARED REST COLOUR, ONE TOKEN FOR BOTH MARKS BY RULING. On the band
     this measures 12.0:1 in dark and 14.2:1 in light. --text-secondary was the
     other candidate (5.0:1 / 6.2:1, both passing AA) and was rejected as a
     DEMOTION: these marks replaced full-size labelled objects, so making them
     quiet as well as small would spend the section's affordance twice. */
  color: var(--text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}

/* Declared explicitly rather than left to the global `a:hover`, even though the
   two agree today. This block should be readable without knowing the typography
   chunk, and a future change to that global must not silently retune the
   page's conversion controls. */
.contact__channel:hover,
.contact__channel:focus-visible {
  color: var(--accent);
}

/* The design system's single focus ring, restated and never invented - the
   identical declaration on .btn, the nav controls, .folio-theme-toggle,
   .folio-footer__brand and .folio-footer__link. It matters MORE than usual on
   an icon-only control: there is no text for a browser's default ring to hug,
   so the offset ring is the only thing telling a keyboard user where they are.
   The colour matches the hover colour on purpose, so focus and hover read as
   one state rather than as two different greens. */
.contact__channel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* THE GLYPH SIZE, AND THE SLOT THAT USED TO CARRY IT.
   .contact__channel-icon and .contact__channel-label WERE DELETED HERE ON
   2026-08-19 EVENING together with the spans they styled, each verified
   index.html-only with css_lens first. THE SLOT'S TWO JOBS BOTH LEFT WITH THE
   LABELS, which is why removing it is safe rather than merely tidy: it held a
   fixed 24px box so two differently-sized glyphs started their labels at the
   same x (there are no labels), and it took the label's colour off the
   inheritance path of the global `a:hover { color: var(--accent) }` at (0,1,1),
   which would otherwise repaint every descendant on hover (accent on hover is
   now exactly what we want, so the anchor colours itself and the svg follows
   through currentColor). That global has NOT gone away - it is the same trap
   that once painted .btn--primary's label accent-on-accent and made it vanish -
   it simply agrees with us here.
   FOUR MORE RULES WENT IN THE SAME PASS: both .contact__channel--mail colour
   rules (the accent icon and the clamped accent label, which together WERE the
   retired colour rank), the four-selector hover list that repainted those
   spans, and .contact__channel--mail:hover's --shadow-accent-glow halo, which
   had no box left to sit on.
   THE ADDRESS-SIZING MACHINERY WENT WITH THE LABEL and none of it is missed,
   which is worth stating because it was carefully reasoned: the clamp, the
   letter-spacing, `overflow-wrap: anywhere` and the flex `min-width: 0` all
   existed to guarantee a long unbreakable address could never push the chip
   wider than its container. AN ICON HAS NO MIN-CONTENT PROBLEM - a 24px svg in
   a 44px box is the same width at every viewport - so the whole class of
   overflow risk this section used to carry is simply gone. */
.contact__channel svg {
  width: var(--_channel-glyph);
  height: var(--_channel-glyph);
}

/* THE GITHUB MARK RENDERS 4px SMALLER, AND THAT IS OPTICAL COMPENSATION RATHER
   THAN AN OVERSIGHT: the envelope is a 2px outline while this is a dense
   silhouette, so at equal pixel size the silhouette reads heavier. The
   reasoning never depended on the chip, so it survived the redesign unchanged.
   BOTH MARKS ARE CENTRED IN THE SAME FIXED BOX (--_channel-box), so the size difference now costs
   no alignment at all - which is precisely what let the fixed icon slot be
   deleted. Under the old chip that slot was doing this work; the box does it
   now, for free. */
.contact__channel--github svg {
  /* 4px under the glyph size, tracking the 2026-08-20 size-up (was 20px when
     the glyph was 24px) - the optical compensation ratio carries over. */
  width: 28px;
  height: 28px;
}

/* .contact__channel--mail CARRIES NO DECLARATIONS TODAY, and it is kept in the
   markup on purpose rather than trimmed away. Its two former rules died with
   the colour rank and the visible label. It stays for three reasons: a lone
   modifier on one of two siblings reads as an accident rather than as a
   decision; it is the hook any future per-channel tweak lands on; and it is
   what a search for the mail control actually finds. If you find yourself about
   to give it a colour, read the colour-rank note above this block first. */

/* REDUCED MOTION NEEDS NO BLOCK HERE ANY MORE, AND THE ABSENCE IS A DECISION
   RATHER THAN AN OMISSION. The chips transformed (-3px lift, settle on press)
   and the block that stood here neutralised that transform AT ITS VALUE -
   deliberately not with a blanket `transition: none`, because this file's
   established scoping is that prefers-reduced-motion is about MOTION and not
   about colour fades, and a blanket rule would have cancelled the accent fade
   with it. These controls animate COLOUR ONLY, so there is nothing left to
   neutralise and a block here would be a media query that changes nothing.
   ADD A TRANSFORM, A SCALE OR A TRANSLATE TO .contact__channel AND YOU OWE THIS
   BLOCK AGAIN - and when you do, neutralise the transform at its value rather
   than reaching for `transition: none`, for the reason above. */

/* THE REPLY PROMISE'S OWN TYPOGRAPHY RULE WAS RETIRED HERE ON 2026-08-19
   EVENING. Its declarations moved UP into the shared `.contact__sub,
   .contact__promise` rule near the top of this section, because Captain's
   ruling 5 requires the two lines to carry ONE format and a shared selector is
   the only shape that cannot silently drift apart. Nothing was lost: this rule
   read `font-size: var(--font-size-body); font-weight: var(--font-weight-medium);
   color: var(--text-primary)`, and today the size is --font-size-lead while the
   weight and the colour are unchanged. The evening promotion therefore moved
   exactly ONE declaration further along the direction the midday one set.
   (Only the MARGIN still lives down here as its own rule - spacing is not part
   of the shared format, and the reason is written at that rule.)

   THE ARGUMENT FOR PROMOTING THIS LINE AT ALL SURVIVES BOTH PASSES, AND IT IS
   WHY IT MUST NOT BE QUIETLY DEMOTED BACK. This is the ONLY thing in the
   section that answers "what happens if I email" - the third of the three
   questions a warm-referral visitor arrives with (are these people real, are
   they good, what happens if I email). Small and secondary is the treatment for
   text a reader may safely skip, and nothing in this section may be skipped.
   Under the old panel it was also the quietest thing in a box whose other
   contents were full-size raised objects; under the band it sits beside two
   small marks, so if anything the case for it being read is stronger now.
   Demote it and you put that answer back out of the visitor's eyeline.

   THE WEIGHT STILL DOES NOT MOVE, and that is what keeps this a PROMISE rather
   than a heading: lead size plus primary colour plus MEDIUM weight reads as a
   sentence you are meant to actually read. Push it to semibold and it starts
   competing with the h2 above it. If it ever needs more presence again, take it
   from SPACING and not from weight - and note that under the shared rule the
   invitation now moves with it, which is the ruling working as intended rather
   than an obstacle to route around. */

/* =============================================================================
   SUPERSEDED BY THE 2026-08-16 NOXARC LANDING REBUILD — RETIREMENT CANDIDATES
   -----------------------------------------------------------------------------
   Everything from here down to the FOOTER heading styled the PREVIOUS landing
   page: an About card, a project-card grid, and a contact block made of two
   icon links. The approved four-section page (Hero / Workflow / Successful
   Project / Contact) has none of them — About was cut because Captain does not
   want to disclose it is one person, the grid was replaced by the full-width
   .case block, and the icon links were replaced first by a form plus a visible
   address, then on 2026-08-19 by a labelled chip pair, and later the same day
   by two ICON-ONLY controls in the live .contact__* namespace.

   *** READ THAT LAST CLAUSE TWICE BEFORE REVIVING ANYTHING BELOW, BECAUSE THE
       LIVE DESIGN IS ICON LINKS AGAIN AND THIS DEAD FAMILY NOW LOOKS LIKE A
       HEAD START. IT IS NOT ONE. *** .folio-contact__link is a flat
       text-and-icon link with a gap, a body font-size, a medium weight and an
       --accent-glow hover, laid out by .folio-contact__links as a centred
       wrapping row for a centred column. The live .contact__channel is a fixed
       44px square with NO label, one shared rest colour, an --accent hover and
       the house focus ring, laid out left-aligned on a full-bleed band with a
       token-derived optical pull. Nothing but the words "icon" and "link" is
       shared. Resemblance is the trap here, not the shortcut - and the
       namespace hazard the banner already warns about (.folio-contact* dead,
       .contact__* live) is now easier to fall into, not harder.

   THEY ARE LEFT IN PLACE, NOT DELETED, and that is a deliberate call rather
   than an oversight. index.html was being rewritten by a different agent in
   parallel with this CSS change, so deleting rules whose only consumer was
   mid-edit would have been guessing. Every one of these selectors was verified
   against the whole corpus and appears in index.html ONLY — nothing on
   /styleguide, /impressum or the 404 page touches them — so removal is safe as
   soon as the new markup is confirmed.

   EXACT RETIREMENT CONDITION, so the next agent does not have to re-derive it:
   generate index.html, then grep the output for
       folio-about  |  folio-projects__grid  |  folio-project-card  |
       folio-contact  (the .folio-contact* family, NOT the new .contact__*)
   If none appear, delete this whole block and its counterparts in the media
   tiers in tokens.css §responsive - which are EXACTLY these four and no others:
   .folio-projects__grid, .folio-about__content and .folio-project-card in the
   760px block, and .folio-contact__links in the 480px block.
   *** .folio-footer IS NOT ONE OF THEM, however much it looks like one. *** It
   sat inside that same grouping comment in the 760px tier until 2026-08-19, so
   a count-based instruction ("its four counterparts") could pick it up by
   position. It is LIVE on all three pages carrying a footer, it is the
   bottom-anchored band on the two legal ones, and sweeping it would silently
   unstack the footer on every phone. It has been moved out of the grouping and
   given its own reasoning there; this list is now by NAME so the sweep cannot
   drift again. If any DO appear, the template kept a
   component this comment assumed was gone — reconcile before deleting.
   ============================================================================ */

/* ---- About card ----------------------------------------------------------
   The about section's surface card, wall-medium treatment. The wall-stage
   is centered in the section. */
.folio-about__content {
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.folio-about__text {
  max-width: 55ch;
}

/* ---- Project grid --------------------------------------------------------
   Holds one card now, scales to 2-3 later. auto-fit + minmax ensures
   single card is centered, multiple cards distribute evenly. The grid
   never forces cards smaller than 360px. */
.folio-projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: var(--space-8);
}

/* The project card content inside the wall-object */
.folio-project-card {
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.folio-project-card__title {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: var(--line-height-snug);
  margin: 0;
}

.folio-project-card__desc {
  color: var(--text-secondary);
  line-height: var(--line-height-body);
  max-width: 55ch;
  margin: 0;
}

.folio-project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.folio-project-card__footer {
  margin-top: var(--space-4);
}

/* ---- Contact section -----------------------------------------------------
   Clean, minimal. Icon links side by side on the dark background. */
.folio-contact {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.folio-contact__links {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.folio-contact__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-contact__link:hover {
  color: var(--accent-glow);
}

.folio-contact__link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---- Footer --------------------------------------------------------------
   Thin separator + minimal footer. ONE BAND, THREE PAGES, TWO PARENTAGES: it is
   the last child of .folio-main on /, and a SIBLING of .folio-impressum__content
   inside the shell on /impressum and /datenschutz. The markup is byte-identical
   in all three templates by standing convention (change one, change all three),
   and the rule is written unscoped so it never has to know which page it is on.
   SINCE 2026-08-19 IT IS ALSO THE PAGE'S BOTTOM EDGE on every one of the three -
   both declarations below became load-bearing that day and each says how.

   AND SINCE LATER THE SAME DAY IT IS THE SAME WIDTH ON ALL THREE, which is the
   half of that day's work a visitor actually sees. This band has no width of
   its own: it stretches to whatever content box its parent hands it, so when
   .folio-impressum stopped declaring 700px and began resolving
   --site-content-width like .folio-main already did, the hairline went from
   stopping 100px short on the legal pages to spanning the identical 836px
   everywhere. NOTHING IN THIS RULE CHANGED TO ACHIEVE THAT, AND NOTHING IN IT
   SHOULD: give the footer a max-width of its own and you break the agreement
   from the one place nobody would think to look for it. */
.folio-footer {
  /* 64px, FIXED AND EMPHATICALLY NOT auto. On the legal pages this is the
     GUARANTEED MINIMUM air between the document's last line and the hairline;
     the shell's slack is absorbed by .folio-impressum__content instead, exactly
     so this number survives on pages long enough to scroll. Full derivation of
     that trade is on .folio-impressum__content. */
  margin-top: var(--space-16);
  /* Asymmetric: 32px above the row, 64px below it (raised from 0 on
     2026-08-16). The old value left the legal links 32px from the bottom of
     the document, which reads as the page having been cut off rather than
     having ended. The extra air below is what lets the last line settle.
     *** THAT 64px IS NOW THE SOLE OWNER OF THE PAGE'S BOTTOM AIR, ON ALL THREE
         PAGES (2026-08-19). *** .folio-main has never carried a bottom padding,
     and .folio-impressum's was dropped to 0 that day so its viewport-floored
     shell could seat this band on the screen edge rather than 96px above it. So
     retuning this one value now moves the ending of / AND /impressum AND
     /datenschutz together. That is the point - they are meant to agree, and the
     three-page consistency Captain asked for is this number - but it is no
     longer a landing-page tweak, and nothing else supplies air below the footer
     any more. Measured result at 1279x1256: the last footer line sits 64px
     above the viewport's bottom edge on every page that has this band. */
  padding: var(--space-8) 0 var(--space-16);
  border-top: 1px solid var(--surface-inner-edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* THE BRAND IS A HOME LINK SINCE 2026-08-19 (Captain's order). It was a
   non-interactive span until then; all three footer copies now carry an anchor
   to / holding the same caption and folio-footer__brand classes the span had,
   and the same visible word. WRITTEN AS PROSE, NOT AS THE LITERAL MARKUP
   STRING, on purpose: a comment quoting that string verbatim becomes a
   spurious extra hit the moment someone greps the three copies to check they
   are still byte-identical, which is precisely the trap the legal pages' own
   footer comments were rewritten to avoid. Read the markup from a template.
   THE TREATMENT IS .folio-footer__link's, RESTATED, and that is the point: the
   footer now holds THREE anchors, so it must speak ONE interactive grammar -
   muted at rest, --text-secondary on hover, the same fade, the same ring. A
   brand that lit up differently would read as a different KIND of control.
   THREE OF THESE FOUR DECLARATIONS LOOK REDUNDANT AND ARE NOT. The typography
   chunk declares element-level `a { color: var(--accent-glow);
   text-decoration: none }` and `a:hover { color: var(--accent) }`, so:
     :hover          MANDATORY, and the one that fails SILENTLY. `a:hover` is
                     (0,1,1) and outranks BOTH .caption and
                     .folio-footer__brand at (0,1,0), so without the rule below
                     the brand turns accent-mint under the cursor. The rule is
                     (0,2,0) and wins. (Columns: id, class, type.)
     text-decoration Redundant against the base `a` TODAY. Restated so the
                     footer's grammar survives any future edit to that base
                     rule - .folio-footer__link restates it for the same reason.
     transition      The base `a` declares none, so the colour would snap.
     :focus-visible  The base `a` declares no focus style, so the brand would
                     fall back to the browser default ring while every other
                     control on the page draws the house one.
   NOT MERGED INTO A `.folio-footer__brand, .folio-footer__link` SELECTOR LIST,
   deliberately. The __legal wrapper below exists precisely BECAUSE the brand is
   not a peer of the legal links; one shared selector would contradict that
   hierarchy and would have to be unpicked the moment either side diverges. Two
   short rules that agree are cheaper than one rule hiding a seam. */
.folio-footer__brand {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-footer__brand:hover {
  color: var(--text-secondary);
}

/* The house focus ring, restated and never invented - the identical
   declaration on .btn, the nav controls, the theme toggle, .contact__channel
   and .folio-footer__link. */
.folio-footer__brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Groups the legal links so they read as a PAIR at the end of the footer
   rather than as two peers of the brand. Added 2026-08-17 with the
   /datenschutz route, and it exists for one specific reason: .folio-footer is
   justify-content:space-between, which works beautifully with two children
   (brand hard left, link hard right) and badly with three, because the middle
   item strands itself dead-centre with a wide gap on both sides. The brand is
   not a peer of the links, so a three-way spread misrepresents the hierarchy.
   Wrapping the links restores the two-child split the footer was designed for.
   The gap is space-6 rather than the footer's own space-4 so the pair reads as
   two distinct links and not as one wrapped phrase. NAMED __legal, NOT __links,
   deliberately: __links differs from the existing __link by a single trailing
   character, which is a genuine misreading hazard in a stylesheet this size. */
.folio-footer__legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.folio-footer__link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-footer__link:hover {
  color: var(--text-secondary);
}

/* The house focus ring, same declaration as .btn, the nav controls, the theme
   toggle and .contact__channel - added 2026-08-19 when the footer landed on
   the legal pages, where these links are the only in-content navigation.
   Before this rule they were the one interactive element falling back to the
   browser default ring. */
.folio-footer__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Legal page layout (Impressum AND Datenschutz) -----------------------
   Simple, readable, generous padding. Shared by BOTH legal templates:
   datenschutz.html reuses these classes verbatim rather than defining a
   parallel .folio-datenschutz family, which is why the honest end state is a
   rename to .folio-legal across tokens.css plus both templates. That rename is
   named technical debt, not an oversight.

   *** THE WIDTH IS NO LONGER THIS PAGE'S OWN (2026-08-19). *** The line above
   read "comfortable max-width" until that day and meant 700px. Captain saw
   /impressum and /datenschutz rendering visibly narrower than the / that links
   to them, their footer hairline stopping 100px short of the landing page's,
   and ruled that every served page presents the SAME content area. So this
   shell resolves --site-content-width (900px, declared in tokens.css
   §design-tokens) exactly as .folio-main and .folio-notfound do, and pairs it
   with the same var(--space-8) gutter, dropping to var(--space-4) at the 760px
   tier through §responsive. Content box: 636px before the ruling, 836px after.

   THE READING DECISION SURVIVED THAT RULING INTACT, AND NOT BY LUCK - the line
   length of the legal prose was never this container's job. Every <p> on both
   templates already carries max-width: 65ch from the ELEMENT rule in tokens.css
   §base-reset-typography, and 65ch is narrower than the content box was even at
   700px. That is provable rather than estimated: for 65ch to reach the old
   636px box a single ch would have to measure 9.8px at the 16px body size,
   i.e. an advance width of 0.61em, and Space Grotesk's zero is nowhere near
   that wide. So the ruling widened the gutters, the headings and the footer
   band and did not lengthen ONE LINE of German legal text. No paragraph-level
   cap had to be invented here, and inventing one now would only be a second
   number to keep in step with 65ch. EXACTLY TWO EDITS WOULD FALSIFY THIS
   PARAGRAPH: giving `p` a max-width inside this shell, or taking the token
   below about 636px, at which point the container starts clipping the measure
   instead of clearing it and the two decisions stop being independent.

   THE TOP PADDING HERE IS NO LONGER THE WHOLE STORY. Since 2026-08-17 both
   pages carry the fixed site bar, and the clearance for it is added by
   `.folio-nav--static ~ .folio-impressum` up in the nav section, keyed on the
   bar's presence rather than restated here. If you retune --space-24 below,
   read that rule too: the two compose (160px in total, 64 reserve + 96 rhythm).

   *** THIS SHELL IS ALSO THE BOTTOM-ANCHORED FOOTER MECHANISM (2026-08-19).
       READ POINTS 1-4 BEFORE TOUCHING min-height, padding OR display. ***
   Captain's order: the footer band sits on the viewport's BOTTOM EDGE when a
   legal page is shorter than the window, and at the natural document end when
   it is longer - same band, same height, as the landing page. MEASURED BEFORE
   THE FIX, /datenschutz at 1279x1256: the page was not even scrollable and the
   footer ended at y=782, leaving 474px of bare canvas under it.

   1. WHY IT IS SOLVED HERE AND NOT ON <body>, written out because the next
      agent will propose body-as-flex-column and it is the wrong trade twice.
      This shell is body's ONLY in-flow child on both legal templates - the skip
      link and .folio-nav are both position: fixed and the scripts are
      display: none - so a viewport floor on THIS element IS a viewport floor on
      the document. Nothing about body has to change.
        (a) BLAST RADIUS. body is shared by /, /impressum, /datenschutz, /404,
            /styleguide, /lab and /experiments. This rule reaches exactly two.
        (b) IT WOULD SILENTLY NARROW THE LANDING PAGE. In a column flex
            container a child whose CROSS-axis (here horizontal) margins are
            auto does NOT stretch - CSS Flexbox 9.4 step 11 makes stretching
            conditional on neither cross margin being auto - so it falls back to
            fit-content. .folio-main and this shell both carry `margin: 0 auto`,
            so both would shrink-wrap to their content and lose the
            --site-content-width measure they now SHARE (this passage named two
            numbers, 900px and 700px, until the 2026-08-19 ruling collapsed them
            into one). Repairing that needs a `width: 100%` on each: two
            more declarations to keep in step, bought for a mechanism the
            landing page cannot use anyway (its hero alone is 100svh, so that
            page is never shorter than the window).
   2. min-height: 100vh, NOT 100svh, WHICH IS THE OPPOSITE CHOICE FROM THE HERO
      AND IS DELIBERATE. The hero uses svh because its CONTENT must FIT the
      smallest (chrome-expanded) viewport. This is a FLOOR, and a floor has to
      AGREE with body's own `min-height: 100vh` in the base chunk.
      *** THE INVARIANT IS: this shell's floor >= body's floor. *** Put svh here
      and on mobile body's larger vh floor wins: the document is lvh tall, the
      footer stops at svh, and the exact strip of bare canvas this rule exists
      to delete comes back at (lvh - svh). Change body's floor and this one
      changes in the same edit. .folio-notfound already uses this identical
      idiom, for the same reason - the two standalone shells stay in step.
      NO calc(100vh - bar height) EITHER. .folio-nav is position: fixed and
      contributes nothing to document height; the padding-top above is what
      clears it. Subtracting the bar would push the band ~61px below the fold.
   3. THE BOTTOM PADDING IS GONE (it was var(--space-24), 96px) AND THAT IS THE
      TRAP THIS RULE HAD TO DEFUSE. Once the shell grows to the viewport, its
      bottom padding sits BELOW the footer and holds the band 96px off the edge,
      stacking with the footer's own 64px for 160px of air where the landing
      page has 64. The page's bottom air now has exactly ONE owner on all three
      pages: .folio-footer's asymmetric padding. CONSEQUENCE, written out so it
      cannot surprise anyone: a .folio-impressum page WITHOUT a .folio-footer
      now ends FLUSH against the viewport edge. Both legal templates carry the
      footer today; a third page using these classes must carry it too, or
      restore a bottom padding here.
   4. EVERY DIRECT CHILD IS NOW A FLEX ITEM. Both templates put exactly two here
      (.folio-impressum__content, then the footer), and both stretch to the full
      836px content width because neither has auto horizontal margins - byte for
      byte what block layout gave them, which is why this needed no template
      change and got none (whitespace-only text between flex items is not
      wrapped in an anonymous item, so the indentation is inert).
      THAT NUMBER READ 636px UNTIL 2026-08-19, and the same-width ruling that
      changed it cost this mechanism NOTHING - worth knowing before the next
      width edit. Stretch is a CROSS-axis behaviour while every declaration in
      points 2 and 3 works the MAIN axis, so a wider shell just hands both items
      a wider box and the anchoring never notices. The footer band going from
      636 to 836 IS the visible half of the ruling: its border-top hairline now
      spans exactly what the landing page's does, which is the misalignment
      Captain was looking at when he called it.
      .folio-impressum__back below would blockify from inline-flex and stretch
      if it were ever restored as a direct child: give it align-self: start.
      HOW THE FOOTER IS ACTUALLY PUSHED DOWN is on .folio-impressum__content.

   THE BACK LINK IS GONE FROM BOTH TEMPLATES (2026-08-17). .folio-impressum__back
   below is a RETIREMENT CANDIDATE with no consumer: the nav wordmark is the
   same destination, permanently visible in static mode, and it survives
   scrolling down a long legal document instead of leaving the top of the
   screen. Held rather than deleted, matching how the superseded .folio-about*
   and .folio-project-card* families in this chunk are held. GREP CONDITION FOR
   THE SWEEP: delete both __back rules when search_patterns
   (["folio-impressum__back"]) returns only CSS hits and no template hit
   anywhere in the corpus. That is the state today; it is written out so the
   next agent verifies rather than trusts it. The twin .folio-notfound__back in
   chunk 5abec0ee went out of use in the same pass and carries the same banner
   - retire them together. */
.folio-impressum {
  /* THE SHARED SITE MEASURE, NOT A LEGAL-PAGE NUMBER (2026-08-19, was 700px).
     The ruling and the proof that widening it costs no reading comfort are in
     this block's header comment; the value lives in tokens.css §design-tokens
     beside .folio-main's and .folio-notfound's. Retune it there or the three
     pages start disagreeing again. */
  max-width: var(--site-content-width);
  margin: 0 auto;
  /* THREE VALUES, and the third one is the change: 96px top (raised to 160px by
     the .folio-nav--static sibling rule at (0,2,0) whenever the bar is present,
     which is both legal pages today), 32px sides, and ZERO bottom - point 3
     above. The shorthand's top value survives as the no-bar fallback. */
  padding: var(--space-24) var(--space-8) 0;

  /* THE VIEWPORT FLOOR AND THE COLUMN IT CREATES - the whole sticky-footer
     mechanism is these three declarations plus one flex-grow below.
     min-height and NOT height: the used height stays CONTENT-BASED and merely
     cannot fall under one screen, so a long Impressum grows past the viewport
     and scrolls normally. That is also why flex free space here can never go
     negative, which is what makes the grow-only mechanism below safe. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.folio-impressum__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-16);
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-impressum__back:hover {
  color: var(--accent-glow);
}

/* THE SLACK ABSORBER - the half of the bottom-anchored footer that is easy to
   get wrong. flex-grow: 1 hands this block every pixel the shell has left over
   once the footer is placed, which seats the footer on the shell's bottom edge
   without the footer itself moving in the flex order or gaining a single
   declaration.

   *** margin-top: auto ON .folio-footer WAS THE OBVIOUS ALTERNATIVE AND IT IS
       THE WRONG ONE. *** An auto margin CANNOT EXPRESS A MINIMUM: it takes all
   the free space when there is some and collapses to 0 when there is none, so
   on a legal page long enough to scroll the footer's deliberate 64px of air
   above its hairline would silently disappear and the last paragraph would butt
   against the border. Growing the CONTENT instead leaves .folio-footer's fixed
   margin-top: var(--space-16) untouched at every page length. That is the
   guarantee this rule buys: >= 64px of air ALWAYS, and more when the page is
   short. (The 404 shell documents the same trade from the other side -
   .folio-notfound__content uses margin-block: auto precisely BECAUSE it wants a
   centring that collapses to 0 rather than overflowing upward under the bar.)

   NEITHER flex-shrink NOR flex-basis IS SET, and that is reasoned rather than
   forgotten. .folio-impressum declares min-height, not height, so its used
   height is content-based and can only ever be >= the sum of its items: free
   space is never negative and the default shrink factor can never fire. Give
   that shell a definite `height` and this stops being true - the content would
   start compressing before the footer did.

   THE GROWN SPACE LANDS AT THE BOTTOM of this block (justify-content defaults
   to flex-start), so the legal text still begins at the top of the column where
   a document belongs, and the empty space opens between the last paragraph and
   the footer. Vertically centring the text was considered and rejected: the 404
   centres its three lines because it is an EMPTY STATE, while an Impressum is a
   DOCUMENT and documents are read from the top. */
.folio-impressum__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex-grow: 1;
}

.folio-impressum__content h1 {
  margin-bottom: var(--space-4);
}

.folio-impressum__content h2 {
  font-size: var(--font-size-h4);
  margin-top: var(--space-8);
}

/* ---- Responsive ----------------------------------------------------------
   Mobile-first adjustments. The portfolio is designed for desktop-first
   viewing, but degrades gracefully. */
@media (max-width: 760px) {
  /* DELIBERATELY NO .folio-nav RULES IN THIS BLOCK. The nav's entire
     responsive behaviour — bar padding, the kebab's reveal, the dropdown
     panel — is colocated with the nav component further up this chunk; search
     for "Mobile nav: kebab + dropdown panel". They belong together because
     the panel anchors its left edge to the bar's own inline padding through
     the --_nav-pad-x custom property, so the two values are one interlocked
     system rather than two independent tweaks.
     This is also a CASCADE requirement, not just tidiness: this block sits
     LATER in the file than the colocated one, so a .folio-nav padding rule
     here would silently win over it at equal specificity. If you find
     yourself adding one, you are about to override the component. */

  /* ONLY THE HORIZONTAL PADDING CHANGES HERE, AND THAT IS DELIBERATE. The
     vertical padding is a single composition in the base rule (nav clearance
     on top, breathing gap + scroll lane on the bottom); re-stating it per
     breakpoint is exactly how the two ends drift apart. padding-inline is a
     longhand and this block sits later in the file, so it overrides just the
     left/right sides of the base shorthand and leaves the bottom calc intact.

     16px PER SIDE IS LOAD-BEARING: EVERY 320px overflow proof in this chunk is
     computed against the resulting 288px content box — .folio-hero__brand,
     .folio-hero__lead, .folio-section__title, .case__title and
     .case__stat-value all carry one. Raising this padding narrows that box and
     invalidates all five; redo the arithmetic on each before you touch it.

     min-height: 85vh IS GONE (removed 2026-08-14). It was a relief valve for
     the old content-sized hero — 15% of the screen given away so the
     overflowing stack had somewhere to spill. The hero is now exactly one
     screen at every width (base rule, 100svh) and 85vh here would leave a
     strip of the next section peeking above the fold on phones, which reads
     as a broken hero rather than a deliberate one. */
  .folio-hero {
    padding-inline: var(--space-4);
  }

  /* TWO HERO KNOBS THAT USED TO LIVE HERE ARE GONE (2026-08-16), and their
     absence is deliberate rather than an omission:
       - .folio-hero__image's max-width override was folded into a single
         continuous expression on the base rule. Read that rule for the
         resolved size at each width and for why one expression beats two
         breakpoints that could disagree at the boundary.
       - .folio-hero__title-wrap's gap is var(--space-8) in the base rule at
         every width now, so restating it here would be a media query that
         reads as an intentional difference while changing nothing. */

  /* Horizontal gutter drops to 16px per side. THIS IS THE 288px CONTENT BOX
     that every 320px overflow proof in this chunk is computed against
     (.folio-hero__brand, .folio-hero__lead, .folio-section__title, .case__title,
     .case__stat-value). Raising it invalidates all five — redo the arithmetic
     before you touch it.

     --wall-fluid-reserve drops to 0 in the same rule because the two are one
     decision. WALL DISTANCE IS A SPATIAL LUXURY THAT NEEDS ROOM and a 288px
     box does not have it: at 44px the object would surrender 15% of its width
     to make room for its own shadow, which is a bad trade on a phone. Paired
     with the tier drop below — with reserve 0 the shadow's geometry lands PAST
     the container's right edge by (offset + size-delta), which is 14px at
     close and tucks neatly inside this 16px gutter, but would be 44px at
     medium and 84px at far, both out in the viewport. (Nothing scrolls
     sideways either way — html and body carry overflow-x: clip — but a shadow
     visibly clipped by the screen edge reads as a rendering fault.) */
  .folio-main {
    padding: 0 var(--space-4);
    --wall-fluid-reserve: 0px;
  }

  /* THE LEGAL SHELL TAKES THE SAME GUTTER STEP-DOWN, AND IT DID NOT UNTIL
     2026-08-19. This rule is the second half of Captain's same-width ruling and
     the half that is easy to forget, because the shared --site-content-width
     token does not reach down here at all: ABOVE 760px both shells resolve
     900px and both pair it with a 32px gutter, so their content boxes agree at
     836px on the token's strength. BELOW 760px the max-width stops binding
     entirely (the viewport is narrower than the cap) and THE GUTTER BECOMES THE
     WHOLE DIFFERENCE. Without this rule .folio-impressum kept 32px sides while
     .folio-main dropped to 16px, so /impressum and /datenschutz rendered 32px
     narrower than / on precisely the devices where 32px is a tenth of the
     screen. One rule, and the two now agree at every width instead of at most.

     padding-inline AND NOT THE SHORTHAND, for two independent reasons, either
     of which would be enough on its own.
       (1) The shell's vertical padding is an ASYMMETRIC composition:
           var(--space-24) on top and ZERO on the bottom, the zero being what
           lets the viewport-floored shell seat the footer band on the screen
           edge instead of 96px above it. A shorthand here would silently hand
           the bottom a value back and undo the bottom-anchored footer AT THIS
           TIER ONLY, which is the flavour of bug that only ever appears on a
           phone and never in the window you are testing in.
       (2) The top value is raised to 160px wherever a static bar precedes the
           shell, by `.folio-nav--static ~ .folio-impressum` in tokens.css §nav.
           That selector is (0,2,0) and this rule is (0,1,0), so it would win
           the padding-top contest either way, but the longhand makes that a
           non-question rather than a specificity race the next reader has to
           re-derive. It is also exactly the idiom .folio-hero uses at the top
           of this block, for reason (1) applied to its own composition.

     NO --wall-fluid-reserve HERE, deliberately, unlike .folio-main above. That
     property parameterises .wall-stage geometry and neither legal template
     renders a single elevated block, so declaring it would be a value with no
     reader and a false hint that the legal pages have shadow-casting objects. */
  .folio-impressum {
    padding-inline: var(--space-4);
  }

  .folio-section {
    padding: var(--space-16) 0;
  }

  /* Every stage drops to the CLOSE tier. Applied to .wall-stage rather than to
     the individual tier modifiers, so it overrides whatever tier a block
     declares — one rule, all four blocks, no chance of one being missed when a
     fifth is added. Uniform across siblings, so the "all blocks share one
     distance" decision holds on mobile exactly as it does on desktop; the
     progression is a desktop refinement the sequence never depended on.
     IT READ FIVE UNTIL 2026-08-19 EVENING: the contact panel was the fifth, and
     Captain retired it in favour of a full-bleed colour band that casts no
     shadow at all. SELECTOR-BASED RATHER THAN COUNT-BASED IS EXACTLY WHY THIS
     RULE NEEDED NO EDIT FOR THAT - the CSS was already correct for whatever
     population of stages exists, and only the COMMENT went stale. That is the
     argument for writing rules this way, stated here because the next agent
     will meet the same choice. */
  .wall-stage {
    --_wall-fluid-offset:     var(--wall-close-offset);
    --_wall-fluid-size-delta: var(--wall-close-size-delta);
    --_wall-fluid-blur:       var(--wall-close-blur);
    --_wall-fluid-alpha:      var(--wall-close-alpha);
  }

  /* 64px still clears the close tier's 14px overhang with room to spare, and
     96px between three blocks on a phone is a long scroll through nothing. */
  .how__steps {
    gap: var(--space-16);
  }

  /* THE NUMERAL STACKS ABOVE THE HEADING instead of eating a rail. On a 288px
     content box a ~40px numeral column plus a 32px gap costs a quarter of the
     width, which would set the heading beside it as two or three words per
     line. Single column, and the tighter 12px gap keeps the numeral reading as
     a label ON the step rather than as a separate line of content above it. */
  .how__body {
    padding: var(--space-8);
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .case {
    padding: var(--space-8);
  }

  /* *** THE CONTACT SECTION HAS NO RULES AT THIS TIER ANY MORE, AND THAT IS AN
         OUTCOME OF THE DESIGN RATHER THAN AN OVERSIGHT. DO NOT ADD ONE BACK
         WITHOUT READING THIS. *** Two lived here until 2026-08-19 evening and
     both were deleted with the panel-and-chips design they served.
       `.contact__panel { padding: var(--space-8) }` went with .contact__panel
       itself. There is no panel to pad; the section is a full-bleed band whose
       inline padding is derived, and whose BLOCK padding still comes from the
       .folio-section rule at the top of this block.
       `.contact__channels { flex-direction: column }` stacked the two labelled
       chips, and it existed only because those chips were WIDE. Its reasoning,
       kept because the shape of the argument is still worth having: this tier
       WIDENS the content rather than narrowing it (.folio-main drops to a 16px
       gutter and surrenders the 44px wall reserve), so at 760px the panel still
       offered ~664px against the ~590px the labelled pair needed, and they
       would have sat side by side as a cramped pair at exactly the width where
       the kebab has already told the visitor this is a phone layout.
       THE ICON-ONLY CONTROLS ARE 44px SQUARES. The pair measures 96px including
       its 8px gap, against a 288px content box at 320px - so there is no width
       at which they are cramped, stacking them would waste vertical space, and
       a two-item column would read as a LIST where a row reads as a pair. They
       stay side by side at every width, deliberately.

     THE BAND ITSELF NEEDS NOTHING HERE EITHER, and this is the rule most likely
     to be "helpfully" added by a later pass. .folio-section.contact__band
     expresses its breakout as calc(50% - 50vw) / calc(50vw - 50%) - a
     RELATIONSHIP rather than a number - so it follows .folio-main's gutter down
     from 32px to 16px by itself, and a restatement here would be a duplicate of
     that expression with its own opportunity to disagree at the boundary. Note
     also that the band's selector is COMPOUND at (0,2,0) precisely so it
     outranks this block's own `.folio-section { padding: var(--space-16) 0 }` at
     (0,1,0); without that, the band's content would jump flush against both
     screen edges here. The full derivation is at the band rule in
     tokens.css §portfolio-layout. */

  /* One stat per row. The 1fr 1.4fr 1fr proportion exists to give
     "hours -> seconds" a track wide enough not to wrap; at 288px total there
     is no such track to hand out, so the three stack and each gets the full
     width — which is also the only arrangement where the phrase survives
     intact. The label cap comes off for the same reason: 22ch was there to
     stop labels sprawling across a narrow column, and there is no column now. */
  .case__stats {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .case__stat-label {
    max-width: none;
  }

  /* --- The THREE rules below belong to the SUPERSEDED components; see the
         RETIREMENT CANDIDATES banner in tokens.css §portfolio-layout (it read
         "above" until the 2026-08-19 split moved it into a different chunk).
         They go when those go.
         *** IT SAID FOUR UNTIL 2026-08-19, AND THE FOURTH WAS .folio-footer,
             WHICH IS NOT SUPERSEDED AND MUST NOT BE SWEPT. *** It had been
         grouped in here by proximity alone, and the retirement banner's own
         instruction ("delete this whole block and its counterparts inside the
         760px and 480px media queries") would have taken the LIVE footer's
         mobile stacking with it on three shipping pages. Moved out below, with
         its own reasoning, so the sweep cannot reach it. --- */
  .folio-projects__grid {
    grid-template-columns: 1fr;
  }

  .folio-about__content {
    padding: var(--space-8);
  }

  .folio-project-card {
    padding: var(--space-8);
  }

  /* LIVE, AND LOAD-BEARING ON THREE PAGES (/, /impressum, /datenschutz). The
     band stacks below 760px: the brand sits ABOVE the legal pair instead of
     opposite it, because justify-content:space-between across a 288px content
     box would strand ~150px of nothing between two short captions. A taller
     footer on a phone is expected and fine.
     IT MUST KEEP THE BOTTOM-ANCHORED LEGAL FOOTER WORKING (2026-08-19), and it
     does so STRUCTURALLY rather than by luck, which is the part worth knowing
     before touching it: .folio-impressum is a viewport-floored flex column and
     .folio-impressum__content absorbs whatever slack remains, so a footer that
     grows ~33px here simply leaves 33px less slack to absorb. There is no
     height number anywhere in that mechanism for this rule to disagree with,
     at this tier or at 480px. Verified at both.
     NOTE THE TIER YOU ARE IN: this is the 760px block. The 480px block below
     touches only the hero's scroll hairline and the superseded
     .folio-contact__links, so a change to the footer's phone layout belongs
     HERE, and adding a second .folio-footer rule down there would override this
     one at equal specificity on source order. */
  .folio-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* SMALL-PHONE HERO TIER — in practice 320px to 430px. ONE KNOB, and it is
     not the vertical fit. That fit is enforced structurally by the flex chain
     in the base rule (rigid copy stack, elastic art), so this tier can no
     longer be "wrong by a few pixels" the way the hand-balanced budget it
     replaced could be. The art proportion knob that used to live here is gone
     too (2026-08-16): .folio-hero__image now carries one continuous expression
     covering every width, so all that remains is pulling the scroll hairline
     in so the bottom of a small screen does not feel crowded.

     FIT PROOF at 320 x 568 (the worst case we support), RE-DERIVED 2026-08-19
     for the 10vh floor (it was 22vh from 2026-08-16 to 2026-08-18, and the
     superseded numbers are kept in brackets so the delta is checkable). These
     numbers are the FLOOR the layout must clear, not a budget it has to match:
       padding    64px  top (nav clearance)
                 113px  bottom (10vh of 568 = 57, + 56 lane = 32 + 24 line)
       gap        32px  (title-wrap gap, var(--space-8) at every width)
       brand      44px  (one line: "Noxarc" at the 40px clamp floor x 1.1)
       gap        16px
       lead       94px  (four lines at the 18px floor x 1.3 — pessimistic;
                         three lines is the likely render)
       gap        24px  (CTA margin-top)
       CTA        44px
       ----------------
       text floor 222px, plus 32px gap, inside a 391px content box.
     The remaining 137px is handed to the crane, which renders 137x137 — its
     width cap here is 56vw = 179px, so HEIGHT is still what binds and the
     phone rule is nowhere near being reached. That is 68px more than the 22vh
     floor left it [was: 181px bottom, 323px box, 69px crane]. Small either
     way, and correct either way: on the shortest screen we support the art is
     the thing that yields, because the copy stack is flex: 0 0 auto and never
     does. The CTA's bottom edge lands at y=455 of 568 [was y=387] and the
     hairline occupies y=512..536, so the gap between them is the full 57px of
     10vh [was 125px] and nothing is below the fold.
     THE HAIRLINE DID NOT MOVE, and that is structural rather than lucky: it is
     anchored to the hero's bottom EDGE through --_hero-scroll-lane, so cutting
     the floor spends CTA clearance and nothing else. y=512..536 is identical
     under both floors. If a future viewport is short enough that the text
     floor exceeds it, the crane goes to 0 and the hero GROWS instead. The copy
     is never clipped.

     NOTHING IN THIS TIER WAS EDITED ON 2026-08-19 AND THE PROOF STILL MOVED.
     The image's phone rule (min(240px, 56vw)) and the 24px hairline are
     byte-identical; what reached this width was the shared 10vh floor on the
     BASE rule. A floor expressed in vh is a global knob — every tier inherits
     it — so any change to it invalidates every fit proof in this chunk, not
     just the one next to it. Re-derive them together.

     Horizontal padding stays var(--space-4) = 16px, inherited from the 760px
     tier — that is the 288px content box every overflow proof in this chunk is
     computed against. Changing it invalidates all of them. */

  /* Pull the scroll hairline in on small screens. Because .folio-hero's
     bottom padding is DERIVED from this property, shortening the line also
     hands 16px back to the crane — one knob, both effects, and no way for the
     drawn line and its reserved lane to disagree. This replaced a bare
     .folio-hero__scroll-line { height: 24px } override, which shortened the
     line without shortening the space reserved for it. */
  .folio-hero {
    --_hero-scroll-line: 24px;
  }

  /* --- superseded component, see the RETIREMENT CANDIDATES banner above --- */
  .folio-contact__links {
    flex-direction: column;
    gap: var(--space-6);
  }
}
/* =============================================================================
   404 PAGE LAYOUT (.folio-notfound)
   -----------------------------------------------------------------------------
   Layout for templates/404.html. APPENDED as its own section — nothing above
   this line is modified. Every value is either mirrored from the .folio-impressum
   rules (the other chrome-less standalone page) or taken from an existing token;
   no new raw values enter the design system here.

   ONE OF THOSE MIRRORS BECAME A SHARED TOKEN ON 2026-08-19. The shell's
   max-width was a hand-copied 700px and now reads var(--site-content-width),
   the same declaration .folio-impressum and .folio-main read, under Captain's
   ruling that every served page of the site presents one content area. The
   other mirrors (margin auto, the space-24 / space-8 padding, the inline-flex
   back-link treatment) are still copies and still correct as copies; the WIDTH
   was the one with a site-wide ruling attached, which is what a copy can
   silently fall out of while every comment around it still reads true.

   Why not simply reuse .folio-impressum? It would have been cheaper and the
   shell values are identical. But it puts a class literally named "impressum"
   on a page that is not the impressum, and one name per concept is a rule this
   project keeps. The values are shared; the name is honest.
   ============================================================================ */

/* The page shell. Shell values (max-width, margin, padding) are the same ones
   .folio-impressum uses. What differs is vertical centering: three short lines
   pinned to the top of a tall viewport read as an abandoned page, whereas the
   same lines centered read as a deliberate, finished state. The global
   border-box reset makes min-height:100vh + padding safe (no overflow).

   "THE SAME ONES" IS NOW ENFORCED RATHER THAN MAINTAINED (2026-08-19). The
   max-width used to be a hand-copied 700px literal, held in step with the legal
   shell by convention and by the sentence above it. It now resolves
   --site-content-width from tokens.css §design-tokens, the SAME declaration
   .folio-impressum and .folio-main read. Captain ruled that day that every
   served page presents one content area, and a mirrored literal is precisely
   the mechanism by which a page falls out of a ruling without anyone noticing.

   *** THIS PAGE RENDERS PIXEL-IDENTICALLY BEFORE AND AFTER THAT CHANGE, and it
       is written down so nobody re-does the edit hunting for the effect. ***
   Nothing visible here is sized by the shell: the shell centres itself with
   margin auto, centres its one child with align-items: center, and that child
   caps its own prose at 46ch, so 700px and 900px put every glyph on the same
   pixel. The value still had to move, for two reasons that are about the future
   rather than about today. It makes the agreement REAL instead of coincidental,
   so this page cannot drift the way the legal pages just did. And the moment
   anything FULL-WIDTH lands in this shell - a footer band like the one the legal
   pages grew on 2026-08-19, a border, a surface - it will line up with every
   other page instead of stopping 200px short. If you ever need to see this value
   working, add a footer and look at its hairline; the numeral will never show
   it. */
.folio-notfound {
  max-width: var(--site-content-width);
  margin: 0 auto;
  padding: var(--space-24) var(--space-8);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Content column. Same flex-column + gap rhythm as .folio-impressum__content,
   plus align-items:center because this page is centered rather than read as a
   left-aligned document.

   THE VERTICAL CENTRING MOVED HERE ON 2026-08-17, FROM justify-content ON THE
   SHELL, AND IT IS A CORRECTNESS FIX RATHER THAN A REFACTOR. `margin-block:
   auto` on the single flex child centres identically while free space exists,
   but the two behave completely differently the moment the content is TALLER
   than the content box:

     justify-content: center   distributes the NEGATIVE free space evenly, so
                               the block overflows equally past BOTH edges. It
                               goes ABOVE the shell's padding-top and, since
                               2026-08-17, under the fixed nav bar.
     margin-block: auto        auto margins resolve to 0 when there is no free
                               space to absorb, so the block simply starts at
                               the content-box top edge - below the padding,
                               and therefore below the bar. It can only ever
                               overflow downward, where the page scrolls.

   That is not a theoretical case. The block is roughly 220px tall; a small
   phone in LANDSCAPE gives about 320px of viewport height, and the shell's own
   64px + 64px of padding at that tier leaves under 200px of content box. The
   old rule put the numeral behind the bar in exactly that orientation.
   Together with the `.folio-nav--static ~ .folio-notfound` top reservation in
   chunk 209425b8, this makes overlap impossible at every viewport rather than
   merely unlikely at the ones anybody tested.

   `margin-block` and not `margin: auto`: the horizontal axis is already
   handled by align-items on the shell, and auto margins in the cross axis
   would override it - working today by coincidence, and confusing to read. */
.folio-notfound__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  margin-block: auto;
}

/* The oversized numeral — the first beat, legible before any word is read.
   --font-size-display is the top of the type scale, so the numeral outweighs
   the .h2 heading below it without inventing a size. --text-muted keeps it
   quiet: it should read as context, not as a shout. */
.folio-notfound__code {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-muted);
  margin: 0;
}

/* Heading margin is zeroed because the parent's gap already carries the rhythm;
   leaving the base h1 margin in place would double the space. */
.folio-notfound__content h1 {
  margin: 0;
}

/* Prose paragraphs. SCOPED WITH :not() ON PURPOSE — the numeral above is also
   a <p>, and a plain `.folio-notfound__content p` selector (0,1,1) out-specifies
   the `.folio-notfound__code` class (0,1,0), which would silently override the
   numeral's color and margin. Excluding it here is cheaper to read than fighting
   specificity later. The 46ch measure matches the ch-based measures used by
   .folio-about__text and .folio-project-card__desc. */
.folio-notfound__content p:not(.folio-notfound__code) {
  max-width: 46ch;
  margin: 0;
  color: var(--text-secondary);
}

/* ⚠ RETIREMENT CANDIDATE since 2026-08-17 - NO CONSUMER REMAINS.
   404.html dropped its "Back to portfolio" link when the site nav landed on
   the page: the nav wordmark links to / and is permanently visible in static
   mode, so the in-content link was a fifth way home under three lines of copy
   that are deliberately calm and short.
   LEFT IN PLACE RATHER THAN DELETED, following the same convention the
   superseded .folio-about* / .folio-project-card* families in chunk 209425b8
   are held under: a rule whose only consumer just changed is deleted in a
   separate, deliberate sweep, not in the same edit that removed the consumer.
   GREP CONDITION FOR THAT SWEEP - delete both rules below when
   search_patterns(["folio-notfound__back"]) returns ONLY these two CSS rules
   and this banner, i.e. no template hit anywhere in the corpus. That is the
   state today; the condition is written out so the next agent can verify it
   rather than trust it.

   Return link - same treatment as .folio-impressum__back (inline-flex, small
   type, secondary color, accent-glow on hover, same transition). The margin
   flips to the top because here the link is the last beat rather than the
   first, and the extra step above the parent's gap gives the one action on
   the page a little room of its own. */
.folio-notfound__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  text-decoration: none;
  margin-top: var(--space-4);
  transition: color var(--duration-fast) var(--ease-out);
}

.folio-notfound__back:hover {
  color: var(--accent-glow);
}

/* Mobile: same padding step-down the hero takes at this breakpoint, and the
   numeral drops one stop down the type scale so it cannot crowd a narrow
   viewport. */
@media (max-width: 760px) {
  .folio-notfound {
    padding: var(--space-16) var(--space-4);
  }

  .folio-notfound__code {
    font-size: var(--font-size-h1);
  }
}
