/* tokens.css — the single source of design tokens.
   Derived from the reference app (research/v4/01a §1) with Umbrella branding:
   reference plum (page identity, 3px card bars) → Umbrella crimson; reference red (primary action) kept restrained.
   Rules: red = do the thing / danger. Brand crimson = page identity. Bold blue = positive state.
   Never green for status (green appears only as the UCI "Ground" data-classification swatch). */
:root {
  /* canvas + surfaces */
  --bg: #E2E6E1;            /* sage canvas, also topbar + rail */
  --header: #E2E6E1;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --panel: #E4E3E0;         /* read-only fields */
  --nested: #EDECE8;        /* nested blocks inside cards */
  --well: #DDDCD8;
  --soft: #F1EEEA;          /* user bubble on the front door */
  --soft2: #F7F5F2;

  /* ink */
  --ink: #1A1A1A;
  --ink2: #3A362F;
  --mut: #3E3933;           /* secondary text (deliberately dark: WCAG AA on sage) */
  --mut2: #4A443C;          /* tertiary */
  --mut3: #6B655D;          /* placeholders, disabled labels */
  --line: #E1E0DC;          /* hairlines */
  --line2: #CECCC7;         /* control borders */
  --topbar-line: #C7C2B8;

  /* action red (the reference's CTA red, restrained) */
  --red: #D7261E;
  --red-d: #B01D16;
  --pink-t: #FBE7E3;        /* red tint: active rail, chips, drop zone */
  --pink-2: #F0C7BF;

  /* brand crimson: page identity (the reference's plum slot) */
  --brand: #B3122E;
  --brand-d: #8C0D23;
  --brand-t: #F4E0E3;
  --brand-2: #E3B9C0;

  /* accents */
  --emph: #C15E19;          /* burnt orange: "your turn", due soon, money to act on */
  --emph-t: #F6DDC9;
  --bblue: #0F3A85;         /* positive accent: done, KPI numbers, links, focus */
  --blue-d: #0F3A85;
  --blue-t: #E4EBF1;
  --blue-2: #C9D7E8;
  --teal-d: #2F6E6B;        /* active / in progress */
  --teal-t: #DCEBE9;
  --amber-d: #8A5A00;
  --amber-t: #FBF1DA;
  --graphite: #403A33;
  --graphite-t: #E7E2DA;
  --ai: #0F3A85;            /* "Elpis said this" accent (one value everywhere; fixes reference token drift) */
  --ai-t: #E4EBF1;

  /* governance rows: RECORDED / CAPTURED / ASSIGNED use blue (positive), PENDING amber */
  --ok-bg: #E8EEF6;
  --ok-fg: #0F3A85;
  --warn-bg: #FBF1DA;
  --warn-fg: #8A5A00;
  --danger-bg: #FBE7E3;
  --danger-fg: #B01D16;

  /* UCI (Umbrella Clearance Index) data classification swatches */
  --uci-green: #1F7A5A;  --uci-green-t: #DDEFE6;
  --uci-yellow: #C9A227; --uci-yellow-t: #F6EDCC;
  --uci-orange: #D2691E; --uci-orange-t: #F8E1CF;
  --uci-red: #C0392B;    --uci-red-t: #F6DCD8;

  /* type */
  --sans: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --script: 'Sacramento', 'Brush Script MT', cursive;
  --fz-h: 30px; --fz-title: 16px; --fz-body: 14px; --fz-sm: 13px; --fz-meta: 11.5px; --fz-mono: 10.5px;

  /* radii */
  --r-pill: 30px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 18px; --r-composer: 24px;

  /* shadows (warm brown tint) */
  --shadow: 0 1px 2px rgba(38,30,20,.05), 0 1px 3px rgba(38,30,20,.08);
  --shadow-2: 0 2px 4px rgba(38,30,20,.06), 0 4px 8px -2px rgba(38,30,20,.10);
  --shadow-lg: 0 12px 34px rgba(38,30,20,.12);
  --shadow-pop: 0 18px 50px rgba(20,18,17,.18);
  --shadow-drawer: -18px 0 50px rgba(20,18,17,.13);
  --glow-red: 0 8px 24px rgba(215,38,30,.26);
  --glow-brand: 0 8px 24px rgba(179,18,46,.26);
  --focus: 0 0 0 2px #fff, 0 0 0 4px #0F3A85;

  /* motion */
  --t-fast: .12s; --t-mid: .24s; --ease: cubic-bezier(.4,0,.2,1);

  /* layout */
  --topbar-h: 56px; --footer-h: 32px; --rail-w: 56px; --rail-w-open: 186px; --content-max: 1320px;
  /* Bottom inset reserved by something docked at the viewport bottom (the director's console sets it while open).
     The shell lays out in --app-h; the guide engine reads --app-inset-bottom (guide/runtime.js). */
  --app-inset-bottom: 0px;
  --app-h: calc(100vh - var(--app-inset-bottom));
}

/* Canopy skin: neutral rebrand. Only identity colours move; action red and status colours stay. */
html[data-skin="canopy"] {
  --brand: #2F5E5B; --brand-d: #224644; --brand-t: #DDEAE8; --brand-2: #B8D2CF;
  --glow-brand: 0 8px 24px rgba(47,94,91,.26);
}
