/* Hospitality layer: original Sophia, geometry and document prose stay intact. */
:root{--reading:#e5d8c7;--soft-line:#292b2b;--quiet:#999c9a}
header{max-width:1600px;margin:auto;padding:max(32px,env(safe-area-inset-top)) max(44px,env(safe-area-inset-right)) 20px max(44px,env(safe-area-inset-left))}.brand{font-size:27px}.brand small{font-size:8px;letter-spacing:2px;margin-top:11px}header nav{gap:28px}.intro .eyebrow{display:flex;align-items:center;justify-content:center;gap:14px;font-size:9px;letter-spacing:2.3px;color:var(--muted)}.welcome-line{height:1px;width:28px;background:var(--amber)}h1{font-size:clamp(48px,5.2vw,76px);line-height:1.02;letter-spacing:-2.8px}.intro-copy{font-size:13px;line-height:1.85;color:var(--muted);margin:20px 0 0}.presence{padding:34px 28px 30px;min-height:calc(100svh - 174px)}.stage{width:min(450px,80vw);margin:-18px 0 -38px}.invitation>p:first-child{font-size:20px}.invitation .text-button{margin-top:5px;font-size:12px}.hint{font-size:10px;color:var(--quiet);margin:10px 0 0}.entry-paths{display:flex;gap:32px;margin:34px auto 0;width:min(590px,100%);border-top:1px solid var(--soft-line);padding-top:12px}.entry-paths button{display:flex;align-items:center;gap:14px;flex:1;min-width:0;text-align:left;padding:10px 2px;font-family:Georgia,serif;font-size:15px;line-height:1.4}.entry-paths small{display:block;font:10px/1.5 Arial,sans-serif;color:var(--muted);margin-top:5px}.path-glyph{font-size:26px;font-family:Georgia,serif;color:var(--amber)}.path-arrow{margin-left:auto;color:var(--muted);font:15px Arial}.entry-paths button:hover .path-arrow{color:var(--amber)}body[data-panel=true] .entry-paths{display:none}.panel{border-left-color:var(--soft-line);background:linear-gradient(115deg,#080b0e,#000 70%);padding-left:36px}.panel-head{background:#050709}.panel-intro{letter-spacing:-.6px;line-height:1.22}.library-tools{margin:25px 0 8px}.library-tools label{font-size:10px;letter-spacing:1px;color:var(--muted)}.search-field{display:flex;border-bottom:1px solid var(--line);margin-top:5px;min-height:48px}.search-field input{width:100%;min-width:0;border:0;border-radius:0;background:transparent;color:var(--ivory);font:14px Arial;padding:12px 0;appearance:none}.search-field input::-webkit-search-cancel-button{display:none}.search-field input:focus-visible{outline-offset:2px}.search-field button{flex:0 0 44px;font-size:22px}.library-tools #search-count{font-size:10px;min-height:16px;margin:10px 0}.document-link{padding:22px 0;border-color:var(--soft-line)}.document-link .doc-title{font-size:25px;line-height:1.3;letter-spacing:-.25px}.document-link small{font-size:10px;line-height:1.7;color:var(--quiet)}.document-link:hover .doc-title{color:var(--amber)}#search-empty{font:16px/1.7 Georgia,serif;padding:25px 0;color:var(--muted)}.threshold-art{display:block;width:100%;height:auto;max-height:175px;object-fit:contain;margin:-10px 0 20px}.horizon{margin-top:34px;padding-top:28px;border-top:1px solid var(--soft-line)}.horizon .eyebrow{font-size:9px;margin-bottom:14px}.horizon h3{font:27px/1.3 Georgia,serif;margin:0 0 16px}.horizon p{line-height:1.75}.horizon .muted{font-size:12px}#thought{resize:none;min-height:230px;line-height:1.75;background:#080b0e;border-color:var(--soft-line);padding:18px}footer{max-width:1600px;margin:auto;border-top:1px solid #151719;padding:22px max(44px,env(safe-area-inset-right)) max(26px,env(safe-area-inset-bottom)) max(44px,env(safe-area-inset-left))}.preview-label{display:inline-block;margin-left:14px;letter-spacing:1px;color:var(--quiet);font-size:8px}
@media(min-width:761px){body[data-panel=true] .intro-copy{max-width:270px}body[data-panel=true] .stage{width:min(430px,40vw)}}
@media(max-width:760px){header{padding:max(24px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) 12px max(22px,env(safe-area-inset-left))}.brand{font-size:23px}.brand small{max-width:150px;font-size:7px;letter-spacing:1px}header nav{gap:12px;font-size:10px}header nav button{min-width:35px}header nav button[data-open=about]{display:none}.presence{padding:30px 22px 25px}.intro-copy{font-size:12px}.stage{width:min(400px,90vw);margin:-10px 0 -26px}.entry-paths{gap:20px;margin-top:28px}.entry-paths button{font-size:13px;gap:8px}.entry-paths small{font-size:9px}.path-glyph{font-size:22px}.path-arrow{display:none}.panel{padding:0 2px 24px;background:#000}.panel-intro{font-size:31px}.document-link .doc-title{font-size:24px}footer{padding:20px max(22px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left))}.preview-label{display:block;margin:7px 0 0}.threshold-art{max-height:140px}body[data-panel=true] .presence{padding-top:12px}body[data-panel=true] .stage{width:180px;margin:-20px auto -22px}}
@media(max-width:350px){header nav{gap:8px}.brand small{max-width:125px}.entry-paths{gap:12px}.entry-paths .path-glyph{display:none}h1{font-size:46px}.intro-copy{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#motion{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:10px}#motion svg{fill:currentColor;flex:none}#motion .motion-play{display:none}#motion[aria-pressed=true] .motion-pause{display:none}#motion[aria-pressed=true] .motion-play{display:block}

/* Activated presence: same orb, brighter corona, centered in the encounter. */
.intro{max-height:280px;opacity:1;transition:opacity .45s ease,max-height .6s ease}
body[data-layer=navigation] .intro{opacity:0;max-height:0;overflow:hidden;pointer-events:none}
body[data-layer=navigation] .entry-paths{display:none}
body[data-layer=navigation] .presence{justify-content:center;gap:12px}
body[data-layer=navigation] .stage{width:min(480px,82vw,65svh);margin:0 auto}
body[data-layer=navigation] .sophia canvas{filter:brightness(1.18)}
.sophia::after{content:"";position:absolute;inset:20%;border-radius:50%;box-shadow:0 0 24px 5px #e69a6338,0 0 75px 16px #e69a6318;opacity:0;pointer-events:none;transition:opacity .6s ease}
body[data-layer=navigation] .sophia::after{opacity:1}
body[data-layer=navigation][data-motion=running] .sophia::after{animation:presence-breathe 6s ease-in-out infinite}
@keyframes presence-breathe{0%,100%{opacity:.55}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){body[data-layer=navigation] .sophia::after{animation:none!important;opacity:1}}
@media(max-width:760px){body[data-layer=navigation] .stage{width:min(400px,82vw,60svh)}}
/* One scene: content comes forward without dislodging the mobile orb. */
main{isolation:isolate}
body[data-panel=true]{--scene-light:#e69a63;--scene-wash:#e69a630b}
.panel{isolation:isolate;z-index:5;background:radial-gradient(ellipse at 50% 0,var(--scene-wash,transparent),transparent 260px),#000;box-shadow:inset 0 1px 0 #e69a6320}
body[data-panel=true] .threshold-art{opacity:.9;filter:drop-shadow(0 0 9px #e69a6328);transition:opacity .4s ease,filter .4s ease}
body[data-panel=true] .panel:focus-within .threshold-art{opacity:1;filter:drop-shadow(0 0 12px #e69a6338)}
@media(forced-colors:active){.panel{box-shadow:none;background:Canvas}.threshold-art{filter:none!important}.sophia::after{display:none}}
/* Match the inset SVG viewport to its viewBox so the arc keeps its scale and the rotating box fits inside the stage. */
.rim-light{position:absolute;inset:15%;width:70%;height:70%;pointer-events:none;overflow:visible;fill:none;stroke:#fff0d5;opacity:var(--rim-intensity,.22);transform:rotate(var(--rim-angle,-125deg));transition:opacity .55s ease;z-index:1}
.rim-aura{stroke-width:1;stroke-dasharray:13 87;stroke-linecap:round;filter:blur(.9px);opacity:.45}
.rim-thread{stroke-width:.25;stroke-dasharray:9 91;stroke-linecap:round}
body[data-motion=running] .rim-light{transition:transform 1.4s ease-in-out,opacity .55s ease}
body[data-motion=paused] .rim-light{transition:none}
.scene-label{font:10px/1.6 Arial,sans-serif;color:var(--quiet);letter-spacing:.5px;margin:16px 0 0;text-align:center}
body[data-panel=true] .scene-label{max-width:250px;margin:12px auto 20px}
body[data-scene=welcome] .scene-label,body[data-scene=navigation] .scene-label{display:none}
body[data-scene=reading] .rim-light{filter:none}
@media(max-width:760px){body[data-panel=true] .scene-label{font-size:9px;margin:4px auto 16px}}
@media(prefers-reduced-motion:reduce){.rim-light{animation:none!important;transition:none!important}}
@media(forced-colors:active){.rim-light{display:none}}
/* Desktop reading dock: no sliding orb behind foreground content. */
@media(min-width:761px){
 body[data-panel=true] main{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:28px;padding:0 28px;align-items:start}
 body[data-panel=true] .presence{grid-column:1;width:100%;min-width:0;transition:none;padding:28px 12px;justify-content:center}
 body[data-panel=true] .intro{display:none}
 body[data-panel=true] .stage{width:min(360px,100%);max-width:100%;margin:0 auto}
 body[data-panel=true] .panel{position:relative;grid-column:2;grid-row:1;right:auto;top:auto;width:100%;min-width:0;margin-top:20px;padding-left:28px}
 body[data-panel=true] .invitation{max-width:100%;margin-top:10px}
 body[data-panel=true] .hint{max-width:250px;margin:10px auto 0}
}

/* Familiar lamp material */
.orb-fallback{border-color:#fff4dc;background:radial-gradient(circle at 38% 30%,#fff4dc 0%,#e8d7b6 35%,#ac9166 76%,#69543b 100%);box-shadow:0 0 28px #f2d6a33d,0 0 90px #edc38129}
@media(forced-colors:active){.orb-fallback{background:Canvas;border-color:CanvasText;box-shadow:none}}

/* Deliberate local handoff, without a send affordance. */
.writing-actions{display:flex;flex-wrap:wrap;gap:12px}.writing-help{font:12px/1.75 Arial,sans-serif;color:var(--muted);max-width:48ch;margin:20px 0}.writing-actions .primary{min-height:44px}#write-status:not(:empty){font:13px/1.6 Arial,sans-serif;border-left:2px solid var(--amber);padding-left:12px;margin:18px 0}

/* Context uses the existing space below the brand without resizing the header. */
.brand-context{position:relative;display:grid}
.section-context{color:var(--muted);font-size:.75rem;line-height:1.3;white-space:nowrap}
#section-context{position:absolute;inset-inline-start:0;inset-block-start:100%;margin-block-start:6px}
#writing-context{position:absolute;inset-inline-end:0;inset-block-end:0;block-size:44px;display:flex;align-items:center}

/* v11 mobile encounter study: visitor-led, stable locations, unbroken light. */
header nav{position:relative;padding-bottom:44px}
.return-control{position:absolute;right:0;bottom:0;width:44px;height:44px;font-size:25px;border:1px solid #716752;border-radius:50%;background:transparent}
.plane{pointer-events:none;animation:none}
.plane .point{pointer-events:auto;background:transparent;min-width:80px;min-height:48px;padding:10px 8px;text-shadow:0 1px 5px #000}
.plane .north{top:5%;left:23%;transform:translateX(-50%)}
.plane .east{top:5%;right:10%;transform:none}
.plane .south{bottom:5%;left:76%;transform:translateX(-50%)}
.plane .west{top:auto;bottom:5%;left:10%;transform:none}
.geometry{stroke-opacity:.45}.geometry .inner{stroke-dasharray:none;stroke-opacity:.25}
body[data-engaged=true] .intro{opacity:0;max-height:0;overflow:hidden;pointer-events:none}
body[data-engaged=true] .entry-paths{display:none}
body[data-engaged=true] .presence{justify-content:center}
body[data-engaged=true] .sophia::after{opacity:calc(.25 + var(--visitor-glow,0)*.75);box-shadow:0 0 30px 8px #e6b76a55,0 0 100px 24px #e6b76a22;animation:none}
body[data-engaged=true] .sophia canvas{filter:brightness(calc(1 + var(--visitor-glow,0)*.2))}
.stage{transition:width .65s ease,margin .65s ease}
body[data-returned=true]:not([data-panel=true]) .stage{width:min(540px,94vw,65svh);margin:0 auto}
body[data-returned=true] .invitation #presence-note{font-size:22px}
@media(max-width:760px){
 header{gap:10px}header nav{gap:10px}header nav button[data-open=library]{display:none}
 .presence{padding:14px 12px 24px;min-height:calc(100svh - 165px)}
 /* The flex parent centers the orb even when its width exceeds the padded content area. */
 .stage,body[data-layer=navigation] .stage{width:min(440px,96vw,65svh);margin:0}
 body[data-returned=true]:not([data-panel=true]) .stage{margin-inline:0}
 .plane{inset:2%}.plane .point span{font-size:18px}
 body[data-panel=true] .stage{width:180px;margin:-12px 0}
 body[data-panel=true] .plane{display:none}
 .hint{max-width:270px;line-height:1.6;margin:12px auto}
}
body[data-motion=paused] *,body[data-motion=paused] *::after{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.stage,.intro,.sophia::after{transition:none!important}}
@media(forced-colors:active){.plane .point{text-shadow:none}.return-control{border-color:ButtonText}}

.return-control{display:inline-flex;align-items:center;justify-content:center;padding:10px;border:0;border-radius:0;color:var(--ivory)}.return-control svg{flex:none}

/* v12: the directions approach the light; they do not cross its face. */
.axis-guides{stroke-opacity:.6}
.discover-glint{stroke:#fff0d5;stroke-width:1.1;stroke-linecap:round;stroke-opacity:0;stroke-dasharray:12 70;stroke-dashoffset:12}
body[data-layer=navigation][data-motion=running] .discover-glint{animation:discover-trace 2.8s ease-out 1}
@keyframes discover-trace{0%{stroke-opacity:0;stroke-dashoffset:12}25%{stroke-opacity:.65}70%{stroke-opacity:.35}100%{stroke-opacity:0;stroke-dashoffset:-58}}
.plane:has(.east:hover) .discover-glint,.plane:has(.east:focus-visible) .discover-glint{animation:none!important;stroke-opacity:.5;stroke-dashoffset:-26}
.plane .point{transition:color .3s ease,text-shadow .3s ease}
.plane .point:hover,.plane .point:focus-visible{color:#f5d9ad;text-shadow:0 0 18px #e6b76a55}
body[data-engaged=true] .hint{visibility:hidden}
body[data-layer=navigation] .geometry{animation:geometry-arrival .8s ease-out 1}
@keyframes geometry-arrival{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.discover-glint{animation:none!important;stroke-opacity:.3;stroke-dashoffset:-26}.geometry,.plane .point{animation:none!important;transition:none!important}}
body[data-motion=paused] .discover-glint{animation:none!important;stroke-opacity:.3;stroke-dashoffset:-26}
@media(forced-colors:active){.discover-glint{display:none}.axis-guides{stroke:CanvasText}}

/* A constellation of directions: curves stay outside the sphere. */
.orbit-circle{stroke-opacity:.35;stroke-dasharray:2 5}
.curve-trails{fill:none;stroke:#d6b98c;stroke-width:.8;stroke-linecap:round;pointer-events:none}
.trail{stroke-opacity:.2;stroke-dasharray:145 220;stroke-dashoffset:30;transition:stroke-opacity .45s ease,stroke-dashoffset .7s ease}
body[data-layer=navigation][data-motion=running] .curve-trails{animation:curves-unfold 1.6s ease-out 1}
@keyframes curves-unfold{from{opacity:0;stroke-dashoffset:110}to{opacity:1;stroke-dashoffset:30}}
body[data-choice=read] .trail-north,body[data-choice=discover] .trail-east,body[data-choice=write] .trail-south,body[data-choice=return] .trail-west{stroke-opacity:.85;stroke-dashoffset:0}
body[data-choice=read] .rim-light{transform:rotate(-150deg);opacity:.8}
body[data-choice=discover] .rim-light{transform:rotate(-45deg);opacity:.85}
body[data-choice=write] .rim-light{transform:rotate(45deg);opacity:.75}
body[data-choice=return] .rim-light{transform:rotate(135deg);opacity:.6}
.plane .point span{letter-spacing:-.35px}.plane .point::after{content:"";width:3px;height:3px;border-radius:50%;background:currentColor;opacity:0;margin-top:3px;transition:opacity .25s ease}
.plane .point:hover::after,.plane .point:focus-visible::after{opacity:.65}
#presence-note{min-height:1.5em;line-height:1.5;max-width:28ch;margin-left:auto;margin-right:auto}
body[data-engaged=true] .invitation .text-button{font-size:11px;color:#cbbda7}
body[data-returned=true] .invitation{animation:return-settle .7s ease-out 1}
@keyframes return-settle{from{opacity:.3}to{opacity:1}}
@media(max-width:760px){.plane .point{min-width:82px}.plane .point span{font-size:clamp(16px,4.6vw,21px)}#presence-note{font-size:clamp(18px,4.8vw,22px);padding:0 12px}.intro-copy{max-width:29ch;margin-left:auto;margin-right:auto}}
@media(prefers-reduced-motion:reduce){.curve-trails,.trail,.invitation{animation:none!important;transition:none!important}}
@media(forced-colors:active){.curve-trails{display:none}.orbit-circle{stroke:CanvasText;stroke-dasharray:none}.plane .point::after{background:ButtonText}}

/* 12.1: narrow-device input and visible keyboard targets, no new choreography. */
@media(max-width:760px){.search-field input{font-size:16px}.plane .point:focus-visible{outline-offset:2px}.return-control:focus-visible,#motion:focus-visible{outline-offset:2px}}

/* 12.2: give the reader room without abandoning the encounter. */
#reading{display:flex;flex-direction:column;min-height:0}
.reader-tools{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 0 12px;border-bottom:1px solid var(--soft-line)}
.reader-tools a{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:44px;font:13px/1.5 Arial,sans-serif;color:#e5c79e;text-underline-offset:4px}
.new-tab-note{font-size:11px;color:var(--muted)}.reader-tools p{font:11px/1.5 Arial,sans-serif;color:var(--muted);margin:0}
#reader{flex:1;min-height:240px;height:0}
@media(max-width:760px){#reading{height:78svh}.reader-tools{gap:0 12px}.reader-tools a{font-size:14px}.reader-tools p{padding-bottom:6px}#reader{min-height:220px}}
@media(forced-colors:active){.reader-tools a{color:LinkText}.reader-tools{border-color:CanvasText}}
