html,
body {
  background-color: #1a202c !important;
  color: #e2e8f0 !important;
  margin: 0;
  padding: 0;
}

html.reduced-effects *,
html.reduced-effects *::before,
html.reduced-effects *::after {
  animation: none !important;
  transition: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.reduced-effects {
  scroll-behavior: auto !important;
}

html.reduced-effects img,
html.reduced-effects svg,
html.reduced-effects video,
html.reduced-effects canvas {
  transform: none !important;
}

html:not(.dark-mode),
html:not(.dark-mode) body {
  background-color: #f3f4f6 !important;
  color: #111827 !important;
}

#root {
  min-height: 100vh;
  visibility: hidden;
}

#boot-fallback {
  display: block;
}

html.js-boot #boot-fallback {
  display: none;
}

html.js-boot.boot-fallback-visible #boot-fallback {
  display: block;
}

html.app-ready #root {
  visibility: visible;
}

html.app-ready #boot-fallback {
  display: none;
}

/* First-paint styling for pre-boot SEO fallback content to avoid plain/unstyled flash. */
.seo-fallback {
  margin: 0 auto;
  max-width: 960px;
  padding: 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.seo-fallback h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  line-height: 1.3;
}

.seo-fallback p {
  margin: 0 0 0.9rem;
  line-height: 1.5;
  color: inherit;
  opacity: 0.95;
}

.seo-fallback ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.seo-fallback a {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.18);
}

html:not(.dark-mode) .seo-fallback a {
  border-color: rgba(51, 65, 85, 0.28);
  background: rgba(255, 255, 255, 0.72);
}
