/* KNCad animated CAD window + drawing sheets (home, features) */
.cadwrap{perspective:1800px;perspective-origin:50% 0%}
.cadtilt{transform-origin:50% 0%;will-change:transform;transform:rotateX(var(--rx,0deg)) scale(var(--sc,1)) translateY(var(--ty,0px))}
.cadbox{position:relative;width:100%;aspect-ratio:1120/660}
.cad{position:absolute;left:0;top:0;width:1120px;height:660px;transform-origin:0 0;transform:scale(var(--k,1));
  background:#1b1f24;border-radius:14px;overflow:hidden;color:#cfd5dc;font:12px/1.2 var(--f-sans);
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 60px 120px -40px rgba(7,9,12,.55),0 30px 60px -30px rgba(7,9,12,.45),0 0 0 1px rgba(13,16,20,.12)}
.cad .tb{height:32px;display:flex;align-items:center;gap:8px;padding:0 14px;background:#121518;border-bottom:1px solid #000}
.cad .tb i{width:11px;height:11px;border-radius:50%;background:#3a4048}
.cad .tb i:nth-child(1){background:#ef5f57}.cad .tb i:nth-child(2){background:#f5bd4f}.cad .tb i:nth-child(3){background:#5fc454}
.cad .tb span{margin:auto;color:#8a939d;font-size:12px}
.cad .tabs{height:28px;display:flex;align-items:flex-end;gap:2px;padding:0 10px;background:#22272d}
.cad .tabs b{font-weight:500;padding:6px 12px;color:#8f99a3;border-radius:6px 6px 0 0}
.cad .tabs b.on{background:#2c3238;color:#fff;box-shadow:inset 0 2px 0 var(--rebar)}
.cad .rib{height:92px;display:flex;align-items:stretch;gap:0;padding:8px 8px 0;background:#2c3238;border-bottom:1px solid #111}
.cad .grp{display:flex;flex-direction:column;padding:0 6px;border-right:1px solid #3c434b}
.cad .grp > div{display:flex;gap:2px;flex:1}
.cad .grp small{display:block;text-align:center;color:#7d8791;font-size:10.5px;padding:4px 0 5px}
.cad .bt{width:62px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:7px;color:#d6dbe0;font-size:11px;transition:background .2s,box-shadow .2s}
.cad .bt svg{width:28px;height:28px}
.cad .bt.hl{background:#3b434c;box-shadow:inset 0 0 0 1px #586270}
.cad .bt.press{background:rgba(232,112,42,.22);box-shadow:inset 0 0 0 1px var(--rebar)}
.cad .ws{position:absolute;left:0;right:0;top:152px;bottom:26px;background:#212830;overflow:hidden}
.cad .ws::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:40px 40px}
.cad .ws svg.dwg{position:absolute;inset:12px 16px;width:calc(100% - 32px);height:calc(100% - 24px)}
.cad .ucs{position:absolute;left:14px;bottom:10px;width:46px;height:46px}
.cad .sb{position:absolute;left:0;right:0;bottom:0;height:26px;display:flex;align-items:center;gap:18px;padding:0 14px;background:#121518;color:#8a939d;font:11px var(--f-mono)}
.cad .sb .msg{color:#cfd5dc;transition:color .3s}
.cad .sb .msg.ok{color:#7fd6a3}
.cad .sb span:last-child{margin-left:auto}
/* dialog */
.cad .dlg{position:absolute;left:50%;top:250px;width:330px;transform:translate(-50%,10px) scale(.97);opacity:0;pointer-events:none;background:#2a3036;border:1px solid #4a535d;border-radius:10px;box-shadow:0 24px 60px rgba(0,0,0,.5);transition:opacity .3s,transform .35s var(--ease)}
.cad .dlg.on{opacity:1;transform:translate(-50%,0) scale(1)}
.cad .dlg h4{margin:0;padding:11px 14px;font-size:12.5px;font-weight:600;color:#fff;border-bottom:1px solid #3c434b;display:flex;align-items:center;gap:8px}
.cad .dlg h4::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--rebar)}
.cad .dlg .rows{padding:10px 14px;display:grid;gap:7px}
.cad .dlg .r{display:flex;justify-content:space-between;color:#a9b2bb}
.cad .dlg .r em{font-style:normal;color:#fff;font-family:var(--f-mono);background:#1e2328;border:1px solid #444c55;border-radius:5px;padding:2px 8px;min-width:76px;text-align:right}
.cad .dlg .bar{height:4px;border-radius:2px;background:#1e2328;overflow:hidden;margin:4px 14px 0}
.cad .dlg .bar u{display:block;height:100%;width:0;background:var(--rebar);transition:width .9s linear}
.cad .dlg .ft{display:flex;justify-content:flex-end;gap:8px;padding:12px 14px}
.cad .dlg .ft b{padding:6px 16px;border-radius:6px;font-weight:500;background:#3a4148;color:#d6dbe0}
.cad .dlg .ft b.go{background:var(--rebar);color:#fff}
.cad .dlg .ft b.go.press{filter:brightness(.85)}
.cad .cur{position:absolute;left:560px;top:420px;width:20px;height:20px;z-index:5;transition:left .9s var(--ease),top .9s var(--ease);pointer-events:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))}
.cad .cur.clk::after{content:"";position:absolute;left:-12px;top:-12px;width:24px;height:24px;border-radius:50%;border:2px solid var(--rebar);animation:clk .45s ease-out forwards}
@keyframes clk{from{transform:scale(.3);opacity:1}to{transform:scale(1.4);opacity:0}}
/* drawing animation */
.dwg .dl{stroke-dasharray:1;stroke-dashoffset:1;fill-opacity:0}
.dwg .df{opacity:0;transform-box:fill-box;transform-origin:center;transform:scale(.4)}
.dwg .dt{opacity:0}
.dwg.go .dl{stroke-dashoffset:0;fill-opacity:1;transition:stroke-dashoffset .9s var(--ease) var(--d,0s),fill-opacity .6s ease calc(var(--d,0s) + .5s)}
.dwg.go .df{opacity:1;transform:none;transition:opacity .4s var(--d,0s),transform .5s var(--ease) var(--d,0s)}
.dwg.go .dt{opacity:1;transition:opacity .5s var(--d,0s)}
.dwg.done .dl,.dwg.done .df,.dwg.done .dt{transition:none}
/* CAD model-space colors (layer look) */
.cad .dwg .c{stroke:#dfe4ea;fill:none;stroke-width:1.2}
.cad .dwg .k{stroke:#dfe4ea;fill:none;stroke-width:1.2}
.cad .dwg .r{stroke:#f07a35;fill:none;stroke-width:1.9}
.cad .dwg .rf{fill:#f07a35}
.cad .dwg .s{stroke:#3fc1cf;fill:none;stroke-width:1}
.cad .dwg .a{stroke:#e5534b;fill:none;stroke-width:.8;stroke-dasharray:14 3 2 3}
.cad .dwg .d{stroke:#8a939d;fill:none;stroke-width:.7}
.cad .dwg text{font-family:var(--f-mono);font-size:10px;fill:#f2d16b}
.cad .dwg text.t{font-family:var(--f-sans);font-size:14px;font-weight:600;fill:#ffffff}
.cad .dwg text.o{fill:#f59a62}
.cad .dwg text.b{fill:#7fd9e3}
.pg .k{stroke:#0d1014;fill:none;stroke-width:1.3}
.pg .c{stroke:#0d1014;fill:rgba(13,16,20,.045);stroke-width:1.3}
.pg .r{stroke:#c45a14;fill:none;stroke-width:2}
.pg .rf{fill:#c45a14}
.pg .s{stroke:#167a86;fill:none;stroke-width:1.1}
.pg .a{stroke:#d6454c;fill:none;stroke-width:.8;stroke-dasharray:14 3 2 3}
.pg .d{stroke:#56606b;fill:none;stroke-width:.7}
.pg text{font-family:var(--f-mono);font-size:10px;fill:#3d4650}
.pg text.t{font-family:var(--f-sans);font-size:15px;font-weight:650;fill:#0d1014;letter-spacing:-.01em}
.pg text.o{fill:#b9500f;font-weight:600}
.pg text.b{fill:#167a86}


.dwg{transition:opacity .45s}
.dwg.out{opacity:.14}
.pg .colf{fill:#0d1014}
.cad .dwg .colf{fill:#dfe4ea}
.cad .dwg .hat,.pg .hat{fill:url(#kncHatch)}
.cadwrap .scn{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:26px}
.cadwrap .scn button{position:relative;overflow:hidden;font:inherit;font-size:.84rem;font-weight:500;color:#56606b;background:none;border:1px solid #dadee3;border-radius:999px;padding:7px 15px;cursor:pointer;transition:color .2s,border-color .2s,background .2s}
.cadwrap .scn button:hover{color:#0d1014}
.cadwrap .scn button.on{color:#0d1014;border-color:#0d1014}
.cadwrap .scn button i{position:absolute;left:0;bottom:0;height:2px;width:0;background:#e8702a}
.cadwrap.on-dark .scn button{color:#9aa3ae;border-color:#232a33}
.cadwrap.on-dark .scn button.on{color:#f3f5f7;border-color:#f3f5f7}
.cad .dlg .r em{white-space:nowrap}
@media (prefers-reduced-motion:reduce){.cadtilt{transform:none!important}}
.dwg .grow{transform-box:fill-box;transform-origin:0 50%;transform:scaleX(0)}
.dwg.go .grow{transform:none;transition:transform 1.1s var(--ease,cubic-bezier(.22,.7,.12,1)) .15s}
.dwg.done .grow{transition:none}

.cadbox{max-width:100%;overflow:clip;overflow-clip-margin:90px}
