/*
 * Critical theme shell.
 * Keeps the first painted frame consistent while the full theme stylesheet loads.
 * The full visual rules remain in white.css and dark.css for a simple rollback.
 */
:root {
  --callok-page-background: #e8edf5;
  color-scheme: light;
  background-color: var(--callok-page-background);
}

html[data-theme="dark"] {
  --callok-page-background: hsl(225 17% 18%);
  color-scheme: dark;
}

html {
  background-color: var(--callok-page-background);
}

html.callok-theme-loading body {
  visibility: hidden;
}

html.callok-theme-ready body {
  visibility: visible;
}

html.callok-theme-switching,
html.callok-theme-switching body {
  transition: background-color 180ms ease, color 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  html.callok-theme-switching,
  html.callok-theme-switching body {
    transition: none;
  }
}
