/* Rocket motion layer. Everything here is decoration: pointer-events stay off, and motion is
   transform/opacity only so it never triggers layout. rockets.js builds the SVG once and reuses it. */
:root{
  --rk-fin:#16204a; --rk-line:#16204a; --rk-nose:var(--flame,#ff9f1c);
  --rk-fire:#ff9f1c; --rk-core:#ffe27a; --rk-smoke:rgba(110,122,155,.5);
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --rk-fin:#7c9bff; --rk-line:#0d1324; --rk-smoke:rgba(205,214,238,.38)}}

.rk-svg{display:block;overflow:visible}
.rk-svg .rk-hull{fill:#fff;stroke:var(--rk-line);stroke-width:1}
.rk-svg .rk-nose{fill:var(--rk-nose)}
.rk-svg .rk-fin{fill:var(--rk-fin)}
.rk-svg .rk-port{fill:var(--rk-fin);stroke:#fff;stroke-width:1}
.rk-svg .rk-fl-out{fill:var(--rk-fire)}
.rk-svg .rk-fl-in{fill:var(--rk-core)}
.rk-svg .rk-flame{transform-box:fill-box;transform-origin:50% 0}

/* ---------- Goal meters: the fill keeps its rounded clip, the rocket rides outside it. */
.meter.rk-host{position:relative;overflow:visible}
.rk-tip{position:absolute;left:0;top:50%;width:0;height:0;pointer-events:none;z-index:2;will-change:transform;
  --rw:14px;--rh:34px}
.rk-tip.rk-sm{--rw:9px;--rh:22px}
.rk-fx{position:absolute;left:0;top:0;width:0;height:0}
.rk-tip .rk-svg{position:absolute;width:var(--rw);height:var(--rh);left:calc(var(--rw) / -2);top:calc(var(--rh) / -2);transform:rotate(90deg)}
.rk-trail{position:absolute;right:calc(var(--rh) / 2 - 1px);top:-2px;width:30px;height:4px;border-radius:4px;
  background:linear-gradient(90deg,transparent,var(--rk-fire));transform-origin:100% 50%;opacity:.8}
.rk-sm .rk-trail{width:20px;height:3px;top:-1.5px}

/* ---------- Flights (launch, flyby, liftoff) */
.rk-fly{position:fixed;left:0;top:0;pointer-events:none;z-index:40;will-change:transform}
.rk-fly .rk-svg{width:14px;height:34px}
.rk-fly.rk-h .rk-svg{transform:rotate(90deg)}
.rk-fly.rk-h.rk-rev .rk-svg{transform:rotate(-90deg)}
.rk-fly.rk-big .rk-svg{width:18px;height:44px}
.rk-streak{position:fixed;left:0;top:0;height:2px;pointer-events:none;z-index:39;border-radius:2px;will-change:transform,opacity;
  background:linear-gradient(90deg,transparent,var(--rk-fire))}
.rk-streak.rk-rev{background:linear-gradient(270deg,transparent,var(--rk-fire))}
.rk-puff,.rk-spark{position:fixed;left:0;top:0;pointer-events:none;z-index:38;border-radius:50%;will-change:transform,opacity}
.rk-puff{width:9px;height:9px;background:var(--rk-smoke)}
.rk-spark{width:4px;height:4px;background:var(--rk-fire)}

/* ---------- Loading: spinner class, aria-busy overlay, top bar */
.rocket-loader{display:inline-grid;place-items:center;width:44px;height:56px;pointer-events:none}
.rocket-loader .rk-svg{width:20px;height:48px}
.rk-busy{position:absolute;left:50%;top:50%;z-index:5;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;
  display:grid;place-items:center;background:var(--surface,#fff);border:1px solid var(--line,#d8dfeb);
  box-shadow:var(--shadow);pointer-events:none}
.rk-busy .rk-svg{width:15px;height:36px}
.rk-busy-in{display:inline-block;vertical-align:-5px;margin-right:8px;width:10px;height:24px;pointer-events:none}
.rk-busy-in .rk-svg{width:10px;height:24px}
.rk-bob{display:inline-block;will-change:transform}
.rk-top{position:fixed;left:0;right:0;top:0;height:3px;z-index:60;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .2s}
.rk-top.on{opacity:1}
.rk-top i{position:absolute;left:0;top:0;bottom:0;width:38%;border-radius:0 3px 3px 0;will-change:transform;
  background:linear-gradient(90deg,transparent,var(--rk-fire) 70%,var(--rk-core))}

@media (prefers-reduced-motion:no-preference){
  .rk-tip{transition:transform .7s cubic-bezier(.2,.8,.2,1)}
  .rk-trail{animation:rk-trail .16s steps(2,end) infinite alternate}
  .rk-svg .rk-flame{animation:rk-flame .12s ease-in-out infinite alternate}
  .rk-bob{animation:rk-bob 1.1s ease-in-out infinite}
  .rk-top i{animation:rk-run 1.2s cubic-bezier(.4,0,.4,1) infinite}
}
@keyframes rk-trail{from{transform:scaleX(1);opacity:.85}to{transform:scaleX(.55);opacity:.5}}
@keyframes rk-flame{from{transform:scale(1,1)}to{transform:scale(.8,1.28)}}
@keyframes rk-bob{0%,100%{transform:translateY(3px)}50%{transform:translateY(-3px)}}
@keyframes rk-run{from{transform:translateX(-100%)}to{transform:translateX(265%)}}

/* Reduced motion: no flights (the script also bails), flames and trails hold still. */
@media (prefers-reduced-motion:reduce){
  .rk-trail{display:none}
  .rk-top i{width:100%;opacity:.55;border-radius:0}
}
