:root {
  /* base surfaces */
  --bg: #EEF0F4;
  --surface: #F7F8FA;
  --surface-soft: #FBFCFE;
  --surface-strong: #0F1220;

  /* text */
  --text: #121826;
  --text-secondary: rgba(18, 24, 38, 0.86);
  --text-muted: rgba(18, 24, 38, 0.68);

  /* borders */
  --border-subtle: rgba(18, 24, 38, 0.07);
  --border-strong: rgba(18, 24, 38, 0.14);

  /* brand */
  --color-primary: #7C5CFF;
  --color-primary-soft: rgba(124, 92, 255, 0.12);
  --color-accent: #FF4D9D;
  --color-accent-soft: rgba(255, 77, 157, 0.12);
  --primary-rgb: 124 92 255;
  --accent-rgb: 255 77 157;
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);

  /* glows & shadows */
  --glow-primary: 0 10px 30px rgb(var(--primary-rgb) / 0.22);
  --shadow-sm:
    0 2px 4px rgba(18, 24, 38, 0.04),
    0 10px 30px rgba(18, 24, 38, 0.06);
  --shadow-md:
    0 4px 12px rgba(18, 24, 38, 0.06),
    0 20px 40px rgba(18, 24, 38, 0.08);
  --shadow-lg:
    0 10px 24px rgba(18, 24, 38, 0.08),
    0 30px 60px rgba(18, 24, 38, 0.1);

  /* radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  /* spacing — 8pt grid */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 80px;
  --sp-9: 96px;

  /* container */
  --container-width: 1200px;
  --page-padding-x: 32px;
  --header-height: 72px;
  --content-max: 62ch;
  --card-padding: 24px;
  --card-padding-compact: 20px;
  --control-height: 44px;
  --control-height-lg: 52px;
  --transition-fast: 0.16s ease-out;
  --transition-normal: 0.22s ease;

  /* typography scale (fluid) */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: clamp(1.1rem, 1vw + 0.9rem, 1.25rem);
  --text-xl: clamp(1.3rem, 1.1vw + 1rem, 1.5rem);
  --text-2xl: clamp(1.6rem, 1.4vw + 1.1rem, 2rem);
  --text-3xl: clamp(2rem, 1.8vw + 1.3rem, 2.5rem);
  --text-4xl: clamp(2.4rem, 2.2vw + 1.4rem, 3.1rem);

  --leading-tight: 1.12;
  --leading-snug: 1.22;
  --leading-normal: 1.6;

  /* z-index */
  --z-header: 40;
  --z-overlay: 50;
  --z-tooltip: 60;
}

[data-theme="dark"] {
  --bg: #0A0A10;
  --surface: #12121A;
  --surface-soft: #171723;
  --surface-strong: #05050B;

  --text: #F6F7FB;
  --text-secondary: rgba(246, 247, 251, 0.88);
  --text-muted: rgba(246, 247, 251, 0.76);

  --border-subtle: rgba(246, 247, 251, 0.14);
  --border-strong: rgba(246, 247, 251, 0.22);

  --glow-primary:
    0 0 0 1px rgb(var(--primary-rgb) / 0.35),
    0 0 44px rgb(var(--primary-rgb) / 0.42),
    0 18px 48px rgba(0, 0, 0, 0.75);

  --shadow-sm:
    0 0 0 1px rgba(148, 163, 184, 0.25),
    0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-md:
    0 0 0 1px rgba(148, 163, 184, 0.35),
    0 20px 50px rgba(0, 0, 0, 0.75);
  --shadow-lg:
    0 0 0 1px rgba(124, 92, 255, 0.45),
    0 28px 70px rgba(0, 0, 0, 0.85);
}
