:root{
  --bg:#060606;
  --s1:#0c0c0c;
  --s2:#101010;
  --border:#1c1c1c;
  --border2:#282828;
  --red:#cc2a1f;
  --orange:#d48a0e;
  --green:#25d366;
  --text:#e0e0e0;
  --muted:#999;
  --muted2:#2a2a2a;
  --tab-bg:#0f0f0f;
}
:root[data-theme="light"]{
  --bg:#f4f4f2;
  --s1:#ffffff;
  --s2:#ececea;
  --border:#dcdcd8;
  --border2:#c6c6c1;
  --text:#161616;
  --muted:#555555;
  --muted2:#8f8f8a;
  --tab-bg:#ffffff;
}
body{font-family:'IBM Plex Mono','Consolas','Courier New',monospace;background:var(--bg);color:var(--text);overflow-x:hidden}

/* ── Topbar ── */
@media(max-width:640px){
  .topbar{padding:10px 14px}
  .tb-brand{font-size:.9rem;gap:6px}
  .tb-brand img{width:18px;height:18px}
}

/* ── Main ── */
#parser{padding:24px 20px 20px;max-width:1200px;margin:0 auto}

/* ── Page header ── */
.p-head{margin-bottom:0;display:flex;align-items:baseline;gap:14px;padding-bottom:10px}
.p-head h1{font-size:clamp(1rem,2.5vw,1.25rem);font-weight:700;letter-spacing:-.01em;white-space:nowrap}
.p-head .p-sub{font-size:.7rem;color:var(--muted);line-height:1.5}

/* ── Tab bar (tabs + contact strip combined) ── */
.tab-bar{display:flex;align-items:stretch;justify-content:space-between;background:var(--tab-bg);border:2px solid #161616;margin-bottom:16px}
.tab-bar-left{display:flex;align-items:stretch;gap:0}
.tab-bar-right{display:flex;align-items:center;gap:8px;padding:0 14px;border-left:1px solid #1e1e1e}
.tab{padding:10px 22px;font-size:.8rem;font-weight:700;cursor:pointer;transition:all var(--t-med);background:transparent;color:var(--muted);border:none;border-bottom:2px solid transparent;font-family:inherit;letter-spacing:.04em}
.tab.on{color:var(--red);border-bottom-color:var(--red);background:rgba(204,42,31,.04)}
.tab:hover{color:var(--text)}
.tab-content{display:none}.tab-content.on{display:block}
.c-qs{color:var(--muted);font-size:.64rem;white-space:nowrap}
.c-lnk{display:inline-flex;align-items:center;gap:5px;background:transparent;border:1px solid var(--muted2);color:var(--muted);padding:4px 10px;text-decoration:none;font-size:.64rem;font-weight:600;transition:all var(--t-fast);white-space:nowrap}
.c-lnk:hover{border-color:var(--green);color:var(--text)}

/* ── Estimator grid ── */
.est{display:grid;grid-template-columns:minmax(280px,auto) 1fr;min-height:500px;border:2px solid #161616;background:var(--s2)}
.est.has-model{grid-template-columns:minmax(280px,auto) 1fr 240px}
.est-l{border-right:2px solid #161616;padding:14px 10px;background:var(--s1);display:flex;flex-direction:column;gap:12px}
.elbl{font-size:.58rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}

/* ── Upload zone ── */
.uz{border:2px dashed var(--muted2);padding:12px 8px;text-align:center;cursor:pointer;transition:all var(--t-fast);position:relative}
.uz input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.uz:hover,.uz.over{border-color:var(--red);background:rgba(204,42,31,.04)}
.uz p{color:var(--muted);font-size:.7rem;line-height:1.4}
.uz-name{color:var(--orange);font-size:.65rem;font-weight:600;margin-top:4px;display:none;word-break:break-all}

/* ── Option buttons ── */
.opts{display:grid;gap:3px}
.c2{grid-template-columns:1fr 1fr}.c3{grid-template-columns:1fr 1fr 1fr}.c4{grid-template-columns:repeat(2,1fr)}
.opt{background:var(--s2);border:1px solid var(--muted2);color:var(--muted);padding:8px 6px;cursor:pointer;font-size:.72rem;text-align:center;transition:all .1s;user-select:none;font-family:inherit}
.opt:hover{border-color:#3a3a3a;color:var(--text)}
.opt.on{background:var(--s3);border-color:var(--red);color:var(--orange)}
.opt small{display:block;font-size:.6rem;opacity:.8;margin-top:1px}
.opt-static{pointer-events:none}

/* ── Infill slider ── */
.inf-slider-wrap{display:none;flex-direction:column;gap:4px;margin-top:4px;padding:8px;background:var(--s2);border:1px solid var(--muted2)}
.inf-slider-wrap.show{display:flex}
.inf-slider-wrap .row{display:flex;justify-content:space-between;font-size:.6rem;color:var(--muted);font-weight:600}
.inf-slider-wrap .row span:last-child{color:var(--orange)}
.inf-slider-wrap input[type=range]{width:100%;accent-color:var(--red);cursor:pointer;margin-top:2px}

/* ── 3D Viewer ── */
.est-mid{background:var(--viewer-bg);position:relative;overflow:hidden;display:flex}
#sc,#sc-resin{position:absolute;inset:0;display:block;width:100%;height:100%}
.dvd-logo{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.dvd-logo img{position:absolute;width:70px;height:70px;object-fit:contain;opacity:.4;filter:drop-shadow(0 0 14px rgba(204,42,31,.4))}
.sv-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;pointer-events:none}
.sv-empty p{color:var(--muted);font-size:.8rem;font-weight:400}
.sv-hint{position:absolute;bottom:9px;left:50%;transform:translateX(-50%);background:rgba(var(--bg-rgb),.7);color:var(--muted);font-size:.58rem;padding:3px 11px;white-space:nowrap;display:none}
.sv-spin{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(var(--bg-rgb),.9);flex-direction:column;gap:10px}
.spn{width:22px;height:22px;border:2px solid var(--muted2);border-top-color:var(--red);border-radius:50%;animation:sp .65s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.sv-spin p{color:var(--muted);font-size:.7rem}

/* ── Pricing panel ── */
.est-r{border-left:2px solid #161616;background:var(--s1);padding:14px 10px;display:none;flex-direction:column;overflow-y:auto}
.est.has-model .est-r{display:flex}
.p-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px}
.p-empty p{color:var(--muted);font-size:.7rem;line-height:1.4}
.p-det{display:none;flex-direction:column;height:100%}
.p-rows{margin-bottom:8px}
.p-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #161616;font-size:.78rem}
.p-row:last-child{border-bottom:none}
.p-row .k{color:var(--muted)}.p-row .v{color:var(--text);font-weight:500}
.p-bot{padding-top:6px}
.p-lbl{color:var(--muted);font-size:.68rem;margin-bottom:2px;text-transform:uppercase;letter-spacing:.06em}
.p-jd{font-size:1.7rem;font-weight:700;line-height:1;color:var(--orange)}
.p-pia{color:var(--muted);font-size:.72rem;margin-top:2px}
.p-note{margin-top:6px;padding:6px 8px;background:rgba(0,0,0,.2);border:1px solid #161616;font-size:.68rem;color:var(--muted);line-height:1.4}
.p-fee{margin-top:4px;padding:4px 8px;background:rgba(0,0,0,.15);border:1px solid #161616;font-size:.66rem;color:var(--muted);line-height:1.3}
.obtns{display:none;margin-top:6px;gap:4px;flex-direction:column}
.obtns.show{display:flex}
.obtn{padding:10px 12px;font-weight:600;font-size:.8rem;text-align:center;text-decoration:none;transition:all var(--t-fast);display:flex;align-items:center;justify-content:center;gap:6px}
.obtn-wa{background:transparent;color:var(--muted);border:1px solid var(--muted2)}
.obtn-wa:hover{border-color:var(--green);color:var(--text-bright)}
.obtn-ig{background:transparent;color:var(--muted);border:1px solid var(--muted2)}
.obtn-ig:hover{border-color:var(--red);color:var(--text-bright)}

/* ── Repair link ── */
.repair-link{display:inline-block;margin-top:8px;padding:8px 14px;background:transparent;border:2px solid var(--red);color:var(--red);font-size:.72rem;font-weight:600;text-decoration:none;cursor:pointer;transition:all var(--t-med);font-family:inherit}
.repair-link:hover{background:rgba(204,42,31,.08)}

/* ── Quiet secondary link/button ── */
.btn-quiet{display:block;padding:9px 12px;font-size:.72rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;font-family:inherit;background:transparent;border:1px solid var(--muted2);color:var(--text-bright);transition:all var(--t-fast);border-radius:2px}
.btn-quiet:hover{border-color:var(--muted-lt)}

/* ── CAD modal ── */
.cad-modal{display:none;position:fixed;inset:0;z-index:200;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.8)}
.cad-modal.show{display:flex}
.cad-box{background:var(--s1);border:2px solid #161616;padding:24px 20px;max-width:400px;width:100%;position:relative;text-align:center}
.cad-box h3{font-size:.9rem;font-weight:700;margin:8px 0 4px}
.cad-box p{color:var(--muted);font-size:.7rem;line-height:1.5;margin-bottom:14px}
.cad-fn{color:var(--orange);font-weight:600;word-break:break-all}
.cad-go{display:block;padding:9px;background:var(--s2);color:var(--text);font-weight:600;font-size:.75rem;text-decoration:none;text-align:center;transition:all var(--t-fast);margin-bottom:4px;cursor:pointer;border:1px solid var(--border2);width:100%;font-family:inherit}
.cad-go:hover{background:var(--s3)}
.cad-cls{width:100%;padding:7px;background:transparent;border:1px solid var(--muted2);color:var(--muted);font-size:.72rem;cursor:pointer;transition:all var(--t-fast);font-family:inherit}
.cad-cls:hover{border-color:#3a3a3a;color:var(--text)}



@media(max-width:900px){
  .est,.est.has-model{grid-template-columns:1fr;grid-template-rows:auto 320px auto;height:auto}
  .est-r{border-left:none;border-top:2px solid #161616}
  .est-l{border-right:none;border-bottom:2px solid #161616}
  .opt{font-size:.7rem;padding:6px 3px}
  .opt small{font-size:.58rem}
  .elbl{font-size:.62rem}
  .tab-bar-right{padding:0 10px;gap:6px}
}
@media(max-width:520px){
  .c4{grid-template-columns:1fr 1fr}
  .p-head{flex-wrap:wrap}
  .tab-bar{flex-direction:column}
  .tab-bar-right{border-left:none;border-top:1px solid #1e1e1e;padding:8px 14px}
}

/* ── Readable copy under the estimator ───────────────────────────────
   The tool answers "what will this cost"; this answers "who are you and
   what can you print", which is what a search engine or an AI assistant
   has to be able to read in order to recommend the place. Styled as part
   of the page rather than a block of text pasted at the bottom. */
.seo-copy{max-width:860px;margin:0 auto;padding:34px 20px 10px;color:var(--muted)}
.seo-copy h2{font-size:1.15rem;font-weight:900;color:var(--text);margin:0 0 12px;letter-spacing:-.01em}
.seo-copy h3{font-size:.82rem;font-weight:800;color:var(--text);margin:22px 0 8px;
             text-transform:uppercase;letter-spacing:.06em}
.seo-copy p{font-size:.8rem;line-height:1.75;margin:0 0 11px}
.seo-copy a{color:var(--yellow);text-decoration:none;border-bottom:1px solid transparent;transition:border-color var(--t-fast)}
.seo-copy a:hover,.seo-copy a:focus-visible{border-bottom-color:var(--yellow)}
.seo-table{width:100%;border-collapse:collapse;margin:6px 0 14px;font-size:.78rem}
.seo-table th,.seo-table td{text-align:left;padding:7px 10px;border:1px solid var(--border2)}
.seo-table th{background:var(--s2);color:var(--text);font-weight:700;
              text-transform:uppercase;font-size:.66rem;letter-spacing:.05em}
.seo-table td{color:var(--muted)}
[dir="rtl"] .seo-table th,[dir="rtl"] .seo-table td{text-align:right}

/* ── Oversize nudge ──
   A small draggable panel, not a modal: no backdrop and nothing behind it is
   disabled, because an unusually large model is a question rather than an
   error. Bottom-corner start so it never lands on the viewer or the estimate.
   position:fixed with left/top set by the drag handler; the initial corner is
   expressed as inset so it works in both text directions without a second
   rule. */
.osz{position:fixed;inset-inline-end:18px;bottom:18px;z-index:400;width:min(310px,calc(100vw - 36px));
  background:var(--s1);border:1px solid var(--border2);border-radius:3px;
  box-shadow:0 8px 28px rgba(0,0,0,.45);font-size:.74rem}
.osz[hidden]{display:none}
.osz-head{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:8px 10px 8px 12px;background:var(--s2);border-bottom:1px solid var(--border);
  cursor:grab;user-select:none;touch-action:none}
.osz-head:active{cursor:grabbing}
.osz-title{font-weight:700;color:var(--text-bright);font-size:.74rem}
.osz-x{background:none;border:none;color:var(--muted);font-size:1.1rem;line-height:1;
  padding:2px 6px;cursor:pointer;font-family:inherit;border-radius:2px}
.osz-x:hover,.osz-x:focus-visible{color:var(--text-bright);background:var(--s3)}
.osz-body{padding:11px 12px 0;color:var(--muted-lt);line-height:1.6;margin:0}
.osz-dims{color:var(--text-bright);font-weight:700;white-space:nowrap}
.osz-go{display:block;width:calc(100% - 24px);margin:11px 12px 12px;padding:8px 10px;
  background:var(--s2);border:1px solid var(--border2);color:var(--text);
  font-family:inherit;font-size:.72rem;font-weight:600;cursor:pointer;
  transition:border-color var(--t-fast),color var(--t-fast)}
.osz-go:hover,.osz-go:focus-visible{border-color:var(--red);color:var(--text-bright)}
@media(max-width:520px){.osz{inset-inline:12px;width:auto}}
