/* Shared by the initial HTML and React loading states, before app CSS loads. */
.brand-loading {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  background: #f7f8f4;
  color: #183a2a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.brand-loading.absolute { position: absolute; min-height: 0; }
#smartbook-loading-overlay { z-index: 2147483647; }
:root.dark .brand-loading { background: #101914; color: #d7efb5; }
/* Keep the bootstrap overlay opaque; ordinary in-app operations retain context. */
.brand-loading:not(#smartbook-loading-overlay) { background: rgba(247, 248, 244, .88); }
:root.dark .brand-loading:not(#smartbook-loading-overlay) { background: rgba(16, 25, 20, .88); }
.brand-loading__word {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-size: clamp(29px, 4.5vw, 42px);
  font-weight: 750;
  letter-spacing: -.065em;
  line-height: 1.15;
}
.brand-loading__letter { position: relative; color: rgba(29, 68, 45, .22); }
:root.dark .brand-loading__letter { color: rgba(210, 235, 192, .22); }
.brand-loading__letter::after {
  position: absolute;
  inset: 0;
  content: attr(data-letter);
  color: #245c36;
  clip-path: inset(100% 0 0);
  animation: brand-letter-fill .6s ease-out both, brand-letter-pulse 2.4s ease-in-out 1.3s infinite;
}
:root.dark .brand-loading__letter::after { color: #d8f0bd; }
.brand-loading__letter:nth-child(2)::after { animation-delay: .07s, 1.37s; }
.brand-loading__letter:nth-child(3)::after { animation-delay: .14s, 1.44s; }
.brand-loading__letter:nth-child(4)::after { animation-delay: .21s, 1.51s; }
.brand-loading__letter:nth-child(5)::after { animation-delay: .28s, 1.58s; }
.brand-loading__letter:nth-child(6)::after { animation-delay: .35s, 1.65s; }
.brand-loading__letter:nth-child(7)::after { animation-delay: .42s, 1.72s; }
.brand-loading__letter:nth-child(8)::after { animation-delay: .49s, 1.79s; }
.brand-loading__letter:nth-child(9)::after { animation-delay: .56s, 1.86s; }
.brand-loading__letter:nth-child(10)::after { animation-delay: .63s, 1.93s; color: #8fb53e; }
@keyframes brand-letter-fill {
  0% { clip-path: inset(100% 0 0); }
  100% { clip-path: inset(0); }
}
@keyframes brand-letter-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.brand-loading--stalled { place-content: center; gap: 26px; padding: 24px; text-align: center; }
.brand-loading__recovery, .brand-loading__error { max-width: 340px; font-size: 14px; line-height: 1.55; color: #52665a; }
.brand-loading__recovery strong { display: block; color: #183a2a; font-size: 16px; }
.brand-loading__recovery p { margin: 8px 0 18px; }
.brand-loading__recovery button { border: 0; border-radius: 7px; padding: 11px 17px; background: #245c36; color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.brand-loading__recovery button:focus-visible { outline: 3px solid #749d4f; outline-offset: 3px; }
:root.dark .brand-loading__recovery, :root.dark .brand-loading__error { color: #b8caba; }
:root.dark .brand-loading__recovery strong { color: #eef6e8; }
:root.dark .brand-loading__recovery button { background: #d8f0bd; color: #163021; }
@media (prefers-reduced-motion: reduce) {
  .brand-loading__letter::after { animation: none; clip-path: inset(0); }
}
