:root {
  /* Primary */
  --tga-primary: #1565C0;
  --tga-primary-dark: #0D47A1;
  --tga-primary-light: #E3F2FD;
  --tga-primary-rgb: 21, 101, 192;

  /* Success */
  --tga-success: #2E7D32;
  --tga-success-light: #E8F5E9;

  /* Warning */
  --tga-warning: #E65100;
  --tga-warning-light: #FFF3E0;

  /* Error */
  --tga-error: #C62828;
  --tga-error-light: #FFEBEE;

  /* Neutrals */
  --tga-neutral-50: #FAFAFA;
  --tga-neutral-100: #F5F5F5;
  --tga-neutral-200: #EEEEEE;
  --tga-neutral-300: #E0E0E0;
  --tga-neutral-400: #BDBDBD;
  --tga-neutral-500: #9E9E9E;
  --tga-neutral-600: #757575;
  --tga-neutral-700: #616161;
  --tga-neutral-800: #424242;
  --tga-neutral-900: #212121;

  /* Whites & Blacks */
  --tga-white: #fff;
  --tga-black: #000;

  /* Parchment palette (modernized warm linen) */
  --tga-parchment-bg: #f8f6f1;
  --tga-parchment-surface: #f0ece4;
  --tga-parchment-border: #ddd8ce;
  --tga-parchment-text: #4a453d;
  --tga-parchment-muted: #7a756c;
  --tga-parchment-accent: #5c574e;

  /* Hero overlay tokens */
  --tga-overlay-light: rgba(255, 255, 255, 0.12);
  --tga-overlay-lighter: rgba(255, 255, 255, 0.05);
  --tga-overlay-medium: rgba(255, 255, 255, 0.4);

  /* Typography */
  --tga-text-xs: 0.75rem;
  --tga-text-sm: 0.875rem;
  --tga-text-base: 1rem;
  --tga-text-lg: 1.125rem;
  --tga-text-xl: 1.25rem;
  --tga-text-2xl: 1.5rem;
  --tga-text-3xl: 1.875rem;
  --tga-text-4xl: 2.25rem;
  --tga-line-height-tight: 1.25;
  --tga-line-height-normal: 1.5;
  --tga-line-height-relaxed: 1.625;
  --tga-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Spacing */
  --tga-space-1: 0.25rem;
  --tga-space-2: 0.5rem;
  --tga-space-3: 0.75rem;
  --tga-space-4: 1rem;
  --tga-space-5: 1.25rem;
  --tga-space-6: 1.5rem;
  --tga-space-8: 2rem;
  --tga-space-10: 2.5rem;
  --tga-space-12: 3rem;
  --tga-space-16: 4rem;

  /* Shadows */
  --tga-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --tga-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --tga-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --tga-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --tga-shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --tga-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.10);
  --tga-shadow-inset-warm: inset 0 2px 12px rgba(120, 100, 70, 0.08);

  /* Radii */
  --tga-radius-sm: 6px;
  --tga-radius-md: 8px;
  --tga-radius-lg: 12px;
  --tga-radius-xl: 16px;
  --tga-radius-full: 9999px;

  /* Border widths */
  --tga-border-thin: 1px;
  --tga-border-base: 2px;

  /* Transitions */
  --tga-transition-fast: 150ms ease;
  --tga-transition-base: 200ms ease;
  --tga-transition-slow: 300ms ease;

  /* Layout */
  --tga-container-max: 1200px;
  --tga-content-max: 900px;
}

/* Dark mode overrides */
[data-theme="dark"] {
  /* Core palette — inverted for dark backgrounds */
  --tga-white: #161b22;
  --tga-black: #ecf2f8;

  /* Neutral scale — low = dark surfaces, high = light text */
  --tga-neutral-50: #1c2128;
  --tga-neutral-100: #21262d;
  --tga-neutral-200: #30363d;
  --tga-neutral-300: #484f58;
  --tga-neutral-400: #6e7681;
  --tga-neutral-500: #8b949e;
  --tga-neutral-600: #b1bac4;
  --tga-neutral-700: #c9d1d9;
  --tga-neutral-800: #d8dee4;
  --tga-neutral-900: #ecf2f8;

  /* Semantic light backgrounds — darkened */
  --tga-primary-light: #172336;
  --tga-success-light: #14261a;
  --tga-warning-light: #2a1d0e;
  --tga-error-light: #2a1215;

  /* Parchment */
  --tga-parchment-bg: #1e1e1e;
  --tga-parchment-surface: #2a2a2a;
  --tga-parchment-border: #3a3a3a;
  --tga-parchment-text: #d4d0c8;
  --tga-parchment-muted: #9a958c;
  --tga-parchment-accent: #b0a898;

  /* Shadows — stronger for dark surfaces */
  --tga-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --tga-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --tga-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --tga-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
  --tga-shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.2);
  --tga-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
  --tga-shadow-inset-warm: inset 0 2px 12px rgba(0, 0, 0, 0.15);
}
