/* CAPP GUIDEBOOK EXPERIENCE V1. Only release-scoped surfaces; no global AppKit changes. */
.cge-host{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;padding:0!important;overflow:hidden;background:#081321;color:#f3f6fb}
.cge-host::backdrop{background:#081321}
.cge-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#081321}
.cge-host-wait{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:#081321;padding:24px;text-align:center;color:#fff}
.cge-host-wait[hidden],.cge-host-direct[hidden]{display:none!important}
.cge-host-wait:not([data-state=error]) p::before{content:"";display:block;width:24px;height:24px;border:2px solid #b0f1e433;border-top-color:#b0f1e4;border-radius:50%;margin:0 auto 14px;animation:cge-wait-spin .85s linear infinite}
@keyframes cge-wait-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.cge-host-wait p::before{animation:none!important}}
.cge-host-direct{color:#b0f1e4!important;text-decoration:underline!important;min-height:44px;padding:12px}
.cge-safe-probe{position:absolute;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
body.cge-active{
 --cge-top:max(env(safe-area-inset-top,0px),var(--cge-parent-top,0px));
 --cge-right:max(env(safe-area-inset-right,0px),var(--cge-parent-right,0px));
 --cge-bottom:max(env(safe-area-inset-bottom,0px),var(--cge-parent-bottom,0px));
 --cge-left:max(env(safe-area-inset-left,0px),var(--cge-parent-left,0px));
 overflow:hidden!important;
}
.cge-shell{position:fixed;inset:0;z-index:2147481000;isolation:isolate;overflow:hidden;background:#081321;color:#f3f6fb;font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;animation:cge-enter .25s ease both;--cge-rail:78px}
.cge-shell *, .cge-host *{box-sizing:border-box}
.cge-shell [hidden]{display:none!important}
@keyframes cge-enter{from{opacity:0}to{opacity:1}}
.cge-shell .cge-cover,.cge-shell .cge-shade{position:absolute;inset:0;pointer-events:none}
.cge-shell .cge-cover{z-index:0;background:radial-gradient(ellipse at 36% 32%,#294957,#0d1929 55%,#080e18)}
.cge-shell .cge-cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.cge-shell .cge-shade{z-index:1;background:linear-gradient(180deg,#02081280 0%,transparent 28%,#02081225 42%,#030811e8 85%,#030811 100%)}
.cge-shell .cge-top{position:absolute;z-index:4;top:calc(var(--cge-top) + 14px);left:calc(var(--cge-left) + 16px);right:calc(var(--cge-right) + 16px);display:flex;align-items:center;justify-content:space-between;gap:10px;pointer-events:none}
.cge-shell .cge-top>*{pointer-events:auto}
.cge-shell .cge-tag{background:#07121ab0;color:white;border:1px solid #ffffff24;padding:7px 12px;border-radius:30px;font-size:10px;letter-spacing:.12em;line-height:1.4;backdrop-filter:blur(12px)}
.cge-shell .cge-round,.cge-host .cge-round{width:46px;height:46px;min-width:44px;min-height:44px;padding:0;display:grid;place-items:center;border-radius:50%;border:1px solid #ffffff40;background:#0c172bb0;color:#fff;box-shadow:0 3px 14px #0003;backdrop-filter:blur(12px);touch-action:manipulation}
.cge-shell .cge-round svg,.cge-host .cge-round svg{fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.cge-shell .cge-round svg,.cge-host .cge-round svg{width:24px;height:24px}
.cge-shell :is(.cge-round,.cge-act):focus-visible,.cge-host .cge-round:focus-visible{outline:2px solid #b0f1e4;outline-offset:3px}
.cge-shell .cge-rail{position:absolute;z-index:4;right:calc(var(--cge-right) + 9px);bottom:calc(var(--cge-bottom) + 16px);top:calc(var(--cge-top) + 77px);width:var(--cge-rail);display:flex;flex-direction:column;justify-content:flex-end;justify-content:safe flex-end;align-items:center;gap:clamp(5px,1.3vh,15px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.cge-shell .cge-act{display:flex;flex:none;flex-direction:column;align-items:center;gap:3px;padding:0 3px;border:0;background:transparent;color:#fff;font:inherit;font-size:10px;line-height:1.15;text-shadow:0 1px 5px #000;text-align:center;cursor:pointer;touch-action:manipulation;min-width:64px}
.cge-shell .cge-act .cge-round{width:45px;height:45px}
.cge-shell .cge-primary .cge-round{background:#b0f1e4;color:#0a2928;border-color:transparent}
.cge-shell .cge-act:disabled,.cge-shell .cge-round:disabled{opacity:.4;cursor:default}
.cge-shell .cge-act[aria-pressed=true] .cge-round{color:#b0f1e4}
.cge-shell .cge-intro{position:absolute;z-index:3;left:calc(var(--cge-left) + clamp(18px,4vw,50px));right:calc(var(--cge-right) + var(--cge-rail) + 14px);bottom:calc(var(--cge-bottom) + 30px);max-width:720px;max-height:calc(100% - var(--cge-top) - var(--cge-bottom) - 110px);overflow-y:auto;overscroll-behavior:contain;text-shadow:0 2px 15px #000}
.cge-shell .cge-author{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;color:#fff}
/* CGE_GLOBAL_AVATAR_V1 */
.cge-shell .cge-mark{position:relative;display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:999px;background:linear-gradient(180deg,#e3fff8 0%,#caf8ef 50%,#9ce7d9 100%);border:1px solid rgba(255,255,255,.44);box-shadow:0 6px 18px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.58),inset 0 -2px 8px rgba(9,45,48,.16);color:#153c38;font-size:15px;font-weight:900;letter-spacing:-.02em;text-shadow:none}
.cge-shell .cge-mark::before{content:'';position:absolute;inset:2px;border-radius:inherit;border:1px solid rgba(255,255,255,.24);pointer-events:none}
.cge-shell .cge-author{gap:10px}

.cge-shell .cge-intro h1{font-size:clamp(24px,6.5vw,48px);line-height:1.13;letter-spacing:-.035em;color:#fff;font-weight:800;margin:12px 0;overflow-wrap:anywhere}
.cge-shell .cge-description{line-height:1.55;font-size:clamp(14px,3.5vw,17px);color:#e1e9ed;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.cge-shell .cge-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}
.cge-shell .cge-pills span{border:1px solid #ffffff35;border-radius:30px;padding:5px 9px;font-size:11px;color:#fff;background:#07121a4d}
.cge-shell[data-view=steps]{background:radial-gradient(ellipse at 20% 30%,#264956,#0c1828 45%,#070c16)}
/* CGE_CINEMATIC_STEP_V1: reuse the authorized, already mounted cover; no extra fetch. */
.cge-shell[data-view=steps]{color-scheme:dark}
.cge-shell[data-view=steps] .cge-cover{visibility:visible;background:transparent;overflow:hidden}
.cge-shell[data-view=steps] .cge-cover img{opacity:.50;filter:blur(2px);transform:scale(1.025)}
.cge-shell[data-view=steps] .cge-shade{visibility:visible;background:linear-gradient(180deg,rgba(3,9,18,.42),rgba(5,12,23,.36) 35%,rgba(5,12,23,.68) 75%,rgba(5,12,23,.86))}
.cge-shell[data-view=steps] .cge-cover[data-missing="1"],.cge-shell[data-view=steps] .cge-cover[data-missing="1"]+.cge-shade{visibility:hidden}
.cge-shell[data-view=steps] .cge-slide h2,.cge-shell[data-view=steps] .cge-guide{text-shadow:0 1px 4px #000b}

.cge-shell .cge-slide{position:absolute;z-index:3;top:calc(var(--cge-top) + 90px);bottom:calc(var(--cge-bottom) + 16px);left:calc(var(--cge-left) + clamp(14px,4vw,50px));right:calc(var(--cge-right) + var(--cge-rail) + 18px);display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;min-width:0;overflow:hidden;color:#fff}
.cge-shell .cge-slide-content{width:100%;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:0 3px 12px 0}
.cge-shell .cge-slide>*{max-width:820px;margin-inline:auto}
.cge-shell .cge-slide .cge-kicker{display:none}
.cge-shell .cge-slide h2{font-size:clamp(25px,6.7vw,40px);line-height:1.17;letter-spacing:-.03em;color:#fff;font-weight:800;margin-block:12px 18px;overflow-wrap:anywhere}
.cge-shell .cge-guide{color:#dbe6ee;line-height:1.72;min-width:0;overflow-wrap:anywhere;--gb-text:#dbe6ee;--gb-muted:#b5c4d3;--gb-surface:#172737;--gb-surface-soft:#142232;--gb-line:#ffffff22;--gb-border:#ffffff22;--gb-accent:#b0f1e4;--gb-primary:#b0f1e4}
.cge-shell .cge-guide p.gbx-step-body{font-size:16px;line-height:1.75;color:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.cge-shell .cge-guide .gbx-premium-guide-lock{color:#dbe6ee;background:#142232}
.cge-shell .cge-guide .gbx-premium-upgrade{background:#b0f1e4;color:#102c2d!important}
.cge-shell .cge-slide-nav{display:flex;align-items:center;gap:8px;width:100%;min-width:0;margin:0 auto;padding:6px 0;background:#0b1422e8;border-radius:12px;touch-action:manipulation}
.cge-shell .cge-progress{display:flex;gap:4px;flex:1}
.cge-shell .cge-progress i{height:3px;border-radius:4px;flex:1;background:#ffffff30}
.cge-shell .cge-progress i.on{background:#b1f2e2}
/* Original root remains mounted and observed; render graph at real dimensions even when not selected. */
body.cge-active .cge-shell #cgl-detail{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%;max-width:none!important;margin:0!important;padding:0!important;background:transparent!important;overflow:visible!important;pointer-events:none;z-index:auto}
body.cge-active .cge-shell #cgl-detail>:is(.cgl-detail-hero,.cgl-detail-overview,.cgl-detail-section,.cgl-detail-cta){display:none!important}
body.cge-active .cge-shell #cgl-detail>.gbx-reader{position:absolute;z-index:2;inset:0;visibility:hidden;pointer-events:none;overflow:auto;overscroll-behavior:contain;max-width:none!important;width:100%!important;margin:0!important;padding:calc(var(--cge-top) + 78px) calc(var(--cge-right) + var(--cge-rail) + 18px) calc(var(--cge-bottom) + 24px) calc(var(--cge-left) + 14px);border-radius:0;background:var(--gb-surface);color:var(--gb-text)}
body.cge-active .cge-shell[data-view=graph] #cgl-detail>.gbx-reader{visibility:visible;pointer-events:auto}
body.cge-active .cge-shell[data-view=graph]{background:var(--gb-surface)}
body.cge-active .cge-shell[data-view=graph] .cge-cover,body.cge-active .cge-shell[data-view=graph] .cge-shade{visibility:hidden}
body.cge-active .cge-shell[data-view=graph] .cge-act{color:var(--gb-text);text-shadow:none}
.cge-shell .cge-scrim{position:absolute;z-index:6;inset:0;width:100%;height:100%;border:0;background:#04091388;backdrop-filter:blur(9px);padding:0}
body.cge-active .cge-shell #cgl-detail>.cge-sheet{position:absolute;z-index:7;pointer-events:auto;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,720px);max-width:720px;max-height:calc(100% - var(--cge-top) - 28px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--gb-surface);color:var(--gb-text);border-radius:26px 26px 0 0;padding:15px calc(var(--cge-right) + 18px) calc(var(--cge-bottom) + 22px) calc(var(--cge-left) + 18px);box-shadow:0 -12px 50px #0006}
.cge-shell .cge-handle{width:42px;height:4px;border-radius:6px;background:#7c93a2;margin:0 auto 12px}
.cge-shell .cge-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.cge-shell .cge-sheet-head h2{margin:0;font-size:24px;font-weight:800;color:var(--gb-text)}
.cge-shell .cge-sheet-body{min-width:0;overflow-wrap:anywhere}
body.cge-active .cge-shell #cgl-detail .cge-sheet-body .cgl-detail-overview{padding:0;background:transparent;border:0}
body.cge-active .cge-shell #cgl-detail .cge-sheet-body .cgl-detail-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
body.cge-active .cge-shell #cgl-detail .cge-sheet-body .cgl-detail-cta{display:grid!important;width:100%;margin:0;padding:0;position:static!important;box-shadow:none!important;background:transparent!important}
body.cge-active .cge-shell #cgl-detail .cge-sheet-body .cgl-cta-explore{display:none!important}
body.cge-active .gbx-step-sheet.cge-discussion-native{align-items:flex-end}
body.cge-active .gbx-step-sheet.cge-discussion-native .gbx-sheet-backdrop{backdrop-filter:blur(9px);background:#04091388}
body.cge-active .gbx-step-sheet.cge-discussion-native .gbx-sheet-panel{width:min(100%,720px);height:min(82dvh,940px);max-height:calc(100% - var(--cge-top) - 12px);border-radius:26px 26px 0 0;padding-bottom:calc(var(--cge-bottom) + 22px)}
html.cge-active-document>.capp-gb-guest-overlay{z-index:2147483002!important}
@media(max-height:580px){.cge-shell .cge-rail{justify-content:flex-start;gap:5px}.cge-shell .cge-intro{bottom:calc(var(--cge-bottom) + 12px)}}
@media(prefers-reduced-motion:reduce){.cge-shell{animation:none}}

.cge-shell .cge-graph-notice{position:absolute;z-index:2;top:calc(var(--cge-top) + 95px);left:calc(var(--cge-left) + 18px);right:calc(var(--cge-right) + var(--cge-rail) + 18px);color:var(--gb-text)}

.cge-shell:has(.gbx-reader) .cge-graph-notice{display:none!important}

.cge-shell:not([data-view=graph]) .gbx-disc-count-layer{display:none!important}

/* CAPP STEP HERO V1: no global theme or safe-area changes. */
.cge-shell[data-view=steps][data-hero-ready="1"] .cge-cover{visibility:visible!important}
.cge-shell[data-view=steps][data-hero-ready="1"] .cge-cover+.cge-shade{visibility:visible!important}
.cge-shell[data-view=steps] .cge-cover .cge-step-hero{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.50;filter:blur(2px);transform:scale(1.025)}
.cge-shell[data-view=steps][data-hero-ready="1"] .cge-cover img:not(.cge-step-hero){visibility:hidden}
