:root {
  --page-gutter: clamp(16px, 3.2vw, 40px);
  --shell-max: 1440px;
  --reading-max: 760px;
  --lab-max: 1280px;
  --rail-w: 212px;
  --header-h: 72px;
  --mobile-nav-h: 70px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --fs-0: 0.75rem;
  --fs-1: 0.875rem;
  --fs-2: 1rem;
  --fs-3: 1.125rem;
  --fs-4: clamp(1.3rem, 1.7vw, 1.6rem);
  --fs-5: clamp(1.7rem, 2.8vw, 2.4rem);
  --fs-6: clamp(2.35rem, 5vw, 4.6rem);
  --lh-tight: 1.05;
  --lh-title: 1.15;
  --lh-body: 1.62;

  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-standard: cubic-bezier(.2,.6,.2,1);
  --dur-fast: 150ms;
  --dur-med: 260ms;
  --dur-slow: 480ms;

  --accent: #ff704d;
  --accent-strong: #e95231;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --signal: #81d4b8;
  --signal-soft: color-mix(in srgb, var(--signal) 12%, transparent);
  --info: #76a9f6;
  --warn: #e8b861;
  --danger: #e66b71;

  --bg: #f2f0eb;
  --bg-elevated: #faf9f6;
  --surface: #ffffff;
  --surface-2: #ebe8e1;
  --surface-3: #dfdcd4;
  --text: #171816;
  --text-2: #5c5d57;
  --text-3: #85867e;
  --line: #d8d5cd;
  --line-strong: #bbb8af;
  --inverted: #f7f4ed;
  --inverted-bg: #171816;
  --shadow-1: 0 1px 1px rgba(26,25,22,.05), 0 10px 28px rgba(26,25,22,.05);
  --shadow-2: 0 20px 70px rgba(26,25,22,.13);
  --grid-line: rgba(20,20,18,.055);
}

html[data-theme="dark"] {
  --bg: #101215;
  --bg-elevated: #14171b;
  --surface: #191c21;
  --surface-2: #20242a;
  --surface-3: #2a2f36;
  --text: #f2f0ea;
  --text-2: #b0b2ad;
  --text-3: #7f837d;
  --line: #2e3339;
  --line-strong: #424850;
  --inverted: #171816;
  --inverted-bg: #f2f0ea;
  --shadow-1: 0 1px 1px rgba(0,0,0,.24), 0 16px 34px rgba(0,0,0,.16);
  --shadow-2: 0 26px 90px rgba(0,0,0,.38);
  --grid-line: rgba(255,255,255,.035);
}
