/* show-port, the look of prototype A: owner DNA, direct ("full volume, black and white").
   Black ground, white type; the banks' own colours (as stored in the show) are the only colour on the desks.
   Archivo (variable, wght 100-900, wdth 62-125), SIL OFL 1.1: OFL-archivo.txt. */
@font-face {
  font-family: "Archivo";
  src: url(archivo-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ground: #0a0a0a;
  --panel: #141414;
  --panel-2: #1b1c1e;
  --panel-3: #232427;
  --line: rgba(255, 255, 255, .14);
  --text: #fff;
  --text-2: #a3a3a3;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-wipe: cubic-bezier(.7, 0, .2, 1);
  --gutter: clamp(16px, 3.6vw, 56px);
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-lift: 0 30px 60px rgba(0, 0, 0, .6);
  --carry: #fff;
  --dock-h: 120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
html.on-desk { scroll-padding-bottom: calc(var(--dock-h) + 16px); }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.55; font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
body.is-carrying, body.is-carrying * { cursor: grabbing !important; }
body.is-carrying { user-select: none; -webkit-user-select: none; }
button, input, select { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 1px #000; }

/* ---------- type ---------- */
.label, .label-h {
  font-size: 12.5px; line-height: 1.3; font-weight: 700; font-stretch: 112%; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2);
}
.label-h { color: var(--text); margin: 28px 0 10px; }
.small { font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.line {
  font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .88; letter-spacing: -.02em;
  margin: 0; color: var(--text); overflow-wrap: normal;
}
.line-xl { font-size: clamp(3rem, min(9vw, 12vh), 8.5rem); }
.line-l { font-size: clamp(2.4rem, min(5.6vw, 8.5vh), 5.25rem); }
.line-m { font-size: clamp(2.1rem, 4vw, 3.6rem); }
/* word rise: each word in an overflow-hidden box (built by motion.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- frame ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; background: rgba(255, 255, 255, .08); }
.progress-bar { display: block; height: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(.2); }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter) 6px;
}
.brand { font-size: 20px; font-weight: 900; font-stretch: 75%; letter-spacing: .01em; }
.tool-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); text-align: right; max-width: 60ch; }
/* the light: red until the tool is ready, then green */
.tool-status::before { content: ""; flex: none; width: 10px; height: 10px; background: #ef4444; }
.tool-status.ready::before { background: #22c55e; }
main { flex: 1; display: flex; flex-direction: column; padding: 0 var(--gutter); min-width: 0; }
/* --bar-h (app.js barChanged): the Move bar's height while it is fixed to the screen, so the page's last items (Details,
   the downloads) can always scroll clear of it */
.foot { padding: 18px var(--gutter) calc(22px + var(--bar-h, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.privacy { font-size: 13px; color: var(--text-2); }

.screen { flex: 1; display: flex; flex-direction: column; min-width: 0; }
html.js-motion .pre { visibility: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; position: relative;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; font-size: 13.5px; line-height: 1.2;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn .arrow { display: inline-block; font-weight: 700; transition: transform .3s var(--ease-out); }
.btn:hover:not(:disabled) .arrow { transform: translateX(4px); }
.btn-arrow::after { content: "\2192"; display: inline-block; font-weight: 700; transition: transform .3s var(--ease-out); }
.btn-arrow:hover::after { transform: translateX(4px); }
.btn[aria-disabled="true"] { cursor: progress; }
.btn-primary { background: #fff; color: var(--ground); }
.btn-primary:hover:not(:disabled) { background: #dedede; }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn-outline:hover:not(:disabled) { background: #fff; color: var(--ground); }
.btn-quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); min-height: 44px; padding: 0 16px; font-size: 12px; }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px #fff; }
.btn-quiet[aria-pressed="true"] { background: #fff; color: var(--ground); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-s { min-height: 48px; padding: 0 16px; font-size: 12.5px; }
.btn-xl { min-height: 64px; padding: 0 30px; font-size: 15.5px; }
.btn-xxl { min-height: 72px; padding: 0 30px; font-size: 15.5px; text-align: left; }
.btn-ink { background: var(--ground); color: #fff; }
.btn-ink:hover { background: #333; }
.btn-ink-outline { background: transparent; color: var(--ground); box-shadow: inset 0 0 0 2px var(--ground); }
.btn-ink-outline:hover { background: var(--ground); color: #fff; }
.btn-roll { display: inline-grid; overflow: hidden; }
.btn-roll > * { grid-area: 1 / 1; white-space: nowrap; }
.btn.widening { overflow: hidden; justify-content: flex-start; white-space: nowrap; }
.btn.widening .btn-roll > * { justify-self: start; }
.textbtn {
  background: none; border: 0; padding: 12px 0; min-height: 48px; cursor: pointer; text-align: left;
  color: var(--text-2); font-size: 14.5px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .35);
}
.textbtn:hover { color: #fff; text-decoration-color: #fff; }

/* ---------- steps 1-2: cards and the drop panel ---------- */
.cards { display: flex; gap: 16px; }
.cards:empty { display: none; }
.cards:not(:empty) { margin: 6px 0 22px; }
.card {
  flex: 1 1 0; min-width: 0; background: var(--panel-2); padding: 16px 20px 16px;
  display: grid; gap: 6px; align-content: start; position: relative;
}
.card-name {
  font-weight: 800; font-stretch: 68%; line-height: 1.05; letter-spacing: 0; white-space: nowrap;
  font-size: clamp(1.3rem, 2.5vw, 2.25rem);
}
.card-sum { font-size: 13.5px; line-height: 1.4; color: var(--text-2); }
.card .textbtn { padding: 4px 0; min-height: 44px; font-size: 13.5px; justify-self: start; }
.card-bad { color: #fff; background: var(--panel-3); padding: 12px 14px; border-left: 3px solid #fff; font-size: 14.5px; }

#drop-line { margin: 10px 0 22px; text-wrap: balance; }
.drop-wrap { flex: 1; display: flex; min-height: 300px; perspective: 1400px; }
.drop {
  flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: transparent; border-radius: 2px; transition: box-shadow .45s var(--ease-out);
}
.drop::after { content: ""; flex: none; height: calc(clamp(3.5rem, 11vw, 9.5rem) * .62); }
.drop-back { position: absolute; inset: 0; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; z-index: 0; }
.drop.is-over { box-shadow: var(--shadow-lift); }
.drop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 24px 0; position: relative; z-index: 2; }
.drop-head .label, .drop-info, .drop-hint { transition: color .3s var(--ease-out); }
.drop-info { font-size: 13.5px; color: var(--text-2); text-align: right; }
.drop-centre {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px; position: relative; z-index: 2; min-height: 0;
}
.file-input:focus-visible + .file-button { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 1px #000; }
.drop-hint { font-size: 15px; color: var(--text-2); }
.pick-slot { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pick-slot:empty { display: none; }
.drop-centre .file-button { min-height: 76px; padding: 0 40px; font-size: 17px; }
.card-pick:empty, .tag-pick:empty, .desk-pick:empty { display: none; }
.card .file-button, .tag .file-button, .desk-head .file-button {
  background: none; color: var(--text-2); box-shadow: none; min-height: 44px; padding: 4px 0; font: inherit; font-size: 13.5px;
  letter-spacing: 0; text-transform: none; font-weight: 400; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, .35); justify-content: flex-start;
}
.card .file-button::after, .tag .file-button::after, .desk-head .file-button::after { content: none; }
.card .file-button:hover, .tag .file-button:hover, .desk-head .file-button:hover { color: #fff; background: none; text-decoration-color: #fff; }
.file-info .bad { color: #fff; }
.file-info details { margin-top: 6px; color: var(--text-2); }
.file-info summary { cursor: pointer; min-height: 32px; }
.card.card-bad { background: var(--panel-3); box-shadow: inset 3px 0 0 #fff; }
.drop-file {
  font-weight: 800; font-stretch: 68%; line-height: 1.05; white-space: nowrap;
  font-size: clamp(1.6rem, 4vw, 3.4rem); max-width: 100%;
}
.drop-error { max-width: 60ch; text-align: left; background: var(--panel-3); border-left: 3px solid #fff; padding: 14px 16px; font-size: 15px; }
.drop-error details { margin-top: 8px; color: var(--text-2); font-size: 13.5px; }
.drop-error summary { cursor: pointer; min-height: 32px; }

/* the seven bank colours: a thin key along the panel's foot that floods the panel while a file is over the page */
.hues { position: absolute; left: 0; right: 0; bottom: 0; top: 0; display: flex; z-index: 0; transform-origin: 50% 100%; transform: scaleY(.022); pointer-events: none; }
.hues span { flex: 1; background: var(--c); }
.drop.is-over .drop-head .label, .drop.is-over .drop-info, .drop.is-over .drop-hint { color: var(--ground); }
.drop.is-over .drop-centre .file-button { background: var(--ground); color: #fff; }

.marquee {
  --mq: clamp(3.5rem, 11vw, 9.5rem);
  position: relative; flex: none; height: calc(var(--mq) * .84); z-index: 1; pointer-events: none; margin-bottom: 1.6%;
  font-size: var(--mq); line-height: 1; font-weight: 900; font-stretch: 62%; text-transform: uppercase; letter-spacing: -.01em;
}
.mq-track { position: absolute; left: 0; top: -.06em; display: flex; white-space: nowrap; will-change: transform; }
.mq-item { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .22); padding-right: .3em; transition: -webkit-text-stroke-color .45s var(--ease-out); }
.drop.is-over .mq-item { -webkit-text-stroke-color: rgba(10, 10, 10, .55); }

.under-drop { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 10px; min-height: 48px; }
.relayout { background: var(--panel); padding: 18px 20px; margin-top: 8px; display: grid; gap: 10px; max-width: 640px; }
.relayout-list { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { display: flex; gap: 10px; align-items: center; font-size: 15.5px; min-height: 44px; }
.radio input, .check input { width: 20px; height: 20px; accent-color: #fff; flex: none; }

/* ---------- steps 3-6: desks ---------- */
.line-wrap { margin: 6px 0 16px; display: grid; gap: 12px; }
.sub-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 48px; }
.sub { font-size: 17px; line-height: 1.45; color: #fff; max-width: 70ch; flex: 1 1 420px; }
.sub .grip-i { display: inline-block; width: 10px; height: 14px; margin: 0 3px -1px; vertical-align: baseline;
  background: radial-gradient(circle, #fff 1.4px, transparent 1.6px) 0 0 / 5px 5px; }
.ask { display: grid; gap: 10px; margin: 0; font-size: 15px; }
.ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.ask-mode { border: 0; padding: 0; min-width: 0; }
.ask-mode legend { padding: 0; margin-bottom: 2px; }
.ask-home .ask { margin: 8px 0 4px; }
.extra summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.extra-body { display: grid; gap: 10px; padding: 6px 0 4px 2px; max-width: 70ch; }
.field { display: grid; gap: 6px; }
.field input[type=text] { min-height: 44px; padding: 0 12px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .4); border-radius: 0; font-family: var(--mono); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
code { font-family: var(--mono); font-size: .9em; }
.again-slot:empty { display: none; }
.ask select {
  min-height: 44px; padding: 0 40px 0 14px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 0; font-weight: 700; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(-45deg, transparent 50%, #fff 50%);
  background-size: 6px 6px; background-position: right 20px center, right 14px center; background-repeat: no-repeat;
}
/* the tool's refusal: its own words, then what to do on this page; in the page flow, never over the desk */
.refusal { margin: 0 0 18px; background: var(--panel-3); box-shadow: inset 8px 0 0 #fff; padding: 16px 20px 16px 30px; display: grid; gap: 10px; }
.refusal:focus-visible { outline-offset: 4px; }
.refusal-text { margin: 0; font-family: var(--sans); font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.web-hints { margin: 0; padding-left: 20px; font-size: 15.5px; font-weight: 700; display: grid; gap: 6px; }
.stage { display: flex; flex-direction: column; gap: 14px; }
.desk { --hw: 132px; --sh: 64px; --gap: 6px; --nbays: 2; --nb: 4; position: relative; }
.desk-body { position: relative; }
.desk-notes { display: grid; gap: 4px; flex: 1 1 320px; min-width: 0; }
.ok { font-size: 13.5px; color: var(--text-2); }
.ok:focus-visible { outline-offset: 2px; }
.lock-line { font-size: 15px; font-weight: 700; color: #fff; }
.warn { font-size: 15px; font-weight: 700; color: #fff; padding-left: 12px; border-left: 3px solid #fff; }
.extra-slots { margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.desk-new { --hw: 132px; --sh: 60px; }
.desk-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.desk-title { display: grid; gap: 2px; }
.desk-name { font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .9; font-size: clamp(2rem, 3.2vw, 2.9rem); }
.desk-sub { font-size: 13.5px; color: var(--text-2); padding-bottom: 3px; }
.bays { display: grid; grid-template-columns: repeat(var(--nbays), minmax(0, 1fr)); gap: 22px; }
.bay { background: var(--panel); padding: 14px 14px 14px; min-width: 0; }
.bay-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 4px; min-height: 26px; font-size: inherit; }
.bay-head {
  font-size: 19px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1;
  background: none; border: 0; border-radius: 0; padding: 0; color: #fff; text-align: left; position: relative;
}
button.bay-head { min-height: 32px; padding: 2px 8px 2px 0; cursor: pointer; }
button.bay-head.can-grab { cursor: grab; padding-left: 20px; }
button.bay-head.can-grab::before {
  content: ""; position: absolute; left: 3px; top: 50%; width: 11px; height: 17px; margin-top: -8.5px;
  background: radial-gradient(circle, rgba(255, 255, 255, .8) 1.6px, transparent 1.8px) 0 0 / 5.5px 5.7px;
}
button.bay-head:hover { text-decoration: underline; text-underline-offset: 4px; }
.bay.over, .bay-head.over { outline: 3px solid #fff; outline-offset: 3px; }
body.carry-bay #result-desk .bay.can { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: 3px; }
.from { font-size: 13px; color: var(--text-2); }
.layer {
  display: grid; grid-template-columns: var(--hw) repeat(var(--nb), minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap);
  position: relative; outline: 2px solid transparent; outline-offset: 0; transition: outline-offset .25s var(--ease-out), outline-color .25s var(--ease-out);
}
.lh {
  min-height: var(--sh); background: var(--panel-3); border: 0; border-radius: 0; padding: 7px 10px 7px 12px; position: relative;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; cursor: default; min-width: 0; color: #fff;
}
.lh-n { font-size: 11px; font-weight: 700; font-stretch: 100%; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); line-height: 1.2; white-space: nowrap; }
.lh-name { font-size: 16px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; word-break: normal; }
.lh .sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* a layer tab you can grab: a clear grip, and the whole row outlines on hover, so the unit that moves is plain */
.lh.can-grab { cursor: grab; padding-left: 30px; background: #2b2c30; }
.lh.can-grab::before {
  content: ""; position: absolute; left: 10px; top: 50%; width: 11px; height: 17px; margin-top: -8.5px;
  background: radial-gradient(circle, rgba(255, 255, 255, .8) 1.6px, transparent 1.8px) 0 0 / 5.5px 5.7px;
}
.lh.can-grab:hover { background: #3a3b40; }
.lh.can-grab:hover::before { background-image: radial-gradient(circle, #fff 1.7px, transparent 1.9px); }
#result-desk .layer:has(> .lh.can-grab:hover) { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 3px; }

.slot {
  --c: transparent; --on: #fff;
  position: relative; min-height: var(--sh); min-width: 0; border: 0; border-radius: 0; padding: 7px 8px 7px;
  background: transparent; color: var(--on); text-align: left; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; cursor: default;
}
div.slot { font-size: inherit; }
.slot .slab { position: absolute; inset: 0; background: var(--c); z-index: 0; }
.slot .bk-name, .slot .bk-n, .slot .bk-empty { position: relative; z-index: 1; }
.bk-name {
  font-size: 15.5px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.02;
  overflow-wrap: normal; word-break: normal; hyphens: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bk-name.noname { text-transform: none; font-stretch: 75%; }
.bk-n { font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.slot.dark .slab { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
button.slot { cursor: pointer; }
.slot.empty { outline: 1px dashed rgba(255, 255, 255, .3); outline-offset: -1px; justify-content: center; align-items: center; }
.slot.empty:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bk-empty { font-size: 12.5px; color: var(--text-2); }
.slot.filled.can-grab { cursor: grab; }
.slot.filled.can-grab:hover .slab { filter: brightness(1.08); }

/* three bays side by side (Quantum 338): narrower buttons, so the names take the phone sizes (app.js fitNames then
   brings down any word still wider than its button) */
@media (min-width: 721px) {
  .desk:not(.compact) > .desk-body.bays-3 { --hw: 100px; }
  .desk:not(.compact) > .desk-body.bays-3 .bays { gap: 16px; }
  .desk:not(.compact) > .desk-body.bays-3 .bay { padding: 12px 10px; }
  .desk:not(.compact) > .desk-body.bays-3 .slot { padding: 6px 6px; }
  .desk:not(.compact) > .desk-body.bays-3 .bk-name { font-size: 13.5px; font-stretch: 62%; }
  .desk:not(.compact) > .desk-body.bays-3 .lh-name { font-size: 14px; font-stretch: 62%; }
}

/* select / destination: the destination ring is dashed and sits inside, so the focus ring (outside) shows with it */
.is-sel { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #000; }
.slot.is-sel .slab, .chip.is-sel .sw { filter: none; }
.is-dest::after { content: ""; position: absolute; inset: 4px; border: 2px dashed #fff; pointer-events: none; z-index: 2; }
.bay-head.is-dest::after, .tray-off-btn.is-dest::after { inset: -4px; }
.off-zone.is-dest { outline: 2px dashed #fff; outline-offset: -2px; }
.layer.is-dest-row { outline: 2px dashed #fff; outline-offset: 4px; }
.landed { box-shadow: inset 0 0 0 2px #fff; }

/* carrying: valid places on the new desk get an edge in the carried bank's colour (plus the brackets);
   a full button under the pointer is hatched (it cannot take the bank) */
body.carry-bank #result-desk .slot.can { outline: 2px solid var(--carry); outline-offset: -2px; }
body.carry-bank #result-desk .slot.filled.can { outline-style: dashed; }
body.carry-bank #result-desk .slot.can .bk-empty { color: #fff; }
body.carry-bank #result-desk .slot.over { background: color-mix(in srgb, var(--carry) 30%, transparent); outline-width: 3px; }
body.carry-layer #result-desk .layer.can { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: 3px; }
body.carry-layer #result-desk .layer.over { outline: 3px solid #fff; outline-offset: 8px; }
body.carry-bank #result-desk .tray-new.can, body.carry-layer #result-desk .tray-new.can { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: -2px; }
body.carry-bank #result-desk .tray-new.over { outline: 3px solid #fff; }
body.carry-bank #result-desk .slot.filled:not(.hollow):not(.no), body.carry-layer #result-desk .layer:not(.can):not(.hollow) { opacity: .7; }
#result-desk .slot.no { outline: 3px solid #fff; outline-offset: -3px; opacity: 1; }
#result-desk .slot.no::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(10, 10, 10, .55) 0 6px, transparent 6px 12px);
}
#result-desk .layer.no { outline: 3px solid #fff; outline-offset: 3px; }
.slot.hollow .slab, .slot.hollow .bk-name, .slot.hollow .bk-n { visibility: hidden; }
.slot.hollow { outline: 2px dashed var(--c); outline-offset: -2px; }
.layer.hollow > * { visibility: hidden; }
.bay.hollow { outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: 3px; }
.bay.hollow > :not(.bay-title) { opacity: .3; }
body.carry-bay #result-desk .slot.filled, body.carry-bay #result-desk .tray .chip { opacity: .7; }
body.carry-bay #result-desk .bay.over .slot.filled { opacity: 1; }
.layer.hollow { outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: 0; }

/* trays: banks on no button */
.tray { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: var(--panel); position: relative; min-height: 64px; }
.tray-h { font-size: 13.5px; color: var(--text-2); }
.tray-h .label { color: #fff; }
.tray-off-btn { background: none; border: 0; padding: 0; font: inherit; color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .12em; font-stretch: 112%; text-transform: uppercase; cursor: pointer; min-height: 44px; position: relative; text-decoration: underline; text-underline-offset: 4px; }
.tray-h { margin: 0; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --c: #fff; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 10px;
  background: var(--panel-2); border: 0; border-radius: 0; color: #fff; font-size: 14px; font-weight: 700; position: relative; cursor: pointer;
}
div.chip { cursor: default; }
.chip .sw { width: 6px; height: 24px; background: var(--c); flex: none; }
.chip.dark .sw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.chip.can-grab { cursor: grab; }
.none { font-size: 13.5px; color: var(--text-2); }

/* S20: the channel slots of the bank picked on the new desk (only where the pair's --slot is tested) */
.chslot-row { flex: 1 1 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap, 6px); }
.chslot {
  position: relative; min-height: var(--sh, 64px); min-width: 0; border: 0; border-radius: 0; padding: 6px 6px 7px;
  background: var(--panel-2); color: #fff; text-align: left; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px;
}
.chslot.empty { background: transparent; outline: 1px dashed rgba(255, 255, 255, .3); outline-offset: -1px; justify-content: center; align-items: center; }
.chslot.empty:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.chslot.filled.can-grab { cursor: grab; }
.chslot.filled.can-grab:hover { background: var(--panel-3); }
.cs-n { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--text-2); line-height: 1.2; }
.cs-name { font-size: 13px; font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; }
.chslot.empty .cs-n { position: absolute; left: 6px; top: 5px; }
body.carry-bank #result-desk .chslot.can { outline: 2px solid var(--carry); outline-offset: -2px; }
body.carry-bank #result-desk .chslot.filled.can { outline-style: dashed; }
body.carry-bank #result-desk .chslot.over { background: color-mix(in srgb, var(--carry) 30%, transparent); outline-width: 3px; }
.chslot.hollow > * { visibility: hidden; }
.chslot.hollow { outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: -2px; }
.carry > .chslot { width: 100%; height: 100%; margin: 0; }
@media (max-width: 720px) {
  .chslot-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* the original desk after the transfer: a view-only reference, folded to one line until asked for */
.desk-src.compact { --hw: 92px; --sh: 40px; --gap: 4px; }
.desk-src.compact .desk-head { margin-bottom: 8px; align-items: center; }
.desk-src.compact .desk-name { font-size: clamp(1.4rem, 1.9vw, 1.75rem); }
.desk-src.compact .bay { padding: 8px 10px 10px; }
.desk-src.compact .bay-name { font-size: 14px; }
.desk-src.compact .bay-head { min-height: 20px; margin-bottom: 0; }
.desk-src.compact .bk-name { font-size: 12.5px; -webkit-line-clamp: 2; }
.desk-src.compact .bk-n { display: none; }
.desk-src.compact .slot { justify-content: center; padding: 3px 7px; }
.desk-src.compact .lh { padding-top: 2px; padding-bottom: 2px; }
.desk-src.compact .lh-n { font-size: 10px; }
.desk-src.compact .lh-name { font-size: 12.5px; }
.desk-src.compact .tray { min-height: 46px; padding: 2px 10px; margin-top: 6px; }
.desk-src.compact .chip { min-height: 38px; }
.desk-src.compact .desk-file { font-size: 14px; padding-bottom: 0; }
.desk-src.folded .desk-body { display: none; }
.desk-src.folded .desk-head { margin-bottom: 0; }
.desk-src.compact { border-left: 3px solid var(--panel-3); padding-left: 14px; }
.desk-fold { margin-left: auto; min-height: 44px; padding: 8px 0; }

/* step 3: the Transfer button sits right under the line, with the docked SD12 tag */
.go-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 18px; }
.tag { display: grid; align-content: center; gap: 0; background: var(--panel-2); padding: 8px 18px 9px; min-height: 64px; min-width: 0; }
.tag-name { font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: 26px; line-height: .95; }
.tag-file { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; max-width: 60ch; min-width: 0; }
.tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.tag .file-button { min-height: 28px; padding: 0; }
.tag-name.unknown { font-size: 18px; font-stretch: 87%; }
.screen-desk > .ask { margin: -4px 0 18px; }
.screen-desk > .ask-more { margin: 22px 0 0; }
.ask-home .ask-more { margin-top: 14px; }
.extra-body .small { max-width: 64ch; }

/* step 5: tools */
.hist-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.kbd-hint { display: none; margin-top: 10px; font-size: 15px; color: #fff; }
#new-wrap:has(#result-desk :focus-visible) .kbd-hint { display: block; }
.run-status { align-self: center; }

/* the dock: sticky at the foot of the window on step 5 (Move bar or commit button) */
.dock {
  position: sticky; bottom: 0; z-index: 40; margin: 18px calc(var(--gutter) * -1) 0; padding: 12px var(--gutter) 14px;
  background: var(--ground); border-top: 1px solid var(--line); display: grid; gap: 10px;
}
/* while something is picked up or the tool runs, the bar is fixed to the foot of the screen, wherever the page is */
.dock.is-fixed { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; }
.stale { font-size: 15px; font-weight: 700; padding-left: 12px; border-left: 3px solid #fff; }
.commit-bar { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.commit-meta { display: grid; gap: 2px; flex: 1 1 360px; min-width: 0; }
.out-name { font-size: 14.5px; color: #fff; overflow-wrap: anywhere; }
.out-name .label { margin-right: 8px; }
.dock-note { font-size: 14px; font-weight: 700; line-height: 1.35; }
.to-check { min-height: 32px; padding: 2px 0; font-size: 14px; font-weight: 700; color: #fff; justify-self: start; text-decoration-color: rgba(255, 255, 255, .6); }
.movebar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; min-height: 72px; position: relative; padding-left: 22px; }
.movebar::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 8px; background: var(--carry-bar, #fff); }
.mb-text { font-size: 16px; color: #fff; flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.mb-text strong { font-weight: 800; }
.mb-text .mb-plain { font-size: 17px; font-weight: 700; }
.mb-text .small { color: var(--text-2); }
.mb-text details { font-size: 13.5px; color: var(--text-2); }
.mb-text summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.mb-text details p { margin-top: 4px; }
.mb-text .textbtn { min-height: 32px; padding: 2px 0; justify-self: start; color: #fff; font-size: 14px; }
.mb-text .mb-refused:focus-visible { outline-offset: 2px; }
.mb-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.movebar.notice::before { background: #fff; }
.movebar.idle { min-height: 0; }
.movebar.idle::before { background: var(--panel-3); }
.btn-xxl .tick { position: absolute; right: -2px; top: -2px; width: 0; height: 0; }
.btn.ticked .arrow { opacity: 0; }
.btn-xxl .tick svg { position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; }

/* step 6: the safety items under the dock */
.safety { margin-top: 18px; background: var(--panel); padding: 18px 22px 20px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 16px 40px; align-items: start; }
.safety .label-h { margin-top: 0; }
.cbh { margin: 0; padding: 0 0 0 22px; font-size: 14.5px; line-height: 1.5; display: grid; gap: 8px; }
.cbh li { overflow-wrap: anywhere; }
.cbh details { display: inline; }
.cbh summary { display: inline; cursor: pointer; color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .45); }
.cbh summary::-webkit-details-marker { display: none; }
.cbh .cbh-list { display: block; margin: 6px 0; padding: 8px 10px; background: var(--panel-2); font-size: 13.5px; color: #e6e6e6; max-height: 180px; overflow: auto; }
.cbh-list::-webkit-scrollbar, .report::-webkit-scrollbar { width: 8px; height: 8px; }
.cbh-list::-webkit-scrollbar-track, .report::-webkit-scrollbar-track { background: var(--panel-3); }
.cbh-list::-webkit-scrollbar-thumb, .report::-webkit-scrollbar-thumb { background: #9a9a9a; }
.editor-note { font-weight: 700; font-size: 18px; line-height: 1.4; padding-left: 16px; border-left: 3px solid #fff; }
/* the editor note sits in the dock, right beside the commit button, on every screen (this copy is not shown) */
.safety .editor-note { display: none; }
.safety { grid-template-columns: minmax(0, 1fr); }

/* Details */
.details { margin-top: 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details summary {
  list-style: none; cursor: pointer; min-height: 60px; display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 800; font-stretch: 112%; letter-spacing: .12em; text-transform: uppercase;
}
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; font-size: 24px; font-weight: 400; transition: transform .4s var(--ease-out); }
.details[open] summary::after { transform: rotate(45deg); }
.details-body { padding: 4px 0 32px; overflow: hidden; }
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.changes li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 15px; background: var(--panel); padding: 8px 8px 8px 14px; }
.changes li span { flex: 1 1 300px; min-width: 0; overflow-wrap: anywhere; }
.changes li.hint { color: var(--text-2); background: none; padding: 0; }
.cmd { font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: normal; word-break: normal; background: var(--panel); padding: 14px 16px; margin: 0; }
.cli-note { margin-top: 8px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.plain { margin: 0; padding-left: 20px; font-size: 15px; }
.report { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; max-height: 52vh; background: var(--panel); padding: 14px 16px; margin: 0; }

/* Done: the only white screen */
.done {
  position: fixed; inset: 0; z-index: 80; background: #fff; color: var(--ground); overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter);
}
.done-inner { display: grid; gap: 24px; justify-items: center; text-align: center; max-width: 1100px; width: 100%; margin-inline: auto; }
.done .line { color: var(--ground); }
.done-card { background: var(--ground); color: #fff; padding: 20px 28px 22px; display: grid; gap: 6px; max-width: 100%; justify-items: center; }
.done-file { font-weight: 800; font-stretch: 68%; line-height: 1.05; font-size: clamp(1.4rem, 3vw, 2.6rem); overflow-wrap: anywhere; }
.done-note { font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; line-height: 1.4; max-width: 46ch; }
.done-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.done-check { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.4; max-width: 52ch; }
.done :focus-visible { outline-color: var(--ground); box-shadow: 0 0 0 1px #fff; }

/* ---------- desk head file name, pending landings ---------- */
.desk-file { font-weight: 800; font-stretch: 75%; font-size: 17px; line-height: 1; color: #fff; padding-bottom: 4px; overflow-wrap: anywhere; }
.slot.pending { outline: 1px dashed rgba(255, 255, 255, .3); outline-offset: -1px; }
.slot.pending .slab, .slot.pending .bk-name, .slot.pending .bk-n, .lh.pending .lh-name, .chip.pending { visibility: hidden; }
.cli .arg { white-space: pre; }
.layer.lifted > * { visibility: hidden; }
.nowrap { white-space: nowrap; }

/* while the transfer plays only the desks move: the new desk's lines and the footer come in when it has landed
   (the lines only see-through, not hidden: the keyboard focus goes to "Written: ..." as the run ends) */
html.is-transferring .foot { visibility: hidden; }
html.is-transferring #new-wrap .desk-notes > * { opacity: 0; }

/* ---------- motion layers ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.fx > * { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.fx-panel { background: var(--panel); }
.fx-card { background: var(--panel-2); display: grid; gap: 6px; align-content: start; padding: 16px 20px; overflow: hidden; }
.fx-card-mid { align-content: center; }
.fx-text { transform-origin: 0 0; }
.fx.over-done { z-index: 90; }
.in-flight .slot.empty { visibility: hidden; }
.in-flight .layer { margin: 0; }
.carry { box-shadow: var(--shadow-lift); }
.carry > .slot, .carry > .layer { width: 100%; height: 100%; margin: 0; }
/* a bay is carried by its name, as a solid card in the bay's colour */
.fx > .carry.carry-bay { background: var(--panel-3); display: flex; align-items: center; padding: 0 12px; }
.carry.carry-bay > .bay-head { min-height: 0; padding: 2px 0 2px 20px; white-space: nowrap; }
.fx > .desk { position: absolute; }
.fx > .ghost { margin: 0; overflow: hidden; }
.vf { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.vf span {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px; border: 0 solid #fff; opacity: 0;
  transition: opacity .25s var(--ease-out); will-change: transform;
}
.vf.on span { opacity: 1; }
.vf span:nth-child(1) { border-top-width: 3px; border-left-width: 3px; }
.vf span:nth-child(2) { border-top-width: 3px; border-right-width: 3px; }
.vf span:nth-child(3) { border-bottom-width: 3px; border-left-width: 3px; }
.vf span:nth-child(4) { border-bottom-width: 3px; border-right-width: 3px; }

/* ---------- reduced motion: same screens, instant states ---------- */
html.motion-static *, html.motion-static *::before, html.motion-static *::after {
  transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important;
}
html.motion-static #btn-pause, html.motion-static .vf { display: none !important; }

/* ---------- narrow screens: one column ---------- */
@media (max-width: 860px) {
  .safety { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --dock-h: 150px; }
  .bays { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .desk { --hw: 78px; --sh: 56px; --gap: 4px; }
  .desk-src.compact { --hw: 78px; --sh: 44px; }
  .bay { padding: 10px; }
  .lh { padding: 5px 4px 5px 8px; }
  .tool-status { font-size: 12px; }
  .lh.can-grab { padding-left: 20px; }
  .lh.can-grab::before { left: 5px; }
  .lh-n { font-size: 10.5px; letter-spacing: .04em; font-stretch: 75%; }
  .lh-name { font-size: 13px; font-stretch: 62%; }
  .slot { padding: 5px 5px; }
  .bk-name { font-size: 12.5px; font-stretch: 62%; }
  .bk-n { font-size: 10.5px; }
  .cards { flex-direction: column; gap: 10px; }
  .card { padding: 12px 14px; }
  .drop-head { padding: 16px 16px 0; flex-direction: column; gap: 2px; }
  .drop-info { text-align: left; }
  .drop-wrap { min-height: 280px; }
  .under-drop { align-items: flex-start; }
  .btn-xl { min-height: 60px; padding: 0 22px; font-size: 14px; }
  .drop-centre .file-button { min-height: 64px; padding: 0 26px; font-size: 15px; }
  .btn-xxl { min-height: 64px; padding: 0 18px; font-size: 13.5px; letter-spacing: .06em; width: 100%; justify-content: space-between; }
  .go-row .btn { flex: 1 1 100%; }
  .go-row .btn .btn-roll > * { white-space: normal; }
  .tag { flex: 1 1 100%; }
  .sub { font-size: 15.5px; flex-basis: 100%; }
  .hist-btns .btn { padding: 0 12px; font-size: 11.5px; letter-spacing: .06em; font-stretch: 87%; }
  .dock { padding: 10px var(--gutter) 10px; }
  .commit-bar { gap: 8px; }
  .commit-meta { flex-basis: 100%; }
  .commit-meta .out-name { display: none; }
  .movebar { min-height: 0; padding-left: 16px; }
  .movebar::before { width: 6px; }
  .mb-text { font-size: 14.5px; flex-basis: 100%; }
  .mb-text .mb-plain { font-size: 15.5px; }
  .safety { padding: 16px; }
  .top { padding-top: 14px; }
  html.on-desk .tool-status, .run-status {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
