/* study-renderer.js draws the project tint behind the 3D model in WebGL.
 * Keep this foreground transparent, with shading confined to the copy. */
.project-study{--study-colour:#1b1719;--study-accent:#ff9c79;--study-header:78px;position:fixed;inset:var(--study-header) 0 0;z-index:40;display:flex;flex-direction:column;color:#f4f3ef;background:none;opacity:0;transition:opacity .4s ease;isolation:isolate;font-family:Arial,Helvetica,sans-serif}
.project-study[hidden]{display:none!important}.project-study.is-open{opacity:1}
.study-toolbar{height:72px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 5vw;color:var(--study-accent);font:10px/1.5 monospace;letter-spacing:.14em;border-bottom:1px solid #edf7ff1a}
.study-toolbar>div{display:flex;gap:8px}.study-toolbar i{font-style:normal;color:#d4d9dc;padding-left:12px;font-size:8px}
.project-study button,.study-repository{background:linear-gradient(145deg,#e4f1ff0e,#b5d4eb03),#23374529;border:1px solid #dbeaff2b;box-shadow:inset 0 1px 0 #ffffff12;color:#edf4f5;border-radius:10px;min-height:40px;padding:9px 13px;font:9px/1.4 monospace;letter-spacing:.05em;cursor:pointer;transition:background-color .15s,border-color .15s}
.project-study button:hover,.study-repository:hover{border-color:#f3f6ff70;background-color:#c4d5e51c}.project-study button:focus-visible,.study-repository:focus-visible,.study-reading:focus-visible{outline:2px solid var(--study-accent);outline-offset:3px}
.project-study .study-close{min-width:42px;font-size:15px;padding:8px}
.study-layout{min-height:0;flex:1;display:grid;grid-template-columns:minmax(350px,min(40vw,620px)) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:3vw;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;margin:0 5vw}
.study-copy{order:0;position:relative;min-height:0;display:flex;flex-direction:column;padding-top:28px;isolation:isolate}
.study-copy::before{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse,#06101cd6 0%,#06101c87 48%,transparent 77%);filter:blur(24px);clip-path:inset(0);pointer-events:none}
.study-identity{flex:none;padding-bottom:16px}.study-identity>span{font:12px/1.6 monospace;color:#beced4}.study-identity>span:first-child{color:var(--study-accent);font-size:12px}
.project-study .study-identity h1{font:800 clamp(48px,4vw,74px)/.98 Workshop Condensed,'Arial Narrow',Arial,sans-serif;letter-spacing:-.018em;text-shadow:0 2px 12px #0005;margin:8px 0;max-width:none;outline:none}
.study-tabs{display:flex;gap:8px;flex:none;padding:0 0 20px}.study-tabs button{flex:1;min-width:0;min-height:46px;padding:10px 8px;font-size:10px;border-radius:14px;text-align:left;color:#dae4e8;display:flex;align-items:center;justify-content:center;gap:7px}.study-tabs svg{width:17px;height:17px;flex:none}.study-tabs button[aria-current=step]{border-color:#ffb38c80;background:var(--workshop-glass-accent);color:#fff8f1;box-shadow:inset 0 1px 0 #ffffff26,0 3px 18px #ff602822}
.study-reading{position:relative;flex:none;min-height:0;overflow:visible;outline-offset:2px}
.project-study .study-chapter{position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;min-height:0;height:auto;display:block!important;opacity:1!important;visibility:visible!important;transform:none!important;padding:8px 0 18px;margin:0;pointer-events:auto}
.project-study .study-chapter h2{font:600 clamp(30px,2.4vw,42px)/1.04 Workshop Condensed,'Arial Narrow',Arial,sans-serif;letter-spacing:-.01em;max-width:100%;text-shadow:none;color:#f2f3ed;margin:0 0 17px}.project-study .study-chapter h2 em{font-style:normal;color:var(--study-accent);-webkit-text-stroke:0}
.project-study .study-chapter p{font:15px/1.55 Arial,Helvetica,sans-serif;color:#d5e0e3;max-width:100%;margin:0 0 18px}.project-study .study-chapter small{font:10px/1.7 monospace;color:#b0c7d0}
.study-model{order:1;min-width:0;position:relative;touch-action:pan-y;cursor:grab}.study-model:active{cursor:grabbing}.study-project-nav{position:absolute;bottom:14px;right:0;z-index:3;display:flex;gap:8px;cursor:default}.study-project-nav button{min-height:44px;padding:10px 16px;font-size:10px}.study-project-nav button:disabled{opacity:.4;cursor:default}
#studyFallback{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:radial-gradient(ellipse at 50% 35%,#13232d,#070d12 72%);filter:drop-shadow(0 12px 25px #0005)}#studyFallback[hidden]{display:none}
.study-footer{height:76px;flex:none;display:flex;align-items:center;gap:24px;margin:0 5vw;border-top:1px solid #edf7ff1a;font:9px monospace;color:#bccfd5}.study-progress{min-width:180px;width:min(29vw,420px);font-size:9px;letter-spacing:.08em}.study-progress>div{height:2px;margin-top:9px;background:#deedff20}.study-progress i{display:block;width:0;height:100%;background:var(--study-accent)}
#studyScrollHint{margin-left:auto;font-size:9px;letter-spacing:.08em}.study-footer [data-study-nav]{background:#39444c30;border-color:#c8d8e52b;font-size:8px}
.project-study #studySkipIntro,.study-repository{background:var(--workshop-glass-accent);color:#fff7ef;border-color:#ffb38c80;box-shadow:0 0 18px #f75a242b}.project-study #studySkipIntro[hidden]{display:none}
.study-technologies{display:flex;gap:6px;flex-wrap:wrap;margin-top:20px}.study-technologies span{font:10px/1.5 monospace;padding:6px 9px;border:1px solid #d6edff30;border-radius:8px;background:#bddce909;color:#d5e2e5}.study-repository{display:inline-block;margin:20px 0}.project-study .study-truth{position:relative;inset:auto;display:block;padding-top:10px;max-width:100%;width:100%;font:10px/1.5 monospace;color:#b5cbd2}
.project-study :is(.study-tabs button,.study-project-nav button,.obs-mode,.obs-sub,.terra-sensor,.jelly-step,.study-technologies span,.obs-specs span){backdrop-filter:blur(8px) saturate(125%);-webkit-backdrop-filter:blur(8px) saturate(125%)}
/* Reuse the actual original controls, content and data. Retire only their old
 * page furniture and fixed positioning; never clone the interactive DOM. */
.project-study :is(.obs-experience,.terra-experience,.jelly-experience){position:relative;inset:auto;z-index:auto;opacity:1;visibility:visible;pointer-events:auto;width:100%;height:auto;transition:none;background:none;color:inherit}
.project-study :is(.obs-atmosphere,.obs-headline,.obs-footer,.terra-ambient,.terra-topline,.terra-bottomline,.jelly-kicker){display:none}
.project-study :is(.obs-overline,.terra-section-label,.exhibit-section,.fsk-section,.claim-section,.habit-section,.prajaa-section){font:9px/1.6 monospace;color:var(--study-accent);letter-spacing:.08em;margin-bottom:15px}
.project-study :is(.terra-annotation,.obs-hint){font:9px/1.6 monospace;color:var(--study-accent);margin-top:18px}
.project-study :is(.terra-tech-rule,.obs-progress-line,.obs-subdetail,.terra-focus-description){border-color:#d1e8ee30}
.project-study :is(.obs-specs,.obs-maze-stats,.terra-tech-rule){font-size:10px;color:#c7d9dd}.project-study .obs-maze-stats strong{font:600 19px Workshop Condensed,sans-serif;color:#f3f5ec}
.project-study .obs-specs span{font-size:10px;border-radius:20px;background:#f0eff209;padding:8px 10px;border-color:#d5e5f22b}
.project-study :is(.obs-mode,.obs-sub,.terra-sensor){min-height:44px;border-radius:10px;background:#cdeaff09;border-color:#d5efff30;font-size:9px}.project-study :is(.obs-mode,.obs-sub,.terra-sensor).active{border-color:var(--study-accent);background:var(--workshop-glass-accent);border-color:#ffb38c80;color:#fff8f1}
.project-study :is(.terra-sensor-tabs,.obs-subsystems){gap:6px}.project-study .obs-subsystems{width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}.project-study .obs-sub{padding:8px;gap:5px;font-size:9px;transform:none}.project-study .obs-sub b{display:none}.project-study .obs-subdetail{max-width:none;margin-top:10px;padding:8px 0}.project-study :is(.obs-mode,.obs-sub).active>span{color:#fff8f1}.project-study .obs-subdetail p,.project-study .terra-focus-description p{font-size:13px}.project-study .obs-subdetail>span,.project-study .terra-focus-description>span{font:10px/1.6 monospace;color:var(--study-accent)}
.project-study .terra-telemetry{border-radius:14px;background:#bcf1dc0c;border-color:#b1ddc438;padding:16px}.project-study .terra-channel-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.project-study .terra-channel-grid input{min-height:24px;touch-action:pan-x}.project-study .terra-status{flex-wrap:wrap;gap:7px;font-size:8px}.project-study .terra-sparkline{height:52px}
.project-study .jelly-narrative{position:relative;inset:auto;width:100%;max-width:none}.project-study .jelly-narrative>span{color:var(--study-accent);font:9px/1.6 monospace;display:block;margin-bottom:12px}.project-study .jelly-stations{position:relative;inset:auto;width:100%;display:grid;grid-template-columns:1fr;gap:8px;margin-top:20px}.project-study .jelly-step{border-radius:12px;min-height:44px;transform:none;background:#defbff09;color:#d5e7ed;border-color:#dbf4ff29}#projectStudy .jelly-step.current{background:var(--workshop-glass-accent);border-color:#ffb38c80;color:#fff8f1}.project-study .jelly-disclaimer{position:relative;inset:auto;display:block;font:10px/1.7 monospace;max-width:100%;margin-top:22px;color:#b5ced6}
.project-study .obs-map-hud{position:absolute;inset:auto 0 65px auto;width:min(250px,37%);padding:12px;border-radius:16px;border:1px solid #e2ecf432;background:#0c18254d;color:#c9dbe3;backdrop-filter:blur(10px)}.project-study .obs-map-hud[aria-hidden=true]{display:none}.project-study .obs-map-hud svg{max-height:180px;width:100%}.project-study .obs-map-title,.project-study .obs-map-key{font-size:8px;color:#c4d6db}
body.project-study-active :is(.chapter,.scene-id,.sideguide,.corner-tag,.scroll-cue,.footer-axis,.stage-controls,.hall-hover-hint,.hall-station-info,.focus-line,.scene-meta,.workshop-portal-curtain,.project-discovery,.production-transport,.production-arm-actions,.production-skip-curtain){visibility:hidden!important;pointer-events:none!important}
/* The finished study views are reading surfaces, not diagram overlays. */
.project-study #studyModelHud{display:none!important}
.project-study .obs-map-hud{display:none!important}
.production-arm-actions{position:fixed;right:4vw;bottom:65px;z-index:23;display:flex;gap:8px}.production-arm-actions[hidden]{display:none}.production-arm-actions .production-skip{width:auto;padding:12px 18px}.production-arm-actions [data-production-nav]{background:#27333d66;border:1px solid #d2edff29;color:#e5eff1;border-radius:12px;font:9px monospace;padding:10px 14px}
@media(max-width:1039px){
 .study-toolbar{height:52px;margin:0 20px;font-size:8px;letter-spacing:.08em}.study-toolbar button{min-height:44px;padding:8px;font-size:8px}.study-toolbar>div{gap:5px}.study-toolbar .study-close{min-width:38px}.study-toolbar>span{max-width:110px}
 .study-layout{display:flex;flex-direction:column;gap:0;margin:0 20px;min-height:0}.study-model{order:0;height:32dvh;min-height:210px;flex:none}.study-project-nav{bottom:6px;left:0;right:0;justify-content:space-between}.study-project-nav button{font-size:8px;padding:8px 10px;min-height:44px}
 .project-study .terra-channel-grid{grid-template-columns:1fr}
 .study-copy{order:1;padding-top:6px;flex:none;min-height:0}.study-identity{padding-bottom:8px;display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:12px}.study-identity>span:first-child{font-size:9px;grid-column:span 2}.project-study .study-identity h1{font-size:30px;margin:4px 0;grid-column:1;max-width:none}.study-identity>span:last-child{font-size:8px;max-width:110px;text-align:right}.study-tabs{padding-bottom:8px;gap:5px}.study-tabs button{font-size:8px;min-height:44px;padding:7px 5px;gap:5px}.study-tabs svg{width:14px;height:14px}.study-reading{padding-right:0}.study-copy::before{background:radial-gradient(ellipse,#06101ce8 0%,#06101c99 48%,transparent 77%)}
 .project-study .study-chapter h2{font-size:28px;margin-bottom:14px}.project-study .study-chapter p{font-size:15px;line-height:1.6}.study-footer{height:58px;margin:0 20px;gap:10px}.study-progress{min-width:95px;width:auto;flex:1;font-size:8px}.study-footer [data-study-nav]{max-width:120px;min-height:44px;padding:8px;font-size:8px}#studyScrollHint{display:none}#studySkipIntro{font-size:8px;padding:8px}
 .project-study .obs-map-hud{width:115px;right:0;bottom:57px;padding:6px;backdrop-filter:none}.project-study .obs-map-hud svg{max-height:90px}.project-study .obs-map-key,.project-study .obs-map-title b{display:none}.project-study .obs-map-title{font-size:6px}.production-arm-actions{bottom:20px;right:20px}
}
@media(max-width:360px){.study-toolbar,.study-footer{margin-left:14px;margin-right:14px}.study-layout{margin:0 14px}.study-model{height:29dvh;min-height:200px}.study-toolbar>div>button:first-child{font-size:7px}.study-tabs button{font-size:7px}.study-tabs svg{display:none}}
@media(prefers-reduced-motion:reduce){.project-study{transition:none}.project-study button{transition:none}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){.project-study{background:none}.project-study .study-copy{background:#0a131e}.project-study .study-toolbar,.project-study .study-footer{background:#0a131e}.project-study .study-copy::before{display:none}.project-study button{background:#1b2a37;border-color:#8ca3b2}.study-reading{mask-image:none}}
@media(forced-colors:active){.project-study{background:Canvas;color:CanvasText}.project-study button{background:ButtonFace;color:ButtonText;border-color:ButtonText}}

body.project-study-active :is(#fallbackMachine,.no-webgl),body.production-active .no-webgl{display:none!important}

@media(max-width:760px){.project-study{--study-header:65px}}

.project-study .study-chapter[hidden]{display:none!important}
@media(min-width:1040px) and (max-height:850px){.study-copy{padding-top:16px}.project-study .study-identity h1{font-size:48px}.study-identity{padding-bottom:10px}.study-tabs{padding-bottom:12px}.project-study .study-chapter h2{font-size:30px;margin-bottom:10px}.project-study .study-chapter p{font-size:14px;line-height:1.5;margin-bottom:12px}.project-study :is(.obs-overline,.terra-section-label){margin-bottom:10px}.project-study .study-truth{font-size:9px;line-height:1.35;padding-top:4px}.project-study .obs-subdetail p{font-size:12px;line-height:1.45}.project-study .obs-subdetail{margin-top:7px;padding:6px 0}}

#projectStudy .jelly-step.current span,#projectStudy .jelly-step.current b{color:#fff8f1}
@media(min-width:1040px){.project-study .terra-sensor-tabs{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.project-study .terra-sensor{gap:5px;padding:8px;font-size:9px;transform:none}.project-study .terra-sensor b{display:none}}

.study-layout::-webkit-scrollbar,.study-reading::-webkit-scrollbar{display:none}
.project-study :is(.obs-hint,.obs-maze-instruction){display:none}
/* Keep the entire chapter visible at normal laptop sizes. The original
   single-column demo monitor is arranged as three readable input channels. */
#projectStudy .study-truth{font-size:10px;line-height:1.5}
@media(min-width:1040px){
 .project-study .terra-telemetry{width:100%;padding:12px}
 .project-study .terra-telemetry-head{padding-bottom:6px}
 .project-study .terra-channel-grid{padding-top:8px;gap:12px}
 .project-study .terra-channel-grid label{gap:5px;letter-spacing:0}
 .project-study .terra-sparkline{height:36px;margin:4px 0}
 .project-study .terra-status{padding-top:6px;gap:6px}
 .project-study .study-chapter{padding-bottom:8px}
}
@media(min-width:1040px) and (max-height:850px){
 #projectStudy .study-truth{font-size:9px;line-height:1.35}
 .project-study .terra-telemetry{padding:10px}
 .project-study .terra-sparkline{height:30px}
}
@media(min-width:1040px){
 .project-study .jelly-stations{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .project-study .jelly-step{padding:10px 8px;gap:7px;font-size:9px}
 .project-study .jelly-step b{display:none}
}

/* Width chooses the desktop layout, including portrait desktop monitors.
   Auto margins centre the complete reading group whenever it fits; when it
   grows taller than the viewport they resolve to zero for accessible reading. */
@media(min-width:1040px){
 .study-copy{justify-content:flex-start;padding-top:20px;padding-bottom:20px}
 .study-identity{margin-top:auto}
 .study-reading{margin-bottom:auto}
 .project-study .study-chapter>p,.project-study .jelly-narrative p{font-size:clamp(15px,.85vw,18px)}
}
@media(min-width:1040px) and (max-height:850px){
 .study-copy{padding-top:16px;padding-bottom:0}
 .project-study .study-chapter>p,.project-study .jelly-narrative p{font-size:14px}
}
#studyFallback{opacity:var(--study-model-opacity,1)}
.project-study .obs-map-hud[aria-hidden=false]{visibility:visible}

/* Continue the shared world journey without changing project chapters. */
.study-footer .study-skills-link{pointer-events:auto;font:9px var(--mono,monospace);padding:7px 11px;min-height:32px;white-space:nowrap}.study-footer:has(.study-skills-link){gap:14px}@media(max-width:600px){.study-footer .study-skills-link{font-size:8px;padding:5px 8px}.study-footer #studyScrollHint{display:none}}
