:root{--bg:#141517;--panel:#1c1d21;--panel2:#232429;--line:#2f3138;--ink:#e6e6e3;--muted:#9a9ba3;--acc:#4f8cff;--err:#ff6b6b;--warn:#f5b642;--ok:#5fcf80;--sel:#ffd84a}
/* hidden means hidden: a rule that sets display beat the attribute again and again (the fold slider, the laser
   fit-test buttons on a printed job), each time patched for one element */
[hidden]{display:none!important}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;display:flex;flex-direction:column;font:13px/1.45 Inter,system-ui,sans-serif;background:var(--bg);color:var(--ink);color-scheme:dark;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
header{flex:none;min-height:44px;padding:0 14px;background:#0f1012;border-bottom:1px solid var(--line);display:flex;gap:12px;align-items:center}
/* One row: the links and the rarely used buttons are in the help menu, and the status line gives way first. Under
   about 1150px even that does not fit, so the header wraps onto a second row there. */
@media (max-width:1150px){header{flex-wrap:wrap;padding:4px 14px;row-gap:4px}}
/* a menu in the header: a <details> whose summary is the button and whose .pop drops under it */
details.menu{position:relative;flex:none}details.menu>summary{list-style:none;cursor:pointer;display:block;padding:3px 8px;border:1px solid var(--line);background:var(--panel2);border-radius:4px;font-size:12px;white-space:nowrap}
details.menu>summary::-webkit-details-marker{display:none}details.menu>summary:hover,details.menu[open]>summary{border-color:var(--acc)}
.pop{position:absolute;z-index:60;top:calc(100% + 4px);left:0;min-width:200px;background:var(--panel2);border:1px solid var(--line);border-radius:6px;padding:4px 0;box-shadow:0 8px 24px #0008;display:flex;flex-direction:column}
.pop button,.pop a{all:unset;box-sizing:border-box;padding:6px 12px;font-size:12px;color:var(--ink);cursor:pointer;white-space:nowrap}.pop :is(button,a):is(:hover,:focus-visible){background:#ffffff14}
.pop hr{border:0;border-top:1px solid var(--line);margin:4px 0;width:100%}
header h1{font-size:15px;font-weight:600;letter-spacing:.01em;margin:0 6px 0 0;display:flex;align-items:center;gap:7px}header h1 img{width:20px;height:20px;display:block}
header a.kofi{color:var(--muted);font-size:12px;text-decoration:none;border:1px solid var(--line);border-radius:12px;padding:2px 9px;white-space:nowrap;display:inline-flex;gap:6px;align-items:center;flex:none}header a.kofi:hover{color:#ff5e5b;border-color:#ff5e5b}header .sp{flex:1}header select{width:auto}header>label,header>button,header>input,#punsaved{flex:none}#punsaved{white-space:nowrap}#status{color:var(--muted);font-size:12px;max-width:34vw;min-width:40px;flex:0 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#dot{width:11px;height:11px;border-radius:50%;background:var(--ok);flex:none;box-shadow:0 0 6px var(--ok)}#dot.busy{background:var(--warn);box-shadow:0 0 8px var(--warn);animation:pulse .8s infinite alternate}#dot.err{background:var(--err);box-shadow:0 0 6px var(--err)}
@keyframes pulse{from{opacity:.4}to{opacity:1}}
main{display:grid;grid-template-columns:400px 1fr;flex:1;min-height:0}
aside{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
nav{display:flex;border-bottom:1px solid var(--line);background:var(--panel)}nav button{flex:1;padding:9px 4px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}nav button.on{color:var(--ink);border-bottom-color:var(--acc)}
#tabs{overflow:auto;padding:12px 14px 30px;flex:1}section[data-tab]{display:none}section[data-tab].on{display:block}
h2{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:16px 0 6px}h2:first-child{margin-top:0}
label.f,div.f{display:grid;grid-template-columns:128px 1fr;gap:8px;align-items:start;margin:5px 0}.f>.k{padding-top:5px}.f[hidden]{display:none}
/* a table of 3D lines is six numbers a row: under its label, the full width of the panel, or the values are cut off */
.f.wide{grid-template-columns:1fr}.f.wide .rows .r small{min-width:38px}
/* the spinner arrows take a third of a narrow box and say nothing about which way is which: the table's values are
   typed or dragged in the 3D view */
.f.wide input[type=number]{-moz-appearance:textfield;appearance:textfield}.f.wide input[type=number]::-webkit-inner-spin-button,.f.wide input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.k{cursor:help;border-bottom:1px dotted #55575f;overflow-wrap:anywhere}   /* a full name wraps onto a second line: it is read, not cut off */
/* a section of settings folds on its heading; a setting another one switches on is set in under it; one that is not
   at its default says so with a sign and bold, and the sign puts the default back; a click on a name opens its help */
.sec{border-top:1px solid var(--line);margin:10px -14px 0;padding:7px 14px 0}.sec>h3.sub{cursor:pointer;margin:0 0 1px;display:flex;gap:6px;align-items:baseline}
.sec>h3.sub::before{content:'▾';color:var(--muted);font-size:10px}.sec.folded>h3.sub::before{content:'▸'}.sec>h3.sub small{font-weight:400;color:var(--muted);font-size:11px}
.sec.folded>:not(h3){display:none}
.f.dep{margin-left:8px;padding-left:8px;border-left:2px solid var(--line)}.f.dep:not(.wide){grid-template-columns:112px 1fr}
.f .chg{all:unset;display:none;cursor:pointer;color:var(--acc);margin-left:5px;font-weight:400}.f.changed>.k{font-weight:600}.f.changed .chg{display:inline}
.f>.help{grid-column:1/-1;margin:0 0 4px;padding:6px 8px;background:var(--panel2);border-radius:4px;line-height:1.45}
#find{margin:8px 14px 0;width:calc(100% - 28px);flex:none}
/* basic / all: the pressed side is filled, bold and ticked, so it is not told by colour alone */
#level{margin:6px 14px 0;flex:none;display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}#level span{display:inline-flex;border:1px solid var(--line);border-radius:5px;overflow:hidden}
#level button{border:0;border-radius:0;background:none;color:var(--muted);padding:2px 11px;font-size:12px;cursor:pointer}#level button[aria-pressed=true]{background:var(--acc);color:#fff;font-weight:700}#level button[aria-pressed=true]::before{content:"✓ "}
#tabs.basic:not(.finding) .sec:not(.all)>.f.adv:not(.changed){display:none}
/* a setting the machine in use has no use for (form.js NOT_FOR) waits under the same line, on basic and all alike */
#tabs:not(.finding) .sec:not(.all)>.f.nok:not(.changed){display:none}
.sec>.more{display:none;width:100%;text-align:left;margin:4px 0 2px;padding:4px 8px;font-size:11.5px;line-height:1.4;color:var(--acc);background:none;border:1px dashed var(--line);border-radius:5px;cursor:pointer}
#tabs:not(.finding) .sec:not(.all):not(.folded)>.more:not([hidden]){display:block}.sec>.more:hover{border-color:var(--acc)}
/* text behind a click (Export tab), and the groups of that tab that open on demand */
details.info{font-size:11.5px;margin:2px 0 8px}details.info>summary{cursor:pointer;color:var(--acc);list-style:none}details.info>summary::before{content:"ⓘ "}details.info>summary::after{content:" ▸"}details.info[open]>summary::after{content:" ▾"}details.info>.hint{margin:4px 0 0;display:block}
.dl .r details.info{margin:0}
details.fold>summary{cursor:pointer;list-style:none}details.fold>summary h2{display:inline-block}details.fold>summary::before{content:"▸ ";color:var(--muted);font-size:10px}details.fold[open]>summary::before{content:"▾ "}
details.info>summary::-webkit-details-marker,details.fold>summary::-webkit-details-marker{display:none}
/* the tools of the 3D view: the one in use is outlined, bold and ticked */
#tools{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;align-items:flex-start}
#tools button{padding:4px 9px;border:1px solid var(--line);background:#0f1012dd;color:var(--ink);border-radius:5px;cursor:pointer;font-size:11.5px;white-space:nowrap}#tools[hidden],#tools button[hidden]{display:none}
#tools button[aria-pressed=true]{border-color:var(--acc);box-shadow:0 0 0 1px var(--acc) inset;font-weight:700}#tools button[aria-pressed=true]::after{content:" ✓"}
#tabs.finding section[data-tab]{display:block}#tabs.finding .miss{display:none!important}#tabs.finding .sec.folded>.f{display:grid}
#tabs.finding section[data-tab]::before{content:attr(data-name);display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--acc);margin:12px 0 4px}
#tip{position:fixed;z-index:50;max-width:320px;background:#2b2d34;color:#f0f0ee;padding:7px 9px;border-radius:5px;font-size:11.5px;line-height:1.4;box-shadow:0 6px 18px #000c;border:1px solid #3a3c45;pointer-events:none}#tip[hidden]{display:none}
input,select,button{font:inherit}input,select{width:100%;padding:4px 6px;border:1px solid var(--line);border-radius:4px;background:var(--panel2);color:var(--ink)}input[type=checkbox]{width:auto;justify-self:start;margin-top:6px;accent-color:var(--acc)}input[type=file]{padding:2px;font-size:12px}input[type=range]{padding:0;accent-color:var(--acc)}
.vec{display:flex;gap:4px}.vec input{min-width:0}.vec small{align-self:center;color:var(--muted)}
.rows{display:flex;flex-direction:column;gap:3px}.rows .r{display:flex;gap:3px;align-items:center}.rows .r input{min-width:0}.rows .r small{color:var(--muted);min-width:44px}
button.small{padding:3px 8px;border:1px solid var(--line);background:var(--panel2);color:var(--ink);border-radius:4px;cursor:pointer;font-size:12px;white-space:nowrap}button.small:hover{border-color:var(--acc)}button.small:disabled{opacity:.35;cursor:default;border-color:var(--line)}button.x{padding:2px 6px;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:4px;align-items:center}.chip{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:1px 8px;font-size:12px}.chip b{cursor:pointer;color:var(--muted);margin-left:4px}.chips input{width:78px;padding:2px 6px}
.hint{color:var(--muted);font-size:11px}h3.sub{font-size:12px;font-weight:600;margin:12px 0 1px;color:var(--ink)}p.hint.sub{margin:0 0 4px}
.bar select{padding:1px 4px;width:auto}
/* the techniques: six cards of one size, a small drawing of what each makes, a tick on the chosen one */
.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px}.modes button,.kinds button{padding:6px 2px 5px;border:1px solid var(--line);background:var(--panel2);color:var(--ink);border-radius:6px;cursor:pointer;font-size:11px}
.modes button svg{display:block;margin:0 auto 3px;width:44px;height:30px;pointer-events:none}.modes button span{pointer-events:none}
.modes button.on,.kinds button[aria-pressed=true]{border-color:var(--acc);box-shadow:0 0 0 1px var(--acc) inset;background:#22304d}.modes button.on span::before,.kinds button[aria-pressed=true] span::before{content:'✓ '}
/* what you make with: four cards like the techniques', the chosen one ticked and outlined (never by colour alone) */
#kind{display:block;margin:0 0 4px}#kind>h2{margin-bottom:8px}#kind>.f{margin:8px 0 4px}#kind>.hint{margin:0}
#kind>#kind_why{color:var(--ink);margin-top:4px}#kind_why:empty{display:none}   /* why the choice moved by itself */
.kinds{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.kinds b{display:block;font-size:16px;font-weight:400;line-height:1.3}.kinds button[aria-pressed=true]{font-weight:700}.kinds button:disabled{opacity:.4;cursor:default}
.desc{color:var(--muted);font-size:12px;margin:0 0 10px}
.view{display:flex;flex-direction:column;min-height:0;min-width:0}
#v3d{position:relative;flex:0 0 56%;border-bottom:1px solid var(--line);min-height:240px}#v3d canvas{display:block;width:100%;height:100%}
#busy{position:absolute;inset:0;background:#141517aa;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--warn);font-size:14px;pointer-events:none}#busy[hidden]{display:none}
#busy .bar{position:static;padding:0;width:240px;height:6px;background:#2a2c33;border-radius:3px;overflow:hidden}   /* static: the toolbar's `.bar` rule put it at the view's top-left corner */
/* once the 3D view has the slice's parts (js/slice.js) the overlay gets out of their way: no dimming, no list of stages,
   one strip along the bottom with the stage and the bar, short of the view cube as the hint is */
#busy.early{background:#0f1012dd;inset:auto 130px 0 0;flex-direction:row;justify-content:flex-start;gap:12px;padding:6px 12px;font-size:12.5px;border-top:1px solid var(--line)}
#busy.early #busy_txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}#busy.early .bar{flex:1;width:auto;max-width:240px;min-width:60px}
#busy.early #busy_steps,#busy.early #busy_note{display:none}#busy.early~#hint{bottom:38px}#busy .bar i{display:block;height:100%;width:30%;background:var(--warn);border-radius:3px;animation:slide 1.1s infinite linear}
#busy .bar.known i{animation:none;transition:width .3s}@keyframes slide{from{margin-left:-30%}to{margin-left:100%}}
#busy_note{max-width:420px;text-align:center;color:var(--muted);font-size:12px;line-height:1.4}#busy_note:empty{display:none}
/* the stages of a slice, so a long wait has a shape: what is done, what is running, what is still to come */
#busy_steps{list-style:none;margin:2px 0 0;padding:0;font-size:11.5px;line-height:1.55;color:#6f727c;min-width:250px}
#busy_steps li{white-space:nowrap}#busy_steps li::before{content:'○ ';opacity:.6}
#busy_steps li.done{color:var(--ok)}#busy_steps li.done::before{content:'✓ '}
#busy_steps li.now{color:var(--warn);font-weight:500}#busy_steps li.now::before{content:'▸ '}
.bar{position:absolute;left:10px;top:8px;display:flex;gap:10px;align-items:center;font-size:12px;color:var(--muted);background:#0f1012cc;padding:5px 8px;border-radius:5px;flex-wrap:wrap}.bar label{display:flex;gap:5px;align-items:center}.bar input[type=range]{width:90px}.bar button{padding:2px 8px;border:1px solid var(--line);background:var(--panel2);color:var(--ink);border-radius:4px;cursor:pointer;font-size:11px}
.bar label[hidden]{display:none}   /* `.bar label` sets a display, which beat the hidden attribute: the fold slider showed on every job */
/* the Light tab's list: a light is its number in a ring (the ring's colour only helps), its kind and what it is like */
.llist{display:flex;flex-direction:column;gap:3px;margin:4px 0 6px}.lrow{display:grid;grid-template-columns:18px 24px 1fr auto;gap:7px;align-items:center;padding:5px 7px;border:1px solid var(--line);border-radius:5px;background:var(--panel2);cursor:pointer}
.lrow.sel{border-color:var(--acc);box-shadow:0 0 0 1px var(--acc) inset}.lrow.off>:not(input){opacity:.55}.lrow small{display:block;color:var(--muted);font-size:11px}.lrow button{padding:0 5px;margin-left:3px}
#lighthint{position:absolute;left:50%;bottom:44px;transform:translateX(-50%);background:#0f1012ee;border:1px solid var(--line);border-radius:5px;padding:5px 12px;font-size:12px;white-space:nowrap}#lighthint[hidden]{display:none}
.ln{width:22px;height:22px;border-radius:50%;border:3px solid;display:grid;place-items:center;font-weight:700;font-size:11px;color:#fff;background:#0f1012}
/* the steps slider is a scrubber through the build order: wider than the other sliders so each layer gets its own
   stretch of track, and with a live counter beside it to read off which step you have landed on */
.bar input#steps{width:250px}.bar .stepsval{min-width:52px;text-align:center;font-variant-numeric:tabular-nums;color:var(--ink)}
#sel{position:absolute;right:10px;top:8px;background:#0f1012ee;padding:8px 10px;border-radius:6px;border:1px solid var(--line);font-size:12px;width:250px}#sel[hidden]{display:none}#sel b{color:var(--sel)}#sel .row{display:grid;grid-template-columns:44px 1fr 66px;gap:6px;align-items:center;margin:4px 0}#sel .row input[type=number]{padding:2px 5px}#sel small{color:var(--muted);display:block;margin-top:4px}
/* choosing the seams of a folded model: three line styles, never colour alone (thin = fold, dashed = the program's seam, thick = yours) */
#seampanel{position:absolute;left:150px;bottom:36px;width:300px;max-width:calc(100% - 270px);background:#0f1012ee;border:1px solid var(--line);border-radius:6px;padding:8px 10px;font-size:12px;line-height:1.5}#seampanel[hidden]{display:none}
#seampanel .t{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}#seampanel p{margin:0 0 6px;color:var(--muted)}#seampanel p b{color:var(--ink);font-weight:600}#seampanel .lg{display:flex;align-items:center;gap:8px}#seampanel .lg svg{flex:none}#seampanel .lg small{color:var(--muted)}#seampanel .r{display:flex;gap:8px;align-items:center;margin-top:6px;flex-wrap:wrap}#seampanel .r[hidden]{display:none}
/* selecting and removing faces of a folded model: hatched = selected, dashed outline = removed */
#facebar{position:absolute;left:130px;right:130px;bottom:36px;margin:0 auto;width:fit-content;background:#0f1012ee;border:1px solid var(--line);border-radius:6px;padding:7px 10px;font-size:12px}#facebar[hidden]{display:none}
#facebar .r{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#facebar .r+.r{margin-top:6px}#facebar .r[hidden]{display:none}#facebar .lg{color:var(--muted);font-size:11px}#facebar .lg svg{flex:none}
#facebar .r>i{width:1px;align-self:stretch;background:var(--line)}#facebar button[disabled]{opacity:.4;cursor:default}
#seamtip{position:fixed;z-index:60;pointer-events:none;background:#000d;border:1px solid #fff6;border-radius:4px;padding:5px 8px;font-size:12px;line-height:1.5;color:#fff;white-space:nowrap}#seamtip[hidden]{display:none}
.seamcard{display:flex;flex-direction:column;gap:5px}.seamcard>span:last-child{display:flex;gap:6px;flex-wrap:wrap}
#sheets g.seams{display:none}#sheets.choosing g.seams{display:inline}#sheets g.seams line{vector-effect:non-scaling-stroke;fill:none;stroke-linecap:round;pointer-events:none}
#sheets g.seams line.hit{stroke:transparent;stroke-width:12px;pointer-events:stroke;cursor:pointer}#sheets g.seams line.mine{stroke:#56B4E9;stroke-width:4px}#sheets g.seams line.hov{stroke:#F0E442;stroke-width:7px}
#hint{position:absolute;left:10px;bottom:8px;max-width:calc(100% - 130px);font-size:11px;color:var(--muted);background:#0f1012dd;padding:3px 7px;border-radius:4px}
#hint summary{cursor:pointer}#hint summary span{color:var(--acc)}
#hint dl{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;margin:6px 0 2px}#hint dt{color:var(--ink)}#hint dd{margin:0}
#lower{flex:1;overflow:auto;padding:12px 14px;min-height:0}
details.msg>summary{cursor:pointer}details.msg>summary span{opacity:.75}details.msg>div{margin-top:5px}
/* the spacing graph, in the form under its tick */
.spc{border:1px solid var(--line);border-radius:6px;padding:8px;background:#1d1f24;display:flex;flex-direction:column;gap:6px}
.spc canvas{display:block;width:100%;height:auto;border-radius:4px;background:#17181c;touch-action:none;cursor:crosshair}
.spc .chips button{border-radius:10px;padding:1px 8px;font-size:11px}
.spc .cap{font-size:11px;color:var(--muted)}.spc .row{font-size:11px;color:var(--muted);display:flex;gap:6px;align-items:center;flex-wrap:wrap}.spc b{color:var(--ink)}
.spc .row input{width:4.6em;padding:2px 4px;font-size:11px}.spc .row button{font-size:11px;padding:2px 7px}
.stats{display:flex;gap:18px;flex-wrap:wrap;margin:0 0 10px}.stats b{font-size:17px;display:block}.stats div{font-size:11px;color:var(--muted)}
.est-in{display:flex;gap:10px 14px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin:6px 0}.est-in input{width:5em;padding:2px 4px;font-size:11px}
.msg{padding:5px 8px;border-radius:4px;margin:3px 0;font-size:12px}.msg[data-s]{cursor:pointer}.msg[data-s]:hover{outline:1px solid var(--sel)}.err{background:#3a1e1e;color:var(--err)}.warn{background:#3a2f18;color:var(--warn)}.ok{background:#1c3325;color:var(--ok)}.note{background:#22262e;color:var(--muted)}
.fix{display:inline-block;margin:3px 4px 0 0;padding:2px 8px;border:1px solid #6a4040;border-radius:10px;background:#2a1a1a;color:#ffc9c9;cursor:pointer;font-size:11px}.fix:hover{border-color:var(--err)}
.sheets{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:10px}.sheet svg{width:100%;height:auto;background:#1d1f24;border:1px solid var(--line);border-radius:4px}.sheet .t{font-size:11px;color:var(--muted);margin:2px 0;display:flex;justify-content:space-between}.sheet .t a{color:var(--acc);cursor:pointer}
.sheet path[data-label]{cursor:pointer;pointer-events:all}.sheet path[data-label]:hover{stroke-width:2.5px}.sheet path.hl{stroke:var(--sel)!important;stroke-width:3px!important}
/* On screen only. The files keep the cut / score / engrave colours machines are set up to read (blue outline, green
   inner, yellow score, red engrave) — a laser's software maps operations by exactly those. Against this dark panel
   the darkest of them nearly vanish: a reporter could only find the blue outlines by hovering them. So the preview
   is drawn in the Okabe–Ito set, which stays distinguishable with any common colour blindness, and nothing about
   the exported file changes. A part with an error keeps the red the page gives it: its own attribute beats this. */
.sheet svg g.OUTER{stroke:#56b4e9}
.sheet svg g.INNER{stroke:#e69f00}
.sheet svg g.SCORE{stroke:#f0e442}
.sheet svg g.GUIDE{stroke:#009e73}   /* the next layer's outline on a stacked slice: the file's orange would read as INNER here */
.sheet svg g.LABEL{stroke:#cc79a7;fill:none}
.sheet svg g.FRAME{stroke:#999999;fill:none}   /* the sheet's edge and title, which no machine runs: grey, told apart by where it is */
/* A 0.15 mm line on a 600 mm sheet drawn 500 px wide is an eighth of a pixel — which is the other half of why the
   outlines could only be found by hovering them. non-scaling-stroke measures the width in pixels instead, so the
   cut lines stay a clean hairline at any zoom without the file carrying a width no machine wants. */
.sheet svg g[class]{stroke-width:1.2px;vector-effect:non-scaling-stroke}
.sheet svg g[class] *{vector-effect:non-scaling-stroke}
.sl{display:flex;gap:6px;align-items:center}.sl input[type=range]{flex:1;min-width:60px}.sl input[type=number]{width:74px;flex:none}
/* a slider drives these boxes, and x y z or a table's values stand two or three in a row: the spin buttons only hide the digits */
.sl input[type=number],#sel input[type=number],.vec input[type=number],.rows .r input[type=number]{appearance:textfield;-moz-appearance:textfield}
.sl input[type=number]::-webkit-inner-spin-button,.sl input[type=number]::-webkit-outer-spin-button,#sel input[type=number]::-webkit-inner-spin-button,#sel input[type=number]::-webkit-outer-spin-button,.vec input[type=number]::-webkit-inner-spin-button,.vec input[type=number]::-webkit-outer-spin-button,.rows .r input[type=number]::-webkit-inner-spin-button,.rows .r input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
h2 button.reset{float:right;text-transform:none;letter-spacing:0;font-size:11px;padding:1px 7px;margin-top:-3px}
#view{display:flex;flex-direction:column}#view.only3d #lower{display:none}#view.only3d #v3d{flex:1 1 auto}#view.only2d #v3d{display:none}#view.only2d #lower{flex:1}
.dl{display:flex;flex-wrap:wrap;gap:6px}.dl.rows{flex-direction:column}.dl .r{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-bottom:4px}.dl a{padding:6px 10px;border:1px solid var(--line);border-radius:4px;text-decoration:none;color:var(--ink);font-size:12px;background:var(--panel2)}.dl a:hover{border-color:var(--acc)}
/* the Export tab: the one file each machine needs, outlined thick and bold (not by colour alone), and the job's summary */
.dl a.main{border:2px solid var(--acc);font-weight:600;font-size:12.5px}#machines{line-height:1.6}#machines b{color:var(--ink)}#x_errors{border:1px solid currentColor}#x_errors button{margin-left:4px}
.step>h2:first-child{margin-top:16px}.dl .r>.hint{max-width:100%}   /* a step's heading keeps its space above (h2:first-child takes it away) */
table{width:100%;border-collapse:collapse;font-size:12px}td,th{padding:3px 6px;border-bottom:1px solid var(--line);text-align:left}tr.bad td{color:var(--err)}tr:hover td{background:var(--panel2);cursor:pointer}
dialog{width:min(620px,92vw);border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);padding:22px;font:14px/1.55 Inter,system-ui,sans-serif}
/* A phone: the header wraps and the panel sits over the 3D view. Left unwrapped, the header's buttons made the page
   1560 px wide on a 390 px screen, and the phone notice was centred in that, off the edge of what the phone shows */
@media (max-width:760px){header{padding:6px 10px;row-gap:6px}main{grid-template-columns:1fr;flex:none}
  aside{border-right:0;border-bottom:1px solid var(--line)}.view{height:75vh}}
dialog::backdrop{background:#000b}dialog h3{margin:0 0 8px;font-size:18px}dialog a{color:var(--acc)}
dialog .row{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
dialog button{padding:8px 15px;border-radius:6px;border:1px solid var(--line);background:var(--panel2);color:inherit;font:inherit;cursor:pointer}
dialog button.go{background:#2563eb;border-color:transparent;color:#fff;font-weight:600}
#oops .msg{border-left:3px solid var(--err);background:#0003;padding:10px 13px;margin:12px 0;border-radius:6px;font-size:13px;color:#ffc9c9;word-break:break-word}
#libask label{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--muted)}#libask label[hidden]{display:none}#libask input{margin:0}
/* the library: a page over the app, which stays as it was underneath. Each state is said in words (✓ open now,
   ⚠ cannot be read, ▾ / ▴), the blue border only repeats them */
#library{position:fixed;inset:0;z-index:40;background:var(--bg);overflow:auto;padding:18px 28px 40px}#library[hidden],#library [hidden]{display:none}
#library .lbbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}#library .lbbar h2{font-size:18px;margin:0;letter-spacing:0;font-weight:700;text-transform:none;color:inherit}#library .sp{flex:1}#libfind{width:220px}
#libwhere{margin:10px 0 0;padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:var(--panel2);color:var(--muted);display:flex;flex-wrap:wrap;gap:6px;align-items:center}#libwhere b{color:var(--ink)}
#libwhere .note{flex-basis:100%;color:var(--ink)}
#library h2{font-size:13px;letter-spacing:.04em;font-weight:600;margin:22px 0 10px}
#library .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;align-items:start}
#library .card{border:1px solid var(--line);border-radius:8px;background:var(--panel2);overflow:hidden;position:relative;cursor:pointer}
#library .card.on{border-color:var(--acc);box-shadow:0 0 0 1px var(--acc) inset}#library .card.wide{grid-column:span 2}#library .card.bad{cursor:default}
@media (max-width:520px){#library .card.wide{grid-column:1/-1}}   /* one column: a span of two would add a second off the screen */
#library .card img,#library .ph{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--bg)}
#library .ph{display:flex;align-items:center;justify-content:center;padding:10px;color:var(--muted);text-align:center;word-break:break-word}
#library .now,#library .more{position:absolute;top:6px;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:1px 8px;font:inherit;font-size:11px;color:var(--ink)}
#library .now{left:6px}#library .more{right:6px;cursor:pointer}#library .more:hover{border-color:var(--acc)}
#library .t{padding:8px 10px 9px}#library .n{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#library .m{color:var(--muted);font-size:11.5px;margin-top:2px}
#library .revs{border-top:1px solid var(--line);font-size:12px;cursor:default}
#library .revs>div{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:5px 10px;border-bottom:1px solid var(--line)}#library .revs>div:last-child{border:0}
#library .revs .sp{color:var(--muted);font-size:11.5px;white-space:nowrap}
#newsdlg{max-height:82vh;overflow:auto;max-width:720px}
#newsdlg h4{margin:16px 0 2px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
#newsdlg h5{margin:14px 0 4px;font-size:15px}#newsdlg ul{margin:4px 0;padding-left:20px}#newsdlg li{margin:4px 0}
#newsdlg img{display:block;max-width:calc(100% - 20px);height:auto;margin:6px 0 10px 20px;border:1px solid var(--line);border-radius:6px}
#newsdlg code{background:var(--panel2);border-radius:3px;padding:0 4px;font:12px ui-monospace,monospace}
#helpdlg{max-height:82vh;overflow:auto}#helpdlg h4{margin:18px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
#helpdlg ol,#helpdlg ul{margin:4px 0;padding-left:20px}#helpdlg li{margin:3px 0}#helpdlg kbd{background:var(--panel2);border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:0 5px;font:12px ui-monospace,monospace}
/* the guided tour (js/tour.js). The ring's shadow dims the page round the part it shows, so the part is the bright
   one, with an outline; the bubble points at it with an arrow. No colour carries any of it. */
#tourring{position:fixed;z-index:45;pointer-events:none;border-radius:8px;outline:3px solid #fff;box-shadow:0 0 0 4px #000,0 0 0 9999px #000a}#tourring[hidden]{display:none}
#tourdlg{position:fixed;z-index:70;margin:0;inset:auto;width:min(340px,calc(100vw - 32px));padding:12px 14px 10px;border-color:#fff6;box-shadow:0 10px 30px #000c;font-size:13px;overflow:visible}
#tourdlg h4{margin:0 0 4px;font-size:14px}#tourdlg .ov{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:2px}#tourdlg .tx p{margin:0 0 6px}
#tourdlg .row{margin-top:8px;align-items:center;gap:8px}#tourdlg .row .n{flex:1;color:var(--muted);font-size:12px}#tourdlg button{padding:5px 11px;font-size:12px}
#tourdlg button.skip{background:none;border:0;color:var(--muted);text-decoration:underline;padding:5px 2px}
#tourdlg::before{content:'';position:absolute;width:14px;height:14px;background:var(--panel);border:1px solid #fff6;transform:rotate(45deg)}#tourdlg[data-side=inside]::before{display:none}
#tourdlg[data-side=below]::before{top:-8px;left:var(--a);border-right:0;border-bottom:0}#tourdlg[data-side=above]::before{bottom:-8px;left:var(--a);border-left:0;border-top:0}
#tourdlg[data-side=right]::before{left:-8px;top:var(--a);border-top:0;border-right:0}#tourdlg[data-side=left]::before{right:-8px;top:var(--a);border-bottom:0;border-left:0}
#news_tour{display:flex;gap:10px;align-items:center;margin:4px 0 12px}#news_tour[hidden]{display:none}#news_tour button{white-space:nowrap}
/* the tour's cards (the start and the end) sit in the corner; the machines are a grid of two, one column on a phone */
#tourdlg.card{right:16px;bottom:16px;left:auto;top:auto}#tourdlg .ch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
#tourdlg .pick{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;text-align:left}#tourdlg .pick b{font-size:13px}#tourdlg .pick small{color:var(--muted);font-size:11.5px}
#tourdlg ul{margin:4px 0 8px;padding-left:18px}#tourdlg details summary{cursor:pointer;color:var(--muted)}#tourdlg .hint{font-size:12px;color:var(--muted);margin:0 0 6px}
@media (max-width:520px){#tourdlg .ch{grid-template-columns:1fr}}
