/* v3.1: shared motion and compact compositions. No viewport scaling. */
:root{--motion-fast:180ms;--motion-ui:280ms;--motion-scene:400ms;--ease-ui:cubic-bezier(.2,.7,.2,1);--header-height:76px}
html{scroll-padding-top:var(--header-height)}
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:320ms;animation-timing-function:var(--ease-ui)}
body{transition:opacity var(--motion-ui) var(--ease-ui)}
:root[data-fallback-entry=yes] body{animation:page-enter var(--motion-ui) var(--ease-ui) both}
@keyframes page-enter{from{opacity:.85}to{opacity:1}}

.button,.icon-button,.language-toggle,.segmented button{transition:background var(--motion-ui) var(--ease-ui),color var(--motion-ui) var(--ease-ui),border-color var(--motion-ui) var(--ease-ui),transform var(--motion-fast) var(--ease-ui)}
.button:active,.icon-button:active,.segmented button:active{transform:translateY(1px)}
.button svg,.text-link svg{transition:transform var(--motion-ui) var(--ease-ui)}
@media(hover:hover){.button:hover svg,.text-link:hover svg{transform:translateX(3px)}}
.language-panel:not([hidden]),:root[data-menu=open] .main-nav{animation:menu-enter var(--motion-ui) var(--ease-ui) both}
@keyframes menu-enter{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.intro-screen{position:fixed;inset:0;z-index:500;background:var(--bg);display:grid;place-items:center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--intro-exit,220ms) var(--ease-ui),visibility var(--intro-exit,220ms)}
:root[data-intro=yes] .intro-screen{opacity:1;visibility:visible;animation:intro-rescue 0s 1.2s forwards}
@keyframes intro-rescue{to{opacity:0;visibility:hidden}}
.intro-mark{width:190px;position:relative}
.intro-mark img{width:100%;height:auto}
.intro-line{height:2px;display:block;margin-top:20px;background:var(--accent);transform-origin:left;animation:intro-pulse 900ms var(--ease-ui) both}
@keyframes intro-pulse{from{transform:scaleX(.1);opacity:.2}to{transform:scaleX(1);opacity:1}}
html:not(.js) .intro-screen,:root[data-reduced=yes] .intro-screen{display:none}

/* Each season occupies the same cells; changing it never changes height. */
.heat-section .section-intro{margin-bottom:28px}
.heat-layout{display:grid;grid-template-columns:.85fr 1.5fr;gap:5%;align-items:center}
.season-copy{display:grid;margin-top:20px}
.season-copy p{grid-area:1/1;margin:0;transition:opacity var(--motion-ui) var(--ease-ui),transform var(--motion-ui) var(--ease-ui);line-height:1.55}
.season-copy [aria-hidden=true]{opacity:0;transform:translateY(6px);visibility:hidden;transition:opacity var(--motion-ui),transform var(--motion-ui),visibility 0s var(--motion-ui)}
.heat-map{display:grid;grid-template-columns:100px minmax(0,1fr);gap:36px;align-items:center;min-width:0;padding-block:12px}
.heat-origin{position:relative;display:grid;place-items:center;text-align:center;aspect-ratio:1;font-size:1.2rem}
.heat-orbit{position:absolute;inset:0;border:1px solid var(--flow);border-radius:50%;box-shadow:inset 0 0 0 8px color-mix(in srgb,var(--flow) 7%,transparent)}
.heat-origin:after{content:'';position:absolute;width:36px;left:100%;height:2px;background:var(--flow)}
.heat-destinations{position:relative;border-left:2px solid var(--flow);display:grid;gap:28px;padding-block:8px}
.heat-process,.heat-farm{position:relative;padding-left:24px;min-width:0}
.heat-process{display:flex;align-items:center;gap:10px;font-size:1rem}
.heat-connector{position:absolute;left:0;top:12px;width:24px;height:2px;background:var(--flow)}
.heat-node-dot{width:7px;height:7px;background:var(--flow);border-radius:50%;flex:none}
.heat-farm>strong{font-size:1rem;display:block;margin-bottom:14px}
.heat-nodes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.heat-node{min-width:0;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--flow);padding:12px 0 0;transition:opacity var(--motion-scene) var(--ease-ui),border-color var(--motion-scene);font-size:.875rem;line-height:1.4}
.heat-node svg{width:24px;height:24px;stroke:var(--flow);fill:none;stroke-width:1.5;transition:transform var(--motion-scene) var(--ease-ui)}
[data-season-diagram=summer] [data-heat-node="1"]{opacity:.5;border-top-style:dashed}
[data-season-diagram=summer] [data-heat-node="1"] svg{transform:translateY(3px)}

/* Native process pin. All five titles stay visible; no wheel/touch hijacking. */
.journey.section{padding:0}
.journey-stage{padding:44px var(--gutter);min-height:0;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box}
.journey-stage>h2{max-width:780px;margin-bottom:34px;font-size:clamp(2rem,3.2vw,3.4rem)}
.journey[data-pinned=yes]{height:250svh}
.journey[data-pinned=yes] .journey-stage{position:sticky;top:var(--header-height);min-height:calc(100svh - var(--header-height))}
.journey-beam{height:3px;flex-shrink:0;background:#becac1;margin-bottom:19px;overflow:hidden}
.journey-beam span{display:block;height:100%;background:#174f34;transform:scaleX(var(--journey-progress,0));transform-origin:left}
:root[data-theme=dark] .journey-beam{background:#36584b}
:root[data-theme=dark] .journey-beam span{background:#c4f2c9}
.journey ol{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;list-style:none;padding:0;margin:0}
.journey li{border:0;padding:0;display:block;min-width:0}
.journey li:last-child{grid-column:auto}
.journey li>button{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-size:1rem;background:var(--bg);color:var(--muted);transition:background var(--motion-ui),color var(--motion-ui),border-color var(--motion-ui)}
.journey li[data-past=true]>button{background:var(--accent);border-color:var(--accent);color:var(--bg)}
.journey h3{font-size:1.15rem;line-height:1.25;margin:18px 0 12px}
.journey p{font-size:1rem;line-height:1.5;color:var(--muted)}
.journey-note{padding:0 var(--gutter) 44px;margin-top:0}

/* Compact home sections preserve useful text and original images. */
:root:not([data-text-expanded=yes]) .section{padding-block:40px}
:root:not([data-text-expanded=yes]) .section-intro{margin-bottom:24px;gap:5%}
:root:not([data-text-expanded=yes]) .section-intro h2{font-size:clamp(2rem,3.3vw,3.6rem);line-height:1.1}
:root:not([data-text-expanded=yes]) .section-intro p{font-size:1rem;line-height:1.5}
:root:not([data-text-expanded=yes]) .reality .wide-photo img{height:clamp(240px,48svh,540px);aspect-ratio:auto;object-fit:cover}
:root:not([data-text-expanded=yes]) .daily-section{gap:6%;align-items:center}
:root:not([data-text-expanded=yes]) .daily-photo img{height:clamp(260px,60svh,600px);aspect-ratio:auto;object-fit:cover}
:root:not([data-text-expanded=yes]) .daily-copy h2{font-size:clamp(2rem,3.3vw,3.5rem);margin-bottom:22px}
:root:not([data-text-expanded=yes]) .daily-copy p{font-size:1.05rem;line-height:1.6}
:root:not([data-text-expanded=yes]) .journey.section{padding-block:0}
:root:not([data-text-expanded=yes]) .farm-section{padding-block:28px}
:root:not([data-text-expanded=yes]) .farm-section>.section-intro{margin-bottom:16px;align-items:start}
:root:not([data-text-expanded=yes]) .farm-section .section-intro a{display:none}
:root:not([data-text-expanded=yes]) .farm-section .comparator-title{margin-bottom:12px;font-size:1.2rem}
:root:not([data-text-expanded=yes]) .calculator-controls{margin:0;gap:16px;align-items:end}
:root:not([data-text-expanded=yes]) .calculator-controls label{font-size:.95rem;line-height:1.35;gap:6px}
:root:not([data-text-expanded=yes]) .calculator-controls :is(input,select){height:44px;min-height:44px;padding-block:8px}
:root:not([data-text-expanded=yes]) .power-comparison{height:100px;margin:12px 0 16px;gap:26px}
:root:not([data-text-expanded=yes]) .power-bar{height:calc(62px * var(--power));min-height:0}
:root:not([data-text-expanded=yes]) .bar-value{font-size:1.3rem;line-height:1.25;margin-bottom:6px}
:root:not([data-text-expanded=yes]) .bar-value small{font-size:.875rem}
:root:not([data-text-expanded=yes]) .ceiling-result{padding:14px 0;gap:30px;align-items:center}
:root:not([data-text-expanded=yes]) .ceiling-result h3{font-size:1.15rem;line-height:1.3;margin-bottom:8px}
:root:not([data-text-expanded=yes]) .ceiling-result p{font-size:.875rem;line-height:1.5;max-width:65ch}
:root:not([data-text-expanded=yes]) .ceiling-result output{font-size:2.7rem;line-height:1.1}
:root:not([data-text-expanded=yes]) .calculator>.form-status:empty{display:none}
:root:not([data-text-expanded=yes]) .calculator>[data-brief-link]{margin-top:14px;min-height:44px;padding-block:8px}

/* Fit the ordinary story before enabling pinning; oversized text still flows. */
@media(min-width:1001px) and (min-height:700px){
 :root.js:not([data-text-expanded=yes]):not([data-reduced=yes]) .story:not(.static-story):not([data-load=fallback]){height:340svh}
 :root.js:not([data-text-expanded=yes]):not([data-reduced=yes]) .story:not(.static-story):not([data-load=fallback]) .stage{height:calc(100svh - var(--header-height));min-height:0}
 :root:not([data-text-expanded=yes]) .chapter-copy{top:8%;width:35%;max-width:440px}
 :root:not([data-text-expanded=yes]) .chapter-copy :is(h1,h2){font-size:clamp(2rem,3.1vw,3.8rem);line-height:1.06}
 :root:not([data-text-expanded=yes]) .chapter-copy p{font-size:1rem;line-height:1.5;margin-top:16px}
 :root:not([data-text-expanded=yes]) .chapter-copy .concept-caption{font-size:.875rem;margin-top:10px}
 :root:not([data-text-expanded=yes]) .story-cta{margin-top:18px;min-height:44px;padding-block:10px}
 :root:not([data-text-expanded=yes]) .stage-bottom{bottom:18px}
}
@media(min-width:360px) and (max-width:1000px) and (min-height:700px){
 :root{--header-height:70px}
 :root.js:not([data-text-expanded=yes]):not([data-reduced=yes]) .story:not(.static-story):not([data-load=fallback]){height:340svh}
 :root.js:not([data-text-expanded=yes]):not([data-reduced=yes]) .story:not(.static-story):not([data-load=fallback]) .stage{height:calc(100svh - var(--header-height));min-height:0;grid-template-rows:auto minmax(220px,1fr) auto;align-content:stretch}
 :root.js:not([data-text-expanded=yes]):not([data-reduced=yes]) .story:not(.static-story):not([data-load=fallback]) .scene{height:100%;min-height:220px;align-self:stretch}
 :root:not([data-text-expanded=yes]) .chapter-copy{padding:12px var(--gutter) 0;display:block;width:auto}
 :root:not([data-text-expanded=yes]) .chapter-count{margin-bottom:6px;font-size:.75rem}
 :root:not([data-text-expanded=yes]) .chapter-copy :is(h1,h2){font-size:clamp(1.7rem,6.2vw,2.25rem);line-height:1.07;margin:0}
 :root:not([data-text-expanded=yes]) .chapter-copy p{font-size:1rem;line-height:1.4;margin-top:8px}
 :root:not([data-text-expanded=yes]) .chapter-copy .concept-caption{font-size:.8125rem;line-height:1.4;margin-top:6px}
 :root:not([data-text-expanded=yes]) .story-cta{margin:10px 0 0;min-height:44px;padding:8px 14px;font-size:.875rem}
 :root:not([data-text-expanded=yes]) .stage-bottom{padding:0 16px 10px}
 :root:not([data-text-expanded=yes]) .play-button{min-height:44px;margin:0;font-size:.875rem}
 :root:not([data-text-expanded=yes]) .stage-nav{gap:10px}
 :root:not([data-text-expanded=yes]) .stage-nav button{min-height:52px;gap:3px;padding-bottom:4px;font-size:.8125rem}
 :root:not([data-text-expanded=yes]) .model-label{font-size:.8125rem;padding:6px 9px;line-height:1.25}
}
@media(max-width:700px){
 :root{--header-height:70px}
 .heat-layout{grid-template-columns:1fr;gap:24px}
 .season-copy{margin-top:14px}
 .heat-map{grid-template-columns:64px minmax(0,1fr);gap:24px}
 .heat-origin{font-size:1rem}
 .heat-origin:after{width:24px}
 .heat-process,.heat-farm{padding-left:18px}
 .heat-connector{width:18px}
 .heat-nodes{grid-template-columns:1fr;gap:0}
 .heat-node{font-size:.875rem;hyphens:none;flex-direction:row;align-items:center;padding:8px 0;gap:10px}
 .heat-node svg{width:20px;height:20px;flex:none}
 .heat-destinations{gap:24px}
 .journey-stage{padding:28px var(--gutter)}
 .journey-stage>h2{font-size:2rem;margin-bottom:22px}
 .journey ol{grid-template-columns:1fr;gap:18px}
 .journey li{display:grid;grid-template-columns:44px 1fr;gap:16px;align-items:start}
 .journey h3{margin:9px 0 8px;font-size:1.125rem}
 .journey-detail{display:grid;grid-template-rows:1fr;transition:grid-template-rows var(--motion-ui) var(--ease-ui),opacity var(--motion-ui)}
 .journey-detail p{min-height:0;overflow:hidden}
 .journey[data-pinned=yes] .journey-detail{height:0;overflow:hidden;transition:height var(--motion-ui) var(--ease-ui),opacity var(--motion-ui)}
 .journey[data-pinned=yes] li:not([data-past=true]) .journey-detail{grid-template-rows:0fr;opacity:0}
 .journey[data-pinned=yes] li[data-past=true] .journey-detail{grid-template-rows:0fr;opacity:0}
 .journey[data-pinned=yes][data-active="0"] li:nth-child(1) .journey-detail,.journey[data-pinned=yes][data-active="1"] li:nth-child(2) .journey-detail,.journey[data-pinned=yes][data-active="2"] li:nth-child(3) .journey-detail,.journey[data-pinned=yes][data-active="3"] li:nth-child(4) .journey-detail,.journey[data-pinned=yes][data-active="4"] li:nth-child(5) .journey-detail{grid-template-rows:1fr;opacity:1;height:var(--journey-detail-height,auto)}
 :root:not([data-text-expanded=yes]) .section{padding-block:30px}
 :root:not([data-text-expanded=yes]) .section-intro h2{font-size:2rem;margin-bottom:12px}
 :root:not([data-text-expanded=yes]) .section-intro{margin-bottom:20px}
 :root:not([data-text-expanded=yes]) .section-intro p{font-size:1rem;line-height:1.45}
 :root:not([data-text-expanded=yes]) .reality .wide-photo img{height:34svh;min-height:220px}
 :root:not([data-text-expanded=yes]) .daily-photo img{height:34svh;min-height:220px}
 :root:not([data-text-expanded=yes]) .daily-section{gap:22px}
 :root:not([data-text-expanded=yes]) .daily-copy h2{font-size:2rem;margin-bottom:12px}
 :root:not([data-text-expanded=yes]) .farm-section{padding-block:8px}
 :root:not([data-text-expanded=yes]) .farm-section>.section-intro{margin-bottom:14px}
 :root:not([data-text-expanded=yes]) .farm-section>.section-intro h2{font-size:1.8rem}
 :root:not([data-text-expanded=yes]) .calculator-controls{gap:10px 14px;grid-template-columns:1fr 1fr}
 :root:not([data-text-expanded=yes]) .calculator-controls label{font-size:.875rem}
 :root:not([data-text-expanded=yes]) .power-comparison{height:62px;margin:6px 0 8px;gap:18px}
 :root:not([data-text-expanded=yes]) .power-bar{height:calc(36px * var(--power))}
 :root:not([data-text-expanded=yes]) .bar-value{font-size:1.15rem}
 :root:not([data-text-expanded=yes]) .ceiling-result{padding:12px 0;display:flex;flex-direction:column-reverse;align-items:start;gap:12px}
 :root:not([data-text-expanded=yes]) .ceiling-result h3{font-size:1.05rem;margin-bottom:6px}
 :root:not([data-text-expanded=yes]) .ceiling-result p{font-size:.8125rem;line-height:1.4}
 :root:not([data-text-expanded=yes]) .energy-value{gap:10px}
 :root:not([data-text-expanded=yes]) .ceiling-result output{font-size:2.5rem}
 :root:not([data-text-expanded=yes]) .calculator>[data-brief-link]{margin-top:10px;font-size:.875rem}
}
/* These exits deliberately outrank the compact candidates. */
:root:not([data-text-expanded=yes]) .story[data-tall=yes]{height:auto}
:root:not([data-text-expanded=yes]) .story[data-tall=yes] .stage{position:relative;top:0;height:auto;min-height:0;display:grid;grid-template-rows:auto auto auto}
:root:not([data-text-expanded=yes]) .story[data-tall=yes] .scene{position:relative;inset:auto;grid-row:2;height:36svh;min-height:250px}
:root:not([data-text-expanded=yes]) .story[data-tall=yes] .chapter-copy{position:relative;inset:auto;grid-row:1;width:auto;max-width:none;padding:20px var(--gutter)}
:root:not([data-text-expanded=yes]) .story[data-tall=yes] .stage-bottom{position:relative;inset:auto;grid-row:3;padding:0 var(--gutter) 16px}
:root[data-reduced=yes] .journey[data-pinned=yes]{height:auto}
:root[data-reduced=yes] .journey-stage{position:relative;top:0;min-height:0}
:root[data-reduced=yes] .journey-detail{grid-template-rows:1fr!important;opacity:1!important}
:root[data-text-expanded=yes] .heat-map{grid-template-columns:1fr;gap:30px}
:root[data-text-expanded=yes] .heat-origin{width:6rem;justify-self:center}
:root[data-text-expanded=yes] .heat-origin:after{display:none}
:root[data-text-expanded=yes] .heat-nodes{grid-template-columns:1fr}
:root[data-text-expanded=yes] .heat-node,:root[data-text-expanded=yes] .heat-process,:root[data-text-expanded=yes] .heat-farm>strong{font-size:1rem}
:root[data-text-expanded=yes] .journey-stage{min-height:0;padding-block:2rem}
:root[data-text-expanded=yes] .journey-detail{grid-template-rows:1fr!important;opacity:1!important}
:root[data-reduced=yes] *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
:root[data-reduced=yes]::view-transition-old(root),:root[data-reduced=yes]::view-transition-new(root){animation:none!important}
:root[data-reduced=yes] body{opacity:1!important}
@media(prefers-reduced-motion:reduce){@view-transition{navigation:none}::view-transition-old(root),::view-transition-new(root){animation:none}.intro-screen{display:none}body{opacity:1!important}}

/* Loading photos occupy the product column, separated from desktop copy. */
@media(min-width:1001px) and (min-height:700px){
 :root:not([data-text-expanded=yes]) .story:not([data-tall=yes]) .poster{inset:0 0 14% 40%}
 :root:not([data-text-expanded=yes]) .story:not([data-tall=yes]) .poster img{width:96%;height:90%;margin:0;object-fit:contain}
}
html:not(.js) .story,.story[data-load=fallback]{height:auto}
html:not(.js) .story .stage,.story[data-load=fallback] .stage{position:relative;top:0;min-height:0;height:auto;display:grid;grid-template-rows:auto auto auto}
html:not(.js) .story .chapter-copy,.story[data-load=fallback] .chapter-copy{position:relative;inset:auto;grid-row:1;width:auto;max-width:none;padding:24px var(--gutter)}
html:not(.js) .story .scene,.story[data-load=fallback] .scene{position:relative;inset:auto;grid-row:2;height:45svh;min-height:250px}
html:not(.js) .story .stage-bottom,.story[data-load=fallback] .stage-bottom{position:relative;inset:auto;grid-row:3;padding:12px var(--gutter)}
html:not(.js) .story .poster,.story[data-load=fallback] .poster{inset:0!important}
