/* entity-wizard.css — page-local styles for 23-entity-wizard.html
   house theme. Shared chrome (.pg*, .phone*) comes from page.css / catalog.css.
   Surface-B bench-card classes ported from 21-upick-forms for the step-6 review. */

/* ---------- model band (shared with 21/22) ---------- */
.upick-band {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--space-6);
  display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-6) var(--space-8);
}
@media (max-width: 920px) { .upick-band { grid-template-columns: 1fr; } }
.upick-band h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-xl); letter-spacing: var(--display-tracking); margin: 0 0 var(--space-3); color: var(--ink); }
.upick-band p { margin: 0 0 var(--space-3); color: var(--ink-muted); font-size: var(--text-base); line-height: 1.55; }
.upick-band b { color: var(--ink); font-weight: 600; }
.upick-band code, .spec code, .reco code, .man-table code, .fila-cap code { font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-sunk); padding: 1px 5px; border-radius: var(--radius-xs); color: var(--ink); }
.upick-deflist { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-4); align-items: baseline; }
.upick-deflist dt { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--ink); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.upick-deflist dd { margin: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.4; }

/* FILA chain mini */
.fila { display: flex; align-items: stretch; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-4) 0 var(--space-3); }
.fila__node { flex: 1; min-width: 120px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.fila__node.is-form, .fila__node.is-item { background: var(--surface-sunk); }
.fila__node.is-lot, .fila__node.is-alloc { background: var(--surface-raised); border-color: var(--ink); }
.fila__g { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); color: var(--ink); }
.fila__d { font-family: var(--font-mono); font-size: 9px; color: var(--ink-muted); line-height: 1.3; }
.fila__arr { display: flex; align-items: center; color: var(--ink-subtle); font-size: 18px; }
.fila-cap { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; margin: 0; }
.fila-cap b { color: var(--ink); }

/* ---------- surf head (shared with 21/22) ---------- */
.surf-head { display: flex; align-items: baseline; gap: var(--space-4); margin: var(--space-6) 0 var(--space-2); flex-wrap: wrap; }
.surf-head .surf-tag { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-caps); background: var(--accent); color: var(--accent-ink); padding: 4px var(--space-3); border-radius: var(--radius-xs); }
.surf-head h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-2xl); letter-spacing: var(--display-tracking); margin: 0; }
.surf-head .surf-where { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-subtle); margin-left: auto; }

/* ---------- wizard layout ---------- */
.wiz-layout { display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--space-8); align-items: start; }
@media (max-width: 920px) { .wiz-layout { grid-template-columns: 1fr; } }
.phone-wrap { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.phone-cap { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-subtle); text-transform: uppercase; letter-spacing: var(--tracking-wide); max-width: 390px; line-height: 1.5; }
.phone-cap b { color: var(--ink-muted); }
.wiz-side { display: flex; flex-direction: column; gap: var(--space-4); }

/* step rail */
.step-rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.step-rail li { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); }
.step-rail li .sn { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 700; color: var(--ink-subtle); }
.step-rail li .st { font-size: var(--text-2xs); color: var(--ink-muted); font-weight: 600; line-height: 1.25; }
.step-rail li.is-done { background: var(--surface-sunk); }
.step-rail li.is-done .sn { color: var(--positive); }
.step-rail li.is-active { border-color: var(--ink); background: var(--ink); }
.step-rail li.is-active .sn, .step-rail li.is-active .st { color: var(--ink-inverse); }

/* spec / reco cards (shared with 21/22) */
.spec { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.spec__head { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--space-3); }
.spec__head h3 { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); margin: 0; }
.spec__body { padding: var(--space-4) var(--space-5); }
.spec__body p { margin: 0 0 var(--space-3); color: var(--ink-muted); font-size: var(--text-sm); line-height: 1.5; }
.spec__body p:last-child { margin-bottom: 0; }
.spec__body b { color: var(--ink); font-weight: 600; }
.reco { border-left: 3px solid var(--positive); background: var(--positive-soft); border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5); }
.reco strong { color: var(--positive); font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); display: block; margin-bottom: var(--space-2); }
.reco p { margin: 0; color: var(--ink); font-size: var(--text-sm); line-height: 1.5; }

/* =====================================================================
   THE WIZARD (inside .phone__body) — vanilla JS renders into #wiz
   ===================================================================== */
.wiz { display: flex; flex-direction: column; height: 100%; background: var(--surface); overflow: hidden; }

/* top bar + progress */
.wiz__top { flex-shrink: 0; background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.wiz__bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px 9px; }
.wiz__back { width: 34px; height: 34px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.wiz__back:disabled { opacity: 0.3; cursor: default; }
.wiz__where { flex: 1; min-width: 0; }
.wiz__step { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-subtle); }
.wiz__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.1; color: var(--ink); margin-top: 1px; }
.wiz__reset { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-subtle); background: none; border: 0; cursor: pointer; padding: 6px; }
.wiz__reset:hover { color: var(--ink); }
.wiz__prog { display: flex; gap: 3px; padding: 0 14px 10px; }
.wiz__prog i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.wiz__prog i.is-done { background: var(--positive); }
.wiz__prog i.is-now { background: var(--ink); }

.wiz__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px 18px; }
.wiz__dock { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--surface-raised); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }

/* big buttons */
.wbtn { min-height: 50px; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-sm); font-family: var(--font-text); font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); }
.wbtn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wbtn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.wbtn--ghost { flex: 0 0 auto; border-color: transparent; background: transparent; color: var(--ink-muted); min-width: 50px; }
.wbtn--ghost:hover { background: var(--surface-sunk); }

/* generic blocks */
.w-eyebrow { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-subtle); }
.w-h { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); margin: 4px 0 0; }
.w-lede { font-size: 13px; color: var(--ink-muted); line-height: 1.5; margin: 8px 0 0; }
.w-gate { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--danger); margin-top: 10px; }
.w-gate .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.w-gate.is-ok { color: var(--positive); }
.w-gate.is-ok .dot { background: var(--positive); }

/* photo strip (step 1 + step 5 pinned) */
.w-shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0 0; }
.w-shot { aspect-ratio: 1; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.w-shot .ph2 { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--surface-sunk) 0, var(--surface-sunk) 6px, var(--line) 6px, var(--line) 7px); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; font-family: var(--font-mono); font-size: 7px; color: var(--ink-subtle); text-transform: uppercase; }
.w-shot--add { border-style: dashed; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink-subtle); background: var(--surface-raised); }
.w-shots-cap { font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 0.06em; margin: 6px 0 0; }

/* description scaffold */
.w-scaffold { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0 8px; }
.w-scaffold .sc { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 9px; display: inline-flex; gap: 5px; align-items: center; }
.w-scaffold .sc b { color: var(--ink); font-weight: 700; font-family: var(--font-text); }
.w-ta { width: 100%; min-height: 96px; resize: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font-family: var(--font-text); font-size: 14px; line-height: 1.5; padding: 11px 12px; }
.w-ta:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.w-help { font-size: 11px; color: var(--ink-subtle); line-height: 1.4; margin: 8px 0 0; }

/* predict — parse + branch + vision */
.w-section-lbl { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-subtle); margin: 16px 0 6px; }
.w-branch { display: flex; gap: 6px; margin: 14px 0 0; }
.w-branch button { flex: 1; border: 1px solid var(--line-strong); background: var(--surface-raised); border-radius: var(--radius-sm); padding: 8px 6px; cursor: pointer; text-align: left; }
.w-branch button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-sunk); }
.w-branch .bt { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-subtle); }
.w-branch .bd { font-size: 11px; font-weight: 600; color: var(--ink); margin-top: 2px; line-height: 1.2; }
.w-banner { margin: 14px 0 0; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; line-height: 1.45; }
.w-banner--draft { background: var(--warn-soft); border: 1px solid color-mix(in oklch, var(--warn) 28%, transparent); color: var(--ink); }
.w-banner--hit { background: var(--positive-soft); border: 1px solid color-mix(in oklch, var(--positive) 28%, transparent); color: var(--ink); }
.w-banner b { font-weight: 700; }
.w-parse { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); margin: 8px 0 0; overflow: hidden; }
.w-parse .pr { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); align-items: baseline; }
.w-parse .pr:last-child { border-bottom: 0; }
.w-parse .pk { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-subtle); }
.w-parse .pv { font-size: 13px; color: var(--ink); font-weight: 500; }
.w-parse .pv em { font-style: normal; color: var(--positive); font-family: var(--font-mono); font-size: 10px; }
.w-vision { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; }
.w-vision .vi { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-xs); background: var(--surface-sunk); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); }
.w-vision .vt { font-size: 11px; line-height: 1.45; color: var(--ink-muted); }
.w-vision .vt b { color: var(--ink); }
.w-vision .vt .ok { color: var(--positive); font-weight: 700; }

/* confirm — name, slug, leaf */
.w-field { margin: 16px 0 0; }
.w-field > label { display: block; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-subtle); margin-bottom: 6px; }
.w-field > label .reqmark { color: var(--danger); }
.w-input { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font-family: var(--font-text); font-size: 15px; padding: 0 12px; }
.w-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.w-slug { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); margin: 6px 0 0; }
.w-slug b { color: var(--ink); }
.w-leaf { border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--surface-sunk); padding: 11px 12px; display: flex; align-items: center; gap: 10px; }
.w-leaf .lf-id { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--ink); }
.w-leaf .lf-nm { font-size: 13px; color: var(--ink); flex: 1; min-width: 0; }
.w-leaf .lf-conf { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: var(--radius-pill); background: var(--positive-soft); color: var(--positive); }
.w-leaf .lf-change { font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); text-decoration: underline; cursor: pointer; background: none; border: 0; }
.w-leaf-alts { display: flex; flex-direction: column; gap: 5px; margin: 8px 0 0; }
.w-leaf-alts button { text-align: left; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); padding: 9px 11px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.w-leaf-alts button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-sunk); }
.w-leaf-alts .a-id { font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.w-leaf-alts .a-nm { font-size: 12px; color: var(--ink-muted); }
.w-note { font-size: 11px; color: var(--ink-subtle); line-height: 1.45; margin: 12px 0 0; }
.w-note b { color: var(--ink-muted); }

/* per-image edit */
.w-canvas { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-strong); margin: 10px 0 0; }
.w-canvas .ph2 { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--surface-sunk) 0, var(--surface-sunk) 9px, var(--line) 9px, var(--line) 10px); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 0.06em; }
.w-crop { position: absolute; inset: 9%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 0 9999px rgba(0,0,0,.32); }
.w-crop::before, .w-crop::after { content: ""; position: absolute; background: rgba(255,255,255,.5); }
.w-crop::before { left: 33.3%; right: 33.3%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.5); border-right: 1px solid rgba(255,255,255,.5); background: none; }
.w-crop::after { top: 33.3%; bottom: 33.3%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.5); border-bottom: 1px solid rgba(255,255,255,.5); background: none; }
.w-crop .h { position: absolute; width: 12px; height: 12px; border: 2px solid #fff; }
.w-crop .h.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.w-crop .h.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.w-crop .h.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.w-crop .h.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.w-tools { display: flex; gap: 6px; margin: 10px 0 0; }
.w-tools button { flex: 1; min-height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font-family: var(--font-text); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.w-tools button:hover { background: var(--surface-sunk); }
.w-reused { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-subtle); margin: 6px 0 0; display: inline-flex; gap: 5px; align-items: center; }
.w-reused .dia { width: 7px; height: 7px; background: var(--ink-subtle); transform: rotate(45deg); }
.w-imgname { font-family: var(--font-mono); font-size: 12px; color: var(--ink); margin: 14px 0 0; }
.w-imgname .slug { color: var(--ink-muted); }
.w-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 0; }
.w-role { min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px; }
.w-role[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); }
.w-role .rn { font-size: 12px; font-weight: 600; color: var(--ink); }
.w-role[aria-pressed="true"] .rn { color: var(--ink-inverse); }
.w-role .rg { font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-subtle); }
.w-role[aria-pressed="true"] .rg { color: rgba(255,255,255,.6); }
.w-role .guess { font-family: var(--font-mono); font-size: 7px; color: var(--positive); }

/* attribute cycle */
.w-pinned { display: flex; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.w-pinned .pt { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.w-pinned .pt.is-hero { border: 2px solid var(--ink); }
.w-pinned .pt .ph2 { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--surface-sunk) 0, var(--surface-sunk) 5px, var(--line) 5px, var(--line) 6px); }
.w-pinned .pt .pl { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--font-mono); font-size: 6px; text-align: center; background: var(--ink); color: var(--ink-inverse); text-transform: uppercase; padding: 1px 0; }
.w-grain { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.w-grain .gt { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.w-grain .gscope { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 7px; border-radius: var(--radius-pill); }
.w-grain .gscope.shared { background: var(--surface-sunk); color: var(--ink-muted); border: 1px solid var(--line); }
.w-grain .gscope.yours { background: var(--ink); color: var(--ink-inverse); }
.w-attr-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.w-attr-meta .ag { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-subtle); }
.w-attr-meta .arq { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: var(--radius-pill); }
.w-attr-meta .arq.req { background: var(--danger-soft); color: var(--danger); }
.w-attr-meta .arq.opt { background: var(--surface-sunk); color: var(--ink-subtle); }
.w-attr-label { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--ink); margin: 0 0 3px; }
.w-attr-sub { font-size: 12px; color: var(--ink-muted); line-height: 1.45; margin: 0 0 12px; }
.w-attr-resolved { font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); margin: 8px 0 0; }
.w-attr-resolved b { color: var(--positive); }
.w-attr-count { font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); text-align: center; }

/* ladder mini */
.w-ladder { display: flex; flex-direction: column; gap: 6px; }
.w-ladder .lr { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; }
.w-ladder .lk { font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); text-transform: uppercase; }
.w-ladder .lv { border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); padding: 7px 9px; font-size: 12px; color: var(--ink); }
.w-ladder .lv .cnt { float: right; font-family: var(--font-mono); font-size: 8px; color: var(--ink-subtle); }

/* aspects */
.w-aspects { display: flex; flex-direction: column; gap: 7px; }
.w-aspects .ar { display: grid; grid-template-columns: 1fr; gap: 3px; }
.w-aspects .ak { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-subtle); }
.w-aspects .ak .from-leaf { color: var(--positive); }
.w-aspects .av { border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); padding: 8px 10px; font-size: 13px; color: var(--ink); }

/* select / chips */
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-chips button { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); padding: 9px 12px; font-size: 13px; color: var(--ink); cursor: pointer; min-height: 42px; }
.w-chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--ink-inverse); }
.w-chips button .sub { display: block; font-family: var(--font-mono); font-size: 8px; color: var(--ink-subtle); }
.w-chips button[aria-pressed="true"] .sub { color: rgba(255,255,255,.6); }

/* qty stepper */
.w-qty { display: flex; align-items: center; gap: 12px; }
.w-qty button { width: 50px; height: 50px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); font-size: 24px; color: var(--ink); cursor: pointer; }
.w-qty .qv { font-family: var(--font-display); font-weight: 600; font-size: 30px; min-width: 44px; text-align: center; }
.w-qty-note { font-size: 11px; color: var(--ink-subtle); margin: 10px 0 0; line-height: 1.4; }

/* =====================================================================
   LIVE-WIRING bits — API source pills, spinners, loading, routed result
   ===================================================================== */
.w-src { font-family: var(--font-mono); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: var(--radius-pill); vertical-align: middle; }
.w-src.is-live { background: var(--positive-soft); color: var(--positive); }
.w-src.is-offline { background: var(--warn-soft); color: var(--warn); }
.w-spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: w-spin 0.7s linear infinite; }
.w-spin--sm { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -2px; border-top-color: var(--accent-ink); border-color: color-mix(in oklch, var(--accent-ink) 35%, transparent); border-top-color: var(--accent-ink); }
@keyframes w-spin { to { transform: rotate(360deg); } }
.w-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 30px 24px; gap: 12px; }
.w-loading .w-h { margin: 0; }
.w-err { background: var(--danger-soft); border: 1px solid color-mix(in oklch, var(--danger) 30%, transparent); color: var(--ink); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12px; line-height: 1.45; margin: 0 0 12px; }
.w-err b { color: var(--danger); }
.w-routed { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 260px; margin: 4px 0 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.w-routed .rr { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); align-items: baseline; text-align: left; }
.w-routed .rr:last-child { border-bottom: 0; }
.w-routed .rk { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-subtle); }
.w-routed .rv { font-family: var(--font-mono); font-size: 10px; color: var(--ink); word-break: break-all; }

/* status strip under the phone */
.api-status { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink-muted); }
.api-status .as-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-subtle); }
.api-status.is-live .as-dot { background: var(--positive); }
.api-status.is-offline .as-dot { background: var(--warn); }
.api-status.is-unknown .as-dot { background: var(--ink-subtle); animation: w-spin 1s linear infinite; }
.api-status .as-base { color: var(--ink); }

/* wiring panel: step → endpoint map */
.wire { display: flex; flex-direction: column; gap: 0; }
.wire-row { display: grid; grid-template-columns: 18px 1fr auto; gap: var(--space-3); align-items: center; padding: 8px var(--space-2); border-bottom: 1px solid var(--line); }
.wire-row:last-child { border-bottom: 0; }
.wire-row .wn { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 700; color: var(--ink-subtle); }
.wire-row .we { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink); }
.wire-row .we small { display: block; font-family: var(--font-text); font-size: 11px; color: var(--ink-muted); margin-top: 1px; letter-spacing: 0; }
.wire-row .ws { font-family: var(--font-mono); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: var(--radius-pill); white-space: nowrap; }
.wire-row .ws.shipped { background: var(--surface-sunk); color: var(--ink-muted); }
.wire-row .ws.new { background: var(--ink); color: var(--ink-inverse); }
.deploy-note { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.55; margin: 0; }
.deploy-note code { font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-sunk); padding: 1px 5px; border-radius: var(--radius-xs); color: var(--ink); }
.deploy-note b { color: var(--ink); }

/* dims + weight, with independent unit toggles */
.w-measure { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.w-dims { display: flex; gap: 6px; align-items: flex-end; flex: 1; min-width: 0; }
.w-dims--solo .di { flex: 1; }
.w-dims .di { flex: 1; min-width: 0; }
.w-dims .di input { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); text-align: center; font-size: 15px; color: var(--ink); }
.w-dims .di input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.w-dims .di label { display: block; font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; color: var(--ink-subtle); text-align: center; margin-bottom: 3px; }
.w-dims .x { color: var(--ink-subtle); padding-bottom: 13px; }
.w-unit { flex: 0 0 auto; min-height: 46px; min-width: 56px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--surface-sunk); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 4px 10px; }
.w-unit b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); text-transform: lowercase; }
.w-unit span { font-family: var(--font-mono); font-size: 8px; color: var(--ink-subtle); margin-top: 2px; }
.w-unit:hover { background: var(--ink); }
.w-unit:hover b { color: var(--ink-inverse); }
.w-unit:hover span { color: rgba(255,255,255,.6); }

/* price */
.w-price { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); padding: 0 12px; }
.w-price .cur { font-family: var(--font-mono); font-size: 14px; color: var(--ink-muted); }
.w-price input { flex: 1; min-width: 0; border: 0; background: none; font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--ink); padding: 10px 0; }
.w-price input:focus { outline: none; }

/* drawer grid */
.w-drawer { margin: 4px 0 0; }
.w-drawer .dh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.w-drawer .dh .did { font-family: var(--font-mono); font-size: 11px; color: var(--ink); font-weight: 700; }
.w-drawer .dh .dsel { font-family: var(--font-mono); font-size: 11px; color: var(--positive); font-weight: 700; }
.w-grid { display: grid; grid-template-columns: 16px repeat(4, 1fr); gap: 4px; align-items: center; }
.w-grid .corner { }
.w-grid .colh, .w-grid .rowh { font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); text-align: center; font-weight: 700; }
.w-grid .cell { aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 9px; color: var(--ink-subtle); }
.w-grid .cell:hover { background: var(--surface-sunk); }
.w-grid .cell.is-sel { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.w-grid .cell.is-occupied { background: var(--surface-sunk); color: var(--ink-subtle); }
.w-drawer-cap { font-size: 10px; color: var(--ink-subtle); line-height: 1.4; margin: 8px 0 0; }

/* =====================================================================
   STEP 6 REVIEW — Surface B bench card (ported from 21-upick-forms.html)
   ===================================================================== */
.bench-card { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-1); margin-top: 6px; }
.bench-card__top { padding: 10px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.bench-card__top .sku { margin-left: auto; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-subtle); }
.status-pill { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--ink); }
.bench-card__id { padding: 11px 13px 0; }
.bench-card__axis { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--ink-subtle); }
.bench-card__name { font-family: var(--font-display); font-size: 19px; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.12; margin: 2px 0 0; color: var(--ink); }
.roles { display: flex; gap: 5px; padding: 12px 13px 10px; }
.role { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.role__slot { aspect-ratio: 1; border-radius: var(--radius-xs); position: relative; }
.role__slot--has { background: repeating-linear-gradient(135deg,var(--surface-sunk) 0,var(--surface-sunk) 6px,var(--line) 6px,var(--line) 7px); border: 1px solid var(--line-strong); }
.role__slot--miss { background: var(--surface); border: 1px dashed var(--line-strong); }
.role__slot--hero.role__slot--has { border: 2px solid var(--ink); }
.role__lbl { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-subtle); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role__slot--hero.role__slot--has + .role__lbl { color: var(--ink); font-weight: 700; }
.role__herotag { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--ink-inverse); font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.04em; padding: 1px 4px; border-radius: 2px; text-transform: uppercase; white-space: nowrap; }
.roles-cap { padding: 0 13px 10px; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-subtle); }
.bfields { display: grid; grid-template-columns: auto 1fr; gap: 0; border-top: 1px solid var(--line); }
.bfields dt { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--ink-subtle); padding: 7px 8px 7px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; }
.bfields dt .gtag { font-size: 7px; padding: 1px 4px; border-radius: 2px; background: var(--surface-sunk); color: var(--ink-subtle); letter-spacing: 0.02em; }
.bfields dt .gtag.yours { background: var(--ink); color: var(--ink-inverse); }
.bfields dd { margin: 0; padding: 7px 13px 7px 8px; border-bottom: 1px solid var(--line); font-size: var(--text-sm); color: var(--ink); text-align: right; font-family: var(--font-mono); display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bfields dd.editable-jump { cursor: pointer; }
.bfields dd.editable-jump:hover { background: var(--accent-soft); }
.blockers { margin: 11px 13px 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--positive-soft); border: 1px solid color-mix(in oklch, var(--positive) 30%, transparent); }
.blockers__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--positive); }
.blockers__head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); }
.review-note { font-size: 11px; color: var(--ink-subtle); line-height: 1.45; margin: 12px 0 0; padding: 0 1px; }
.review-note b { color: var(--ink-muted); }

/* edit overlay (jump-to-field list) */
.w-jumplist { margin: 12px 0 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.w-jumplist .jh { padding: 9px 12px; background: var(--surface-sunk); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.w-jumplist button { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: var(--surface-raised); padding: 11px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.w-jumplist button:hover { background: var(--surface-sunk); }
.w-jumplist .jl { flex: 1; font-size: 13px; color: var(--ink); }
.w-jumplist .jv { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.w-jumplist .jg { font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; padding: 2px 5px; border-radius: 2px; background: var(--surface-sunk); color: var(--ink-subtle); }

/* success */
.w-done { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 24px; }
.w-done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--positive); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 18px; }
.w-done h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--ink); margin: 0 0 8px; letter-spacing: -0.01em; }
.w-done p { font-size: 13px; color: var(--ink-muted); line-height: 1.5; margin: 0 0 18px; max-width: 260px; }
.w-done .chain { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
.w-done .chain .cn { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 8px; border-radius: var(--radius-pill); background: var(--surface-sunk); color: var(--ink); border: 1px solid var(--line); }
.w-done .chain .cn.new { background: var(--positive-soft); border-color: color-mix(in oklch, var(--positive) 30%, transparent); color: var(--positive); }

/* =====================================================================
   §6 manifest tables
   ===================================================================== */
.man-intro { font-size: var(--text-base); color: var(--ink-muted); line-height: 1.55; max-width: 760px; margin: 0 0 var(--space-5); }
.man-intro b { color: var(--ink); }
.man-h { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-lg); color: var(--ink); margin: var(--space-6) 0 var(--space-3); display: flex; align-items: baseline; gap: var(--space-3); }
.man-h span { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-subtle); font-weight: 400; }
.man-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); }
.man-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.man-table thead th { background: var(--surface-inverse); color: var(--ink-inverse); font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: 600; text-align: left; padding: 9px 14px; }
.man-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-muted); line-height: 1.45; }
.man-table tbody tr:last-child td { border-bottom: 0; }
.man-table td:first-child { color: var(--ink); font-weight: 500; }
.man-table td b { color: var(--ink); font-weight: 600; }
.man-table .req { color: var(--danger); font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.man-table .opt { color: var(--ink-subtle); font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; white-space: nowrap; }
.man-table tbody tr { border-left: 3px solid transparent; }
.man-table tr.g-form td:first-child, .man-table .g-form td:first-child { box-shadow: inset 3px 0 0 var(--ink-subtle); }
.man-table .g-form td:first-child { box-shadow: inset 3px 0 0 #b9b6ac; }
.man-table .g-item td:first-child { box-shadow: inset 3px 0 0 var(--ink-muted); }
.man-table .g-lot td:first-child { box-shadow: inset 3px 0 0 var(--positive); }
.man-table .g-alloc td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.man-table .g-img td:first-child { box-shadow: inset 3px 0 0 var(--line-strong); }
.man-table--beh td:first-child { white-space: nowrap; font-family: var(--font-mono); font-size: var(--text-xs); }
@media (max-width: 720px) { .man-table--beh td:first-child { white-space: normal; } .man-table { font-size: var(--text-xs); } }
