:root {
  /* Semantic Design Tokens — Light Mode Default */
  --bg-main: #f6f4ef;
  --bg-surface: #ffffff;
  --bg-elevated: #efece4;
  --bg-inset: #e8e4da;
  --text-primary: #141413;
  --text-muted: #5a5852;
  --text-faint: #78746c;
  --border-subtle: rgba(20, 20, 19, 0.12);
  --border-strong: rgba(20, 20, 19, 0.24);
  --accent-color: #c8321b;
  --accent-hover: #a62613;
  --accent-soft: rgba(200, 50, 27, 0.08);
  --success-color: #1c6b43;
  --success-soft: rgba(28, 107, 67, 0.12);
  --error-color: #b42318;
  --error-soft: rgba(180, 35, 24, 0.10);
  --shadow-crisp: 0 1px 2px rgba(20, 20, 19, 0.05), 0 8px 24px rgba(20, 20, 19, 0.04);
  --shadow-modal: 0 24px 64px rgba(20, 20, 19, 0.18);

  /* Strict 4px/8px Spacing Scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;
  --sp-10: 4rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --header-height: 72px;
  --container-max: 1320px;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 180ms var(--ease-spring);
  --transition-theme: 240ms ease;
}

[data-theme="dark"] {
  --bg-main: #0f1012;
  --bg-surface: #17191c;
  --bg-elevated: #1e2126;
  --bg-inset: #252930;
  --text-primary: #f2efe9;
  --text-muted: #a3a098;
  --text-faint: #848078;
  --border-subtle: rgba(242, 239, 233, 0.12);
  --border-strong: rgba(242, 239, 233, 0.26);
  --accent-color: #e5482e;
  --accent-hover: #f05d44;
  --accent-soft: rgba(229, 72, 46, 0.14);
  --success-color: #3bb273;
  --success-soft: rgba(59, 178, 115, 0.14);
  --error-color: #f97066;
  --error-soft: rgba(249, 112, 102, 0.14);
  --shadow-crisp: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.65);
}
