/* ═══════════════════════════════════════════════════════════
   MigrationProvision — Design tokens
   Colour, typography, space, radius, shadow, motion.
   See BRAND.md §5 for rationale.
═══════════════════════════════════════════════════════════ */

:root {
  /* ── Palette ─────────────────────────────────────────── */
  --c-ink:           #0e2a47;
  --c-ink-soft:      #15355a;
  --c-ink-2:         #1c3f6d;
  --c-authority:     #b78a4a;
  --c-authority-d:   #93702f;
  --c-authority-l:   #d8b27a;

  --c-slate-900:     #0f172a;
  --c-slate-800:     #1e293b;
  --c-slate-700:     #334155;
  --c-slate-600:     #475569;
  --c-slate-500:     #64748b;
  --c-slate-400:     #94a3b8;
  --c-slate-300:     #cbd5e1;
  --c-slate-200:     #e2e8f0;
  --c-slate-100:     #f1f5f9;
  --c-slate-50:      #f8fafc;

  --c-paper:         #fafaf7;
  --c-paper-2:       #f4f2ea;
  --c-white:         #ffffff;

  --c-success:       #15803d;
  --c-success-soft:  #dcfce7;
  --c-warning:       #b45309;
  --c-warning-soft:  #fef3c7;
  --c-danger:        #b91c1c;
  --c-danger-soft:   #fee2e2;
  --c-info:          #1d4ed8;
  --c-info-soft:     #dbeafe;

  /* ── Surfaces / semantic ─────────────────────────────── */
  --bg-page:         var(--c-paper);
  --bg-surface:      var(--c-white);
  --bg-muted:        var(--c-slate-50);
  --bg-dark:         var(--c-ink);
  --bg-darker:       #081e34;

  --text-strong:     var(--c-slate-900);
  --text-body:       var(--c-slate-700);
  --text-muted:      var(--c-slate-500);
  --text-faint:      var(--c-slate-400);
  --text-on-dark:    #e6ecf3;
  --text-on-dark-m:  #9fb0c3;

  --border:          var(--c-slate-200);
  --border-strong:   var(--c-slate-300);
  --border-dark:     #1e3c61;

  /* ── Typography ─────────────────────────────────────── */
  --font-serif:      "Spectral", "EB Garamond", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans:       "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono:       "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-12:           0.75rem;
  --fs-13:           0.8125rem;
  --fs-14:           0.875rem;
  --fs-15:           0.9375rem;
  --fs-16:           1rem;
  --fs-17:           1.0625rem;
  --fs-18:           1.125rem;
  --fs-20:           1.25rem;
  --fs-24:           1.5rem;
  --fs-28:           1.75rem;
  --fs-32:           2rem;
  --fs-40:           2.5rem;
  --fs-48:           3rem;
  --fs-56:           3.5rem;
  --fs-64:           4rem;

  --lh-tight:        1.12;
  --lh-snug:         1.25;
  --lh-normal:       1.5;
  --lh-relaxed:      1.7;

  --tracking-tight:  -0.025em;
  --tracking-normal: 0;
  --tracking-wide:   0.02em;
  --tracking-wider:  0.1em;

  /* ── Space ────────────────────────────────────────── */
  --space-0:         0;
  --space-1:         4px;
  --space-2:         8px;
  --space-3:         12px;
  --space-4:         16px;
  --space-5:         20px;
  --space-6:         24px;
  --space-7:         32px;
  --space-8:         40px;
  --space-9:         48px;
  --space-10:        64px;
  --space-11:        80px;
  --space-12:        96px;
  --space-13:        128px;

  /* ── Radius ───────────────────────────────────────── */
  --r-0:             0;
  --r-2:             2px;
  --r-4:             4px;
  --r-6:             6px;
  --r-8:             8px;
  --r-10:            10px;
  --r-12:            12px;
  --r-16:            16px;
  --r-pill:          999px;

  /* ── Shadow ───────────────────────────────────────── */
  --sh-0:            0 0 #0000;
  --sh-1:            0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --sh-2:            0 2px 4px rgba(15, 23, 42, .04), 0 4px 8px rgba(15, 23, 42, .06);
  --sh-3:            0 4px 8px rgba(15, 23, 42, .04), 0 8px 16px rgba(15, 23, 42, .08);
  --sh-4:            0 8px 16px rgba(15, 23, 42, .06), 0 20px 32px rgba(15, 23, 42, .10);
  --sh-inner:        inset 0 1px 2px rgba(15, 23, 42, .06);
  --sh-focus:        0 0 0 3px rgba(183, 138, 74, .35);
  --sh-focus-info:   0 0 0 3px rgba(29, 78, 216, .25);

  /* ── Motion ───────────────────────────────────────── */
  --t-fast:          .12s ease-out;
  --t-base:          .2s ease-out;
  --t-slow:          .35s ease-out;

  /* ── Layout ───────────────────────────────────────── */
  --container:       1200px;
  --container-narrow:880px;
  --container-prose: 720px;

  --z-base:          1;
  --z-sticky:        100;
  --z-header:        200;
  --z-drawer:        900;
  --z-modal:         1000;
  --z-toast:         1100;
}

/* ── Dark inverted block tokens (for sections only — not full app dark mode) ─ */
[data-theme="dark"] {
  --bg-surface:    var(--c-ink);
  --text-strong:   #f6f8fb;
  --text-body:     #d3dbe5;
  --text-muted:    #93a3b6;
  --border:        var(--border-dark);
}
