:root {
  color-scheme: light;
  --cdx-primary-50: #eef6ff;
  --cdx-primary-100: #d9ebff;
  --cdx-primary-300: #88c6ff;
  --cdx-primary-400: #51a5f6;
  --cdx-primary: #2563eb;
  --cdx-primary-600: #1d65d8;
  --cdx-primary-700: #1a50af;
  --cdx-primary-soft: rgba(47, 128, 237, 0.1);
  --cdx-cyan: #06b6d4;
  --cdx-cyan-soft: rgba(6, 182, 212, 0.12);
  --cdx-secondary: #14b8a6;
  --cdx-secondary-600: #168a73;
  --cdx-secondary-soft: rgba(32, 169, 139, 0.12);
  --cdx-purple: #7c3aed;
  --cdx-purple-soft: rgba(124, 58, 237, 0.12);
  --cdx-accent: #7c5cff;
  --cdx-accent-soft: rgba(124, 92, 255, 0.12);
  --cdx-ink: #0f172a;
  --cdx-text: #182235;
  --cdx-muted: #64748b;
  --cdx-subtle: #94a3b8;
  --cdx-border: #e5eaf1;
  --cdx-border-strong: #cbd5e1;
  --cdx-surface: #ffffff;
  --cdx-surface-2: #f8fafc;
  --cdx-surface-3: #eef2f7;
  --cdx-page: #f3f7fd;
  --cdx-success: #16a34a;
  --cdx-success-soft: rgba(22, 163, 74, 0.1);
  --cdx-warning: #f59e0b;
  --cdx-warning-soft: rgba(245, 158, 11, 0.12);
  --cdx-error: #dc2626;
  --cdx-error-soft: rgba(220, 38, 38, 0.1);
  --cdx-info: #0ea5e9;
  --cdx-info-soft: rgba(14, 165, 233, 0.11);

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.62rem;

  --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-page: clamp(0.875rem, 3.8vw, 1.125rem);
  --mobile-card-pad: clamp(0.875rem, 3.6vw, 1rem);

  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 1px 1px rgba(15, 23, 42, 0.03), 0 14px 36px rgba(37, 99, 235, 0.075), 0 10px 24px rgba(15, 23, 42, 0.055);
  --shadow-card-hover: 0 1px 1px rgba(15, 23, 42, 0.04), 0 20px 52px rgba(37, 99, 235, 0.12), 0 16px 38px rgba(15, 23, 42, 0.08);
  --shadow-float: 0 24px 62px rgba(15, 23, 42, 0.17);
  --shadow-focus: 0 0 0 0.25rem rgba(47, 128, 237, 0.16);
  --brand-gradient: linear-gradient(135deg, #2563eb, #0ea5e9 52%, #14b8a6);
  --brand-gradient-purple: linear-gradient(135deg, #2563eb, #7c3aed 58%, #06b6d4);
  --brand-gradient-teal: linear-gradient(135deg, #0f766e, #14b8a6 52%, #06b6d4);
  --brand-gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --tap-size: 44px;
  --header-action-size: 40px;
  --header-min-height: 72px;
  --bottom-nav-height: 74px;
  --app-max-width: 520px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --transition-fast: 150ms ease;
  --transition-base: 240ms ease;
  --transition-slow: 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="dark"],
body[data-theme="dark"] {
  color-scheme: dark;
  --cdx-primary: #51a5f6;
  --cdx-primary-600: #88c6ff;
  --cdx-primary-700: #b9dcff;
  --cdx-primary-soft: rgba(47, 128, 237, 0.16);
  --cdx-secondary: #40c5a5;
  --cdx-secondary-600: #78dcc3;
  --cdx-secondary-soft: rgba(32, 169, 139, 0.16);
  --cdx-cyan: #22d3ee;
  --cdx-cyan-soft: rgba(34, 211, 238, 0.16);
  --cdx-purple: #a78bfa;
  --cdx-purple-soft: rgba(167, 139, 250, 0.16);
  --cdx-accent-soft: rgba(124, 92, 255, 0.16);
  --cdx-ink: #f8fafc;
  --cdx-text: #dde7f4;
  --cdx-muted: #9aa8bc;
  --cdx-subtle: #708199;
  --cdx-border: #28364d;
  --cdx-border-strong: #405069;
  --cdx-surface: #121c2e;
  --cdx-surface-2: #172238;
  --cdx-surface-3: #202c42;
  --cdx-page: #0d1424;
  --cdx-success-soft: rgba(22, 163, 74, 0.14);
  --cdx-warning-soft: rgba(245, 158, 11, 0.14);
  --cdx-error-soft: rgba(220, 38, 38, 0.14);
  --cdx-info-soft: rgba(14, 165, 233, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 1px 1px rgba(255, 255, 255, 0.025), 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 1px 1px rgba(255, 255, 255, 0.035), 0 24px 58px rgba(0, 0, 0, 0.38);
  --shadow-float: 0 28px 72px rgba(0, 0, 0, 0.42);
  --shadow-focus: 0 0 0 0.25rem rgba(81, 165, 246, 0.18);
}
