/* boot.css - CSS critico del arranque.
   Estaba incrustado en editor.php. Se extrae a fichero para poder retirar
   "unsafe-inline" de style-src en la politica de seguridad de contenido.
   Se carga como PRIMERA hoja de estilo, antes de tokens.css, de modo que
   bloquea el pintado igual que hacia el bloque inline: no hay parpadeo.
   editor.css puede sobreescribir cualquier regla de aqui. */

/* CSS critico del arranque. Va ANTES de las hojas de estilo para que
   editor.css pueda sobreescribirlo si lo necesita. */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0e1116;
  background: var(--s-0, #0e1116);
  color: var(--fg-dim, #a3aebd);
  font-family: var(--font-ui, system-ui, sans-serif);
  transition: opacity 260ms ease, visibility 260ms ease;
}
#boot-splash .boot-logo {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg, #e6ebf2);
}
#boot-splash .boot-claim {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-mute, #6d7787);
}
#boot-splash .boot-bar {
  width: 168px;
  height: 2px;
  overflow: hidden;
  background: var(--s-3, #232b36);
  border-radius: 999px;
}
#boot-splash .boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent, #3f77e8);
  animation: boot-slide 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes boot-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}
#boot-splash .boot-error {
  max-width: 420px;
  padding: 0 24px;
  color: #e5484d;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
/* Ocultado del splash: main-editor.js puede usar cualquiera de estos hooks. */
#boot-splash[hidden] { display: none; }
#boot-splash.is-hidden,
#app[data-booted="true"] ~ #boot-splash,
html[data-booted="true"] #boot-splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #boot-splash .boot-bar i { animation-duration: 2.4s; }
  #boot-splash { transition: none; }
}
