/* RunnerForge. Tokens first; components use roles only. See DESIGN.md. */
:root {
  color-scheme: light dark;
  --hue: 80; --tint: .004;

  --bg:          light-dark(oklch(.975 var(--tint) var(--hue)), oklch(.165 var(--tint) var(--hue)));
  --surface:     light-dark(oklch(.995 .001 var(--hue)),        oklch(.205 var(--tint) var(--hue)));
  --fill:        light-dark(oklch(.95 var(--tint) var(--hue)),  oklch(.245 var(--tint) var(--hue)));
  --hover:       light-dark(oklch(.925 var(--tint) var(--hue)), oklch(.28 var(--tint) var(--hue)));
  --line:        light-dark(oklch(.905 var(--tint) var(--hue)), oklch(.275 var(--tint) var(--hue)));
  --line-strong: light-dark(oklch(.84 var(--tint) var(--hue)),  oklch(.37 var(--tint) var(--hue)));
  --ink:         light-dark(oklch(.2 var(--tint) var(--hue)),   oklch(.96 var(--tint) var(--hue)));
  --ink-2:       light-dark(oklch(.34 var(--tint) var(--hue)),  oklch(.84 var(--tint) var(--hue)));
  --ink-3:       light-dark(oklch(.5 var(--tint) var(--hue)),   oklch(.7 var(--tint) var(--hue)));
  --ink-4:       light-dark(oklch(.7 var(--tint) var(--hue)),   oklch(.5 var(--tint) var(--hue)));
  --strong:      light-dark(oklch(.2 var(--tint) var(--hue)),   oklch(.96 0 0));
  --on-strong:   light-dark(oklch(.99 0 0),                     oklch(.17 0 0));
  --warn:        light-dark(oklch(.52 .12 65),                  oklch(.8 .14 75));
  --warn-soft:   light-dark(oklch(.965 .03 80),                 oklch(.26 .035 75));
  --bad:         light-dark(oklch(.53 .2 27),                   oklch(.7 .17 25));
  --bad-soft:    light-dark(oklch(.96 .025 27),                 oklch(.27 .05 25));
  --shadow:      0 0 0 1px light-dark(oklch(0 0 0 / .06), var(--line)), 0 1px 2px oklch(0 0 0 / .04), 0 16px 40px -16px light-dark(oklch(0 0 0 / .14), oklch(0 0 0 / .5));

  /* the machines are always dark: the rack cabinet and the console */
  --con-bg:      oklch(.17 .004 80);
  --cab-bg:      light-dark(oklch(.17 .004 80), oklch(.125 .004 80));
  --con-raise:   oklch(.215 .004 80);
  --con-hover:   oklch(.24 .004 80);
  --con-line:    oklch(1 0 0 / .08);
  --con-line-2:  oklch(1 0 0 / .16);
  --con-ink:     oklch(.95 .004 80);
  --con-ink-2:   oklch(.78 .004 80);
  --con-ink-3:   oklch(.66 .004 80);
  --socket:      oklch(.27 .004 80);
  --led:         oklch(.8 .17 150);
  --led-halo:    oklch(.8 .17 150 / .35);
  --wait:        oklch(.8 .14 75);
  --code-str:    oklch(.84 .09 85);
  --code-var:    oklch(.82 .08 220);
  --code-kw:     oklch(.8 .08 300);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 6px; --r: 8px; --r-lg: 14px;
  --h-sm: 32px; --h: 38px; --h-touch: 44px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--ink-2);
  font: 450 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--hover); color: var(--ink); }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; }
code { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.offscreen { position: fixed; left: -9999px; opacity: 0; }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; flex: none; }
.bar-summary { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-left: 24px; border-left: 1px solid var(--line); line-height: 20px; }
.bar-note { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); text-align: right; }
.bar-note svg { flex: none; }
.note-short { display: none; }

/* ---------- shell ---------- */
.app {
  display: grid; grid-template-columns: 288px minmax(0, 1fr) minmax(0, 1.08fr);
  grid-template-areas: "rack editor output"; align-items: start;
}
.cabinet { grid-area: rack; }
.editor { grid-area: editor; }
.output { grid-area: output; }

/* ---------- the rack cabinet ---------- */
.cabinet {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  background: var(--cab-bg); box-shadow: inset -1px 0 0 light-dark(transparent, var(--con-line)); color: var(--con-ink-2);
  padding: 20px 14px 24px; display: flex; flex-direction: column; gap: 12px;
  scrollbar-color: oklch(1 0 0 / .18) transparent;
}
.cabinet :focus-visible { outline-color: var(--con-ink); }
.cab-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px; }
.cab-head h2 { font-size: 13px; font-weight: 600; color: var(--con-ink); }
.cab-total { font-size: 13px; color: var(--con-ink-3); font-variant-numeric: tabular-nums; }
.cab-total b { font-size: 20px; font-weight: 600; color: var(--con-ink); letter-spacing: -0.02em; margin-right: 3px; }

.units { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.units-empty { padding: 16px 6px; font-size: 13px; color: var(--con-ink-3); }
.unit {
  width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left;
  padding: 12px 12px 11px; border-radius: 10px; cursor: pointer;
  background: oklch(1 0 0 / .025); border: 0; color: inherit;
  box-shadow: inset 0 0 0 1px var(--con-line), inset 0 1px 0 oklch(1 0 0 / .04);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.unit:hover { background: var(--con-raise); }
.unit[aria-current="true"] { background: var(--con-raise); box-shadow: inset 0 0 0 1px var(--con-line-2), inset 3px 0 0 var(--con-ink), 0 8px 24px -12px oklch(0 0 0 / .6); }
.unit-top { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.unit-name { font-size: 14px; font-weight: 600; color: var(--con-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.unit-kind { font-size: 12px; color: var(--con-ink-3); line-height: 1.35; }
.bays { display: flex; flex-direction: column; gap: 4px; }
.sockets {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; padding: 4px;
  background: oklch(0 0 0 / .35); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--con-line);
}
.sockets.vm { grid-template-columns: 1fr 1fr; gap: 4px; }
.sock { height: 9px; border-radius: 2px; background: var(--socket); transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.sockets.vm .sock { height: 16px; border-radius: 3px; }
.sock.on { background: var(--led); box-shadow: 0 0 10px -1px var(--led-halo); }
.sock.wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--wait); }
.unit-state { font-size: 12px; color: var(--con-ink-3); font-variant-numeric: tabular-nums; line-height: 1.35; }
.unit-state.waiting { color: var(--wait); }

.add summary {
  list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--con-ink-2); line-height: 1;
  border: 1px dashed var(--con-line-2); transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.add summary::-webkit-details-marker { display: none; }
.add summary:hover, .add[open] summary { background: var(--con-raise); color: var(--con-ink); }
.add-menu { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 4px; border-radius: 10px; background: var(--con-raise); box-shadow: inset 0 0 0 1px var(--con-line); }
.add[open] .add-menu { animation: pop 180ms var(--ease); transform-origin: top center; }
.add-menu button {
  display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--con-ink-3); font-size: 12px; cursor: pointer; line-height: 1.4;
}
.add-menu button b { font-size: 13.5px; font-weight: 500; color: var(--con-ink); }
.add-menu button:hover { background: var(--con-hover); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

/* ---------- editor ---------- */
.editor { padding: 28px 40px 80px; min-width: 0; }
.editor > * { max-width: 600px; }
.ed-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.editor input.ed-name {
  flex: 1; min-width: 0; height: 44px; margin-left: -10px; padding: 0 10px;
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
  background: transparent; border: 1px solid transparent; border-radius: var(--r);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.editor input.ed-name:hover { background: var(--fill); }
.editor input.ed-name:focus { outline: none; background: var(--surface); border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--fill); }
.ed-actions { display: flex; gap: 8px; flex: none; }
.confirm {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 12px 12px 12px 16px; border-radius: var(--r-lg); background: var(--bad-soft); color: var(--ink);
  font-size: 13.5px;
}
.confirm div { display: flex; gap: 8px; }

.sec { padding: 28px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec > h2, .sec-head h2 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.meta { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sub { margin-top: 10px; max-width: 320px; }
.hint { margin-top: 10px; font-size: 13px; color: var(--ink-3); text-wrap: pretty; }
.hint code, .notice code { color: var(--ink-2); }
.mono-hint { font-family: var(--mono); font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
.warn-text { color: var(--warn); }
.hint + .pair, .hint + .field, .hint + .notice { margin-top: 18px; }
.presets + .hint { margin-top: 12px; }

.field { margin-bottom: 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; line-height: 1.4; }
.field .error { display: none; font-size: 12.5px; color: var(--warn); margin-top: 6px; }
.field.invalid .error { display: block; }
.field.invalid input { border-color: var(--warn); }
.field .hint { margin-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair .field, .trio .field { margin: 0; }
.trio { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; margin-top: 16px; }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%; height: var(--h); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 0 12px; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
input.mono { font-family: var(--mono); font-size: 13px; }
input::placeholder { color: var(--ink-4); }
input:hover, select:hover { border-color: var(--ink-4); }
input:focus, select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--fill); }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select .chev { position: absolute; right: 12px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }

/* segmented radio group */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px;
  background: var(--fill); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px);
}
.seg label {
  display: flex; align-items: center; justify-content: center; height: var(--h-sm); padding: 0 10px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; white-space: nowrap; line-height: 1;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.seg label:hover { color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px oklch(0 0 0 / .06); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* presets */
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: var(--h-sm); padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 500; cursor: pointer; line-height: 1;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.chip code { font-size: 12px; color: var(--ink-3); }
.chip:hover { background: var(--hover); border-color: var(--line-strong); }

/* scopes: one surface, hairlines */
.scopes { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.scopes-empty { padding: 20px; font-size: 13px; color: var(--ink-3); }
.scope { padding: 18px 20px 20px; }
.scope + .scope { border-top: 1px solid var(--line); }
.scope-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 12px; min-height: 28px; }
.scope-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.scope-name .idx { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.scope-name .slug { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-name .slug.is-empty { color: var(--ink-3); font-weight: 500; }
.text-btn {
  background: none; border: 0; color: var(--ink-3); font-size: 13px; cursor: pointer; line-height: 1;
  height: 28px; padding: 0 10px; margin-right: -10px; border-radius: var(--r-sm);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.text-btn.danger:hover { color: var(--bad); background: var(--bad-soft); }
.token-row { display: flex; gap: 8px; }
.icon-btn {
  flex: none; width: var(--h); height: var(--h); display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  color: var(--ink-3); cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.add-row {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px;
  height: var(--h-touch); font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1;
  background: transparent; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.add-row:hover:not(:disabled) { background: var(--surface); color: var(--ink); border-color: var(--ink-4); }
.add-row:disabled { color: var(--ink-4); cursor: not-allowed; }

/* stepper */
.stepper-row { display: flex; align-items: center; gap: 12px; }
.unit-of { font-size: 13px; color: var(--ink-3); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); flex: none; }
.stepper button {
  width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-2);
  font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  transition: background var(--t) var(--ease);
}
.stepper button:hover:not(:disabled) { background: var(--hover); }
.stepper button:disabled { color: var(--ink-4); cursor: default; }
.stepper input[type="number"] { width: 44px; height: 36px; border: 0; border-radius: 0; text-align: center; font-weight: 600; color: var(--ink); padding: 0; background: transparent; font-variant-numeric: tabular-nums; }
.stepper input:focus { box-shadow: inset 0 0 0 2px var(--fill); }

/* notices */
.notice { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--fill); font-size: 13px; color: var(--ink-2); text-wrap: pretty; }
.notice b { color: var(--ink); font-weight: 600; }
.notice.warn { background: var(--warn-soft); }

/* empty editor */
.empty { padding: 48px 0; }
.empty h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.empty p { margin-top: 8px; color: var(--ink-3); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h);
  border-radius: var(--r); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1;
  padding: 0 14px; border: 1px solid transparent;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), transform 120ms var(--ease), border-color var(--t) var(--ease);
}
.btn.sm { height: var(--h-sm); padding: 0 12px; font-size: 13px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; }
.btn svg { flex: none; }
.btn-default { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn-default:hover { background: var(--hover); color: var(--ink); }
.btn-default.danger:hover { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.btn-strong { background: var(--strong); color: var(--on-strong); }
.btn-danger { background: var(--bad); color: oklch(.99 0 0); }
.btn-danger:hover { background: light-dark(oklch(.47 .19 27), oklch(.64 .18 25)); }
.btn-light { background: var(--con-ink); color: var(--con-bg); }
.btn-light:hover:not(:disabled) { background: oklch(1 0 0); }
.btn-light:disabled { background: oklch(1 0 0 / .1); color: var(--con-ink-3); }
.btn-ghost { background: transparent; color: var(--con-ink); }
.btn-ghost:hover:not(:disabled) { background: oklch(1 0 0 / .08); }
.btn-ghost:disabled { color: var(--con-ink-3); opacity: .6; }
.btn.copied { background: var(--led); color: var(--con-bg); }

/* ---------- console: the script ---------- */
.output { position: sticky; top: 0; padding: 20px 20px 20px 0; min-width: 0; }
.console {
  display: flex; flex-direction: column; max-height: calc(100dvh - 40px);
  background: var(--con-bg); color: var(--con-ink-2); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 0 0 1px light-dark(oklch(0 0 0 / .4), oklch(1 0 0 / .09)), 0 24px 60px -20px oklch(0 0 0 / .45);
}
.console :focus-visible { outline-color: var(--con-ink); }
.con-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--con-line); flex: none; }
.filename { font-family: var(--mono); font-size: 13px; color: var(--con-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.con-actions { display: flex; gap: 8px; flex: none; }
.con-blocked { padding: 10px 20px; font-size: 13px; color: var(--wait); border-bottom: 1px solid var(--con-line); background: oklch(.8 .14 75 / .07); flex: none; }
.con-steps { padding: 16px 20px 18px; background: var(--con-raise); border-bottom: 1px solid var(--con-line); flex: none; }
.con-steps h2 { font-size: 13px; font-weight: 600; color: var(--con-ink); margin-bottom: 10px; }
.con-steps ol, .con-steps ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.con-steps ol { counter-reset: step; }
.con-steps li { position: relative; padding-left: 26px; font-size: 13px; line-height: 1.5; color: var(--con-ink-2); text-wrap: pretty; }
.con-steps ol li { counter-increment: step; }
.con-steps ol li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 18px; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--con-ink-3); font-weight: 600;
}
.con-steps ul li::before { content: ""; position: absolute; left: 9px; top: .7em; width: 5px; height: 1.5px; background: var(--wait); }
.con-steps code, .run-note code { color: var(--con-ink); font-size: 12px; overflow-wrap: anywhere; }
#after h2 { margin: 16px 0 8px; color: var(--wait); }
.script { margin: 0; padding: 16px 20px; flex: 1 1 auto; min-height: 200px; overflow: auto; scrollbar-color: oklch(1 0 0 / .18) transparent; }
.script code { font-size: 12px; line-height: 1.7; color: var(--con-ink); white-space: pre; }
.tok-com { color: var(--con-ink-3); }
.tok-str { color: var(--code-str); }
.tok-var { color: var(--code-var); }
.tok-kw  { color: var(--code-kw); }
.run-note { padding: 12px 20px 14px; border-top: 1px solid var(--con-line); font-size: 13px; color: var(--con-ink-3); flex: none; text-wrap: pretty; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 24px; margin-left: 288px; }
.foot p { font-size: 13px; color: var(--ink-3); max-width: 72ch; }

/* ---------- widths ---------- */
@media (max-width: 1279px) {
  .app { grid-template-columns: 264px minmax(0, 1fr); grid-template-areas: "rack editor" "rack output"; }
  .output { position: static; padding: 0 40px 48px; }
  .output > * { max-width: 760px; }
  .console { max-height: none; }
  .script { max-height: 520px; }
  .editor { padding-bottom: 32px; }
  .foot { margin-left: 264px; padding: 24px 40px; }
  .bar-note span { max-width: 40ch; }
}
@media (max-width: 899px) {
  .bar-summary { display: none; }
}
@media (max-width: 759px) {
  .bar { height: auto; min-height: 56px; padding: 10px 16px; gap: 12px; }
  .bar-note { font-size: 12px; }
  .note-long { display: none; }
  .note-short { display: inline; }
  .app { display: block; }
  .cabinet { position: static; height: auto; padding: 16px 16px 18px; gap: 12px; }
  .units { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px; }
  .units li { flex: 0 0 min(76vw, 280px); scroll-snap-align: start; }
  .unit { height: 100%; }
  .editor { padding: 20px 16px 24px; }
  .output { padding: 0 16px 32px; }
  .foot { margin: 0; padding: 20px 16px 32px; }
  .pair { grid-template-columns: 1fr; gap: 14px; }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio .field:last-child { grid-column: 1 / -1; }
  .ed-head { flex-wrap: wrap; }
  .ed-name { font-size: 22px; flex-basis: 100%; }
  input[type="text"], input[type="password"], input[type="number"], select { font-size: 16px !important; height: var(--h-touch); }
  .icon-btn, .stepper button { width: var(--h-touch); height: var(--h-touch); }
  .stepper input[type="number"] { height: var(--h-touch); }
  .seg label { height: var(--h-touch); padding: 0 6px; font-size: 13px; }
  .btn, .btn.sm, .chip, .text-btn, .add summary { height: var(--h-touch); }
  .text-btn { margin: -8px -10px -8px 0; }
  .scope { padding: 16px; }
  .con-head { flex-wrap: wrap; padding: 12px 16px; }
  .con-actions { width: 100%; }
  .con-actions .btn { flex: 1; }
  .con-blocked, .con-steps, .script, .run-note { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
