:root{--product-accent:#b4d7c3;--product-bg:#0c1618;--product-paper:#f1eee5;--product-line:#405455}
html[data-product=civgentic]{--product-accent:#edbd76;--product-bg:#182226;--product-line:#665e4d;--os-accent:#edbd76;--os-text:#f3e7d3;--os-bg:#182226;--accent:#edbd76}
html[data-product=rare-earth]{--product-accent:#85b8dd;--product-bg:#101c2a;--product-line:#3b566d;--os-accent:#85b8dd;--os-text:#edf1f5;--os-bg:#101c2a;--accent:#85b8dd}
html[data-theme=light][data-product=civgentic]{--product-bg:#f4eddd;--product-accent:#8d5825;--product-line:#b5a58a;--os-bg:#f4eddd;--os-text:#2c3031;--os-accent:#8d5825}
html[data-theme=light][data-product=rare-earth]{--product-bg:#eaf0f6;--product-accent:#345e7c;--product-line:#9db0c1;--os-bg:#eaf0f6;--os-text:#1c2e40;--os-accent:#345e7c}
body.product-app{background:var(--product-bg)!important;overflow:hidden;color:var(--os-text,var(--product-paper));padding:0!important;margin:0!important}
.product-app .os{max-width:none!important;margin:0!important;padding:52px 14px 38px!important;height:var(--enclosure-visible-height,100dvh);display:flex;flex-direction:column;box-sizing:border-box;min-height:0}
.product-app .mast,.product-app .edition-note,.product-app .outside,.product-app .clocks,.product-app .identity,.product-app .observer,.product-app .play-settings,.product-app .pilot-mark,.product-app .chapter-ticker,.product-app #ticker{display:none!important}
.product-app .console{flex:1;min-height:0;display:flex!important;flex-direction:column;overflow:hidden;border-color:var(--product-line);background:var(--product-bg)}
.product-app .transport{flex:none;min-height:56px;padding:8px 12px;gap:8px;flex-wrap:nowrap;border-color:var(--product-line);background:var(--product-bg)}
.product-app .transport .library-select{display:flex;gap:8px;min-width:0;flex:1}.product-app .transport select{min-width:80px;max-width:310px;width:auto;flex:1}.product-app .transport input[type=range]{flex:1;min-width:70px;max-width:28vw;accent-color:var(--product-accent)}
.product-app .transport #position-text{white-space:nowrap;font-size:13px}.product-app .transport button{white-space:nowrap}
.product-app .narrative-window{flex:none;min-height:88px;max-height:27%;padding:14px 28px!important;overflow:auto;border-bottom:1px solid var(--product-line);background:var(--product-bg)}
.product-app .narrative-label{display:none}.product-app:not(.book-host) #current-passage{font:clamp(23px,2.2vw,37px)/1.35 Georgia,serif!important;margin:0;max-width:80ch}
.product-app .operating-system{flex:1;display:flex;min-height:0}.product-app .work-area{display:flex!important;width:100%;height:100%;min-height:0}.product-app .instrument{flex:1;min-width:0;min-height:0;display:flex!important;flex-direction:column;padding:0 16px!important;background:transparent}
.product-app .instrument-title{flex:none;height:32px;min-height:32px;padding:5px 0!important}.product-app .instrument-title h2{font-size:12px;letter-spacing:.06em;font-weight:400}.product-app .instrument-title #close-visual{font-size:11px;padding:3px 8px}
.product-app .visual-panes{flex:1;min-height:0;display:flex!important;align-items:stretch}.product-app .geometry-space{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}.product-app #system-grid{display:block;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:contain;aspect-ratio:auto!important}
.product-app .device-corner,.product-app .instrument-foot{display:none!important}.product-app #equation-space{width:40%;max-height:100%;min-height:0}.product-app #equation-space[hidden]{display:none!important}.product-app #equation-grid{height:calc(100% - 30px);object-fit:contain}
.product-app .bezel{flex:none;padding:6px 12px!important;min-height:48px;border-color:var(--product-line);background:var(--product-bg)}.product-app .bezel>span{display:none!important}.product-app .bezel>div{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.product-app .bezel button,.product-app .bezel select{padding:7px 10px;min-height:35px}.product-app .cartridge-picker{margin-right:auto;display:flex;gap:9px;align-items:center;font-size:12px}.product-app .cartridge-picker select{max-width:220px}
.product-app .mobile-reader-bar{display:none!important}.product-app .research-launch{background:color-mix(in srgb,var(--product-bg) 70%,transparent)}.product-app .research-begin{border-color:var(--product-accent);color:var(--product-accent)}
.product-app .research-launch .research-begin{background:var(--product-bg)!important;color:var(--product-accent)!important;border:2px solid var(--product-accent);min-width:220px;min-height:95px;font:48px Georgia,serif}
.product-app #product-settings{width:min(640px,94vw);max-height:85dvh;padding:24px;background:var(--product-bg);color:inherit;border:1px solid var(--product-line)}#product-settings header{display:flex;justify-content:space-between;align-items:center;gap:20px}#product-settings h2{font:32px Georgia,serif;margin:0}.product-settings-content{display:flex;flex-wrap:wrap;gap:14px;padding:20px 0}.product-settings-content button,.product-settings-content label,.product-settings-content a{display:block;padding:10px;border:1px solid var(--product-line)}#product-settings output{display:block;line-height:1.5}
#product-reading-room{padding:0;width:96vw;height:90dvh;max-width:1400px;max-height:94dvh;background:var(--product-bg);color:inherit;border:1px solid var(--product-line)}#product-reading-room header{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;height:50px;box-sizing:border-box}#product-reading-room iframe{border:0;width:100%;height:calc(100% - 50px)}
.product-app.research-immersive-active .console,.product-app .console:fullscreen{padding:0!important}.product-app.research-immersive-active .transport,.product-app.research-immersive-active .bezel{display:none!important}.product-app.research-immersive-active .narrative-window{max-height:35%;background:transparent}
.product-app .console.screen-takeover{top:var(--enclosure-top,36px)!important;bottom:var(--enclosure-bottom,32px)!important;height:auto!important}.product-app.research-immersive-active .console.screen-takeover{inset:0!important;height:100dvh!important}
.product-app #product-chapter-choice{background:var(--product-bg);color:inherit;width:min(760px,94vw);max-height:85dvh;padding:24px;border:1px solid var(--product-line)}#product-chapter-choice select{width:100%;background:inherit;color:inherit;line-height:1.8;font-size:16px;padding:10px;margin:15px 0}
.product-app .product-intro-stage{position:absolute;inset:62px 0 50px;display:flex;flex-direction:column;z-index:30;background:var(--product-bg);padding:20px;box-sizing:border-box}.product-intro-stage p{font:clamp(23px,2.3vw,37px)/1.4 Georgia,serif;max-height:30%;overflow:auto;margin:0 0 12px}.product-intro-stage canvas{width:100%;flex:1;min-height:0;object-fit:contain}.product-intro-stage .product-intro-actions{display:flex;gap:12px;align-items:center}.product-intro-stage button{padding:12px 20px}
html[data-product=zero] .product-intro-stage{--product-bg:#000}.product-app .console{position:relative}
html[data-product=zero] main{height:var(--enclosure-visible-height,100dvh);padding:52px 12px 38px!important;box-sizing:border-box;display:flex;flex-direction:column;min-height:0;max-width:none;margin:0!important}
html[data-product=zero] .workspace{display:flex;flex:1;min-height:0}html[data-product=zero] .context{display:none}html[data-product=zero] .drawing{flex:1;min-height:0;display:flex}html[data-product=zero] #grid{width:100%;height:100%;object-fit:contain;min-height:0}html[data-product=zero] .narrative{max-height:25%;overflow:auto;padding:12px 24px;flex:none}html[data-product=zero] .narrative p{margin:0}html[data-product=zero] .instrument-footer{display:none}html[data-product=zero] .console>.register{display:none}html[data-product=zero] #zero-controls{flex:none}html[data-product=zero] .hint{display:none}
.product-app.product-orienting .console>:not(.product-intro-stage):not(dialog){visibility:hidden}.product-app.product-orienting .product-intro-stage{inset:0;visibility:visible}.product-app .product-intro-stage>.transport{margin:-20px -20px 16px;flex:none}.product-app .product-intro-stage>p{padding:5px 12px}
.product-external{height:100%;position:relative}.product-external #product-application{width:100%;flex:1;min-height:0;border:0}.product-external .environment-actions{display:flex;align-items:center;gap:12px;padding:6px;justify-content:flex-end}
.product-app.book-host{background:var(--bg,#0b1118)!important}.product-app .product-settings-content .product-story-record{display:block!important;width:100%;max-width:none;border:0}.product-app .product-settings-content .product-story-record .device{display:none}.product-app.book-host .transport #chapter-select{flex:1;max-width:400px;min-width:90px}
.product-focus{outline:2px solid var(--product-accent)!important;outline-offset:4px;box-shadow:0 0 20px color-mix(in srgb,var(--product-accent) 35%,transparent)}
.product-app.book-host{--product-bg:var(--book-bg);--product-accent:var(--book-pink);--product-line:var(--book-line);background:var(--book-bg)!important;color:var(--book-ink)}
.product-app.book-host #current-passage{font:clamp(24px,2.3vw,34px)/1.42 Georgia,'Times New Roman',serif!important;color:var(--book-ink)}
.product-app.book-host .is-prologue #current-passage{font-size:clamp(34px,5vw,58px)!important}
.product-app.book-host .story-launch{inset:60px 0 48px!important;height:auto!important;display:grid!important;place-items:center!important;background:#0006}
@media(max-width:700px){.product-app.book-host #current-passage{font-size:23px!important}.product-app.book-host .console:is(:fullscreen,.screen-takeover) #current-passage{font-size:21px!important}.product-app.book-host .is-prologue #current-passage{font-size:clamp(34px,5vw,58px)!important}}
body.product-app .console:not(.research-immersive)>.transport{display:flex!important;flex:0 0 auto!important}
body.product-app .console:not(.research-immersive)>.bezel{display:flex!important;flex:0 0 auto!important}
body.product-app .console:not(.research-immersive)>.narrative-window{flex:0 0 auto!important}
body.product-app .console.screen-takeover:not(.research-immersive){position:fixed!important;left:2px!important;right:2px!important;top:var(--enclosure-top,40px)!important;bottom:var(--enclosure-bottom,30px)!important;width:auto!important;height:auto!important;max-height:none!important;margin:0!important;box-sizing:border-box}
@media(max-width:760px){.product-app .os{padding:44px 3px 32px!important}.product-app .transport{min-height:86px;flex-wrap:wrap;padding:6px!important;gap:5px}.product-app .transport .library-select{order:-1;width:100%;flex:auto}.product-app .transport .library-select select{max-width:none;font-size:13px}.product-app .transport #position{max-width:none;min-width:80px;flex:1}.product-app .transport button{padding:6px 9px;font-size:13px}.product-app .transport #replay{display:none}.product-app .narrative-window{padding:10px 14px!important;max-height:29%}.product-app #current-passage{font-size:23px!important}.product-app .instrument{padding:0 5px!important}.product-app .bezel{padding:4px!important}.product-app .bezel>div{gap:4px}.product-app .bezel button,.product-app .bezel select{padding:6px;font-size:12px;min-height:32px}.product-app .cartridge-picker{font-size:0;gap:0}.product-app .cartridge-picker select{font-size:12px;max-width:160px}.product-app .instrument-title h2{font-size:10px}.product-app #equation-space{width:45%}.product-app .product-intro-stage{inset:95px 0 50px;padding:12px}}
@media(max-height:430px){.product-app .narrative-window{max-height:30%;min-height:48px}.product-app #current-passage{font-size:19px!important}.product-app .transport{min-height:40px}.product-app .os{padding-top:36px!important}.product-app .instrument-title{display:none}.product-app .bezel{min-height:35px}}
