/* Go Around reload: "Rollout"
   Designer, 12 Nov 2026.
   A small runway: threshold bars on the left, centreline dashes rolling past.
   When the data lands, the dashes stop on a whole stripe and the threshold
   bars turn GO green (CAUTION orange for cached data, NO-GO red for a failure).
   Animates transform and opacity only. Reduced motion: nothing moves, the
   label and the bar colour still change. No logo, no spinner.

   Four live site themes, tokens from DESIGN.md §6.1 (Theme 1–4):
   midnight, amethyst, pearl (day white), champagne (day beige). */

.gar{
  --gar-ease:cubic-bezier(.32,.72,0,1);
  --gar-step:640ms;              /* one stripe per step */
  --gar-pitch:32px;              /* dash 18 + gap 14 */
  /* Theme 3 Pearl (default). Day themes use deeper status tints so the
     threshold marking clears 3:1 on the runway surface (WCAG 1.4.11). */
  --gar-ink:#111114;
  --gar-ink2:rgba(17,17,20,.62);
  --gar-surface:rgba(17,17,20,.035);
  --gar-line:rgba(0,0,0,.07);
  --gar-hl:rgba(255,255,255,.95);
  --gar-go:#15803D;--gar-cau:#B45309;--gar-nogo:#D10D33;
  display:inline-flex;flex-direction:column;align-items:center;gap:14px;
  color:var(--gar-ink);
}
/* Live site theme system (site/index.html): html[data-theme=night|day][data-pal=black|purple|white|beige].
   :where() keeps these at the same weight as the explicit .gar--<theme> classes below, which win when set.
   html[data-theme=<name>] (midnight|amethyst|pearl|champagne) stays as a fallback for demos. */
:where(html[data-theme=night]) .gar,:where(html[data-theme=night][data-pal=black]) .gar,:where([data-theme=midnight]) .gar{
  --gar-ink:#F5F5F7;--gar-ink2:rgba(245,245,247,.62);--gar-surface:rgba(255,255,255,.04);--gar-line:rgba(255,255,255,.10);--gar-hl:rgba(255,255,255,.16);
  --gar-go:#22C55E;--gar-cau:#FF8A00;--gar-nogo:#F80F3B}
:where(html[data-theme=night][data-pal=purple]) .gar,:where([data-theme=amethyst]) .gar{
  --gar-ink:#F7F4FF;--gar-ink2:rgba(236,228,255,.64);--gar-surface:rgba(200,170,255,.07);--gar-line:rgba(210,190,255,.13);--gar-hl:rgba(230,215,255,.20);
  --gar-go:#22C55E;--gar-cau:#FF8A00;--gar-nogo:#F80F3B}
:where(html[data-theme=day]) .gar,:where(html[data-theme=day][data-pal=white]) .gar,:where([data-theme=pearl]) .gar{
  --gar-ink:#111114;--gar-ink2:rgba(17,17,20,.62);--gar-surface:rgba(17,17,20,.035);--gar-line:rgba(0,0,0,.07);--gar-hl:rgba(255,255,255,.95);
  --gar-go:#15803D;--gar-cau:#B45309;--gar-nogo:#D10D33}
:where(html[data-theme=day][data-pal=beige]) .gar,:where([data-theme=champagne]) .gar{
  --gar-ink:#1C1814;--gar-ink2:rgba(28,24,20,.62);--gar-surface:rgba(60,40,10,.05);--gar-line:rgba(60,40,10,.08);--gar-hl:rgba(255,253,248,.95);
  --gar-go:#15803D;--gar-cau:#B45309;--gar-nogo:#D10D33}
/* Explicit theme classes (mount option / setTheme) */
.gar.gar--midnight{--gar-ink:#F5F5F7;--gar-ink2:rgba(245,245,247,.62);--gar-surface:rgba(255,255,255,.04);--gar-line:rgba(255,255,255,.10);--gar-hl:rgba(255,255,255,.16);
  --gar-go:#22C55E;--gar-cau:#FF8A00;--gar-nogo:#F80F3B}
.gar.gar--amethyst{--gar-ink:#F7F4FF;--gar-ink2:rgba(236,228,255,.64);--gar-surface:rgba(200,170,255,.07);--gar-line:rgba(210,190,255,.13);--gar-hl:rgba(230,215,255,.20);
  --gar-go:#22C55E;--gar-cau:#FF8A00;--gar-nogo:#F80F3B}
.gar.gar--pearl{--gar-ink:#111114;--gar-ink2:rgba(17,17,20,.62);--gar-surface:rgba(17,17,20,.035);--gar-line:rgba(0,0,0,.07);--gar-hl:rgba(255,255,255,.95);
  --gar-go:#15803D;--gar-cau:#B45309;--gar-nogo:#D10D33}
.gar.gar--champagne{--gar-ink:#1C1814;--gar-ink2:rgba(28,24,20,.62);--gar-surface:rgba(60,40,10,.05);--gar-line:rgba(60,40,10,.08);--gar-hl:rgba(255,253,248,.95);
  --gar-go:#15803D;--gar-cau:#B45309;--gar-nogo:#D10D33}

/* runway */
.gar-rw{
  position:relative;width:240px;height:52px;border-radius:14px;overflow:hidden;
  background:var(--gar-surface);
  box-shadow:inset 0 0 0 1px var(--gar-line),inset 0 1px 0 var(--gar-hl);
  contain:paint;
}
/* runway end: a short bar so the runway has a visible end */
.gar-rw::after{content:"";position:absolute;right:14px;top:14px;bottom:14px;width:2px;border-radius:1px;background:var(--gar-ink);opacity:.32}
.gar--icon .gar-rw::after{display:none}
/* threshold bars ("piano keys"); two stacked copies, colour layer fades over */
.gar-th{position:absolute;left:14px;top:12px;bottom:12px;display:flex;gap:3px}
.gar-th i{display:block;width:3px;border-radius:1.5px;background:var(--gar-ink);opacity:.78}
.gar-st{position:absolute;inset:0;opacity:0}
.gar-st .gar-th i{background:var(--gar-c,var(--gar-go));opacity:1}
/* verdict by shape as well as colour (colour-blind safe, no text) */
.gar[data-gar-s=cau] .gar-st .gar-th i:nth-child(even){opacity:.2}   /* CAUTION: only every second bar lit */
.gar[data-gar-s=nogo] .gar-st .gar-th{display:none}                             /* NO-GO: threshold closed ... */
.gar-aim{display:none}                                                         /* GO: aiming-point (touchdown) markings, never shown while loading */
.gar[data-gar-s=go] .gar-aim{display:block;position:absolute;left:84px;top:13px;bottom:13px;width:30px;transform-origin:0 50%}
.gar-aim i{position:absolute;left:0;right:0;height:5px;border-radius:1.5px;background:var(--gar-c,var(--gar-go))}
.gar-aim i:first-child{top:0}
.gar-aim i:last-child{bottom:0}
.gar-x{position:absolute;left:14px;top:12px;width:33px;height:28px;display:none}
.gar[data-gar-s=nogo] .gar-x{display:block}                                      /* ... crossed (X) closed-runway marking */
.gar-x i{position:absolute;left:50%;top:50%;width:3px;height:36px;margin:-18px 0 0 -1.5px;border-radius:1.5px;background:var(--gar-c,var(--gar-nogo))}
.gar-x i:first-child{transform:rotate(40deg)}
.gar-x i:last-child{transform:rotate(-40deg)}
/* centreline */
.gar-cl{
  position:absolute;left:52px;right:22px;top:50%;height:3px;margin-top:-1.5px;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 52px),transparent);
          mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 52px),transparent);
}
.gar-strip{
  position:absolute;left:0;top:0;height:3px;width:calc(100% + var(--gar-pitch) * 2);
  background:repeating-linear-gradient(90deg,var(--gar-ink) 0 18px,transparent 18px var(--gar-pitch));
  opacity:.55;border-radius:1.5px;
}
.gar.is-loading .gar-strip{animation:gar-roll var(--gar-step) var(--gar-ease) infinite;will-change:transform}
@keyframes gar-roll{from{transform:translateX(0)}to{transform:translateX(calc(var(--gar-pitch) * -1))}}

/* label: two layers cross-fade so the text never slides */
.gar-lb{position:relative;height:14px;min-width:200px;text-align:center;
  font:500 11px/14px "JetBrains Mono",ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;
  font-variant-numeric:tabular-nums;color:var(--gar-ink2)}
.gar-lb span{position:absolute;inset:0;white-space:nowrap}
.gar-lb .gar-lb2{opacity:0}
.gar-lb .gar-lb2 b{font-weight:500;color:var(--gar-c,var(--gar-go))}
.gar--nolabel{gap:0}
.gar--nolabel .gar-lb{display:none}

/* icon size: the refresh button glyph is the same runway, 22x14 */
.gar--icon{gap:0}
.gar--icon .gar-rw{width:24px;height:14px;border-radius:4px;box-shadow:inset 0 0 0 1.25px var(--gar-ink);background:none;opacity:.9}
.gar--icon .gar-th{left:3.5px;top:3.5px;bottom:3.5px;gap:1.5px}
.gar--icon .gar-th i{width:1.5px;border-radius:.75px;opacity:1}
.gar[data-gar-s=go].gar--icon .gar-aim{left:13px;top:2.6px;bottom:2.6px;width:6px}
.gar--icon .gar-aim i{height:1.5px;border-radius:.5px}
.gar--icon .gar-x{left:3px;top:3px;width:7.5px;height:8px}
.gar--icon .gar-x i{width:1.5px;height:9px;margin:-4.5px 0 0 -.75px;border-radius:.75px}
.gar--icon .gar-cl{left:12.5px;right:2.5px;height:1.5px;margin-top:-.75px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 2px,#000 calc(100% - 4px),transparent);mask-image:linear-gradient(90deg,transparent,#000 2px,#000 calc(100% - 4px),transparent)}
.gar--icon{--gar-pitch:7px}
.gar--icon .gar-strip{height:1.5px;opacity:1;
  background:repeating-linear-gradient(90deg,var(--gar-ink) 0 4px,transparent 4px var(--gar-pitch))}
.gar--icon .gar-lb{display:none}

@media (prefers-reduced-motion:reduce){
  .gar.is-loading .gar-strip{animation:none}
}
