/* Prerender shell + noscript wall styles — loaded as an external
   stylesheet so CSP can forbid `style-src 'unsafe-inline'`. Render-blocking
   by default (browser applies before first paint), which matches the prior
   inline behavior. */

html,
body {
  margin: 0;
  background-color: #fafafa;
  color: #0f172a;
}
html.dark,
html.dark body {
  background-color: #0b1220;
  color: #e5e7eb;
}

/* Explicit per-theme background on the shell instead of `background: inherit` —
   Chromium reports the inherited value as rgba(0,0,0,0) on getComputedStyle
   when the shell is hidden via html.app-booting, which broke the light-paint
   assertion in performance/prerender-shell.spec.ts. Explicit values match the
   html/body cascade and survive the display:none branch. */
#prerender-shell {
  background-color: #fafafa;
  color: #0f172a;
}
html.dark #prerender-shell {
  background-color: #0b1220;
  color: #e5e7eb;
}
#prerender-shell p,
#prerender-shell h1,
#prerender-shell h2 {
  color: inherit !important;
}
#prerender-shell a {
  color: #2563eb !important;
}
html.dark #prerender-shell a {
  color: #93c5fd !important;
}

/* Hide the shell for JS-enabled sighted users — eliminates the ~200ms flash
   of prerendered HTML while React boots. display:none over visibility:hidden
   so the shell doesn't reserve layout; body already has a theme-matching
   background so users see a clean tinted viewport during hydration. */
html.app-booting #prerender-shell {
  display: none;
}

/* Noscript wall — only renders inside <noscript>, which browsers with JS
   enabled do not render. Selectors won't match anywhere else, so shipping
   these rules to JS users has zero visual effect. */
.noscript-wall {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
  color: #e2e8f0;
  font-family: 'Geist Variable', system-ui, sans-serif;
  padding: 1.5rem;
  text-align: center;
}
.noscript-card {
  max-width: 28rem;
  width: 100%;
  background: #1e293b;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.noscript-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.noscript-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.noscript-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.noscript-steps {
  text-align: left;
  background: #0f172a;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: #94a3b8;
}
.noscript-steps li {
  margin-bottom: 0.4rem;
}
.noscript-steps li:last-child {
  margin-bottom: 0;
}

/* Prerender shell layout & typography classes — replace what used to be
   inline style="..." attributes in index.html. Class-based so CSP can drop
   `style-src 'unsafe-inline'`. Names match the element's role in the shell. */
.shell-main {
  min-height: 100vh;
  font-family: 'Geist Variable', system-ui, -apple-system, sans-serif;
  padding: 24px;
  line-height: 1.65;
}
.shell-container {
  max-width: 860px;
  margin: 0 auto;
}
.shell-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.shell-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.shell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.92rem;
}
.shell-nav-link {
  color: #93c5fd;
  text-decoration: none;
}
.shell-h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.shell-p {
  margin: 0 0 14px;
  color: #cbd5e1;
}
.shell-h2 {
  font-size: 1.25rem;
  margin: 18px 0 10px;
  color: #dbeafe;
}
.shell-link {
  color: #93c5fd;
}
.shell-loading {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: #94a3b8;
}
.noscript-strong {
  color: #e2e8f0;
}
.noscript-list {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}
.noscript-code {
  color: #60a5fa;
}
