:root {
  /* Brand */
  --ds-color-brand-primary: #002147;
  --ds-color-brand-accent: #C5A059;
  --ds-color-brand-accent-deep: #8B7355;

  /* Neutrals */
  --ds-color-bg-canvas: #f4f1ea;
  --ds-color-bg-surface: #ffffff;
  --ds-color-bg-surface-muted: #fbf9f6;
  --ds-color-border-default: #e5ddd1;
  --ds-color-border-subtle: #e0e0e0;

  /* Text */
  --ds-color-text-strong: #1a1a1a;
  --ds-color-text-heading: #002147;
  --ds-color-text-body: #5a6c7d;
  --ds-color-text-muted: #666666;
  --ds-color-link: #002147;
  --ds-color-link-hover: #C5A059;
  --ds-color-text-on-primary: #ffffff;
  --ds-color-text-on-accent: #ffffff;

  /* Semantic surfaces and borders */
  --ds-color-bg-info-subtle: #edf5ff;
  --ds-color-bg-success-subtle: #ebf9f1;
  --ds-color-bg-warning-subtle: #fff7e8;
  --ds-color-bg-danger-subtle: #fff0f0;
  --ds-color-border-info: #84b5e6;
  --ds-color-border-success: #80d0a4;
  --ds-color-border-warning: #e6ca84;
  --ds-color-border-danger: #e59b9b;
  --ds-color-pill-category-bg: #fbf6eb;
  --ds-color-pill-category-border: #e9d7b4;
  --ds-color-pill-category-text: #6f4f1d;
  --ds-color-pill-tag-bg: #eef3f8;
  --ds-color-pill-tag-border: #c8d7e7;
  --ds-color-pill-tag-text: #173c63;

  /* Feedback */
  --ds-color-success: #176b3a;
  --ds-color-warning: #8a5300;
  --ds-color-danger: #9f1c1c;
  --ds-color-info: #1e5fa3;

  /* Typography */
  --ds-font-family-heading: "EB Garamond", Georgia, serif;
  --ds-font-family-body: "Inter", "Segoe UI", sans-serif;

  --ds-font-size-xs: 0.75rem;
  --ds-font-size-sm: 0.875rem;
  --ds-font-size-md: 1rem;
  --ds-font-size-lg: 1.125rem;
  --ds-font-size-xl: 1.5rem;
  --ds-font-size-2xl: 2rem;
  --ds-font-size-3xl: 2.5rem;
  --ds-font-size-body-lg: 1.125rem;
  --ds-font-size-body-md: 1rem;
  --ds-font-size-body-sm: 0.875rem;
  --ds-font-size-caption: 0.75rem;
  --ds-font-size-overline: 0.75rem;

  /* Heading tokens (desktop) */
  --ds-heading-h1-size: 3rem;
  --ds-heading-h1-line-height: 1.1;
  --ds-heading-h1-weight: 700;
  --ds-heading-h2-size: 2.25rem;
  --ds-heading-h2-line-height: 1.15;
  --ds-heading-h2-weight: 700;
  --ds-heading-h3-size: 1.75rem;
  --ds-heading-h3-line-height: 1.2;
  --ds-heading-h3-weight: 600;
  --ds-heading-h4-size: 1.375rem;
  --ds-heading-h4-line-height: 1.25;
  --ds-heading-h4-weight: 600;
  --ds-heading-h5-size: 1.125rem;
  --ds-heading-h5-line-height: 1.3;
  --ds-heading-h5-weight: 600;
  --ds-heading-h6-size: 1rem;
  --ds-heading-h6-line-height: 1.35;
  --ds-heading-h6-weight: 600;
  --ds-type-body-lg-line-height: 1.7;
  --ds-type-body-md-line-height: 1.65;
  --ds-type-body-sm-line-height: 1.5;
  --ds-type-caption-line-height: 1.4;
  --ds-type-overline-line-height: 1.35;
  --ds-type-overline-letter-spacing: 0.08em;

  --ds-line-height-tight: 1.2;
  --ds-line-height-normal: 1.5;
  --ds-line-height-relaxed: 1.65;

  --ds-font-weight-regular: 400;
  --ds-font-weight-medium: 500;
  --ds-font-weight-semibold: 600;
  --ds-font-weight-bold: 700;

  /* Spacing (4px base) */
  --ds-space-1: 0.25rem;
  --ds-space-2: 0.5rem;
  --ds-space-3: 0.75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.25rem;
  --ds-space-6: 1.5rem;
  --ds-space-8: 2rem;
  --ds-space-10: 2.5rem;
  --ds-space-12: 3rem;
  --ds-space-16: 4rem;
  --ds-space-20: 5rem;

  /* Spacing rules */
  --ds-space-stack-xs: var(--ds-space-2);
  --ds-space-stack-sm: var(--ds-space-3);
  --ds-space-stack-md: var(--ds-space-4);
  --ds-space-stack-lg: var(--ds-space-6);
  --ds-space-stack-xl: var(--ds-space-8);

  --ds-space-inset-sm: var(--ds-space-3);
  --ds-space-inset-md: var(--ds-space-4);
  --ds-space-inset-lg: var(--ds-space-6);
  --ds-space-inset-xl: var(--ds-space-8);

  --ds-space-section-sm: var(--ds-space-10);
  --ds-space-section-md: var(--ds-space-12);
  --ds-space-section-lg: var(--ds-space-16);

  --ds-space-gap-sm: var(--ds-space-3);
  --ds-space-gap-md: var(--ds-space-4);
  --ds-space-gap-lg: var(--ds-space-6);
  --ds-space-gap-xl: var(--ds-space-8);

  /* Pills */
  --ds-pill-height-sm: 1.5rem;
  --ds-pill-height-md: 1.875rem;
  --ds-pill-height-lg: 2.25rem;
  --ds-pill-padding-x-sm: 0.5rem;
  --ds-pill-padding-x-md: 0.75rem;
  --ds-pill-padding-x-lg: 1rem;
  --ds-pill-font-size-sm: 0.75rem;
  --ds-pill-font-size-md: 0.8125rem;
  --ds-pill-font-size-lg: 0.875rem;
  --ds-pill-font-weight: 600;
  --ds-pill-border-width: 1px;
  --ds-pill-gap: 0.375rem;

  /* Layout gutters and containers */
  --ds-container-padding-x: 2rem;
  --ds-container-max-sm: 540px;
  --ds-container-max-md: 720px;
  --ds-container-max-lg: 960px;
  --ds-container-max-xl: 1140px;
  --ds-container-max-xxl: 1320px;

  /* Radius */
  --ds-radius-sm: 0.375rem;
  --ds-radius-md: 0.5rem;
  --ds-radius-lg: 0.875rem;
  --ds-radius-xl: 1rem;
  --ds-radius-pill: 999px;

  /* Elevation */
  --ds-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --ds-shadow-md: 0 6px 24px rgba(0, 0, 0, 0.05);
  --ds-shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);

  /* Motion */
  --ds-motion-fast: 150ms;
  --ds-motion-base: 250ms;
  --ds-motion-slow: 400ms;
  --ds-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ds-motion-enter: 220ms;
  --ds-motion-exit: 180ms;
  --ds-motion-emphasis: 320ms;
  --ds-motion-reduce-factor: 0.01;

  /* Interaction state tokens */
  --ds-state-hover-opacity: 0.92;
  --ds-state-disabled-opacity: 0.45;
  --ds-state-focus-ring-color: #89b4ff;
  --ds-state-focus-ring-width: 3px;
  --ds-state-focus-ring-offset: 2px;

  /* Layout */
  --ds-container-max: 1200px;
  --ds-z-header: 1000;
  --ds-z-dropdown: 1050;
  --ds-z-overlay: 1100;
  --ds-z-modal: 1200;
  --ds-z-toast: 1300;
  --ds-z-tooltip: 1400;

  /* Bootstrap-aligned breakpoints */
  --ds-breakpoint-sm: 576px;
  --ds-breakpoint-md: 768px;
  --ds-breakpoint-lg: 992px;
  --ds-breakpoint-xl: 1200px;
  --ds-breakpoint-xxl: 1400px;
}

/* Tablet: 768px - 991.98px */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --ds-font-size-md: 0.9375rem;
    --ds-font-size-lg: 1.0625rem;
    --ds-font-size-body-lg: 1.0625rem;
    --ds-font-size-body-md: 0.9375rem;

    --ds-heading-h1-size: 2.5rem;
    --ds-heading-h2-size: 2rem;
    --ds-heading-h3-size: 1.5rem;
    --ds-heading-h4-size: 1.25rem;

    --ds-space-section-sm: var(--ds-space-8);
    --ds-space-section-md: var(--ds-space-10);
    --ds-space-section-lg: var(--ds-space-12);
    --ds-space-inset-lg: var(--ds-space-5);
    --ds-space-inset-xl: var(--ds-space-6);
    --ds-space-gap-xl: var(--ds-space-6);

    --ds-container-max: 960px;
    --ds-container-padding-x: 1.5rem;
  }
}

/* Mobile: <= 767.98px */
@media (max-width: 767.98px) {
  :root {
    --ds-font-size-sm: 0.8125rem;
    --ds-font-size-md: 0.9375rem;
    --ds-font-size-lg: 1rem;
    --ds-font-size-xl: 1.25rem;
    --ds-font-size-2xl: 1.625rem;
    --ds-font-size-3xl: 2rem;
    --ds-font-size-body-lg: 1rem;
    --ds-font-size-body-md: 0.9375rem;
    --ds-font-size-body-sm: 0.8125rem;
    --ds-font-size-caption: 0.6875rem;

    --ds-heading-h1-size: 2rem;
    --ds-heading-h2-size: 1.625rem;
    --ds-heading-h3-size: 1.375rem;
    --ds-heading-h4-size: 1.1875rem;
    --ds-heading-h5-size: 1.0625rem;
    --ds-heading-h6-size: 0.9375rem;

    --ds-space-stack-lg: var(--ds-space-5);
    --ds-space-stack-xl: var(--ds-space-6);
    --ds-space-inset-md: var(--ds-space-3);
    --ds-space-inset-lg: var(--ds-space-4);
    --ds-space-inset-xl: var(--ds-space-5);
    --ds-space-section-sm: var(--ds-space-6);
    --ds-space-section-md: var(--ds-space-8);
    --ds-space-section-lg: var(--ds-space-10);
    --ds-space-gap-lg: var(--ds-space-4);
    --ds-space-gap-xl: var(--ds-space-5);
    --ds-pill-height-sm: 1.375rem;
    --ds-pill-padding-x-sm: 0.4375rem;
    --ds-pill-font-size-sm: var(--ds-font-size-caption);
    --ds-pill-height-lg: 2rem;
    --ds-pill-padding-x-lg: 0.875rem;
    --ds-pill-font-size-lg: 0.8125rem;

    --ds-radius-lg: 0.75rem;
    --ds-shadow-lg: 0 10px 22px rgba(0, 0, 0, 0.09);

    --ds-container-max: 100%;
    --ds-container-padding-x: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ds-motion-fast: 1ms;
    --ds-motion-base: 1ms;
    --ds-motion-slow: 1ms;
    --ds-motion-enter: 1ms;
    --ds-motion-exit: 1ms;
    --ds-motion-emphasis: 1ms;
  }
}
