:root {
  --bg: #0e1116;
  --bg-elev: #161b22;
  --bg-input: #0b0e13;
  --line: #262d38;
  --line-soft: #1d242e;
  --text: #e6e9ef;
  --muted: #93a0b4;
  --accent: #7c5cff;
  --accent-hi: #9277ff;
  --ok: #35c07e;
  --warn: #e0a63c;
  --danger: #e2565b;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(1200px 700px at 15% -10%, #1b2230 0%, var(--bg) 60%);
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 620; letter-spacing: .2px; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .92rem; margin-top: 1.1rem; color: var(--muted); }
p { margin: .35rem 0 .8rem; }
a { color: var(--accent-hi); }

.muted { color: var(--muted); }

/* Only ever rendered inside <noscript>; CSP allows no inline styles at all. */
.noscript-note { padding: 2rem; max-width: 42rem; margin: 0 auto; color: var(--text); }
.tiny { font-size: .78rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------- cards */
.card {
  background: linear-gradient(180deg, var(--bg-elev), #12171f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
}
.subcard { border: 1px dashed var(--line); border-radius: 10px; padding: .9rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ controls */
label { display: block; font-size: .82rem; color: var(--muted); margin: .75rem 0 .25rem; }

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .55rem .65rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { min-height: 108px; resize: vertical; line-height: 1.45; }
input[type="checkbox"] { width: auto; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #202733; color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: .5rem .85rem; font: inherit; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .05s ease;
  text-decoration: none;
}
.btn:hover { background: #262f3d; border-color: #333d4d; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-ghost { background: transparent; }
.btn-warn { border-color: #5a4520; color: #f0c675; }
.btn-danger { border-color: #5c2629; color: #f08b8f; }
.btn-sm { padding: .32rem .6rem; font-size: .82rem; }
.btn-block { width: 100%; justify-content: center; margin-top: .6rem; }

.row { display: flex; align-items: center; }
.row.gap, .gap { gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: .35rem; }

/* --------------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.login-card { width: min(420px, 100%); }
.login-card h1 { margin-bottom: .2rem; }
.policy { color: var(--muted); padding-left: 1.1rem; margin: .8rem 0; }

/* -------------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.1rem;
  background: rgba(14, 17, 22, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), #35c07e); }
.tabs { display: flex; gap: .3rem; }
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  border-radius: 8px; padding: .38rem .75rem; font: inherit; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: #1d2532; border-color: var(--line); color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .7rem; }

/* The right hand side carries the rig light, the name, the password button and
 * sign out, so on a narrow window the tabs drop to their own row instead of
 * pushing the account buttons off screen. */
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; row-gap: .5rem; }
  .topbar-right { margin-left: auto; flex-wrap: wrap; row-gap: .35rem; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
}

.rig { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); }
.rig .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.rig-ok .dot { background: var(--ok); box-shadow: 0 0 6px #35c07e88; }
.rig-bad .dot { background: var(--danger); box-shadow: 0 0 6px #e2565b88; }

main { padding: 1.1rem; max-width: 1500px; margin: 0 auto; }


/* ----------------------------------------------------------------- workflows */
.workflow-picker { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1rem; }
.wf-chip {
  border: 1px solid var(--line); background: #151b24; color: var(--text);
  border-radius: 10px; padding: .55rem .8rem; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: .12rem; text-align: left; min-width: 148px;
}
.wf-chip:hover:not([disabled]) { border-color: #3a4655; }
.wf-chip.is-active { border-color: var(--accent); background: #1c1f38; }
.wf-chip[disabled] { opacity: .45; cursor: not-allowed; }
.wf-chip b { font-weight: 600; }
.wf-chip span { font-size: .74rem; color: var(--muted); }
.wf-off { color: var(--danger); }

.field-group { border-top: 1px solid var(--line-soft); padding-top: .5rem; margin-top: .9rem; }
.field-group > h3 { margin: 0 0 .4rem; }
.field-row { display: grid; gap: .2rem; margin-bottom: .7rem; }
.field-help { font-size: .74rem; color: var(--muted); }
.field-check { display: flex; align-items: center; gap: .5rem; margin: .55rem 0; }
.field-check label { margin: 0; color: var(--text); }
.range-value { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; }
.seed-row { display: flex; gap: .4rem; align-items: center; }
.advanced { border-top: 1px solid var(--line-soft); margin-top: .8rem; }
.advanced-toggle {
  background: none; border: none; color: var(--accent-hi); cursor: pointer;
  font: inherit; padding: .35rem 0;
}

.dropzone {
  border: 1px dashed var(--line); border-radius: 10px; padding: .9rem;
  text-align: center; color: var(--muted); cursor: pointer; background: #10151d;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); color: var(--text); }
.dropzone img { max-width: 100%; max-height: 230px; border-radius: 8px; display: block; margin: 0 auto .5rem; }
.dropzone .file-meta { font-size: .76rem; color: var(--muted); margin-top: .4rem; }
.dropzone-hint { font-size: .86rem; }

/* Choosing a picture you already have, rather than re-uploading it. */
.picker-actions { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.recent-picker { text-align: left; margin-top: .7rem; border-top: 1px solid var(--line-soft); padding-top: .6rem; }
.recent-group + .recent-group { margin-top: .6rem; }
.recent-group h4 { margin: 0 0 .35rem; font-weight: 600; }
.recent-row { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .25rem; }
.recent-tile {
  flex: 0 0 auto; width: 92px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: #0b0f15; cursor: pointer; overflow: hidden; position: relative;
}
.recent-tile:hover { border-color: var(--accent); }
.recent-tile img { width: 92px; height: 68px; object-fit: cover; display: block; background: #000; }
.recent-cap {
  display: block; font-size: .64rem; color: #cfd8e6; padding: .18rem .3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.form-actions { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* --------------------------------------------------------------- job progress */
.job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.progress {
  height: 8px; background: #131922; border: 1px solid var(--line-soft);
  border-radius: 999px; overflow: hidden; margin: .8rem 0 .3rem;
}
.progress > div {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #35c07e);
  transition: width .35s ease;
}
.log-title { margin: 1.1rem 0 .4rem; }
.log {
  background: #0a0d12; border: 1px solid var(--line-soft); border-radius: 9px;
  padding: .6rem .7rem; height: 210px; overflow: auto;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word; color: #b9c4d4; margin: 0;
}
.asset-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
/* A button, with the media inside it inert: a <video> swallows the click that was
 * meant for "open this", which is why a finished clip used to look unclickable. */
.media-thumb {
  position: relative;   /* so the "video" badge sits on the picture, not on the page */
  padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #000;
  cursor: pointer; overflow: hidden; line-height: 0;
}
.media-thumb:hover { border-color: var(--accent); }
.media-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.media-thumb > * { pointer-events: none; }
.thumb-media { height: 120px; max-width: 220px; object-fit: cover; display: block; background: #000; }

.job-list { list-style: none; padding: 0; margin: 0; }
.job-list li {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .1rem; border-bottom: 1px solid var(--line-soft); font-size: .86rem;
}
.job-list li:last-child { border-bottom: none; }
.job-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-list button {
  background: none; border: none; color: var(--accent-hi); cursor: pointer;
  font: inherit; padding: 0; text-align: left;
}
.badge {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--line); border-radius: 999px; padding: .1rem .45rem; color: var(--muted);
}
.badge-running, .badge-submitted { color: var(--warn); border-color: #4b3a1a; }
.badge-done { color: var(--ok); border-color: #1d5338; }
.badge-error { color: var(--danger); border-color: #5c2629; }

/* ------------------------------------------------------------ alerts / toasts */
.alert {
  border: 1px solid var(--line); border-radius: 9px; padding: .6rem .75rem;
  margin: .7rem 0; font-size: .86rem; background: #131a24;
}
.alert-error { border-color: #5c2629; background: #241417; color: #f0a3a6; }
.alert-ok { border-color: #1d5338; background: #12211a; color: #9fe0bd; }
.alert code { background: #0b1017; padding: .1rem .3rem; border-radius: 5px; word-break: break-all; }

.toasts {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, 90vw);
}
.toast {
  background: #1b232f; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: .6rem .8rem; box-shadow: var(--shadow); font-size: .86rem;
  animation: rise .18s ease-out;
}
.toast-error { border-left-color: var(--danger); }
.toast-ok { border-left-color: var(--ok); }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ------------------------------------------------------------------- gallery */
.gallery-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.gallery-bar h2 { margin: 0; }
.gallery-filters { margin-left: auto; display: flex; gap: .45rem; flex-wrap: wrap; }
.gallery-filters select { width: auto; min-width: 130px; }

.grid {
  display: grid; gap: .7rem; margin-top: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.tile {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #0b0f15; cursor: pointer; aspect-ratio: 1 / 1;
  display: block; padding: 0;
}
.tile:hover { border-color: var(--accent); }
.tile img, .tile video {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #000;
  pointer-events: none;   /* the tile is the button; media must not eat the click */
}
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: .8rem .5rem .4rem;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 12, .92));
  font-size: .72rem; color: #cfd8e6; display: flex; justify-content: space-between; gap: .4rem;
}
/* One badge for both places a result is offered as a button: the gallery tile and
 * the progress panel's thumbnail. */
.tile .vid-mark, .media-thumb .vid-mark {
  position: absolute; top: .4rem; right: .4rem; background: rgba(8, 10, 14, .7);
  border-radius: 6px; padding: .1rem .35rem; font-size: .68rem; letter-spacing: .04em;
}

.empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 1.4rem;
  color: var(--muted); text-align: center; margin-top: .8rem; font-size: .9rem;
}

/* ------------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(6, 8, 12, .82);
  display: grid; place-items: center; padding: 1rem;
}
.lightbox-inner {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem;
  max-width: min(1200px, 96vw); max-height: 92vh; padding: 1rem; position: relative;
}
.lightbox-media { display: grid; place-items: center; min-height: 200px; }
.lightbox-media img, .lightbox-media video {
  max-width: 100%; max-height: 82vh; border-radius: 10px; background: #000;
}
.lightbox-info { overflow: auto; }
.lightbox-close { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
@media (max-width: 900px) { .lightbox-inner { grid-template-columns: 1fr; } }

dl { margin: .6rem 0; }
dl div { display: flex; justify-content: space-between; gap: .8rem; padding: .25rem 0;
  border-bottom: 1px solid var(--line-soft); font-size: .82rem; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; word-break: break-word; }

/* -------------------------------------------------------------- tables / kv */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th, .table td {
  text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.table th { color: var(--muted); font-weight: 550; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions .btn { margin-left: .25rem; }
.table tr:hover td { background: #141a23; }
.table .name { font-weight: 600; }
.table .self { color: var(--accent-hi); }

.kv { margin: .6rem 0; font-size: .86rem; }
.kv dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: 0; }
.kv dl div { display: contents; }
.kv dt { color: var(--muted); padding: .12rem 0; border-bottom: none; }
.kv dd { margin: 0; word-break: break-word; padding: .12rem 0; border-bottom: none; text-align: left; }

.cmd {
  display: block; background: #0a0d12; border: 1px solid var(--line-soft);
  border-radius: 8px; padding: .6rem .7rem; font-size: .76rem; overflow-x: auto;
  white-space: pre-wrap; word-break: break-all; color: #b9c4d4; margin-top: .4rem;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a3341; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
/* ------------------------------------------------------- guidance disclosure */
/* Everything that explains a flow, behind one line, so the form stays three deep. */
.guidance { border-top: 1px solid var(--line-soft); margin-top: .6rem; padding-top: .2rem; }
.guidance-toggle, .settings-toggle {
  cursor: pointer; color: var(--accent-hi); font-size: .82rem; font-weight: 550;
  padding: .3rem 0; list-style: none; display: flex; align-items: center; gap: .4rem;
}
.guidance-toggle::-webkit-details-marker, .settings-toggle::-webkit-details-marker { display: none; }
.guidance-toggle::before, .settings-toggle::before {
  content: '+'; display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem;
  border: 1px solid var(--line); border-radius: 5px; font-size: .78rem; color: var(--muted);
}
.guidance[open] .guidance-toggle::before, .settings-pop[open] .settings-toggle::before { content: '−'; }
.guidance-tips { margin: .3rem 0 .6rem; padding-left: 1.1rem; color: var(--muted); font-size: .82rem; }
.guidance-tips li { margin: .18rem 0; }
.guidance-list { margin: 0; }
.guidance-list div {
  display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: .2rem .8rem;
  padding: .38rem 0; border-bottom: 1px solid var(--line-soft); font-size: .8rem;
  align-items: start;
}
.guidance-list div:last-child { border-bottom: none; }
.guidance-list dt { color: var(--text); font-weight: 550; }
.guidance-list dd { margin: 0; color: var(--muted); }

/* ------------------------------------------------------- settings disclosure */
/* The rest of the fields, one click away and counted, so Generate sits right under
 * the prompt instead of at the bottom of a long scroll. */
.settings-pop { border: 1px solid var(--line-soft); border-radius: 10px; padding: .1rem .7rem; background: #12171f; }
.settings-pop[open] { padding-bottom: .6rem; }
.settings-pop .count {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--warn);
  border: 1px solid #4b3a1a; border-radius: 999px; padding: .05rem .4rem;
}
.settings-fields { border-top: 1px solid var(--line-soft); padding-top: .3rem; }
.settings-fields .field-row:last-child { margin-bottom: .2rem; }

/* ------------------------------------------------------- pressing Generate */
/* Two gaps used to read as "nothing happened": the second or so between the click and
 * the rig accepting the job, and everything between "running" and the first sampling
 * step, which is where a model gets loaded into VRAM. Both are filled here - the
 * feedback starts on the button you pressed and never hands over to an empty bar. */
#job-submit .btn-spin {
  display: none; width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: btnSpin .7s linear infinite;
}
/* Not the ordinary disabled look: a greyed-out button reads as "nothing is happening",
 * which is the opposite of what a busy one means. */
#job-submit.is-busy { opacity: 1; cursor: progress; }
#job-submit.is-busy .btn-spin { display: block; }
#job-submit.is-kicked { animation: kickPulse .55s ease-out 2; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@keyframes kickPulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 92, 255, .6); }
  100% { box-shadow: 0 0 0 16px rgba(124, 92, 255, 0); }
}

/* The progress card is the right-hand column, and under 1080px it is below the fold.
 * A kick-off nobody saw is the same as no feedback, so the card is flashed and
 * scrolled into view when Generate is pressed. */
#job-card.is-flash { animation: cardFlash 1.1s ease-out 1; }
@keyframes cardFlash {
  0% { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .4), var(--shadow); }
  100% { border-color: var(--line); box-shadow: var(--shadow); }
}

/* Both panels arrive with the same small slide, so the hand-off from "sending" to
 * "running" reads as one thing becoming another rather than a redraw. */
.launch { display: grid; gap: .7rem; margin-top: .9rem; animation: panelIn .28s ease-out; }
#job-active { animation: panelIn .28s ease-out; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
.launch-dots { display: flex; gap: .32rem; }
.launch-dots i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: launchPulse 1.1s ease-in-out infinite;
}
.launch-dots i:nth-child(2) { animation-delay: .16s; background: var(--accent-hi); }
.launch-dots i:nth-child(3) { animation-delay: .32s; background: var(--ok); }
.launch-copy { display: grid; gap: .1rem; }
.launch-skeleton { display: grid; gap: .4rem; }
.launch-skeleton span {
  height: 10px; border-radius: 6px; width: 100%;
  background: linear-gradient(90deg, #131922 0%, #232c3a 40%, #131922 80%);
  background-size: 300% 100%; animation: launchShimmer 1.5s linear infinite;
}
.launch-skeleton span:nth-child(2) { width: 72%; }
.launch-skeleton span:nth-child(3) { width: 46%; }
@keyframes launchPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: .45; }
  50% { transform: translateY(-4px) scale(1.18); opacity: 1; }
}
@keyframes launchShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* A live job with no step yet sweeps instead of sitting at zero. The sweep is honest -
 * it promises movement, not a percentage - and stops the moment progress arrives. */
.progress.is-indeterminate { border-color: #38445a; }
.progress.is-indeterminate > div {
  width: 34%; transition: none;
  animation: barSweep 1.5s cubic-bezier(.6, .05, .35, .95) infinite;
}
@keyframes barSweep {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(300%); }
}

/* The counted wait: the sweeping bar says "working", the moving number proves it. */
.wait { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.wait::before {
  content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: launchPulse 1.1s ease-in-out infinite;
}

/* ---------------------------------------------------------------- busy strip */
/* Fixed to the top of the viewport, above the sticky header: the one place that is
 * never scrolled out of sight, so a job still running in the background is visible
 * from the Gallery too. Indeterminate until the rig starts sampling, then it tracks
 * the same ratio as the bar in the panel. */
.busy-strip {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70;
  background: rgba(124, 92, 255, .16); overflow: hidden; pointer-events: none;
}
.busy-strip > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #35c07e);
  transition: width .35s ease;
}
.busy-strip.is-indeterminate > i {
  width: 22%; transition: none;
  animation: stripSweep 1.35s cubic-bezier(.6, .05, .35, .95) infinite;
}
@keyframes stripSweep {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(460%); }
}
.busy-strip.is-done > i { background: var(--ok); }
.busy-strip.is-bad > i { background: var(--danger); }
.busy-strip.is-stopped > i { background: var(--warn); }
.busy-strip.is-done, .busy-strip.is-bad, .busy-strip.is-stopped {
  animation: stripFade 1.5s ease-in forwards;
}
@keyframes stripFade { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .launch-dots i, .launch-skeleton span, .wait::before,
  .launch, #job-active, #job-card.is-flash, #job-submit.is-kicked,
  #job-submit .btn-spin, .busy-strip.is-done, .busy-strip.is-bad,
  .busy-strip.is-stopped {
    animation: none; opacity: 1;
  }
  /* Still unmistakable, just not moving: the whole track lit means "working, amount
   * unknown", which is exactly what a job before its first step is. */
  .progress.is-indeterminate > div, .busy-strip.is-indeterminate > i {
    width: 100%; animation: none; opacity: .55;
  }
}


/* ----------------------------------------------------------------- modal */
/* Same furniture as the lightbox, smaller: the Account panel is not a page of its own. */
.modal {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 8, 12, .78);
  display: grid; place-items: center; padding: 1rem;
}
.modal-inner {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); width: min(520px, 96vw); max-height: 90vh; overflow: auto;
  padding: 1.1rem 1.2rem; position: relative;
}
.modal-close { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
.modal-inner .policy { margin: .3rem 0 .5rem; padding-left: 1.1rem; color: var(--muted); }

