/* Design tokens — authority: DESIGN_SYSTEM.md */

:root {
  /* color — surfaces */
  --color-app-bg: #F7F7F5;
  --color-surface-1: #FFFFFF;
  --color-surface-2: #F1F1EE;
  --color-surface-3: #E8E8E3;

  /* color — text */
  --color-text-primary: #161616;
  --color-text-secondary: #3A3A38;
  --color-text-muted: #6B6B66;
  --color-text-inverse: #FFFFFF;

  /* color — brand primary (trust blue) */
  --color-primary-50:  #EEF3FF;
  --color-primary-100: #D6E1FE;
  --color-primary-500: #3A76FF;
  --color-primary-600: #1F5EFF;
  --color-primary-700: #1748C7;
  --color-primary-800: #103591;

  /* color — status */
  --color-success-50:  #E8F3EE;
  --color-success-600: #18794E;
  --color-warning-50:  #FFF4E0;
  --color-warning-700: #9A5B00;
  --color-danger-50:   #FBECEA;
  --color-danger-600:  #C0362C;

  /* color — borders */
  --color-border-subtle: #E4E4DF;
  --color-border-strong: #161616;

  /* color — focus */
  --color-focus-ring: #1748C7;
  --focus-ring-width: 3px;

  /* typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.55;
  --line-height-relaxed: 1.65;

  /* type scale — desktop */
  --fs-display: 3rem;      /* 48 */
  --fs-h1: 2.25rem;        /* 36 */
  --fs-h2: 1.75rem;        /* 28 */
  --fs-h3: 1.375rem;       /* 22 */
  --fs-h4: 1.125rem;       /* 18 */
  --fs-body-lg: 1.125rem;  /* 18 */
  --fs-body: 1rem;         /* 16 */
  --fs-small: 0.875rem;    /* 14 */
  --fs-micro: 0.75rem;     /* 12 */

  /* spacing scale (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;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* shadow — restrained */
  --shadow-sm: 0 1px 2px rgba(22,22,22,0.06);
  --shadow-md: 0 4px 12px rgba(22,22,22,0.08);
  --shadow-lg: 0 12px 28px rgba(22,22,22,0.10);

  /* layout */
  --container-max: 1200px;
  --container-padding: var(--s-5);
  --nav-height: 72px;

  /* motion */
  --duration-fast: 120ms;
  --duration-med: 200ms;
  --duration-slow: 320ms;
  --ease-standard: cubic-bezier(.2,.6,.2,1);

  /* z-index stack */
  --z-nav: 50;
  --z-modal: 100;
  --z-toast: 200;
}

@media (max-width: 640px) {
  :root {
    --fs-display: 2.25rem;
    --fs-h1: 1.75rem;
    --fs-h2: 1.375rem;
    --fs-h3: 1.125rem;
    --fs-h4: 1rem;
    --fs-body-lg: 1rem;
    --container-padding: var(--s-4);
    --nav-height: 60px;
  }
}

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