/* ════════════════════════════════════════════════════════════════════════════
   ZDIV2 — DESIGN TOKENS  ·  the single source of truth for the whole product
   ────────────────────────────────────────────────────────────────────────────
   Governed by the Gold Standard: docs/scope/FORM_GOLD_STANDARD.md
   (§ "Design tokens — the enforced source"). EVERY surface — sidebar, hub, every
   V9 form (the geo- and gf- Kit), the ZED rail — pulls its color / type / spacing /
   elevation from THESE variables so it all flows (one font, one palette, one
   scale). Build new pages against var(--zd-*); never hardcode a hex.

   Loaded FIRST in App.razor (before app.css / chrome.css / v9-geometry.css) so
   every downstream sheet can reference it. Change a brand value HERE, once.

   Aesthetic: clean, light, Fortune-500 (Meta Business Suite / Stripe / Linear) —
   white panels on a soft grey canvas, hairline borders, ONE blue accent, soft
   off-ink text (no pure-black/pure-white halation), real but restrained depth.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
    /* ── Surfaces ──────────────────────────────────────────────────────────── */
    --zd-canvas:        #E4ECF5;   /* app background — deepened so cards separate (was #EEF3F8; token pass 2026-06-30) */
    --zd-panel:         #FFFFFF;   /* cards · sidebar · rails · form zones */
    --zd-panel-tint:    #F4F8FD;   /* subtle inset (metric sub-cards, hover) · cards sit slightly off-white */
    --zd-hairline:      #CBD9EE;   /* lighter tier — dividers / hero / separators (was #E3E9F1; token pass 2026-06-30) */
    --zd-hairline-2:    #AFC2DD;   /* strong tier — card / grid border (was #CBD9EE; token pass 2026-06-30) */
    --zd-scrim:         rgba(13, 30, 56, 0.35);   /* modal/dialog backdrop — SSOT (was raw rgba in CustomerLookUp / ContactManager / EmployeeTrack / LogIn modals) */

    /* ── Ink (text) — soft off-ink, pure white reserved for emphasis on color ─ */
    --zd-ink:           #1C2B3A;   /* primary text */
    --zd-ink-2:         #2A3B55;   /* secondary · nav items */
    --zd-muted:         #5A6E8C;   /* labels · captions · sub-text */
    --zd-muted-2:       #8A99AD;   /* tertiary · uppercase eyebrows */

    /* ── MONOCHROME NAV (Craig 2026-08-20, Option B lock) — the menu + agent hub
         retire the blue accent for a Fortune-500 monochrome treatment. Scoped to
         the sidebar (and, later, the hub) via these tokens; the rest of the app
         keeps the blue accent above until Craig converts it too. ── */
    --zd-mono-ink:        #2B2B28;   /* active text · section-open text */
    --zd-mono-ink-2:      #3A3A37;   /* nav item text */
    --zd-mono-muted:      #86867F;   /* section eyebrows */
    --zd-mono-active-bg:  #ECECEA;   /* Option B active pill */
    --zd-mono-active-bar: #2B2B28;   /* charcoal left bar + active dot */
    --zd-mono-hover-bg:   #F1F1EF;   /* row hover */
    --zd-mono-line:       #E6E6E3;   /* guide line under a parent's children */

    /* ── Accent — ONE blue, everywhere (links, active, primary action, ZED) ── */
    --zd-accent:        #1565BE;
    --zd-accent-strong: #0F4C95;   /* hover / pressed */
    --zd-accent-soft:   rgba(21,101,190,0.10);   /* pills · tints · active bg */
    --zd-accent-line:   rgba(21,101,190,0.28);    /* accent border */

    /* ── V9 FORM DNA — the legacy fingerprint, reconciled to the light system ─ */
    --zd-bluebar:       #1B3A6B;   /* the filled blue-bar field LABEL (V9 signature) */
    --zd-bluebar-ink:   #FFFFFF;   /* blue-bar text */
    --zd-value-bg:      #FFFFFF;   /* editable value box */
    --zd-readonly-bg:   #F4F8FE;   /* read-only value (V9 TDBText) */
    --zd-grid-head:     #EDF3FB;   /* grid column-header strip */
    --zd-caption-bg:    #FFFFFF;   /* form/page HEADER band — was navy #071426 */
    --zd-caption-ink:   #1C2B3A;   /* form/page header text */

    /* ── Status — muted, corporate (not Tailwind defaults) ──────────────────── */
    --zd-ok:    #557A68;   --zd-ok-soft:   #EAF0EC;   /* quietest grey-toned (was #1F7A4D / #E6F0E2; token pass 2026-06-30) */
    --zd-warn:  #7E6A48;   --zd-warn-soft: #F1EEE6;   /* (was #B45309 / #FBEFD9) */
    --zd-bad:   #8A5F57;   --zd-bad-soft:  #EFE9E7;   /* (was #B0341D / #FBEDEA) */
    --zd-prospect: #6A5E86; --zd-prospect-soft: #EEECF4;  /* KYC 'prospect' status — the muted 6th hue (violet); theme has no purple (2026-08-06) */

    /* ── Typography — ONE family across the whole system (rule #5: "it all flows") */
    --zd-font:      'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --zd-font-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* ── Elevation — restrained depth (dimensional, not flat; not heavy) ─────── */
    --zd-shadow-1: 0 3px 8px rgba(16,33,60,0.14), 0 1px 2px rgba(16,33,60,0.08);   /* resting card — stronger lift (token pass 2026-06-30) */
    --zd-shadow-2: 0 8px 20px rgba(16,33,60,0.14);  /* hover / lifted */
    --zd-shadow-3: 0 6px 24px rgba(16,33,60,0.08);  /* panel / shell */

    /* ── Radius ─────────────────────────────────────────────────────────────── */
    --zd-radius:    10px;
    --zd-radius-sm: 7px;
    --zd-radius-lg: 12px;

    /* ── Spacing scale — 4px base; use these, never a raw px gap/pad ─────────── */
    --zd-space-1:   4px;
    --zd-space-2:   8px;
    --zd-space-3:  12px;
    --zd-space-4:  16px;
    --zd-space-5:  20px;
    --zd-space-6:  24px;
    --zd-space-8:  32px;
    --zd-space-10: 40px;
    --zd-space-12: 48px;

    /* ── Type scale — the V9 rail ramp (eyebrow to h2); one ladder everywhere ── */
    --zd-fs-eyebrow:  11px;   /* uppercase labels / eyebrows */
    --zd-fs-caption:  12px;   /* captions · sub-text */
    --zd-fs-body:     13px;   /* body · form fields (V9 rail baseline) */
    --zd-fs-value:    15px;   /* emphasized value · section title */
    --zd-fs-h3:       17px;   /* card / panel heading */
    --zd-fs-h2:       22px;   /* page / metric heading */
    --zd-lh:          1.5;    /* default line-height */
    --zd-lh-tight:    1.2;    /* headings */
    --zd-fw-medium:   500;
    --zd-fw-semibold: 600;
    --zd-fw-bold:     700;
    --zd-tracking-eyebrow: 0.04em;   /* uppercase letter-spacing */

    /* ── Motion — one ease/duration (honor prefers-reduced-motion at the use) ── */
    --zd-ease:       cubic-bezier(0.2, 0.7, 0.3, 1);
    --zd-transition: 140ms var(--zd-ease);

    /* ── Focus — one visible accessibility ring, everywhere ─────────────────── */
    --zd-focus-ring: 0 0 0 3px var(--zd-accent-soft);

    /* ── The zdi.com report rail, locked design v1 (Craig 11-21) — its OWN palette, matched to Craig's screenshot of the mockup
          (STRUCZ SCOPE/report-rail-2026-11-21/reference_craig_2026-11-21.png). Used ONLY by css/seo-drill-rail.css (.zdi-rail-v1);
          the rail is a signed design, so it does not take the app's muted status hues. (2026-11-26) ── */
    --zd-rail-bg-neutral:   #F2F2F0;
    --zd-rail-surface:      #FFFFFF;
    --zd-rail-border:       #E3E3DF;
    --zd-rail-ink:          #1F1E1D;
    --zd-rail-ink-2:        #3D3D3A;
    --zd-rail-muted:        #73726C;
    --zd-rail-success:      #2F6B2E;   --zd-rail-success-bg: #D8EED3;
    --zd-rail-warning:      #7A5A12;   --zd-rail-warning-bg: #F5EACD;
    --zd-rail-danger:       #8C2B22;   --zd-rail-danger-bg:  #F6D3D0;
}
