:root {
  --bg: #111619; --panel: #161c20; --panel-2: #1c2328; --line: #2a333a; --line-2: #36414a;
  --ink: #eef1f2; --ink-2: #a9b4bb; --ink-3: #75828b;
  --hot: #ff8a3d; --hot-2: #ffb46e; --copper: #c77a43; --good: #5ed39a; --warn: #ffcf5c; --bad: #ff6b5a; --blue: #7ec8ff;
  --head: "Bahnschrift SemiCondensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 56px; --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); }
button, select, input { font: inherit; color: inherit; }
kbd { font: 600 11px/1 var(--ui); padding: 2px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-2); background: #0d1114; }

/* ---------- App frame ---------- */
#app {
  height: calc(100svh - var(--nav-h)); min-height: 540px; display: grid; position: relative;
  grid-template-columns: 268px minmax(0, 1fr); grid-template-rows: 54px minmax(0, 1fr) 30px;
  grid-template-areas: "brand top" "panel stage" "status status";
  background: var(--bg); overflow: clip; user-select: none; -webkit-user-select: none;
}
#app > h1 {
  grid-area: brand; margin: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 52px;
  font: 800 19px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap;
}
#app > p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-mark { position: absolute; left: 16px; top: 12px; width: 28px; height: 28px; z-index: 2; }
.ws-mark svg { width: 100%; height: 100%; display: block; }
.ws-tabs { grid-area: top; display: flex; gap: 2px; align-items: center; padding: 0 200px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ws-tabs button {
  border: 0; background: none; padding: 9px 14px; border-radius: 8px; font: 700 14px/1 var(--head); letter-spacing: .03em; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.ws-tabs button:hover { color: var(--ink); background: var(--panel-2); }
.ws-tabs button[aria-pressed="true"] { color: #1a1208; background: var(--hot); }
.ws-top-actions { position: absolute; right: 12px; top: 9px; display: flex; gap: 6px; z-index: 3; }

.ws-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); font: 700 13px/1 var(--ui); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.ws-btn:hover { border-color: #4a5763; background: #222b31; }
.ws-btn:active { transform: translateY(1px); }
.ws-btn:disabled { opacity: .45; cursor: not-allowed; }
.ws-btn.primary { background: var(--hot); border-color: var(--hot); color: #1a1208; }
.ws-btn.primary:hover { background: var(--hot-2); }
.ws-btn.ghost { background: rgba(17, 22, 25, .72); backdrop-filter: blur(6px); }
.ws-btn.icon { width: 36px; padding: 0; font-size: 20px; }
.ws-btn.icon svg { width: 18px; height: 18px; }
.ws-btn[aria-pressed="true"] { border-color: var(--hot); color: var(--hot-2); }
.ws-btn.accent-line { border-color: rgba(255, 138, 61, .55); color: var(--hot-2); }
.ws-btn kbd { margin-left: 2px; }
.setup-btn, .close-panel { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Panel ---------- */
.ws-panel { grid-area: panel; overflow-y: auto; padding: 14px 14px 24px; border-right: 1px solid var(--line); background: var(--panel); scrollbar-width: thin; }
.ws-panel h2 { margin: 16px 2px 8px; font: 700 12px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin-top: 2px; }
.process-list { display: grid; gap: 6px; }
.proc {
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer;
}
.proc svg { grid-row: span 2; width: 30px; height: 30px; color: var(--ink-2); }
.proc b { font: 700 16px/1.05 var(--head); letter-spacing: .02em; }
.proc small { color: var(--ink-3); font-size: 12px; }
.proc:hover { border-color: var(--line-2); }
.proc[aria-checked="true"] { border-color: var(--hot); background: linear-gradient(90deg, rgba(255, 138, 61, .16), rgba(255, 138, 61, .04)); }
.proc[aria-checked="true"] svg { color: var(--hot); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 9px; background: #0d1114; border: 1px solid var(--line); }
.seg button { border: 0; padding: 8px 4px; border-radius: 7px; background: none; color: var(--ink-2); font: 700 12.5px/1 var(--ui); cursor: pointer; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--hot); color: #1a1208; }
.seg.small { margin-top: 10px; }
.realism-note { margin: 8px 2px 4px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; min-height: 2.8em; }
.fixed-note { margin: 4px 2px; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.field { display: grid; gap: 6px; margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field select { padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); }
.field.range { grid-template-columns: 1fr auto; }
.field.range input { grid-column: 1 / -1; }
.field .val { color: var(--ink); font-variant-numeric: tabular-nums; }
.field.zone-good .val { color: var(--good); } .field.zone-warn .val { color: var(--warn); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: none; margin: 0; width: 100%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--hot) var(--p, 50%), #2c353c var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #2c353c; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--hot); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #f5f7f8; border: 2px solid var(--hot); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #f5f7f8; border: 2px solid var(--hot); }
.knobs { display: grid; }
.check { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--hot); }

/* ---------- Stage ---------- */
.ws-stage { grid-area: stage; position: relative; overflow: clip; background: #0e1215; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: crosshair; }
#view.orbit { cursor: grab; }
#view.pan { cursor: move; }
.ws-panel input, .ws-panel select, .text-in { user-select: text; -webkit-user-select: text; }
.stage-head { position: absolute; left: 18px; top: 14px; max-width: min(520px, 55%); pointer-events: none; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.kicker { margin: 0 0 6px; font: 700 11px/1 var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--hot-2); }
.stage-title { margin: 0; font: 800 clamp(22px, 2.6vw, 34px)/1.02 var(--head); letter-spacing: .01em; }
.stage-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.stage-tools { position: absolute; right: 14px; top: 14px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 50%; }
.reticle { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--blue); border-radius: 50%; pointer-events: none; display: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.reticle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: var(--blue); border-radius: 50%; }
.reticle.on { display: block; }

.card { background: rgba(20, 26, 30, .9); border: 1px solid var(--line-2); border-radius: 12px; backdrop-filter: blur(8px); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.side-card { position: absolute; left: 18px; top: 116px; width: 300px; max-height: calc(100% - 230px); overflow-y: auto; padding: 14px; scrollbar-width: thin; }
.side-card:empty { display: none; }
.side-card h3 { margin: 0 0 4px; font: 800 20px/1.1 var(--head); }
.side-card .eyebrow { margin: 0 0 8px; font: 700 11px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--hot-2); display: flex; justify-content: space-between; }
.side-card .eyebrow button { border: 0; background: none; color: var(--ink-3); font: 600 12px/1 var(--ui); letter-spacing: 0; text-transform: none; cursor: pointer; }
.side-card p { margin: 6px 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.side-card p strong { color: var(--ink); }
.side-card .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.side-card .row .ws-btn { flex: 1 1 auto; }
.lesson-steps { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.lesson-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: 13.5px; color: var(--ink-3); }
.lesson-steps li::before { content: ""; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-2); }
.lesson-steps li.now { color: var(--ink); } .lesson-steps li.now::before { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255, 138, 61, .25); }
.lesson-steps li.done { color: var(--ink-2); } .lesson-steps li.done::before { background: var(--good); border-color: var(--good); }
.progress { height: 6px; border-radius: 6px; background: #0d1114; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: var(--hot); width: 0; transition: width .2s; }
.joint-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.joint-list li button { width: 100%; display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 13px; cursor: pointer; }
.joint-list li button[aria-current="true"] { border-color: var(--hot); }
.joint-list li button:disabled { opacity: .5; cursor: default; }
.joint-list .st { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.joint-list .st.ok { color: var(--good); }
.preset-list { display: grid; gap: 4px; margin: 8px 0; }
.preset-list button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.preset-list button[aria-pressed="true"] { border-color: var(--hot); background: rgba(255, 138, 61, .1); }
.preset-list small { display: block; color: var(--ink-3); margin-top: 2px; font-size: 12px; }
.text-in { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #0d1114; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip-row button { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 12.5px; cursor: pointer; }
.chip-row button[aria-pressed="true"] { border-color: var(--hot); color: var(--hot-2); }

.proc-actions { position: absolute; right: 14px; bottom: 92px; display: flex; gap: 8px; align-items: center; }
.proc-actions .ws-btn { min-height: 42px; }
#fillerBtn[aria-pressed="true"] { background: var(--hot); color: #1a1208; }
.electrode { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 8px; background: rgba(17, 22, 25, .8); border: 1px solid var(--line-2); font-size: 12px; color: var(--ink-2); }
.electrode i { width: 90px; height: 8px; border-radius: 6px; background: #0d1114; overflow: hidden; }
.electrode b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #9a8a6c, #cdbb92); }
.electrode.low b { background: var(--bad); }

.hud {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 10px 14px; background: linear-gradient(180deg, rgba(14, 18, 21, 0), rgba(14, 18, 21, .82) 30%); min-height: 78px;
}
.meters { display: flex; gap: 18px; }
.meter { display: grid; gap: 3px; min-width: 76px; }
.meter span { font: 700 10.5px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.meter b { font: 800 22px/1 var(--head); font-variant-numeric: tabular-nums; }
.meter b.good { color: var(--good); } .meter b.warn { color: var(--warn); } .meter b.bad { color: var(--bad); } .meter b.hot { color: var(--hot-2); }
.bar { position: relative; display: block; width: 96px; height: 5px; border-radius: 4px; background: linear-gradient(90deg, #3a6fb0 0 30%, var(--good) 30% 70%, var(--bad) 70%); opacity: .8; }
.bar em { position: absolute; top: -3px; width: 3px; height: 11px; border-radius: 2px; background: #fff; left: 0; transition: left .08s; box-shadow: 0 0 4px #000; }
.hint { margin: 0; display: grid; gap: 3px; justify-items: center; text-align: center; font-size: 13.5px; }
.hint span { color: var(--ink-3); font-size: 12.5px; }
.actions { display: flex; gap: 6px; }
.actions .ws-btn { min-height: 42px; }

.toast {
  position: absolute; left: 50%; top: 66px; transform: translate(-50%, -12px); padding: 10px 16px; border-radius: 10px; background: rgba(20, 26, 30, .94);
  border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: min(460px, 86%); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { border-color: var(--warn); } .toast.good { border-color: var(--good); }
.paused-veil { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; background: rgba(10, 13, 15, .55); text-align: center; }
.paused-veil p { margin: 0; font: 800 34px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; }
.ws-loading { position: absolute; inset: 0; display: grid; place-content: center; background: #0e1215; color: var(--ink-3); font: 700 14px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; transition: opacity .4s; }
.ws-loading.done { opacity: 0; pointer-events: none; }

/* Helmet: cosmetic lens frame; the lens darkens with the arc via --shade. */
.helmet { position: absolute; inset: 0; pointer-events: none; display: none; }
.helmet.on { display: block; }
.helmet::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 62% 48% at 50% 48%, transparent 92%, #050607 93%); }
.helmet .lens { position: absolute; left: 19%; right: 19%; top: 24%; bottom: 28%; border-radius: 14px; box-shadow: 0 0 0 4000px rgba(4, 5, 6, .9), inset 0 0 0 3px #1f2428; background: rgba(12, 30, 18, var(--shade, 0)); mix-blend-mode: multiply; transition: background .06s; }

.ws-status { grid-area: status; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: var(--panel); }
.ws-status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 8px; vertical-align: 1px; }
.status-right { display: flex; align-items: center; gap: 10px; }

/* ---------- Dialogs ---------- */
.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 40px); padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: #161c20; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal.wide { width: min(960px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(5, 8, 10, .62); backdrop-filter: blur(3px); }
.modal-body { padding: 18px 20px 20px; }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.modal h2 { margin: 0; font: 800 24px/1.1 var(--head); }
.modal h3 { margin: 18px 0 6px; font: 700 12px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.modal .lede { color: var(--ink-2); margin: 4px 0 14px; }
.modal .fine { color: var(--ink-3); font-size: 12px; margin-top: 16px; }
.keys { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }
.grade-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin: 8px 0 14px; }
.grade { width: 76px; height: 76px; border-radius: 14px; display: grid; place-items: center; font: 900 46px/1 var(--head); color: #1a1208; background: var(--hot); }
.grade.A, .grade.B { background: var(--good); } .grade.D, .grade.F { background: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
.stat span { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.stat span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stat i { display: block; height: 6px; border-radius: 6px; background: #0d1114; margin-top: 4px; overflow: hidden; }
.stat i em { display: block; height: 100%; background: var(--hot); }
.defects { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.defects li { padding: 8px 10px; border-radius: 8px; background: #1d2429; border-left: 3px solid var(--warn); font-size: 13px; color: var(--ink-2); }
.defects li b { color: var(--ink); display: block; margin-bottom: 2px; }
.defects li.ok { border-left-color: var(--good); }
.modal .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: flex-end; }
.joint-results { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.joint-results td, .joint-results th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.joint-results th { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.joint-results td:last-child, .joint-results th:last-child { text-align: right; }
.load-meter { height: 14px; border-radius: 8px; background: #0d1114; overflow: hidden; margin: 10px 0; position: relative; }
.load-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--good), var(--warn), var(--bad)); }
.load-meter::after { content: ""; position: absolute; left: 80%; top: 0; bottom: 0; width: 2px; background: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.project-card { text-align: left; padding: 0; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; overflow: hidden; display: grid; }
.project-card:hover { border-color: var(--hot); }
.project-card canvas { width: 100%; aspect-ratio: 16 / 10; display: block; background: #20272c; }
.project-card div { padding: 10px 12px 12px; }
.project-card b { font: 800 16px/1.1 var(--head); display: block; }
.project-card small { color: var(--ink-3); font-size: 12px; display: block; margin-top: 4px; line-height: 1.35; }
.project-card .tag { display: inline-block; margin-top: 8px; font: 700 11px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--hot-2); }
.project-card .rec { float: right; color: var(--good); }
.lab-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.lab-table th, .lab-table td { padding: 5px 3px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.lab-table th:first-child, .lab-table td:first-child { text-align: left; }
.lab-table th { color: var(--ink-3); font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.badge { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.badge.got { border-color: var(--good); color: var(--ink); }
.badge small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }

/* ---------- About (crawlable copy) ---------- */
.delivery-about { max-width: 860px; margin: 0 auto; padding: 56px 20px 72px; color: var(--ink-2); line-height: 1.65; font-size: 16px; }
.delivery-about .eyebrow { font: 700 12px/1 var(--head); letter-spacing: .18em; color: var(--hot-2); margin: 0 0 8px; }
.delivery-about h2 { color: var(--ink); font: 800 30px/1.1 var(--head); margin: 32px 0 10px; }
.delivery-about h2:first-of-type { font-size: 40px; margin-top: 0; }
.delivery-about ol { padding-left: 22px; } .delivery-about li { margin: 6px 0; }
.delivery-about details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; background: var(--panel); }
.delivery-about summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.delivery-about a { color: var(--hot-2); }

/* ---------- Small screens ---------- */
@media (max-width: 1100px) {
  .ws-tabs { padding-right: 230px; }
  #journalBtn { display: none; }
  .side-card { width: 270px; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px 44px minmax(0, 1fr) 26px; grid-template-areas: "brand" "top" "stage" "status"; }
  #app > h1 { border-right: 0; font-size: 16px; padding-left: 50px; }
  .ws-mark { top: 10px; width: 26px; height: 26px; }
  .ws-top-actions { top: 6px; right: 8px; }
  .ws-tabs { padding: 0 8px; }
  .ws-tabs button { padding: 8px 10px; font-size: 13px; }
  .setup-btn, .close-panel { display: inline-flex !important; }
  #soundBtn { width: 36px; padding: 0; font-size: 0; }
  #soundBtn::before { content: "\266A"; font-size: 16px; }
  #soundBtn[aria-pressed="false"]::before { content: "\2715"; font-size: 14px; }
  .ws-panel { position: absolute; z-index: 20; left: 0; right: 0; bottom: 26px; top: 92px; transform: translateY(102%); transition: transform .25s; border-top: 1px solid var(--line-2); border-right: 0; box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); }
  .ws-panel.open { transform: none; }
  .process-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .stage-head { left: 12px; top: 10px; max-width: 60%; }
  .stage-sub { display: none; }
  .stage-title { font-size: 20px; }
  .stage-tools { right: 8px; top: 8px; gap: 4px; max-width: 46%; }
  .stage-tools .ws-btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .side-card { left: 8px; right: 8px; top: auto; bottom: 136px; width: auto; max-height: 42%; padding: 12px; }
  .side-card h3 { font-size: 17px; }
  .hud { grid-template-columns: 1fr; gap: 6px; padding: 6px 8px 8px; }
  .meters { gap: 10px; justify-content: space-between; }
  .meter { min-width: 0; }
  .meter b { font-size: 16px; }
  .bar { width: 64px; }
  .hint { display: none; }
  .actions { justify-content: stretch; }
  .actions .ws-btn { flex: 1 1 0; min-height: 40px; padding: 0 8px; font-size: 12.5px; }
  .proc-actions { bottom: 96px; right: 8px; }
  .proc-actions .ws-btn, .electrode { min-height: 38px; height: 38px; }
  .electrode i { width: 56px; }
  .ws-status { font-size: 11px; }
  .status-left { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .delivery-about { padding: 40px 16px 56px; }
  .delivery-about h2:first-of-type { font-size: 32px; }
}
@media (max-width: 420px) {
  .meter:nth-child(3) { display: none; }
  .bar { width: 52px; }
}
@media (prefers-reduced-motion: reduce) { .toast, .ws-panel, .progress i { transition: none; } }

/* The site's save pill, docked into the status bar. */
.ws-status .rex-progress-pill { position: static !important; display: inline-flex !important; max-width: 100% !important; padding: 0 0 0 8px !important; gap: 8px !important; background: transparent !important; color: var(--ink-3) !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; font: 600 12px/1 var(--ui) !important; white-space: nowrap; }
.ws-status .rex-progress-pill button { min-height: 22px !important; padding: 0 10px !important; background: var(--panel-2) !important; border: 1px solid var(--line-2) !important; color: var(--ink) !important; font-size: 11.5px !important; }
@media (max-width: 860px) {
  .stage-head { top: 8px; }
  .stage-tools { left: 8px; right: 8px; top: 40px; max-width: none; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 860px) {
  /* On phones the card sits under the tool row so the lower stage stays free for welding. */
  .side-card { top: 84px; bottom: auto; max-height: 36%; }
  .side-card .quick-tip { display: none; }
}
