/* ── Global loading-state polish ─────────────────────────────────────────────
   1. Hide <img> alt text while the image is still fetching. The text remains
      in the DOM for screen readers but is not painted.
   2. Hide the raw ligature text inside Material Symbols spans until the icon
      font has finished loading. The .fonts-loaded class is added to <html> by
      image-fallback.js once document.fonts.ready resolves (or after 3 s).      */

img {
  color: transparent;
}

.material-symbols-outlined {
  opacity: 0;
  transition: opacity 0.12s ease;
}
.fonts-loaded .material-symbols-outlined {
  opacity: 1;
}

/* Dark mode overrides for surfaces that don't carry their own `dark:` variants
   (most page backgrounds are set via an inline <style> body{} rule, and most
   content cards use surface/white utility classes with no dark: pairing). */
.dark body {
    background-color: #0b1420 !important;
    color: #e9edf5 !important;
}
.dark [class*="bg-white"],
.dark [class*="bg-surface-container-lowest"],
.dark [class*="bg-surface-container-low"],
.dark [class*="bg-surface-bright"] {
    background-color: #151d2e !important;
    color: #e9edf5;
}
.dark [class*="bg-surface"]:not([class*="bg-surface-container"]):not([class*="bg-surface-bright"]):not([class*="bg-surface-tint"]) {
    background-color: #0b1420 !important;
}
.dark [class*="border-outline"] {
    border-color: #2a3140 !important;
}
.dark input,
.dark select,
.dark textarea {
    background-color: #1b2436 !important;
    color: #e9edf5 !important;
}
.dark ::placeholder {
    color: #7c8598 !important;
}
/* Headline/body text set via "on-<surface>" tokens is authored for light
   surfaces; repoint the common ones to a light color on dark backgrounds. */
.dark [class*="text-on-background"],
.dark [class*="text-on-surface"]:not([class*="text-on-surface-variant"]) {
    color: #f1f4f9 !important;
}
/* on-surface-variant (#45464d) is unreadable on dark backgrounds — remap to a lighter gray */
.dark [class*="text-on-surface-variant"] {
    color: #FFFFFF !important;
}
.dark [class*="text-on-primary-fixed"]:not([class*="variant"]),
.dark [class*="text-on-secondary-fixed"]:not([class*="variant"]) {
    color: #f1f4f9 !important;
}
