/*
 * The portal's first load (CARD-102625.5, CARD-102625.18), for the #boot-loading and #boot-failed markup in index.html.
 * A file of its own, never an inline <style>: the agent's hosted window allows only same-origin stylesheets (apps/agent
 * ui_delivery scheme.rs, style-src 'self'). Both start `hidden`, so they stay out of sight even if this file never arrives.
 *
 * The failed-load message is hidden while the portal loads, and shown at once when its script fails to arrive (boot.js),
 * the app fails to start, or a read its first page waits on never answers (src/boot.ts). Its 20 s timer here covers only
 * a page where no script ran at all: boot.js marks the page `data-boot` the moment it runs, which cancels the timer, and
 * from then the scripts own it: a slow but healthy start is not called failed before boot.js's minute, and the app takes
 * back what boot.js raised once its script runs.
 *
 * The loading line shows while the page is marked `data-boot` `loading` (boot.js) or `running` (the app's script), after
 * half a second so a quick start never flashes it, and goes with the app's first page.
 */
.boot-failed {
  position: fixed; inset: 0; z-index: 2147483647; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: #f6f6f4; color: #1d1d1b;
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  visibility: hidden; animation: boot-late 0s 20s forwards;
}
.boot-failed.on { visibility: visible; animation: none; }
@keyframes boot-late { to { visibility: visible; } }
html[data-boot] .boot-failed { animation: none; }
.boot-loading { display: none; }
html[data-boot='loading'] .boot-loading, html[data-boot='running'] .boot-loading {
  position: fixed; inset: 0; z-index: 2147483646; display: flex; flex-direction: column; gap: 4px; align-items: center;
  justify-content: center; padding: 16px; background: #f6f6f4; color: #5c5c58; text-align: center;
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  opacity: 0; animation: boot-soon 0s 0.5s forwards;
}
.boot-loading p { margin: 0; }
@keyframes boot-soon { to { opacity: 1; } }
.boot-card {
  display: grid; gap: 28px; width: 100%; max-width: 440px; padding: 32px; box-sizing: border-box;
  background: #fff; border: 1px solid #e3e3df; border-radius: 12px;
}
.boot-card h1 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; font-weight: 600; }
.boot-card p { margin: 0 0 18px; color: #5c5c58; }
.boot-retry {
  display: inline-block; padding: 9px 16px; border-radius: 8px; background: #1d1d1b; color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.boot-retry:focus-visible { outline: 2px solid #1d1d1b; outline-offset: 2px; }
[data-boot-lang='fr'] .boot-en, [data-boot-lang='en'] .boot-fr { display: none; }
@media (prefers-color-scheme: dark) {
  .boot-failed { background: #161615; color: #ededea; }
  html[data-boot='loading'] .boot-loading, html[data-boot='running'] .boot-loading { background: #161615; color: #a6a6a1; }
  .boot-card { background: #1f1f1e; border-color: #33332f; }
  .boot-card p { color: #a6a6a1; }
  .boot-retry { background: #ededea; color: #161615; }
  .boot-retry:focus-visible { outline-color: #ededea; }
}
