/* Waiting experience for the report stage panel and its minimised strip. Loaded after app.css.
   Brand: deep teal-black ground, cream text, pale gold accents, soft teal glow. Motion is decoration only: it exists
   solely while the report is running and never stands in for progress (that comes from real phase events, stages.mjs). */
.stage-overlay{background:rgba(2,13,15,.80);backdrop-filter:blur(6px)}
.stage-panel{--teal:#86d3c3;--teal2:#4fb5a2;--gold:#e0c985;--cream:#f2ecda;--mute:#a3bbb2;--line:rgba(224,201,133,.20);
  color:var(--cream);border:1px solid var(--line);border-radius:16px;width:min(580px,100%);padding:26px 28px 20px;
  background:radial-gradient(110% 80% at 88% -10%,rgba(134,211,195,.13),transparent 58%),radial-gradient(70% 60% at 0% 100%,rgba(224,201,133,.07),transparent 60%),linear-gradient(168deg,#05191b 0%,#0a2629 62%,#07191c 100%);
  box-shadow:0 38px 100px rgba(0,0,0,.62),inset 0 1px 0 rgba(242,236,218,.07)}
.stage-panel .stage-head{color:var(--mute)}
.stage-panel .stage-ticker{color:var(--cream);letter-spacing:2px}
.stage-panel .stage-sep{color:#47625b}
.stage-panel .stage-exchange{color:var(--gold)}
.stage-panel .stage-rule{background:linear-gradient(90deg,var(--gold),rgba(224,201,133,.05))}
.stage-panel .stage-title{font-size:21px;line-height:1.35;font-weight:600;color:var(--cream);letter-spacing:.6px;margin:0 0 4px}
.stage-sub{margin:0 0 12px;font-size:13px;line-height:1.6;color:var(--teal);min-height:1.6em}
.stage-sub[hidden]{display:none}
.stage-panel .stage-no{color:var(--gold)}
.stage-panel .stage-name{color:var(--cream)}
.stage-panel .stage-detail{color:var(--mute)}
.stage-panel .stage-bar{background:rgba(242,236,218,.09)}
.stage-panel .stage-bar i{background:linear-gradient(90deg,var(--teal2),var(--teal))}
.stage-panel.stage-v2 .stage-bar{display:none}   /* v2 has no partial progress to draw; stage state is the information */
.stage-panel.stage-v2 .stage-row{grid-template-columns:30px minmax(0,1fr)}
.stage-panel .stage-link::before{background:#27463f}
.stage-panel .stage-link::after{border-color:#27463f}
.stage-panel .stage-link.done::before{background:var(--teal2)}
.stage-panel .stage-link.done::after{border-color:var(--teal2)}
.stage-panel .stage-mark{background:#071d20;border-color:#2c4d46}
.stage-panel .stage-dot{background:var(--gold)}
.stage-panel .stage-row.done .stage-mark{background:#2c8f7c;border-color:#2c8f7c}
.stage-panel .stage-row.current{background:rgba(134,211,195,.07);box-shadow:0 0 0 1px rgba(134,211,195,.28),0 12px 30px rgba(0,0,0,.28)}
.stage-panel .stage-row.current .stage-mark{border-color:rgba(224,201,133,.25)}
.stage-panel .stage-row.current .stage-mark::before{border-top-color:var(--gold);border-right-color:var(--gold)}
.stage-panel .stage-row.current .stage-name{color:#fff}   /* app.css colours the current name navy; keep it readable on the dark panel */
.stage-panel .stage-row.started .stage-mark{border-color:#3d7d70}
.stage-panel .stage-row.started .stage-dot{background:#7fb9ab}
.stage-panel .stage-row.upcoming{opacity:.52}
.stage-panel .stage-row.upcoming .stage-name{color:#9bb3aa;font-weight:500}
.stage-panel .stage-row.failed{background:rgba(229,143,120,.10)}
.stage-panel .stage-row.failed .stage-mark{background:#cf6a52;border-color:#cf6a52}
.stage-panel .stage-row.failed .stage-detail{color:#f0b6a8}
.stage-panel .stage-note{color:var(--mute)}
.stage-panel .stage-alert{background:rgba(224,201,133,.10);color:#ecd9a2}
.stage-panel .stage-alert.error{background:rgba(229,143,120,.13);color:#f3bcae}
.stage-panel .stage-early{color:var(--teal)}
.stage-panel .button{background:rgba(242,236,218,.05);border-color:rgba(224,201,133,.28);color:var(--cream)}
.stage-panel .button:hover{background:rgba(224,201,133,.13)}
.stage-panel .button:disabled{opacity:.55}
.stage-panel .button.primary{background:var(--gold);border-color:var(--gold);color:#10231f}
.stage-panel .button.primary:hover{background:#ecd698}
.stage-panel .button.quiet-danger{border-color:rgba(229,143,120,.38);color:#f0b6a8;margin-right:auto}
.stage-panel button:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
.stage-strip{background:#0a2629;border-color:rgba(224,201,133,.22);color:#f2ecda}
.stage-strip.failed{background:#2b1b18;border-color:rgba(229,143,120,.38)}
.stage-strip .stage-name{color:#f2ecda}
.stage-strip .stage-no{color:#e0c985}
.stage-strip .stage-mark{background:#071d20;border-color:#2c4d46}
.stage-strip .stage-row.done .stage-mark{background:#2c8f7c;border-color:#2c8f7c}
.stage-strip .stage-dot{background:#e0c985}
.stage-strip .stage-strip-note{color:#a3bbb2}
.stage-strip .button{background:rgba(242,236,218,.06);border-color:rgba(224,201,133,.28);color:#f2ecda}

/* ---- scene ---- */
.wait-scene{position:relative;margin:4px 0 14px;border-radius:12px;border:1px solid rgba(224,201,133,.14);overflow:hidden;
  background:radial-gradient(70% 120% at 82% 50%,rgba(134,211,195,.11),transparent 70%),#04161a}
.wait-svg{display:block;width:100%;height:auto}
/* styles.base.css gives every svg shape a currentColor stroke; the filled shapes here must not inherit it */
.wait-scan,.wait-pulse,.wait-core-glow{stroke:none}
.wait-grid line{stroke:rgba(134,211,195,.06);stroke-width:1}
.wait-scan{opacity:0}
.wait-track{fill:none;stroke:rgba(134,211,195,.13);stroke-width:1.2}
.wait-line{fill:none;stroke-width:1.7;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke .5s,stroke-width .5s}
.wait-node{fill:#04161a;stroke:rgba(134,211,195,.34);stroke-width:1.4;transition:fill .5s,stroke .5s}
.wait-pulse{fill:#bfeadf;opacity:0;offset-rotate:0deg}
.wait-lane[data-state=running] .wait-line{stroke:rgba(134,211,195,.6);stroke-dasharray:.045 .035;stroke-dashoffset:0}
.wait-lane[data-state=running] .wait-node{stroke:var(--teal,#86d3c3)}
.wait-lane[data-state=done] .wait-line{stroke:#86d3c3;stroke-width:2;stroke-dasharray:1;stroke-dashoffset:0;filter:drop-shadow(0 0 3px rgba(134,211,195,.55))}
.wait-lane[data-state=done] .wait-node{fill:#86d3c3;stroke:#86d3c3}
.wait-lane[data-state=failed] .wait-line{stroke:#e58f78;stroke-dasharray:.02 .04;stroke-dashoffset:0;opacity:.85}
.wait-lane[data-state=failed] .wait-node{stroke:#e58f78}
.wait-core-glow{opacity:0;transition:opacity .7s}
.wait-core-dot{fill:#0e3135;stroke:rgba(224,201,133,.45);stroke-width:1.2;transition:fill .6s}
.wait-core-ring{stroke:rgba(224,201,133,.32);stroke-width:1.2}
.wait-core-ring2{stroke:rgba(134,211,195,.16);stroke-width:1;stroke-dasharray:3 5}
.wait-core[data-state=synth] .wait-core-dot{fill:rgba(224,201,133,.72)}
.wait-core[data-state=synth] .wait-core-ring{stroke:#e0c985;stroke-dasharray:20 14}
.wait-core[data-state=synth] .wait-core-glow{opacity:.6}
.wait-core[data-state=verify] .wait-core-dot{fill:rgba(224,201,133,.9)}
.wait-core[data-state=verify] .wait-core-ring{stroke:#e0c985;stroke-dasharray:4 6}
.wait-core[data-state=verify] .wait-core-glow{opacity:.75}
.wait-core[data-state=done] .wait-core-dot{fill:#ecd698}
.wait-core[data-state=done] .wait-core-ring,.wait-core[data-state=done] .wait-core-ring2{stroke:#e0c985}
.wait-core[data-state=done] .wait-core-glow{opacity:.95}
.wait-core[data-state=failed] .wait-core-dot{fill:#cf6a52}
.wait-core[data-state=failed] .wait-core-ring{stroke:#e58f78}

/* ---- decorative motion: only while running, never tied to elapsed time as progress ---- */
@keyframes wait-travel{from{offset-distance:0%}to{offset-distance:100%}}
@keyframes wait-flow{to{stroke-dashoffset:-.08}}
@keyframes wait-sweep{from{transform:translateX(0)}to{transform:translateX(430px)}}
@keyframes wait-spin{to{transform:rotate(360deg)}}
@keyframes wait-breathe{50%{opacity:.55}}
.wait-scene[data-state=running] .wait-lane[data-state=running] .wait-pulse{opacity:.95;animation:wait-travel 2.8s linear infinite}
.wait-scene[data-state=running] .wait-lane[data-state=running] .wait-line{animation:wait-flow 1.5s linear infinite}
.wait-scene[data-state=running] .wait-scan{opacity:1;animation:wait-sweep 6.5s linear infinite}
.wait-scene[data-state=running] .wait-core[data-state=synth] .wait-core-ring,.wait-scene[data-state=running] .wait-core[data-state=verify] .wait-core-ring{transform-box:fill-box;transform-origin:center;animation:wait-spin 7s linear infinite}
.wait-scene[data-state=running] .wait-core[data-state=idle] .wait-core-ring2{animation:wait-breathe 3.4s ease-in-out infinite}

@media (max-width:520px){
  .stage-panel{padding:18px 16px 14px;border-radius:14px}
  .stage-panel .stage-title{font-size:18px}
  .stage-row{column-gap:10px;padding:9px 6px}
  .stage-actions .button{flex:1 1 auto}
}
/* No animation at all for users who ask for reduced motion: the static states carry the same information. */
@media (prefers-reduced-motion:reduce){
  .wait-scene *,.wait-scene{animation:none!important;transition:none!important}
  .wait-pulse,.wait-scan{display:none}
  .stage-panel .stage-row.current .stage-mark::before{animation:none!important;border-color:var(--gold)}
  .stage-overlay{animation:none}
  .stage-bar i{transition:none}
}
