/* ============================================================================
   PRIORAXIS theme — design tokens

   CO-59 SITE REVISION TRACK A (#16 commission, 2026-07-25) rewrites this file.
   Lineage: Design System V1 §6 (blob-traceable to 578e14b) is the SOURCE the
   commission amends — the five zone hex sets remain the single source for zone
   colour (DS §1.2 rule 4), but their values are now the DESATURATED set, and the
   serif family is deleted. What the commission changed, item by item:
     · Inter replaces IBM Plex Sans as the sans family; IBM Plex Mono stays for
       numbers and labels. BOTH ARE SELF-HOSTED — @font-face below points at
       assets/fonts/, and NO external CDN is contacted at render time (hard rule,
       GDPR: a CDN font leaks every visitor's IP to a third party).
     · --font-serif is DELETED. The four surfaces that used it restyle in
       theme.css: the founder quote and the boundary sentence to ITALIC sans, the
       connective bridge and the long-form body/lead/who-body to plain sans.
     · The five bands are DESATURATED 25% (inside the ruled 20–30%) with
       LUMINANCE HELD: each value was converted to HLS, saturation cut 25%, then
       lightness re-solved so WCAG relative luminance matches the original to
       ≤0.002 absolute. Contrast ratios against ground/surface therefore carry
       over from the DS V1 verification unchanged — the palette is quieter, not
       lighter or darker. Recomputable: the transform is stated here in full.
     · Radius 4–6px (was 4/8), light default with a dark toggle, dark headlines
       at #E8E8E6, and a 4px spacing scale exposed as tokens.
     · --shadow-1 is deleted: surfaces are carried by hairlines, not shadows.
     · TWO AA-COMPLIANCE CORRECTIONS on top of the desaturation, ruled in the
       design lane 2026-07-25 and recorded as a dated Design System V1 amendment
       (that document's §1.1/§2/§6 values are superseded by it): light --v-flag
       #A27524 -> #89631E (flag chip 3.49 -> 4.61:1) and dark
       --z-distribution-text #C36663 -> #C87370 (badge text 4.11 -> 4.68:1).
       Both shortfalls were INHERITED from DS V1, not caused by the desaturation;
       these are the first zone/verdict hexes changed for contrast rather than
       tone, so the single source moved and #16 is flagged.
   Do not add off-system values here.
   ============================================================================ */

/* ── self-hosted faces ────────────────────────────────────────────────────────
   Vendored 2026-07-25, licences committed alongside the files. Self-hosting is
   expressly permitted by SIL OFL 1.1 for both families.

     Inter — OFL 1.1, NO reserved font name (assets/fonts/OFL-Inter.txt). Google
       Fonts woff2, latin + latin-ext SUBSETS; one VARIABLE file per subset
       covering the whole weight axis (the theme uses 400/500/600).

     IBM Plex Mono — OFL 1.1 WITH Reserved Font Name "Plex"
       (assets/fonts/OFL-IBMPlexMono.txt). Vendored UNMODIFIED and COMPLETE from
       the upstream IBM release (github.com/IBM/plex v6.4.0), NOT as a subset:
       under OFL a subset is a Modified Version, and a Modified Version may not
       carry the reserved name. This is the RFN check CO-56 required, executed —
       unmodified files keep the family name lawful, so no local rename is needed.
       Regular 400 + Medium 500, no unicode-range (the faces are complete).

   font-display:swap so text paints immediately in the fallback stack. */
@font-face {
  font-family:'Inter'; font-style:normal; font-weight:100 900; font-display:swap;
  src:url('fonts/inter-var-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family:'Inter'; font-style:normal; font-weight:100 900; font-display:swap;
  src:url('fonts/inter-var-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/IBMPlexMono-Medium.woff2') format('woff2');
}

/* ── light theme (DEFAULT) ─────────────────────────────────────────────────── */
:root {
  /* five bands — desaturated 25%, luminance held (see header) */
  --z-deep-value:#21655C;   --z-deep-value-tint:#E5EFED;   --z-deep-value-text:#164A44;
  --z-value:#65884C;        --z-value-tint:#ECF1E6;        --z-value-text:#445F32;
  --z-neutral:#6D727C;      --z-neutral-tint:#ECEEEF;      --z-neutral-text:#494D54;
  --z-elevated:#B46035;     --z-elevated-tint:#F6EAE1;     --z-elevated-text:#844523;
  --z-distribution:#8C3538; --z-distribution-tint:#F3E3E4; --z-distribution-text:#652629;
  --v-hit:#2E784E;  --v-hit-tint:#E7F0EA;
  --v-flag:#89631E; --v-flag-tint:#F3ECDC;   /* AA correction, DS addendum 2026-07-25 */

  --ground:#F6F7F5; --surface:#FFFFFF; --surface-alt:#F1F3F0;
  --ink:#171B1E; --ink-muted:#565E66; --rule:#D9DDDA; --link:#155E75;
  --headline:#171B1E;

  --radius-s:4px; --radius-m:6px;
  --hairline:1px;

  /* 4px spacing scale — every margin/padding/gap in theme.css is one of these */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px;
  --s-5:24px; --s-6:32px; --s-7:48px; --s-8:64px;

  --font-sans:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* ── dark theme (toggle) ───────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --z-deep-value:#6CB0A5;   --z-deep-value-tint:#1C3430;   --z-deep-value-text:#6CB0A5;
  --z-value:#9BBC82;        --z-value-tint:#283220;        --z-value-text:#9BBC82;
  --z-neutral:#9AA2AA;      --z-neutral-tint:#282B2E;      --z-neutral-text:#9AA2AA;
  --z-elevated:#D49166;     --z-elevated-tint:#37261C;     --z-elevated-text:#D49166;
  --z-distribution:#C36663; --z-distribution-tint:#331B1B; --z-distribution-text:#C87370; /* text: AA correction, DS addendum 2026-07-25 */
  --v-hit:#79B996;  --v-hit-tint:#1C2F22;
  --v-flag:#CBA864; --v-flag-tint:#312814;

  --ground:#121517; --surface:#1A1E21; --surface-alt:#22272B;
  --ink:#E7EAE8; --ink-muted:#9AA3A9; --rule:#31373C; --link:#67B7CE;
  --headline:#E8E8E6;
}
