:root {
  color-scheme: light dark;
  --color-paper: #f4efe7;
  --color-paper-raised: #ece4d9;
  --color-ink: #161417;
  --color-muted-ink: #6d6665;
  --color-burgundy: #7a3e4d;
  --color-copper: #b9794a;
  --color-moss: #66705b;
  --color-night: #131216;
  --color-night-raised: #1b191f;
  --color-dark-text: #f0e8de;
  --color-dark-muted-text: #aaa39c;

  --font-editorial: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-native-control: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;

  --text-hero: 3.5rem;
  --text-display: 2.625rem;
  --text-h1: 2rem;
  --text-h2: 1.5rem;
  --text-h3: 1.1875rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-meta: 0.75rem;

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

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  --motion-fast: 160ms;
  --motion-normal: 180ms;
  --motion-slow: 240ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --container-reading: 45rem;
  --container-content: 70rem;
  --container-wide: 85rem;

  --focus-width: 3px;
  --focus-offset: 3px;

  /* Light-first default: public marketing and catalog fixture surfaces. */
  --surface-canvas: var(--color-paper);
  --surface-raised: var(--color-paper-raised);
  --text-primary: var(--color-ink);
  --text-secondary: var(--color-muted-ink);
  --text-secondary-raised: var(--color-ink);
  --text-accent: var(--color-burgundy);
  --border-subtle: #d5ccc0;
  --border-strong: #9b8e83;
  --action-primary-bg: var(--color-burgundy);
  --action-primary-text: #fff;
  --action-secondary-bg: transparent;
  --action-secondary-text: var(--color-ink);
  --focus-ring: var(--color-burgundy);
  --shadow-raised: 0 10px 30px rgba(22, 20, 23, 0.08);
}

:root[data-theme="light"], [data-theme="light"] {
  color-scheme: light;
  --surface-canvas: var(--color-paper);
  --surface-raised: var(--color-paper-raised);
  --text-primary: var(--color-ink);
  --text-secondary: var(--color-muted-ink);
  --text-secondary-raised: var(--color-ink);
  --text-accent: var(--color-burgundy);
  --border-subtle: #d5ccc0;
  --border-strong: #9b8e83;
  --action-primary-bg: var(--color-burgundy);
  --action-primary-text: #fff;
  --action-secondary-bg: transparent;
  --action-secondary-text: var(--color-ink);
  --focus-ring: var(--color-burgundy);
  --shadow-raised: 0 10px 30px rgba(22, 20, 23, 0.08);
}

:root[data-theme="dark"], [data-theme="dark"] {
  color-scheme: dark;
  --surface-canvas: var(--color-night);
  --surface-raised: var(--color-night-raised);
  --text-primary: var(--color-dark-text);
  --text-secondary: var(--color-dark-muted-text);
  --text-secondary-raised: var(--color-dark-muted-text);
  --text-accent: #e4c2cb;
  --border-subtle: #343039;
  --border-strong: #6c646e;
  --action-primary-bg: #d6a3b0;
  --action-primary-text: var(--color-night);
  --action-secondary-bg: transparent;
  --action-secondary-text: var(--color-dark-text);
  --focus-ring: var(--color-copper);
  --shadow-raised: 0 12px 36px rgba(0, 0, 0, 0.26);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --surface-canvas: var(--color-night);
    --surface-raised: var(--color-night-raised);
    --text-primary: var(--color-dark-text);
    --text-secondary: var(--color-dark-muted-text);
    --text-secondary-raised: var(--color-dark-muted-text);
    --text-accent: #e4c2cb;
    --border-subtle: #343039;
    --border-strong: #6c646e;
    --action-primary-bg: #d6a3b0;
    --action-primary-text: var(--color-night);
    --action-secondary-bg: transparent;
    --action-secondary-text: var(--color-dark-text);
    --focus-ring: var(--color-copper);
    --shadow-raised: 0 12px 36px rgba(0, 0, 0, 0.26);
  }
}

html {
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-ui);
  text-rendering: optimizeLegibility;
}

body {
  background: var(--surface-canvas);
  color: var(--text-primary);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

:where(button, input, select, textarea) {
  font-family: var(--font-native-control);
}

.editorial-display {
  font-family: var(--font-editorial);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.ui-meta {
  color: var(--text-secondary);
  font-size: var(--text-meta);
  line-height: 1.35;
}

.surface-raised {
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-raised);
}

/* Copper/Moss are intentionally decorative: not generic normal-text colors. */
.accent-copper { color: var(--color-copper); }
.accent-moss { color: var(--color-moss); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 720px) {
  :root {
    --text-hero: 2.625rem;
    --text-display: 2rem;
    --text-h1: 1.75rem;
  }
}
