/* A framed, pinned film as in the original Labs chapter sequence. */
.eng-track { --pin-top: 71px; --rail-size: 77px; --stage-pad: clamp(20px, 4vw, 64px); position: relative; background: #10100f; }
.eng-stick { padding: clamp(5px, .8vw, 14px); }
.eng-frame { position: relative; isolation: isolate; border-radius: clamp(12px,1.4vw,23px); background:#10151a; overflow: hidden; }
.eng-scene { position: relative; isolation: isolate; color:#f8f5ef; margin:0; min-height: min(780px, 85vh); scroll-margin-top: var(--pin-top); }
.eng-footage,.eng-footage img,.eng-footage video,.eng-shade { position:absolute; inset:0; width:100%; height:100%; }
.eng-footage { overflow:hidden; z-index:-3; background:#171c20; }
.eng-footage :is(img,video) { display:block; object-fit:cover; object-position:var(--eng-focus,50%) center; }
.eng-footage video { opacity:0; transition: opacity .35s; }
.eng-footage video[data-ready] { opacity:1; }
.eng-shade { pointer-events:none; z-index:-1; background:linear-gradient(180deg,rgba(5,8,12,.45),transparent 26%,transparent 40%,rgba(8,13,18,.4) 66%,#0a0e12 100%),linear-gradient(75deg,rgba(3,6,9,.48),transparent 62%); }
.eng-target { pointer-events:none; display:none; position:absolute; color:#ffe2c2; }
.eng-target[data-visible] { display:block; }
.eng-target i { position:absolute; width:11px; height:11px; border:solid currentColor; border-width:0; filter:drop-shadow(0 1px 2px #333); }
.eng-target i:nth-child(1){top:0;left:0;border-width:1px 0 0 1px}
.eng-target i:nth-child(2){top:0;right:0;border-width:1px 1px 0 0}
.eng-target i:nth-child(3){bottom:0;right:0;border-width:0 1px 1px 0}
.eng-target i:nth-child(4){bottom:0;left:0;border-width:0 0 1px 1px}
.eng-target span { position:absolute; top:2px; left:calc(100% + 6px); padding:1px 5px; border:1px solid #d3c5b550; background:#141820b5; font:500 .68rem/1.6 monospace; white-space:nowrap; color:white; border-radius:3px; }
.eng-top { position:absolute; inset:clamp(17px,2.5vw,38px) var(--stage-pad) auto; display:flex; align-items:center; justify-content:space-between; color:#fbf6eb; font-size:.85rem; font-weight:550; text-shadow:0 1px 5px #121212; }
.eng-top span:first-child { display:flex; align-items:center; gap:.7em; }
.eng-top i { width:1.25rem; height:1px; background:#f0c9a3; }
.eng-top span[dir] { font: .8rem/1.5 monospace; letter-spacing:.06em; }
.eng-copy { position:absolute; inset-inline-start:var(--stage-pad); inset-block-end:calc(var(--rail-size) + clamp(22px,3.4vw,58px)); width:min(59%,740px); }
.eng-copy :is(h1,h2) { font:inherit; font-weight:450; font-size:clamp(3.2rem,5.7vw,6.1rem); line-height:.99; letter-spacing:-.055em; color:inherit; max-width:16ch; margin:0 0 .85rem; text-wrap:balance; }
.eng-copy p { margin:0 0 10px; max-width:44ch; color:#f0ede7; font-size:clamp(1rem,1.24vw,1.23rem); line-height:1.45; text-shadow:0 1px 4px #080b10; }
.eng-case,.eng-skip { color:#fff1de; text-decoration:underline; text-underline-offset:.32em; text-decoration-color:#e7c29d99; font-size:.93rem; }
.eng-case { display:inline-flex; align-items:center; min-height:40px; }
.eng-receipt { position:absolute; inset-inline-end:var(--stage-pad); bottom:calc(var(--rail-size) + clamp(22px,3.4vw,58px)); min-width:min(25%,265px); background:#101419bd; color:#fff4e5; padding:15px 18px; border:1px solid #e4ddd335; border-radius:9px; }
.eng-receipt span,.eng-receipt strong { display:flex; align-items:center; gap:12px; }
.eng-receipt span { justify-content:space-between; font-size:.8rem; color:#d7d3cc; }
.eng-receipt b { font:500 .8rem/1 monospace; color:#fce2c8; }
.eng-receipt strong { font-weight:500; margin-top:.45rem; }
.eng-receipt i { width:7px;height:7px; transform:rotate(45deg); background:#e6a571; }
.eng-rail { display:none; position:absolute; inset-inline:var(--stage-pad); bottom:14px; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; z-index:5; }
.eng-rail a { display:flex; position:relative; flex-wrap:wrap; align-content:center; align-items:baseline; column-gap:7px; padding:10px 0 3px; min-height:42px; font-size:.82rem; color:#dfdedc; text-decoration:none; }
.eng-rail i { position:absolute; top:1px; inset-inline:0; height:2px; background:#ffffff48; }
.eng-rail a[aria-current] { color:white; }
.eng-rail a[aria-current] i { background:#efb483; }
.eng-rail b { font: 500 .76rem/1.3 monospace; }
.eng-skip { position:absolute; inset-inline-end:var(--stage-pad); top:3.9rem; z-index:5; color:#fff; padding:4px 8px; font-size:.8rem; background:#0b101796; border-radius:4px; }
.eng-track[data-enhanced] .eng-frame { height:100%; }
.eng-track[data-enhanced] .eng-scene { position:absolute; inset:0; min-height:0; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .45s,visibility 0s linear .45s; }
.eng-track[data-enhanced] .eng-scene[data-active] { visibility:visible; opacity:1; pointer-events:auto; transition-delay:0s; z-index:1; }
.eng-track[data-enhanced] .eng-rail { display:grid; }
.eng-track[data-enhanced] .eng-stick { position:sticky; top:var(--pin-top); height:calc(100vh - var(--pin-top) - var(--entry-gap,0px)); height:calc(100svh - var(--pin-top) - var(--entry-gap,0px)); min-height:420px; }
.eng-track[data-enhanced][data-pinned] { height:calc(100vh + 400vh); height:calc(100svh + 400svh); }
[dir=rtl] .eng-copy :is(h1,h2) { letter-spacing:0; line-height:1.22; }
[dir=rtl] .eng-copy p { line-height:1.65; }
@media(max-width:760px){
 .eng-track { --rail-size:52px; --stage-pad:20px; }
 .eng-stick { padding:5px; }
 .eng-receipt { display:none; }
 .eng-copy { width:auto; inset-inline:var(--stage-pad); bottom:calc(var(--rail-size) + 10px); }
 .eng-copy :is(h1,h2) { font-size:clamp(2.6rem,9.9vw,4rem); max-width:15ch; margin-bottom:8px; }
 .eng-copy p { font-size:1rem; max-width:35ch; line-height:1.4; }
 .eng-rail { bottom:3px; gap:2px; inset-inline:clamp(6px,2vw,16px); }
 .eng-rail a { font-size:0; min-height:44px; justify-content:center; }
 .eng-rail a span { display:none; }
 .eng-rail i { inset-inline:2px; }
 .eng-shade { background:linear-gradient(180deg,#060a1255,transparent 23%,transparent 37%,#09121ab5 65%,#090c10 100%); }
 .eng-skip { top:3rem; }
}
@media(max-height:580px) and (min-width:600px){
 .eng-track { --rail-size:40px; }
 .eng-copy :is(h1,h2){ font-size:2.5rem; }
 .eng-rail { bottom:1px; }
}
@media(prefers-reduced-motion:reduce){.eng-track *, .eng-track *::after { transition:none!important; } }
