:root{
  --bg:#f2f4f7; --bg2:#e7ebf0; --card:#ffffff; --card2:#f7f9fb;
  --ink:#141b24; --ink2:#5a6673; --ink3:#8d98a4; --line:#e2e7ec;
  --navy:#16233c; --navy2:#27364f; --navy-soft:#eaeef6;
  --red:#d7261e; --red-soft:#fdecea;
  --ok:#1f7a4d; --ok-soft:#e6f4ec; --warn:#b2700c; --warn-soft:#fdf2e0;
  --mono:"IBM Plex Mono",ui-monospace,monospace;
  --sans:"IBM Plex Sans",-apple-system,system-ui,sans-serif;
  --cond:"Barlow Condensed",var(--sans);
  --r:16px; --shadow:0 1px 2px rgba(20,27,36,.06),0 8px 24px rgba(20,27,36,.06);
  --top:calc(env(safe-area-inset-top,0px) + 54px);
  --bot:calc(env(safe-area-inset-bottom,0px) + 58px);
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0c1117; --bg2:#121922; --card:#171f29; --card2:#1d2733;
  --ink:#e8edf3; --ink2:#a3b0bd; --ink3:#71808f; --line:#25313f;
  --navy:#dbe6f7; --navy2:#b7c8e2; --navy-soft:#1b2634;
  --red:#ef5b52; --red-soft:#2b1615;
  --ok:#4fc487; --ok-soft:#12251c; --warn:#e0a44a; --warn-soft:#2a2013;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
}}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overscroll-behavior-y:none}
body{font:15px/1.45 var(--sans);color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
h1,h2,h3{font-family:var(--cond);margin:0;letter-spacing:.01em;font-weight:700}
h1{font-size:26px;line-height:1.05}h2{font-size:21px}h3{font-size:17px;font-weight:600}
p{margin:0}
button,input,select,textarea{font-family:inherit;font-size:16px;color:inherit}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
.muted{color:var(--ink2)}.dim{color:var(--ink3)}
.sm{font-size:13px}.xs{font-size:11.5px}
b,strong{font-weight:600}

/* ---------- chrome ---------- */
#topbar{position:fixed;top:0;left:0;right:0;z-index:30;height:var(--top);
  padding:env(safe-area-inset-top,0px) 10px 0;display:flex;align-items:center;gap:8px;
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:.5px solid var(--line)}
#topbar .ttl{flex:1;min-width:0;padding-left:4px}
#topbar h1{font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#topbar small{display:block;font-size:11px;color:var(--ink3);letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:-1px}
.icon-btn{width:36px;height:36px;flex:none;border:0;background:transparent;color:var(--navy);
  display:grid;place-items:center;border-radius:10px;cursor:pointer;font:600 14px var(--sans)}
.icon-btn svg{width:22px;height:22px}
.icon-btn:active{background:var(--navy-soft)}
main#view{padding:calc(var(--top) + 8px) 0 calc(var(--bot) + 20px);min-height:100%}
#tabbar{position:fixed;bottom:0;left:0;right:0;z-index:30;height:var(--bot);
  padding-bottom:env(safe-area-inset-bottom,0px);display:grid;grid-template-columns:repeat(6,1fr);
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);
  border-top:.5px solid var(--line)}
#tabbar button{border:0;background:none;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:2px;color:var(--ink3);cursor:pointer;padding:0}
#tabbar svg{width:23px;height:23px}
#tabbar span{font-size:10px;font-weight:500;letter-spacing:.01em}
#tabbar button.on{color:var(--red)}
.wrap{padding:0 16px;max-width:700px;margin:0 auto}

/* ---------- blocks ---------- */
.card{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow)}
.sec{margin:20px 0 10px;display:flex;align-items:baseline;gap:8px}
.sec h2{font-size:19px}
.sec .more{margin-left:auto;font-size:13px;color:var(--red);font-weight:600}
.eyebrow{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink3);font-weight:600}
.list{background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow)}
.row{display:flex;align-items:center;gap:12px;padding:13px 14px;border-bottom:.5px solid var(--line);
  background:none;border-left:0;border-right:0;border-top:0;width:100%;text-align:left;cursor:pointer}
.row:last-child{border-bottom:0}
.row:active{background:var(--card2)}
.row .g{flex:1;min-width:0}
.row .g b{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .g small{display:block;color:var(--ink2);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .amt{font-family:var(--mono);font-size:13.5px;text-align:right;white-space:nowrap}
.chev{width:16px;height:16px;flex:none;color:var(--ink3)}
.pill{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:2.5px 9px;
  font-size:11px;font-weight:600;background:var(--navy-soft);color:var(--navy);white-space:nowrap}
.pill.red{background:var(--red-soft);color:var(--red)}
.pill.ok{background:var(--ok-soft);color:var(--ok)}
.pill.warn{background:var(--warn-soft);color:var(--warn)}
.pill .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.kpi{background:var(--card);border-radius:14px;padding:12px 12px 11px;box-shadow:var(--shadow)}
.kpi .n{font-family:var(--cond);font-size:27px;line-height:1;font-weight:700}
.kpi .l{font-size:10.5px;color:var(--ink3);margin-top:3px;letter-spacing:.02em}
.kpi.alert .n{color:var(--red)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;cursor:pointer;
  background:var(--navy);color:var(--bg);border-radius:13px;padding:13px 18px;
  font:600 15px var(--sans);text-decoration:none;min-height:46px}
.btn svg{width:18px;height:18px}
.btn:active{opacity:.75}
.btn.red{background:var(--red);color:#fff}
.btn.ghost{background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.btn.full{width:100%}
.btn[disabled]{opacity:.4}
.btnrow{display:flex;gap:10px;margin-top:14px}
.btnrow .btn{flex:1}

/* form controls */
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.field>label{font-size:12px;font-weight:600;color:var(--ink2);display:flex;justify-content:space-between;align-items:baseline}
.field>label b{font-family:var(--mono);font-weight:500;color:var(--ink);font-size:13px}
.inp{width:100%;border:0;box-shadow:inset 0 0 0 1px var(--line);background:var(--card);
  border-radius:12px;padding:12px 13px;font-size:16px;min-height:46px}
.inp:focus{outline:0;box-shadow:inset 0 0 0 2px var(--navy)}
textarea.inp{min-height:76px;resize:vertical;line-height:1.4}
select.inp{-webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d98a4' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat;background-position:right 11px center;background-size:17px;padding-right:36px}
.seg{display:flex;gap:6px;flex-wrap:wrap}
.seg button{border:0;box-shadow:inset 0 0 0 1px var(--line);background:var(--card);color:var(--ink2);
  border-radius:11px;padding:9px 13px;font:600 13.5px var(--sans);cursor:pointer;min-height:40px}
.seg button.on{background:var(--navy);color:var(--bg);box-shadow:none}
.seg.wrap2 button{flex:1 1 calc(50% - 3px)}
.seg.col button{flex:1 1 100%;text-align:left;display:flex;flex-direction:column;gap:2px;padding:11px 13px}
.seg.col button small{font-size:11px;opacity:.7;font-family:var(--mono);font-weight:400}
.stepper{display:flex;align-items:center;gap:0;box-shadow:inset 0 0 0 1px var(--line);
  border-radius:12px;overflow:hidden;background:var(--card);height:46px}
.stepper button{flex:none;width:46px;height:100%;border:0;background:none;color:var(--navy);
  font-size:22px;font-weight:400;cursor:pointer;line-height:1}
.stepper button:active{background:var(--card2)}
.stepper span{flex:1;text-align:center;font-family:var(--mono);font-size:16px}
input[type=range]{-webkit-appearance:none;width:100%;height:30px;background:transparent}
input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:3px;background:var(--line)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;border-radius:50%;
  background:var(--card);box-shadow:0 1px 4px rgba(0,0,0,.25),inset 0 0 0 1px var(--line);margin-top:-10px}
.chk{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.chk label{display:flex;align-items:center;gap:8px;font-size:13.5px;background:var(--card);
  border-radius:11px;padding:10px 11px;box-shadow:inset 0 0 0 1px var(--line);min-height:44px}
.chk input{width:19px;height:19px;accent-color:var(--red);flex:none}
.swatches{display:flex;gap:9px;flex-wrap:wrap}
.swatch{width:40px;height:40px;border-radius:12px;border:0;cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.18)}
.swatch.on{box-shadow:inset 0 0 0 1px rgba(0,0,0,.18),0 0 0 2.5px var(--navy)}

/* photos (sprite) */
.ph{background-image:url(sprite.jpg);background-size:400% 400%;background-color:var(--card2)}
.ph0{background-position:0% 0%}     .ph1{background-position:33.333% 0%}
.ph2{background-position:66.667% 0%}.ph3{background-position:100% 0%}
.ph4{background-position:0% 33.333%}     .ph5{background-position:33.333% 33.333%}
.ph6{background-position:66.667% 33.333%}.ph7{background-position:100% 33.333%}
.ph8{background-position:0% 66.667%}     .ph9{background-position:33.333% 66.667%}
.ph10{background-position:66.667% 66.667%}.ph11{background-position:100% 66.667%}
.ph12{background-position:0% 100%}     .ph13{background-position:33.333% 100%}
.ph14{background-position:66.667% 100%}.ph15{background-position:100% 100%}

/* catalogue */
.cat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cat{background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow);
  border:0;padding:0;text-align:left;cursor:pointer;display:flex;flex-direction:column}
.cat .ph{aspect-ratio:4/3;width:100%}
.cat .t{padding:10px 11px 12px}
.cat .t b{display:block;font-size:14px;font-weight:600;line-height:1.2}
.cat .t small{display:block;color:var(--ink2);font-size:11.5px;margin-top:3px}
.cat .t .tags{display:flex;gap:4px;margin-top:7px;flex-wrap:wrap}
.hero{aspect-ratio:16/10;width:100%;border-radius:var(--r);box-shadow:var(--shadow)}
.specs{width:100%;font-size:13px;border-collapse:collapse}
.specs th{text-align:left;font-weight:600;color:var(--ink2);padding:8px 10px 8px 0;
  vertical-align:top;width:38%;border-bottom:.5px solid var(--line);font-size:12.5px}
.specs td{padding:8px 0;border-bottom:.5px solid var(--line);vertical-align:top}
.specs tr:last-child th,.specs tr:last-child td{border-bottom:0}

/* 3D viewer */
.viewer{position:relative;width:100%;aspect-ratio:4/3;border-radius:var(--r);overflow:hidden;
  background:linear-gradient(180deg,#dfe6ec,#c9d3dc);box-shadow:var(--shadow)}
.viewer canvas{display:block;width:100%;height:100%;touch-action:none}
.viewer .vtop{position:absolute;top:10px;left:10px;right:10px;display:flex;gap:6px;align-items:flex-start}
.vseg{display:flex;gap:4px;background:rgba(255,255,255,.72);backdrop-filter:blur(12px);
  border-radius:99px;padding:3px}
.vseg button{border:0;background:none;border-radius:99px;padding:6px 11px;font:600 12px var(--sans);
  color:#414e5c;cursor:pointer}
.vseg button.on{background:#16233c;color:#fff}
.vbtn{border:0;background:rgba(255,255,255,.72);backdrop-filter:blur(12px);border-radius:99px;
  width:34px;height:34px;display:grid;place-items:center;color:#414e5c;cursor:pointer;flex:none}
.vbtn svg{width:17px;height:17px}
.viewer .vdim{position:absolute;bottom:10px;right:10px;font-family:var(--mono);font-size:11.5px;
  background:rgba(255,255,255,.72);backdrop-filter:blur(12px);padding:4px 9px;border-radius:99px;color:#22303f}
.viewer .vhint{position:absolute;bottom:10px;left:10px;font-size:10.5px;color:#4a5866;
  background:rgba(255,255,255,.6);padding:3px 8px;border-radius:99px}
.plan2d{width:100%;background:#fff;display:block;transform-origin:0 0;will-change:transform}
.planwrap{position:relative;overflow:hidden;background:#fff;border-radius:var(--r);box-shadow:var(--shadow);touch-action:pan-y;user-select:none;-webkit-user-select:none}
.planwrap.zoomed{cursor:grab}.planwrap.zoomed:active{cursor:grabbing}
.planz{position:absolute;right:8px;bottom:8px;display:flex;gap:4px;background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:10px;padding:3px;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.planz button{min-width:34px;height:30px;border:0;background:transparent;border-radius:7px;font:600 15px/1 var(--sans);color:#141b24;padding:0 8px}
.planz button:active{background:var(--line)}

/* quote builder */
.qline{padding:12px 14px;border-bottom:.5px solid var(--line);display:flex;gap:10px;align-items:flex-start}
.qline:last-child{border-bottom:0}
.qline .n{font-family:var(--mono);font-size:12px;color:var(--ink3);width:20px;flex:none;padding-top:2px}
.qline .d{flex:1;min-width:0}
.qline .d b{font-size:14px;font-weight:600;display:block;line-height:1.3}
.qline .d small{font-size:11.5px;color:var(--ink2);display:block;margin-top:2px}
.qline .v{text-align:right;flex:none}
.qline .v .amt{font-family:var(--mono);font-size:14px;font-weight:600}
.qline .v .qty{font-family:var(--mono);font-size:11px;color:var(--ink3)}
.qtot{display:flex;padding:13px 14px;background:var(--navy-soft);font-weight:700}
.qtot .amt{margin-left:auto;font-family:var(--mono)}
.tick{width:22px;height:22px;border-radius:50%;background:var(--ok-soft);color:var(--ok);
  display:grid;place-items:center;flex:none}
.tick svg{width:13px;height:13px}
.empty{text-align:center;padding:38px 20px;color:var(--ink3)}
.empty svg{width:42px;height:42px;opacity:.4;margin-bottom:10px}

/* sheet */
.sheet{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.35);opacity:0;pointer-events:none;
  transition:opacity .22s;display:flex;align-items:flex-end}
.sheet.show{opacity:1;pointer-events:auto}
.sheet-inner{background:var(--bg);width:100%;max-height:92%;border-radius:20px 20px 0 0;
  transform:translateY(100%);transition:transform .28s cubic-bezier(.32,.72,0,1);
  padding:0 16px calc(env(safe-area-inset-bottom,0px) + 20px);overflow-y:auto;-webkit-overflow-scrolling:touch}
.sheet.show .sheet-inner{transform:none}
.grab{width:36px;height:4.5px;border-radius:3px;background:var(--line);margin:9px auto 14px;flex:none}
.toast{position:fixed;left:50%;bottom:calc(var(--bot) + 14px);transform:translateX(-50%) translateY(14px);
  background:var(--navy);color:var(--bg);padding:11px 17px;border-radius:99px;font-size:13.5px;font-weight:500;
  opacity:0;pointer-events:none;transition:.24s;z-index:90;max-width:88%;text-align:center}
.toast.show{opacity:1;transform:translateX(-50%)}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- printable quote ---------- */
#printroot{display:none}
@media print{
  body>#app,body>.sheet,body>.toast{display:none!important}
  #printroot{display:block!important}
  @page{size:A4;margin:12mm 14mm 14mm}
  /* the drawing sheet is its own A3 landscape page (B2) */
  @page dwg{size:A3 landscape;margin:0}
  /* the section is the page; the SVG is positioned absolutely inside it — a wider-than-A4 block
     in normal flow makes Chrome shrink the whole document to fit, an absolute one does not */
  #printroot .dwg{page:dwg;break-before:page;page-break-before:always;width:420mm;height:297mm;overflow:hidden;background:#fff;position:relative}
  #printroot .dwg.only{break-before:auto;page-break-before:auto}
  #printroot .dwg svg{position:absolute;left:0;top:0;width:420mm;height:297mm;display:block}
}
/* the drawing sheet on screen */
.dwgwrap{overflow:auto;-webkit-overflow-scrolling:touch;background:#8a9097;padding:10px;border-radius:12px;max-height:70vh;touch-action:pan-x pan-y pinch-zoom}
.dwgwrap svg{width:1200px;height:auto;display:block;background:#fff;box-shadow:0 6px 24px rgba(0,0,0,.4)}
#printroot{font:11pt/1.3 "Times New Roman",Times,Georgia,serif;color:#000;background:#fff}
/* letterhead — as on the issued quotations */
#printroot .gp-hd{border-bottom:2.2pt solid #000;padding-bottom:4pt;margin-bottom:10pt;break-after:avoid;page-break-after:avoid}
#printroot .gp-hd .top{display:flex;align-items:flex-start;gap:8pt}
#printroot .gp-hd .mark{flex:none;width:58pt;padding-top:1pt}#printroot .gp-hd .mark svg{width:58pt;height:auto;display:block}
#printroot .gp-hd .mid{flex:1;text-align:center}
#printroot .gp-hd .co{font-size:19pt;font-weight:700;letter-spacing:.2pt}
#printroot .gp-hd .iso{font-size:10.5pt;font-weight:700;margin-top:1pt}
#printroot .gp-hd .row2{display:flex;align-items:flex-end;justify-content:space-between;margin-top:2pt;padding:0 0 0 70pt}
#printroot .gp-hd .ct{font-size:10.5pt;line-height:1.35}
#printroot .gp-hd .qr{display:flex;flex-direction:column;align-items:center;border:.8pt solid #000;padding:3pt 4pt 2pt}
#printroot .gp-hd .qr svg{width:40pt;height:40pt;display:block}
#printroot .gp-hd .qr span{font:6.5pt Arial,Helvetica,sans-serif;margin-top:1pt}
#printroot .gp-hd .badge{flex:none;width:86pt}#printroot .gp-hd .badge img{width:86pt;height:auto;display:block}
/* reference, client, subject */
#printroot .ref{margin:4pt 0 10pt}
#printroot .cli{margin-bottom:4pt}
#printroot .cli b{font-size:11pt}
#printroot .kv{display:flex}#printroot .kv span{width:50pt;flex:none}
#printroot .kv.subj{border-bottom:.8pt solid #000;padding-bottom:2pt}
#printroot .intro{margin:2pt 0 8pt}
/* the rate table: black header and total rows, white text */
#printroot table.qt{width:100%;border-collapse:collapse;margin-bottom:8pt}
#printroot table.qt th{border:.7pt solid #000;background:#000;color:#fff;padding:3pt 4pt;font-weight:700;font-size:10.5pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
#printroot table.qt td{border:.7pt solid #000;padding:3pt 5pt;vertical-align:middle;font-size:10.5pt}
#printroot table.qt td.c{text-align:center;white-space:nowrap}
#printroot table.qt td.r{text-align:right;white-space:nowrap}
#printroot table.qt tr.tot td{font-weight:700;background:#000;color:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
#printroot table.qt ol{margin:2pt 0 0 12pt;padding:0}
#printroot table.qt li{margin:0}
#printroot h4{font:700 11pt "Times New Roman",Times,serif;text-decoration:underline;margin:12pt 0 4pt}
/* technical specification: bordered two-column table */
#printroot table.ts{width:100%;border-collapse:collapse;font-size:10.5pt;margin-bottom:6pt}
#printroot table.ts th{text-align:left;width:14%;vertical-align:top;padding:2pt 5pt;font-weight:400;border:.7pt solid #000}
#printroot table.ts td{padding:2pt 5pt;vertical-align:top;border:.7pt solid #000}
#printroot ol.ex{margin:0 0 0 22pt;padding:0;font-size:11pt}#printroot ol.ex li{margin:0 0 4pt}
#printroot .tc{font-size:11pt}
#printroot .tc div{display:flex;margin:0 0 4pt}#printroot .tc span{width:130pt;flex:none}
#printroot .sig{margin-top:26pt;font-size:11pt}#printroot .sig p{margin:0 0 8pt}
#printroot .ft{margin-top:14pt;padding-top:3pt;font:7.5pt Arial,Helvetica,sans-serif;text-align:center;color:#000}
/* pictures */
#printroot .imgs{display:flex;gap:8pt;margin:8pt 0;break-inside:avoid;page-break-inside:avoid}
#printroot .imgs figure{margin:0;flex:1;min-width:0}
#printroot .imgs img{width:100%;border:.6pt solid #999;display:block}
#printroot .imgs figcaption{font-size:8pt;text-align:center;margin-top:2pt}
#printroot .imgs.n3 img{max-height:150pt;object-fit:contain;background:#fff}
#printroot .imgs.n3 img.plan{object-fit:contain}
#printroot .endpics{margin-top:14pt}
#printroot .imgs.wide{flex-direction:column}
#printroot .imgs.wide figure{width:100%}
#printroot .imgnote{font-size:8.5pt;text-align:center;margin:-2pt 0 6pt}
#printroot .site{display:grid;grid-template-columns:repeat(3,1fr);gap:6pt;margin:4pt 0 8pt;break-inside:avoid;page-break-inside:avoid}
#printroot .site img{width:100%;height:110pt;object-fit:cover;border:.6pt solid #999}
#printroot .pgbreak{page-break-before:always;break-before:page}
/* nothing important gets cut in half across a page */
#printroot table.qt tr,#printroot table.ts tr{break-inside:avoid;page-break-inside:avoid}
#printroot table.qt thead{display:table-header-group}
#printroot h4{break-after:avoid;page-break-after:avoid}
#printroot .tc,#printroot .sig,#printroot ol.ex{break-inside:avoid;page-break-inside:avoid}
#printroot p,#printroot li{orphans:3;widows:3}

/* ---------- additions ---------- */
.steps-mini{display:flex;gap:3px;margin-top:6px}
.steps-mini i{width:16px;height:3px;border-radius:2px;background:var(--line);display:block}
.steps-mini i.on{background:var(--ok)}
.stagenum{width:22px;height:22px;border-radius:50%;flex:none;display:grid;place-items:center;
  font:600 11px var(--mono);background:var(--line);color:var(--ink3)}
.stagenum.cur{background:var(--red);color:#fff}
.note{background:var(--warn-soft);color:var(--warn);border-radius:12px;padding:11px 13px;
  font-size:12.5px;font-weight:500;margin-bottom:4px}
.thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:6px}
.thumb{position:relative;aspect-ratio:1;border-radius:12px;background-size:cover;background-position:center;
  box-shadow:inset 0 0 0 1px var(--line)}
.thumb .x{position:absolute;top:-6px;right:-6px;width:24px;height:24px;border-radius:50%;border:0;
  background:var(--red);color:#fff;font-size:15px;line-height:1;cursor:pointer}
img.hero{display:block;object-fit:cover}
/* the floor plan is a drawing: never cropped, shown whole on white */
img.hero.plan{aspect-ratio:auto;height:auto;object-fit:contain;background:#fff}
.viewer canvas.gl{display:block;width:100%;height:100%;touch-action:none}
label.btn{display:flex}
[hidden]{display:none!important}
.viewer .vhint{max-width:52%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:430px){ .viewer .vhint{font-size:10px} .viewer .vdim{font-size:11px} }
.note.ok{background:var(--ok-soft);color:var(--ok)}

/* quote lines: amount stacks over the qty, long descriptions clamp to
   a few lines so the list stays scannable — full text on tap */
.qline .v{display:flex;flex-direction:column;align-items:flex-end;gap:1px;flex:none;max-width:40%}
.qline .v .amt,.qline .v .qty{display:block;white-space:nowrap}
.qline .d b{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.qline .d small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}

/* technical-specification editor */
.specrow{margin-bottom:10px}
.specrow-h{display:flex;gap:8px;align-items:center;margin-bottom:5px}
.specrow-h .lab{font-weight:600;flex:1;min-height:42px;padding:9px 12px}
.xbtn{width:34px;height:34px;flex:none;border:0;border-radius:10px;background:var(--red-soft);
  color:var(--red);font-size:19px;line-height:1;cursor:pointer}
.specrow textarea.inp{min-height:62px;font-size:14px}
.kvrow{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:13.5px;
  border-bottom:.5px solid var(--line);color:var(--ink2)}
.kvrow:last-child{border-bottom:0}
.kvrow b{color:var(--ink);font-weight:600;text-align:right}

/* ---------- sign-in gate ---------- */
#gate{position:fixed;inset:0;z-index:100;background:var(--bg);display:flex;align-items:center;
  justify-content:center;padding:24px;overflow-y:auto}
#gate[hidden]{display:none!important}
.gatebox{width:100%;max-width:380px;display:flex;flex-direction:column}
.gatemark{width:52px;height:52px;border-radius:15px;background:var(--red);color:#fff;
  display:grid;place-items:center;margin-bottom:18px}
.gatemark svg{width:28px;height:28px}
.gatebox h1{font-size:30px;margin-bottom:4px}
.gatebox p.sm{margin-bottom:20px}
.gatebox .field{margin-bottom:14px}
.gateerr{background:var(--red-soft);color:var(--red);border-radius:11px;padding:10px 13px;
  font-size:13px;font-weight:500;margin-bottom:12px}
.gateerr[hidden]{display:none}

/* ---------- sync bar ---------- */
.syncbar{position:fixed;top:var(--top);left:0;right:0;z-index:25;display:flex;align-items:center;
  gap:10px;padding:8px 16px;font-size:12.5px;font-weight:500;
  background:var(--navy-soft);color:var(--navy);border-bottom:.5px solid var(--line)}
.syncbar.warn{background:var(--warn-soft);color:var(--warn)}
.syncbar.hide{display:none}
.syncbar span{flex:1;min-width:0}
.syncbar button{flex:none;border:0;background:currentColor;color:var(--bg);border-radius:99px;
  padding:5px 11px;font:600 12px var(--sans);cursor:pointer;opacity:.92}
body:has(.syncbar:not(.hide)) main#view{padding-top:calc(var(--top) + 44px)}

/* ---- the strip under the 3D view: the selected door / window / ramp ---- */
.selbar{display:none;margin:-6px 0 12px;padding:10px 12px;background:var(--card,#fff);border:1px solid rgba(0,0,0,.08);border-radius:14px}
.selbar.on{display:block}
.selbar .sbrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13.5px}
.selbar .sbrow b{font-weight:650}
.selbar .sbrow .dim{color:#6b7682;font-size:12px;flex:1}
.selbar .nb{border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit;border-radius:9px;min-width:34px;height:32px;padding:0 10px;font-size:15px;line-height:1;cursor:pointer}
.selbar .nb:active{background:rgba(0,0,0,.06)}
.selbar .rng{margin-top:8px}
.selbar .rng label{display:flex;justify-content:space-between;font-size:12.5px;color:#4a5866;margin-bottom:2px}
.selbar .rng input{width:100%}
.selbar .seg{margin-top:8px}
/* small neutral button, used in the selection strip and the specification editor */
.nb{border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit;border-radius:9px;min-width:34px;height:32px;padding:0 10px;font-size:15px;line-height:1;cursor:pointer}

/* ---- the toolbox under the 3D view: tap an icon to place it, hold for its variants ---- */
.toolbox{position:relative;margin:-4px 0 8px}
.toolbox .toolstrip{display:flex;gap:6px;overflow-x:auto;padding:8px 2px 10px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.toolbox .toolstrip::-webkit-scrollbar{display:none}
.toolbox .tool{flex:none;position:relative;width:64px;height:58px;border:1px solid rgba(0,0,0,.12);border-radius:12px;background:var(--card,#fff);color:inherit;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:600 10.5px var(--sans);cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation}
.toolbox .tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.toolbox .tool:active{background:rgba(0,0,0,.06)}
.toolbox .tool .more{position:absolute;right:6px;bottom:6px;width:0;height:0;border-left:4px solid transparent;border-top:4px solid transparent;border-right:4px solid currentColor;border-bottom:4px solid currentColor;opacity:.45;border-radius:0 0 2px 0}
.toolbox .tool[data-t="paint"][style]::after{content:"";position:absolute;top:6px;right:6px;width:10px;height:10px;border-radius:50%;background:var(--sw);box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.toolbox .toolpop{position:absolute;left:0;right:0;bottom:calc(100% - 4px);z-index:5;background:var(--card,#fff);border:1px solid rgba(0,0,0,.14);border-radius:14px;padding:10px 12px;box-shadow:0 10px 30px rgba(0,0,0,.18);
  display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.toolbox .toolpop[hidden]{display:none}
.toolbox .toolpop .tpTitle{width:100%;font-weight:650;font-size:13px}
.toolbox .toolpop .swatches{width:100%}
.swatch.custom{position:relative;display:flex;align-items:center;justify-content:center;background:conic-gradient(#f66,#fc6,#6c6,#6cf,#c6f,#f66);font:700 18px var(--sans);color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.swatch.custom input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.swatch.mini{display:inline-block;width:14px;height:14px;border-radius:4px;vertical-align:-2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18)}
.readout{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:14px}
.readout b{font-weight:650}

/* ---- the brochure: the six trifold panels, swiped, every line a tap ---- */
.bro{padding:8px 0 4px}
.bro-strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding:0 16px 8px;scroll-padding-left:16px;scrollbar-width:none}
.bro-strip::-webkit-scrollbar{display:none}
.bro-panel{flex:0 0 min(100%, max(calc((100vh - 300px) * .4716), min(56%, 320px)));scroll-snap-align:start;position:relative;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.45)}
.bro-panel img{display:block;width:100%;height:auto;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none}
.bro-hs{position:absolute;border:0;background:transparent;border-radius:6px;padding:0;cursor:pointer;-webkit-tap-highlight-color:rgba(232,85,78,.25)}
.bro-hs:active,.bro-hs.flash{background:rgba(232,85,78,.22);outline:2px solid rgba(232,85,78,.9)}
.bro-spacer{flex:0 0 50%}
.bro-tip{position:absolute;left:0;right:0;bottom:14px;text-align:center;pointer-events:none}
.bro-tip span{display:inline-block;background:rgba(15,18,22,.78);color:#fff;font-size:12px;padding:6px 12px;border-radius:999px;animation:broPulse 1.6s ease-in-out infinite}
@keyframes broPulse{0%,100%{opacity:.55}50%{opacity:1}}
.bro-nav{display:flex;align-items:center;justify-content:center;gap:14px;padding:6px 16px 6px}
.bro-nav .nb{width:40px;height:34px;font-size:18px;padding:0}
.bro-dots{display:flex;gap:6px}.bro-dots i{width:7px;height:7px;border-radius:50%;background:#3a424d;display:block}.bro-dots i.on{background:var(--red)}
/* the sign-in card carries the company logo (release 13) */
.gatemark.gatelogo{background:#fff;overflow:hidden;width:72px;height:72px;border-radius:18px;border:1px solid rgba(0,0,0,.08)}
.gatemark.gatelogo img{width:100%;height:100%;display:block;object-fit:cover}
.gatebox h1 small{display:block;font-size:13px;font-weight:500;color:var(--muted,#8b95a3);margin-top:2px}
