/* =============================================================================
   shadcn blue theme — non-destructive override
   Linked LAST so it wins the cascade. Remove the <link> in any page's <head>
   to revert that page to the original warm-earth palette.

   Strategy:
   1. Define the full shadcn token set (light + dark) so any future component
      can read --background / --foreground / --primary / etc.
   2. Remap the existing i2 --color-* variables to shadcn equivalents so the
      already-shipped CSS picks up the new palette without touching markup.
   ========================================================================== */

:root {
  /* ---- shadcn light tokens ---- */
  --card: #ffffff;
  --ring: #3b82f6;
  --input: #e5e7eb;
  --muted: #f9fafb;
  --accent: #e0f2fe;
  --border: #e5e7eb;
  --radius: 0.375rem;
  --chart-1: #3b82f6;
  --chart-2: #2563eb;
  --chart-3: #1d4ed8;
  --chart-4: #1e40af;
  --chart-5: #1e3a8a;
  --popover: #ffffff;
  --primary: #3b82f6;
  --sidebar: #f9fafb;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --secondary: #f3f4f6;
  --background: #ffffff;
  --font-serif: 'Source Serif 4', serif;
  --foreground: #333333;
  --destructive: #ef4444;
  --sidebar-ring: #3b82f6;
  --sidebar-accent: #e0f2fe;
  --sidebar-border: #e5e7eb;
  --card-foreground: #333333;
  --sidebar-primary: #3b82f6;
  --muted-foreground: #6b7280;
  --accent-foreground: #1e3a8a;
  --popover-foreground: #333333;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #333333;
  --secondary-foreground: #4b5563;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #1e3a8a;
  --sidebar-primary-foreground: #ffffff;

  /* ---- i2 legacy var remap → shadcn blue ----
     Existing CSS in index.html references these names. Override the values. */
  --color-bg: var(--background);              /* #ffffff */
  --color-surface: var(--muted);              /* #f9fafb soft panel */
  --color-surface-raised: var(--card);        /* #ffffff */
  --color-text: var(--foreground);            /* #333333 */
  --color-text-muted: var(--muted-foreground); /* #6b7280 */
  --color-accent: var(--primary);             /* #3b82f6 brand blue */
  --color-accent-warm: var(--chart-2);        /* #2563eb richer blue */
  --color-accent-deep: var(--chart-5);        /* #1e3a8a deep blue */
  --color-white: #ffffff;

  /* Semantic urgency tokens (used by components.css section-urgency and the
     death-counter) — remapped to blue equivalents so "urgency" dark sections
     stay on-theme. */
  --urgency-900: #0f172a;  /* near-black slate */
  --urgency-800: #1e3a8a;  /* deep blue (= --chart-5) */
  --urgency-600: #1d4ed8;
  --urgency-400: #3b82f6;
  --urgency-text: #dbeafe; /* light blue text on dark blue bg */
}

/* Add the `dark` class on <html> or <body> to flip to dark mode */
.dark {
  --card: #262626;
  --ring: #3b82f6;
  --input: #404040;
  --muted: #262626;
  --accent: #1e3a8a;
  --border: #404040;
  --radius: 0.375rem;
  --chart-1: #60a5fa;
  --chart-2: #3b82f6;
  --chart-3: #2563eb;
  --chart-4: #1d4ed8;
  --chart-5: #1e40af;
  --popover: #262626;
  --primary: #3b82f6;
  --sidebar: #171717;
  --secondary: #262626;
  --background: #171717;
  --foreground: #e5e5e5;
  --destructive: #ef4444;
  --sidebar-ring: #3b82f6;
  --sidebar-accent: #1e3a8a;
  --sidebar-border: #404040;
  --card-foreground: #e5e5e5;
  --sidebar-primary: #3b82f6;
  --muted-foreground: #a3a3a3;
  --accent-foreground: #bfdbfe;
  --popover-foreground: #e5e5e5;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #e5e5e5;
  --secondary-foreground: #e5e5e5;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #bfdbfe;
  --sidebar-primary-foreground: #ffffff;

  /* i2 legacy var remap in dark mode */
  --color-bg: var(--background);
  --color-surface: var(--muted);
  --color-surface-raised: var(--card);
  --color-text: var(--foreground);
  --color-text-muted: var(--muted-foreground);
  --color-accent: var(--primary);
  --color-accent-warm: var(--chart-2);
  --color-accent-deep: var(--chart-1);
  --color-white: #ffffff;
}
