/* Theme overrides — loaded after Tailwind to ensure correct specificity.
   This file is NOT processed by Tailwind v4, so rules here always win. */

/* Dark mode muted text: bump to #b8bfc8 for AAA contrast (7.2:1 on #1e2d4a) */
html.dark {
  --muted-foreground: #b8bfc8 !important;
}

/* Narrow transition to color properties only (prevent layout thrash on theme switch) */
html, body {
  transition: color 200ms ease, background-color 200ms ease !important;
}

/* Native UI dark mode adaptation (scrollbars, form controls, selection) */
:root {
  color-scheme: light dark;
}

/* Dark mode card & section backgrounds (Tailwind v4 @layer specificity fix —
   layered .bg-card / .bg-section-gray utilities lose to unlayered rules) */
.dark .bg-card { background-color: var(--card) !important; }
.dark .bg-section-gray { background-color: var(--section-gray) !important; }
.dark .bg-section-light { background-color: var(--section-light) !important; }

/* Focus visibility for keyboard navigation (WCAG 2.4.7) */
*:focus-visible {
  outline: 2px solid var(--ring) !important;
  outline-offset: 2px !important;
}
