/* ==========================================================================
   IDW-26 - tokens.v1.css
   Drawing Set IDW-26 "The Sovereign Monolith, Rev B"
   The single source for every design token (DESIGN-BIBLE-IDW26.md, section 2).
   Load order on every page: tokens.v1.css -> frame.v1.css -> components.v1.css
   No page-local overrides of these values, ever.
   ========================================================================== */

/* registered properties (animatable custom properties) */
@property --n {
  syntax: '<integer>';
  initial-value: 0;
  inherits: false;
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root{
  /* type ------------------------------------------------------------- */
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;

  /* ground ----------------------------------------------------------- */
  --bg:#09090b;
  /* surface ladder (elevation = luminance, +4-6% per step, max 3) */
  --bg-1:#0e0e11;
  --bg-2:#141417;
  --bg-3:#1a1a1f;
  --bg-footer:#060607;        /* one step DOWN from ground - closes the page */
  --bg-elev:#18181b;
  --surface:rgba(24,24,27,.7);
  --floor:#09090b;            /* never remapped - the dark floor under legal paper
                                 and behind frame header labels */

  /* glass (ONLY sticky nav + scenario transport bar, never nested) ---- */
  --glass-bg:rgba(24,24,27,.55);
  --glass-blur:blur(20px) saturate(150%);
  --glass-border:rgba(63,63,70,.35);
  --glass-inset:inset 0 1px 0 rgba(255,255,255,.07);

  /* ink (never use --ink-4 below 14px) -------------------------------- */
  --ink-1:#f7f8f8;
  --ink-2:#e4e4e7;
  --ink-3:#8a8f98;
  --ink-4:#71717a;
  --ink-lede:#c8c9cf;  /* between ink-2 and ink-3; remapped in doc-light/print */
  --c-danger:#fca5a5;  --c-danger-bg:rgba(220,38,38,.15);
  --c-success:#6ee7b7; --c-success-bg:rgba(5,150,105,.15);

  /* brand -------------------------------------------------------------- */
  --navy:#133070;
  --amber:#f59c00;
  --blue:#2563eb;
  --blue-deep:#1d4ed8;
  --sky:#60a5fa;
  --soft:#dbeafe;

  /* drafting ----------------------------------------------------------- */
  --hairline:rgba(63,63,70,.5);
  --hairline-strong:rgba(63,63,70,.8);
  --hairline-bright:rgba(255,255,255,.14); /* hover border brighten target */
  --grid-line:rgba(250,250,250,.035);
  --annot:#a1a1aa;
  --datum:rgba(96,165,250,.6);
  --stamp:rgba(245,156,0,.85);
  --frame:clamp(12px,2vw,28px);
  --stroke-w:1.25px;

  /* glows (live on ::after, crossfade via opacity, never box-shadow
     transitions) ------------------------------------------------------- */
  --glow-blue:rgba(37,99,235,.4);
  --glow-amber:rgba(245,156,0,.3);
  --glow-pulse:rgba(96,165,250,.55);

  /* actor colours (fixed, used in ALL diagrams) ------------------------ */
  --c-src:#475569;   /* Source (HR / SIS / AD) */
  --c-idw:#2563eb;   /* ID-ware */
  --c-usr:#f59e0b;   /* User */
  --c-est:#059669;   /* Estate */
  --c-crd:#be185d;   /* Card Office */
  --c-acs:#0891b2;   /* Access Control */
  --c-vis:#7c3aed;   /* Visitor */
  --c-aud:#e11d48;   /* Auditor */

  /* radii (sharp data chrome; pill ONLY for approved CTAs) ------------- */
  --r-0:0;
  --r-1:2px;
  --r-2:6px;
  --r-pill:999px;

  /* shadow ------------------------------------------------------------- */
  --edge:inset 0 1px 0 rgba(255,255,255,.06);  /* machined top edge */
  --shadow-slab:inset 0 1px 0 rgba(255,255,255,.06), 0 1px 2px rgba(0,0,0,.45), 0 24px 48px -24px rgba(0,0,0,.6);

  /* spacing (4px base) ------------------------------------------------- */
  --sp-1:4px;
  --sp-2:8px;
  --sp-3:12px;
  --sp-4:16px;
  --sp-5:24px;
  --sp-6:32px;
  --sp-7:48px;
  --sp-8:64px;
  --space-section:clamp(80px, 5vw + 48px, 128px);
  --measure:64ch;

  /* easings ------------------------------------------------------------ */
  --ease-monument:cubic-bezier(.22,1,.36,1);  /* all entrances, 600-900ms */
  --ease-draw:cubic-bezier(.65,0,.35,1);      /* SVG line draws, 800-1600ms */
}

/* ==========================================================================
   LIGHT MODE - legal pages only (body.doc-light) and print.
   The dark floor stays dark on legal pages; the paper sheet uses these.
   ========================================================================== */
body.doc-light{
  --bg:#fafaf9;
  --bg-elev:#fff;
  --surface:#fff;
  --ink-1:#0c0a09;
  --ink-2:#292524;
  --ink-3:#57534e;
  --ink-4:#57534e;
  --ink-lede:#44403c;
  --hairline:rgba(12,10,9,.08);
  --hairline-strong:rgba(12,10,9,.18);
  --grid-line:rgba(12,10,9,.04);
  --annot:#57534e;
  --shadow-slab:inset 0 1px 0 rgba(255,255,255,.5), 0 24px 48px -24px rgba(12,10,9,.25);
}

@media print{
  :root{
    --bg:#fafaf9;
    --bg-elev:#fff;
    --surface:#fff;
    --floor:#fff;
    --ink-1:#0c0a09;
    --ink-2:#292524;
    --ink-3:#57534e;
    --ink-4:#57534e;
    --ink-lede:#44403c;
    --hairline:rgba(12,10,9,.08);
    --hairline-strong:rgba(12,10,9,.18);
    --grid-line:rgba(12,10,9,.04);
    --annot:#57534e;
    --shadow-slab:none;
  }
  body{background:#fff !important;color:#0c0a09 !important}
}
