/* LID-632 AI operating stack */
.operating-stack-layout{display:grid;grid-template-columns:minmax(250px,.7fr) minmax(0,1.3fr);gap:16px;align-items:stretch;perspective:1400px}
.operating-stack-controls{display:grid;gap:10px;align-content:start}
.operating-stack-controls button{appearance:none;width:100%;text-align:left;border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;padding:20px;display:grid;grid-template-columns:38px 1fr;column-gap:12px;row-gap:4px;cursor:pointer;color:var(--ink);transition:transform .24s var(--ease),border-color .24s ease,background .24s ease,box-shadow .24s ease}
.operating-stack-controls button>span{grid-row:1/3;font:500 10px/1.2 var(--mono);letter-spacing:.08em;color:var(--muted);padding-top:4px}
.operating-stack-controls button strong{font-size:17px;letter-spacing:-.02em}
.operating-stack-controls button small{font-size:12px;line-height:1.45;color:var(--muted)}
.operating-stack-controls button:hover,.operating-stack-controls button:focus-visible{transform:translateX(4px);border-color:#b7b7b7;box-shadow:0 16px 40px rgba(0,0,0,.065)}
.operating-stack-controls button[aria-selected="true"]{background:#080808;color:#fff;border-color:#080808}
.operating-stack-controls button[aria-selected="true"]>span,.operating-stack-controls button[aria-selected="true"] small{color:#aaa}
.operating-stack-controls button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.operating-stack-stage{--stack-rx:0deg;--stack-ry:0deg;--stack-scroll-y:0px;--stack-scroll-rx:0deg;--stack-scroll-scale:1;--stack-light-x:50%;--stack-light-y:34%;position:relative;overflow:hidden;isolation:isolate;min-height:510px;border:1px solid #252525;border-radius:var(--r);background:#080808;color:#fff;transform-style:preserve-3d;transform:translateY(var(--stack-scroll-y)) rotateX(calc(var(--stack-rx) + var(--stack-scroll-rx))) rotateY(var(--stack-ry)) scale(var(--stack-scroll-scale));box-shadow:0 34px 90px rgba(0,0,0,.14);transition:transform .34s var(--ease),box-shadow .34s var(--ease)}
.operating-stack-stage:before{content:"";position:absolute;inset:-25%;z-index:0;pointer-events:none;background:radial-gradient(circle at var(--stack-light-x) var(--stack-light-y),rgba(255,255,255,.14),rgba(255,255,255,.035) 25%,transparent 55%);transform:translateZ(-40px)}
.operating-stack-stage.is-pointer-active{box-shadow:0 44px 110px rgba(0,0,0,.22)}
.operating-stack-stage[data-layer="ai"]{--stack-light-x:68%;--stack-light-y:41%}
.operating-stack-stage[data-layer="product"]{--stack-light-x:36%;--stack-light-y:59%}
.operating-stack-stage[data-layer="delivery"]{--stack-light-x:62%;--stack-light-y:72%}
.operating-stack-scene{position:absolute;inset:0;z-index:1;perspective:1200px;transform-style:preserve-3d;pointer-events:none}
.operating-stack-grid{position:absolute;inset:-18%;background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);background-size:38px 38px;transform:rotateX(70deg) translate3d(0,40%,-120px) scale(1.2);transform-origin:center bottom;mask-image:linear-gradient(to top,#000,transparent 70%)}
.operating-plane{position:absolute;left:11%;right:11%;height:82px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.035));backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:space-between;padding:0 20px;transform-style:preserve-3d;transition:transform .42s var(--ease),opacity .3s ease,border-color .3s ease,background .3s ease}
.operating-plane span{font:500 9px/1.2 var(--mono);letter-spacing:.12em;color:#aaa}
.operating-plane strong{font-size:16px;letter-spacing:-.02em}
.operating-plane[data-stack-plane="direction"]{top:16%;transform:translate3d(0,0,88px)}
.operating-plane[data-stack-plane="ai"]{top:31%;transform:translate3d(18px,7px,54px)}
.operating-plane[data-stack-plane="product"]{top:46%;transform:translate3d(-10px,14px,20px)}
.operating-plane[data-stack-plane="delivery"]{top:61%;transform:translate3d(12px,21px,-14px)}
.operating-plane:not(.is-active){opacity:.43}
.operating-plane.is-active{opacity:1;border-color:rgba(255,255,255,.48);background:linear-gradient(135deg,rgba(255,255,255,.20),rgba(255,255,255,.07));transform:translate3d(0,-4px,118px) scale(1.02)}
.operating-stack-stage[data-layer="ai"] .operating-plane[data-stack-plane="ai"],.operating-stack-stage[data-layer="product"] .operating-plane[data-stack-plane="product"],.operating-stack-stage[data-layer="delivery"] .operating-plane[data-stack-plane="delivery"]{transform:translate3d(0,-4px,118px) scale(1.02)}
.operating-stack-detail{position:absolute;z-index:3;left:28px;right:28px;bottom:26px;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(230px,.75fr);gap:22px;align-items:end;padding:24px;border:1px solid rgba(255,255,255,.13);border-radius:var(--r-sm);background:rgba(8,8,8,.82);backdrop-filter:blur(14px);transform:translateZ(150px)}
.operating-stack-detail .eyebrow{color:#8f8f8f;margin:0 0 8px}
.operating-stack-detail h3{font-size:clamp(1.45rem,2.8vw,2.35rem);line-height:1;letter-spacing:-.045em;margin:0 0 10px}
.operating-stack-detail p{font-size:13px;line-height:1.55;color:#b5b5b5;max-width:630px;margin:0}
.operating-stack-meta{display:grid;gap:12px}
.operating-stack-meta ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}
.operating-stack-meta li{font-size:11px;line-height:1.35;color:#d2d2d2;display:flex;gap:8px}
.operating-stack-meta li:before{content:"↳";color:#777}
.operating-stack-meta .text-link{color:#fff;width:max-content}
@media(max-width:920px){.operating-stack-layout{grid-template-columns:1fr}.operating-stack-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.operating-stack-stage{min-height:500px}}
@media(max-width:620px){.operating-stack-controls{grid-template-columns:1fr}.operating-stack-controls button:hover,.operating-stack-controls button:focus-visible{transform:none}.operating-stack-stage{min-height:560px}.operating-plane{left:6%;right:6%;height:70px;padding:0 15px}.operating-stack-detail{left:16px;right:16px;bottom:16px;grid-template-columns:1fr;padding:20px}.operating-stack-meta{gap:10px}}
@media(prefers-reduced-motion:reduce){.operating-stack-controls button,.operating-stack-stage,.operating-plane{transition:none}.operating-stack-controls button:hover,.operating-stack-controls button:focus-visible,.operating-stack-stage,.operating-plane,.operating-plane.is-active{transform:none!important}.operating-stack-grid{transform:none!important;opacity:.22}}

/* The diagram is a control surface. Keep every layer above the detail panel. */
.operating-stack-stage{min-height:0;padding:22px;display:flex;flex-direction:column;gap:18px}
.operating-stack-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;z-index:4;min-height:36px}.operating-stack-toolbar p{margin:0;font:10px var(--mono);letter-spacing:.08em;color:#b8b8b8}.operating-stack-toolbar button{border:1px solid #626262;border-radius:99px;background:#181818;color:#eee;padding:10px 14px;font-size:11px;cursor:pointer}.operating-stack-toolbar button[aria-pressed=true]{background:#f1f1f1;color:#111}.operating-stack-toolbar button:disabled{opacity:.5;cursor:default}
.operating-stack-scene{position:relative;inset:auto;min-height:370px;pointer-events:auto;flex:none}
.operating-plane{appearance:none;color:#fff;text-align:left;cursor:pointer;left:6%;right:6%;width:88%;height:68px;font-family:inherit;padding:0 18px;gap:12px;touch-action:pan-y}
.operating-plane[data-stack-plane="direction"]{top:12px}.operating-plane[data-stack-plane="ai"]{top:100px}.operating-plane[data-stack-plane="product"]{top:188px}.operating-plane[data-stack-plane="delivery"]{top:276px}
.operating-plane strong{margin-left:auto;font-size:clamp(11px,1.15vw,15px)}.operating-plane span:first-child{min-width:76px}.operating-plane .plane-action{color:#ddd;font-size:17px;transition:translate .25s}.operating-plane:hover .plane-action{translate:2px -2px}.operating-plane:not(.is-active){opacity:.7}.operating-plane:hover{opacity:1;border-color:#ccc;background:#ffffff20}.operating-plane:active{filter:brightness(1.3)}
.operating-plane:focus-visible,.operating-stack-toolbar button:focus-visible{outline:2px solid #fff;outline-offset:4px}
.operating-stack-detail{position:relative;inset:auto;transform:none;grid-template-columns:1fr;min-height:245px;align-content:start;gap:18px;flex:1}.operating-stack-meta{display:flex;align-items:end;justify-content:space-between;gap:18px}.operating-stack-detail h3{font-size:clamp(1.45rem,2.3vw,2rem)}.operating-stack-detail .eyebrow{color:#b0b0b0}
@media(max-width:620px){.operating-stack-stage{padding:16px;gap:14px}.operating-stack-toolbar{align-items:start}.operating-stack-toolbar p{max-width:110px;line-height:1.6}.operating-stack-scene{min-height:350px}.operating-plane{left:2%;right:2%;width:96%;padding:12px;height:64px;gap:8px}.operating-plane span:first-child{min-width:56px;font-size:7px;letter-spacing:.03em}.operating-plane strong{font-size:10px}.operating-plane .plane-action{font-size:13px}.operating-stack-detail{padding:18px;min-height:300px}.operating-stack-meta{display:grid}.operating-plane[data-stack-plane]{transform:none}.operating-plane.is-active{transform:translateY(-3px)!important}}
@media(prefers-reduced-motion:reduce){.operating-plane.is-active{transform:none!important}.operating-plane .plane-action{transition:none}.operating-plane:hover .plane-action{translate:none}}
@media(max-width:620px){.operating-plane{display:grid;grid-template-columns:1fr 20px;align-content:center;gap:5px 8px}.operating-plane span:first-child{grid-column:1;font-size:9px}.operating-plane strong{grid-column:1;font-size:12px;margin:0}.operating-plane .plane-action{grid-column:2;grid-row:1/3;align-self:center;font-size:17px}}
/* Stable hit geometry: only the light/grid move under the pointer. Negative Z
   placed the back plane behind its parent's hit surface in Chromium. */
.operating-stack-stage{transform:none}
.operating-stack-grid{pointer-events:none;translate:0 var(--stack-scroll-y)}
.operating-plane[data-stack-plane="delivery"]{transform:translate3d(12px,21px,8px)}
@media(max-width:620px){.operating-plane[data-stack-plane="delivery"]{transform:none}}
@media(prefers-reduced-motion:reduce){.operating-stack-grid{translate:none}}
