/* DON Studio. Warm paper, ink, chunky 2px edges, hard ink shadows, colour blocks.
   Type: Archivo Black (display), Poppins SemiBold/Bold (labels, buttons), system sans (reading).
   Accents are fills, never text on paper (except magenta for errors, which passes AA).
   Contrast (WCAG 2.x, measured):
   ink #0d0d0f on paper #f5f3ee 17.5, on white 19.4 | secondary #3a3a42 on paper 10.2, on white 11.3
   ink on lime #c6ff00 16.4 | ink on orange #ff6a13 6.8 | white on magenta #c8005a 5.8 | white on blue #0047ff 6.3
   magenta on paper 5.3, on white 5.8 | blue (links, focus) on paper 5.7 | white on ink 19.4 */

@font-face {
  font-family: "Archivo Black";
  src: url("fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f3ee;
  --white: #ffffff;
  --ink: #0d0d0f;
  --ink-2: #3a3a42;
  --lime: #c6ff00;
  --magenta: #c8005a;
  --blue: #0047ff;
  --orange: #ff6a13;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ui: "Poppins", var(--sans);
  --display: "Archivo Black", "Arial Black", var(--sans);

  --line: 2px solid var(--ink);
  --hard: 4px 4px 0 var(--ink);
  --hard-sm: 2px 2px 0 var(--ink);
  --gutter: 16px;
  --bar-h: 72px;

  --acc: var(--lime);
  --acc-ink: var(--ink);
  color-scheme: light;
}

.acc-lime { --acc: var(--lime); --acc-ink: var(--ink); }
.acc-magenta { --acc: var(--magenta); --acc-ink: var(--white); }
.acc-blue { --acc: var(--blue); --acc-ink: var(--white); }
.acc-orange { --acc: var(--orange); --acc-ink: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: var(--blue); text-underline-offset: 3px; }

code {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9em;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 0 5px;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--blue);
  color: var(--white);
  padding: 12px 16px;
  font-family: var(--ui);
  font-weight: 700;
  z-index: 20;
}
.skip:focus { top: 8px; }

/* ---------- header ---------- */

.top {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px var(--gutter) 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.logo-don {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  border: var(--line);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0 0.16em;
  transform: rotate(-2deg);
  margin-right: 0.08em;
}
.logo-studio { color: var(--ink); }

.tagline {
  margin: 10px 0 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-2);
}

.top-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.studio-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  white-space: nowrap;
}
.studio-pill .dot {
  width: 14px; height: 14px;
  background: var(--white);
  border: var(--line);
  flex: none;
}
.studio-pill.is-online .dot { background: var(--lime); }

/* ---------- layout ---------- */

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px var(--gutter) 48px;
}

.booting { font-family: var(--ui); font-weight: 600; color: var(--ink-2); }

.card, .panel, .step {
  background: var(--white);
  border: var(--line);
  box-shadow: var(--hard);
}

.notice {
  margin: 16px 4px 0 0;
  padding: 12px 14px 12px 24px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--lime);
  font-family: var(--ui);
  font-weight: 600;
}
.notice:empty { display: none; }

.panel { margin: 16px 4px 4px 0; padding: 20px 16px 24px; }

/* ---------- sticky step bar ---------- */

.stepbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 8px calc(-1 * var(--gutter)) 0;
  padding: 10px var(--gutter);
  background: var(--paper);
  border-bottom: var(--line);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.stepbar::-webkit-scrollbar { display: none; }
.sb-list {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 4px 4px 0;
  list-style: none;
  width: max-content;
}
.sb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--hard-sm);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.sb:hover { background: var(--paper); }
.sb:active { transform: translate(2px, 2px); box-shadow: none; }
.sb[aria-current="step"] { background: var(--ink); color: var(--white); }
.sb-n {
  display: inline-grid;
  place-content: center;
  width: 30px; height: 30px;
  background: var(--acc);
  color: var(--acc-ink);
  border: var(--line);
  font-family: var(--display);
  font-size: 0.9375rem;
  line-height: 1;
}
.sb[aria-current="step"] .sb-n { border-color: var(--white); }
.sb-ok { display: none; }
.sb.is-ok .sb-ok {
  display: inline-grid;
  place-content: center;
  width: 18px; height: 18px;
  background: var(--lime);
  border: var(--line);
}
.sb.is-ok .sb-ok::before {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg);
}

/* ---------- steps ---------- */

.step {
  margin: 20px 4px 0 0;
  padding: 26px 16px 22px;
  scroll-margin-top: calc(var(--bar-h) + 12px);
  box-shadow: inset 0 8px 0 var(--acc), var(--hard);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.num {
  flex: none;
  display: inline-grid;
  place-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  background: var(--acc);
  color: var(--acc-ink);
  border: var(--line);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1;
}

.step h3, .unlock h2, .summary-h {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.help {
  margin: 10px 0 16px;
  color: var(--ink-2);
  font-size: 1rem;
}
.help.small { font-size: 0.9375rem; margin: 6px 0 12px; }

.lbl, .lbl-head {
  display: block;
  margin: 0 0 8px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
}

/* ---------- controls ---------- */

.field {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zoom */
  color: var(--ink);
  background: var(--white);
  border: var(--line);
  border-radius: 0;
}
textarea.field { resize: vertical; min-height: 112px; line-height: 1.5; }
.field::placeholder { color: var(--ink-2); opacity: 1; }
.field[aria-invalid="true"] { border-color: var(--magenta); box-shadow: inset 6px 0 0 var(--magenta); padding-left: 18px; }

select.field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("select-arrow.svg");
  background-position: right 16px center;
  background-size: 14px 9px;
  background-repeat: no-repeat;
}

input[type="number"].field { -moz-appearance: textfield; appearance: textfield; }
input[type="number"].field::-webkit-inner-spin-button,
input[type="number"].field::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.field-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.count {
  margin: 8px 0 0;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.count.is-zero { font-weight: 600; color: var(--ink-2); }

.draft-note {
  margin: 8px 0 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink-2);
  text-align: right;
}
.draft-note:empty { display: none; }

.bad-lines {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-weight: 600;
  color: var(--magenta);
}
.bad-lines:empty { display: none; }
.bad-lines li { padding: 2px 0; overflow-wrap: anywhere; }
.bad-lines li code { color: var(--magenta); border-color: var(--magenta); }

.err {
  margin: 8px 0 0;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--magenta);
  overflow-wrap: anywhere;
}
.err:empty { display: none; }

.ok {
  margin: 8px 0 0;
  font-family: var(--ui);
  font-weight: 700;
  color: var(--ink);
}
.ok:empty { display: none; }
.ok.sent {
  margin: 20px 4px 0 0;
  padding: 14px 14px 14px 26px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--lime), var(--hard);
}

/* checkbox / radio rows */

fieldset.choices {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
fieldset.choices > legend { padding: 0; }

.choice, .check-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  margin: 0 2px 10px 0;
  border: var(--line);
  background: var(--white);
  cursor: pointer;
  font-family: var(--ui);
}
.choice:hover { background: var(--paper); }
.choice:has(input:checked) { background: var(--acc); color: var(--acc-ink); box-shadow: var(--hard-sm); }
.choices[aria-invalid="true"] .choice { border-color: var(--magenta); }

.check-line { border: 0; padding: 0; margin: 16px 0 20px; min-height: 48px; background: none; font-weight: 600; }

.choice-text { flex: 1; min-width: 0; font-weight: 600; }
.choice-note {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.choice:has(input:checked) .choice-note { color: var(--acc-ink); }
.spec {
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

input[type="checkbox"], input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 26px; height: 26px;
  margin: 0;
  border: var(--line);
  border-radius: 0;
  background: var(--white);
  display: grid;
  place-content: center;
  cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background: var(--ink); }
input[type="checkbox"]:checked::before {
  content: "";
  width: 12px; height: 6px;
  border-left: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
  transform: translateY(-2px) rotate(-45deg);
}
input[type="radio"]:checked { box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 13px var(--ink); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.sub-fields {
  margin: -10px 2px 10px 0;
  padding: 16px 14px 6px;
  border: var(--line);
  border-top: 0;
  background: var(--paper);
}
.sub-fields .lbl { margin-top: 4px; }
.sub-fields .err + .lbl, .sub-fields .field + .lbl { margin-top: 16px; }

.note {
  margin: 14px 0 0;
  padding: 14px 16px 14px 26px;
  background: var(--paper);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--orange);
}
.note p { margin: 0 0 6px; }
.note p:last-child { margin: 0; color: var(--ink-2); }
.note strong { font-family: var(--ui); font-weight: 700; }

/* brief chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  margin: 0 0 18px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--white);
  border: var(--line);
  border-radius: 0;
  box-shadow: var(--hard-sm);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}
.chip-btn::before { content: "+"; font-weight: 700; }
.chip-btn:hover { background: var(--paper); }
.chip-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.chip-btn.is-used { background: var(--magenta); color: var(--white); }

.lbl-gap { margin-top: 4px; }
.brief-field { min-height: 200px; }

/* details */

.details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  cursor: pointer;
}
.details > summary::-webkit-details-marker { display: none; }
.details > summary::after,
.brief-view > summary::after {
  content: "+";
  margin-left: auto;
  display: inline-grid;
  place-content: center;
  width: 36px; height: 36px;
  border: var(--line);
  background: var(--white);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink);
}
.details[open] > summary::after,
.brief-view[open] > summary::after { content: "\2212"; background: var(--lime); }
.opt { font-family: var(--ui); font-weight: 600; font-size: 0.875rem; color: var(--ink-2); }
.details .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
  margin-top: 4px;
}
.details .cell { margin-bottom: 16px; }
@media (min-width: 560px) {
  .details .grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- buttons ---------- */

button { font: inherit; }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 4px);
  min-height: 56px;
  margin: 0 4px 4px 0;
  padding: 10px 20px;
  border: var(--line);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--hard);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
}
.btn-primary:hover { background: var(--lime); color: var(--ink); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: var(--hard-sm); }
.btn-primary:disabled { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); box-shadow: none; transform: none; cursor: progress; }

.btn-go {
  min-height: 72px;
  margin-top: 8px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0;
}
.btn-go:hover { background: var(--orange); color: var(--ink); }
.btn-mid { min-height: 56px; }

.btn-outline, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--white);
  border: var(--line);
  border-radius: 0;
  box-shadow: var(--hard-sm);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline { width: calc(100% - 2px); }
.btn-outline:hover, .btn-ghost:hover { background: var(--lime); }
.btn-outline:active, .btn-ghost:active, .btn-danger:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-small { min-width: 48px; padding: 8px 14px; }
.btn-danger { border-color: var(--magenta); color: var(--magenta); box-shadow: 2px 2px 0 var(--magenta); }
.btn-danger:hover { background: var(--magenta); color: var(--white); }
.btn-danger:disabled, .btn-ghost:disabled { cursor: progress; }

.form-err { margin-bottom: 12px; }

/* ---------- status ---------- */

.status { padding-top: 16px; }

.status-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.status-nav .chip { margin-left: auto; }

.status-head { margin-bottom: 16px; }
.status-head .lbl-head { margin-bottom: 0; color: var(--ink-2); }

.job-id {
  margin: 0;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.job-created { margin: 2px 0 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.chip {
  margin: 0;
  flex: none;
  padding: 6px 12px;
  border: var(--line);
  background: var(--white);
  box-shadow: var(--hard-sm);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
  white-space: nowrap;
}
.chip.s-queued { background: var(--blue); color: var(--white); }
.chip.s-running, .chip.s-failed { background: var(--magenta); color: var(--white); }
.chip.s-done { background: var(--lime); }
.chip.s-cancelled { color: var(--ink-2); }

.banner {
  margin: 0 4px 16px 0;
  padding: 14px 16px 14px 28px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 12px 0 0 var(--lime), var(--hard-sm);
  font-family: var(--ui);
  font-weight: 600;
}
.banner.is-hot { box-shadow: inset 12px 0 0 var(--magenta), var(--hard-sm); }

.reconnect { margin: 0 0 12px; font-family: var(--ui); font-weight: 700; color: var(--ink-2); }

.meter {
  position: relative;
  margin: 0 4px 4px 0;
  padding: 20px 16px 18px;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--hard);
}

.meter-top {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  min-width: 0;
}

.pct {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 4.25rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  flex: none;
}
.status[data-state="failed"] .pct { color: var(--magenta); }
.status[data-state="queued"] .pct,
.status[data-state="cancelled"] .pct { color: var(--ink-2); }

.stage-now {
  margin: 0;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The segmented bar. */
.segbar {
  display: grid;
  grid-template-columns: repeat(var(--segs, 9), 1fr);
  gap: 5px;
  height: 48px;
}
.seg {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: var(--line);
}
.seg.done { background: var(--lime); }
.seg.skipped { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--white) 2px 7px); }
.seg.active {
  background-color: var(--magenta);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px);
  background-size: 17px 17px;
  animation: stripes 0.8s linear infinite;
}
.seg.failed { background: var(--white); border-color: var(--magenta); box-shadow: inset 0 0 0 3px var(--magenta); }
.seg.stopped { background: var(--white); border-style: dashed; }

@keyframes stripes { to { background-position: 17px 0; } }

.msg {
  margin: 16px 0 0;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}
.msg:empty { display: none; }
.eta {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 10px;
  background: var(--paper);
  border: var(--line);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.eta:empty { display: none; }

.block { margin-top: 22px; }

.failed {
  margin-right: 4px;
  padding: 0 16px 18px;
  background: var(--white);
  border: 2px solid var(--magenta);
  box-shadow: 4px 4px 0 var(--magenta);
}
.failed .lbl-head.hot {
  margin: 0 -16px 14px;
  padding: 8px 16px;
  background: var(--magenta);
  color: var(--white);
  font-weight: 700;
}
.fail-text { margin: 0 0 16px; font-size: 1.0625rem; overflow-wrap: anywhere; white-space: pre-wrap; }

.done .lbl-head, .brief-check .lbl-head, .list-h {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.downloads { list-style: none; margin: 0; padding: 0; }
.downloads li { margin-bottom: 14px; }
.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  margin-right: 4px;
  padding: 12px 14px 12px 16px;
  background: var(--lime);
  color: var(--ink);
  border: var(--line);
  box-shadow: var(--hard);
  text-decoration: none;
}
.dl:hover { background: var(--orange); }
.dl:active { transform: translate(2px, 2px); box-shadow: var(--hard-sm); }
.dl-main { display: flex; flex-direction: column; min-width: 0; }
.dl-label { font-family: var(--display); font-size: 1.25rem; line-height: 1.2; }
.dl-meta { font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.dl-go {
  flex: none;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* brief check */
.brief-check { margin-bottom: 26px; }
.bc-summary {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  background: var(--lime);
  border: var(--line);
  box-shadow: var(--hard-sm);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bc-summary.has-miss { background: var(--magenta); color: var(--white); }
.bc-na { font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.bc-list { list-style: none; margin: 0 4px 0 0; padding: 0; background: var(--white); border: var(--line); box-shadow: var(--hard); }
.bc-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 2px 12px;
  padding: 12px 14px;
  border-top: 2px solid var(--ink);
}
.bc-list li:first-child { border-top: 0; }
.bc-mark {
  grid-row: 1 / span 2;
  width: 26px; height: 26px;
  display: grid;
  place-content: center;
  position: relative;
  border: var(--line);
  background: var(--white);
}
.bc-item { font-family: var(--ui); font-weight: 600; overflow-wrap: anywhere; }
.bc-how { color: var(--ink-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.bc-how:empty { display: none; }
.bc-list li.met .bc-mark { background: var(--lime); }
.bc-list li.met .bc-mark::before {
  content: "";
  width: 11px; height: 5px;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg);
}
.bc-list li.not_met .bc-mark { background: var(--magenta); }
.bc-list li.not_met .bc-mark::before,
.bc-list li.not_met .bc-mark::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 3px;
  background: var(--white);
  transform: translate(-50%, -50%) rotate(45deg);
}
.bc-list li.not_met .bc-mark::after { transform: translate(-50%, -50%) rotate(-45deg); }
.bc-list li.not_met .bc-item { color: var(--magenta); }
.bc-list li.na .bc-mark::before { content: ""; width: 12px; height: 3px; background: var(--ink); }
.bc-list li.na .bc-item { color: var(--ink-2); }
#bc-warn { color: var(--ink); font-family: var(--ui); font-weight: 600; margin-top: 14px; }

/* quality checkpoints */
.quality {
  margin-right: 4px;
  padding: 16px 14px 14px;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--hard);
}
.q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.quality .lbl-head { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.q-first {
  margin: 0;
  padding: 3px 10px;
  background: var(--lime);
  border: var(--line);
  box-shadow: var(--hard-sm);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.875rem;
  transform: rotate(-2deg);
}
.q-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
@media (min-width: 560px) { .q-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.q-strip li { min-width: 0; display: flex; }
.q-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 6px 10px 6px 6px;
  background: var(--white);
  color: var(--ink-2);
  border: var(--line);
  border-radius: 28px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.q-pill:hover { background: var(--paper); }
.q-pill[aria-expanded="true"] { box-shadow: var(--hard-sm); outline: 3px solid var(--ink); outline-offset: -5px; }
.q-pill[aria-expanded="true"]:focus-visible { outline-color: var(--blue); }
.q-label { min-width: 0; overflow-wrap: anywhere; }
.q-mark {
  position: relative;
  flex: none;
  display: grid;
  place-content: center;
  width: 30px; height: 30px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.8125rem;
}
.q-pill.s-active { color: var(--ink); }
.q-pill.s-active .q-mark { background: var(--magenta); color: var(--white); animation: blink 1.2s steps(2, start) infinite; }
.q-pill.s-pass { background: var(--lime); color: var(--ink); }
.q-pill.s-pass .q-mark, .q-pill.s-fail .q-mark { font-size: 0; }
.q-pill.s-pass .q-mark { background: var(--ink); border-color: var(--ink); }
.q-pill.s-pass .q-mark::before {
  content: "";
  width: 11px; height: 5px;
  border-left: 3px solid var(--lime);
  border-bottom: 3px solid var(--lime);
  transform: translateY(-1px) rotate(-45deg);
}
.q-pill.s-fail { border-color: var(--magenta); color: var(--magenta); box-shadow: inset 0 0 0 2px var(--magenta); }
.q-pill.s-fail .q-mark { background: var(--magenta); border-color: var(--magenta); }
.q-pill.s-fail .q-mark::before { content: "!"; font-family: var(--display); font-size: 1rem; color: var(--white); }

.q-panel {
  margin: 12px 0 0;
  padding: 12px 14px 14px 22px;
  background: var(--paper);
  border: var(--line);
  box-shadow: inset 8px 0 0 var(--ink-2);
}
.q-panel.s-pass { box-shadow: inset 8px 0 0 var(--lime); }
.q-panel.s-active { box-shadow: inset 8px 0 0 var(--magenta); }
.q-panel.s-fail { box-shadow: inset 8px 0 0 var(--magenta); }
.q-panel-h { margin: 0 0 8px; font-family: var(--ui); font-weight: 700; font-size: 1rem; }
.q-panel-state { display: inline-block; margin-left: 4px; padding: 1px 8px; background: var(--white); border: 2px solid var(--ink); font-size: 0.8125rem; }
.q-checks { list-style: none; margin: 0; padding: 0; }
.q-checks li { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; padding: 6px 0; border-top: 1px dashed var(--ink-2); }
.q-checks li:first-child { border-top: 0; }
.q-cmark { grid-row: 1 / span 2; position: relative; width: 20px; height: 20px; margin-top: 2px; border: var(--line); background: var(--white); }
.q-cname { font-family: var(--ui); font-weight: 600; overflow-wrap: anywhere; }
.q-cnote { color: var(--ink-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.q-cnote:empty { display: none; }
.c-pass .q-cmark { background: var(--lime); }
.c-pass .q-cmark::before { content: ""; position: absolute; left: 4px; top: 3px; width: 8px; height: 4px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.c-warn .q-cmark { background: var(--white); }
.c-warn .q-cmark::before { content: ""; position: absolute; left: 3px; right: 3px; top: 7px; height: 2px; background: var(--ink); }
.c-fail .q-cmark { background: var(--magenta); border-color: var(--magenta); }
.c-fail .q-cmark::before { content: "!"; position: absolute; inset: 0; display: grid; place-content: center; font-family: var(--display); font-size: 0.75rem; color: var(--white); }
.c-fail .q-cname { color: var(--magenta); }
.q-empty { margin: 0; color: var(--ink-2); }
.q-calm { margin: 12px 0 0; font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); }

.recipe-status .lbl-head { font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin-bottom: 10px; }
.rs-vibe { display: inline-block; margin: 0 0 10px; padding: 3px 10px; background: var(--ink); color: var(--lime); font-family: var(--ui); font-weight: 700; font-size: 0.9375rem; }
.recipe-status .help.small { margin-top: 12px; }

/* the brief, collapsed */
.brief-view {
  margin: 22px 4px 0 0;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--hard-sm);
}
.brief-view > summary {
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 10px 0 16px;
  cursor: pointer;
}
.brief-view > summary::-webkit-details-marker { display: none; }
.brief-view > summary .lbl-head { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.125rem; }
.brief-text {
  margin: 0;
  padding: 14px 16px 16px;
  border-top: var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* stage list */
.list-h { margin-top: 26px; }
.stages { list-style: none; margin: 0 4px 0 0; padding: 0; background: var(--white); border: var(--line); box-shadow: var(--hard-sm); }
.stages li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 14px;
  border-top: 2px solid var(--ink);
  color: var(--ink-2);
}
.stages li:first-child { border-top: 0; }
.stage-mark {
  flex: none;
  width: 24px; height: 24px;
  border: var(--line);
  background: var(--white);
  display: grid;
  place-content: center;
}
.stages li.done { color: var(--ink); }
.stages li.done .stage-mark { background: var(--lime); }
.stages li.done .stage-mark::before {
  content: "";
  width: 10px; height: 5px;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg);
}
.stages li.active { color: var(--ink); font-family: var(--ui); font-weight: 700; }
.stages li.active .stage-mark { background: var(--magenta); animation: blink 1.2s steps(2, start) infinite; }
.stages li.skipped { text-decoration: line-through; }
.stages li.skipped .stage-mark { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--white) 2px 5px); }
.stages li.failed { color: var(--magenta); font-family: var(--ui); font-weight: 700; }
.stages li.failed .stage-mark { border-color: var(--magenta); }
.stage-key {
  margin-left: auto;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.stages li.active .stage-key { padding: 2px 8px; background: var(--magenta); color: var(--white); }
@keyframes blink { to { opacity: 0.45; } }

.status-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  margin-top: 26px;
}

/* ---------- recent ---------- */

.recent { margin-top: 44px; scroll-margin-top: 12px; }
.recent:focus { outline: none; }
.recent-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.recent-head .lbl-head { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.375rem; }
.recent-list { list-style: none; margin: 0 4px 0 0; padding: 0; background: var(--white); border: var(--line); box-shadow: var(--hard); }
.recent-list:empty { display: none; }
.recent-list li { border-top: 2px solid var(--ink); }
.recent-list li:first-child { border-top: 0; }
.recent-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "id state" "time state";
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 62px;
  padding: 8px 14px;
  background: none;
  border: 0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.recent-item:hover { background: var(--paper); }
.recent-item[aria-current="true"] { box-shadow: inset 10px 0 0 var(--lime); padding-left: 24px; }
.r-id { grid-area: id; font-family: var(--ui); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.r-time { grid-area: time; color: var(--ink-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.recent-item .chip { grid-area: state; font-size: 0.875rem; padding: 3px 9px; box-shadow: none; }

/* ---------- footer ---------- */

.foot {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px var(--gutter) 32px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.foot p { margin: 0; }

/* ---------- the plan (owner view) ---------- */
.plan-block { margin: 22px 4px 0 0; padding: 16px 16px 18px 26px; background: var(--white); border: var(--line); box-shadow: inset 10px 0 0 var(--blue), var(--hard); }
.plan-block .lbl-head { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.plan-eta { margin: 0 0 10px; font-family: var(--ui); font-weight: 600; color: var(--ink-2); }
.plan-beats, .plan-dec { margin: 0; padding-left: 1.2em; }
.plan-beats li, .plan-dec li { padding: 4px 0; overflow-wrap: anywhere; }
.plan-sub { margin: 14px 0 6px; font-family: var(--ui); font-weight: 700; font-size: 1rem; }
.plan-k { font-family: var(--ui); font-weight: 700; }

/* ---------- computer layout (wide screens); the phone layout above stays as it is ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .top, .wrap, .foot { max-width: 1320px; }
  .top { padding-top: 34px; }
  .logo { font-size: 2.75rem; }
  .wrap > .panel { max-width: 560px; margin: 48px auto 4px; }

  /* Owner page: steps on the left, the edit in the middle, your videos on the right. */
  .pg-owner #app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "notice notice" "main side";
    column-gap: 44px;
    align-items: start;
  }
  .pg-owner #notice { grid-area: notice; }
  .pg-owner #form-view, .pg-owner #status-view { grid-area: main; min-width: 0; }
  .pg-owner .recent {
    grid-area: side;
    position: sticky;
    top: 24px;
    margin-top: 20px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 0 4px 6px 0;
  }
  .pg-owner #form-view {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: 32px;
    align-items: start;
  }
  .pg-owner #stepbar {
    position: sticky;
    top: 24px;
    margin: 20px 0 0;
    padding: 0;
    background: none;
    border-bottom: 0;
    overflow: visible;
  }
  .pg-owner #stepbar .sb-list { flex-direction: column; width: auto; gap: 10px; padding: 0 4px 4px 0; }
  .pg-owner #stepbar .sb { display: flex; width: 100%; }
  .pg-owner .step { scroll-margin-top: 24px; }
  .pg-owner .status { padding-top: 20px; }
  .pg-owner .status-actions { flex-direction: row; align-items: center; }
  .pg-owner .status-actions .btn-primary { width: auto; padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 380px) {
  .logo { font-size: 1.875rem; }
  .pct { font-size: 3.5rem; }
  .btn-go { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- customer pages and revision requests (owner view) ---------- */

.cust-pages { margin-bottom: 26px; }
.cp-list { list-style: none; margin: 0 4px 0 0; padding: 0; background: var(--white); border: var(--line); box-shadow: var(--hard); }
.cp-row { padding: 14px 14px 16px; border-top: 2px solid var(--ink); }
.cp-row:first-child { border-top: 0; }
.cp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; }
.cp-version { font-family: var(--display); font-size: 1.125rem; }
.cp-rounds { font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); }
.cp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-actions .btn-primary.btn-small { min-height: 48px; padding: 8px 16px; width: auto; font-size: 1rem; }
.cp-actions .btn-ghost { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }

.asked {
  margin: 0 4px 22px 0;
  padding: 16px 16px 18px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--orange), var(--hard);
  padding-left: 26px;
}
.asked .lbl-head { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.asked-of { margin: 0 0 12px; font-family: var(--ui); font-weight: 600; color: var(--ink-2); }
.asked-list { list-style: none; margin: 0; padding: 0; }
.asked-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px dashed var(--ink-2); }
.asked-list li:first-child { border-top: 0; }
.asked-at {
  font-family: var(--ui); font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 1px 8px; background: var(--orange); color: var(--ink); border: var(--line);
}
.asked-text, .asked-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.asked-note { margin: 12px 0 0; padding-top: 10px; border-top: 2px solid var(--ink); }
.asked-files { margin: 10px 0 0; font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; overflow-wrap: anywhere; }
.r-kind {
  display: block; margin-top: 2px;
  font-family: var(--ui); font-weight: 600; font-size: 0.875rem; color: var(--ink-2);
}

/* ---------- live dashboard (owner only): what the studio computer is doing ---------- */

.top-btns { display: flex; gap: 8px; }
.top-btns .btn-ghost[aria-current="page"] { background: var(--ink); color: var(--white); }

.dash-link {
  display: block;
  margin: 0 4px 22px 0;
  padding: 12px 14px 14px 26px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--magenta), var(--hard);
  color: var(--ink);
  text-decoration: none;
}
.dash-link:hover { background: var(--lime); }
.dash-link[aria-current="page"] { box-shadow: inset 10px 0 0 var(--lime), var(--hard-sm); }
.dash-link-t { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.25rem; line-height: 1.2; }
.dash-link-s { display: block; margin-top: 4px; font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); }
.dash-link-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--magenta); border: 2px solid var(--ink); animation: d-pulse 1.6s ease-in-out infinite; }

.dash { padding-top: 16px; }
.dash-head { margin-bottom: 14px; }
.dash-head .lbl-head { margin-bottom: 0; color: var(--ink-2); }
.dash-title { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.15; }
.d-live {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 5px 12px; background: var(--ink); color: var(--white);
  font-family: var(--ui); font-weight: 700; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.d-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--ink-2); }
.d-live.is-live .d-dot { background: var(--lime); animation: d-pulse 1.2s ease-in-out infinite; }
.d-live.is-stale { background: var(--magenta); }
.d-live.is-stale .d-dot { background: var(--white); }
.d-worker.w-running { background: var(--lime); }
.d-worker.w-paused { background: var(--orange); }
.d-worker-note:empty { display: none; }

.dcard {
  margin: 0 4px 22px 0;
  padding: 16px 16px 18px 26px;
  background: var(--white);
  border: var(--line);
  box-shadow: inset 10px 0 0 var(--acc), var(--hard);
  min-width: 0;
}
.dcard-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.d-tag { display: inline-block; padding: 2px 8px; border: var(--line); background: var(--paper); font-family: var(--ui); font-weight: 700; font-size: 0.8125rem; line-height: 1.4; color: var(--ink); }
.d-empty { margin: 4px 0 0; font-family: var(--ui); font-weight: 600; color: var(--ink-2); }

/* the job */
.d-job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.d-job-id { min-width: 0; }
.d-job .dcard-h { margin-bottom: 4px; }
.d-jobid { margin: 0; font-family: var(--ui); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.d-client { margin: 2px 0 0; color: var(--ink-2); font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; overflow-wrap: anywhere; }
.d-client:empty { display: none; }
.d-pct { margin: 0; font-family: var(--display); font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.d-bar { margin: 12px 0 14px; height: 22px; background: var(--paper); border: var(--line); overflow: hidden; }
.d-bar > b {
  display: block; height: 100%; width: 0; border-right: var(--line);
  background: repeating-linear-gradient(135deg, var(--lime) 0 12px, #b2e600 12px 24px); background-size: 34px 34px;
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1); animation: d-march 1.2s linear infinite;
}
.d-pipe { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-st {
  position: relative; min-width: 0; min-height: 84px; padding: 8px 8px 7px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--white); border: var(--line);
  transition: background-color .4s, transform .4s, box-shadow .4s;
}
.d-st .n { width: 24px; height: 24px; display: grid; place-content: center; border: var(--line); background: var(--paper); font-family: var(--display); font-size: 0.8125rem; }
.d-st .l { font-family: var(--ui); font-weight: 700; font-size: 0.8125rem; line-height: 1.2; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.d-st .s { margin-top: auto; font-family: var(--ui); font-weight: 600; font-size: 0.75rem; color: var(--ink-2); }
.d-st.done { background: var(--lime); }
.d-st.done .n { background: var(--ink); color: var(--lime); }
.d-st.skipped { background: repeating-linear-gradient(135deg, var(--white) 0 6px, #e7e4dc 6px 12px); }
.d-st.skipped .l { text-decoration: line-through; }
.d-st.active {
  color: var(--white); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink);
  background-color: var(--magenta);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px);
  background-size: 17px 17px; animation: stripes 0.9s linear infinite;
}
.d-st.active .n { background: var(--white); color: var(--magenta); }
.d-st.active .s { color: var(--white); }
.d-now { padding-top: 12px; border-top: 2px solid var(--ink); }
.d-now .lbl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.d-now-msg { margin: 0; font-family: var(--ui); font-weight: 700; font-size: 1.125rem; line-height: 1.35; overflow-wrap: anywhere; }
.d-dots i { display: inline-block; width: 7px; height: 7px; margin-left: 4px; background: var(--magenta); animation: d-bob 1s ease-in-out infinite; }
.d-dots i:nth-child(2) { animation-delay: .15s; }
.d-dots i:nth-child(3) { animation-delay: .3s; }
.d-now-step { margin: 8px 0 0; color: var(--ink-2); font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; overflow-wrap: anywhere; }
.d-now-step:empty { display: none; }
.d-mini { height: 10px; margin-top: 8px; border: var(--line); background: var(--paper); overflow: hidden; }
.d-mini b { display: block; height: 100%; width: 0; background: var(--magenta); transition: width .8s; }
.d-log { margin: 8px 0 0; padding: 8px 10px; background: var(--ink); color: var(--lime); font-family: Consolas, monospace; font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* every step */
.d-feed { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; overscroll-behavior: contain; }
.d-f { display: grid; grid-template-columns: 42px 54px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 2px; border-top: 1px dashed var(--ink-2); }
.d-f:first-child { border-top: 0; }
.d-f.is-new { animation: d-drop .5s cubic-bezier(.2, .8, .2, 1); }
.d-f-n { padding-top: 2px; font-family: var(--ui); font-weight: 600; font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.d-f-tag { padding: 1px 3px; border: var(--line); text-align: center; font-family: var(--ui); font-weight: 700; font-size: 0.6875rem; text-transform: uppercase; background: var(--paper); }
.d-f-tx { font-size: 0.9375rem; overflow-wrap: anywhere; }
.d-f.say .d-f-tx { font-family: var(--ui); font-weight: 600; }
.d-f-tag.say { background: var(--magenta); color: var(--white); }
.d-f-tag.run { background: var(--ink); color: var(--lime); }
.d-f-tag.look { background: var(--blue); color: var(--white); }
.d-f-tag.write { background: var(--orange); }
.d-f-tag.skill, .d-f-tag.plan { background: var(--lime); }
.d-f-tag.web { background: var(--ink-2); color: var(--white); }

/* the machine */
.d-gpu-name { margin: -4px 0 12px; font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); overflow-wrap: anywhere; }
.d-meters { display: grid; gap: 10px; }
.d-meter { display: grid; grid-template-columns: 92px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-family: var(--ui); font-weight: 700; font-size: 0.875rem; }
.d-m-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-gauge { display: block; height: 16px; border: var(--line); background: var(--paper); overflow: hidden; }
.d-gauge b { display: block; height: 100%; width: 0; background: var(--blue); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.d-gauge.g-cpu b { background: var(--magenta); }
.d-gauge.g-gpu b { background: var(--orange); }
.d-gauge.g-enc b { background: var(--lime); }
.d-apps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.d-app {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: var(--line); background: var(--paper); color: var(--ink-2);
  font-family: var(--ui); font-weight: 700; font-size: 0.875rem; transition: background-color .3s, color .3s, box-shadow .3s;
}
.d-app i { width: 10px; height: 10px; flex: none; border: 2px solid var(--ink); background: var(--white); }
.d-app.on { background: var(--white); color: var(--ink); box-shadow: var(--hard-sm); }
.d-app.on i { background: var(--lime); animation: d-pulse 1.2s ease-in-out infinite; }
.d-app.premiere.on { background: #2b0a3d; color: #e9a6ff; }
.d-app.envato.on { background: #82b541; color: var(--ink); }

/* quality checkpoints */
.d-q { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.d-qs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: var(--line); background: var(--white); font-family: var(--ui); font-weight: 600; font-size: 0.9375rem; }
.d-qs-c { margin-left: auto; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.d-qs.pass { background: var(--lime); }
.d-qs.fail { background: var(--magenta); color: var(--white); }
.d-qs.active { box-shadow: inset 6px 0 0 var(--magenta); }

/* treatment of findings: status colours (reported = open, triaged = diagnosed, fixed, guarded = a check stops it coming back) */
.t-reported { --t: var(--magenta); --t-ink: var(--white); }
.t-triaged { --t: var(--orange); --t-ink: var(--ink); }
.t-fixed { --t: var(--lime); --t-ink: var(--ink); }
.t-guarded { --t: var(--blue); --t-ink: var(--white); }
.t-closed { --t: var(--paper); --t-ink: var(--ink); }
.d-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.d-filter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px;
  border: var(--line); background: var(--white); box-shadow: inset 0 -6px 0 var(--t, var(--paper)), var(--hard-sm); color: var(--ink);
  font-family: var(--ui); font-weight: 700; font-size: 0.9375rem; cursor: pointer;
}
.d-filter:hover { background: var(--paper); }
.d-filter:active { transform: translate(2px, 2px); box-shadow: inset 0 -6px 0 var(--t, var(--paper)); }
.d-filter[aria-pressed="true"] { background: var(--ink); color: var(--white); box-shadow: inset 0 -6px 0 var(--t, var(--ink)), var(--hard-sm); }
.d-filter-n { min-width: 1.6em; padding: 0 5px; border: 2px solid currentColor; text-align: center; font-variant-numeric: tabular-nums; font-size: 0.8125rem; }
.d-treat-list { list-style: none; margin: 0; padding: 0; max-height: 620px; overflow-y: auto; overscroll-behavior: contain; border-top: 2px solid var(--ink); }
.d-t { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "id st cl" "sy sy sy"; gap: 4px 10px; align-items: center; padding: 10px 2px; border-bottom: 1px dashed var(--ink-2); }
.d-t-id { grid-area: id; font-family: var(--display); font-size: 1rem; font-variant-numeric: tabular-nums; }
.d-t-st { grid-area: st; padding: 1px 8px; border: var(--line); background: var(--t, var(--paper)); color: var(--t-ink, var(--ink)); font-family: var(--ui); font-weight: 700; font-size: 0.8125rem; }
.d-t-cl { grid-area: cl; font-family: var(--ui); font-weight: 600; font-size: 0.8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.d-t-sy { grid-area: sy; font-size: 0.9375rem; overflow-wrap: anywhere; }

/* findings register (its Markdown drawn as plain blocks) */
.d-reg-body { max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 4px 0; font-size: 0.9375rem; }
.d-reg-body .md-h { margin: 18px 0 8px; font-family: var(--ui); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.d-reg-body h4.md-h { margin-top: 4px; font-family: var(--display); font-weight: 400; font-size: 1.125rem; }
.d-reg-body h5.md-h { font-size: 1rem; padding-top: 10px; border-top: 2px solid var(--ink); }
.d-reg-body h6.md-h { font-size: 0.9375rem; }
.d-reg-body .md-p { margin: 0 0 10px; overflow-wrap: anywhere; }
.d-reg-body .md-list { margin: 0 0 10px; padding-left: 1.3em; }
.d-reg-body .md-list li { padding: 2px 0; overflow-wrap: anywhere; }
.d-reg-body .md-pre { margin: 0 0 10px; padding: 8px 10px; background: var(--ink); color: var(--lime); font-family: Consolas, monospace; font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.md-table { margin: 0 0 12px; overflow-x: auto; border: var(--line); }
.md-table table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.875rem; }
.md-table th, .md-table td { padding: 6px 8px; border-bottom: 1px solid var(--ink-2); border-right: 1px solid #d8d4ca; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.md-table th { background: var(--paper); font-family: var(--ui); font-weight: 700; border-bottom: 2px solid var(--ink); }
.md-table tr:last-child td { border-bottom: 0; }

@keyframes d-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.78); opacity: .6; } }
@keyframes d-march { to { background-position: 34px 0; } }
@keyframes d-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes d-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 560px) {
  .d-pipe { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .pg-owner #dash-view { grid-area: main; min-width: 0; }
  .pg-owner .dash { padding-top: 20px; }
  .dash-title { font-size: 2.25rem; }
  .dash-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 22px; align-items: start; }
  .d-pipe { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 7px; }
  .d-st { min-height: 104px; padding: 7px 6px 6px; }
  .d-st .l { font-size: 0.75rem; }
  .d-feed { max-height: 720px; }
}
@media (max-width: 380px) {
  .d-meter { grid-template-columns: 74px minmax(0, 1fr) 84px; gap: 8px; font-size: 0.8125rem; }
  .d-pct { font-size: 2.5rem; }
}
