/* AM Pins - styles. Allegiance Mold navy band (the printed sheet's #1b3a5c); dark by default, light in the menu.
   Layout (ui-study 2026-11-27, direction A "Split Sheet", phone first): phone portrait = header + summary strip + tabs
   (Sheet | Drawing | 3D | History) + a bottom sheet; html.split (landscape from 560 px, anything from 900 px - app.js sets
   it from one media query) = the sheet list left, Map | Side | 3D right, both on screen. */
:root{color-scheme:dark;--bg:#12171d;--card:#1a2029;--strip:#161c24;--line:#2c3541;--text:#e4e9ef;--muted:#9aa6b6;--brand:#1b3a5c;--onbrand:#fff;
--accent:#8fb6e8;--sel:#23324a;--go:#1f8a4c;--go-btn:#1a7a43;--go-text:#4cc07c;--bad:#ff8a80;--warn:#f5c26b;--warnbg:#3d2e10;--pend:#f5c26b;
--input:#0f141a;--steel:#5d6b7d;--hdr:52px;
--f-head:"Barlow Condensed","Arial Narrow","Roboto Condensed",system-ui,sans-serif;
--f-text:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
--mono:"IBM Plex Mono",Consolas,"SF Mono",Menlo,monospace;--display:var(--f-head)}
:root[data-scheme="light"]{color-scheme:light;--bg:#eef1f4;--card:#fff;--strip:#e3e8ee;--line:#cfd6de;--text:#18212c;--muted:#5a6676;--accent:#1b3a5c;
--sel:#dbe6f4;--warn:#8a5300;--warnbg:#fdf1d8;--pend:#8a5300;--go-text:#1a7a43;--input:#fff;--steel:#6b7889;--bad:#b42318}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.4 var(--f-text);-webkit-tap-highlight-color:transparent;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
button:disabled{opacity:.4;cursor:default}
[hidden]{display:none !important}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.k{font-family:var(--mono);font-variant-numeric:tabular-nums}

/* ---------- header: back, job, sheet line + sync, Expert chip, menu; the summary strip as its second row ---------- */
header{background:var(--brand);color:var(--onbrand);position:sticky;top:0;z-index:4;padding-top:env(safe-area-inset-top);box-shadow:inset 0 -3px var(--go)}
.hin{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:2px max(10px,env(safe-area-inset-right)) 5px max(10px,env(safe-area-inset-left));min-height:55px}
.hin>*{order:3}
#bBack{order:1}.logo{order:2;border-radius:6px;background:#fff;flex:none}.ttl{order:3;flex:1 1 0;min-width:0}
.xchip{order:5}#bMenu{order:6}#hsum{order:10}
h1{font:700 24px/1 var(--f-head);margin:0;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.subrow{display:flex;align-items:center;gap:8px;min-width:0;height:18px;margin-top:3px;font-size:12.5px}
.sub{opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:0 1 auto}
.hb{flex:none;border:1px solid rgba(255,255,255,.35);border-radius:8px;padding:0 10px;min-height:48px;min-width:48px;color:var(--onbrand);font-size:20px}
header :focus-visible{outline-color:#fff}
/* sync: a dot + its words beside the sheet line (the sheet line gives way, the sync words are never cut - MODES.md "never
   hidden"); a narrow phone gives it its own line under the sheet line, reserved even when empty, so it never moves the page */
#sync{flex:0 0 auto;white-space:nowrap;font-weight:600;cursor:default}
#sync:empty{display:none}
@media (max-width:599.98px){
  .subrow{flex-wrap:wrap;height:auto;row-gap:1px}
  .sub{flex:1 1 100%}
  #sync,#sync:empty{display:block;flex:1 1 100%;min-height:17px;white-space:normal;line-height:17px}
  #sync:empty::before{display:none}
  .sub:not(:empty)+#sync:not(:empty){border-left:0;padding-left:0}
  body.lv #sync:empty{display:none}
}
#sync::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:1px;background:#f5c26b}
#sync.ok::before{background:#7fd396}
.sub:not(:empty)+#sync:not(:empty){border-left:1px solid rgba(255,255,255,.35);padding-left:8px}
/* the summary strip ('3/5 plates · 0/14 pin groups · Stack +.0040') */
#hsum{flex:1 0 100%;margin:0 calc(-1 * max(10px,env(safe-area-inset-right))) -5px calc(-1 * max(10px,env(safe-area-inset-left)));padding:0 14px;height:37px;
  display:flex;align-items:center;gap:8px;background:var(--strip);color:var(--text);border-top:3px solid var(--go);font-size:13.5px;white-space:nowrap;overflow:hidden}
#hsum:empty{display:none}
#hsum b{font:600 14px var(--mono)}
#hsum .dot{color:var(--muted)}
#hsum .pbar{flex:0 0 90px}
#hsum .chip{font-size:12px}
.xchip{flex:none;font:700 12px/1 var(--f-text);padding:0 10px;min-height:44px;border-radius:999px;border:1px solid rgba(255,255,255,.7);color:var(--onbrand);background:rgba(255,255,255,.14);letter-spacing:.03em}
:root:not([data-mode="expert"]) #bExpert{display:none}
body:not(.lv) header .logo{display:none}
@media (min-width:900px){body:not(.lv) header .logo{display:block}}
/* landscape phone: header + summary = ONE 44 px bar (the height is tiny) */
@media (orientation:landscape) and (max-height:500px){
  .hin{flex-wrap:nowrap;min-height:44px;padding-top:0;padding-bottom:3px}
  .hb{min-height:40px;min-width:44px}.xchip{min-height:36px}
  h1{font-size:21px}.subrow{height:15px;margin-top:1px;font-size:11.5px}

  .ttl{flex:0 0 auto;max-width:60%}
  #hsum{order:4;flex:1 1 auto;min-width:0;margin:0;height:auto;padding:0 6px;border:0;background:none;color:var(--onbrand);font-size:13px}
  #hsum .dot{color:rgba(255,255,255,.6)}
  #hsum .pbar{display:none}
  body.lv header .logo{width:28px;height:28px}
}

main{max-width:1280px;margin:0 auto;padding:8px 12px calc(24px + env(safe-area-inset-bottom))}
#msg:empty{display:none}
#msg{padding:8px 12px;margin:4px 0 8px;border-radius:8px;background:var(--warnbg);color:var(--warn)}
.empty{color:var(--muted);text-align:center;padding:24px 12px}
#setup{max-width:440px;margin:40px auto;padding:0 20px;text-align:center}
#setup .semb{border-radius:12px;background:#fff;display:block;margin:0 auto 12px}
#setup h2{font:700 26px/1.15 var(--f-head);letter-spacing:.02em}
#setup label{display:block;text-align:left;font-weight:600}
#setup input{width:100%;min-height:52px;margin:6px 0 12px;padding:8px 12px;border-radius:10px;border:1px solid var(--steel);background:var(--input);font-size:16px}
#setupMsg{color:var(--warn);font-weight:600}

/* ---------- job list ---------- */
.srch{margin:4px 0 6px}
.srch input{width:100%;min-height:52px;border-radius:10px;border:1px solid var(--steel);padding:8px 14px;background:var(--input);font-size:17px}
.fchips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.fchips::-webkit-scrollbar{display:none}
.fchip{flex:none;min-height:48px;padding:0 14px;border-radius:999px;border:1px solid var(--line);font-weight:500;white-space:nowrap}
.fchip b{font:600 13px var(--mono);margin-left:4px;color:var(--muted)}
.fchip[aria-pressed="true"]{background:var(--text);color:var(--bg);border-color:var(--text);font-weight:600}
.fchip[aria-pressed="true"] b{color:var(--bg)}
#list{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:minmax(0,1fr)}
#list .lsec,#pinHits .lsec{grid-column:1/-1;font:600 12px var(--f-text);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:12px 0 0}
.jcard{display:flex;flex-direction:column;gap:10px;width:100%;text-align:left;padding:14px 16px;border-radius:12px;background:var(--card);border:1px solid var(--line)}
.jcard .t1{display:flex;align-items:baseline;gap:10px;min-width:0}
.jcard .j{font:700 30px/1 var(--f-head);letter-spacing:.01em;flex:none}
.jcard .w{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.jcard .pr{display:flex;align-items:center;gap:10px}
.jcard .pr b{font:600 15px var(--mono);white-space:nowrap}
.jcard .m{font-size:13px;color:var(--muted)}
.pbar{display:block;flex:1;height:8px;border-radius:4px;background:var(--line);overflow:hidden}
.pbar i{display:block;height:100%;background:var(--go-text);border-radius:4px}
.jrow{display:grid;grid-template-columns:minmax(78px,auto) minmax(0,1fr) auto;align-items:center;gap:4px 12px;width:100%;text-align:left;min-height:60px;padding:8px 14px;
  border-radius:10px;background:var(--card);border:1px solid var(--line)}
.jrow .j{font:700 24px/1 var(--f-head);letter-spacing:.01em}
.jrow .m{display:block;font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jrow .m1{color:var(--text)}
.jrow .mold{font:600 13px var(--mono);margin-right:6px}
.jrow .when{display:none;font-size:13.5px;color:var(--muted);white-space:nowrap;text-align:right}
.chev{font-size:24px;color:var(--muted);flex:none;line-height:1}
.nocache{opacity:.55}
.soft{color:var(--muted)}
@media (min-width:700px){
  #list{grid-template-columns:1fr 1fr}
  #list li.r{grid-column:1/-1}
  .jrow{grid-template-columns:120px minmax(0,1fr) auto 24px}
  .jrow .when{display:block}
  .jrow .m2{display:none}
}
#pinHits ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}

/* chips: status colours are NOT the pin-group palette; amber = not saved / warnings only (ui-study #16) */
.chip{display:inline-block;font-size:12.5px;padding:2px 9px;border-radius:999px;border:1px solid var(--line);color:var(--muted);white-space:nowrap;vertical-align:middle}
.chip.done{border-color:var(--go);color:var(--text);background:color-mix(in srgb,var(--go) 25%,transparent)}
.chip.void{border-color:var(--warn);color:var(--warn)}
.chip.src{border-style:dashed}
.pend{display:inline-block;font-size:12px;font-weight:700;padding:0 6px;border-radius:999px;border:1px dashed var(--pend);color:var(--pend);margin-left:6px;font-family:var(--f-text);vertical-align:middle;white-space:nowrap}

/* ---------- job page: tabs on the phone, the split from html.split ---------- */
.tabs{position:sticky;top:var(--hdr);z-index:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:48px;margin:-8px -12px 10px;background:var(--bg);border-bottom:1px solid var(--line)}
.tabs button{display:flex;align-items:center;justify-content:center;color:var(--muted);font-weight:500;border-bottom:3px solid transparent;min-height:48px}
.tabs button[aria-selected="true"]{color:var(--text);font-weight:600;border-bottom-color:var(--accent)}
.view[data-tab="sheet"] .rp,.view[data-tab="hist"] .rp{display:none}
.view[data-tab="draw"] .lp,.view[data-tab="3d"] .lp{display:none}
.view[data-tab="sheet"] .pane-hist{display:none}
.view[data-tab="hist"] .pane-sheet{display:none}
#vBench .rp{display:none}
.jchips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:12px 14px;min-width:0}
.card+.card{margin-top:10px}
.card h3,.ghead h3{font:700 19px/1.1 var(--f-head);letter-spacing:.03em;margin:0 0 6px;text-transform:uppercase}
.card h3+p{margin-top:0}
.tw{overflow-x:auto}
table.t{width:100%;border-collapse:collapse;font-size:15px}
.t th{text-align:left;color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.06em;padding:4px 8px;border-bottom:1px solid var(--line)}
.t td{padding:9px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
.t tr:last-child td{border-bottom:0}
.t td.n,.t th.n{text-align:right;white-space:nowrap}
.t td.k{font-size:15px}
.t .nm{white-space:nowrap}
.t .ty{white-space:nowrap}
.t tr[data-group],.t tr[data-role]{cursor:pointer}
.t tr[data-group] td,.t tr[data-role] td{padding-top:11px;padding-bottom:11px}
.t tr.on td{background:var(--sel)}
.t tr.on td:first-child{box-shadow:inset 3px 0 var(--accent)}
.t .fl{display:none;color:var(--muted);font-size:12px;white-space:normal}
.t .meas{color:var(--muted);font-size:13px}
.t .pm{display:none;color:var(--text);font:500 13px/1.35 var(--f-text);white-space:normal;margin-top:3px}
.t tr.on .pm{display:block}
.t tr.corr td{border-top:0;padding-top:0;color:var(--muted);font:13px/1.35 var(--f-text)}
.t tr.corr b{color:var(--text)}
@media (max-width:480px){.t .ty{display:none}.t td,.t th{padding:8px 5px}.card{padding:10px}.t.pins .flags{display:none}.t .fl{display:block}}
.flags .chip{margin:1px 2px 1px 0}
.sw{display:inline-block;width:24px;height:24px;margin-right:8px;vertical-align:-7px;flex:none}
.sw text{fill:#fff;font-weight:700;font-family:var(--f-text);paint-order:stroke;stroke:rgba(0,0,0,.35);stroke-width:1.5px}
/* Make to: always the biggest number on the row (ui-study #7) */
.t td.mk .mkn{font:700 21px/1.1 var(--mono)}
.t.pins.simple td.mk .mkn{font-size:24px}
.ctag{display:block;font:700 11px var(--f-text);color:var(--accent);text-transform:uppercase;letter-spacing:.06em}
.t td.mk small,.grid .k small{display:block;font:600 12px var(--f-text);color:var(--muted);white-space:normal;text-align:right}
.t td.mk small.wait,.grid .k small.wait{color:var(--muted);font-weight:500}
.carried,.chg{display:block;font:600 12px var(--f-text);color:var(--muted);white-space:normal}
.chg{color:var(--warn)}
.dash{color:var(--muted)}
.corrsum{margin:0 0 8px;color:var(--muted);font-size:14px}.corrsum:empty{display:none}
.corrsum.on{display:block}
/* the stack correction (rules.corrTerms, Seth 2026-11-30): a strip of cells - label, the 4-place number, a note - that wraps */
.cx{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:flex-start;margin:2px 0}
.ct{display:inline-flex;flex-direction:column;align-items:flex-end}
.ct i{font:500 11px/1.25 var(--f-text);font-style:normal;color:var(--muted);white-space:nowrap}
.ct b{font:600 15px/1.25 var(--mono);font-variant-numeric:tabular-nums;color:var(--text);white-space:nowrap}
.ct small{font:500 11px/1.25 var(--f-text);color:var(--muted);white-space:nowrap}
.ct.eq,.ct.mk{padding-left:10px;border-left:2px solid var(--line)}
.ct.mk b{font-weight:700;color:var(--accent)}
.ct.wait b{color:var(--muted)}
.ct.warn i,.ct.warn small{color:var(--warn)}
.ct.warn small{white-space:normal;max-width:15em;text-align:right}
/* Tutorial mode (docs/tutorial-mode.md): explanations carry .tut and show only while the switch is on (boot.js data-tut) */
html:not([data-tut="1"]) .tut{display:none}
.selcard:empty{display:none !important}
.t .sm{display:block;color:var(--muted);font:400 13px/1.35 var(--f-text);white-space:normal}
.t .flw,.grid .lab small.flw{display:block;font:700 13px/1.35 var(--f-text);color:var(--text);white-space:normal}
.t .flw.aside{white-space:nowrap}
.t.pins.simple .nm{white-space:normal}
.lines{margin:6px 0 0;padding:0;list-style:none;font-size:14px}
.lines li{margin:3px 0}
.lines .info{font-weight:600}
.lines .warn{color:var(--warn);font-weight:700}
.note{color:var(--muted);font-size:13px;margin:6px 0 0}
/* the WARN / INFO block: every line in full (MODES.md section 4 #1: never hidden) */
.card.safety{border-left:4px solid var(--warn);margin:0 0 10px;padding:8px 12px}
.card.safety .lines{margin:0}
.qr{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center}
.qr svg{width:120px;height:120px;background:#fff;border-radius:4px}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);background:var(--card);border-radius:10px;padding:8px 14px;min-height:48px;text-decoration:none;font-weight:500}
.btn.pri{background:var(--go-btn);border-color:var(--go-btn);color:#fff;font-weight:600}
.btn.outline{background:transparent;border:2px solid var(--steel);font-weight:600}
.btn.danger{color:var(--bad);border-color:var(--bad)}
.btn.newer{display:flex;width:100%;justify-content:space-between;text-align:left;margin:0 0 10px;border:0;border-left:4px solid var(--accent);background:var(--sel);color:var(--text);font-weight:600}
.btn.wide{flex:1 1 100%;width:100%}
.runs{list-style:none;margin:0;padding:0}
.runs button{display:flex;gap:8px;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:8px 6px;min-height:48px;border-top:1px solid var(--line)}
.runs li:first-child button{border-top:0}
.runs button[aria-current="true"]{font-weight:700}
.runs .m{color:var(--muted);font-size:13px}
.photos{display:flex;flex-wrap:wrap;gap:8px}
.photos button{width:96px;height:96px;border-radius:8px;overflow:hidden;border:1px solid var(--line);padding:0;position:relative;background:var(--input)}
.photos img{width:100%;height:100%;object-fit:cover;display:block}
.photos .pend{position:absolute;left:4px;bottom:4px;margin:0;background:var(--card)}
details.hist summary,details.more>summary{cursor:pointer;min-height:48px;display:flex;align-items:center;font-weight:700;list-style:none}
details.hist summary::-webkit-details-marker,details.more>summary::-webkit-details-marker{display:none}
details.hist summary::before,details.more>summary::before{content:'\25B8';display:inline-block;width:1.2em;color:var(--muted)}
details.hist[open] summary::before,details.more[open]>summary::before{content:'\25BE'}
.hist ol{list-style:none;margin:0;padding:0;font-size:14px}
.hist li{padding:6px 0;border-top:1px solid var(--line)}
.hist .w{color:var(--muted);font-size:12px}
details.more h3{margin:12px 0 4px}
/* the job page's footer: Bench entry + Print, sticky under the sheet list */
.jfoot{position:sticky;bottom:0;z-index:2;display:flex;gap:8px;margin:12px -12px 0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line)}
.jfoot .btn{min-height:56px;font-size:17px}
.jfoot .bench-btn{flex:1 1 auto}
.view[data-tab="hist"] .jfoot .bench-btn{display:none}
.view[data-tab="hist"] .jfoot{position:static;border:0;padding-top:0}

/* ---------- the drawing pane: Map | Side | 3D, the picked group's card ---------- */
.rp{display:flex;flex-direction:column;gap:10px;min-width:0}
.seg.dsw{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);border:1px solid var(--line);border-radius:10px;overflow:hidden;flex:none;min-height:48px}
.dsw button{min-height:46px;color:var(--muted);font-weight:600;position:relative}
.dsw button+button{border-left:1px solid var(--line)}
.dsw button[aria-pressed="true"]{background:var(--text);color:var(--bg)}
.dsw .why{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--warn);margin-left:6px;vertical-align:1px}
html:not(.split) #vJob .dsw [data-act="3d"]{display:none}
.dbox{position:relative;min-width:0}
.dbox .dv{display:none}
.view[data-dv="map"] .dbox .dv-map,.view[data-dv="side"] .dbox .dv-side{display:block}
.dv-side{overflow:hidden}
.dnote{margin:0 0 6px;font-size:13px;font-weight:700;color:var(--warn)}
.dhint{margin:4px 0 0;color:var(--muted);font-size:13px}
.view:not([data-tab="3d"]) #v3dBox{display:none}
.view[data-tab="3d"] .dbox,.view[data-tab="3d"] .dsw,.view[data-tab="3d"] .selcard{display:none}
.v3d{height:max(300px,calc(100dvh - var(--hdr) - 48px - 150px));border-radius:10px;overflow:hidden;border:1px solid var(--line);position:relative}
.xpl{display:flex;align-items:center;gap:12px;margin-top:8px}
.xpl input[type=range]{flex:1;min-height:44px;-webkit-appearance:none;appearance:none;background:transparent}
.xpl input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:var(--line)}
.xpl input[type=range]::-moz-range-track{height:8px;border-radius:4px;background:var(--line)}
.xpl input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:32px;height:32px;margin-top:-12px;border-radius:50%;background:var(--go);border:3px solid #fff}
.xpl input[type=range]::-moz-range-thumb{width:32px;height:32px;border-radius:50%;background:var(--go);border:3px solid #fff}
.xpl .btn{margin-left:auto}
#v3dBox .note{margin-top:6px}
.v3go{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:200px;border:1px dashed var(--line);border-radius:10px}
.selcard{flex:none;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 14px;min-height:48px}
.selcard .h{display:flex;align-items:center;gap:8px;min-width:0}
.selcard .h b{font-size:16px;white-space:nowrap}
.selcard .h .ty{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.selcard .big{font:700 24px/1 var(--mono);white-space:nowrap}
.selcard .why{font-size:13px;color:var(--muted);margin-top:4px}
.selcard .why b{color:var(--text);font-weight:600}
.selcard .ctag{display:inline;margin-left:6px}
/* the phone's bottom sheet: the tapped pin group on a mini map + its Make to and stack */
#bsheet{position:fixed;left:0;right:0;bottom:0;z-index:6;height:min(44vh,420px);display:flex;flex-direction:column;gap:6px;padding:6px 14px calc(10px + env(safe-area-inset-bottom));
  background:var(--card);border-top:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:0 -10px 30px rgba(0,0,0,.45)}
#bsheet .grab{width:40px;height:4px;border-radius:2px;background:var(--steel);align-self:center;flex:none}
#bsheet .bsh{display:flex;align-items:center;gap:8px;flex:none;min-width:0}
#bsheet .bsh b{white-space:nowrap}
#bsheet .bsh .ty{color:var(--muted);font-size:13px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bsheet .x{margin:0}
.bsmap{flex:1;min-height:0;display:flex;border-radius:10px;overflow:hidden}
.bsmap svg.pd.pd{width:100% !important;height:100%;max-width:none;margin:0}
#bsheet .bmk{flex:none;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
#bsheet .bmk .big{font:700 26px/1 var(--mono)}
#bsheet .bmk .m{color:var(--muted);font-size:13px}
body.bs-open main{padding-bottom:calc(min(44vh,420px) + 12px)}

/* ---------- the split: list left, drawing right, both on screen (landscape from 560 px, anything from 900 px) ---------- */
html.split body.jv{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
html.split body.jv main{flex:1;min-height:0;max-width:none;width:100%;padding:0;display:flex;flex-direction:column}
html.split body.jv #msg{margin:6px 12px}
html.split body.jv .view:not([hidden]){flex:1;min-height:0;display:block}
html.split .tabs{display:none}
html.split .jgrid{display:grid;grid-template-columns:minmax(0,56fr) minmax(0,44fr);height:100%}
html.split .lp{display:block !important;overflow-y:auto;min-height:0;padding:10px 14px 0;border-right:1px solid var(--line);overscroll-behavior:contain}
html.split .pane-sheet,html.split .pane-hist{display:block !important}
html.split .pane-hist{margin-top:14px}
html.split .rp{display:flex !important;min-height:0;padding:10px 12px 12px}
html.split .jfoot{margin:12px -14px 0;padding:10px 14px}
html.split .view[data-tab="hist"] .jfoot .bench-btn{display:flex}
html.split .view[data-tab="hist"] .jfoot{position:sticky;border-top:1px solid var(--line);padding-top:10px}
html.split .dbox{flex:1;min-height:0;overflow:hidden;border-radius:10px;border:1px solid var(--line);background:var(--card);padding:8px}
html.split .dbox .dv{height:100%;overflow:hidden}
html.split .view[data-dv="side"] .dbox .dv-side:has(.dnote){display:flex;flex-direction:column}
html.split .dbox .dv-side:has(.dnote) svg.pd{flex:1;min-height:0}
html.split .dbox svg.pd.pd{width:100% !important;max-width:none !important;height:100%;margin:0}
html.split .dbox .pd .pd-rcol{display:inline}
html.split .dbox .pd .pd-capl{display:none}
html.split .dhint{display:none}
/* 3D in the pane: the switch picks it (data-d3) */
html.split .view #v3dBox{display:none}
html.split .view[data-d3="1"] #v3dBox{display:flex;flex-direction:column;flex:1;min-height:0}
html.split .view[data-d3="1"] .dbox{display:none}
html.split .view[data-d3="1"] .selcard{display:none}
html.split .view[data-tab="3d"] .dsw{display:grid}
html.split .view[data-tab="3d"]:not([data-d3="1"]) .dbox,html.split .view[data-tab="3d"]:not([data-d3="1"]) .selcard{display:block}
html.split #v3dBox .v3d{flex:1;height:auto;min-height:0}
html.split #v3dBox .v3go{flex:1}
html.split #vBench .rp{display:flex !important}
html.split #vBench .rp .selcard{max-height:40%;overflow:auto}
html.split .bfocus{display:none}
html.split #bsheet{display:none !important}
html.split body.bs-open main{padding-bottom:0}
@media (orientation:landscape) and (max-height:500px){
  html.split .lp{padding-top:6px}
  html.split .rp{padding:6px 8px 8px;gap:6px}
  .seg.dsw{min-height:40px}.dsw button{min-height:38px}
  html.split .selcard{padding:6px 10px}
  html.split .selcard .why{display:none}
  html.split .selcard:has(>.why:only-child){display:none}  /* the hint alone: no empty box on a short screen */
  html.split .jfoot .btn{min-height:48px;font-size:16px}
  html.split .jfoot{padding:6px 14px}
  html.split body.jv.kbd header{display:none}
}
@media (min-width:1400px){html.split .jgrid{grid-template-columns:minmax(0,52fr) minmax(0,48fr)}}

/* ---------- bench entry: big fields for gloved fingers, a progress footer ---------- */
.bench{max-width:900px;margin:0 auto}
html.split .bench{max-width:none}
.bhead .jchips{margin-bottom:8px}
.who{display:flex;align-items:center;gap:8px;margin:0 0 10px;padding:4px 4px 4px 14px;border-radius:999px;border:1px solid var(--steel);background:var(--input);max-width:420px}
.who label{font-size:13px;color:var(--muted);white-space:nowrap}
.who input{flex:1;min-width:0;min-height:48px;font-size:18px;font-weight:600;padding:4px 8px;border:0;background:transparent;border-radius:999px}
.who input:focus-visible{outline-offset:-3px}
.who.need{border-color:var(--warn)}
.grid{display:grid;gap:6px 10px;align-items:center}
.grid.pn{align-items:center}
.grid.st{grid-template-columns:minmax(0,1fr) auto minmax(120px,170px)}
.grid.pn{grid-template-columns:auto minmax(0,1fr) fit-content(34%) minmax(116px,170px)}
.grid>*{min-width:0}
.grid .lab{font-size:16px;font-weight:500;overflow-wrap:anywhere;padding:4px 0}
.grid .lab small{display:block;color:var(--muted);font-size:13px;font-weight:400}
.grid .lab small.mk{display:none}
.grid .lab small.corr{display:none}
.grid .k{color:var(--text);font:700 24px/1.1 var(--mono);text-align:right}
.grid.st .k{font:500 15px var(--mono);color:var(--muted)}
.grid .hd{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-family:var(--f-text)}
.grid .hd.hd.k{font:600 12px var(--f-text);color:var(--muted)}
.grid .hd.r{text-align:right;padding-right:34px}
.grid .lab small.meas{display:block;color:var(--muted);font-size:13px}
.grid .lab small.carried,.grid .lab small.chg{font-size:13px}
.grid .lab small.chg{color:var(--warn)}
.grid .sw{margin-right:0}
.rw{position:relative;display:block}
.rw .in{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--muted);font:600 14px var(--mono);pointer-events:none}
.real{width:100%;min-height:56px;font:600 22px var(--mono);padding:6px 34px 6px 10px;border-radius:10px;border:2px solid var(--steel);background:var(--input);text-align:right}
.real.filled{border-color:var(--go-text)}
.real:focus{border-color:var(--accent)}
.real[aria-invalid="true"]{border-color:var(--bad)}
.real::placeholder{color:var(--muted);font-weight:400;opacity:1}
.grid .lab.fo{color:var(--accent)}
.ghead{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:16px 0 6px}
.ghead h3{margin:0}
.ghead .cnt{font:600 13px var(--mono);color:var(--muted)}
.bench textarea{width:100%;min-height:72px;font-size:16px;padding:8px 10px;border-radius:10px;border:1px solid var(--steel);background:var(--input);resize:vertical}
.err{color:var(--bad);min-height:1.2em;margin:8px 0 0;font-weight:600}
.err:empty{display:none}
.bench details.more{margin-top:14px}
/* a PCS # + qty never breaks inside ('NP41-' / '10 (4)'); the type / CAD line wraps under it instead */
.pcs{white-space:nowrap}
@media (max-width:480px){
  .grid.st{grid-template-columns:minmax(0,1fr) auto minmax(108px,140px)}
  .grid.pn{grid-template-columns:auto minmax(min-content,1fr) fit-content(30%) minmax(104px,128px);column-gap:8px}
  .grid.pn .k{font-size:21px}
  .grid.pn .real{font-size:20px;padding-right:30px}
  .grid .hd.r{padding-right:0}
  .grid .lab{font-size:15px}
}
/* the footer: n of N entered, Next empty, Photo (n), Save (n); Mark stack done once every counting plate is in */
.bar{position:sticky;bottom:0;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px -12px 0;padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  background:var(--bg);border-top:1px solid var(--line)}
html.split .bar{margin:14px -14px 0;padding:8px 14px}
.bar .older{background:var(--warnbg);color:var(--warn);border:1px solid var(--warn);border-radius:8px;padding:6px 12px;font-weight:600;margin:0;flex:1 1 100%}
.bar .err{flex:1 1 100%;margin:0}
.bfocus{flex:1 1 100%;font-size:13px;color:var(--muted)}
.bfocus:empty{display:none}
.bfocus b{color:var(--text)}
.bar .prog{flex:1 1 100%;display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.bar .prog b{color:var(--text);font:600 14px var(--mono);white-space:nowrap}
.bar .prog .pbar{height:6px}
.bar .btn{min-height:52px;font-size:15px;flex:1 1 0;padding:0 8px;white-space:nowrap}
.bar .btn.pri{flex:1.4 1 0;font-size:17px}
.bar .btn .nsave{font:700 13px var(--mono);background:rgba(255,255,255,.22);border-radius:999px;padding:1px 7px}
.bar .btn .nsave:empty{display:none}
.bar .stackb{flex:1 1 100%}
@media (min-width:700px){
  html:not(.split) .bar .prog{flex:0 1 200px;flex-direction:column;align-items:stretch;gap:4px}
  html:not(.split) .bar .btn{flex:0 0 auto;padding:0 18px}
  html:not(.split) .bar .btn.pri{flex:0 0 auto;margin-left:auto;padding:0 28px}
  html:not(.split) .bar .stackb{flex:0 0 auto}
}
/* the split: progress on its own thin line, every button in one row (Mark stack done may take two lines) */
html.split .bar .stackb{flex:1 1 0;white-space:normal;line-height:1.15}
/* "x not measured yet" once, in the focused box's line / card - not under every Make to (ui-study #8) */
.grid .k small.wait{display:none}
body.on-bench #bBack{min-width:56px}

/* ---------- dialogs ---------- */
dialog{border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);padding:0;width:min(560px,calc(100vw - 16px));max-height:calc(100dvh - 24px)}
dialog::backdrop{background:rgba(0,0,0,.6)}
#dPhoto{width:min(1400px,calc(100vw - 16px))}
#dPhoto img{max-width:100%;max-height:calc(100dvh - 120px);display:block;margin:0 auto}
.dlg{padding:14px 16px 16px}
.dh{display:flex;align-items:flex-start;gap:8px;margin-bottom:8px}
.dh h2{flex:1;font:700 22px/1.2 var(--f-head);letter-spacing:.02em;margin:0;overflow-wrap:anywhere}
.x{min-width:48px;min-height:48px;font-size:22px;margin:-10px -10px 0 0;border-radius:8px}
.meta{color:var(--muted);margin:0 0 10px;font-size:14px}
.meta b{color:var(--text)}
.menu .btn{display:flex;width:100%;justify-content:flex-start;margin:0 0 12px}
/* Seth 11-27 (phone): the Theme select sat on the Remove button - labels are blocks with room below, and the
   destructive button keeps clear of the row above (the 3px focus ring + 2px offset needs at least 6px) */
.menu label{display:block;margin:0 0 16px}
.menu .btn.danger{margin-top:12px}
.menu select{width:100%;min-height:48px;font-size:16px;border-radius:8px;border:1px solid var(--line);background:var(--card);padding:6px 10px}
.menu label span{display:block;font-size:13px;color:var(--muted);margin-bottom:3px}
.menu .ver{color:var(--muted);font-size:12px;margin:14px 0 0}
.menu h3{margin:14px 0 4px}
.menu .pq{width:100%;min-height:48px;border-radius:8px;border:1px solid var(--line);padding:8px 12px;background:var(--input);font-size:18px;margin:4px 0 8px}
.hits{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.askbar{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.askbar .btn{min-height:56px;font-size:17px}
#dAsk h2{font:700 22px/1.2 var(--f-head);margin:0 0 6px}
dialog#dSheet{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
.sheetbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line)}
.sheetbar h2{flex:1 1 200px;font-size:17px;margin:0}
#dSheet iframe{display:block;width:100%;height:calc(100dvh - 66px);border:0;background:#fff}
.mview{margin:0 0 16px}
.mview>span{display:block;font-size:13px;color:var(--muted);margin-bottom:3px}
.mview .seg{display:flex;gap:8px}
.menu .mview .btn{flex:1 1 50%;justify-content:center;min-height:56px;font-size:17px;margin:0}
.mview .btn[aria-pressed="true"]{background:var(--go-btn);border-color:var(--go-btn);color:#fff;font-weight:700}

/* Simple / Expert view (docs\outline-build\MODES.md): boot.js sets <html data-mode>; Simple is the default */
:root[data-mode="simple"] .corrsum:not(:empty){display:block}
/* SIMPLE: the side view folded under the pin map on paper (DRAWING-SPEC) - the screen has the Side switch */
details.pd-sidev>summary{cursor:pointer;min-height:48px;display:flex;align-items:center;gap:.3em;font-weight:700;list-style:none}
details.pd-sidev>summary::-webkit-details-marker{display:none}
/* 3D in Simple (MODES.md review): Fit, the tap-a-pin card, Whole group, Hide 3D. viewer3d.js is generated: hidden here */
/* Seth 11-27 asked for Pins only, the Plates slider and the measured-face highlight: those stay (viewer data-ejv names) */
:root[data-mode="simple"] .ejv-tools [data-ejv]:not([data-ejv="fit"]):not([data-ejv="faces"]):not([data-ejv="pins"]):not([data-ejv="plates"]),
:root[data-mode="simple"] .ejv-card [data-a="hide"],
:root[data-mode="simple"] .ejv-card [data-a="all"],
:root[data-mode="simple"] .xpl label[for="explode"],
:root[data-mode="simple"] #explode{display:none !important}

#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));background:var(--text);color:var(--bg);padding:10px 16px;border-radius:10px;max-width:calc(100vw - 24px);z-index:7;box-shadow:0 4px 16px rgba(0,0,0,.3)}

/* reprint: the printed sheet's layout (EjectorPinSheet.cs Sheet.Html), Real filled; only #print prints */
#print{display:none}
@media print{
  @page{size:letter;margin:.45in}
  html.split body.jv,body{background:#fff;color:#1d2430;height:auto;overflow:visible;display:block}
  header,main,dialog,#toast,#setup,#installCard,#bsheet{display:none !important}
  #print{display:block;font:12px/1.35 "Segoe UI",Arial,sans-serif;color:#1d2430}
  #print .band{background:#1b3a5c;color:#fff;padding:8px 12px;display:flex;justify-content:space-between;align-items:baseline;border-bottom:4px solid #1f8a4c;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #print .band b{font-size:15px;letter-spacing:.05em}
  #print .pqr{float:right;width:1.05in;height:1.05in;margin:6px 0 4px 10px}
  #print .pqr svg{width:100%;height:100%}
  #print h1{font-size:22px;margin:10px 0 2px;font-family:inherit;letter-spacing:0;white-space:normal;overflow:visible}
  #print .meta{color:#5b6676;font-size:11px;margin-bottom:10px}
  #print .meta b{color:#1d2430}
  #print table{border-collapse:collapse;width:100%;margin:6px 0 14px}
  #print th,#print td{border:1px solid #9aa7b8;padding:5px 7px;text-align:left}
  #print th{background:#e8edf3;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #print td.n{text-align:right;font-variant-numeric:tabular-nums;font-family:Consolas,monospace;font-size:13px}
  #print td.rv{width:1.4in;height:.36in;text-align:right;font-family:Consolas,monospace;font-size:13px}
  #print .gdot svg{width:24px;height:24px;display:block;margin:0 auto;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #print .gdot text{fill:#fff;font-weight:700;font-family:Arial,sans-serif}
  #print .ct i,#print .ct small{color:#5b6676;font-family:"Segoe UI",Arial,sans-serif}
  #print .ct b{color:#1d2430;font:600 13px/1.25 Consolas,monospace}
  #print .ct.mk b{color:#1d2430;font-weight:700}
  #print .ct.eq,#print .ct.mk{border-left-color:#9aa7b8}
  #print .ct.warn i,#print .ct.warn small{color:#9a3c00}
  #print h1 small{font-size:13px;color:#5b6676;font-weight:400}
  #print figure{margin:0}
  #print figcaption{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#1b3a5c;margin:0 0 2px}
  #print td.num{white-space:nowrap}
  #print tr.corrp td{border-top:0;font:10.5px Consolas,monospace;color:#1d2430}
  #print th.w11{width:1.1in}#print th.w9{width:.9in}#print th.w13{width:1.3in}
  #print td.c{text-align:center}
  #print td.mk{font-weight:700;font-size:16px}
  #print td.mk small.sub,#print td.rv small{display:block;font:400 9.5px "Segoe UI",Arial,sans-serif;color:#5b6676}
  #print h2{font-size:14px;margin:12px 0 2px;text-transform:uppercase;letter-spacing:.04em;color:#1b3a5c;clear:both}
  #print .note{color:#5b6676;font-size:10.5px}
  #print .std{border:2px solid #1b3a5c;padding:8px 12px;margin-top:10px}
  #print .std table{margin:4px 0 0}
  #print .std td{border:none;padding:2px 10px 2px 0}
  #print .warn{color:#b04a00;font-size:10.5px}
  #print .by{margin-top:10px;font-size:11px}
  #print .foot{margin-top:8px;padding-top:4px;border-top:1px solid #9aa7b8;font-size:9.5px;color:#5b6676}
  #print p.warn{margin:0 0 6px}
  #print .pend{border:0;padding:0;margin-left:4px;color:#5b6676;font-size:9px}
  #print tr{break-inside:avoid}
  #print .pdraw{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;break-inside:avoid;margin:6px 0 10px}
  #print .pdraw:has(.pd-al){grid-template-columns:1fr;gap:4px}
  #print .sw{width:12px;height:12px;vertical-align:-2px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
/* the sheet chip: the header's sheet line says it (the landscape bar keeps that line too) */
.jchips .shc{display:none}
/* landscape phone: chips on one compact line, the WARN / INFO lines small (still every word), smaller card heads - the
   first plate row within ~120 px of the pane top */
@media (orientation:landscape) and (max-height:500px){
  html.split .jchips{gap:4px;margin-bottom:6px}
  html.split .jchips .chip{font-size:11.5px;padding:1px 7px}
  html.split .card.safety{padding:5px 10px;margin-bottom:6px}
  html.split .card.safety .lines{font-size:12.5px;line-height:1.3}
  html.split .card.safety .lines li{margin:1px 0}
  html.split .lp .card{padding:8px 10px}
  html.split .lp .card h3{font-size:16px;margin-bottom:2px}
  html.split #vJob .pane-sheet>.card:not(.safety):not(.changes)>h3{display:none}  /* the table heads name the section */
  html.split .lp .t th{padding:2px 6px}
  html.split .lp .t tr[data-group] td,html.split .lp .t tr[data-role] td{padding-top:8px;padding-bottom:8px}
  html.split .bhead .who{margin-bottom:4px}
  html.split .bench .ghead{margin:8px 0 4px}
}
.jrow .mm{min-width:0}
.jrow .when .m{display:block;font-size:12.5px}
/* the 'new version ready' bar (app.js showUpdateBar) */
#updbar{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:6;display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--brand);color:#fff;box-shadow:0 6px 20px rgba(0,0,0,.35)}
#updbar span{flex:1;font-size:15px}
#updbar .btn{min-height:48px;padding:0 18px}
