/* Homepage-only integration. All visual rules are scoped to the adopted hero. */
.home-page:has(#ph-home)>.site-header{position:sticky;top:0;background:#10110ff5}
.home-page:has(#ph-home)>.mobile-nav{position:fixed;top:var(--ph-header,102px)}
#ph-home{--ph-gold:#ddbd80;--ph-ink:#f0eade;--ph-muted:#bfb8a8;--ph-height:calc(100svh - var(--ph-header,102px));position:relative;height:500svh;background:#090a09;color:var(--ph-ink);isolation:isolate;font:14px/1.6 var(--serif)}
#ph-home *{box-sizing:border-box}
#ph-home .ph-viewport{position:sticky;top:var(--ph-header,102px);height:var(--ph-height);overflow:clip}
#ph-home .ph-stage{position:absolute;inset:0;z-index:0;outline-offset:-4px}
#ph-home canvas{display:block;width:100%;height:100%;touch-action:pan-y}
#ph-home .ph-shade{position:absolute;inset:0;background:linear-gradient(90deg,#090a09 0%,#090a09d9 28%,transparent 61%);pointer-events:none;z-index:1}
#ph-home .ph-toolbar{position:absolute;top:10px;left:6%;right:6%;display:flex;align-items:center;gap:20px;z-index:5;font:10px/1.5 var(--mono);letter-spacing:.08em}
#ph-home .ph-toolbar>span{color:var(--ph-gold);margin-right:auto}
#ph-home .ph-toolbar a{padding:10px 0;min-height:44px;display:flex;align-items:center}
#ph-home .ph-toolbar button{min-height:44px;padding:8px 12px;font:inherit}
#ph-home :is(button,select){color:var(--ph-ink);background:#11140ff0;border:1px solid #73654b;cursor:pointer;border-radius:0;font:inherit;min-height:44px}
#ph-home button[aria-pressed=true]{border-color:var(--ph-gold);color:var(--ph-gold)}
#ph-home :is(button,a,input,select):focus-visible{outline:2px solid var(--ph-gold);outline-offset:3px}
#ph-home .ph-chapters{position:absolute;inset:0;pointer-events:none;z-index:2}
#ph-home .chapter{position:absolute;inset:0;display:flex;align-items:center;padding:72px 6% 54px;visibility:hidden;opacity:0;transition:opacity .28s}
#ph-home .chapter.active{visibility:visible;opacity:1}
#ph-home .copy{width:min(35vw,490px);pointer-events:auto}
#ph-home .kicker{font:10px/1.5 var(--mono);letter-spacing:.20em;color:var(--ph-gold);margin:0 0 18px}
#ph-home :is(h1,h2){color:var(--ph-ink);font:400 clamp(36px,4.9vw,76px)/1.05 var(--serif);letter-spacing:-.055em;margin:0 0 22px;max-width:100%}
#ph-home em{color:var(--ph-gold);font-style:normal}
#ph-home p:not(.kicker){color:var(--ph-muted);font-size:13px;line-height:1.65;margin:0 0 14px}
#ph-home .intro{font-size:16px!important}
#ph-home .descend{display:inline-flex;gap:20px;padding:12px 0;min-height:44px;color:var(--ph-gold);font:10px var(--mono);align-items:center}
#ph-home .inspect-controls{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}
#ph-home .inspect-controls button{padding:8px 10px;font-size:11px}
#ph-home .annotation{border-left:1px solid var(--ph-gold);padding-left:12px;color:var(--ph-gold)!important;font-size:11px!important}
#ph-home .fine{font-size:10px!important;line-height:1.5!important}
#ph-home .exits{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
#ph-home .exits a{border:1px solid #7b6946;padding:12px 16px;min-height:44px;font-size:12px}
#ph-home .exits a.primary{background:var(--ph-gold);color:#111}
#ph-home .ph-chapter-nav{position:absolute;right:14px;top:42%;z-index:5;display:grid;gap:5px}
#ph-home .ph-chapter-nav a{min-width:36px;min-height:44px;display:grid;place-items:center;font:11px var(--mono);border-left:1px solid #72644a;color:var(--ph-muted)}
#ph-home .ph-chapter-nav a[aria-current]{color:var(--ph-gold);border-left:2px solid var(--ph-gold)}
#ph-home .ph-status{position:absolute;bottom:8px;left:6%;right:6%;margin:0!important;font:9px var(--mono)!important;letter-spacing:.08em;z-index:3;pointer-events:none}
#ph-home .ph-loading{position:absolute;right:16%;top:44%;z-index:3;font:11px/2 var(--mono);color:var(--ph-muted)}
#ph-home .ph-loading a{display:block;color:var(--ph-gold)}
#ph-home[data-state=ready] .ph-loading{display:none}
#ph-home .ph-fallback{position:relative;padding:36px 6%}
#ph-home .ph-fallback[hidden]{display:none}
#ph-home .ph-fallback svg{display:block;width:min(400px,100%);margin:0 auto 20px}
#ph-home[data-state=fallback]{height:auto}
#ph-home[data-state=fallback] .ph-viewport{position:relative;top:auto;height:auto;overflow:visible}
#ph-home[data-state=fallback] :is(.ph-stage,.ph-shade,.ph-loading,.ph-toolbar,.ph-chapter-nav,.ph-status){display:none}
#ph-home[data-state=fallback] .ph-chapters{position:relative}
#ph-home[data-state=fallback] .chapter{position:relative;opacity:1;visibility:visible;min-height:0;inset:auto;height:auto;display:block;padding:32px 6%;border-top:1px solid #38352d}
#ph-home[data-state=fallback] .copy{width:min(600px,100%)}
/* Portrait reserves separate hardware and copy regions, including on short phones. */
@media(max-width:759px) and (orientation:portrait){
 #ph-home{height:400svh}
 #ph-home .ph-toolbar{left:5%;right:5%;top:0;gap:10px;font-size:9px}
 #ph-home .ph-stage{inset:46px 4% auto;height:45%}
 #ph-home .ph-shade{background:none}
 #ph-home .chapter{display:block;padding:0;top:52%;bottom:42px;left:7%;right:7%}
 #ph-home .copy{width:100%;max-width:unset}
 #ph-home :is(h1,h2){font-size:clamp(28px,7.5vw,43px);margin-bottom:12px}
 #ph-home h1 br{display:none}
 #ph-home .kicker{font-size:9px;margin-bottom:8px}
 #ph-home p:not(.kicker){font-size:12px;margin-bottom:8px}
 #ph-home .intro{font-size:13px!important}
 #ph-home .descend{padding:5px 0}
 #ph-home .inspect-controls{margin:8px 0}
 #ph-home .annotation{font-size:10px!important}
 #ph-home #ph-anatomy .fine{display:none}
 #ph-home .ph-chapter-nav{top:auto;bottom:0;left:7%;right:7%;display:flex;justify-content:center;gap:14px}
 #ph-home .ph-chapter-nav a{border-left:0;border-bottom:1px solid #72644a;min-height:36px}
 #ph-home .ph-chapter-nav a[aria-current]{border-left:0;border-bottom:2px solid var(--ph-gold)}
 #ph-home .ph-status{display:none}
 #ph-home .exits{margin-top:12px}
 #ph-home .exits a{padding:9px 12px;font-size:11px}
 #ph-home .ph-loading{top:23%;left:7%;right:7%;text-align:center}
}
@media(max-width:759px) and (orientation:portrait) and (max-height:700px){
 #ph-home .ph-stage{height:36%}
 #ph-home .chapter{top:calc(36% + 60px)}
 #ph-home :is(h1,h2){font-size:28px}
 #ph-home #ph-anatomy .annotation{display:none}
}
/* Landscape phones use side-by-side composition, with short controls and no fixed footer. */
@media(max-width:1099px) and (orientation:landscape) and (max-height:600px){
 #ph-home{height:370svh}
 #ph-home .ph-toolbar{top:0;left:4%;right:4%;font-size:9px;gap:12px}
 #ph-home .ph-toolbar :is(a,button){min-height:36px;padding:4px 8px}
 #ph-home .ph-stage{inset:36px 3% 20px 46%}
 #ph-home .ph-shade{display:none}
 #ph-home .chapter{display:block;top:42px;bottom:8px;left:4%;right:56%;padding:0}
 #ph-home .copy{width:100%}
 #ph-home :is(h1,h2){font-size:clamp(23px,3.5vw,37px);margin-bottom:8px}
 #ph-home .kicker{font-size:9px;margin-bottom:7px}
 #ph-home .copy>p:not(.kicker){font-size:11px;margin-bottom:7px}
 #ph-home .intro{font-size:11px!important}
 #ph-home .inspect-controls{gap:4px;margin:6px 0}
 #ph-home .inspect-controls button{font-size:10px;min-height:36px;padding:4px}
 #ph-home .descend{min-height:32px;margin:0;padding:2px 0;font-size:9px}
 #ph-home .ph-status{display:none}
 #ph-home .ph-chapter-nav{right:0;top:42px;gap:2px}
 #ph-home .ph-chapter-nav a{min-height:32px;min-width:22px;font-size:9px}
 #ph-home .exits{margin-top:8px;gap:5px}
 #ph-home .exits a{font-size:10px;padding:5px 9px;min-height:34px}
}
@media(prefers-reduced-motion:reduce){#ph-home *{animation:none!important;transition:none!important}}

/* Keep the compact reveal above the chapter controls on the shortest phones. */
@media(max-width:759px) and (orientation:portrait) and (max-height:700px){
 .home-page:has(#ph-home)>.site-header{min-height:76px;padding-block:10px}
 #ph-home .exits a{font-size:10px;padding:7px 8px;min-height:36px}
}
@media(max-width:1099px) and (orientation:landscape) and (max-height:600px){
 .home-page:has(#ph-home)>.site-header{min-height:64px;padding-block:8px}
 .home-page:has(#ph-home)>.site-header .brand-logo{width:138px}
}

/* Three-chapter adoption. Commercial header rules above remain the 109 baseline. */
#ph-home .ph-toolbar button{border-color:transparent;background:transparent;padding:6px 9px}
#ph-home .ph-toolbar button:hover{border-color:#73654b;background:#11140fa0}
#ph-home .ph-toolbar{letter-spacing:.04em}
#ph-home :is(h1,h2){white-space:normal}
@media(max-width:759px) and (orientation:portrait){
 #ph-home .ph-toolbar{gap:8px;font-size:9px}
 #ph-home .ph-toolbar>span{letter-spacing:.12em}
 #ph-home .ph-toolbar :is(a,button){min-height:44px}
 #ph-home .ph-stage{inset:42px 0 auto;height:52%}
 #ph-home .chapter{top:calc(52% + 54px)}
 #ph-home :is(h1,h2) br{display:none}
 #ph-home .inspect-controls,#ph-home .annotation{display:none}
 #ph-home .descend{min-height:40px}
 #ph-home .ph-chapter-nav{gap:20px}
}
@media(max-width:759px) and (orientation:portrait) and (max-height:700px){
 #ph-home .ph-stage{height:44%}
 #ph-home .chapter{top:calc(44% + 54px)}
 #ph-home :is(h1,h2){font-size:27px;line-height:1.05;margin-bottom:8px}
 #ph-home .intro{line-height:1.45!important}
 #ph-home .descend{min-height:32px;font-size:9px}
 #ph-home #ph-revelation .copy>p:not(.kicker){display:none}
}
@media(max-width:1099px) and (orientation:landscape) and (max-height:600px){
 #ph-home .ph-toolbar button{min-height:36px}
 #ph-home .copy>.fine{display:none}
}



/* SIGNATURE copy and two commercial exits; technical detail stays secondary. */
#ph-home .exits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:410px}
#ph-home .exits a{display:flex;align-items:center;justify-content:center;text-align:center;gap:6px}
#ph-home .ph-technical{margin-top:10px;font-size:10px;color:var(--ph-muted)}
#ph-home .ph-technical summary{cursor:pointer;min-height:32px;display:list-item;align-content:center}
#ph-home .ph-technical .fine{margin-top:8px}
@media(max-width:759px) and (orientation:portrait){
 #ph-home .ph-technical{display:none}
 #ph-home #ph-revelation .copy>p:not(.kicker){display:block}
 #ph-home .exits{gap:8px;margin-top:14px}
 #ph-home .exits a{font-size:11px;padding:9px 8px;min-height:44px}
}
@media(max-width:759px) and (orientation:portrait) and (max-height:700px){
 #ph-home .exits{margin-top:10px}
 #ph-home .exits a{font-size:10px;min-height:40px;padding:7px 6px}
 #ph-home #ph-revelation .copy>p:not(.kicker){font-size:11px;line-height:1.45}
}
@media(max-width:1099px) and (orientation:landscape) and (max-height:600px){
 #ph-home .ph-technical{display:none}
}
