/* ===================================================================
   atlas-tokens.css — Atlas Design System v4.
   THE single source of every design token on the platform.

   Rules (v4 section 2.1):
   - No page and no other stylesheet may declare :root. This file is it.
   - Load it LAST, after any component stylesheet. Nothing else declares :root
     any more, but the order keeps that true if something ever does.
   - guard.sh refuses a commit that adds a second :root under site/.
   - Changing a value here changes every surface. That is the point.

   Values are not invented here. Each one is either carried from
   docs/Atlas_Style_Guide_v2.1.md, from site/lib/atlas-ui.css, or from
   site/admin/admin.css, resolved by the decisions recorded in
   docs/Atlas_Design_System_v4.md section 0.
   =================================================================== */

:root{
  /* ── Brand ─────────────────────────────────────────────────────────
     Official names: Azure = cyan, Midnight = navy, Carbon, Stone. */
  --navy:#001A52;            /* Midnight 900 */
  --navy-2:#0A2B6B;          /* hover / darker navy */
  --cyan:#2EBCE7;            /* Azure 700 */
  --cyan-soft:#E8F7FD;
  --cyan-mid:rgba(46,188,231,.15);

  /* ── Scales — full, from the Brand Guidelines. States come from these,
        never from a new hue. ──────────────────────────────────────── */
  --azure-900:#0D7A9C; --azure-800:#149EC7; --azure-700:#2EBCE7;
  --azure-600:#4DC6EB; --azure-500:#6DD0EE; --azure-400:#82D7F1;
  --azure-300:#96DDF3; --azure-200:#C0EBF8; --azure-100:#D5F2FA;

  --carbon-900:#27282A; --carbon-800:#36373A; --carbon-700:#4D4F53;
  --carbon-600:#717275; --carbon-500:#949598; --carbon-400:#B8B9BA;
  --carbon-300:#DBDCDD; --carbon-200:#EDEDEE; --carbon-100:#FFFFFF;

  --midnight-900:#001A52; --midnight-800:#263C6C; --midnight-700:#40537D;
  --midnight-600:#596A8F; --midnight-500:#7381A0; --midnight-400:#8C98B1;
  --midnight-300:#A6AFC2; --midnight-200:#BFC6D4; --midnight-100:#D9DDE5;

  --stone-900:#A0958E; --stone-800:#B4A7A0; --stone-700:#C8BAB2;
  --stone-600:#D0C4BE; --stone-500:#D6CBC5; --stone-400:#E1D9D5;
  --stone-300:#ECE7E4; --stone-200:#F1EEEC; --stone-100:#F7F5F3;

  /* ── Paper wash — atmosphere only. Nothing is ever read off it. ──── */
  --paper-0:#F7F9FC; --paper-1:#EEF6FB; --paper-2:#DCEDF7;

  /* ── Ink — DECISION 1: .70 / .62 / .30 (.50 to .62 on 30 Oct 2026: captions now pass AA 4.5:1 on every paper). Never pure black. */
  --ink:#001A52;
  --ink-2:rgba(0,26,82,.70);   /* body copy */
  --ink-3:rgba(0,26,82,.62);   /* labels, captions, placeholders */
  --ink-4:rgba(0,26,82,.30);   /* disabled and decorative only: never readable text */

  /* ── Hairlines and glass ─────────────────────────────────────────── */
  --line:rgba(0,26,82,.08); --line-2:rgba(0,26,82,.14);
  --glass:rgba(255,255,255,.72); --glass-2:rgba(255,255,255,.85); --glass-3:rgba(255,255,255,.95);

  /* ── Surfaces — DECISION 11: cards are OPAQUE. Glass survives only on
        the rail and the context strip, which are chrome, not content. ─ */
  --surface-card:#FFFFFF;
  --surface-flat:#F7F9FC;

  /* ── Functional hues — the four brand functional colours. ────────── */
  --fn-error:#EE421C; --fn-success:#23A983; --fn-info:#0084A6; --fn-amber:#F2A900;

  /* ── Status — DECISION 3: hand-tuned OPAQUE triplets. A background,
        a border, and an ink checked to pass AA at 12px. Opaque so the
        same pill is the same colour on the wash and on a white card.
        DECISION 4: a FIGURE never takes a status colour. The figure is
        ink; the chip beside it carries the state. ──────────────────── */
  --st-crit-bg:#FDECE8; --st-crit-ink:#A8300F; --st-crit-line:rgba(163,42,18,.28);
  --st-warn-bg:#FDF3DE; --st-warn-ink:#8A6100; --st-warn-line:rgba(132,82,9,.26);
  --st-ok-bg:#E4F6EE;   --st-ok-ink:#146B52;   --st-ok-line:rgba(20,102,75,.24);
  --st-info-bg:#D5F2FA; --st-info-ink:#0A5C7A; --st-info-line:rgba(10,92,122,.24);

  /* ── Provenance — DECISION 5: first-class. Deliberately COOL, so it
        can never be mistaken for a status. Client data vs what
        Incendium worked out. ──────────────────────────────────────── */
  --pv-client-bg:#EDEDEE;  --pv-client-ink:#146B52;
  --pv-derived-bg:#EDEDEE; --pv-derived-ink:#40537D;
  --pv-est-bg:#F1EEEC;     --pv-est-ink:#4D4F53;
  --pv-mkt-bg:#D5F2FA;     --pv-mkt-ink:#0A5C7A;

  /* ── Chart series — six, stepped off azure and midnight, never the
        status set. A seventh series steps along a scale; it is not a
        new hue. ───────────────────────────────────────────────────── */
  --se-1:#0D7A9C; --se-2:#40537D; --se-3:#149EC7;
  --se-4:#7381A0; --se-5:#2EBCE7; --se-6:#A6AFC2;

  /* ── Grade — Bronze, Silver and Gold on a sustainability standard
        (S-Core, 3 Nov 2026). Not status: a grade is a position, never a
        warning. Same triplet shape as status, inks checked for AA at 12px. */
  --gr-bronze-bg:#F5EADF; --gr-bronze-ink:#7A4521; --gr-bronze-line:rgba(122,69,33,.30);
  --gr-silver-bg:#EDF0F4; --gr-silver-ink:#454F5E; --gr-silver-line:rgba(69,79,94,.28);
  --gr-gold-bg:#FAF1D2;   --gr-gold-ink:#6E5300;   --gr-gold-line:rgba(110,83,0,.30);

  /* ── Boundary marker — DECISION 12: ADOPTED. One treatment for
        "here is the line": today, now, decide-by, engaged. Every chart
        that draws a boundary draws it with these. ─────────────────── */
  --mark:var(--cyan); --mark-ink:#0A5C7A; --mark-solid:#0A5C7A;
  --mark-dash:4 4; --mark-w:2;

  /* ── Type — eight sizes, a hard 10px floor that applies to SVG too,
        and exactly two steps below 13px. DECISION 7: there is no --fs-h1.
        A hero and a section headline are the same size, because these are
        working tools behind a login, not landing pages.
        --fs-xs and --fs-s share 12px deliberately: one is sentence-case
        metadata, the other is controls. Same size, different role. ─── */
  --fs-lbl:10px;   /* uppercase labels only, always with tracking */
  --fs-xs:12px;    /* sentence-case metadata, captions, footnotes */
  --fs-s:12px;     /* controls, chips, dense table cells */
  --fs-m:13px;     /* body copy, standard table cells */
  --fs-l:15px;     /* card headings, stat sublines */
  --fs-xl:22px;    /* stat figures, section sub-heads */
  --fs-2xl:28px;   /* section headlines — the largest type on any page */
  --fs-fig:28px;   /* the big figures: rail headline, portfolio stat */
  --fs-svg-min:10px; /* DECISION 12: ADOPTED. No chart text below this. */

  --font:'Plus Jakarta Sans',system-ui,sans-serif;

  /* ── Control heights — DECISION 2: 32 / 26. One height for input and
        button, so a filter row lines up without adjustment. ────────── */
  --ctl:32px;    /* inputs, selects */
  --btn:32px;    /* buttons */
  --chip:26px;   /* chips, pills, tags */

  /* ── Shape — minimum radius is 10px. No square corners, anywhere. ── */
  --r-sm:10px; --r-md:16px; --r-lg:22px; --r-pill:100px;

  /* ── Elevation — four shadows. Already identical across both of the
        old stylesheets, so nothing was resolved here. ──────────────── */
  --sh-1:0 1px 2px rgba(0,26,82,.05);
  --sh-2:0 2px 8px -3px rgba(0,26,82,.18);
  --sh-3:0 12px 30px -20px rgba(0,26,82,.30);
  --sh-4:0 28px 60px -28px rgba(0,26,82,.45);

  /* ── Spacing — 8pt aligned. Three paddings, two gaps. ────────────── */
  --pad-1:12px; --pad-2:16px; --pad-3:24px;
  --gap-in:12px;    /* within a group */
  --gap-out:24px;   /* between groups */

  /* ── Motion — DECISION 9: three steps, one easing. Named by step, not
        by role, because role names stop working at the fourth use.
        Nothing loops faster than 4000ms. Reduced motion is enforced at
        the bottom of this file, unconditionally. ──────────────────── */
  --t-1:.12s; --t-2:.18s; --t-3:.3s;
  --ease:cubic-bezier(.4,0,.2,1);
  --t-pulse:3.2s;   /* the signature pulse (v4 2.9): one cycle of a pulsing dot or ping */

  /* ── Splash — the opening brand moment on the sign-in page (login D09),
        and nowhere else. Longer than --t-1..3 on purpose: it plays once per
        browser visit and never under reduced motion. Do not reuse these for
        ordinary UI motion; that stays on the three steps above. ──────── */
  --t-splash-swap:.25s; --t-splash-tint:.55s; --t-splash-grow:.65s;
  --t-splash-wash:.7s;  --t-splash-open:.8s;  --t-splash-glide:.9s;
  --ease-out:cubic-bezier(.2,.8,.2,1);    /* splash: box grows, card opens */
  --ease-glide:cubic-bezier(.65,0,.25,1); /* splash: lockup glides to the header */

  /* ── Logo — Brand 1.2: minimum digital width. ───────────────────── */
  --logo-min:120px;

  /* ── Landing hero — Atlas v4 amendment 0.2 (Robin, 1 Oct 2026). The
        public sign-in page at / ONLY. Everywhere else Decision 7 (28px
        ceiling) and Decision 2 (32px controls) stand unchanged. ─────── */
  --fs-hero:clamp(32px,4.6vw,50px);
  --ls-hero:-1.6px;
  --ctl-hero:46px;

  /* ── Shell — DECISION 6: the rail is the only shell. ─────────────── */
  --rail-w:216px;
  --rail-surface:rgba(255,255,255,.55);
  --ctx-surface:rgba(255,255,255,.72);
  --stage-bg:#F7F9FC;

  /* ── Panel fills and utility ─────────────────────────────────────── */
  --panel-head:#F7F9FC; --track:#EDEDEE; --scrim:rgba(0,11,36,.5);

  /* ── Printed reports — Flex Demand Analysis (site/lib/demand-report.css). A sheet is
        A4 landscape on screen and in print; --bar-h is the one bar thickness in a report. ── */
  --sheet-w:297mm; --sheet-h:210mm; --bar-h:8px;

  /* ── Tenure pills — module vocabulary, kept because Module 1 reads
        them. Flagged in v4 section 5 as pending a wider ruling. ────── */
  --flex-bg:rgba(46,188,231,.16); --flex-text:#0A5C7A;
  --lease-bg:rgba(64,83,125,.12); --lease-text:#40537D;
  --focus-bg:rgba(201,122,46,.08); --focus-line:rgba(201,122,46,.35); --focus-text:#8A6100;

  /* ── Workplace Business Case v1, ARCHIVED 28 Oct 2026 (/admin/archive/workplace-business-case-v1.html; v2 does not use these), imported 26 Oct 2026
        from the consulting tool SPACE 0.24.2. Its own values: either not on the shared scales yet, or
        held there at a different value (--wbc-pad-1 8px, --wbc-gap-in 16px, --wbc-ink-3 .64, the
        Midnight info pill). Kept so v1 looks as it did; fold onto the shared scales later. ── */
  --wbc-ink-3:rgba(0,26,82,.64);
  --wbc-paper:linear-gradient(135deg,var(--paper-0) 0%,var(--paper-1) 55%,var(--paper-2) 100%);
  --wbc-glass-btn:rgba(255,255,255,.85);
  --wbc-blur:14px;
  --wbc-st-info-bg:var(--midnight-100);
  --wbc-st-info-ink:var(--midnight-700);
  --wbc-st-info-line:var(--midnight-200);
  --wbc-src-client-bg:var(--cyan-soft);
  --wbc-src-client-ink:#0A5C7A;
  --wbc-src-client-line:var(--azure-300);
  --wbc-src-derived-bg:var(--carbon-200);
  --wbc-src-derived-ink:var(--midnight-700);
  --wbc-src-derived-line:var(--midnight-200);
  --wbc-src-est-bg:var(--stone-200);
  --wbc-src-est-ink:var(--carbon-700);
  --wbc-src-est-line:var(--stone-700);
  --wbc-src-mkt-bg:var(--surface-card);
  --wbc-src-mkt-ink:var(--navy-2);
  --wbc-src-mkt-line:var(--azure-800);
  --wbc-dim:.35;
  --wbc-mark-w:2px;
  --wbc-lh-tight:1.2;
  --wbc-lh-body:1.5;
  --wbc-pulse:3.2s;
  --wbc-rise:12px;
  --wbc-focus-ring:0 0 0 3px var(--cyan-mid);
  --wbc-sp-1:4px;
  --wbc-sp-2:8px;
  --wbc-sp-3:12px;
  --wbc-pad-1:8px;
  --wbc-pad-4:32px;
  --wbc-pad-5:40px;
  --wbc-pad-card:18px;
  --wbc-gap-in:16px;
  --wbc-bw:1px;
  --wbc-bw-2:2px;
  --wbc-pill:22px;
  --wbc-src-h:18px;
  --wbc-bubble:24px;
  --wbc-ic-s:16px;
  --wbc-ic-m:20px;
  --wbc-ic-stroke:2.2;
  --wbc-dot:10px;
  --wbc-ctx-h:86px;
  --wbc-nav-h:40px;
  --wbc-tile-min:200px;
  --wbc-sp-panel-w:640px;
  --wbc-sp-col-s:88px;
  --wbc-sp-col-m:120px;
  --wbc-sp-col-l:200px;
  --wbc-sp-dense-min:900px;
  --wbc-sp-swatch:24px;
}


/* ═══════════════════════════════════════════════════════════════════
   Reduced motion — unconditional, not "when requested" (v4 section 2.9).
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce){
  :root{ --t-1:0s; --t-2:0s; --t-3:0s; }
  *,*::before,*::after{
    animation-duration:.001ms!important; animation-iteration-count:1!important;
    transition-duration:.001ms!important; scroll-behavior:auto!important;
  }
}
