/* The removable cover travels toward the far side of the bench. The board,
   coupling and cable remain on the original camera plane. */
#scene .solid-lid {
  /* Using the rear edge as the local pitch origin keeps every point of the
     underside above the mating plane, even before the lid clears the tray. */
  transform-origin: 50% 0;
  transform:
    translate3d(0, calc(-1 * (var(--bench-slide, 0) * var(--bench-width) * .025 + var(--bench-exit, 0) * 117svh)),
      calc(1px + var(--bench-rise, 0) * var(--bench-width) * .068))
    rotateX(calc(var(--bench-tip, 0) * 77deg));
}
#scene .solid-lid .lid-back {
  border: 0; box-shadow: none; overflow: hidden;
  background: #9ca6ac url('bench-undercut.webp') no-repeat 0 0 / 100% 500%;
  background-position-y: var(--bench-map-position,0%);
}
#scene .solid-lid .lid-back::before {
  content: ''; position: absolute; inset: 0; border: 0; border-radius: inherit; box-shadow: none;
  background: url('bench-undercut.webp') no-repeat 0 var(--bench-map-next,25%) / 100% 500%;
  opacity: var(--bench-map-mix,0);
}
#scene .solid-lid .lid-back::after, #scene .lid-back .lid-underside-bore { display: none; }
/* The approved 01AC engraving has the same viewBox as the physical front face. */
.lid-front > .lid-ink {
  position: absolute;
  /* Absolute lengths are relative to the inner edge of the 1px metal rim. */
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
  backface-visibility: hidden;
}
.lid-front > .lid-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#scene .solid-lid .bolt-head {
  border: 0; box-shadow: none;
  background: url('bench-fastener.webp') no-repeat var(--bench-fastener-x,0%) var(--bench-fastener-y,0%) / 1200% 300%;
  transform: translateZ(calc(.5px + var(--screw-rise)));
}
#scene .solid-lid .bolt-head::after { display: none; }
#scene .lid-projected-shadow {
  transform-origin: 50% 0;
  transform: translate3d(1%,calc(var(--bench-slide,0) * -6% - var(--bench-exit,0) * 200%),.75px) scaleY(calc(1 - var(--bench-tip,0) * .78));
  opacity: calc(.35 - var(--bench-exit,0) * .65 - var(--bench-rise,0) * .08);
}
@media (prefers-reduced-motion:reduce) {
  #scene .solid-lid { transform: translateZ(1px); }
}
