/* Canonical composition: editorial reading fields + documentary planes + one control rail.
   No CSS timeline competes with the scene controller. 12-language text is never clipped. */
.story-v4 { --story-paper:#f4f0e6; --story-ink:#091c28; --story-space:clamp(20px,7vw,112px); }
.story-v4 .sv4-opening { top:clamp(130px,21svh,230px);width:78%; }
.story-v4 .sv4-intro { max-width:34em; }
.story-v4 .sv4-second-copy,.story-v4 .sv4-community-copy { top:22%;bottom:auto;max-width:38%; }
.story-v4 .sv4-second-copy h2,.story-v4 .sv4-community-copy h2 { font-size:clamp(30px,3.7vw,62px);line-height:1.2; }
.story-v4 .sv4-later-copy .sv4-eyebrow { font-size:clamp(12px,1vw,16px);letter-spacing:.03em; }
.story-v4 .sv4-later-copy p:not(.sv4-eyebrow) { font-size:clamp(15px,1.12vw,18px);line-height:1.65; }
.story-v4 .sv4-second-photo img { object-fit:contain; }
.story-v4 .sv4-second-shade { display:none; }
.story-v4 .ridge-review-note { font-size:12px!important;color:#ded9cc!important; }
.ridge-photo-caption { position:absolute;bottom:0;left:0;right:0;padding:8px 12px;color:#f5ecd7;background:#0b2131ed;font:12px/1.5 system-ui; }
.story-v4[data-story-motion=on][data-story-beat=community] .ridge-photo-caption { display:none; }
.ridge-arrival-links { display:flex;gap:20px;flex-wrap:wrap;margin-top:20px; }
.sv4-opening .sv4-eyebrow span { display:block;font-size:.75rem;letter-spacing:.12em;margin-top:5px; }
.ridge-arrival-links a { padding:10px 18px;border:1px solid #cbded166;border-radius:14px;min-block-size:48px;background:#0a2734a6; }
.ridge-arrival-links a:hover { background:#f0e5c7;color:#153c42; }
.story-provenance { position:absolute;left:var(--story-space);top:calc(100svh - 144px);z-index:10;max-width:55%;font-size:11px;line-height:1.5;color:#efe9d8;pointer-events:none; }
.story-v4:not([data-story-beat=arrival]) .story-provenance { visibility:hidden; }
.cine-credit { display:none; }
.story-controls { display:contents; }

.story-v4:not([data-story-motion=on]) .sv4-opening { top:auto; }
.story-v4[data-cinema] .ridge-chapters { position:absolute;inset:auto 150px 26px var(--story-space);z-index:14;display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:0;padding:0;max-width:1000px;border:1px solid #b7d1cc66;border-radius:14px;background:#0b2236ed;box-shadow:0 10px 30px #020b1833;backdrop-filter:none;overflow:visible; }
.ridge-chapters::after { content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#efd4a0;transform:scaleX(var(--story-progress,0));transform-origin:left;pointer-events:none; }
.story-v4[data-cinema] .ridge-chapters button { position:relative;display:flex;align-items:center;justify-content:flex-start;gap:10px;width:auto;height:auto;min-width:44px;min-height:52px;margin:0;padding:8px 12px;border:0;border-right:1px solid #bed7d329;border-radius:0;background:transparent;box-shadow:none;color:#e9e7df;font:12px/1.35 system-ui;text-align:left;cursor:pointer; }
.ridge-chapters button>span:first-child { opacity:1;font-variant-numeric:tabular-nums;font-size:.75rem; }
.story-v4[data-cinema] .ridge-chapters button:is(:hover,[aria-current]) { background:#e9d7ad;color:#0b2431; }
.story-v4 button:focus-visible { outline:3px solid #fff0bb;outline-offset:3px; }
.story-control-actions { position:absolute;z-index:14;right:var(--story-space);top:max(78px,var(--sv4-header-clearance,0px));display:flex;gap:12px;align-items:center; }
.story-v4[data-cinema] .story-control-actions .sv4-skip { position:static!important;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 13px;border:1px solid #d9eeed5c;border-radius:14px;background:#0b2236ed;color:#f5e6c8!important;box-shadow:none;text-shadow:none;mix-blend-mode:normal;font:13px/1.4 system-ui;cursor:pointer;text-decoration:none; }

.story-v4 .sv4-handoff-copy { top:22%;max-width:65%; }
.story-v4:not([data-story-motion=on]) .story-controls { display:block;position:relative;padding:24px var(--story-space);background:#0b2236; }
.story-v4:not([data-story-motion=on]) .ridge-chapters { display:none; }
.story-v4:not([data-story-motion=on]) .story-control-actions { position:static;justify-content:flex-start;flex-wrap:wrap; }
.story-v4:not([data-story-motion=on]) .sv4-later-copy { top:auto;max-width:none;padding:32px var(--story-space) 64px; }
.story-v4:not([data-story-motion=on]) .sv4-handoff-copy { top:auto;max-width:none;width:auto; }
.story-v4:not([data-story-motion=on]) .story-provenance { position:absolute;top:88svh;visibility:visible; }
@media(max-width:1000px) and (min-width:768px) {
 .story-v4[data-cinema] .ridge-chapters { right:110px;left:32px; }
 .story-v4[data-cinema] .ridge-chapters button { padding:8px;gap:5px;font-size:11px; }
 .story-v4 .sv4-later-copy p:not(.sv4-eyebrow) { font-size:15px;line-height:1.5; }
}
@media(max-width:767px) {
 .story-v4 .sv4-opening { top:max(138px,19svh);left:7%;width:86%; }
 .story-v4 .sv4-opening h1 { font-size:clamp(40px,11vw,68px); }
 .story-v4 .sv4-intro { font-size:15px;line-height:1.7;margin-top:20px; }
 .story-v4 .sv4-eyebrow { font-size:11px;letter-spacing:.1em;margin-bottom:16px; }
 .story-v4 .sv4-second-copy,.story-v4 .sv4-community-copy { top:calc(13svh + 49.5vw + 24px);max-width:86%;left:7%; }
 .story-v4 .sv4-later-copy h2 { font-size:clamp(26px,7.2vw,36px);line-height:1.2;max-width:15em; }
 .story-v4 .sv4-later-copy .sv4-eyebrow { font-size:11px;line-height:1.4;margin-bottom:10px; }
 .story-v4 .sv4-later-copy p:not(.sv4-eyebrow) { font-size:14px;line-height:1.65;margin:12px 0; }
 .story-v4 .sv4-later-copy a { font-size:14px; }
 .story-v4 .sv4-second-copy .ridge-review-note { display:none; }
 .story-v4 .sv4-people-copy { top:50%;max-width:86%; }
 .story-v4 .sv4-handoff-copy { top:24%;max-width:86%; }
 .story-v4 .sv4-service-copy { bottom:130px; }
 .story-v4 .sv4-service-copy h2 { font-size:30px; }
 .story-v4 .sv4-service-copy p:not(.sv4-eyebrow) { font-size:14px;line-height:1.6; }
 .story-v4 .sv4-time-copy p:not(.sv4-eyebrow) { font-size:14px;line-height:1.6; }
 .story-v4[data-cinema] .ridge-chapters { left:12px;right:86px;bottom:max(16px,env(safe-area-inset-bottom)); }
 .story-v4[data-cinema] .ridge-chapters button { justify-content:center;min-height:44px;padding:8px 0;gap:0; }
 .ridge-chapters button>span:first-child { font-size:12px;opacity:1; }
 .ridge-chapters .chapter-label { display:none; }
 .ridge-chapters [aria-current] .chapter-label { display:block;position:absolute;bottom:calc(100% + 10px);left:0;width:max-content;max-width:180px;padding:5px 9px;border:1px solid #a5c9c73b;background:#0b2236ed;color:#f5e6c8;font-size:11px; }
 .ridge-chapters button:nth-child(n+4)[aria-current] .chapter-label { left:auto;right:0; }
 .story-control-actions { top:max(74px,var(--sv4-header-clearance,0px));right:16px;gap:8px; }
 .story-v4[data-cinema] .story-control-actions .sv4-skip { font-size:11px;padding:7px 10px; }
 .story-provenance { top:calc(100svh - 152px);max-width:82%;font-size:10px; }
 .ridge-arrival-links { gap:12px;margin-top:16px; }
 .ridge-arrival-links a { font-size:14px;padding:8px 12px; }
}
@media(min-width:768px) and (max-height:700px) {
 .story-v4 .sv4-opening { top:20%; }
 .story-v4 .sv4-opening h1 { font-size:clamp(48px,7vw,76px); }
 .story-v4 .sv4-intro { margin-top:12px;line-height:1.5; }
 .story-v4 .sv4-second-copy,.story-v4 .sv4-community-copy { top:20%; }
 .story-v4 .sv4-later-copy h2 { font-size:32px; }
 .story-provenance { display:none; }
}
@media(max-width:359px) {
 .story-v4[data-cinema] .ridge-chapters { grid-template-columns:repeat(6,44px);overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin; }
 .ridge-chapters [aria-current] .chapter-label { display:none; }
}
@media(forced-colors:active) {
 .story-v4 a,.story-v4 h1,.story-v4 h2,.story-v4 p { color:CanvasText!important; }
 .story-v4,.story-v4-stage,.story-controls { background:Canvas!important; }
}

/* Controls follow the shared rounded glass; preserve the cinematic artwork. */
body .ridge-arrival-links a:focus-visible{outline:3px solid #fff3d5;outline-offset:3px;background:#153f48;color:#fff9eb;box-shadow:0 0 0 7px #102b38}
.story-v4[data-cinema] .ridge-chapters button:first-child{border-start-start-radius:14px;border-end-start-radius:14px}
.story-v4[data-cinema] .ridge-chapters button:last-child{border-start-end-radius:14px;border-end-end-radius:14px}
.ridge-chapters [aria-current] .chapter-label{border-radius:8px}
@media(forced-colors:active){body .ridge-arrival-links a:focus-visible{outline-color:Highlight;background:ButtonFace;color:LinkText;box-shadow:none}}

/* The existing scene height is reserved only by the first-visit startup owner.
   Arrival stays visible; completion, user input, preferences or failure restore all planes. */
.story-v4[data-story-motion=on][data-story-pending] :is(.sv4-mountain-copy,.sv4-documentary,.sv4-impact,.sv4-later,.sv4-ending,.sv4-handoff-copy){display:none!important}

/* Story journey v3: shared chapter controls, one existing story clock. */
.story-v4[data-story-journey] .yl-story-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.story-v4[data-story-journey] .story-mode-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:48px;min-width:48px;padding:8px 13px;border:1px solid #d9eeed80;border-radius:14px;background:#0b2236f5;color:#f5e6c8;font:13px/1.4 system-ui;cursor:pointer}
.story-v4[data-story-journey] .story-mode-toggle:focus-visible,.story-v4[data-story-journey] .ridge-chapters button:focus-visible{outline:2px solid #f4d78d;outline-offset:3px}
.story-v4[data-story-journey] .story-mode-toggle:disabled{cursor:default;border-style:dashed;color:#d8dedb}
.story-v4[data-story-journey] .story-control-actions{max-width:calc(100% - 32px);flex-wrap:wrap;justify-content:flex-end}
.story-v4[data-story-journey] .ridge-chapters button{min-height:48px;transition:background-color 160ms ease,color 160ms ease}
.story-v4[data-story-journey][data-story-reading=true] .story-controls{display:flex;position:sticky;top:var(--yl-story-header,76px);z-index:15;flex-direction:column;gap:12px;padding:12px max(12px,env(safe-area-inset-left));background:#0b2236f5;border-block-end:1px solid #bed7d344}
.story-v4[data-story-journey][data-story-reading=true] .ridge-chapters{display:grid;position:relative;inset:auto;width:100%;max-width:100%;margin:0;grid-template-columns:repeat(6,minmax(0,1fr));border-radius:10px}
.story-v4[data-story-journey][data-story-reading=true] .story-control-actions{position:static;max-width:100%;justify-content:flex-end}
.story-v4[data-story-journey][data-story-reading=true] [data-story-copy]{scroll-margin-top:calc(var(--yl-story-header,76px) + 150px)}
.story-v4[data-story-journey][data-story-reading=true] .story-provenance{top:auto;bottom:0;max-width:85%;margin:12px 7.2%}
@media(max-width:767px){
 .story-v4[data-story-journey] .story-mode-toggle{font-size:12px;padding:8px 10px}
 .story-v4[data-story-journey] .story-control-actions{gap:6px}
 .story-v4[data-story-journey][data-story-reading=true] .story-controls{gap:8px;padding:8px 12px}
 .story-v4[data-story-journey][data-story-reading=true] .ridge-chapters [aria-current] .chapter-label{position:static;width:auto;max-width:none;padding:0;border:0;background:transparent;color:inherit;font-size:11px;overflow-wrap:anywhere}
 .story-v4[data-story-journey][data-story-reading=true] .ridge-chapters button[aria-current]{flex-direction:column;gap:2px}
}
@media(prefers-reduced-motion:reduce){.story-v4[data-story-journey] .ridge-chapters button{transition:none}}
@media(forced-colors:active){.story-v4[data-story-journey] .story-controls,.story-v4[data-story-journey] .story-mode-toggle{background:Canvas;color:CanvasText;border:1px solid ButtonText}.story-v4[data-story-journey] .ridge-chapters button[aria-current]{outline:2px solid Highlight;outline-offset:-2px}}
/* Mobile story actions reserve their own row above multilingual arrival text. */
@media(max-width:767px){
 .story-v4[data-story-journey][data-story-motion=on] .sv4-opening{top:calc(max(74px,var(--sv4-header-clearance,0px)) + var(--yl-story-actions-height,48px) + 16px)}
 .story-v4[data-story-journey][data-story-motion=on] .sv4-opening h1{font-size:clamp(36px,10.25vw,42px)}
 .story-v4[data-story-journey][data-story-motion=on] .sv4-opening .sv4-eyebrow{margin-bottom:16px}
}
@media(max-width:767px){.story-v4[data-story-journey][data-story-motion=on] .story-provenance{display:none}}
/* Story journey v3: end. */
