/* ============================================================================
   Budget Builder — Design Tokens
   Two-tone system:  NAVY / STEEL  = structure & identity
                     ACTION BLUE   = anything the user can press
   Workbook colour conventions (amber input / green calculated / orange subtotal)
   are preserved as first-class tokens — they are business language, not styling.
   ========================================================================= */

:root {
  /* ── Brand · structure ─────────────────────────────────────────────── */
  --navy-900: #0F2337;
  --navy-800: #14314B;
  --navy-700: #1E3A5F;
  --navy-600: #2C4E75;
  --steel-600: #3B6FA0;
  --steel-500: #5288B8;
  --steel-100: #E0EAF5;
  --steel-050: #EFF4FA;

  /* ── Action blue · interactive ──────────────────────────────────────── */
  --blue-700: #2853B8;
  --blue-600: #3B72E8;
  --blue-500: #5B8CF5;
  --blue-400: #7BA3F7;
  --blue-200: #C5D9FC;
  --blue-100: #DEE8FE;
  --blue-050: #F0F5FF;

  /* ── Neutrals ───────────────────────────────────────────────────────── */
  --ink-900: #12161C;
  --ink-800: #252D38;
  --ink-700: #303A47;
  --ink-600: #4A5768;
  --ink-500: #6B7A8D;
  --ink-400: #93A1B2;
  --ink-300: #C3CDD9;
  --ink-200: #DFE5EC;
  --ink-100: #EDF1F6;
  --ink-050: #F6F8FB;
  --ink-025: #FAFBFD;
  --white: #FFFFFF;

  /* ── Semantic ───────────────────────────────────────────────────────── */
  --ok-600: #1F8A4C;
  --ok-100: #DCF3E5;
  --warn-600: #B4740A;
  --warn-500: #E6A817;
  --warn-100: #FDF3D9;
  --danger-600: #C0392B;
  --danger-100: #FBE4E1;
  --info-600: #2C7BB6;
  --info-100: #DCEBF7;

  /* ── Workbook conventions — DO NOT re-map without business sign-off ─── */
  --cell-input: #FFF8E4;          /* amber   · user input          */
  --cell-input-border: #E8C989;
  --cell-calc: #EAF7EF;           /* green   · formula / derived   */
  --cell-calc-border: #B4DCC3;
  --cell-section: var(--navy-700); /* navy    · section header      */
  --cell-subtotal: #FDF0E2;       /* orange  · subtotal            */
  --cell-subtotal-border: #EFC59B;
  --cell-officer: #EAF1FA;        /* blue bg · officers            */
  --cell-rating: #F2F4F7;         /* grey    · ratings             */

  /* ── Element states (rules engine) ──────────────────────────────────── */
  --state-included: var(--ok-600);
  --state-zero: var(--ink-400);
  --state-excluded: var(--ink-300);
  --state-unresolved: var(--danger-600);

  /* ── Type ───────────────────────────────────────────────────────────── */
  --font-ui: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Sora", "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-num: "JetBrains Mono", "Cascadia Mono", ui-monospace, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-36: 2.25rem;

  --lh-tight: 1.2;
  --lh-body: 1.5;

  /* ── Space (4px base) ───────────────────────────────────────────────── */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  /* ── Radii / elevation ──────────────────────────────────────────────── */
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(16, 32, 52, .06), 0 1px 3px rgba(16, 32, 52, .04);
  --sh-2: 0 2px 8px rgba(16, 32, 52, .08), 0 4px 16px rgba(16, 32, 52, .05);
  --sh-3: 0 8px 24px rgba(16, 32, 52, .12), 0 2px 8px rgba(16, 32, 52, .06);
  --sh-4: 0 24px 64px rgba(16, 32, 52, .18), 0 8px 24px rgba(16, 32, 52, .1);
  --sh-5: 0 32px 80px rgba(16, 32, 52, .22);
  --shadow-md: var(--sh-3);
  --sh-interactive: 0 4px 14px rgba(59, 114, 232, .22);
  --sh-interactive-hover: 0 8px 24px rgba(59, 114, 232, .28);
  --sh-surface: 0 1px 0 rgba(255, 255, 255, .85) inset;
  --sh-edge-rail: 4px 0 18px rgba(8, 20, 36, .18);

  /* ── Layout metrics ─────────────────────────────────────────────────── */
  --topbar-h: 52px;
  --rail-w: 52px;
  --sidebar-fold-w: 40px;
  --stepnav-w: 232px;
  --content-max: 1440px;
  --field-h: 40px;
  --field-h-sm: 32px;

  /* Per-section control sizing (overridden on .card / .modal__panel) */
  --section-control-h: var(--field-h);
  --section-table-num-w: 4.75rem;
  --section-table-nat-w: 9.5rem;
  --section-table-money-w: 6.5rem;

  /* Form rhythm — shared across wizard, admin, MDM, modals */
  --form-col-gap: var(--s-5);
  --form-row-gap: var(--s-4);
  --form-section-gap: var(--s-5);
  --form-min-col: 220px;

  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-panel: 320ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(0, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}
