/* Start / failure screen (index.html before the bundle, AppBoundary and Suspense after it). Loaded before the
   tokens, so the colours mirror tokens.css: graphite canvas, VD blue #4789FF, dark text on the blue fill. */
html { background: #111215; color-scheme: dark; }
body { margin: 0; }
.boot-screen {
  box-sizing: border-box; min-height: 100vh; min-height: 100dvh; max-width: 440px; margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  color: #ececef; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.boot-screen > img { margin-bottom: 28px; }
.boot-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1a1b1f; margin-bottom: 8px; }
.boot-mark::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #4789ff; border-top-color: transparent; animation: boot-spin .9s linear infinite; }
.boot-screen h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.2px; }
.boot-screen p { margin: 0; color: #9b9ea6; max-width: 320px; }
.boot-action {
  display: none; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; max-width: 320px; min-height: 50px;
  margin-top: 20px; padding: 0 20px; border: 0; border-radius: 12px; background: #2f6fe8; color: #ffffff;
  font: 600 17px/22px -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.boot-action:active { opacity: .85; }
.boot-action:focus-visible { outline: 2px solid #a8c6ff; outline-offset: 3px; }
.boot-screen details { margin-top: 4px; color: #8f929a; font-size: 13px; max-width: 320px; width: 100%; }
.boot-screen summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; list-style: none; }
.boot-screen summary::-webkit-details-marker { display: none; }
.boot-screen pre { margin: 0; padding: 12px; border-radius: 12px; background: #1a1b1f; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.boot-screen details:not([open]) { display: none; }
/* Slow start or failure: the reload action and the diagnostics appear; the spinner becomes a calm warning mark. */
.boot-screen:is([data-state="slow"], [data-state="error"]) .boot-action { display: inline-flex; }
.boot-screen:is([data-state="slow"], [data-state="error"]) details { display: block; }
.boot-screen[data-state="error"] .boot-mark { background: rgba(255, 173, 66, .14); }
.boot-screen[data-state="error"] .boot-mark::before { content: "!"; border: 0; width: auto; height: auto; animation: none; color: #ffad42; font: 700 24px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-mark::before { animation-duration: 2.4s; } }
@media (min-width: 768px) { .boot-screen h1 { font-size: 24px; line-height: 30px; } .boot-action { width: auto; min-width: 200px; min-height: 44px; font-size: 15px; } }

html[data-theme="light"] { background: #f2f4f8; color-scheme: light; }
html[data-theme="light"] .boot-screen { color: #0f1722; }
html[data-theme="light"] .boot-screen p { color: #586276; }
html[data-theme="light"] .boot-screen details { color: #5f697c; }
html[data-theme="light"] :is(.boot-mark, .boot-screen pre) { background: #ffffff; }
html[data-theme="light"] .boot-mark::before { border-color: #1f63d6; border-top-color: transparent; }
html[data-theme="light"] .boot-action { background: #1f63d6; color: #ffffff; }
html[data-theme="light"] .boot-screen img { content: url("/web/brand/logo-light.svg"); }
/* The iPhone layer styles every disclosure as an accent row; here diagnostics stay a quiet footnote. */
html body .boot-screen.boot-screen details > summary { display: inline-flex; justify-content: center; gap: 4px; width: auto; color: #8f929a; font: 400 13px/18px -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
html[data-theme="light"] body .boot-screen.boot-screen details > summary { color: #5f697c; }
