/* Start-up / shut-down effects of the electric and sci-fi sounds (js/ignition.js).
   Classes on #halo-box: ig-<mode> (layers present), ig-start | ig-stop | ig-re (an effect is
   playing; ig-re is the short re-ignition after an automatic stop), ig-live (on and running).
   Rules are scoped with #halo-box so they win over the ring's intro / switch rules while an
   effect plays. Only opacity, transform and stroke-dashoffset animate; no filters. The ring's
   own elements are only faded or scaled where they carry no transform attribute (ring.js
   positions the head and rotates the track with attributes). */

.ig-l {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* the ring's head scales about its own centre when an effect pops it in */
#halo-box .ring-head-glow,
#halo-box .ring-head { transform-box: fill-box; transform-origin: center; }

@keyframes igFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes igFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================================================
   Cinematic · Title card. Start 1.8 s, stop 1.0 s, re-ignition 0.5 s.
   ============================================================================================ */
.ig-cf, .ig-ce { opacity: 0; transform-box: view-box; transform-origin: 280px 280px; }
.ig-cf-g { stroke: rgb(var(--accent-rgb)); stroke-width: 20; opacity: .2; }
.ig-cf-c { stroke: rgb(var(--accent-rgb)); stroke-width: 2; opacity: .85; }
.ig-ce-g { stroke: rgb(var(--regen-rgb)); stroke-width: 18; opacity: .16; }
.ig-ce-c { stroke: rgb(var(--regen-rgb)); stroke-width: 2; opacity: .8; }
/* warm footlight: a masked colour field, like the ambient glow */
.ig-ckey {
  left: -10%; top: 20%; width: 120%; height: 100%;
  opacity: 0;
  background-color: rgb(var(--regen-rgb));
  -webkit-mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 50%, transparent 100%);
  mask-image: radial-gradient(closest-side, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 50%, transparent 100%);
}
/* title card and rules sit on the kind label's line (the first row of .read-top) */
.ig-ttl {
  position: absolute; left: 0; right: 0;
  top: calc(max(10px, var(--rs) * .0231) * .63);
  height: 0;
  display: flex; justify-content: center; align-items: center;
  opacity: 0;
}
.ig-tt {
  display: flex;
  font-size: max(11px, calc(var(--rs) * .0327));
  font-weight: 300; line-height: 1;
  color: var(--text);
}
.ig-ch { display: inline-block; font-style: normal; padding: 0 .25em; }
/* The rules are placed in units of the kind label's font size (--ig-f), since the label and the
   title keep a minimum size on small rings: they always clear the text. Each rule is cut short
   so it never reaches the ring (on the smallest rings it disappears). */
.ig-rl {
  --ig-f: max(10px, calc(var(--rs) * .0231));
  position: absolute;
  top: calc(var(--ig-f) * .63);
  width: clamp(0px, calc(var(--rs) * .3 - var(--ig-f) * 9.17), calc(var(--ig-f) * 3.83));
  height: 1px; margin-top: -.5px;
  opacity: 0;
}
.ig-rl-l {
  right: calc(50% + var(--ig-f) * 9.17);
  transform-origin: right center;
  transform: translateX(calc(var(--ig-f) * 3));
  background: linear-gradient(90deg, rgba(var(--regen-rgb), 0), rgb(var(--regen-rgb)));
}
.ig-rl-r {
  left: calc(50% + var(--ig-f) * 9.17);
  transform-origin: left center;
  transform: translateX(calc(var(--ig-f) * -3));
  background: linear-gradient(270deg, rgba(var(--regen-rgb), 0), rgb(var(--regen-rgb)));
}
/* idle: the two rules stay, dim, either side of "Power meter" */
#halo-box.ig-live .ig-rl { opacity: .35; }

@keyframes igCineFrame {
  0% { opacity: 0; transform: scale(.97); }
  25% { opacity: 1; transform: scale(1); animation-timing-function: cubic-bezier(.2, .6, .35, 1); }
  89%, 100% { opacity: 0; transform: scale(1.025); }
}
@keyframes igCineKey { 0% { opacity: 0; transform: translateY(25%); } 25% { opacity: .2; } 75%, 100% { opacity: 0; transform: translateY(-9.6%); } }
@keyframes igCineAmb { 0% { opacity: .17; } 25% { opacity: .27; } 89%, 100% { opacity: .17; } }
@keyframes igCineKind { 0% { opacity: 1; } 9%, 67% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes igCineTtl { 0% { opacity: 0; } 6%, 67% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes igCineSq { 0%, 8% { transform: scaleX(1.2); animation-timing-function: cubic-bezier(.2, .7, .25, 1); } 55%, 100% { transform: scaleX(1); } }
@keyframes igCineRuleL {
  0% { opacity: 0; transform: translateX(0) scaleX(0); }
  16% { opacity: .9; transform: translateX(0) scaleX(0); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  56% { opacity: .9; transform: translateX(0) scaleX(1); }
  67% { opacity: .9; transform: translateX(0) scaleX(1); animation-timing-function: ease-in-out; }
  100% { opacity: .35; transform: translateX(calc(var(--ig-f) * 3)) scaleX(1); }
}
@keyframes igCineRuleR {
  0% { opacity: 0; transform: translateX(0) scaleX(0); }
  16% { opacity: .9; transform: translateX(0) scaleX(0); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  56% { opacity: .9; transform: translateX(0) scaleX(1); }
  67% { opacity: .9; transform: translateX(0) scaleX(1); animation-timing-function: ease-in-out; }
  100% { opacity: .35; transform: translateX(calc(var(--ig-f) * -3)) scaleX(1); }
}
@keyframes igCineHead { 0%, 80% { opacity: 0; } 100% { opacity: 1; } }
#halo-box.ig-cine.ig-start .ig-cf { animation: igCineFrame 1.8s ease-in-out both; }
#halo-box.ig-cine.ig-start .ig-ckey { animation: igCineKey 1.8s ease-out both; }
#halo-box.ig-cine.ig-start .amb { animation: igCineAmb 1.8s ease-in-out; }
#halo-box.ig-cine.ig-start #ro-kind { animation: igCineKind 1.8s linear both; }
#halo-box.ig-cine.ig-start .ig-ttl { animation: igCineTtl 1.8s linear both; }
#halo-box.ig-cine.ig-start .ig-tt { animation: igCineSq 1.8s linear both; }
#halo-box.ig-cine.ig-start .ig-ch { animation: igFadeIn .5s ease-out both; }
#halo-box.ig-cine.ig-start .ig-d0 { animation-delay: .14s; }
#halo-box.ig-cine.ig-start .ig-d1 { animation-delay: .22s; }
#halo-box.ig-cine.ig-start .ig-d2 { animation-delay: .3s; }
#halo-box.ig-cine.ig-start .ig-d3 { animation-delay: .38s; }
#halo-box.ig-cine.ig-start .ig-d4 { animation-delay: .46s; }
#halo-box.ig-cine.ig-start .ig-rl-l { animation: igCineRuleL 1.8s linear both; }
#halo-box.ig-cine.ig-start .ig-rl-r { animation: igCineRuleR 1.8s linear both; }
#halo-box.ig-cine.ig-start .ring-head-g { animation: igCineHead 1.8s linear both; }

@keyframes igCineEmber { 0% { opacity: 0; } 12% { opacity: 1; animation-timing-function: cubic-bezier(.2, .6, .35, 1); } 100% { opacity: 0; } }
@keyframes igCineKindS { 0% { opacity: 1; } 15%, 80% { opacity: 0; } 100% { opacity: 1; } }
@keyframes igCineTtlS { 0% { opacity: 0; } 18%, 100% { opacity: 1; } }
@keyframes igCineSqS { 0%, 34% { transform: scaleX(1); animation-timing-function: ease-in; } 100% { transform: scaleX(1.12); } }
@keyframes igCineRuleLS {
  0% { opacity: .35; transform: translateX(calc(var(--ig-f) * 3)) scaleX(1); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  25% { opacity: .9; transform: translateX(0) scaleX(1); }
  40% { opacity: .9; transform: translateX(0) scaleX(1); animation-timing-function: ease-in; }
  90%, 100% { opacity: 0; transform: translateX(0) scaleX(0); }
}
@keyframes igCineRuleRS {
  0% { opacity: .35; transform: translateX(calc(var(--ig-f) * -3)) scaleX(1); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  25% { opacity: .9; transform: translateX(0) scaleX(1); }
  40% { opacity: .9; transform: translateX(0) scaleX(1); animation-timing-function: ease-in; }
  90%, 100% { opacity: 0; transform: translateX(0) scaleX(0); }
}
#halo-box.ig-cine.ig-stop .ig-ce { animation: igCineEmber 1s linear both; }
#halo-box.ig-cine.ig-stop #ro-kind { animation: igCineKindS 1s linear both; }
#halo-box.ig-cine.ig-stop .ig-ttl { animation: igCineTtlS 1s linear both; }
#halo-box.ig-cine.ig-stop .ig-tt { animation: igCineSqS 1s linear both; }
#halo-box.ig-cine.ig-stop .ig-ch { animation: igFadeOut .3s ease-in both; }
#halo-box.ig-cine.ig-stop .ig-d4 { animation-delay: .34s; }
#halo-box.ig-cine.ig-stop .ig-d3 { animation-delay: .41s; }
#halo-box.ig-cine.ig-stop .ig-d2 { animation-delay: .48s; }
#halo-box.ig-cine.ig-stop .ig-d1 { animation-delay: .55s; }
#halo-box.ig-cine.ig-stop .ig-d0 { animation-delay: .62s; }
#halo-box.ig-cine.ig-stop .ig-rl-l { animation: igCineRuleLS 1s linear both; }
#halo-box.ig-cine.ig-stop .ig-rl-r { animation: igCineRuleRS 1s linear both; }

/* the needle fades out instead of blinking off (ring.js hides it with an attribute; CSS
   visibility wins while the stop plays) */
@keyframes igHeadOut { from { opacity: 1; } to { opacity: 0; } }
#halo-box.ig-cine.ig-stop .ring-head-g { visibility: visible; animation: igHeadOut .3s ease-in both; }

/* re-ignition: the ring swell alone */
@keyframes igCineRe { 0% { opacity: 0; transform: scale(.98); } 35% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.02); } }
#halo-box.ig-cine.ig-re .ig-cf { animation: igCineRe .5s ease-out both; }

/* ============================================================================================
   Electric GT · Twin motor strike. Start 1.9 s, stop 1.2 s, re-ignition 0.5 s.
   ============================================================================================ */
#halo-box.ig-gt { --ig-tint: 255, 214, 224; }
.ig-arc { stroke-dasharray: 566 3000; stroke-dashoffset: 566; opacity: 0; }
.ig-arc-c { stroke-width: 8; stroke-linecap: round; }
.ig-arc-g { stroke-width: 24; }
.ig-arc-c.ig-f { stroke: rgb(var(--regen-rgb)); }
.ig-arc-c.ig-r { stroke: rgb(var(--accent-rgb)); }
.ig-arc-g.ig-f { stroke: rgba(var(--regen-rgb), .2); }
.ig-arc-g.ig-r { stroke: rgba(var(--accent-rgb), .22); }
/* riders sit at 12 o'clock and are turned round the ring centre onto the arc tips */
.ig-rider { opacity: 0; transform-box: view-box; transform-origin: 280px 280px; }
.ig-rider-f { transform: rotate(-135deg); }
.ig-rider-r { transform: rotate(135deg); }
.ig-rdot { transform-box: fill-box; transform-origin: center; }
.ig-rider-f .ig-rd-g { fill: rgb(var(--regen-rgb)); opacity: .35; }
.ig-rider-r .ig-rd-g { fill: rgb(var(--accent-rgb)); opacity: .35; }
.ig-rd-c { fill: rgb(var(--ig-tint)); }
.ig-strike { stroke: rgb(var(--ig-tint)); stroke-width: 3; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; }
/* spark at 12 o'clock: masked colour fields (positions in % of the halo) */
.ig-spark, .ig-spark-c { position: absolute; pointer-events: none; opacity: 0; }
.ig-spark {
  left: 35.58%; top: -7.31%; width: 28.85%; height: 28.85%;
  background-color: rgb(var(--accent-rgb));
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .6) 35%, rgba(0, 0, 0, .18) 70%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .6) 35%, rgba(0, 0, 0, .18) 70%, transparent 100%);
}
.ig-spark-c {
  left: 45.38%; top: 2.5%; width: 9.23%; height: 9.23%;
  background-color: rgb(var(--ig-tint));
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .5) 50%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .5) 50%, transparent 100%);
}

/* start: 0–0.2 arm (scale dims, dots pop in at the ends) · 0.2–0.85 the arcs race up ·
   0.85 strike at the top · 0.85–1.25 the rear dot drops to zero · arcs fade by 1.75 */
@keyframes igGtArcIn {
  0%, 10.2% { stroke-dashoffset: 566; opacity: 0; }
  10.53% { stroke-dashoffset: 566; opacity: 1; animation-timing-function: cubic-bezier(.55, .05, .85, .5); }
  44.74% { stroke-dashoffset: 0; opacity: 1; }
  55.26% { stroke-dashoffset: 0; opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
  92.11%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes igGtRideF {
  0% { transform: rotate(-135deg); opacity: 0; }
  7.89% { transform: rotate(-135deg); opacity: 1; }
  10.53% { transform: rotate(-135deg); opacity: 1; animation-timing-function: cubic-bezier(.55, .05, .85, .5); }
  44.74% { transform: rotate(0deg); opacity: 1; }
  50%, 100% { transform: rotate(0deg); opacity: 0; }
}
@keyframes igGtRideR {
  0% { transform: rotate(135deg); opacity: 0; }
  7.89% { transform: rotate(135deg); opacity: 1; }
  10.53% { transform: rotate(135deg); opacity: 1; animation-timing-function: cubic-bezier(.55, .05, .85, .5); }
  44.74% { transform: rotate(0deg); opacity: 1; animation-timing-function: cubic-bezier(.2, .6, .35, 1); }
  65.79% { transform: rotate(-75.6deg); opacity: 1; }
  71%, 100% { transform: rotate(-75.6deg); opacity: 0; }
}
@keyframes igGtDotF { 0% { transform: scale(0); } 6.5% { transform: scale(1.4); } 10.53%, 44.74% { transform: scale(1); } 47.37%, 100% { transform: scale(1.8); } }
@keyframes igGtDotR { 0% { transform: scale(0); } 6.5% { transform: scale(1.4); } 10.53%, 65.79% { transform: scale(1); } 71%, 100% { transform: scale(.5); } }
@keyframes igGtStrike { 0%, 44.2% { opacity: 0; transform: scaleY(.2); } 46.32% { opacity: .95; transform: scaleY(1.15); } 57.89%, 100% { opacity: 0; transform: scaleY(1); } }
@keyframes igGtSpark { 0%, 44.2% { opacity: 0; transform: scale(.4); } 47.37% { opacity: .85; transform: scale(1); } 68.42%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes igGtCore { 0%, 44.2% { opacity: 0; transform: scale(.3); } 46.32% { opacity: .8; transform: scale(1); } 57.89%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes igGtDim { 0% { opacity: 1; } 7.89%, 44.74% { opacity: .3; } 50%, 100% { opacity: 1; } }
@keyframes igGtDimZ { 0% { opacity: .75; } 7.89%, 44.74% { opacity: .22; } 50%, 100% { opacity: .75; } }
@keyframes igGtKick { 0%, 44.74% { transform: scale(1); } 48.4% { transform: scale(1.05); } 63.16%, 100% { transform: scale(1); } }
@keyframes igGtAmb { 0% { opacity: .17; } 10.53% { opacity: .08; } 44.74% { opacity: .12; } 47.37% { opacity: .34; } 76.32%, 100% { opacity: .17; } }
@keyframes igGtHead { 0%, 64% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes igGtHeadPop { 0%, 64% { transform: scale(0); } 72% { transform: scale(1.35); } 80%, 100% { transform: scale(1); } }
#halo-box.ig-gt.ig-start .ig-arc { animation: igGtArcIn 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-rider-f { animation: igGtRideF 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-rider-r { animation: igGtRideR 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-rider-f .ig-rdot { animation: igGtDotF 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-rider-r .ig-rdot { animation: igGtDotR 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-strike { animation: igGtStrike 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-spark { animation: igGtSpark 1.9s linear both; }
#halo-box.ig-gt.ig-start .ig-spark-c { animation: igGtCore 1.9s linear both; }
#halo-box.ig-gt.ig-start .ring-scale { animation: igGtDim 1.9s linear both; }
#halo-box.ig-gt.ig-start .ring-zone { animation: igGtDimZ 1.9s linear both; }
#halo-box.ig-gt.ig-start #ro-speed { animation: igGtKick 1.9s linear both; }
#halo-box.ig-gt.ig-start .amb { animation: igGtAmb 1.9s linear both; }
#halo-box.ig-gt.ig-start .ring-head-g { animation: igGtHead 1.9s linear both; }
#halo-box.ig-gt.ig-start .ring-head-glow,
#halo-box.ig-gt.ig-start .ring-head { animation: igGtHeadPop 1.9s linear both; }

/* stop: 0–0.15 the whole ring lights, small spark at the top · 0.15–0.95 the halves pull back
   to their ends on the dots · 0.95–1.2 the dots shrink away */
@keyframes igGtArcOut {
  0% { stroke-dashoffset: 0; opacity: 0; }
  12.5% { stroke-dashoffset: 0; opacity: .85; animation-timing-function: cubic-bezier(.35, 0, .25, 1); }
  79.17% { stroke-dashoffset: 566; opacity: .85; }
  83.33%, 100% { stroke-dashoffset: 566; opacity: 0; }
}
@keyframes igGtRideFOut {
  0% { transform: rotate(0deg); opacity: 0; }
  12.5% { transform: rotate(0deg); opacity: 1; animation-timing-function: cubic-bezier(.35, 0, .25, 1); }
  79.17% { transform: rotate(-135deg); opacity: 1; }
  100% { transform: rotate(-135deg); opacity: 0; }
}
@keyframes igGtRideROut {
  0% { transform: rotate(0deg); opacity: 0; }
  12.5% { transform: rotate(0deg); opacity: 1; animation-timing-function: cubic-bezier(.35, 0, .25, 1); }
  79.17% { transform: rotate(135deg); opacity: 1; }
  100% { transform: rotate(135deg); opacity: 0; }
}
@keyframes igGtDotOut { 0%, 79.17% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes igGtSplit { 0% { opacity: 0; transform: scale(.5); } 10% { opacity: .5; transform: scale(.9); } 30%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes igGtAmbOut { 0% { opacity: .17; } 12.5% { opacity: .24; } 79.17% { opacity: .08; } 100% { opacity: .17; } }
#halo-box.ig-gt.ig-stop .ig-arc { animation: igGtArcOut 1.2s linear both; }
#halo-box.ig-gt.ig-stop .ig-rider-f { animation: igGtRideFOut 1.2s linear both; }
#halo-box.ig-gt.ig-stop .ig-rider-r { animation: igGtRideROut 1.2s linear both; }
#halo-box.ig-gt.ig-stop .ig-rdot { animation: igGtDotOut 1.2s linear both; }
#halo-box.ig-gt.ig-stop .ig-spark { animation: igGtSplit 1.2s linear both; }
#halo-box.ig-gt.ig-stop .amb { animation: igGtAmbOut 1.2s linear both; }
@keyframes igShrinkOut { from { transform: scale(1); } to { transform: scale(0); } }
#halo-box.ig-gt.ig-stop .ring-head-g { visibility: visible; }
#halo-box.ig-gt.ig-stop .ring-head-glow,
#halo-box.ig-gt.ig-stop .ring-head { animation: igShrinkOut .3s ease-in both; }

/* re-ignition: the spark at the top alone, and the needle pops in at zero */
@keyframes igGtReSpark { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes igGtReHead { 0%, 30% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
#halo-box.ig-gt.ig-re .ig-spark,
#halo-box.ig-gt.ig-re .ig-spark-c { animation: igGtReSpark .5s ease-out both; }
#halo-box.ig-gt.ig-re .ring-head-glow,
#halo-box.ig-gt.ig-re .ring-head { animation: igGtReHead .5s linear both; }

/* ============================================================================================
   Starship · Hyperspace jump. Start 2.4 s, stop 1.2 s, re-ignition 0.5 s.
   ============================================================================================ */
/* idle: faint far stars, one slow turn every two minutes. The drift is always attached and only
   paused (off, auto stop, driving), so the field never snaps back to 0° while it fades. */
@keyframes igStarDrift { to { transform: rotate(-360deg); } }
.ig-stars { opacity: 0; transition: opacity .45s; animation: igStarDrift 120s linear infinite paused; }
.ig-star { fill: rgb(205, 244, 255); }
#halo-box.ig-ship.ig-live .ig-stars { opacity: .5; animation-play-state: running; }
.calm #halo-box.ig-ship.ig-live .ig-stars { animation-play-state: paused; }
.ig-wv, .ig-shock { opacity: 0; }
.ig-sk { stroke: rgb(var(--accent-rgb)); stroke-width: 2.6; stroke-linecap: round; }
.ig-sk.ig-sk-b { stroke: rgb(196, 246, 255); stroke-width: 3.2; }
.ig-sk.ig-sk-f { stroke-width: 1.8; opacity: .55; }
.ig-sh { stroke: rgb(var(--accent-rgb)); stroke-width: 2.5; opacity: .8; }
.ig-shg { stroke: rgb(var(--accent-rgb)); stroke-width: 22; opacity: .12; }
.ig-sa { stroke: rgb(var(--accent-rgb)); stroke-dasharray: 1131 3000; opacity: 0; }
.ig-sa-f { stroke-width: 8; stroke-linecap: round; }
.ig-sa-g { stroke-width: 26; }

/* start: 0–0.3 the dial dims · 0.25–1.5 three waves of streaks rush out through the ring ·
   1.3 the arc lights and a shock ring rolls out · 1.5–2.1 the arc drains back ·
   1.55–2.3 ticks and labels pop back in clockwise, far stars fade in */
@keyframes igShipWarp { 0% { opacity: 0; transform: scale(.14); } 22%, 72% { opacity: .9; } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes igShipShock { 0% { opacity: 0; transform: scale(.97); } 12% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes igShipFill {
  0%, 54% { opacity: 0; stroke-dashoffset: 0; }
  57% { opacity: 1; stroke-dashoffset: 0; }
  62% { opacity: 1; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  88% { opacity: .7; stroke-dashoffset: 1131; }
  100% { opacity: 0; stroke-dashoffset: 1131; }
}
@keyframes igShipGlow {
  0%, 54% { opacity: 0; stroke-dashoffset: 0; }
  57% { opacity: .3; stroke-dashoffset: 0; }
  62% { opacity: .3; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  88% { opacity: .15; stroke-dashoffset: 1131; }
  100% { opacity: 0; stroke-dashoffset: 1131; }
}
@keyframes igShipAmb { 0% { opacity: .17; } 12%, 53% { opacity: .07; } 58% { opacity: .36; } 100% { opacity: .17; } }
@keyframes igShipDim { 0% { opacity: 1; } 12%, 55% { opacity: .3; } 64%, 100% { opacity: 1; } }
@keyframes igShipTunnel { 0% { opacity: 1; transform: none; } 10% { opacity: .8; transform: scale(.85); } 45% { opacity: 0; transform: scale(1.6); } 60% { opacity: 0; transform: scale(.7); } 75%, 100% { opacity: 1; transform: none; } }
@keyframes igShipTickDim { from { opacity: 1; } to { opacity: .15; } }
@keyframes igShipTickPop { 0% { opacity: .15; transform: scale(.4); } 100% { opacity: 1; transform: none; } }
@keyframes igShipRead { 0% { opacity: 1; } 12%, 56% { opacity: .7; } 66%, 100% { opacity: 1; } }
@keyframes igShipStars { 0%, 75% { opacity: 0; animation-timing-function: ease; } 100% { opacity: .5; } }
@keyframes igShipHead { 0%, 85% { opacity: 0; } 100% { opacity: 1; } }
#halo-box.ig-ship.ig-start .ig-wv1 { animation: igShipWarp .85s .25s cubic-bezier(.55, 0, .9, .4) both; }
#halo-box.ig-ship.ig-start .ig-wv2 { animation: igShipWarp .85s .45s cubic-bezier(.55, 0, .9, .4) both; }
#halo-box.ig-ship.ig-start .ig-wv3 { animation: igShipWarp .85s .65s cubic-bezier(.55, 0, .9, .4) both; }
#halo-box.ig-ship.ig-start .ig-shock { animation: igShipShock .7s 1.3s cubic-bezier(.2, .7, .3, 1) both; }
#halo-box.ig-ship.ig-start .ig-sa-f { animation: igShipFill 2.4s linear both; }
#halo-box.ig-ship.ig-start .ig-sa-g { animation: igShipGlow 2.4s linear both; }
#halo-box.ig-ship.ig-start .amb { animation: igShipAmb 2.4s ease both; }
/* the dial dims as one composited layer (fading its parts one by one would repaint the ring
   every frame); the ticks dim further inside it and pop back in on their own */
#halo-box.ig-ship.ig-start #ring { animation: igShipDim 2.4s ease both; }
#halo-box.ig-ship.ig-start .ring-spin-layer svg { animation: igShipTunnel 2.4s ease both; }
/* each tick / label pops by its place on the arc (--fr, set by ring.js); !important beats the
   inline delay ring.js gives every tick for its own intro and switch pops */
#halo-box.ig-ship.ig-start .ring-tk {
  animation: igShipTickDim .35s ease both, igShipTickPop .34s cubic-bezier(.2, .9, .3, 1.25) forwards;
  animation-delay: 0s, calc(1.55s + var(--fr, 0) * .44s) !important;
}
#halo-box.ig-ship.ig-start .read-top { animation: igShipRead 2.4s ease both; }
#halo-box.ig-ship.ig-start .ig-stars { animation: igShipStars 2.4s linear both, igStarDrift 120s linear infinite; }
#halo-box.ig-ship.ig-start .ring-head-g { animation: igShipHead 2.4s linear both; }

/* stop (drop to sublight): 0–0.13 the whole arc lights · 0.05–1.05 two waves of streaks fall back
   into the centre · 0.13–0.95 the arc drains anticlockwise · stars fade */
@keyframes igShipWarpBack { 0% { opacity: 0; transform: scale(1.1); } 18% { opacity: .75; } 70% { opacity: .5; } 100% { opacity: 0; transform: scale(.18); } }
@keyframes igShipFillOut {
  0% { opacity: 0; stroke-dashoffset: 0; }
  12% { opacity: .9; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.45, 0, .3, 1); }
  80% { opacity: .5; stroke-dashoffset: 1131; }
  100% { opacity: 0; stroke-dashoffset: 1131; }
}
@keyframes igShipGlowOut {
  0% { opacity: 0; stroke-dashoffset: 0; }
  12% { opacity: .28; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.45, 0, .3, 1); }
  80% { opacity: .12; stroke-dashoffset: 1131; }
  100% { opacity: 0; stroke-dashoffset: 1131; }
}
@keyframes igShipAmbOut { 0% { opacity: .17; } 15% { opacity: .28; } 70% { opacity: .08; } 100% { opacity: .17; } }
#halo-box.ig-ship.ig-stop .ig-wv1 { animation: igShipWarpBack .8s .05s cubic-bezier(.1, .6, .3, 1) both; }
#halo-box.ig-ship.ig-stop .ig-wv2 { animation: igShipWarpBack .8s .25s cubic-bezier(.1, .6, .3, 1) both; }
#halo-box.ig-ship.ig-stop .ig-sa-f { animation: igShipFillOut 1.2s linear both; }
#halo-box.ig-ship.ig-stop .ig-sa-g { animation: igShipGlowOut 1.2s linear both; }
#halo-box.ig-ship.ig-stop .amb { animation: igShipAmbOut 1.2s ease both; }
#halo-box.ig-ship.ig-stop .ring-head-g { visibility: visible; animation: igHeadOut .3s ease-in both; }

/* re-ignition: one half-strength wave through the ring */
@keyframes igShipRe { 0% { opacity: 0; transform: scale(.55); } 25% { opacity: .45; } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes igReHead { 0%, 40% { opacity: 0; } 100% { opacity: 1; } }
#halo-box.ig-ship.ig-re .ig-wv2 { animation: igShipRe .5s cubic-bezier(.55, 0, .9, .4) both; }
#halo-box.ig-ship.ig-re .ring-head-g { animation: igReHead .5s linear both; }

/* ============================================================================================
   Jet Turbine · Spool and coast. Start 2.0 s, stop 1.2 s, re-ignition 0.5 s.
   A copy of the inner dashed ring in its own layer (same box as .ring-spin-layer) does the
   spooling; three stacked strokes crossfade for the motion-blur look (crisp dashes, smear, haze).
   ============================================================================================ */
.ig-spool {
  position: absolute;
  left: 19.2857%; top: 19.2857%; width: 61.4286%; height: 61.4286%;
  pointer-events: none;
  opacity: 0;
}
.ig-spool svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ig-sp-base { stroke: rgba(255, 255, 255, .07); stroke-width: 1.5; stroke-dasharray: 2 12; }
.ig-sp-hot { stroke: rgb(var(--accent-rgb)); stroke-width: 1.5; stroke-dasharray: 2 12; opacity: 0; }
.ig-sp-blur { stroke: rgb(var(--accent-rgb)); stroke-width: 1.5; stroke-dasharray: 9 5; opacity: 0; }
.ig-sp-haze { stroke: rgb(var(--accent-rgb)); stroke-width: 1.5; opacity: 0; }
.ig-sp-glow { stroke: rgb(var(--accent-rgb)); stroke-width: 22; opacity: 0; }
#halo-box.ig-jet.ig-start .ig-spool,
#halo-box.ig-jet.ig-stop .ig-spool,
#halo-box.ig-jet.ig-re .ig-spool { opacity: 1; }

/* start: dashes brighten and start to turn · 0.45 spool-up to 540°/s at 1.1, crisp → smear →
   one solid glowing ring at peak · 1.2 settle back through the smear to dim dashes ·
   the real dashed ring takes over at the end. Rotation integrated from the speed curve. */
@keyframes igJetSpool {
  0% { transform: rotate(0deg); } 5% { transform: rotate(.4deg); } 10% { transform: rotate(1.8deg); }
  15% { transform: rotate(4.8deg); } 20% { transform: rotate(10.3deg); } 25% { transform: rotate(19.3deg); }
  30% { transform: rotate(33.3deg); } 35% { transform: rotate(54.3deg); } 40% { transform: rotate(84.3deg); }
  45% { transform: rotate(124.3deg); } 50% { transform: rotate(172.8deg); } 55% { transform: rotate(225.8deg); }
  60% { transform: rotate(277.8deg); } 65% { transform: rotate(322.8deg); } 70% { transform: rotate(357.3deg); }
  75% { transform: rotate(381.3deg); } 80% { transform: rotate(396.3deg); } 85% { transform: rotate(404.6deg); }
  90% { transform: rotate(408.6deg); } 95% { transform: rotate(410.3deg); } 100% { transform: rotate(411.1deg); }
}
@keyframes igJetHot { 0% { opacity: 0; } 15%, 22.5% { opacity: .5; } 35%, 77.5% { opacity: 0; } 85% { opacity: .35; } 100% { opacity: 0; } }
@keyframes igJetBlur { 0%, 22.5% { opacity: 0; } 32.5%, 40% { opacity: .3; } 50%, 62.5% { opacity: 0; } 72.5%, 77.5% { opacity: .25; } 87.5%, 100% { opacity: 0; } }
@keyframes igJetHaze { 0%, 37.5% { opacity: 0; } 47.5%, 60% { opacity: .5; } 75%, 100% { opacity: 0; } }
@keyframes igJetGlow { 0%, 37.5% { opacity: 0; } 52.5%, 60% { opacity: .12; } 77.5%, 100% { opacity: 0; } }
@keyframes igJetAmb { 0% { opacity: .17; } 55% { opacity: .26; } 90%, 100% { opacity: .17; } }
@keyframes igJetHead { 0%, 80% { opacity: 0; } 97.5%, 100% { opacity: 1; } }
/* hand-over between the copy's base dashes and the real dashed ring */
@keyframes igJetBaseOut { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes igJetRealIn { 0%, 85% { opacity: 0; } 100% { opacity: 1; } }
#halo-box.ig-jet.ig-start .ig-spool { animation: igJetSpool 2s linear both; }
#halo-box.ig-jet.ig-start .ig-sp-hot { animation: igJetHot 2s linear both; }
#halo-box.ig-jet.ig-start .ig-sp-blur { animation: igJetBlur 2s linear both; }
#halo-box.ig-jet.ig-start .ig-sp-haze { animation: igJetHaze 2s linear both; }
#halo-box.ig-jet.ig-start .ig-sp-glow { animation: igJetGlow 2s linear both; }
#halo-box.ig-jet.ig-start .ig-sp-base { animation: igJetBaseOut 2s linear both; }
#halo-box.ig-jet.ig-start .ring-spin-layer { animation: igJetRealIn 2s linear both; }
#halo-box.ig-jet.ig-start .amb { animation: igJetAmb 2s linear both; }
#halo-box.ig-jet.ig-start .ring-head-g { animation: igJetHead 2s linear both; }

/* stop (spool-down): kicked to the solid haze, then it coasts 168° to rest, decelerating:
   solid → smear → crisp dashes as it slows */
@keyframes igJetCoast { from { transform: rotate(0deg); } to { transform: rotate(168deg); } }
@keyframes igJetHazeOut { 0% { opacity: 0; } 6.67%, 12.5% { opacity: .35; } 25%, 100% { opacity: 0; } }
@keyframes igJetGlowOut { 0% { opacity: 0; } 8.33% { opacity: .08; } 25%, 100% { opacity: 0; } }
@keyframes igJetBlurOut { 0%, 8.33% { opacity: 0; } 20.83%, 37.5% { opacity: .25; } 54.17%, 100% { opacity: 0; } }
@keyframes igJetHotOut { 0%, 37.5% { opacity: 0; } 54.17%, 66.67% { opacity: .4; } 100% { opacity: 0; } }
@keyframes igJetAmbOut { 0% { opacity: .17; } 50% { opacity: .1; } 100% { opacity: .17; } }
#halo-box.ig-jet.ig-stop .ig-spool { animation: igJetCoast 1.2s cubic-bezier(.215, .61, .355, 1) both; }
#halo-box.ig-jet.ig-stop .ig-sp-haze { animation: igJetHazeOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ig-sp-glow { animation: igJetGlowOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ig-sp-blur { animation: igJetBlurOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ig-sp-hot { animation: igJetHotOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ig-sp-base { animation: igJetBaseOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ring-spin-layer { animation: igJetRealIn 1.2s linear both; }
#halo-box.ig-jet.ig-stop .amb { animation: igJetAmbOut 1.2s linear both; }
#halo-box.ig-jet.ig-stop .ring-head-g { visibility: visible; animation: igHeadOut .18s linear both; }

/* re-ignition: the dashes brighten, make a quarter turn and dim back */
@keyframes igJetReTurn { from { transform: rotate(0deg); } to { transform: rotate(90deg); } }
@keyframes igJetReHot { 0% { opacity: 0; } 35% { opacity: .5; } 100% { opacity: 0; } }
#halo-box.ig-jet.ig-re .ig-spool { animation: igJetReTurn .5s cubic-bezier(.3, .6, .4, 1) both; }
#halo-box.ig-jet.ig-re .ig-sp-hot { animation: igJetReHot .5s linear both; }
#halo-box.ig-jet.ig-re .ig-sp-base { animation: igJetBaseOut .5s linear both; }
#halo-box.ig-jet.ig-re .ring-spin-layer { animation: igJetRealIn .5s linear both; }
#halo-box.ig-jet.ig-re .ring-head-g { animation: igReHead .5s linear both; }

/* ============================================================================================
   Electric Whine · Phase lock. Start 2.4 s, stop 1.2 s, re-ignition 0.5 s.
   The phases redraw every frame while they move anyway, so they turn inside their svg (turning
   a masked layer whose content changes costs more); a static conic mask on the layer hides them
   across the gap at the bottom of the arc.
   ============================================================================================ */
.ig-phx {
  -webkit-mask-image: conic-gradient(#000 0deg 126deg, transparent 141deg 219deg, #000 234deg 360deg);
  mask-image: conic-gradient(#000 0deg 126deg, transparent 141deg 219deg, #000 234deg 360deg);
}
.ig-phrot { transform-box: view-box; transform-origin: 280px 280px; }
.ig-phx svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ig-ph { transform-box: view-box; transform-origin: 280px 280px; }
.ig-ph path { stroke-linejoin: round; }
.ig-ph-u path { stroke: rgb(var(--accent-rgb)); }
.ig-ph-v path { stroke: rgb(var(--regen-rgb)); }
.ig-ph-w path { stroke: var(--text); }
/* a1: wide swing, drawn on with a dash · a2: tight swing */
.ig-a1 { stroke-width: 2.2; stroke-dasharray: 1620 1700; stroke-dashoffset: 1620; opacity: 0; }
.ig-a2 { stroke-width: 1.6; opacity: 0; }
/* idle: the braid stays faintly on the track, still (the motor is silent standing still) */
#halo-box.ig-wh.ig-live .ig-a2 { opacity: .07; }
/* the locked ring: regen side + drive side (drains to zero) + one wide glow */
.ig-lk { opacity: 0; }
.ig-lk-g { stroke: rgb(var(--accent-rgb)); stroke-width: 26; }
.ig-lk-r, .ig-lk-d { stroke: rgb(var(--accent-rgb)); stroke-width: 8; stroke-linecap: round; }
.ig-lk-d { stroke-dasharray: 882.2 3000; stroke-dashoffset: 0; }
.ig-spk { stroke: rgb(var(--accent-rgb)); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ig-spk.ig-alt { stroke: rgb(var(--regen-rgb)); }

/* start: 0–0.45 the phases draw on while the field spins up · 0.8–1.4 they tighten ·
   1.5 they lock into one lit ring · 1.6–2.15 the drive side drains to zero · the needle lands */
@keyframes igWhSpin { 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .75, .6); } 68%, 100% { transform: rotate(270deg); } }
@keyframes igWhDraw {
  0% { stroke-dashoffset: 1620; opacity: .8; animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
  18% { stroke-dashoffset: 0; }
  36% { opacity: .8; }
  56%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes igWhMid { 0%, 34% { opacity: 0; } 50%, 58% { opacity: .85; } 66%, 88% { opacity: 0; } 100% { opacity: .07; } }
@keyframes igWhGlow { 0%, 58% { opacity: 0; } 63% { opacity: .22; } 84%, 100% { opacity: 0; } }
@keyframes igWhReg { 0%, 58% { opacity: 0; } 63%, 72% { opacity: .9; } 86%, 100% { opacity: 0; } }
@keyframes igWhDrv {
  0%, 58% { opacity: 0; stroke-dashoffset: 0; }
  63% { opacity: .95; }
  68% { stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  90% { opacity: .95; stroke-dashoffset: 882.2; }
  94%, 100% { opacity: 0; stroke-dashoffset: 882.2; }
}
@keyframes igWhAmb { 0%, 58% { opacity: .17; } 64% { opacity: .26; } 100% { opacity: .17; } }
@keyframes igWhHead { 0%, 87% { opacity: 0; } 93%, 100% { opacity: 1; } }
@keyframes igWhHeadPop { 0%, 87% { transform: scale(.4); } 93% { transform: scale(1.15); } 100% { transform: scale(1); } }
#halo-box.ig-wh.ig-start .ig-phrot { animation: igWhSpin 2.4s both; }
#halo-box.ig-wh.ig-start .ig-a1 { animation: igWhDraw 2.4s linear both; }
#halo-box.ig-wh.ig-start .ig-ph-v .ig-a1 { animation-delay: .06s; }
#halo-box.ig-wh.ig-start .ig-ph-w .ig-a1 { animation-delay: .12s; }
#halo-box.ig-wh.ig-start .ig-a2 { animation: igWhMid 2.4s linear both; }
#halo-box.ig-wh.ig-start .ig-lk-g { animation: igWhGlow 2.4s linear both; }
#halo-box.ig-wh.ig-start .ig-lk-r { animation: igWhReg 2.4s linear both; }
#halo-box.ig-wh.ig-start .ig-lk-d { animation: igWhDrv 2.4s linear both; }
#halo-box.ig-wh.ig-start .amb { animation: igWhAmb 2.4s linear both; }
#halo-box.ig-wh.ig-start .ring-head-g { animation: igWhHead 2.4s linear both; }
#halo-box.ig-wh.ig-start .ring-head-glow,
#halo-box.ig-wh.ig-start .ring-head { animation: igWhHeadPop 2.4s linear both; }

/* stop: 0–0.25 the ring splits back into its phases · they spin down 135° while two slip out of
   step · 0.62–0.95 six small sparks jump off the ring */
@keyframes igWhSpinDown { from { transform: rotate(0deg); } to { transform: rotate(135deg); } }
@keyframes igWhSlipV { from { transform: rotate(0deg); } to { transform: rotate(9deg); } }
@keyframes igWhSlipW { from { transform: rotate(0deg); } to { transform: rotate(-9deg); } }
@keyframes igWhSplit { 0% { opacity: .4; stroke-dashoffset: 0; } 20%, 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes igWhOutMid { 0% { opacity: .07; } 10% { opacity: .85; } 40% { opacity: .5; } 62%, 100% { opacity: 0; } }
@keyframes igWhOutBig { 0%, 10% { opacity: 0; stroke-dashoffset: 0; } 40% { opacity: .75; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: -1620; } }
@keyframes igWhSpark { 0%, 52% { opacity: 0; transform: translateX(0); } 57% { opacity: .85; } 78%, 100% { opacity: 0; transform: translateX(16px); } }
#halo-box.ig-wh.ig-stop .ig-phrot { animation: igWhSpinDown 1.2s cubic-bezier(.2, .6, .35, 1) both; }
#halo-box.ig-wh.ig-stop .ig-ph-v { animation: igWhSlipV 1.2s cubic-bezier(.5, 0, .8, .6) both; }
#halo-box.ig-wh.ig-stop .ig-ph-w { animation: igWhSlipW 1.2s cubic-bezier(.5, 0, .8, .6) both; }
#halo-box.ig-wh.ig-stop .ig-lk-r,
#halo-box.ig-wh.ig-stop .ig-lk-d { animation: igWhSplit 1.2s linear both; }
#halo-box.ig-wh.ig-stop .ig-a2 { animation: igWhOutMid 1.2s linear both; }
#halo-box.ig-wh.ig-stop .ig-a1 { animation: igWhOutBig 1.2s linear both; }
#halo-box.ig-wh.ig-stop .ig-spk { animation: igWhSpark 1.2s linear both; }
#halo-box.ig-wh.ig-stop .ig-k1 { animation-delay: .02s; }
#halo-box.ig-wh.ig-stop .ig-k2 { animation-delay: .04s; }
#halo-box.ig-wh.ig-stop .ig-k3 { animation-delay: .06s; }
#halo-box.ig-wh.ig-stop .ig-k4 { animation-delay: .08s; }
#halo-box.ig-wh.ig-stop .ig-k5 { animation-delay: .1s; }
@keyframes igWhHeadOut { from { transform: scale(1); } to { transform: scale(.4); } }
#halo-box.ig-wh.ig-stop .ring-head-g { visibility: visible; animation: igHeadOut .2s linear both; }
#halo-box.ig-wh.ig-stop .ring-head-glow,
#halo-box.ig-wh.ig-stop .ring-head { animation: igWhHeadOut .2s linear both; }

/* re-ignition: the tight braid fades in, turns 45° and dissolves into the ring */
@keyframes igWhReTurn { from { transform: rotate(0deg); } to { transform: rotate(45deg); } }
@keyframes igWhReMid { 0% { opacity: 0; } 35% { opacity: .7; } 100% { opacity: .07; } }
#halo-box.ig-wh.ig-re .ig-phrot { animation: igWhReTurn .5s cubic-bezier(.3, .6, .4, 1) both; }
#halo-box.ig-wh.ig-re .ig-a2 { animation: igWhReMid .5s linear both; }
#halo-box.ig-wh.ig-re .ring-head-g { animation: igReHead .5s linear both; }

/* The shell never plays these under reduced motion; the idle loop stops too. */
@media (prefers-reduced-motion: reduce) {
  #halo-box .ig-stars { animation: none !important; }
}
