/* Loader: boot screen (index.html) and <Loader /> (React). Markup: src/loader/markup.ts. Tokens only. */
.ld { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: var(--foreground); }
.ld-fill { position: fixed; inset: 0; z-index: 90; background: var(--background); }
.ld-mark { width: 140px; height: auto; overflow: visible; }
.ld-ghost, .ld-ink { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.ld-ghost { stroke: var(--foreground); opacity: 0.1; stroke-dasharray: 2 6; }
.ld-ink { stroke: var(--primary); stroke-dasharray: 1; stroke-dashoffset: 0; }
.ld-stop { fill: var(--background); stroke: var(--foreground); stroke-width: 2.5; opacity: 0.55; }
.ld-end { stroke: var(--primary); opacity: 1; }
.ld-car { fill: var(--primary); stroke: var(--background); stroke-width: 2.5; offset-distance: 100%; offset-rotate: 0deg; }

/* semantics from <progress>; the drawn bar is ours */
.ld-bar { appearance: none; -webkit-appearance: none; display: block; position: relative; width: 140px; height: 2px; border: 0; border-radius: 2px; overflow: hidden; background: var(--border); }
.ld-bar::-webkit-progress-bar, .ld-bar::-webkit-progress-value { background: none; }
.ld-bar::-moz-progress-bar { background: none; }
.ld-label { font: 500 12px/1 var(--font-body); color: var(--muted-foreground); }

@media (prefers-reduced-motion: no-preference) {
  .ld-ink { animation: ld-draw 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
  .ld-car { animation: ld-drive 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
  .ld-bar { background: linear-gradient(90deg, transparent, var(--primary), transparent) 0 0 / 40% 100% no-repeat, var(--border); animation: ld-bar 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
}
@keyframes ld-draw {
  0% { stroke-dashoffset: 1; }
  70%, 100% { stroke-dashoffset: 0; }
}
@keyframes ld-drive {
  0% { offset-distance: 0%; }
  70%, 100% { offset-distance: 100%; }
}
@keyframes ld-bar { from { background-position: -70% 0, 0 0; } to { background-position: 170% 0, 0 0; } }
@media (forced-colors: active) { .ld-ink, .ld-car { forced-color-adjust: none; } .ld-bar { border: 1px solid CanvasText; height: 4px; } }
