/* ChituSystems design tokens — sole token source for the UI (doc UI_REFACTOR_20260918 §7).
   PHASE 5 FROZEN (2026-09-20): final scales and component specifications are
   recorded in UI_REFACTOR_20260918 §14. This freeze changes comments only.
   Token values or component specifications require a documented, confirmed change.
   PHASE 2 (Token recolor, 2026-09-18): values switched to the new palette per doc §3.1-§3.3;
   §3.2 status tokens and the nav/line/focus tokens added per phase-2 steps 2-3.
   Legacy token names are kept as-is (renaming belongs to Phase 6).
   REJECTED values per §3.4 — do NOT reintroduce:
     dim #687477 (on bg 4.49 / on soft 4.32, AA fail)
     warn #B98224 (3.34, fail as text and as button bg)
     danger #C25353 (4.51, no margin)
     accent #287A6A directly on nav dark (2.92 < 3:1 — use accent-on-dark #45A894)
   PHASE 1 CONTRACT (superseded by Phase 2): every value was byte-identical to the
   pre-refactor literal it replaced.
   Provenance:
   - section 1: the green-era root block relocated verbatim from style.css line 290 (10 vars)
   - section 2: the six surviving variables of the blue-era root block (style.css lines 1-7);
     the other ten blue variables were overridden by section 1 and dropped in relocation
     (computed values unchanged). The six below still feed 20 live var() references
     (19 in style.css, 1 in templates/discovery_batch.html) and must not be removed
     before Phase 6 hands them over to the §3.2 status tokens.
   - section 3: 116 tokens created for the 158 literals that were scattered outside any
     root block (151 occurrences / 114 distinct values in style.css, 7 / 5 in flow.css;
     3 distinct values matched existing tokens and reuse them: fff -> --card,
     a12a2f -> --red, fdebed -> --red-soft). */
:root {
  /* 1) green-era palette (verbatim relocation, values frozen) */
  --bg:#F5F7F7;
  --card:#FFFFFF;
  --soft:#F0F3F2;
  --line:#E2E7E5;
  --ink:#1E292B;
  --dim:#5C686B;
  --nav:#1D2928;
  --accent:#287A6A;
  --accent-soft:#E8F3F0;
  --shadow:0 2px 6px rgba(24,48,38,.035);

  /* 2) blue-era survivors (verbatim relocation; live references, see header) */

  /* 3) tokens for previously scattered literals (value = original literal) */

  /* 3a) sidebar & navigation */
  --sidebar-link-blue:#E6EBEA;
  --nav-hover:rgba(255,255,255,.08);
  --sidebar-active-blue:#324843;
  --brand-mark-blue:#287A6A;
  --brand-sub-ink:#9AA7A5;
  --brand-sub-line:rgba(255,255,255,.13);
  --nav-icon-ink:#9AA7A5;
  --nav-label-ink:#9AA7A5;
  --nav-step-bg:rgba(255,255,255,.11);
  --sidebar-foot-blue:#9AA7A5;
  --sidebar-group-ink:#9AA7A5;
  --status-dot:#3B7F5E;
  --sidebar-bg:#1D2928;
  --sidebar-active-bg:#324843;
  --sidebar-active-bar:#45A894;
  --brand-mark-bg:#287A6A;
  --brand-mark-ink:#FFFFFF;
  --nav-group-ink:#9AA7A5;
  --sidebar-foot-ink:#9AA7A5;

  /* 3b) buttons, inputs & chips */
  --btn-secondary-ink-blue:#287A6A;
  --line-control:#E2E7E5;
  --focus-ring-blue:#287A6A;
  --focus-ring:#287A6A;
  --btn-secondary-ink:#287A6A;
  --btn-secondary-border:#C7D0CD;
  --btn-ghost-ink:#287A6A;
  --input-border:#C7D0CD;
  --input-disabled-ink:#5C686B;
  --input-disabled-bg:#F0F3F2;
  --label-ink:#5C686B;
  --field-label-ink:#5C686B;
  --filter-summary-ink:#5C686B;
  --chip-ink:#5C686B;
  --chip-bg:#F0F3F2;
  --badge-ink:#5C686B;
  --select-all-ink:#E6EBEA;

  /* 3c) tables, rows & numeric strips */
  --th-bg-blue:#F0F3F2;
  --th-ink-blue:#5C686B;
  --th-bg:#F0F3F2;
  --th-ink:#5C686B;
  --stat-hover-border:#C7D0CD;
  --row-hover:#F0F3F2;
  --row-hover-alt:#F0F3F2;
  --summary-ink:#5C686B;
  --score-bg:#F0F3F2;
  --score-ink:#5C686B;
  --stage-index-bg:#F0F3F2;
  --stage-index-ink:#5C686B;
  --progress-bg:#F0F3F2;
  --progress-divider:#E2E7E5;
  --meter-bg:#E2E7E5;
  --row-more-bg:#F0F3F2;

  /* 3d) status & notices */
  --warn-border:#E0C48A;
  --warn-ink:#8A6012;
  --error-border:#E3B5B5;
  --error-ink:#B84A4A;
  --error-strong:#B84A4A;
  --ok-border:#B4D6C4;
  --ok-ink:#3B7F5E;
  --info-border:#B7CCE8;
  --info-ink:#4777B5;
  --note-warn-bg:#FBF2DF;
  --note-warn-border:#E0C48A;
  --note-warn-ink:#8A6012;
  --restriction-bg:#FBF2DF;
  --restriction-border:#E0C48A;
  --restriction-ink:#8A6012;
  --feedback-bg:#E8F3F0;

  /* 3e) flow steps & work stages */
  --step-done-bg:#E6F2EC;
  --step-current-border:#287A6A;
  --step-current-ring:#287A6A;
  --step-blocked-border:#E0C48A;
  --step-blocked-bg:#FBF2DF;
  --flow-number-bg:#E2E7E5;
  --step-active-bg:#E8F3F0;
  --soft-blue:#E8F3F0;
  --next-action-bg:#E8F3F0;
  --has-work-bg:#E8F3F0;

  /* 3f) panels, cards & report surfaces (green era) */
  --surface-tint:#FFFFFF;
  --goal-bg:#E6F2EC;
  --goal-border:#B4D6C4;
  --focus-card-bg:#1D2928;
  --focus-card-ink:#E6EBEA;
  --focus-card-eyebrow:#45A894;
  --focus-card-cta:#287A6A;
  --focus-card-cta-ink:#FFFFFF;
  --panel-accent-line:#287A6A;
  --opportunity-border:#E2E7E5;
  --evidence-gaps-bg:#F0F3F2;
  --channel-summary-bg:#F0F3F2;
  --model-guide-bg:#E8F3F0;
  --intro-ink:#1E292B;
  --priority-score-ink:#287A6A;
  --analysis-ink:#1E292B;
  --summary-toggle-ink:#287A6A;
  --progress-track:#E2E7E5;
  --progress-value:#287A6A;

  /* 3g) overlays, drawers & misc surfaces */
  --bulk-bar-bg:#1D2928EE;
  --bulk-bar-shadow:rgba(29,41,40,.25);
  --drawer-shadow:rgba(0,0,0,.12);
  --drawer-head-line:#E2E7E5;
  --evidence-bg:#F0F3F2;
  --signal-bg:#F0F3F2;
  --signal-border:#E2E7E5;
  --signal-item-border:#E2E7E5;
  --next-label-ink:#4777B5;
  --profile-bg:#EAF1FA;
  --profile-border:#B7CCE8;
  --recipient-border:#C7D0CD;
  --conversion-shadow:#1D292826;
  --toast-shadow:#1D292833;

  /* 3h) flow.css additions */
  --busy-bg:#E8F3F0;
  --accent-alt:#287A6A;
  --handoff-context-bg:#E8F3F0;
  --handoff-help-bg:#F0F3F2;
  --copy-score-bg:#F0F3F2;

  /* 4) Phase 2 additions per doc 3.1/3.2 (defined now; referenced from Phase 6 onward) */
  --line-strong:#C7D0CD;
  --nav-ink:#E6EBEA;
  --nav-dim:#9AA7A5;
  --accent-on-dark:#45A894;
  --focus:#287A6A;

  /* status colors 3.2 (four groups: text / soft bg / border) */
  --ok:#3B7F5E;
  --ok-soft:#E6F2EC;
  --ok-line:#B4D6C4;
  --warn:#8A6012;
  --warn-soft:#FBF2DF;
  --warn-line:#E0C48A;
  --danger:#B84A4A;
  --danger-soft:#FBEBEB;
  --danger-line:#E3B5B5;
  --info:#4777B5;
  --info-soft:#EAF1FA;
  --info-line:#B7CCE8;

  /* 5) Phase 3 scale tokens (doc §3.3 starting values, confirmed on the
        company_detail stress test; radius converged to three tiers) */
  --fs-xs:12px;
  --fs-sm:13px;
  --fs-md:15px;
  --fs-lg:20px;
  --fs-xl:30px;
  --sp-1:4px;
  --sp-2:8px;
  --sp-3:12px;
  --sp-4:16px;
  --sp-5:24px;
  --sp-6:32px;
  --r-sm:6px;
  --r-md:10px;
  --r-lg:16px;
}
