/* fz-tokens.css — Design tokens (--fz-*) for the FZ redesign (Oct 2026). Owner: tokens agent.
   Semantic aliases + the new dark palette. Every other fz-*.css reads ONLY these tokens.
   Loaded AFTER nova-shell.css (see index.php), so equal-specificity rules here win.
   Light is the base theme; dark lives under [data-theme="dark"] (app.jsx always sets it on <html>).

   Sections
     1. Theme-independent tokens (radius, space, type, motion, layout)      — :root
     2. Light palette                                                        — :root, [data-theme="light"]
     3. Dark palette                                                         — [data-theme="dark"]
     4. Dark palette for the first paint (no data-theme yet, OS is dark)     — @media
     5. LEGACY RETHEME: --xcs-* / --fsw-* / --bh-* now read the --fz-* values, per theme
     6. Global base rules (page background, body font, focus ring)

   Contrast (WCAG 2.x, measured on the tokens below; see DESIGN-SYSTEM.md):
     text-1 / text-2 / text-3 on surface-1 — dark 15.8 / 8.0 / 5.6, light 18.4 / 8.1 / 5.6
     text-3 on the WORST surface (surface-3) — dark 4.7, light 4.6
     accent-ink on surface-1                — dark 14.2, light 6.1 (and ≥5.0 on bg, surface-3, accent-soft)
     every status -ink on its -soft tint AND on surface-1/-2 ≥ 5.0 in both themes
   v3.10 refine (4 Oct 2026): the brief's ".94 / .58 / .38 white" text ladder is
   followed for text-1 only — .38 white measures 3.6:1 on surface-1, so dark
   --fz-text-3 stays the dimmest grey that still clears 4.5:1 on surface-3 (#8C928F),
   and text-2 sits between (#A9AFAC). Dark surfaces moved off near-black onto a
   charcoal ladder (bg → surface-1 → surface-2 → surface-3, each one quiet step up)
   and dark borders became white-alpha hairlines (≈ .06 / .11), so separation is
   tonal, not drawn. */


/* ═══ 1. THEME-INDEPENDENT ═══════════════════════════════════════════════════ */
:root {
  /* Radius ladder: chips/inputs → small cards → modules → overlays. Pills are 999. */
  --fz-r-xs:   8px;
  --fz-r-sm:   12px;
  --fz-r-md:   16px;
  --fz-r-lg:   20px;   /* also the profile / grid cards (owner: 18–22) */
  --fz-r-xl:   24px;
  --fz-r-pill: 999px;

  /* 4/8 spacing ladder. */
  --fz-s-1: 4px;
  --fz-s-2: 8px;
  --fz-s-3: 12px;
  --fz-s-4: 16px;
  --fz-s-5: 20px;
  --fz-s-6: 24px;
  --fz-s-7: 32px;
  --fz-s-8: 40px;

  /* Type. All three families are already loaded by index.php (Google Fonts). */
  --fz-font-display: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --fz-font-body:    Inter, system-ui, sans-serif;
  --fz-font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* v3.10 scale: nothing below 12px. Owner rule — title 28–32 desktop / 24–28
     phone, card name 17–20, body 13–15, metadata 12–13, "avoid 10–11px". */
  --fz-fs-title:   30px;   /* page title (26px ≤768) */
  --fz-fs-num-xl:  44px;   /* hero number, one per page at most */
  --fz-fs-num:     32px;   /* metric number */
  --fz-fs-num-sm:  24px;   /* small metric / drawer number */
  --fz-fs-section: 20px;   /* section heading */
  --fz-fs-name:    18px;   /* client / person NAME on a profile card (photo-first cards) */
  --fz-fs-card:    17px;   /* any other card / panel title */
  --fz-fs-body:    14px;   /* body, table cells, buttons */
  --fz-fs-meta:    13px;   /* supporting metadata, chips, handles */
  --fz-fs-micro:   12px;   /* axis labels, tiny counters — the floor; never for important info */

  /* Line height for section / card / name heads. (fix v3.10.1: the unused
     title / body / meta siblings were removed — pages set those inline.) */
  --fz-lh-head:    1.3;

  --fz-fw-regular: 400;
  --fz-fw-medium:  500;
  --fz-fw-semi:    600;
  --fz-fw-bold:    700;

  /* Motion: 150–240ms only. Card hover (owner: 180–240ms) uses --fz-t-med. */
  --fz-t-fast: 150ms;
  --fz-t-med:  220ms;
  --fz-ease:   cubic-bezier(.2, .7, .2, 1);

  /* Layout. */
  --fz-page-pad:    28px;
  --fz-gap:         16px;
  --fz-card-pad:    20px;
  --fz-content-max: 1480px;
  --fz-drawer-w:    480px;
  /* Height of every control in a page header's action row (buttons, icon circles,
     Jump to client, a tab track): one value per breakpoint so the row never changes
     height from page to page. 44px at ≤768 = the phone touch floor. */
  --fz-ctl-h:       40px;

  /* Search glyph as a MASK (alpha only: the stroke colour below is never painted,
     the element's background-color is), for fields that cannot render <OpsIcon>,
     e.g. the Jump to client input. Same path/stroke as OpsIcon "search". */
  --fz-ico-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.3-4.3'/%3E%3C/svg%3E");
}
@media (max-width: 768px) {
  :root {
    --fz-fs-title: 26px;
    --fz-page-pad: 16px;
    --fz-gap:      12px;
    --fz-card-pad: 16px;
    --fz-ctl-h:    44px;
  }
}


/* ═══ 2. LIGHT ═══════════════════════════════════════════════════════════════
   Warm off-white page, white cards, soft warm-grey secondary surfaces,
   near-black text. Same lime fill; accent TEXT uses the dark-green ink. */
:root, [data-theme="light"] {
  --fz-bg:             #F4F2ED;
  --fz-sidebar:        #FAF9F6;
  --fz-surface-1:      #FFFFFF;
  --fz-surface-2:      #F5F4F0;
  --fz-surface-3:      #EBE9E3;
  --fz-surface-hover:  #F2F1EC;
  --fz-surface-sunken: #F9F8F5;
  --fz-scrim:          rgba(24, 22, 16, .38);

  --fz-border:         #E6E3DC;
  --fz-border-strong:  #D2CEC5;
  --fz-focus:          #3A8F18;

  --fz-text-1:         #111513;
  --fz-text-2:         #4A524D;
  --fz-text-3:         #626A65;
  --fz-text-on-accent: #0A1405;

  --fz-accent:         #A3FF4D;
  --fz-accent-hover:   #97F23F;
  --fz-accent-ink:     #2A7010;
  --fz-accent-soft:    rgba(163, 255, 77, .28);
  --fz-accent-line:    #3F9C1B;

  --fz-ok:          #1E9A5A;  --fz-ok-soft:      rgba(30, 154, 90, .12);   --fz-ok-ink:      #13693B;
  --fz-warn:        #C27C0C;  --fz-warn-soft:    rgba(194, 124, 12, .14);  --fz-warn-ink:    #8A5400;
  --fz-crit:        #D9433D;  --fz-crit-soft:    rgba(217, 67, 61, .11);   --fz-crit-ink:    #B02A24;
  --fz-info:        #2F6FD3;  --fz-info-soft:    rgba(47, 111, 211, .11);  --fz-info-ink:    #1C55AD;
  --fz-violet:      #7B52D9;  --fz-violet-soft:  rgba(123, 82, 217, .11);  --fz-violet-ink:  #5B35B5;
  /* 8 Okt 2026 — teal: event kalender Google (Calendar). Bukan biru info (= meeting sistem). */
  --fz-teal:        #0E8A86;  --fz-teal-soft:    rgba(14, 138, 134, .12);  --fz-teal-ink:    #086663;
  --fz-neutral:     #7D8681;  --fz-neutral-soft: rgba(125, 134, 129, .13); --fz-neutral-ink: #4E5752;

  --fz-shadow-soft: 0 1px 2px rgba(40, 32, 16, .04), 0 6px 20px -10px rgba(40, 32, 16, .10);
  --fz-shadow-pop:  0 4px 12px rgba(40, 32, 16, .06), 0 24px 56px -18px rgba(40, 32, 16, .22);
  /* (fix v3.10.1) The v3.10 "depth kit" tokens (--fz-highlight-top /
     --fz-shadow-card / --fz-shadow-raised / --fz-sheen) were removed here, in
     §3/§4 and in the three hud skins: nothing read them. Card depth lives in
     fz-kit.css as --fz-kit-hl / --fz-kit-sheen / --fz-kit-veil — tune it there. */
}


/* ═══ 3. DARK (primary theme) ════════════════════════════════════════════════
   Deep charcoal with a whisper of green (never pure #000). Layers separate by
   surface steps, not borders: bg #0E1110 → surface-1 #151817 (cards) →
   surface-2 #1A1E1C (nested / elevated) → hover #1E2220 → surface-3 #232826
   (controls, tracks). Borders are white-alpha, so one hairline value reads the
   same on every surface. */
[data-theme="dark"] {
  --fz-bg:             #0E1110;
  --fz-sidebar:        #111413;
  --fz-surface-1:      #151817;
  --fz-surface-2:      #1A1E1C;
  --fz-surface-3:      #232826;
  --fz-surface-hover:  #1E2220;
  --fz-surface-sunken: #111413;
  --fz-scrim:          rgba(4, 6, 5, .66);

  --fz-border:         rgba(255, 255, 255, .06);
  --fz-border-strong:  rgba(255, 255, 255, .11);
  --fz-focus:          #A3FF4D;

  --fz-text-1:         #EFF1F0;
  --fz-text-2:         #A9AFAC;
  --fz-text-3:         #8C928F;
  --fz-text-on-accent: #0A1405;

  --fz-accent:         #A3FF4D;
  --fz-accent-hover:   #B6FF73;
  --fz-accent-ink:     #A3FF4D;
  --fz-accent-soft:    rgba(163, 255, 77, .12);
  --fz-accent-line:    rgba(163, 255, 77, .55);

  --fz-ok:          #45C486;  --fz-ok-soft:      rgba(69, 196, 134, .14);  --fz-ok-ink:      #7BDCAB;
  --fz-warn:        #E8A93A;  --fz-warn-soft:    rgba(232, 169, 58, .14);  --fz-warn-ink:    #F2C46E;
  --fz-crit:        #F0716B;  --fz-crit-soft:    rgba(240, 113, 107, .14); --fz-crit-ink:    #FF9D97;
  --fz-info:        #5E9EEA;  --fz-info-soft:    rgba(94, 158, 234, .15);  --fz-info-ink:    #9CC4F7;
  --fz-violet:      #9E85F0;  --fz-violet-soft:  rgba(158, 133, 240, .16); --fz-violet-ink:  #C3B2FA;
  --fz-teal:        #3CC4BD;  --fz-teal-soft:    rgba(60, 196, 189, .15);  --fz-teal-ink:    #8BE0DA;
  --fz-neutral:     #8A938F;  --fz-neutral-soft: rgba(138, 147, 143, .14); --fz-neutral-ink: #B9C1BD;

  --fz-shadow-soft: 0 1px 2px rgba(0, 0, 0, .30), 0 10px 30px -14px rgba(0, 0, 0, .55);
  --fz-shadow-pop:  0 4px 14px rgba(0, 0, 0, .32), 0 28px 64px -18px rgba(0, 0, 0, .72);
}


/* ═══ 4. DARK — FIRST PAINT ══════════════════════════════════════════════════
   app.jsx sets data-theme before React renders, but this keeps the very first
   paint dark when the OS is dark and the script has not run yet. Same values as §3. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --fz-bg:             #0E1110;
    --fz-sidebar:        #111413;
    --fz-surface-1:      #151817;
    --fz-surface-2:      #1A1E1C;
    --fz-surface-3:      #232826;
    --fz-surface-hover:  #1E2220;
    --fz-surface-sunken: #111413;
    --fz-scrim:          rgba(4, 6, 5, .66);

    --fz-border:         rgba(255, 255, 255, .06);
    --fz-border-strong:  rgba(255, 255, 255, .11);
    --fz-focus:          #A3FF4D;

    --fz-text-1:         #EFF1F0;
    --fz-text-2:         #A9AFAC;
    --fz-text-3:         #8C928F;
    --fz-text-on-accent: #0A1405;

    --fz-accent:         #A3FF4D;
    --fz-accent-hover:   #B6FF73;
    --fz-accent-ink:     #A3FF4D;
    --fz-accent-soft:    rgba(163, 255, 77, .12);
    --fz-accent-line:    rgba(163, 255, 77, .55);

    --fz-ok:          #45C486;  --fz-ok-soft:      rgba(69, 196, 134, .14);  --fz-ok-ink:      #7BDCAB;
    --fz-warn:        #E8A93A;  --fz-warn-soft:    rgba(232, 169, 58, .14);  --fz-warn-ink:    #F2C46E;
    --fz-crit:        #F0716B;  --fz-crit-soft:    rgba(240, 113, 107, .14); --fz-crit-ink:    #FF9D97;
    --fz-info:        #5E9EEA;  --fz-info-soft:    rgba(94, 158, 234, .15);  --fz-info-ink:    #9CC4F7;
    --fz-violet:      #9E85F0;  --fz-violet-soft:  rgba(158, 133, 240, .16); --fz-violet-ink:  #C3B2FA;
    --fz-teal:        #3CC4BD;  --fz-teal-soft:    rgba(60, 196, 189, .15);  --fz-teal-ink:    #8BE0DA;
    --fz-neutral:     #8A938F;  --fz-neutral-soft: rgba(138, 147, 143, .14); --fz-neutral-ink: #B9C1BD;

    --fz-shadow-soft: 0 1px 2px rgba(0, 0, 0, .30), 0 10px 30px -14px rgba(0, 0, 0, .55);
    --fz-shadow-pop:  0 4px 14px rgba(0, 0, 0, .32), 0 28px 64px -18px rgba(0, 0, 0, .72);
    color-scheme: dark;
  }
}


/* ═══ 5. LEGACY RETHEME ══════════════════════════════════════════════════════
   Every un-redesigned screen, modal and form reads --xcs-* / --fsw-* / --bh-*.
   Pointing those at the --fz-* values moves the whole app onto the new palette
   without touching styles.css / ops-theme.css / nova*.css.

   Why this works: all of these are custom properties declared on <html>
   (`:root`, `[data-theme]`), and the var() is resolved on <html> where the
   matching --fz-* value lives. ops-theme.css's own aliases (--fsw-line,
   --fsw-ink-*, --fsw-th-ink …) are var(--xcs-*) chains, so they follow too.

   Specificity: same selectors as nova.css / styles.css, loaded later → we win.
   The ONE token those files set with !important is --xcs-bg-1
   (styles.css:12020 light, nova.css:390-391 light + dark), so it gets
   !important here on the per-theme selector — never on :root, or dark mode
   would pick up the light value (nova.css:381-389 documents that trap).

   Not remapped on purpose: --fsw-accent-line (solid line used by progress fills;
   already lime #A3FF4D dark / #3F9C1B light), --xcs-ink-on-brand, --xcs-side-ink-*,
   --fsw-accent-side, --bh-slate-800 in light, the calendar --fsw-ccal-*, label
   --fsw-lbl-*, chart --fsw-ser-* and --fsw-kpim-* palettes (owned by their page
   agents), --fsw-bar-fill (nova-ui gradient), and --xcs-navy in LIGHT (the
   legacy sidebar stays dark there until the shell agent restyles it). */

/* 5a. Theme-independent: radius ladder. */
:root {
  --xcs-radius-xs:    var(--fz-r-xs);    /*  8 →  8  tiny controls            */
  --xcs-radius-sm:    var(--fz-r-sm);    /* 10 → 12  buttons, inputs          */
  --xcs-radius:       var(--fz-r-lg);    /* 14 → 20  .xcs-card / .xcs-stat    */
  --xcs-radius-lg:    var(--fz-r-xl);    /* 18 → 24  modals, panels, drawers  */
  --xcs-radius-pill:  var(--fz-r-pill);
  --fsw-radius:       var(--fz-r-lg);    /* 14 → 20  .fsw-card, kpi, stat     */
  --fsw-radius-sm:    var(--fz-r-sm);    /* 10 → 12                           */
  --fsw-radius-md:    var(--fz-r-sm);    /* 12 → 12  menus, forms (unchanged) */
  --fsw-radius-input: var(--fz-r-sm);    /* 10 → 12                           */
  --fsw-radius-chip:  var(--fz-r-pill);

  /* v3.10 type floor at the TOKEN level: every legacy micro size (ops-theme
     10.5 / 11 / 11.5px, nova 11.5px) now resolves to the 12px floor, and the
     legacy page-title tokens follow the FZ title scale. */
  --fsw-fs-micro:     var(--fz-fs-micro);  /* 11.5 → 12 */
  --fsw-fs-micro-lg:  var(--fz-fs-micro);  /* 12   → 12 */
  --fsw-fs-chip:      var(--fz-fs-micro);  /* 12   → 12 */
  --fsw-fs-h1:        var(--fz-fs-title);  /* 40   → 30 / 26 */
  --fsw-fs-h1-hp:     var(--fz-fs-title);
}

/* 5b. Per theme (light block also covers :root for the no-attribute case). */
:root, [data-theme="light"] {
  --xcs-bg-1:        var(--fz-bg);
  --xcs-bg-2:        var(--fz-surface-1);
  --xcs-bg-3:        var(--fz-surface-3);
  --xcs-bg-tint:     var(--fz-surface-sunken);
  --fsw-card:        var(--fz-surface-1);
  --fsw-tint:        var(--fz-surface-sunken);

  --xcs-line-1:      var(--fz-border);
  --xcs-line-2:      var(--fz-border-strong);
  --xcs-line-focus:  var(--fz-focus);

  --xcs-ink-1:       var(--fz-text-1);
  --xcs-ink-2:       var(--fz-text-2);
  --xcs-ink-3:       var(--fz-text-3);
  --xcs-ink-4:       var(--fz-text-3);   /* used as LIVE label text in 60+ rules → must stay ≥4.5:1 */

  --bh-slate-50:     var(--fz-bg);       /* styles.css paints body with this, !important */
  --bh-slate-100:    var(--fz-surface-3);
  --bh-slate-200:    var(--fz-border);
  --bh-slate-700:    var(--fz-text-2);
  --bh-slate-900:    var(--fz-text-1);
  --bh-ink:          var(--fz-text-1);
  --bh-muted:        var(--fz-text-3);

  --fsw-accent:      var(--fz-accent);
  --fsw-on-accent:   var(--fz-text-on-accent);
  --fsw-accent-ink:  var(--fz-accent-ink);
  --fsw-accent-soft: var(--fz-accent-soft);
  --xcs-blue:        var(--fz-accent-ink);   /* legacy "primary blue" = accent ink since Nova */
  --xcs-blue-soft:   var(--fz-accent-soft);

  /* Status: same hues, harmonised. Light legacy status tokens are used as TEXT
     (and as fills under white text), so they take the -ink shade. */
  --xcs-green:       var(--fz-ok-ink);      --xcs-green-soft:  var(--fz-ok-soft);
  --xcs-orange:      var(--fz-warn-ink);    --xcs-orange-soft: var(--fz-warn-soft);
  --xcs-red:         var(--fz-crit-ink);    --xcs-red-soft:    var(--fz-crit-soft);
  --xcs-info:        var(--fz-info-ink);    --xcs-info-soft:   var(--fz-info-soft);
  --xcs-violet:      var(--fz-violet-ink);  --xcs-violet-soft: var(--fz-violet-soft);
  --fsw-green:       var(--fz-ok-ink);
  --fsw-amber:       var(--fz-warn-ink);
  --fsw-red:         var(--fz-crit-ink);    --fsw-red-soft:    var(--fz-crit-soft);
  --fsw-blue:        var(--fz-info-ink);
  --fsw-violet:      var(--fz-violet-ink);

  --xcs-shadow-md:   var(--fz-shadow-soft);
  --xcs-shadow-lg:   var(--fz-shadow-pop);
  --xcs-shadow-pop:  var(--fz-shadow-pop);
  --fsw-shadow:      var(--fz-shadow-soft);
}
[data-theme="light"] { --xcs-bg-1: var(--fz-bg) !important; }

[data-theme="dark"] {
  --xcs-bg-1:        var(--fz-bg);
  --xcs-bg-2:        var(--fz-surface-1);
  --xcs-bg-3:        var(--fz-surface-3);
  --xcs-bg-tint:     var(--fz-surface-sunken);
  --fsw-card:        var(--fz-surface-1);
  --fsw-tint:        var(--fz-surface-sunken);

  --xcs-line-1:      var(--fz-border);
  --xcs-line-2:      var(--fz-border-strong);
  --xcs-line-focus:  var(--fz-focus);

  --xcs-ink-1:       var(--fz-text-1);
  --xcs-ink-2:       var(--fz-text-2);
  --xcs-ink-3:       var(--fz-text-3);
  --xcs-ink-4:       var(--fz-text-3);

  /* Sidebar/bottom-bar surface in dark: "slightly lighter than the page". */
  --xcs-navy:        var(--fz-sidebar);
  --xcs-navy-2:      var(--fz-surface-2);
  --xcs-navy-3:      var(--fz-surface-3);

  --bh-slate-50:     var(--fz-bg);
  --bh-slate-100:    var(--fz-surface-sunken);
  --bh-slate-200:    var(--fz-border);
  --bh-slate-700:    var(--fz-text-2);
  --bh-slate-800:    var(--fz-surface-1);
  --bh-slate-900:    var(--fz-text-1);
  --bh-ink:          var(--fz-text-1);
  --bh-muted:        var(--fz-text-3);

  --fsw-accent:      var(--fz-accent);
  --fsw-on-accent:   var(--fz-text-on-accent);
  --fsw-accent-ink:  var(--fz-accent-ink);
  --fsw-accent-soft: var(--fz-accent-soft);
  --xcs-blue:        var(--fz-accent-ink);
  --xcs-blue-soft:   var(--fz-accent-soft);

  /* Dark legacy status tokens take the base shade (all ≥5.7:1 on surface-1,
     so they stay valid as text as well as fills). */
  --xcs-green:       var(--fz-ok);      --xcs-green-soft:  var(--fz-ok-soft);
  --xcs-orange:      var(--fz-warn);    --xcs-orange-soft: var(--fz-warn-soft);
  --xcs-red:         var(--fz-crit);    --xcs-red-soft:    var(--fz-crit-soft);
  --xcs-info:        var(--fz-info);    --xcs-info-soft:   var(--fz-info-soft);
  --xcs-violet:      var(--fz-violet);  --xcs-violet-soft: var(--fz-violet-soft);
  --fsw-green:       var(--fz-ok);
  --fsw-amber:       var(--fz-warn);
  --fsw-red:         var(--fz-crit);    --fsw-red-soft:    var(--fz-crit-soft);
  --fsw-blue:        var(--fz-info);
  --fsw-violet:      var(--fz-violet);

  --xcs-shadow-md:   var(--fz-shadow-soft);
  --xcs-shadow-lg:   var(--fz-shadow-pop);
  --xcs-shadow-pop:  var(--fz-shadow-pop);
  --fsw-shadow:      var(--fz-shadow-soft);

  /* Range sliders (ops-theme.css:2614) still carried the pre-Nova cyan
     #36DEFC in dark only; light already reads the lime accent. */
  --fsw-sl-track:      var(--fz-border-strong);
  --fsw-sl-track-line: var(--fz-border-strong);
  --fsw-sl-fill:       var(--fz-accent);
  --fsw-sl-thumb:      var(--fz-accent);
  --fsw-sl-thumb-line: var(--fz-accent);
  --fsw-sl-ring:       var(--fz-accent-soft);
  --fsw-sl-v:          var(--fz-text-1);
  --fsw-sl-u:          var(--fz-text-2);
  --fsw-sl-end:        var(--fz-text-3);
}
[data-theme="dark"] { --xcs-bg-1: var(--fz-bg) !important; }

/* First paint, OS dark, no attribute yet: the :root light remap above would
   otherwise point the legacy tokens at light values, so repeat the dark side. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --xcs-bg-1: var(--fz-bg); --xcs-bg-2: var(--fz-surface-1); --xcs-bg-3: var(--fz-surface-3);
    --xcs-bg-tint: var(--fz-surface-sunken);
    --fsw-card: var(--fz-surface-1); --fsw-tint: var(--fz-surface-sunken);
    --xcs-line-1: var(--fz-border); --xcs-line-2: var(--fz-border-strong); --xcs-line-focus: var(--fz-focus);
    --xcs-ink-1: var(--fz-text-1); --xcs-ink-2: var(--fz-text-2); --xcs-ink-3: var(--fz-text-3); --xcs-ink-4: var(--fz-text-3);
    --xcs-navy: var(--fz-sidebar); --xcs-navy-2: var(--fz-surface-2); --xcs-navy-3: var(--fz-surface-3);
    --bh-slate-50: var(--fz-bg); --bh-slate-100: var(--fz-surface-sunken); --bh-slate-200: var(--fz-border);
    --bh-slate-700: var(--fz-text-2); --bh-slate-800: var(--fz-surface-1); --bh-slate-900: var(--fz-text-1);
    --bh-ink: var(--fz-text-1); --bh-muted: var(--fz-text-3);
    --xcs-green: var(--fz-ok); --xcs-green-soft: var(--fz-ok-soft);
    --xcs-orange: var(--fz-warn); --xcs-orange-soft: var(--fz-warn-soft);
    --xcs-red: var(--fz-crit); --xcs-red-soft: var(--fz-crit-soft);
    --xcs-info: var(--fz-info); --xcs-info-soft: var(--fz-info-soft);
    --xcs-violet: var(--fz-violet); --xcs-violet-soft: var(--fz-violet-soft);
    --fsw-green: var(--fz-ok); --fsw-amber: var(--fz-warn); --fsw-red: var(--fz-crit);
    --fsw-red-soft: var(--fz-crit-soft); --fsw-blue: var(--fz-info); --fsw-violet: var(--fz-violet);
    --xcs-shadow-md: var(--fz-shadow-soft); --xcs-shadow-lg: var(--fz-shadow-pop); --xcs-shadow-pop: var(--fz-shadow-pop);
    --fsw-sl-track: var(--fz-border-strong); --fsw-sl-track-line: var(--fz-border-strong);
    --fsw-sl-fill: var(--fz-accent); --fsw-sl-thumb: var(--fz-accent); --fsw-sl-thumb-line: var(--fz-accent);
    --fsw-sl-ring: var(--fz-accent-soft); --fsw-sl-v: var(--fz-text-1); --fsw-sl-u: var(--fz-text-2); --fsw-sl-end: var(--fz-text-3);
  }
}


/* ═══ 6. GLOBAL BASE ═════════════════════════════════════════════════════════
   Nothing component-specific here. styles.css paints body with !important
   three ways (:12015 var(--bh-slate-50); :17403 and :18277
   `html[data-theme="dark"] body` = (0,1,2) with a grey radial wash on #0A0A0A),
   so the page background needs !important at (0,1,2) to win. */
html,
body,
html[data-theme] body {
  background: var(--fz-bg) !important;
}
body {
  font-family: var(--fz-font-body);
  color: var(--fz-text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* One visible keyboard focus ring. (0,1,0): beats nova.css's zero-specificity
   :where() ring, but loses to any component that styles its own :focus state. */
:focus-visible {
  outline: 2px solid var(--fz-focus);
  outline-offset: 2px;
}
@media print {
  html, body, html[data-theme] body { background: #FFFFFF !important; }
}
