/* ============================================================
   Design Tokens — single source of truth
   8px spatial grid · WCAG AAA text contrast · limited palette
   ============================================================ */
:root {
  /* Color system */
  --color-primary:       #3730A3;  /* 10.7:1 on white — AAA */
  --color-primary-hover: #2C2683;
  --color-primary-soft:  #EEF2FF;
  --color-secondary:     #115E59;  /* 7.5:1 on white — AAA */
  --color-secondary-soft:#F0FDFA;

  --color-bg:            #FAF9F7;
  --color-surface:       #FFFFFF;
  --color-border:        #E7E5E4;
  --color-border-strong: #D6D3D1;

  --color-text:          #1C1917;  /* 16.6:1 — AAA */
  --color-text-muted:    #4F4C47;  /*  8.1:1 — AAA */
  --color-text-inverse:  #FFFFFF;

  --color-success:       #14532D;
  --color-success-soft:  #F0FDF4;
  --color-error:         #7F1D1D;
  --color-error-soft:    #FEF2F2;
  --color-warn:          #713F12;
  --color-warn-soft:     #FEF9C3;

  /* 8px spatial grid */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --leading-body: 1.6;
  --leading-tight: 1.25;

  /* Surfaces */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(28,25,23,.04), 0 1px 3px rgba(28,25,23,.06);
  --shadow-md: 0 2px 4px rgba(28,25,23,.04), 0 6px 16px rgba(28,25,23,.08);
  --shadow-lg: 0 4px 8px rgba(28,25,23,.05), 0 12px 32px rgba(28,25,23,.12);

  /* Motion */
  --ease: cubic-bezier(.25,.1,.25,1);
  --duration: 180ms;

  /* Layout */
  --sidebar-w: 248px;
  --tap-target: 48px;
  --content-max: 1200px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration: 0ms; }
}
