/* ==========================================================================
   Design Tokens — Folzena Privacy Center
   Restores the formal clinical Slate & Blue palette in Light Mode, and pairs
   it with a high-contrast Slate-Midnight + Luminous Sky/Blue accent in Dark Mode
   where active text remains crisp white so text and background never blend.
   ========================================================================== */

:root,
[data-theme="light"] {
  /* Surface Palette (Crisp Clinical Slate & Pure White) */
  --color-bg-canvas: #f8fafc;
  --color-bg-surface: #ffffff;
  --color-bg-elevated: #f1f5f9;
  --color-bg-active-pill: #eff6ff;
  --color-bg-header: rgba(255, 255, 255, 0.9);

  /* Text Hierarchy (Deep Slate Ink) */
  --color-text-primary: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;

  /* Formal Institutional Accent (Clinical & Legal Trust Blue) */
  --color-accent-primary: #1d4ed8;
  --color-accent-hover: #1e40af;
  --color-active-text: #1e40af;
  --color-badge-bg: #eff6ff;
  --color-badge-border: #bfdbfe;
  --color-badge-text: #1d4ed8;

  /* Callout Notice Surface */
  --color-notice-bg: #f8fafc;
  --color-notice-border: #cbd5e1;
  --color-notice-accent: #1d4ed8;

  /* Dividers & Hairlines */
  --color-border-hairline: #e2e8f0;
  --color-border-control: #cbd5e1;
  --color-border-strong: #94a3b8;
  --color-focus-ring: #1d4ed8;

  /* Subtle Architectural Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-dropdown: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --font-size-2xs: 0.6875rem;   /* 11px */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 0.96875rem; /* 15.5px */
  --font-size-md: 1.0625rem;    /* 17px */
  --font-size-lg: 1.3125rem;    /* 21px */
  --font-size-xl: 1.5rem;       /* 24px */
  --font-size-hero: clamp(1.875rem, 3.6vw, 2.75rem);

  --line-height-tight: 1.18;
  --line-height-snug: 1.35;
  --line-height-relaxed: 1.72;

  /* Layout & Spacing */
  --layout-max-width: 1160px;
  --layout-header-height: 64px;
  --layout-sidebar-width: 268px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition-fast: 140ms ease;
  --transition-normal: 200ms ease;

  color-scheme: light;
}

[data-theme="dark"] {
  /* Surface Palette (Deep Slate-Midnight with Subtle Cool Depth) */
  --color-bg-canvas: #0b0f17;
  --color-bg-surface: #111827;
  --color-bg-elevated: #1e293b;
  --color-bg-active-pill: rgba(56, 189, 248, 0.13);
  --color-bg-header: rgba(11, 15, 23, 0.9);

  /* Text Hierarchy (Crisp White & Cool Silver) */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #7c8ba1;

  /* Luminous Accent for Indicators/Eyebrows, while Active Text stays Crisp White */
  --color-accent-primary: #38bdf8;
  --color-accent-hover: #7dd3fc;
  --color-active-text: #f8fafc;
  --color-badge-bg: rgba(56, 189, 248, 0.12);
  --color-badge-border: rgba(56, 189, 248, 0.32);
  --color-badge-text: #7dd3fc;

  /* Callout Notice Surface */
  --color-notice-bg: #111827;
  --color-notice-border: #1e293b;
  --color-notice-accent: #38bdf8;

  /* Dividers & Hairlines */
  --color-border-hairline: #1e293b;
  --color-border-control: #2e3c51;
  --color-border-strong: #475569;
  --color-focus-ring: #38bdf8;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-dropdown: 0 14px 36px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}
