/* ===========================================================================
   QF SITE CORE - shared front-end stylesheet
   Build 2026-09-23 - core version QF-CORE/1.1.0
   ---------------------------------------------------------------------------
   ONE stylesheet for every QryptoFederal market site. A site supplies TOKEN
   VALUES (themes/<site>.css) and nothing else. Components are defined here,
   exactly once, so a fix lands once and propagates to every site.

   ===========================================================================
   WHY THIS FILE EXISTS - four independent builds, one defect family
   ===========================================================================
   Four agents building four different sites hit the SAME class of bug, each
   patching it locally with a different patch:

     Wellspring Secure   1.47:1   `.band-ink a` (0,1,1) repainted a solid
                                  primary CTA sitting in a dark band.
     Trueacre Geo        2.95:1   `.nav-links a` (0,2,0) out-specified
                                  `.btn-primary` (0,1,0). Dark ink on amber.
     Metered Trust       3.24:1   the same selector pair, same failure.
     CoP Services Market 1.92:1   a PLAIN <a>. This agent had ALREADY written
                                  defensive .btn-primary / .btn-ghost band
                                  overrides up front, and those overrides
                                  HELD - the bug came through the side door.
                                  `.splitband a` inherited the global link
                                  colour (a dark teal picked for light
                                  grounds) and landed on a dark navy band.
                          3.95:1   and separately, a breadcrumb SEPARATOR -
                                  a genuine AA failure no button guard would
                                  ever have caught.

   The fourth site is the one that settles the design. Guarding the primary
   CTA is NECESSARY AND NOT SUFFICIENT. The real invariant is:

       ANY text- or link-coloured element sitting on a dark or gradient
       surface - plain anchors, breadcrumbs, separators, inline links,
       chips, captions, a component someone invents next month.

   ===========================================================================
   THE MECHANISM: A SURFACE DECLARES A FOREGROUND CONTRACT, AND EVERY
   DESCENDANT DERIVES FROM IT.  Inheritance, not specificity.
   ===========================================================================
   There is exactly ONE rule in this file that colours a paragraph, one that
   colours a heading, and one that colours a link:

       body, p, li, td, dd, dt { color: var(--qf-fg-muted); }
       h1, h2, h3, h4          { color: var(--qf-fg-strong); }
       a                       { color: var(--qf-link-on); }

   Those selectors are (0,0,1). They are never overridden and never need to
   be. What changes is the VALUE, because every surface reassigns the contract
   custom properties ON ITSELF:

       .band-ink, .hero, .site-footer, .cta-band, .card-dark, ... {
         --qf-fg-strong: #fff;
         --qf-fg-muted:  var(--qf-muted-dark);
         --qf-link-on:   var(--qf-link-dark);
         --qf-line-on:   var(--qf-line-dark);
         --qf-accent-on: var(--qf-signal-dark);
         background-color: var(--qf-dark);
       }

   Custom properties INHERIT down the DOM. So:

     * A plain <a> someone adds inside a dark band NEXT MONTH resolves
       `--qf-link-on` from the nearest ancestor that set it - the band - and
       comes out legible. No new selector. No band override. No specificity
       arithmetic. Nothing to remember. THAT is the CoP failure, closed by
       construction rather than by another guard.
     * A breadcrumb separator, a caption, a chip, a <small>, an <hr>, a
       table rule - all read the same contract, so all move together.
     * A LIGHT panel nested inside a dark band (.note, .card, .figure,
       .register) RESETS the contract back to the light values on itself, so
       its own text is correct without a single "re-assert" rule. That block
       of duplicated re-assert selectors two sites were hand-maintaining is
       deleted, not ported.

   SECOND GUARD - layer order, for the things that must NOT inherit.
   A button's foreground is not a derived value; it is half of a token pair.
   Layer order is declared once, on the next statement. In the cascade, LAYER
   ORDER IS EVALUATED BEFORE SPECIFICITY - specificity is only compared
   between declarations in the SAME layer. Everything that can paint a link,
   a band, a panel or a nav state is authored at or before `qf.nav`; the
   button's foreground is authored in `qf.action`, which is later. Ten chained
   classes in qf.band still lose to one class in qf.action.

   THIRD GUARD - `@layer qf.guard`, declared FIRST, using !important.
   Layer order alone is NOT enough, and the adversarial test proved it rather
   than the design assuming it. For IMPORTANT declarations the cascade
   REVERSES layer order: an earlier layer beats a later one, and unlayered
   important beats nothing - it is the WEAKEST important author origin. So a
   single `!important` in qf.band defeated qf.action on the first run of
   core/test_invariants.py, repainting a nav CTA to #101010.

   The fix follows from the same rule. `qf.guard` is the FIRST layer in the
   order and is the only place in the estate that uses !important. It asserts
   nothing but the action foreground token pairs. Precedence, from the
   cascade spec:

       qf.guard !important        >  any later layer's !important
       qf.guard !important        >  unlayered !important
       qf.guard !important        >  every normal declaration, layered or not

   Note what it does NOT do: it does not hard-code a colour. It asserts that
   the button's foreground IS `var(--qf-on-action)`. The value stays the
   theme's business; only the derivation is locked. That is why !important is
   defensible here and nowhere else in this file.

   FOURTH GUARD - the token pair. `.btn-primary` takes its ground from
   `--qf-action` and its foreground from `--qf-on-action`. `--qf-on-action`
   has no inherited fallback, so a theme cannot restyle the ground and
   quietly leave the foreground to chance.

   FIFTH GUARD - tooling, for the one boundary CSS cannot reach. An INLINE
   `style="color:...!important"` still wins, because inline important is the
   highest author precedence there is. That is measured, not assumed - see
   T7 in core/test_invariants.py. It is closed by a different mechanism:
   the deploy CSP is `style-src 'self'`, which drops inline styles entirely,
   and `propagate.py --check` FAILS any page carrying one. The same check
   FAILS a site stylesheet containing a rule outside an @layer block and a
   theme containing any selector but `:root`.

   ===========================================================================
   PROBE CORRECTNESS IS A STYLESHEET RESPONSIBILITY
   ===========================================================================
   Every gradient surface in this file sets an explicit `background-color`
   ALONGSIDE its `background-image`. This is not decoration.

   A contrast probe walks the ancestor chain for a resolved background. A
   gradient set through the `background` shorthand computes
   `background-color: transparent`, so the walk sails straight past a dark
   hero to the white body and measures white-on-white. On the CoP build that
   produced 124 FALSE failures - and by exactly the same mechanism it would
   have HIDDEN a real one. Making every gradient carry a solid fallback fixes
   the whole class at the source, instead of requiring every future harness
   to special-case it. Never use the `background:` shorthand for a gradient
   in this file; always `background-color` + `background-image`.

   ===========================================================================
   CSP: the deploy target serves `script-src 'self'; style-src 'self'`.
   Inline <style>, style="" and on* handlers are DROPPED SILENTLY. That is why
   the geometry utilities at the foot of this file exist. Use them; never a
   style attribute. No @import, no CDN, no web font, no third-party request.

   Browser floor: @layer and custom properties - Chrome/Edge 99+, Safari
   15.4+, Firefox 97+ (2022). Below that floor the file is ignored wholesale,
   which is a loud, obvious failure rather than a silent dark-on-dark one.
   =========================================================================== */

@layer qf.guard, qf.reset, qf.token, qf.theme, qf.base, qf.layout, qf.surface,
       qf.component, qf.nav, qf.tone, qf.action, qf.utility;

/* ===========================================================================
   LAYER  qf.guard  -  FIRST IN THE ORDER, AND THE ONLY !important IN THE
   ESTATE. Read the THIRD GUARD note at the top of this file before touching
   it, and do not add anything here that is not an action foreground.

   Because these are IMPORTANT declarations in the EARLIEST layer, they beat:
     - every normal declaration, in any layer, at any specificity, unlayered
       or not;
     - every !important declaration in any LATER layer (important reverses
       layer order);
     - every UNLAYERED !important (unlayered important is the weakest
       important author origin, not the strongest).
   They do not beat an inline style attribute carrying !important. Nothing in
   CSS does. That boundary is held by `style-src 'self'` and by
   propagate.py --check, and it is measured in core/test_invariants.py (T7).

   Ordering inside this layer is by specificity, then source order, exactly as
   normal. The sequence below is deliberate; read the comments before moving
   a rule.
   =========================================================================== */
@layer qf.guard {
  /* (0,1,0) - the base state of each variant */
  .btn-primary, .btn-primary:link, .btn-primary:visited,
  .btn-primary:focus, .btn-primary:focus-visible {
    color: var(--qf-on-action) !important;
  }
  .btn-secondary, .btn-secondary:link, .btn-secondary:visited { color: #ffffff !important; }
  .btn-ghost, .btn-ghost:link, .btn-ghost:visited { color: var(--qf-ink) !important; }

  /* (0,2,0) - ghost on a dark ground. MUST come before the :hover rules of
     equal specificity below, or hovering one would resolve to the light
     ghost's hover colour (white on white). */
  .btn-ghost.on-ink, .btn-ghost.on-dark, .btn-ghost-lt,
  .btn-ghost.on-ink:link, .btn-ghost.on-dark:link, .btn-ghost-lt:link,
  .btn-ghost.on-ink:visited, .btn-ghost.on-dark:visited, .btn-ghost-lt:visited {
    color: #ffffff !important;
  }

  /* (0,2,0) - hover states */
  .btn-primary:hover, .btn-primary:active { color: var(--qf-on-action-hover) !important; }
  .btn-secondary:hover { color: #ffffff !important; }
  .btn-ghost:hover { color: #ffffff !important; }

  /* (0,2,0) - the CTA-band inversion. Declared AFTER .btn-primary:hover so a
     hovered CTA-band button still lands on the (0,3,0) rule below rather than
     on the generic hover. */
  .cta-band .btn-primary, .qf-cta-band .btn-primary { color: var(--qf-on-cta-action) !important; }

  /* (0,3,0) - the states that must outrank everything above */
  .btn-ghost.on-ink:hover, .btn-ghost.on-dark:hover, .btn-ghost-lt:hover {
    color: var(--qf-ink) !important;
  }
  .cta-band .btn-primary:hover, .qf-cta-band .btn-primary:hover {
    color: var(--qf-on-cta-action-hover) !important;
  }

  /* A disabled control must still be readable enough to be identified. */
  .btn[disabled], .btn:disabled { opacity: .55 !important; }
}

/* ===========================================================================
   LAYER  qf.reset
   =========================================================================== */
@layer qf.reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
  img { max-width: 100%; display: block; }
  svg { max-width: 100%; }
}

/* ===========================================================================
   LAYER  qf.token - DEFAULTS ONLY
   A theme overrides these in qf.theme. Every default here renders legibly on
   its own, so a missing theme degrades to a plain, AA-clean grey site rather
   than to an unreadable one.
   =========================================================================== */
@layer qf.token {
  :root {
    /* --- PALETTE: grounds ---------------------------------------------- */
    --qf-page:          #f4f4f5;
    --qf-panel:         #e9e9ec;
    --qf-panel-2:       #dedee3;
    --qf-surface:       #ffffff;
    --qf-dark:          #16181c;
    --qf-dark-2:        #0d0f12;
    --qf-dark-3:        #232830;

    /* --- PALETTE: ink --------------------------------------------------- */
    --qf-ink:           #16181c;   /* headings + body on a LIGHT ground */
    --qf-muted:         #4c545c;   /* secondary text on LIGHT   >= 7:1 */
    --qf-on-dark:       #ffffff;   /* headings on a DARK ground */
    --qf-muted-dark:    #b9bfc6;   /* secondary text on DARK    >= 9:1 */
    --qf-lead-dark:     #dde1e6;   /* lead paragraph on DARK */

    /* --- PALETTE: rules -------------------------------------------------- */
    --qf-line:          #c8cace;
    --qf-line-soft:     #e0e1e4;
    --qf-line-dark:     #343b44;

    /* --- PALETTE: link + accent, PAIRED TO A GROUND ---------------------
       Every colour below names the ground it is legible on. A value never
       crosses: --qf-link is for light grounds, --qf-link-dark for dark.
       The CoP defect was a --qf-link value landing on a dark ground. */
    --qf-link:          #2d4f6b;   /* link/accent text on LIGHT  >= 6:1 */
    --qf-link-hover:    #1f3b52;
    --qf-link-dark:     #a9c6dd;   /* link/accent text on DARK   >= 7:1 */
    --qf-link-dark-hover: #ffffff;
    --qf-accent:        #4d7ea3;   /* RULES, FILLS, 3-5px edges ONLY.
                                      never body-size text on light. */
    --qf-accent-pale:   #e2e9ef;
    --qf-on-accent-pale:#2b3a46;
    --qf-signal:        #8a5a12;   /* second accent, text on LIGHT */
    --qf-signal-dark:   #d7a15a;   /* second accent, text on DARK  */
    --qf-signal-pale:   #f5eee2;
    --qf-on-signal-pale:#4a3a22;

    /* --- ACTION TOKEN PAIR - both or neither ---------------------------- */
    --qf-action:        #2d4f6b;
    --qf-action-hover:  #1f3b52;
    --qf-on-action:     #ffffff;
    --qf-on-action-hover: #ffffff;

    /* =====================================================================
       THE FOREGROUND CONTRACT.
       These seven properties are what EVERY text rule in qf.base reads.
       The values here are the LIGHT-SURFACE contract. Each dark surface
       reassigns them on itself in qf.surface, and each light panel nested
       in a dark band reassigns them BACK. Nothing else colours text.
       ===================================================================== */
    --qf-fg-strong:     var(--qf-ink);        /* headings, <strong>        */
    --qf-fg:            var(--qf-ink);        /* default flowing text      */
    --qf-fg-muted:      var(--qf-muted);      /* body copy, captions, cells*/
    --qf-fg-lead:       var(--qf-muted);      /* .lead                     */
    --qf-link-on:       var(--qf-link);       /* EVERY <a>, incl. new ones */
    --qf-link-on-hover: var(--qf-link-hover);
    --qf-line-on:       var(--qf-line);       /* every hairline + separator*/
    --qf-line-on-soft:  var(--qf-line-soft);
    --qf-accent-on:     var(--qf-signal);     /* eyebrows, keys, kickers   */
    --qf-focus-on:      var(--qf-signal);     /* focus ring on this surface*/

    /* --- header / nav ---------------------------------------------------- */
    --qf-header-bg:     var(--qf-dark);
    --qf-header-fg:     var(--qf-on-dark);
    --qf-header-link:   #dbe1e6;
    --qf-header-link-hover: #ffffff;
    --qf-header-sub:    var(--qf-link-dark);
    --qf-header-border: 3px solid var(--qf-accent);
    --qf-header-position: static;
    --qf-header-toggle-border: #5f6b76;
    --qf-header-tone-dark: 1;      /* documentation token; see qf.nav note */
    --qf-nav-underline:  var(--qf-accent);
    --qf-nav-active-underline: var(--qf-signal-dark);
    --qf-nav-active-fg:  #ffffff;
    --qf-nav-hover-bg:   transparent;
    --qf-nav-gap:        20px;
    --qf-nav-link-pad:   6px 0;
    --qf-nav-btn-gap:    8px;
    --qf-nav-drawer-bg:  var(--qf-dark-2);
    --qf-nav-drawer-line:#242c34;
    --qf-nav-h:          74px;

    /* --- hero: SOLID + IMAGE kept separate. See "PROBE CORRECTNESS". ----- */
    --qf-hero-bg:       var(--qf-dark);   /* MUST be an opaque colour */
    --qf-hero-image:    none;             /* gradient layers, optional */
    --qf-hero-border:   0 none;
    --qf-hero-field-opacity: .5;
    --qf-hero-art-w:    480px;
    --qf-hero-art-right: 0;

    /* --- footer ---------------------------------------------------------- */
    --qf-footer-bg:     var(--qf-dark-2);
    --qf-footer-link:   #c6cdd3;
    --qf-footer-border: 3px solid var(--qf-accent);
    --qf-footer-rule:   #242c34;
    --qf-footer-meta:   #99a2aa;

    /* --- CTA band: SOLID + IMAGE kept separate --------------------------- */
    --qf-cta-bg:        var(--qf-action-hover);
    --qf-cta-image:     none;
    --qf-cta-action:    var(--qf-action);
    --qf-on-cta-action: var(--qf-on-action);
    --qf-cta-action-hover: var(--qf-action-hover);
    --qf-on-cta-action-hover: var(--qf-on-action-hover);

    /* --- C2 handling line ------------------------------------------------ */
    --qf-handling-bg:   #4a1116;
    --qf-handling-fg:   #ffdde1;
    --qf-handling-line: #c2626c;
    --qf-handling-key:  #ffb3bc;

    /* --- page ground decoration (graph paper, dot grid) ------------------ */
    --qf-page-image:    none;
    --qf-page-image-size: auto;
    --qf-page-image-pos:  0 0;
    --qf-graph-line:    rgba(60,80,95,.07);

    /* --- brand mark part hooks (opt-in; unused parts cost nothing) ------- */
    --qf-mark-1:        var(--qf-action);
    --qf-mark-2:        var(--qf-accent);
    --qf-mark-3:        var(--qf-signal);

    /* --- COMPONENT SHAPE TOKENS ------------------------------------------
       A site's identity is its token VALUES. These exist so a theme can
       express a shape difference WITHOUT redefining a component. A theme
       needing a shape not listed here gets the token added to the core - it
       never gets to restate the rule. */
    --qf-card-border-top: var(--qf-border) solid var(--qf-line-on);
    --qf-card-tick-w:   0;
    --qf-card-tick-h:   4px;
    --qf-card-tick:     var(--qf-accent);
    --qf-card-flat-bg:  var(--qf-panel);
    --qf-card-flat-edge: var(--qf-border) solid var(--qf-line-on);
    --qf-eyebrow-edge:  0 none;
    --qf-eyebrow-pad:   0;
    --qf-step-bg:       var(--qf-action);
    --qf-step-fg:       var(--qf-on-action);
    --qf-step-border:   1px solid var(--qf-action);
    --qf-step-w:        38px;
    --qf-chip-radius:   var(--qf-radius);
    --qf-input-line:    #98a0a8;
    --qf-label-font:    var(--qf-sans);
    --qf-label-tracking: 0;
    --qf-label-transform: none;
    --qf-wordmark-transform: none;
    --qf-wordmark-tracking: 0;
    /* a brand whose wordmark is set in a different face from the headings
       (Blast Shield: Roman serif caps beside a sans body) changes the VALUE
       here. It never restates the .brand-name rule. */
    --qf-wordmark-font:  var(--qf-head);
    --qf-brand-mark-size:  36px;
    --qf-footer-mark-size: 34px;

    /* --- geometry --------------------------------------------------------- */
    --qf-wrap:          1140px;
    --qf-wrap-narrow:   820px;
    --qf-radius:        2px;
    --qf-border:        1px;
    --qf-border-accent: 3px;
    --qf-section-y:     66px;
    --qf-section-y-tight: 44px;
    --qf-grid-gap:      22px;
    --qf-split-gap:     46px;

    /* --- type -------------------------------------------------------------- */
    --qf-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --qf-head: var(--qf-sans);
    --qf-mono: "Cascadia Mono", Consolas, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
    --qf-body-size:     17px;
    --qf-body-size-sm:  16px;
    --qf-line-height:   1.62;
    --qf-h1:            2.5rem;
    --qf-h2:            1.8rem;
    --qf-h3:            1.14rem;
    --qf-h4:            .94rem;
    --qf-head-weight:   700;
    --qf-head-tracking: -.014em;
    --qf-btn-font:      var(--qf-sans);
    --qf-btn-size:      .94rem;
    --qf-btn-weight:    600;
    --qf-btn-tracking:  .005em;
    --qf-btn-transform: none;
    --qf-btn-pad:       12px 21px;
    --qf-btn-border-w:  1px;
  }
}

/* ===========================================================================
   LAYER  qf.theme - intentionally empty here.
   themes/<site>.css declares `@layer qf.theme { :root { ... } }` and contains
   NOTHING ELSE. Enforced by propagate.py --check.
   =========================================================================== */
@layer qf.theme { /* supplied by themes/<site>.css */ }

/* ===========================================================================
   LAYER  qf.base
   THE ONLY PLACE TEXT IS COLOURED. Every rule below reads the foreground
   contract. Do not add a colour declaration to a band, a panel or a nav
   descendant anywhere else in this file - reassign the contract instead.
   =========================================================================== */
@layer qf.base {
  body {
    margin: 0;
    background-color: var(--qf-page);      /* explicit; see PROBE CORRECTNESS */
    background-image: var(--qf-page-image);
    background-size: var(--qf-page-image-size);
    background-position: var(--qf-page-image-pos);
    color: var(--qf-fg);
    font-family: var(--qf-sans);
    font-size: var(--qf-body-size);
    line-height: var(--qf-line-height);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* --- the three rules that colour text ------------------------------- */
  h1, h2, h3, h4, h5, h6 {
    color: var(--qf-fg-strong);
    font-family: var(--qf-head);
    font-weight: var(--qf-head-weight);
    line-height: 1.17;
    letter-spacing: var(--qf-head-tracking);
    margin: 0 0 .5em;
  }
  p, li, dd, dt, td, th, figcaption, caption, blockquote, small, label, span.txt {
    color: var(--qf-fg-muted);
  }
  a { color: var(--qf-link-on); text-underline-offset: 3px; }
  a:hover { color: var(--qf-link-on-hover); }

  h1 { font-size: var(--qf-h1); }
  h2 { font-size: var(--qf-h2); }
  h3 { font-size: var(--qf-h3); }
  h4 { font-size: var(--qf-h4); }
  p  { margin: 0 0 1.05em; }
  strong, b, dt { color: var(--qf-fg-strong); }

  .lead  { font-size: 1.13rem; line-height: 1.66; color: var(--qf-fg-lead); }
  .small { font-size: .89rem; color: var(--qf-fg-muted); }
  .muted { color: var(--qf-fg-muted); }
  .kv    { font-family: var(--qf-mono); font-size: .81rem; color: var(--qf-fg-muted); }

  hr, .hr { border: 0; border-top: 1px solid var(--qf-line-on); margin: 24px 0; }

  /* --- the eyebrow / kicker / key: an ACCENT that follows the surface --- */
  .eyebrow, .kicker, .tier-tag, .r-label {
    display: inline-block; font-family: var(--qf-mono); font-size: .71rem;
    letter-spacing: .19em; text-transform: uppercase;
    color: var(--qf-accent-on);
    margin: 0 0 14px; font-weight: 700;
    border-left: var(--qf-eyebrow-edge); padding-left: var(--qf-eyebrow-pad);
    border-left-color: var(--qf-accent-on);
  }
  /* `.on-ink` / `.on-dark` on an eyebrow are legacy no-ops now: the surface
     already supplies the right accent. Kept so old markup is harmless. */

  /* --- BREADCRUMBS AND SEPARATORS --------------------------------------
     A breadcrumb separator measured 3.95:1 on one build - a real AA failure
     that no button-focused guard could ever have seen, because it is not a
     button and not even a link. Separators are text. They read the contract
     like everything else, and they are set at --qf-fg-muted (never a lighter
     "decorative" grey), so they move with the surface automatically. */
  .crumbs, .breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    list-style: none; margin: 0 0 16px; padding: 0;
    font-size: .86rem; color: var(--qf-fg-muted);
  }
  .crumbs li, .breadcrumb li { color: var(--qf-fg-muted); display: flex; align-items: center; gap: 8px; }
  .crumbs a, .breadcrumb a { color: var(--qf-link-on); }
  .crumbs [aria-current="page"], .breadcrumb [aria-current="page"] { color: var(--qf-fg-strong); }
  .crumbs .sep, .breadcrumb .sep, .sep {
    color: var(--qf-fg-muted);        /* NOT a decorative light grey */
    speak: none;
  }
  .crumbs li + li::before, .breadcrumb li + li::before {
    content: var(--qf-sep-glyph, "/");
    color: var(--qf-fg-muted);
  }

  /* --- skip link: the first tab stop on every page ---------------------- */
  .skip {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background-color: var(--qf-dark); color: #fff;
    padding: 12px 18px; font-weight: 700; font-size: .93rem; text-decoration: none;
  }
  .skip:focus { left: 8px; top: 8px; }

  /* --- focus visibility (WCAG 2.4.7). Follows the surface, never removed. */
  a:focus-visible, button:focus-visible, input:focus-visible,
  textarea:focus-visible, select:focus-visible, summary:focus-visible,
  [tabindex]:focus-visible {
    outline: 3px solid var(--qf-focus-on);
    outline-offset: 2px;
    border-radius: 2px;
  }

  .vh {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }

  @media (max-width: 700px) {
    h1 { font-size: clamp(1.66rem, 7vw, 1.95rem); }
    h2 { font-size: 1.42rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
  }
  @media print {
    .site-header, .masthead, .nav-toggle, .hero-field, .hero-rows, .hero-grid, .hero-art { display: none; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .card, .figure, .register, .grade-table { break-inside: avoid; }
  }
}

/* ===========================================================================
   LAYER  qf.layout - geometry only. NO COLOUR IN THIS LAYER.
   =========================================================================== */
@layer qf.layout {
  .wrap { width: 100%; max-width: var(--qf-wrap); margin: 0 auto; padding: 0 24px; }
  .wrap.narrow, .wrap-narrow, .narrow { max-width: var(--qf-wrap-narrow); }
  .wrap-narrow { width: 100%; margin: 0 auto; padding: 0 24px; }
  main { display: block; }

  section { padding: var(--qf-section-y) 0; }
  .tight, .section-tight { padding: var(--qf-section-y-tight) 0; }
  .center { text-align: center; }

  .grid { display: grid; gap: var(--qf-grid-gap); }
  .g2, .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4, .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .split {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--qf-split-gap); align-items: start;
  }

  /* Grid and flex children default to min-width:auto, so one wide child can
     push its track past the viewport and scroll the PAGE sideways. Pinning
     to 0 keeps every contained scroll contained. This one rule is why no
     migrated site scrolls horizontally at 390px. */
  .split > *, .grid > *, .strip > *, .tiers > *, .steps > *, .step > *,
  .article > *, .form-grid > *, .footer-grid > *, .spec > div > * { min-width: 0; }

  .stack-lg > * + * { margin-top: 20px; }
  .rule { height: 2px; background-color: var(--qf-fg-strong); margin: 0 0 26px; width: 60px; }
  .rule.light { background-color: var(--qf-accent); }

  /* RESPONSIVE - and ONLY for the grids DECLARED IN THIS LAYER.
     A media rule can only beat a base rule that is in the same layer or an
     earlier one. .strip is declared in qf.surface; .footer-grid, .form-grid,
     .article, .tiers, .ticks.two and .spec>div are declared in qf.component -
     both LATER than qf.layout. Their responsive overrides used to be written
     here and were therefore DEAD: a phone kept a three-column stat strip and
     a four-column footer on every site in the estate, and nothing failed,
     because min-width:0 above stops the page scrolling sideways and the
     contrast probe has no opinion about a cramped column. Found by rendering
     Blast Shield at 390px and LOOKING at it.
     Each of those now lives beside its own declaration, in its own layer. */
  @media (max-width: 1040px) {
    .split { grid-template-columns: minmax(0, 1fr); gap: 34px; }
    .g4, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 900px) {
    .g3, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 700px) {
    body { font-size: var(--qf-body-size-sm); }
    section { padding: 48px 0; }
    .g2, .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .wrap, .wrap-narrow { padding: 0 18px; }
  }
  @media (max-width: 480px) {
    .g4, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  }
}

/* ===========================================================================
   LAYER  qf.surface
   ---------------------------------------------------------------------------
   THE CONTRACT LAYER. Every rule here does two things and ONLY two things:
       1. set an opaque `background-color` (plus an optional background-image)
       2. reassign the foreground contract to match that ground
   No rule in this layer colours a descendant with a descendant selector.
   That is what makes a plain <a>, a separator or a component invented next
   month correct without touching this file.
   =========================================================================== */
@layer qf.surface {

  /* =====================================================================
     A. THE DARK SURFACE CONTRACT.
     One rule. Every dark ground in the estate is in this selector list.
     ADDING A NEW DARK SURFACE = ADD ITS CLASS HERE. That is the entire
     maintenance obligation, and forgetting it is caught by the render
     harness, which probes every text node on every page at both widths.
     ===================================================================== */
  .band-ink, .band-dark, .bg-dark, .qf-band-dark, .qf-dark,
  .hero, .qf-hero, .page-head, .qf-page-head,
  .site-footer, .qf-footer,
  .card-ink, .card-dark, .qf-card-dark,
  .readout, .qf-readout,
  .figure.on-ink, .figure.on-dark, .qf-figure.on-dark,
  .handling, .qf-handling,
  .site-header.qf-dark-header, .masthead {
    --qf-fg-strong:     #ffffff;
    --qf-fg:            var(--qf-on-dark);
    --qf-fg-muted:      var(--qf-muted-dark);
    --qf-fg-lead:       var(--qf-lead-dark);
    --qf-link-on:       var(--qf-link-dark);
    --qf-link-on-hover: var(--qf-link-dark-hover);
    --qf-line-on:       var(--qf-line-dark);
    --qf-line-on-soft:  var(--qf-line-dark);
    --qf-accent-on:     var(--qf-signal-dark);
    --qf-focus-on:      var(--qf-signal-dark);
    color: var(--qf-fg);
  }

  /* =====================================================================
     B. THE LIGHT SURFACE CONTRACT (the RESET).
     A light panel nested inside a dark band resets the contract on itself,
     so its own text is right with no "re-assert" block anywhere. Two sites
     were hand-maintaining ~25 duplicated re-assert selectors each; those
     are deleted, not ported.
     ===================================================================== */
  .card, .qf-card, .card-flat, .qf-card-flat,
  .note, .qf-note, .note-blue, .note-cool, .note-amber,
  .limit, .qf-limit,
  .figure, .qf-figure,
  .register, .grade-table, .qf-table,
  .strip, .qf-strip, .strip > div,
  .formbox, .qf-formbox,
  .tier, .qf-tier,
  .band-panel, .band-sheet, .bg-panel, .qf-band-panel,
  .bg-white, .qf-band-white,
  .band-blue, .band-copper, .bg-field, .qf-band-accent,
  .site-header.qf-light-header {
    --qf-fg-strong:     var(--qf-ink);
    --qf-fg:            var(--qf-ink);
    --qf-fg-muted:      var(--qf-muted);
    --qf-fg-lead:       var(--qf-muted);
    --qf-link-on:       var(--qf-link);
    --qf-link-on-hover: var(--qf-link-hover);
    --qf-line-on:       var(--qf-line);
    --qf-line-on-soft:  var(--qf-line-soft);
    --qf-accent-on:     var(--qf-signal);
    --qf-focus-on:      var(--qf-signal);
    color: var(--qf-fg);
  }
  /* these two override B's contract AGAIN for their own tinted ground */
  .figure.on-ink, .figure.on-dark { color: var(--qf-muted-dark); }

  /* =====================================================================
     A2. THE CTA BAND HAS ITS OWN CONTRACT, NOT THE GENERIC DARK ONE.
     Found by core/test_invariants.py, not by reading: the CTA band borrowed
     the dark contract, whose --qf-link-dark and --qf-muted-dark are tuned
     against --qf-dark. On Metered Trust the CTA ground is #075a8a - a
     mid-tone blue, not a near-black - and those borrowed values measured
     3.88:1 (a plain anchor) and 3.33:1 (a separator, a caption). The page
     as authored only ever put a heading and a button there, so the render
     pass was clean; the injected anchor is what exposed it.

     The lesson generalises: a surface with its OWN ground needs its OWN
     contract. Borrowing a neighbour's is how a value drifts onto a ground it
     was never measured against.

     The defaults below are all pure white, which is safe on ANY ground dark
     enough to be a CTA band. A theme may soften them; if it softens them too
     far, T1/T2/T3 in test_invariants.py fails that theme by name.
     ===================================================================== */
  .cta-band, .qf-cta-band {
    --qf-fg-strong:     #ffffff;
    --qf-fg:            #ffffff;
    --qf-fg-muted:      var(--qf-cta-muted, #ffffff);
    --qf-fg-lead:       var(--qf-cta-muted, #ffffff);
    --qf-link-on:       var(--qf-cta-link, #ffffff);
    --qf-link-on-hover: #ffffff;
    --qf-accent-on:     var(--qf-cta-accent, #ffffff);
    --qf-line-on:       rgba(255, 255, 255, .35);
    --qf-line-on-soft:  rgba(255, 255, 255, .22);
    --qf-focus-on:      #ffffff;
    color: #ffffff;
  }

  /* ---- C. the grounds -------------------------------------------------- */
  .band-ink, .band-dark, .bg-dark, .qf-band-dark, .qf-dark {
    background-color: var(--qf-dark);
  }
  .band-panel, .band-sheet, .bg-panel, .qf-band-panel {
    background-color: var(--qf-panel);
    border-top: var(--qf-border) solid var(--qf-line);
    border-bottom: var(--qf-border) solid var(--qf-line);
  }
  .bg-white, .qf-band-white {
    background-color: var(--qf-surface);
    border-top: var(--qf-border) solid var(--qf-line);
    border-bottom: var(--qf-border) solid var(--qf-line);
  }
  .band-blue, .band-copper, .bg-field, .qf-band-accent {
    background-color: var(--qf-accent-pale);
    --qf-fg-muted: var(--qf-on-accent-pale);
    --qf-fg-lead:  var(--qf-on-accent-pale);
    border-top: var(--qf-border) solid var(--qf-accent);
    border-bottom: var(--qf-border) solid var(--qf-accent);
  }

  /* graph-paper / dot-grid ground: background-color is explicit so a probe
     resolves a real colour rather than `transparent`. */
  .graph, .qf-graph {
    background-color: var(--qf-page);
    background-image:
      linear-gradient(to right, var(--qf-graph-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--qf-graph-line) 1px, transparent 1px);
    background-size: 26px 26px;
  }

  /* ---- D. cards --------------------------------------------------------- */
  .card, .qf-card {
    background-color: var(--qf-surface);
    border: var(--qf-border) solid var(--qf-line);
    border-top: var(--qf-card-border-top);
    border-radius: var(--qf-radius);
    padding: 24px 22px;
    position: relative;
  }
  /* drawing-sheet corner tick. Width defaults to 0, so it costs nothing on a
     site that does not want it and no site needs a rule to remove it. */
  .card::before, .qf-card::before {
    content: ""; position: absolute; top: -1px; left: -1px;
    width: var(--qf-card-tick-w); height: var(--qf-card-tick-h);
    background-color: var(--qf-card-tick);
  }
  .card.corner-tick::before, .qf-card.corner-tick::before { width: 22px; }
  .card h3, .qf-card h3 { margin-top: 0; margin-bottom: .32em; }
  .card p, .card li, .qf-card p, .qf-card li { font-size: .96rem; margin-bottom: 0; }
  .card p + p, .qf-card p + p { margin-top: .7em; }
  .card .num, .card .idx, .qf-card .num, .qf-card .idx {
    font-family: var(--qf-mono); font-size: .71rem; letter-spacing: .16em;
    color: var(--qf-accent-on); display: block; margin-bottom: 9px; font-weight: 700;
  }
  .card .ic, .qf-card .ic { width: 38px; height: 38px; margin-bottom: 12px; display: block; }
  .card.accent-top, .qf-card.accent-top { border-top: var(--qf-border-accent) solid var(--qf-accent); }
  .card.accent-amber, .qf-card.accent-amber { border-top: var(--qf-border-accent) solid var(--qf-signal); }

  .card-flat, .qf-card-flat {
    background-color: var(--qf-card-flat-bg);
    border: var(--qf-border) solid var(--qf-line);
    border-left: var(--qf-card-flat-edge);
    border-radius: var(--qf-radius); padding: 22px;
  }
  .card-flat h3, .qf-card-flat h3 { margin-top: 0; }
  .card-flat p, .card-flat li { font-size: .96rem; margin-bottom: 0; }

  .card-ink, .card-dark, .qf-card-dark {
    background-color: var(--qf-dark-3);
    border: var(--qf-border) solid var(--qf-line-dark);
    border-left: var(--qf-border-accent) solid var(--qf-accent);
    border-radius: var(--qf-radius); padding: 22px; position: relative;
  }
  .card-ink h3, .card-dark h3 { margin-top: 0; }
  .card-ink p, .card-ink li, .card-dark p, .card-dark li { margin-bottom: 0; font-size: .96rem; }

  /* ---- E. callouts ------------------------------------------------------ */
  .note, .qf-note, .note-blue, .note-cool {
    border-left: 4px solid var(--qf-accent);
    background-color: var(--qf-accent-pale);
    --qf-fg-muted: var(--qf-on-accent-pale);
    --qf-fg:       var(--qf-on-accent-pale);
    padding: 18px 20px; font-size: .95rem;
    border-radius: 0 var(--qf-radius) var(--qf-radius) 0;
    color: var(--qf-on-accent-pale);
  }
  .note h3, .qf-note h3, .note-blue h3, .note-cool h3 { margin-top: 0; }
  .note p:last-child, .qf-note p:last-child,
  .note-blue p:last-child, .note-cool p:last-child { margin-bottom: 0; }

  .note.amber, .note-amber, .qf-note.amber {
    border-left-color: var(--qf-signal);
    background-color: var(--qf-signal-pale);
    --qf-fg-muted: var(--qf-on-signal-pale);
    --qf-fg:       var(--qf-on-signal-pale);
    color: var(--qf-on-signal-pale);
  }
  .note.plain, .qf-note.plain {
    border-left-color: var(--qf-line);
    background-color: var(--qf-panel);
    --qf-fg-muted: var(--qf-muted);
    --qf-fg:       var(--qf-ink);
    color: var(--qf-ink);
  }

  .limit, .qf-limit {
    background-color: var(--qf-surface);
    border: var(--qf-border) solid var(--qf-line);
    border-top: var(--qf-border-accent) solid var(--qf-ink);
    padding: 20px 22px;
  }
  .limit h3, .qf-limit h3 { margin: 0 0 8px; font-size: 1rem; }
  .limit p, .limit li { font-size: .95rem; margin-bottom: 0; }

  /* ---- F. the C2 handling line ------------------------------------------ */
  .handling, .qf-handling {
    background-color: var(--qf-handling-bg);
    --qf-fg-muted: var(--qf-handling-fg);
    --qf-fg:       var(--qf-handling-fg);
    --qf-fg-strong: var(--qf-handling-key);
    --qf-link-on:  #ffe0e4;
    --qf-link-on-hover: #ffffff;
    color: var(--qf-handling-fg);
    border-bottom: 2px solid var(--qf-handling-line);
    font-size: 12.5px; letter-spacing: .02em;
  }
  .handling .wrap, .qf-handling .wrap {
    padding-top: 8px; padding-bottom: 8px;
    display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  }
  .handling b, .qf-handling b {
    letter-spacing: .1em; text-transform: uppercase;
    font-size: 11.5px; white-space: nowrap;
  }

  /* ---- G. tables --------------------------------------------------------- */
  .register, .grade-table, .qf-table {
    width: 100%; border-collapse: collapse; font-size: .92rem;
    background-color: var(--qf-surface);
    border: var(--qf-border) solid var(--qf-line);
  }
  .register caption, .grade-table caption, .qf-table caption {
    text-align: left; font-family: var(--qf-mono); font-size: .71rem;
    letter-spacing: .15em; text-transform: uppercase;
    padding: 0 0 10px; font-weight: 700;
  }
  .register th, .register td, .grade-table th, .grade-table td,
  .qf-table th, .qf-table td {
    text-align: left; padding: 12px 14px; vertical-align: top;
    border-bottom: var(--qf-border) solid var(--qf-line-on-soft);
  }
  /* the table head is a DARK SURFACE - so it declares the dark contract,
     exactly like a band. A link dropped into a header cell is then correct. */
  .register thead th, .grade-table thead th, .qf-table thead th {
    background-color: var(--qf-dark);
    --qf-fg-strong: #ffffff;
    --qf-fg-muted:  #ffffff;
    --qf-link-on:   var(--qf-link-dark);
    color: #ffffff;
    font-family: var(--qf-mono); font-size: .7rem; letter-spacing: .13em;
    text-transform: uppercase; font-weight: 700; border-bottom: 0;
  }
  .register tbody tr:nth-child(even), .qf-table tbody tr:nth-child(even) {
    background-color: var(--qf-page);
  }
  .register td p, .grade-table td p, .qf-table td p { margin: 0; font-size: .92rem; }
  .register th[scope="row"], .grade-table tbody th, .qf-table th[scope="row"] {
    color: var(--qf-fg-strong); font-weight: 700;
  }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .spec, .qf-spec { margin: 0; padding: 0; border-top: var(--qf-border) solid var(--qf-line-on); }
  .spec > div, .qf-spec > div {
    display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px;
    padding: 15px 0; border-bottom: var(--qf-border) solid var(--qf-line-on);
  }
  .spec dt, .qf-spec dt {
    font-family: var(--qf-mono); font-size: .75rem; letter-spacing: .1em;
    text-transform: uppercase; font-weight: 700;
  }
  .spec dd, .qf-spec dd { margin: 0; font-size: .96rem; }

  /* ---- H. figures --------------------------------------------------------- */
  .figure, .qf-figure {
    margin: 0; background-color: var(--qf-surface);
    border: var(--qf-border) solid var(--qf-line-on);
    border-radius: var(--qf-radius); padding: 18px;
  }
  .figure svg, .qf-figure svg { display: block; width: 100%; height: auto; }
  .figure figcaption, .qf-figure figcaption {
    margin-top: 14px; padding-top: 12px;
    border-top: var(--qf-border) solid var(--qf-line-on-soft);
    font-size: .86rem;
  }
  .fig-cap {
    font-family: var(--qf-mono); font-size: .69rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--qf-fg-muted); margin-top: 12px;
  }
  .figure:has(> .plate), .qf-figure:has(> .plate) { padding: 0; }
  .figure .plate, .qf-figure .plate { padding: 18px 18px 8px; }
  .figure:has(> .plate) figcaption, .qf-figure:has(> .plate) figcaption {
    margin-top: 0; padding: 14px 18px;
    background-color: var(--qf-page);
    border-top: var(--qf-border) solid var(--qf-line-on);
  }
  .figure .titleblock, .qf-figure .titleblock {
    display: flex; flex-wrap: wrap; gap: 0;
    border-top: var(--qf-border) solid var(--qf-line-on);
    font-family: var(--qf-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  }
  .figure .titleblock span, .qf-figure .titleblock span {
    padding: 8px 14px; border-right: var(--qf-border) solid var(--qf-line-on);
    color: var(--qf-fg-muted); background-color: var(--qf-surface);
  }
  .figure .titleblock span:last-child { border-right: 0; }
  .figure .titleblock b { color: var(--qf-fg-strong); font-weight: 700; }

  .figure.on-ink, .figure.on-dark, .qf-figure.on-dark {
    background-color: var(--qf-dark-3);
    border-color: var(--qf-line-dark);
  }
  .figure.on-ink figcaption, .figure.on-dark figcaption {
    background-color: var(--qf-dark-2);
  }
  .figure.on-dark .titleblock span {
    background-color: var(--qf-dark-3); border-right-color: var(--qf-line-dark);
  }

  /* ---- I. stat / spec strip ----------------------------------------------- */
  .strip, .qf-strip {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
    background-color: var(--qf-line);
    border: var(--qf-border) solid var(--qf-line);
  }
  .strip > div, .qf-strip > div { background-color: var(--qf-surface); padding: 22px 20px; }
  .strip .k, .qf-strip .k {
    font-family: var(--qf-mono); font-size: .69rem; letter-spacing: .15em;
    text-transform: uppercase; color: var(--qf-accent-on); display: block;
    margin-bottom: 8px; font-weight: 700;
  }
  .strip .v, .qf-strip .v { font-size: 1.01rem; font-weight: 700; color: var(--qf-fg-strong); display: block; margin-bottom: 6px; }
  .strip p, .qf-strip p { font-size: .9rem; margin: 0; }

  /* ---- J. instrument readout (a dark inset panel) -------------------------- */
  .readout, .qf-readout {
    background-color: var(--qf-dark);
    border: var(--qf-border) solid var(--qf-line-dark);
    padding: 18px 20px; font-family: var(--qf-mono);
  }
  .readout .r-label, .qf-readout .r-label {
    font-size: .64rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--qf-link-dark); display: block; margin-bottom: 8px; margin-right: 0;
  }
  .readout .r-value, .qf-readout .r-value { font-size: 1.02rem; color: #fff; letter-spacing: .04em; display: block; }
  .readout .r-note, .qf-readout .r-note { font-size: .72rem; display: block; margin-top: 8px; }

  /* ---- K. responsive, IN THIS LAYER ---------------------------------------
     These two are declared above, in qf.surface. Their collapse rules were
     authored in qf.layout - an EARLIER layer - and so never applied. See the
     note in qf.layout. */
  @media (max-width: 900px) {
    .spec > div, .qf-spec > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  }
  @media (max-width: 700px) {
    .strip, .qf-strip { grid-template-columns: minmax(0, 1fr); }
  }
}

/* ===========================================================================
   LAYER  qf.component
   =========================================================================== */
@layer qf.component {
  /* ---- hero -------------------------------------------------------------
     background-color and background-image are set SEPARATELY and the colour
     is always opaque. A gradient written through the `background` shorthand
     computes `background-color: transparent`, which makes an ancestor-walking
     contrast probe measure the white body behind the hero. On one build that
     produced 124 false failures and would have hidden a real one just as
     easily. Never use the shorthand for a gradient in this file.            */
  .hero, .qf-hero {
    position: relative; overflow: hidden;
    background-color: var(--qf-hero-bg);
    background-image: var(--qf-hero-image);
    border-bottom: var(--qf-hero-border);
    padding: 78px 0 70px;
  }
  .hero .wrap, .qf-hero .wrap { position: relative; z-index: 3; }
  .hero h1, .qf-hero h1 { max-width: 17ch; }
  .hero .lead, .qf-hero .lead { max-width: 60ch; font-size: 1.19rem; }
  .hero.hero-sub { padding: 58px 0 54px; }
  .hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 27px; }
  .hero-field, .hero-rows, .hero-grid {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    opacity: var(--qf-hero-field-opacity);
  }
  .hero-field svg, .hero-rows svg, .hero-grid svg { width: 100%; height: 100%; display: block; }
  .hero-art {
    position: absolute; z-index: 2; pointer-events: none;
    right: var(--qf-hero-art-right); top: 50%; transform: translateY(-50%);
    width: var(--qf-hero-art-w); max-width: 44vw;
  }
  .hero-art svg, .hero-art img { width: 100%; height: auto; display: block; }
  .hero-stamp, .hero-meta {
    margin-top: 34px; font-family: var(--qf-mono); font-size: .71rem;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--qf-accent-on); max-width: 72ch;
  }
  .hero-stamp { border-top: 1px solid var(--qf-line-on); padding-top: 12px; }

  .page-head, .qf-page-head {
    background-color: var(--qf-hero-bg);
    background-image: var(--qf-hero-image);
    padding: 54px 0 46px;
    border-bottom: var(--qf-header-border);
  }
  .page-head h1, .qf-page-head h1 { font-size: 2.12rem; max-width: 23ch; }
  .page-head .lead, .qf-page-head .lead { max-width: 66ch; }

  /* ---- CTA band: also solid + image, never a shorthand gradient --------- */
  .cta-band, .qf-cta-band {
    background-color: var(--qf-cta-bg);
    background-image: var(--qf-cta-image);
    text-align: center;
  }

  /* ---- grade / status chips ---------------------------------------------
     `.grade`+`.g-*` and `.chip`+`.chip-*` were the same control under two
     names. Both vocabularies are kept so no page markup had to change; new
     markup uses .chip. Each chip sets its OWN ground and its OWN foreground
     as a pair, so a chip dropped onto a dark band stays legible - that is
     the same contract rule applied at component scale. */
  .grade, .chip, .qf-chip {
    display: inline-block; font-family: var(--qf-mono);
    font-size: .65rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; padding: 4px 9px;
    border: 1px solid; border-radius: var(--qf-chip-radius);
    white-space: nowrap; vertical-align: middle;
  }
  .g-fact,  .chip-fact      { background-color: #dde9df; color: #1c4429; border-color: #74a184; }
  .g-lit,   .chip-lit       { background-color: #dce7ef; color: #143d56; border-color: #7ba2bd; }
  .g-inf,   .chip-inference { background-color: #ece5d6; color: #56430f; border-color: #b4a276; }
  .g-demo,  .chip-demo      { background-color: #f2e4d3; color: #6a3b0c; border-color: #c39a68; }
  .g-road,  .chip-roadmap   { background-color: #e4e2e6; color: #3c3744; border-color: #a9a4b1; }
  .g-unv,   .chip-unver     { background-color: #f1dedd; color: #672422; border-color: #bd9290; }
  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
  .grade-key { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 18px 0 0; padding: 0; list-style: none; }
  .grade-key li { font-size: .87rem; display: flex; gap: 9px; align-items: center; }

  /* ---- tick lists --------------------------------------------------------- */
  ul.ticks, .ticks, .qf-ticks { list-style: none; margin: 0; padding: 0; }
  ul.ticks li, .ticks li, .qf-ticks li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 9px 0; border-bottom: var(--qf-border) solid var(--qf-line-on-soft);
  }
  ul.ticks li:last-child, .ticks li:last-child { border-bottom: 0; }
  ul.ticks .tick, .ticks .tick, .qf-ticks .tick {
    flex: 0 0 auto; margin-top: 5px; color: var(--qf-accent-on);
  }
  .ticks.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }

  /* ---- numbered steps -----------------------------------------------------
     decimal-leading-zero, not a literal "0" prefix: one site concatenated a
     "0" and rendered step ten as "010". Unified so it cannot recur.         */
  ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
  ol.steps li { counter-increment: s; position: relative; padding: 0 0 22px 58px; }
  ol.steps li::before {
    content: counter(s, decimal-leading-zero);
    position: absolute; left: 0; top: 0;
    font-family: var(--qf-mono); font-size: .81rem; font-weight: 700; letter-spacing: .06em;
    color: var(--qf-step-fg); background-color: var(--qf-step-bg);
    border: var(--qf-step-border);
    width: var(--qf-step-w); height: 28px;
    display: flex; align-items: center; justify-content: center;
  }
  ol.steps h3 { margin: 0 0 5px; font-size: 1.01rem; }
  ol.steps p { margin: 0; font-size: .96rem; }

  .steps:not(ol) { counter-reset: step; display: grid; gap: 20px; }
  .step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
  .step .num {
    counter-increment: step; width: 44px; height: 44px; border-radius: var(--qf-radius);
    border: var(--qf-step-border); color: var(--qf-step-fg); background-color: var(--qf-step-bg);
    display: grid; place-items: center; font-weight: 700; font-size: 1.03rem; font-family: var(--qf-mono);
  }
  .step .num::before { content: counter(step); }
  .step h3 { margin-bottom: .18em; }
  .step p { margin-bottom: 0; }

  /* ---- service tiers ------------------------------------------------------- */
  .tiers, .qf-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--qf-grid-gap); }
  .tier, .qf-tier {
    background-color: var(--qf-surface); border: var(--qf-border) solid var(--qf-line);
    border-radius: var(--qf-radius); padding: 26px 24px; display: flex; flex-direction: column;
  }
  .tier.lead-tier { border-top: 4px solid var(--qf-accent); }
  .tier.demo-tier { border-top: 4px solid var(--qf-signal); }
  .tier .tier-tag { margin-bottom: 9px; }
  .tier h3 { font-size: 1.23rem; }
  .tier ul { list-style: none; padding: 0; margin: 10px 0 20px; }
  .tier ul li { position: relative; padding-left: 21px; margin-bottom: 9px; font-size: .95rem; }
  .tier ul li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    width: 11px; height: 2px; background-color: var(--qf-accent);
  }
  .tier .tier-foot { margin-top: auto; }

  /* ---- article list --------------------------------------------------------- */
  .article-list { display: grid; }
  .article {
    display: grid; grid-template-columns: 134px minmax(0, 1fr); gap: 26px;
    padding: 27px 0; border-bottom: var(--qf-border) solid var(--qf-line-on);
  }
  .article:first-child { border-top: 2px solid var(--qf-fg-strong); }
  .article h3 { margin-bottom: .31em; }
  .article p { margin-bottom: .45em; }
  .article .stub-tag {
    font-family: var(--qf-mono); font-size: .65rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--qf-accent-on); font-weight: 700;
  }

  /* ---- forms ----------------------------------------------------------------- */
  .formbox, .qf-formbox {
    background-color: var(--qf-surface); border: var(--qf-border) solid var(--qf-line);
    border-top: var(--qf-border-accent) solid var(--qf-accent); padding: 26px 24px;
  }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 16px; }
  .field.full { grid-column: 1 / -1; }
  .field label {
    font-size: .84rem; font-weight: 700; color: var(--qf-fg-strong);
    font-family: var(--qf-label-font);
    letter-spacing: var(--qf-label-tracking);
    text-transform: var(--qf-label-transform);
  }
  .field input, .field select, .field textarea {
    font-family: var(--qf-sans); font-size: .98rem;
    color: var(--qf-ink); background-color: var(--qf-surface);
    border: var(--qf-border) solid var(--qf-input-line);
    border-radius: var(--qf-radius); padding: .66em .8em;
    width: 100%; min-width: 0; max-width: 100%;
  }
  .field textarea { min-height: 124px; resize: vertical; }
  .field input::placeholder, .field textarea::placeholder { color: var(--qf-muted); opacity: 1; }
  .form-note { font-size: .84rem; }
  .form-actions { margin-top: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

  /* ---- footer ----------------------------------------------------------------- */
  .site-footer, .qf-footer {
    background-color: var(--qf-footer-bg);
    --qf-link-on: var(--qf-footer-link);
    --qf-link-on-hover: #ffffff;
    padding: 54px 0 26px; font-size: .92rem;
    border-top: var(--qf-footer-border);
  }
  .footer-grid { display: grid; grid-template-columns: 1.65fr 1fr 1fr 1fr; gap: 32px; }
  .site-footer h2, .site-footer h4, .qf-footer h4 {
    font-family: var(--qf-mono); font-size: .71rem;
    letter-spacing: .15em; text-transform: uppercase; margin: 0 0 13px;
  }
  .site-footer ul, .qf-footer ul { list-style: none; margin: 0; padding: 0; }
  .site-footer a, .qf-footer a { display: block; text-decoration: none; font-size: .91rem; padding: 5px 0; }
  .site-footer a:hover, .qf-footer a:hover { text-decoration: underline; }
  .footer-brand .mark { width: var(--qf-footer-mark-size); height: var(--qf-footer-mark-size);
                        color: var(--qf-link-dark); object-fit: contain; }
  .footer-brand .w1, .footer-brand .wordmark {
    font-family: var(--qf-wordmark-font);
    font-size: 1.06rem; font-weight: 700; color: var(--qf-fg-strong);
    margin: 10px 0 5px; display: block;
    text-transform: var(--qf-wordmark-transform);
    letter-spacing: var(--qf-wordmark-tracking);
  }
  .footer-brand .w2 {
    font-family: var(--qf-mono); font-size: .6rem; letter-spacing: .22em;
    text-transform: uppercase; color: var(--qf-accent-on); display: block; margin-bottom: 10px;
  }
  .footer-brand p { font-size: .89rem; max-width: 38ch; margin: 0; }
  .footer-domain {
    font-family: var(--qf-mono); font-size: .79rem; letter-spacing: .06em;
    color: var(--qf-accent-on); margin-top: 10px;
  }
  .footer-bottom {
    margin-top: 36px; padding-top: 19px; border-top: 1px solid var(--qf-footer-rule);
    display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
    align-items: center; font-size: .81rem; color: var(--qf-fg-muted);
  }
  .footer-bottom .zeus, .built-with {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--qf-mono); font-size: .67rem; letter-spacing: .1em;
    color: var(--qf-fg-muted);
  }
  .footer-bottom .zeus .cube, .built-with .cube { width: 14px; height: 14px; flex: none; }

  /* ---- brand mark part hooks (opt-in) ------------------------------------------ */
  .mark .rows, .mark .ticks-g { stroke: var(--qf-mark-2); opacity: .85; }
  .mark .tick   { stroke: var(--qf-mark-3); }
  .mark .pin    { fill: var(--qf-mark-1); }
  .mark .face   { stroke: currentColor; }
  .mark .needle { stroke: var(--qf-mark-1); }

  /* ---- responsive --------------------------------------------------------------- */
  /* .footer-grid, .form-grid, .article, .tiers and .ticks.two are DECLARED in
     this layer, so their collapse rules have to live here too. They were in
     qf.layout, which is earlier, which made them inert. */
  @media (max-width: 1040px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  }
  @media (max-width: 900px) {
    .tiers, .qf-tiers { grid-template-columns: minmax(0, 1fr); }
    .ticks.two { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 700px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .article { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  }
  @media (max-width: 480px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
  }
  @media (max-width: 1040px) { .hero-art { right: -80px; opacity: .45; width: 410px; } }
  @media (max-width: 760px)  { .hero-art { display: none; } }
  @media (max-width: 700px) {
    .hero { padding: 52px 0 48px; }
    .hero.hero-sub { padding: 44px 0 42px; }
    .hero .lead { font-size: 1.05rem; }
    .hero-field, .hero-rows, .hero-grid { opacity: calc(var(--qf-hero-field-opacity) * .6); }
    .page-head { padding: 40px 0 34px; }
    .figure .titleblock span { padding: 7px 11px; }
    /* =====================================================================
       THE MOBILE LEGIBILITY FLOOR - derived from the viewBox, not fixed.

       A wide line-drawing must stay LEGIBLE on a phone: the plate scrolls
       inside its own frame rather than scaling the diagram text down to a
       few pixels. Contained scroll - the PAGE never scrolls, because
       .grid > * and .split > * are pinned to min-width:0 in qf.layout.

       This rule used to read `min-width: 520px`, and it did NOT achieve its
       own stated intent, because a FIXED floor is viewBox-blind. An SVG is
       scaled by (rendered width / viewBox width), so the same 520px floor
       means something different for every drawing:

           viewBox 480, 12px text -> scale 1.083 -> 13.0px   fine
           viewBox 900, 12px text -> scale 0.578 -> 6.93px   NOT LEGIBLE

       Measured on Wellspring ot-security.html (the Purdue zone-and-conduit
       plate, viewBox="0 0 900 560", 35 <text>, smallest authored size 12px):
       35 of 35 labels rendered below 9px at a 390px viewport.

       THE NAMED RULE. The floor must be PROPORTIONAL to the viewBox:

           min-width >= viewBox_width * (9 / smallest_authored_font_px)

       For 900 at 12px that is >= 675px. `propagate.py` computes this per SVG
       and assigns the smallest ladder rung at or above the requirement plus
       12.5% headroom, so a value never sits on the boundary where a font
       metric or a rounding difference could push it under. 675 x 1.125 =
       759.4 -> the 760px rung -> 10.13px.

       WHY A LADDER AND NOT AN INLINE VALUE. CSS cannot read a viewBox, and
       `style=""` is dropped by `style-src 'self'`. So the derivation happens
       at propagation time and is expressed as a class from the fixed ladder
       below. The FORMULA lives here and in propagate.py; the VALUE is
       computed per drawing.

       WHY THIS DOES NOT ROT. `propagate.py --check` recomputes the
       requirement for every .figure SVG that contains <text> and FAILS a
       site whose assigned rung is missing or too small. A wide diagram
       authored next month is caught by the lint, not discovered on a phone.
       And `core/qc_render.py` measures the RENDERED font size of every
       <text> at 390px and fails below 9px - a check that is independent of
       this formula, so it also catches a case the formula mis-models (a
       transform, an inherited font-size, a nested svg).

       The default rung is the historical 520px, which is correct for every
       viewBox at or below 693 with 12px text. It is a floor, not a promise;
       the lint is the promise.
       ===================================================================== */
    .figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .figure .plate { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .figure > svg,
    .figure .plate > svg { min-width: var(--qf-svg-floor, 520px); }
    .figure figcaption { position: sticky; left: 0; }
  }
}

/* ===========================================================================
   LAYER  qf.nav
   EVERYTHING about the header, the nav and its states lives here - and here
   is BEFORE qf.action. A nav rule therefore cannot paint a button at any
   specificity. Do not author a nav rule in a later layer.

   The header is the one surface whose TONE varies by site (Wellspring and
   Truegrid are dark; Trueacre and Metered Trust are light). It therefore
   takes its foreground from explicit --qf-header-* tokens rather than from
   the dark/light contract, and the theme is responsible for pairing them.
   propagate.py --check verifies the pairing; the render harness proves it.
   =========================================================================== */
@layer qf.nav {
  .site-header, .masthead {
    position: var(--qf-header-position);
    top: 0; z-index: 40;
    background-color: var(--qf-header-bg);
    color: var(--qf-header-fg);
    --qf-fg:        var(--qf-header-fg);
    --qf-fg-strong: var(--qf-header-fg);
    --qf-fg-muted:  var(--qf-header-link);
    --qf-link-on:   var(--qf-header-link);
    --qf-link-on-hover: var(--qf-header-link-hover);
    --qf-line-on:   var(--qf-header-toggle-border);
    border-bottom: var(--qf-header-border);
  }
  .nav { display: flex; align-items: center; gap: 18px; min-height: var(--qf-nav-h); }

  .brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--qf-header-fg); margin-right: auto;
  }
  .brand:hover { text-decoration: none; color: var(--qf-header-fg); }
  .brand .mark { width: var(--qf-brand-mark-size); height: var(--qf-brand-mark-size);
                 color: var(--qf-mark-1); flex: 0 0 auto; object-fit: contain; }
  .brand-name { display: flex; flex-direction: column; line-height: 1.05; }
  .brand-name .w1, .brand-name .wordmark {
    font-family: var(--qf-wordmark-font);
    font-size: 1.15rem; font-weight: 700; color: var(--qf-header-fg);
    text-transform: var(--qf-wordmark-transform);
    letter-spacing: var(--qf-wordmark-tracking);
  }
  .brand-name .w2, .brand-name .sub {
    font-family: var(--qf-mono); font-size: .6rem; letter-spacing: .3em;
    text-transform: uppercase; color: var(--qf-header-sub); margin-top: 4px;
  }

  .nav-links { display: flex; align-items: center; gap: var(--qf-nav-gap); }
  .nav-links a {
    color: var(--qf-header-link); text-decoration: none;
    font-size: .92rem; font-weight: 600;
    padding: var(--qf-nav-link-pad);
    border-radius: var(--qf-radius);
    border-bottom: 2px solid transparent;
  }
  .nav-links a:hover {
    color: var(--qf-header-link-hover);
    background-color: var(--qf-nav-hover-bg);
    border-bottom-color: var(--qf-nav-underline);
    text-decoration: none;
  }
  .nav-links a.active, .nav-links a[aria-current="page"] {
    color: var(--qf-nav-active-fg);
    border-bottom-color: var(--qf-nav-active-underline);
  }
  /* a button in the nav is a BUTTON. It takes no nav chrome. */
  .nav-links a.btn { border-bottom: 0; margin-left: var(--qf-nav-btn-gap); box-shadow: none; }

  .nav-toggle {
    display: none; background-color: transparent;
    border: 1px solid var(--qf-header-toggle-border);
    color: var(--qf-header-fg); padding: 9px 11px;
    cursor: pointer; border-radius: var(--qf-radius);
  }
  .nav-toggle svg { width: 18px; height: 14px; display: block; }

  /* NAV COLLAPSE. One breakpoint for the whole estate.
     Four sites shipped four different collapse widths (820 / 860 / 900 /
     900). Unified to 900px - the earliest safe collapse for the longest nav
     in the estate - so no site can regress into an overflowing nav bar.
     Media queries cannot read custom properties, which is exactly why this
     has to live in the core and not in a theme. */
  @media (max-width: 900px) {
    .nav { position: relative; }
    .site-header .wrap, .masthead .wrap { position: relative; }
    .nav-toggle { display: inline-flex; align-items: center; }
    .nav-links {
      display: none; position: absolute; top: var(--qf-nav-h); left: 0; right: 0;
      background-color: var(--qf-nav-drawer-bg);
      flex-direction: column; align-items: stretch; gap: 0;
      padding: 10px 24px 20px;
      border-bottom: var(--qf-header-border);
      z-index: 60;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--qf-nav-drawer-line); }
    .nav-links a.active, .nav-links a[aria-current="page"] { border-bottom-color: var(--qf-nav-active-underline); }
    .nav-links a.btn { margin: 12px 0 0; text-align: center; }
  }
}

/* ===========================================================================
   LAYER  qf.tone
   Colour utilities, and DELIBERATELY BEFORE qf.action so that even a
   mis-applied tone utility cannot repaint a button. These exist because
   `style=""` is dropped by the CSP - they are the sanctioned replacement.
   Prefer the contract: `.u-fg-muted` follows the surface and is almost
   always the right answer. The two absolute values below are for the rare
   case where the surface cannot be changed.
   =========================================================================== */
@layer qf.tone {
  .u-fg-muted      { color: var(--qf-fg-muted); }      /* follows the surface */
  .u-fg-ink        { color: var(--qf-fg-strong); }     /* follows the surface */
  .u-fg-accent     { color: var(--qf-accent-on); }     /* follows the surface */
  .u-fg-on-dark    { color: #ffffff; }                 /* absolute */
  .u-fg-muted-dark { color: var(--qf-muted-dark); }    /* absolute (dark only) */
  .u-fg-link-dark  { color: var(--qf-link-dark); }     /* absolute (dark only) */
}

/* ===========================================================================
   LAYER  qf.action        <-- THE SECOND GUARANTEE
   ---------------------------------------------------------------------------
   Every declaration that owns a button's foreground or ground is here, and
   qf.action is later than qf.surface, qf.component, qf.nav and qf.tone. No
   selector in any of those layers can paint a button, at any specificity, in
   any order, under any nesting.

   A button deliberately does NOT inherit the surface contract: its colour is
   half of a declared token pair, so it is right on a light band, a dark band
   and a gradient hero alike, without any of them knowing about it.

   Consequence for authors: a band, a panel or a nav state NEVER needs a
   `.nav-links a.btn-primary { color: #fff }` guard again. If you find
   yourself writing one, you have put a rule in the wrong layer.
   =========================================================================== */
@layer qf.action {
  .btn {
    display: inline-block;
    font-family: var(--qf-btn-font);
    font-size: var(--qf-btn-size);
    font-weight: var(--qf-btn-weight);
    letter-spacing: var(--qf-btn-tracking);
    text-transform: var(--qf-btn-transform);
    padding: var(--qf-btn-pad);
    text-decoration: none;
    border-radius: var(--qf-radius);
    border: var(--qf-btn-border-w) solid transparent;
    cursor: pointer;
    text-align: center;
  }
  .btn:hover { text-decoration: none; }

  .btn-primary, .btn-primary:link, .btn-primary:visited,
  .btn-primary:focus, .btn-primary:focus-visible {
    background-color: var(--qf-action);
    color: var(--qf-on-action);
    border-color: var(--qf-action-border, var(--qf-action));
  }
  .btn-primary:hover, .btn-primary:active {
    background-color: var(--qf-action-hover);
    color: var(--qf-on-action-hover);
    border-color: var(--qf-action-hover-border, var(--qf-action-hover));
  }

  .btn-secondary, .btn-secondary:link, .btn-secondary:visited {
    background-color: var(--qf-ink); color: #fff; border-color: var(--qf-ink);
  }
  .btn-secondary:hover { background-color: var(--qf-dark-3); color: #fff; border-color: var(--qf-dark-3); }

  /* GHOST on a LIGHT ground. */
  .btn-ghost, .btn-ghost:link, .btn-ghost:visited {
    background-color: transparent; color: var(--qf-ink);
    border-color: var(--qf-ghost-border, var(--qf-ink));
  }
  .btn-ghost:hover { background-color: var(--qf-ink); color: #fff; border-color: var(--qf-ink); }

  /* GHOST on a DARK ground. `.on-ink` and `.on-dark` were two names for it. */
  .btn-ghost.on-ink, .btn-ghost.on-dark, .btn-ghost-lt,
  .btn-ghost.on-ink:link, .btn-ghost.on-dark:link, .btn-ghost-lt:link,
  .btn-ghost.on-ink:visited, .btn-ghost.on-dark:visited, .btn-ghost-lt:visited {
    background-color: transparent; color: #ffffff; border-color: rgba(255,255,255,.58);
  }
  .btn-ghost.on-ink:hover, .btn-ghost.on-dark:hover, .btn-ghost-lt:hover {
    background-color: #ffffff; color: var(--qf-ink); border-color: #ffffff;
  }

  /* A primary CTA inside a CTA band may invert - but it still declares BOTH
     halves of the pair, so it can never be half-applied. */
  .cta-band .btn-primary, .qf-cta-band .btn-primary {
    background-color: var(--qf-cta-action);
    color: var(--qf-on-cta-action);
    border-color: var(--qf-cta-action);
  }
  .cta-band .btn-primary:hover, .qf-cta-band .btn-primary:hover {
    background-color: var(--qf-cta-action-hover);
    color: var(--qf-on-cta-action-hover);
    border-color: var(--qf-cta-action-hover);
  }

  .btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }
  .btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

  @media (max-width: 480px) {
    .btn { font-size: calc(var(--qf-btn-size) - .02rem); padding: 11px 17px; }
    .hero-cta .btn, .btnrow .btn { flex: 1 1 auto; }
  }
}

/* ===========================================================================
   LAYER  qf.utility
   GEOMETRY ONLY. A utility in this layer must never set a colour - colour
   utilities live in qf.tone, before qf.action. These exist because the CSP
   drops style="" and an inline style failure is silent.
   =========================================================================== */
@layer qf.utility {
  .mt-0,  .u-mt-0  { margin-top: 0; }
  .mt-2,  .u-mt-2  { margin-top: 2px; }
  .u-mt-10 { margin-top: 10px; }
  .mt-12, .u-mt-12 { margin-top: 12px; }
  .u-mt-13 { margin-top: 13px; }
  .u-mt-14 { margin-top: 14px; }
  .mt-16, .u-mt-16 { margin-top: 16px; }
  .mt-18, .u-mt-18 { margin-top: 18px; }
  .mt-20, .u-mt-20 { margin-top: 20px; }
  .mt-22, .u-mt-22 { margin-top: 22px; }
  .mt-24, .u-mt-24 { margin-top: 24px; }
  .mt-26, .u-mt-26 { margin-top: 26px; }
  .mt-28, .u-mt-28 { margin-top: 28px; }
  .u-mt-30 { margin-top: 30px; }
  .u-mt-32 { margin-top: 32px; }
  .mt-34, .u-mt-34 { margin-top: 34px; }
  .u-mt-40 { margin-top: 40px; }
  .mt-s { margin-top: 10px; }
  .mt-m { margin-top: 20px; }
  .mt-l { margin-top: 34px; }

  .mb-0,  .u-mb-0  { margin-bottom: 0; }
  .mb-24, .u-mb-24 { margin-bottom: 24px; }
  .mb-s { margin-bottom: 10px; }
  .mb-m { margin-bottom: 20px; }
  .m-note { margin: 6px 0 22px; }

  .u-mw-62, .mw-62 { max-width: 62ch; }
  .u-mw-64, .mw-64 { max-width: 64ch; }
  .u-mw-66, .mw-66 { max-width: 66ch; }
  .u-mw-68 { max-width: 68ch; }
  .u-mw-70 { max-width: 70ch; }
  .u-mw-72 { max-width: 72ch; }
  .u-mw-74 { max-width: 74ch; }
  .u-mw-76 { max-width: 76ch; }
  .maxw { max-width: 74ch; }

  .fs-1,   .u-fs-1    { font-size: 1rem; }
  .fs-093, .u-fs-093  { font-size: .93rem; }
  .u-fs-102 { font-size: 1.02rem; }
  .u-fs-124 { font-size: 1.24rem; }

  /* --- THE MOBILE LEGIBILITY LADDER ------------------------------------
     Set on an <svg> inside a .figure by propagate.py, derived from that
     drawing's viewBox and its smallest authored font-size. See the long
     note beside `.figure > svg` in qf.component for the formula and for why
     the derivation cannot live in CSS. Only the custom property is set here;
     the `min-width` that consumes it applies below 700px only. */
  .svgfloor-520 { --qf-svg-floor: 520px; }
  .svgfloor-560 { --qf-svg-floor: 560px; }
  .svgfloor-600 { --qf-svg-floor: 600px; }
  .svgfloor-640 { --qf-svg-floor: 640px; }
  .svgfloor-680 { --qf-svg-floor: 680px; }
  .svgfloor-720 { --qf-svg-floor: 720px; }
  .svgfloor-760 { --qf-svg-floor: 760px; }
  .svgfloor-800 { --qf-svg-floor: 800px; }
  .svgfloor-840 { --qf-svg-floor: 840px; }
  .svgfloor-900 { --qf-svg-floor: 900px; }
  .svgfloor-960 { --qf-svg-floor: 960px; }
  .svgfloor-1040 { --qf-svg-floor: 1040px; }
  .svgfloor-1120 { --qf-svg-floor: 1120px; }
  .svgfloor-1200 { --qf-svg-floor: 1200px; }

  .align-start { align-items: start; }
  .gap-46 { gap: 46px; }
  .pad-24 { padding: 24px 22px; }
  .u-bl-6 { border-left-width: 6px; }
  .nowrapfix { overflow-wrap: anywhere; }
  [hidden] { display: none !important; }
}
