/* QuantaFinder — the laser machine on the home page, and the dark header. Loaded after calm.css. */

.hero-lab { padding: clamp(16px, 2.4vw, 28px) 0 0; }
.lab { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.45fr); gap: 24px; align-items: stretch; background: #0A0B14; color: #fff; border-radius: 28px; padding: clamp(22px, 3vw, 40px); position: relative; overflow: hidden; }
.lab::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 60%, rgba(91,61,245,.22), transparent 70%), radial-gradient(40% 40% at 20% 20%, rgba(0,229,255,.10), transparent 70%); }
.lab > * { position: relative; }
.lab-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.lab-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9FE9FF; }
.lab-live { width: 8px; height: 8px; border-radius: 50%; background: #9FE9FF; box-shadow: 0 0 0 0 rgba(159,233,255,.6); animation: pulse-dot 1.8s ease-out infinite; }
@keyframes pulse-dot { 70% { box-shadow: 0 0 0 10px rgba(159,233,255,0); } 100% { box-shadow: 0 0 0 0 rgba(159,233,255,0); } }
.lab-copy h1 { font-size: clamp(2.4rem, 1.4rem + 2.8vw, 4rem); line-height: 1.02; letter-spacing: -.03em; margin: 0; max-width: 11ch; color: #fff;
  background: linear-gradient(100deg, #fff 0%, #fff 42%, #9FE9FF 50%, #C9B8FF 56%, #fff 64%, #fff 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: engrave 7s ease-in-out infinite; }
.lab-copy p { color: #B9BBD0; margin: 0; max-width: 44ch; }
.lab-copy .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-copy .btn-light { animation: pulse 2.8s ease-out infinite; }
.lab-copy .btn-outline-light { border-color: rgba(255,255,255,.4); color: #fff; }

/* the three steps of making, lit in time with the machine */
.lab-steps { list-style: none; margin: 6px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.14); display: grid; gap: 10px; counter-reset: step; }
.lab-steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 10px; align-items: baseline; color: #8E90B4; font-size: 13px; transition: color .3s; }
.lab-steps li::before { content: counter(step); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #B9BBD0; transition: background .3s, color .3s, border-color .3s, box-shadow .3s; }
.lab-steps strong { color: #D2D2D7; font-size: 14px; transition: color .3s; }
.lab-steps li.is-on { color: #B9BBD0; }
.lab-steps li.is-on strong { color: #fff; }
.lab-steps li.is-on::before { background: #9FE9FF; border-color: #9FE9FF; color: #0A0B14; box-shadow: 0 0 0 4px rgba(159,233,255,.18), 0 0 18px rgba(0,229,255,.6); }

/* ---------- the machine ---------- */
.lab-scene { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 440px; }
.lab-machine { position: relative; flex: 1; min-height: 320px; perspective: 1500px; perspective-origin: 50% 20%; }
.lab-bed { --lean-x: 0deg; --lean-z: 0deg; position: absolute; left: 50%; top: 52%; width: 520px; height: 300px; margin: -150px 0 0 -260px; transform-style: preserve-3d;
  transform: rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); transition: transform .35s ease-out;
  background: linear-gradient(135deg, #15172A, #0F1020); border-radius: 10px; box-shadow: 0 70px 100px -30px rgba(0,0,0,.85), inset 0 0 0 1px rgba(255,255,255,.08); }
.lab-bed::before { content: ""; position: absolute; inset: 12px; border-radius: 6px; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 20px 20px; }
.lab-wall { position: absolute; background: linear-gradient(#262A4D, #171A33); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transform-origin: top; pointer-events: none; }
.lab-wall-back { left: -12px; right: -12px; top: -12px; height: 170px; transform-origin: bottom; transform: translateY(-170px) rotateX(-90deg); transform-origin: bottom center; border-radius: 10px 10px 0 0; }
.lab-wall-left { left: -12px; top: -12px; bottom: -12px; width: 170px; transform-origin: left center; transform: translateX(-170px) rotateY(90deg); border-radius: 10px 0 0 10px; }
.lab-wall-right { right: -12px; top: -12px; bottom: -12px; width: 170px; transform-origin: right center; transform: translateX(170px) rotateY(-90deg); border-radius: 0 10px 10px 0; }
.lab-wall-back { transform: translateY(-170px) rotateX(-90deg); }
.lab-wall-back, .lab-wall-left, .lab-wall-right { opacity: .92; }
.lab-lid { position: absolute; left: -12px; right: -12px; top: -12px; bottom: -12px; border-radius: 10px; transform: translateZ(170px); pointer-events: none;
  background: linear-gradient(135deg, rgba(159,233,255,.14), rgba(255,255,255,.03) 40%, rgba(91,61,245,.10)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 40px rgba(0,229,255,.08); }
.lab-lid::after { content: ""; position: absolute; left: 6%; right: 50%; top: 8%; height: 18%; border-radius: 50%; background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,0)); filter: blur(6px); }

/* queue of blanks waiting at the left */
.lab-tray { position: absolute; left: 16px; top: 50%; width: 60px; height: 60px; margin-top: -30px; transform: translateZ(6px); transform-style: preserve-3d; pointer-events: none; }
.lab-blank { position: absolute; inset: 0; border-radius: 8px; background-size: cover; background-position: center; background-color: #2A2D4C; filter: saturate(.3) brightness(.55); box-shadow: 0 4px 0 -2px rgba(0,0,0,.6); }
.lab-blank:nth-child(2) { transform: translate3d(-10px, 8px, -8px) scale(.92); opacity: .7; }
.lab-blank:nth-child(3) { transform: translate3d(-20px, 16px, -16px) scale(.84); opacity: .45; }

/* the piece being made: a 3D slab that starts as blank material and becomes the product */
.lab-job { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; transform-style: preserve-3d; cursor: pointer;
  transform: translate3d(0, 0, 12px); opacity: 1; transition: transform .8s cubic-bezier(.4,0,.2,1), opacity .5s ease; }
.lab-job.is-enter { transform: translate3d(-290px, 0, 12px); opacity: 0; transition: none; }
.lab-job.is-set { transform: translate3d(0, 0, 12px); opacity: 1; }
.lab-job.is-lift { transform: translate3d(0, 0, 70px) rotateX(-18deg) rotateZ(4deg); transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.lab-job.is-exit { transform: translate3d(300px, -40px, 40px) rotateX(-10deg); opacity: 0; transition: transform .7s cubic-bezier(.4,0,.8,.6), opacity .5s ease .2s; }
.lab-slab { position: absolute; inset: 0; transform-style: preserve-3d; border-radius: 12px; }
.lab-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 16px 24px -10px rgba(0,0,0,.8); }
.lab-img-blank { filter: saturate(.25) brightness(.8) contrast(.95); }
.lab-img-done { clip-path: inset(100% 0 0 0); }
.lab-job.is-cutting .lab-img-done { animation: reveal 2.5s linear forwards; }
.lab-job.is-done .lab-img-done { clip-path: inset(0 0 0 0); }
.lab-job.is-done .lab-img-blank { opacity: 0; }
@keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.lab-scan { position: absolute; left: -6px; right: -6px; top: 0; height: 3px; opacity: 0; pointer-events: none; background: linear-gradient(90deg, transparent, #fff 20%, rgba(0,229,255,1) 50%, #fff 80%, transparent); box-shadow: 0 0 16px 4px rgba(0,229,255,.8); }
.lab-job.is-cutting .lab-scan { opacity: 1; animation: scan 2.5s linear forwards; }
@keyframes scan { from { top: 0; } to { top: calc(100% - 3px); } }
.lab-job.is-cutting .lab-slab { box-shadow: 0 0 0 2px rgba(0,229,255,.85), 0 0 50px 10px rgba(0,229,255,.35); border-radius: 12px; }
.lab-job.is-done .lab-slab { box-shadow: 0 0 0 1px rgba(0,229,255,.5), 0 30px 50px -16px rgba(0,0,0,.9); }
.lab-edge { position: absolute; background: #D9DBE8; pointer-events: none; }
.lab-edge-b { left: 2px; right: 2px; bottom: 0; height: 10px; transform-origin: bottom; transform: rotateX(-90deg) translateY(10px); background: linear-gradient(#C9CBDB, #9EA1B8); border-radius: 0 0 4px 4px; }
.lab-edge-r { top: 2px; bottom: 2px; right: 0; width: 10px; transform-origin: right; transform: rotateY(90deg) translateX(10px); background: linear-gradient(90deg, #C9CBDB, #9EA1B8); border-radius: 0 4px 4px 0; }

/* sparks at the point of contact */
.lab-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translateZ(14px); pointer-events: none; }
.lab-sparks i { position: absolute; left: 0; top: 0; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(0,229,255,.9); opacity: 0; }
.lab-sparks.is-on i { animation: spark .7s ease-out infinite; }
.lab-sparks i:nth-child(1) { --dx: 26px; --dy: -18px; animation-delay: 0s; }
.lab-sparks i:nth-child(2) { --dx: -30px; --dy: -12px; animation-delay: .1s; }
.lab-sparks i:nth-child(3) { --dx: 18px; --dy: 24px; animation-delay: .2s; }
.lab-sparks i:nth-child(4) { --dx: -22px; --dy: 20px; animation-delay: .3s; }
.lab-sparks i:nth-child(5) { --dx: 34px; --dy: 4px; animation-delay: .15s; }
.lab-sparks i:nth-child(6) { --dx: -36px; --dy: 2px; animation-delay: .45s; }
.lab-sparks i:nth-child(7) { --dx: 8px; --dy: -30px; animation-delay: .35s; }
.lab-sparks i:nth-child(8) { --dx: -6px; --dy: 32px; animation-delay: .55s; }
@keyframes spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* gantry and head */
.lab-gantry { position: absolute; left: -16px; right: -16px; top: 20px; height: 14px; border-radius: 7px; background: linear-gradient(#3A3E68, #23264A); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 22px 30px -10px rgba(0,0,0,.8); transform: translateZ(150px); transform-style: preserve-3d; }
.lab-head { position: absolute; top: -10px; left: 40px; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(#E9EAF4, #B9BBD0); box-shadow: 0 6px 0 -2px #6E7196, 0 14px 20px -8px rgba(0,0,0,.8); transform-style: preserve-3d; transition: left .6s cubic-bezier(.4,0,.2,1), top .6s cubic-bezier(.4,0,.2,1); }
.lab-head.is-center { left: calc(50% - 17px + 16px); top: 120px; }
.lab-dot { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #0A0B14; box-shadow: inset 0 0 0 2px #4D5078; }
.lab-beam { position: absolute; left: 50%; top: 50%; width: 3px; height: 150px; margin-left: -1.5px; transform-origin: top center; transform: rotateX(-90deg); opacity: 0; transition: opacity .12s;
  background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(0,229,255,.95) 30%, rgba(91,61,245,.85) 70%, rgba(91,61,245,.2)); box-shadow: 0 0 10px 2px rgba(0,229,255,.8), 0 0 30px 8px rgba(91,61,245,.4); }
.lab-head.is-on .lab-beam { opacity: 1; animation: flicker .12s steps(2) infinite; }
.lab-head.is-on .lab-dot { background: #fff; box-shadow: 0 0 10px 4px rgba(0,229,255,.9); }
@keyframes flicker { to { opacity: .82; } }

/* the rack of finished products under the machine */
.lab-rackwrap { position: relative; }
.lab-racklabel { margin: 0 0 8px; font-size: .875rem; color: #B9BBD0; }
.lab-racklabel strong { color: #fff; }
.lab-price { color: #9FE9FF; }
.lab-status { display: inline-block; min-width: 9.5em; color: #9FE9FF; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; margin-right: 4px; }
.lab-rack { list-style: none; margin: 0; padding: 4px 0 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.lab-made { display: block; border-radius: 10px; overflow: hidden; background: #fff; text-decoration: none; color: #1D1D1F; transform: perspective(600px) rotateX(8deg); transition: transform .3s ease, box-shadow .3s ease, opacity .3s; opacity: .55; filter: saturate(.7); box-shadow: 0 8px 0 -4px rgba(0,0,0,.6), 0 12px 16px -8px rgba(0,0,0,.7); }
.lab-made img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.lab-made span { position: absolute; left: -9999px; }
.lab-made:hover, .lab-made:focus-visible, .lab-made.is-now { opacity: 1; filter: none; transform: perspective(600px) rotateX(0deg) translateY(-4px); }
.lab-made.is-fresh { opacity: 1; filter: none; box-shadow: 0 8px 0 -4px rgba(0,0,0,.6), 0 0 0 2px rgba(0,229,255,.9), 0 0 24px 4px rgba(0,229,255,.5); }
.lab-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.lab-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.lab-btn:hover { background: rgba(255,255,255,.12); }
.lab-open { color: #fff; font-weight: 600; margin-left: 6px; }
.lab-open:hover { color: #9FE9FF; }

@media (max-width: 1100px) { .lab { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .lab { padding: 18px; border-radius: 20px; }
  .lab-scene { min-height: 0; }
  .lab-machine { min-height: 250px; perspective: 1000px; }
  .lab-bed { transform: scale(.58) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); top: 48%; }
  .lab-copy h1 { max-width: none; }
  .lab-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lab-steps li { grid-template-columns: 1fr; font-size: 11px; }
  .lab-steps li::before { grid-row: auto; margin-bottom: 4px; }
  .lab-steps li span { display: none; }
  .lab-rack { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1400px) { .lab-bed { transform: scale(1.1) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); } }
@media (prefers-reduced-motion: reduce) {
  .lab-live, .lab-copy h1, .lab-copy .btn-light, .lab-sparks.is-on i, .lab-head.is-on .lab-beam { animation: none !important; }
  .lab-copy h1 { -webkit-text-fill-color: #fff; background: none; }
  .lab-job, .lab-head, .lab-bed { transition: none; }
  .lab-job.is-cutting .lab-img-done { animation: none; clip-path: inset(0 0 0 0); }
  .lab-job.is-cutting .lab-scan { animation: none; opacity: 0; }
}

/* ---------- header: the original dark bar with the white logo ---------- */
.site-header { background: #0E0F1A; color: #fff; border-bottom: 0; }
.header-main { border-bottom: 1px solid rgba(255,255,255,.08); }
.search { background: rgba(255,255,255,.1); }
.search:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(0,229,255,.5); }
.search-q { color: #fff; }
.search:focus-within .search-q, .search:focus-within .search-dept, .search:focus-within .search-go { color: #1D1D1F; }
.search-q::placeholder { color: #A9ABC9; }
.search-dept { color: #D2D2D7; border-right-color: rgba(255,255,255,.18); }
.search-dept option { color: #1D1D1F; }
.search-go { color: #fff; }
.search-go:hover { background: rgba(255,255,255,.14); }
.tool { color: #fff; }
.tool:hover { color: #fff; background: rgba(255,255,255,.1); }
.tool-small { color: #A9ABC9; }
.dept-bar { background: #0E0F1A; border-top: 1px solid rgba(255,255,255,.06); }
.all-depts { color: #fff; }
.all-depts:hover, .all-depts[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.1); }
.dept-links a, .dept-extra a { color: #fff; opacity: .78; }
.dept-links a:hover, .dept-extra a:hover, .dept-links a[aria-current="page"], .dept-extra a[aria-current="page"] { color: #fff; opacity: 1; background: rgba(255,255,255,.1); }
.dept-extra { border-left-color: rgba(255,255,255,.14); }
.menu-btn { color: #fff; }
@media (max-width: 900px) { .menu-btn { color: #fff; } .dept-extra { border-right-color: rgba(255,255,255,.14); } }

/* fixes after the first look: square rack photos, machine sits lower so it doesn't poke out of the panel */
.lab-made img { height: auto; }
.lab-machine { min-height: 390px; perspective-origin: 50% 12%; }
.lab-bed { top: 60%; }
@media (max-width: 640px) { .lab-machine { min-height: 260px; } .lab-bed { top: 52%; } }

/* faster and larger, all products on the rack */
.lab-machine { min-height: 470px; }
.lab-bed { width: 640px; height: 370px; margin: -185px 0 0 -320px; }
.lab-job { width: 210px; height: 210px; margin: -105px 0 0 -105px; transition: transform .45s cubic-bezier(.4,0,.2,1), opacity .3s ease; }
.lab-job.is-enter { transform: translate3d(-360px, 0, 12px); }
.lab-job.is-lift { transform: translate3d(0, 0, 80px) rotateX(-18deg) rotateZ(4deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.lab-job.is-exit { transform: translate3d(380px, -50px, 50px) rotateX(-10deg); transition: transform .45s cubic-bezier(.4,0,.8,.6), opacity .3s ease .1s; }
.lab-job.is-cutting .lab-img-done { animation-duration: 1.2s; }
.lab-job.is-cutting .lab-scan { animation-duration: 1.2s; }
.lab-head { width: 40px; height: 40px; top: -13px; transition-duration: .35s, .35s; }
.lab-head.is-center { left: calc(50% - 20px + 16px); top: 150px; }
.lab-beam { height: 172px; }
.lab-gantry { transform: translateZ(172px); }
.lab-lid { transform: translateZ(192px); }
.lab-wall-back { height: 192px; transform: translateY(-192px) rotateX(-90deg); }
.lab-wall-left, .lab-wall-right { width: 192px; }
.lab-wall-left { transform: translateX(-192px) rotateY(90deg); }
.lab-wall-right { transform: translateX(192px) rotateY(-90deg); }
.lab-tray { width: 72px; height: 72px; margin-top: -36px; }
.lab-sparks.is-on i { animation-duration: .45s; }
.lab-rack { display: grid; grid-auto-flow: column; grid-auto-columns: 58px; grid-template-columns: none; gap: 8px; overflow-x: auto; padding: 6px 0 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.lab-rack::-webkit-scrollbar { height: 5px; }
.lab-rack::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
@media (max-width: 640px) { .lab-machine { min-height: 300px; } .lab-bed { transform: scale(.52) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); } .lab-rack { grid-auto-columns: 52px; } }
@media (min-width: 1400px) { .lab-bed { transform: scale(1.06) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); } }
/* keep the bigger machine off the text: wider right column, text on top */
.lab { grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr); }
.lab-copy { z-index: 2; }
.lab-scene { z-index: 1; }
.lab-bed { left: 55%; }
@media (max-width: 1400px) { .lab-bed { transform: scale(.92) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); } }
@media (max-width: 1100px) { .lab { grid-template-columns: 1fr; } .lab-bed { left: 50%; } }

/* category chips above the rack */
.lab-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lab-cat { font: 600 12px/1 var(--body); padding: 8px 12px; border-radius: 980px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #D2D2D7; cursor: pointer; }
.lab-cat:hover { border-color: #fff; color: #fff; }
.lab-cat.is-on { background: #9FE9FF; border-color: #9FE9FF; color: #0A0B14; }
.lab-rack li.is-hidden { display: none; }

/* phones: this rule is last on purpose so it wins over the desktop scaling above */
@media (max-width: 640px) {
  .lab-machine { min-height: 290px; perspective: 900px; perspective-origin: 50% 10%; }
  .lab-bed { left: 50%; top: 50%; transform: scale(.5) rotateX(calc(60deg + var(--lean-x))) rotateZ(calc(-16deg + var(--lean-z))); }
  .lab-cats { gap: 5px; }
  .lab-cat { padding: 7px 10px; font-size: 11px; }
}
/* the 40-item rack must scroll inside its column, never widen the page */
.lab-scene, .lab-rackwrap { min-width: 0; }
.lab-rack { min-width: 0; max-width: 100%; }
@media (max-width: 1100px) { .lab { grid-template-columns: minmax(0, 1fr); } }

/* ===== solid machine: one object, not floating panels ===== */
.lab-machine::after { content: ""; position: absolute; left: 50%; top: 86%; width: 70%; height: 60px; margin-left: -35%; border-radius: 50%; background: radial-gradient(ellipse, rgba(5,20,45,.55), rgba(5,20,45,0) 70%); filter: blur(10px); pointer-events: none; z-index: 0; }
.lab-bed { background: linear-gradient(135deg, #2A3147, #151A2B); border-radius: 8px; box-shadow: inset 0 0 0 2px #3A4360, inset 0 0 40px rgba(0,0,0,.5), 0 50px 70px -30px rgba(5,20,45,.7); }
.lab-bed::before { background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 16px 16px; inset: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.lab-bed::after { content: ""; position: absolute; inset: -18px; border-radius: 12px; background: linear-gradient(135deg, #1B2133, #0B0F1C); transform: translateZ(-26px); box-shadow: inset 0 0 0 2px #2A3147, 0 40px 60px -20px rgba(0,0,0,.9); pointer-events: none; }
.lab-wall { background: linear-gradient(#2F3752, #1B2133 60%, #141928); box-shadow: inset 0 0 0 2px #3A4360, inset 0 -30px 40px rgba(0,0,0,.35); opacity: 1; }
.lab-wall-back { height: 192px; transform: translateY(-192px) rotateX(-90deg); border-radius: 6px 6px 0 0; }
.lab-wall-left, .lab-wall-right { width: 192px; }
.lab-wall-left { transform: translateX(-192px) rotateY(90deg); border-radius: 6px 0 0 6px; }
.lab-wall-right { transform: translateX(192px) rotateY(-90deg); border-radius: 0 6px 6px 0; }
.lab-lid { border: 12px solid #2A3147; border-radius: 10px; background: linear-gradient(135deg, rgba(190,225,255,.22), rgba(255,255,255,.06) 40%, rgba(120,170,230,.14)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 0 0 2px #3A4360, 0 30px 50px -20px rgba(0,0,0,.6); transform: translateZ(192px); }
.lab-lid::after { left: 8%; right: 55%; top: 10%; height: 16%; }
.lab-gantry { height: 18px; top: 16px; background: linear-gradient(#5A6485, #343C57 55%, #262D44); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 26px 30px -10px rgba(0,0,0,.8); transform: translateZ(172px); }
.lab-gantry::before, .lab-gantry::after { content: ""; position: absolute; top: -6px; width: 28px; height: 30px; border-radius: 5px; background: linear-gradient(#3A4360, #1B2133); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.lab-gantry::before { left: -6px; }
.lab-gantry::after { right: -6px; }
.lab-head { width: 44px; height: 44px; top: -14px; border-radius: 7px; background: linear-gradient(#F4F5FA, #B9BBD0 60%, #8E92AE); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 8px 0 -2px #5A5E7E, 0 18px 24px -8px rgba(0,0,0,.8); }
.lab-head::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #6E7196, #2A2D4A 70%); box-shadow: inset 0 0 0 2px #B9BBD0; }
.lab-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; box-shadow: none; background: #0A0B14; }
.lab-head.is-center { left: calc(50% - 22px + 16px); top: 150px; }
.lab-edge { background: #CFD3E2; }
.lab-edge-b { height: 12px; transform: rotateX(-90deg) translateY(12px); }
.lab-edge-r { width: 12px; transform: rotateY(90deg) translateX(12px); }
@media (max-width: 640px) { .lab-machine::after { display: none; } }

/* ===== open-frame machine: a thick base with two side rails and a gantry riding on them.
   No walls or lid, so nothing can look like a floating panel. ===== */
.lab-lid { display: none; }
.lab-machine { perspective-origin: 50% 30%; }
.lab-bed { transform: rotateX(calc(56deg + var(--lean-x))) rotateZ(calc(-14deg + var(--lean-z))); }
.lab-wall { transform-origin: center; box-shadow: none; opacity: 1; border-radius: 4px; }
.lab-wall-left, .lab-wall-right { top: -12px; bottom: -12px; width: 26px; height: auto; transform: translateZ(42px); background: linear-gradient(90deg, #4A5375, #2A3147 50%, #1E2438); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.lab-wall-left { left: -12px; }
.lab-wall-right { right: -12px; }
.lab-wall-left::before, .lab-wall-right::before { content: ""; position: absolute; top: 0; bottom: 0; width: 42px; background: linear-gradient(#1E2438, #0E1220); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.lab-wall-left::before { left: 0; transform-origin: left center; transform: rotateY(-90deg); }
.lab-wall-right::before { right: 0; transform-origin: right center; transform: rotateY(90deg); }
.lab-wall-back { left: -12px; right: -12px; top: -12px; height: 26px; transform: translateZ(42px); background: linear-gradient(#4A5375, #2A3147 50%, #1E2438); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.lab-wall-back::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 42px; background: linear-gradient(#1E2438, #0E1220); transform-origin: top center; transform: rotateX(90deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.lab-gantry { top: 60px; height: 16px; transform: translateZ(60px); background: linear-gradient(#6A7498, #3A4360 55%, #262D44); }
.lab-gantry::before, .lab-gantry::after { top: -8px; width: 30px; height: 32px; background: linear-gradient(#4A5375, #1E2438); }
.lab-head { top: -16px; }
.lab-head.is-center { top: 60px; }
.lab-beam { height: 50px; }
.lab-bed::after { inset: -14px; transform: translateZ(-22px); }
@media (max-width: 640px) { .lab-bed { transform: scale(.5) rotateX(calc(56deg + var(--lean-x))) rotateZ(calc(-14deg + var(--lean-z))); } }
@media (min-width: 1400px) { .lab-bed { transform: scale(1.06) rotateX(calc(56deg + var(--lean-x))) rotateZ(calc(-14deg + var(--lean-z))); } }

/* ===== machine v4: the site's own blues. A soft slab, a laser column coming down into it,
   the beam tracing across and along to cut, then the cut piece becomes the product. ===== */
.lab-wall, .lab-gantry::before, .lab-gantry::after, .lab-head::before, .lab-tray { display: none; }
.lab-machine::after { background: radial-gradient(ellipse, rgba(10,50,100,.45), rgba(10,50,100,0) 70%); top: 84%; }
.lab-bed { background: linear-gradient(135deg, #3F96DE 0%, #2272BE 55%, #175A9C 100%); border-radius: 26px; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -20px 40px rgba(10,50,100,.35), 0 50px 70px -30px rgba(10,50,100,.6); }
.lab-bed::before { display: none; }
.lab-bed::after { inset: -10px; border-radius: 30px; background: linear-gradient(135deg, #1E66AE, #0F4278); transform: translateZ(-24px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 40px 60px -20px rgba(10,50,100,.8); }
/* the X bar: a smooth tube across the bed */
.lab-gantry { height: 22px; top: 60px; border-radius: 11px; background: linear-gradient(#9FD2FF 0%, #4FA3EC 45%, #1C66AE 100%); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 20px 30px -10px rgba(10,50,100,.7); transform: translateZ(150px); transition: top .9s cubic-bezier(.4,0,.2,1); }
/* the laser column: a tube standing on the head, coming down from above */
.lab-head { width: 30px; height: 30px; top: -4px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #DFF1FF, #4FA3EC 60%, #1C66AE); box-shadow: 0 10px 20px -8px rgba(10,50,100,.8); transition: left .9s cubic-bezier(.4,0,.2,1), top .9s cubic-bezier(.4,0,.2,1); }
.lab-head::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 190px; margin-left: -15px; border-radius: 15px 15px 6px 6px; transform-origin: 50% 100%; transform: translateY(-100%) rotateX(90deg); background: linear-gradient(90deg, #1C66AE 0%, #4FA3EC 35%, #9FD2FF 55%, #4FA3EC 80%, #1C66AE 100%); box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.lab-head.is-center { left: calc(50% - 15px + 16px); top: 60px; }
.lab-dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #0B1424; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.lab-beam { height: 150px; width: 3px; background: linear-gradient(to bottom, #fff, #E8384F 30%, rgba(232,56,79,.85) 70%, rgba(232,56,79,.2)); box-shadow: 0 0 10px 2px rgba(232,56,79,.9), 0 0 30px 8px rgba(255,255,255,.5); }
/* material and cut: the beam traces the outline (first second), then the piece takes shape */
.lab-job { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
.lab-img-blank { filter: none; opacity: .92; }
.lab-cut { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); pointer-events: none; opacity: 0; }
.lab-cut rect { fill: none; stroke: #fff; stroke-width: 2.2; stroke-dasharray: 400; stroke-dashoffset: 400; filter: drop-shadow(0 0 6px rgba(232,56,79,.9)) drop-shadow(0 0 2px #fff); }
.lab-job.is-cutting .lab-cut { opacity: 1; }
.lab-job.is-cutting .lab-cut rect { animation: trace 1s linear forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.lab-job.is-cutting .lab-img-done { animation: reveal 1s linear 1s forwards; }
.lab-job.is-cutting .lab-scan { animation: scan 1s linear 1s forwards; opacity: 0; animation-fill-mode: forwards; }
.lab-job.is-cutting .lab-scan { animation-name: scan-late; animation-duration: 2s; animation-delay: 0s; }
@keyframes scan-late { 0%, 50% { top: 0; opacity: 0; } 51% { opacity: 1; } 100% { top: calc(100% - 3px); opacity: 1; } }
/* the head follows the outline while cutting: across, down, back, up */
.lab-head.is-on { animation: head-trace 1s linear forwards; }
@keyframes head-trace { 0% { left: calc(50% - 15px + 16px - 110px); top: 60px; } 25% { left: calc(50% - 15px + 16px + 110px); top: 60px; } 50% { left: calc(50% - 15px + 16px + 110px); top: 280px; } 75% { left: calc(50% - 15px + 16px - 110px); top: 280px; } 100% { left: calc(50% - 15px + 16px - 110px); top: 60px; } }
.lab-gantry.is-trace { animation: bar-trace 1s linear forwards; }
@keyframes bar-trace { 0%, 25% { top: 60px; } 50%, 75% { top: 280px; } 100% { top: 60px; } }
.lab-job.is-cutting .lab-slab { box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 40px 6px rgba(255,255,255,.35); }
.lab-job.is-done .lab-slab { box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 30px 50px -16px rgba(10,50,100,.7); }
.lab-sparks i { background: #fff; box-shadow: 0 0 8px 2px rgba(232,56,79,.9); }
.lab-sparks { transform: translateZ(14px); }
.lab-edge { background: #D6E8FA; }
.lab-edge-b { background: linear-gradient(#D6E8FA, #9BC4EC); }
.lab-edge-r { background: linear-gradient(90deg, #D6E8FA, #9BC4EC); }
.lab-made { box-shadow: 0 8px 0 -4px rgba(10,50,100,.3), 0 12px 16px -8px rgba(10,50,100,.4); }
@media (max-width: 640px) { .lab-head::after { height: 150px; } }
