@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jbmono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --cream: #fbf3e6;
  --cream-2: rgba(251, 243, 230, .72);
  --lamp: #ffcf8a;          /* the one accent: headlamp gold */
  --night: #0b0e28;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { background: #090d26; scroll-snap-type: y mandatory; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--cream); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 6px; }
svg { display: block; }

/* ================= scenes ================= */
.scene {
  /* exactly one (small) viewport tall: under mandatory snapping a taller scene would trap its own content */
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  scroll-snap-align: start; scroll-snap-stop: always; isolation: isolate; contain: paint; --p: 0;
}
.ink-light { --ink: var(--cream); --ink-2: var(--cream-2); }
.ink-dark { --ink: #1b1a17; --ink-2: rgba(27, 26, 23, .68); }
.sky { position: absolute; inset: 0; background: var(--sky); }
.land { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lay { transform: translate3d(calc(var(--mx, 0) * (70 - var(--k)) * -.22px), calc(var(--p) * (70 - var(--k)) * 1.5px), 0); will-change: transform; }
.fog { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(to bottom, transparent, rgba(6, 8, 24, .5)); pointer-events: none; }
.scene:not(.live) *, .scene:not(.live) *::before, .scene:not(.live) *::after { animation-play-state: paused !important; }

/* sun and moon breathe: four seconds in, six out */
.orb {
  position: absolute; width: calc(var(--r) * 200vmin); aspect-ratio: 1; border-radius: 50%;
  translate: -50% calc(-50% + var(--p) * 70px);
  background: radial-gradient(circle, var(--c) 0 9%, color-mix(in srgb, var(--c) 62%, transparent) 17%, color-mix(in srgb, var(--c) 22%, transparent) 36%, transparent 68%);
  animation: breathe 10s ease-in-out infinite;
}
.orb.moon { background: radial-gradient(circle, var(--c) 0 21%, color-mix(in srgb, var(--c) 26%, transparent) 23%, color-mix(in srgb, var(--c) 9%, transparent) 46%, transparent 70%); }
.orb.sunrise { animation: breathe 10s ease-in-out infinite, sunrise 6s var(--ease) both; }
@keyframes breathe { 0%, 100% { scale: 1; opacity: .9; } 40% { scale: 1.07; opacity: 1; } }
@keyframes sunrise { from { translate: -50% calc(-50% + 34vh); } }

.mist {
  position: absolute; left: -30%; width: 160%; height: 22%; top: 50%; pointer-events: none; opacity: .62;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, color-mix(in srgb, var(--mist) 62%, transparent), transparent 70%);
  animation: drift 64s ease-in-out infinite alternate;
}
.mist.m2 { top: 63%; opacity: .5; animation-duration: 88s; animation-direction: alternate-reverse; }
.mist.m3 { top: 74%; opacity: .45; animation-duration: 52s; }
.mist-heavy .mist { opacity: .9; height: 30%; }
@keyframes drift { from { transform: translateX(-9%); } to { transform: translateX(9%); } }

/* ---- the trail and its light ---- */
.route { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 1.6; stroke-dasharray: 1.5 7; stroke-linecap: round; }
.ink-dark .route { stroke: rgba(255, 250, 235, .55); }
.lit, .lit-glow { fill: none; stroke: #ffe4b3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lit { stroke-width: 2.8; }
.lit-glow { stroke-width: 11; opacity: .22; }
.lamp .core { fill: #fff8e4; }
.lamp .halo, .you .halo { fill: rgba(255, 214, 140, .42); transform-box: fill-box; transform-origin: center; animation: pulse 3.2s ease-out infinite; }
.you .core { fill: #fff8e4; }
@keyframes pulse { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.summit .pole { stroke: rgba(255, 255, 255, .75); stroke-width: 1.5; fill: none; }
.summit .pennant { fill: rgba(255, 255, 255, .6); transform-box: fill-box; transform-origin: 0 50%; animation: wave 2.4s ease-in-out infinite; }
.at-summit .summit .pennant { fill: var(--lamp); }
@keyframes wave { 0%, 100% { transform: skewY(-5deg) scaleX(1); } 50% { transform: skewY(7deg) scaleX(.9); } }

/* ---- weather ---- */
.tw { animation: tw var(--du) ease-in-out var(--dl) infinite; }
@keyframes tw { 50% { opacity: .12; } }
.flag { transform-box: fill-box; transform-origin: 50% 0; animation: flap 2.6s ease-in-out var(--dl) infinite; }
@keyframes flap { 0%, 100% { transform: skewX(-9deg); } 50% { transform: skewX(11deg) scaleY(.9); } }
.plume circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: puff 12s linear infinite; }
.plume circle:nth-child(2) { animation-delay: -2.4s; } .plume circle:nth-child(3) { animation-delay: -4.8s; } .plume circle:nth-child(4) { animation-delay: -7.2s; } .plume circle:nth-child(5) { animation-delay: -9.6s; }
@keyframes puff { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 14% { opacity: .85; } 100% { transform: translate(150px, -210px) scale(3.4); opacity: 0; } }
.glint { opacity: 0; animation: glint 8s ease-in-out var(--dl) infinite; }
@keyframes glint { 0%, 100% { opacity: 0; transform: translateX(-14px); } 50% { opacity: .65; transform: translateX(14px); } }
.grass { fill: none; stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; animation: sway 7s ease-in-out infinite alternate; }
.grass.g1 { animation-delay: -2.4s; animation-duration: 9s; } .grass.g2 { animation-delay: -4.6s; animation-duration: 6s; }
@keyframes sway { from { transform: skewX(-3.5deg); } to { transform: skewX(4.5deg); } }

.parts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pt { position: absolute; left: var(--x); top: var(--y); animation: none var(--du) linear var(--dl) infinite; }
.lantern { top: auto; bottom: -3%; width: calc(9px * var(--s)); height: calc(12px * var(--s)); border-radius: 3px 3px 5px 5px; background: linear-gradient(#fff0bd, #ff9a48); box-shadow: 0 0 14px 3px rgba(255, 168, 80, .55); animation-name: lantern; animation-duration: calc(var(--du) * 1.7); }
@keyframes lantern { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; } 75% { opacity: .85; } 100% { transform: translate(var(--dx), -108vh); opacity: 0; } }
.leaf { top: -4%; width: calc(9px * var(--s)); aspect-ratio: 1; background: #c8432b; border-radius: 0 80% 0 80%; animation-name: leaf; }
.leaf:nth-child(3n) { background: #e58a35; } .leaf:nth-child(3n+1) { background: #a8301f; }
@keyframes leaf { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--dx), 110vh) rotate(560deg); } }
.firefly { top: calc(48% + var(--y) * .45); width: 4px; aspect-ratio: 1; border-radius: 50%; background: #f8ffb8; box-shadow: 0 0 10px 3px rgba(226, 255, 140, .55); animation: wander var(--du) ease-in-out var(--dl) infinite alternate, blink 4.2s ease-in-out var(--dl) infinite; }
@keyframes wander { to { transform: translate(var(--dx), -70px); } }
@keyframes blink { 0%, 100% { opacity: .05; } 50% { opacity: 1; } }
.snow { width: calc(3px * var(--s)); aspect-ratio: 1; border-radius: 50%; background: #fff; top: calc(var(--y) * .6); animation-name: snow; }
@keyframes snow { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(calc(-28vw + var(--dx)), 34vh); opacity: 0; } }
.bird { position: absolute; left: -6%; top: var(--y); width: 20px; height: 8px; scale: var(--s, 1); color: #1f4f37; animation: cross 52s linear var(--dl) infinite; }
.bird::before, .bird::after { content: ""; position: absolute; top: 0; width: 11px; height: 9px; border-top: 1.6px solid currentColor; border-radius: 50%; animation: flapw 1.1s ease-in-out infinite alternate; }
.bird::before { left: 0; transform-origin: 100% 0; } .bird::after { right: 0; transform-origin: 0 0; animation-direction: alternate-reverse; }
@keyframes cross { to { transform: translate(118vw, -6vh); } }
@keyframes flapw { from { rotate: -14deg; } to { rotate: 16deg; } }

/* ================= words ================= */
.copy {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; color: var(--ink);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(30px + env(safe-area-inset-top)) clamp(22px, 6vw, 88px) calc(98px + env(safe-area-inset-bottom));
}
.copy a, .copy button { pointer-events: auto; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.eyebrow i, .place i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; display: inline-block; vertical-align: middle; margin: 0 2px; }
.copy h2 { font: 380 clamp(40px, 7.4vw, 96px)/.96 var(--serif); letter-spacing: -.035em; margin: 16px 0 12px; font-variation-settings: "opsz" 144; text-wrap: balance; }
.place { font-size: 15px; color: var(--ink-2); }
.count { align-self: start; margin-top: clamp(14px, 5vh, 56px); display: flex; align-items: baseline; gap: 14px; }
.count .n { font: 280 clamp(104px, 23vw, 250px)/.8 var(--serif); letter-spacing: -.065em; font-variation-settings: "opsz" 144; font-variant-numeric: tabular-nums; }
.count .n.word { font-style: italic; letter-spacing: -.04em; }
.count .u { font: italic 400 clamp(20px, 3.1vw, 34px)/1.1 var(--serif); }
.count .u small { display: block; margin-top: 10px; font: 500 11px/1.4 var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.scene footer { color: var(--cream); }
.line { margin: 0 0 16px; max-width: 24ch; font: italic 400 clamp(18px, 2.3vw, 24px)/1.3 var(--serif); text-wrap: balance; text-shadow: 0 1px 18px rgba(0, 0, 0, .35); }

.glass { background: rgba(16, 18, 44, .34); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .2); color: var(--cream); }
.bar { display: inline-flex; align-items: center; gap: 20px; padding: 9px 9px 9px 22px; border-radius: 999px; text-decoration: none; transition: transform .3s var(--ease), background .3s; }
.bar:hover { transform: translateY(-2px); background: rgba(16, 18, 44, .5); }
.bar span { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2); white-space: nowrap; }
.bar span b { font: 400 21px/1 var(--serif); letter-spacing: -.02em; text-transform: none; color: var(--cream); margin-right: 5px; }
.bar em { font: 600 12px/1 var(--sans); font-style: normal; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 16px; border-radius: 999px; background: var(--lamp); color: #1a1230; }
.bar em svg, .go svg, #sheet-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar.solid { display: flex; justify-content: space-between; margin-top: 26px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.bar.solid span, a.bar.glass span { font: 500 14px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--cream); }
.bar.solid em, a.bar.glass em { width: 38px; padding: 0; justify-content: center; }

/* entrances */
.ready .rise { opacity: 0; transform: translateY(22px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
.ready .seen .rise { opacity: 1; transform: none; }
.seen header .rise:nth-child(2) { transition-delay: .12s; } .seen header .rise:nth-child(3) { transition-delay: .22s; }
.seen .count.rise, .seen .whole.rise { transition-delay: .34s; } .seen .everest.rise { transition-delay: .5s; }
.seen footer .rise { transition-delay: .55s; } .seen footer .rise + .rise { transition-delay: .68s; }

/* opening and ending */
.copy.center { text-align: center; justify-items: center; }
.copy.center .count { flex-direction: column; align-items: center; gap: 8px; margin-top: clamp(30px, 11vh, 120px); }
.copy.center .count .n { font-size: clamp(128px, 30vw, 300px); }
.opening .count .u { font-size: clamp(21px, 3vw, 32px); }
.rg { cursor: pointer; }
.rg-name { font: 500 12px var(--mono); letter-spacing: .08em; fill: rgba(251, 243, 230, .62); }
.rg-name.next { fill: var(--lamp); }
.scroll { width: 1px; height: 46px; background: rgba(251, 243, 230, .3); position: relative; overflow: hidden; }
.scroll span { position: absolute; left: 0; top: 0; width: 1px; height: 16px; background: var(--cream); animation: fall 2.4s var(--ease) infinite; }
@keyframes fall { from { transform: translateY(-16px); } to { transform: translateY(46px); } }
.whole { align-self: center; display: flex; gap: clamp(20px, 7vw, 90px); align-items: flex-end; }
.whole b { display: block; font: 280 clamp(46px, 10vw, 120px)/.9 var(--serif); letter-spacing: -.05em; font-variation-settings: "opsz" 144; }
.whole span { display: block; margin-top: 12px; font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2); }
.everest { margin: 0 0 clamp(20px, 5vh, 50px); color: var(--cream); }
.everest svg { width: 150px; margin: 0 auto; overflow: visible; }
.everest .fill { fill: var(--lamp); opacity: .9; transform-box: fill-box; transform: translateY(100%); transition: transform 3s var(--ease) .8s; }
.seen .everest .fill { transform: none; }
.everest p { margin: 14px 0 0; font: italic 400 16px/1.3 var(--serif); color: var(--cream-2); }
.fine { margin: 16px 0 0; font-size: 12px; color: var(--cream-2); max-width: 44ch; }

/* ================= fixed furniture ================= */
.mark { position: fixed; z-index: 20; top: calc(26px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font: 500 13px/1 var(--serif); letter-spacing: .02em; color: var(--cream-2); opacity: 0; transition: opacity .6s; pointer-events: none; }
.at-top .mark { opacity: 0; }

#spine { position: fixed; z-index: 20; right: calc(12px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
#spine a { position: relative; width: 22px; height: 22px; display: grid; place-items: center; text-decoration: none; }
#spine a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.3px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(10, 10, 30, .22); transition: transform .4s var(--ease), background .4s; }
#spine a.past::before { background: rgba(255, 255, 255, .85); }
#spine a.on::before { transform: scale(1.9); background: var(--lamp); border-color: var(--lamp); }
#spine a span { position: absolute; right: 26px; white-space: nowrap; font: 500 11px/1 var(--mono); letter-spacing: .08em; color: var(--cream); background: rgba(16, 18, 44, .6); padding: 6px 9px; border-radius: 999px; opacity: 0; transform: translateX(6px); transition: .25s; pointer-events: none; }
@media (hover: hover) { #spine a:hover span { opacity: 1; transform: none; } }

#pill {
  position: fixed; z-index: 30; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 11px; max-width: min(calc(100vw - 32px), 520px); padding: 14px 20px 14px 16px; border-radius: 999px;
  font: 500 14px/1.2 var(--sans); box-shadow: 0 14px 40px -14px rgba(0, 0, 0, .6); transition: transform .5s var(--ease), opacity .4s;
}
#pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pill em { font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: .06em; color: var(--cream-2); white-space: nowrap; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp); position: relative; }
.dot.soon::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: var(--lamp); opacity: .5; animation: pulse 2.6s ease-out infinite; }
.dot.calm { background: #9be3a5; }
.sheet-open #pill { transform: translate(-50%, 160%); opacity: 0; }

#scrim { position: fixed; inset: 0; z-index: 40; background: rgba(4, 6, 22, .5); opacity: 0; pointer-events: none; transition: opacity .5s; }
.sheet-open #scrim { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: 88vh; height: 88svh; border-radius: 28px 28px 0 0;
  background: rgba(17, 19, 46, .88); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .12); border-bottom: 0; color: var(--cream);
  transform: translateY(104%); transition: transform .7s var(--ease); visibility: hidden;
}
.sheet-open #sheet { transform: none; visibility: visible; }
#sheet[aria-hidden="true"] { transition: transform .5s var(--ease), visibility 0s .5s; }
.grab { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); margin: 10px auto 0; }
#sheet-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .09); z-index: 2; }
#sheet-body { height: calc(100% - 14px); overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(22px, 5vw, 34px) calc(40px + env(safe-area-inset-bottom)); scrollbar-width: none; }
#sheet-body::-webkit-scrollbar { display: none; }
.sheet-head { padding-right: 44px; }
.sheet-head .eyebrow { color: var(--lamp); }
.sheet-head h3 { font: 380 clamp(32px, 5vw, 40px)/1.02 var(--serif); letter-spacing: -.03em; margin: 14px 0 10px; text-wrap: balance; }
.sheet-head .sub { margin: 0; color: var(--cream-2); font-size: 14px; line-height: 1.55; }
.heads { margin: 20px 0 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--lamp); font: italic 400 15.5px/1.45 var(--serif); color: rgba(251, 243, 230, .88); }

.tasks { list-style: none; margin: 18px 0 6px; padding: 0; }
.tasks li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; }
.tasks label { flex: 1; display: flex; gap: 14px; cursor: pointer; min-width: 0; }
.tasks b { display: block; font-weight: 500; font-size: 15px; line-height: 1.35; transition: opacity .4s; }
.tasks small { display: block; margin-top: 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .04em; color: var(--cream-2); }
.tasks small.note { font: 400 13px/1.5 var(--sans); letter-spacing: 0; color: rgba(251, 243, 230, .6); }
.tasks li.done b { opacity: .42; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }
.tasks li.done small { opacity: .5; }
.tick { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); display: grid; place-items: center; cursor: pointer; transition: background .3s, border-color .3s, scale .4s var(--ease); }
.tick:checked { background: var(--lamp); border-color: var(--lamp); scale: 1.08; }
.tick:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #1a1230; border-bottom: 2px solid #1a1230; transform: rotate(-45deg) translate(1px, -1px); }
.go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .09); }

.grp { border-top: 1px solid rgba(255, 255, 255, .1); }
.grp summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 17px 0; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cream); }
.grp summary::-webkit-details-marker { display: none; }
.grp summary::after { content: "+"; margin-left: auto; font: 300 20px/0.5 var(--sans); color: var(--cream-2); transition: rotate .35s var(--ease); }
.grp[open] summary::after { rotate: 45deg; }
.grp summary i { font-style: normal; color: var(--cream-2); }
.grp summary .key { margin-left: 6px; text-transform: none; letter-spacing: .02em; font-size: 10px; color: rgba(251, 243, 230, .5); display: inline-flex; gap: 2px 8px; align-items: center; flex-wrap: wrap; }
.grp .tasks { margin-top: 0; }
.facts { margin: 0 0 18px; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; line-height: 1.45; }
.facts dt { font: 500 11px/1.9 var(--mono); letter-spacing: .06em; color: var(--cream-2); white-space: nowrap; }
.facts dd { margin: 0; color: rgba(251, 243, 230, .92); }
.cf { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; border: 1.3px solid var(--cream); }
.cf.c { background: var(--cream); } .cf.e { opacity: .8; } .cf.u { border-style: dotted; opacity: .5; }
.key .cf { margin-right: 4px; }
.prose { padding-bottom: 16px; font-size: 14.5px; line-height: 1.62; color: rgba(251, 243, 230, .84); }
.prose p { margin: 0 0 10px; } .prose ul { margin: 0; padding-left: 18px; } .prose li { margin-bottom: 6px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.links a { font-size: 13px; text-decoration: none; padding: 8px 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
#sheet .fine { margin-top: 14px; }


/* ================= the training home ================= */
/* gold stars: one for every session logged, kept in the home sky */
.gold-stars { position: absolute; inset: 0 0 40% 0; pointer-events: none; }
.gs { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffe6b8; box-shadow: 0 0 6px 2px rgba(255, 207, 138, .55); translate: -50% -50%; animation: tw 7s ease-in-out var(--dl) infinite; }
.gs.pending { opacity: 0; animation: none; }
.gs.new, .gs.arrived { animation: starborn 1.8s var(--ease) both, tw 7s ease-in-out 1.8s infinite; }
@keyframes starborn { 0% { scale: 3.2; opacity: 0; } 25% { opacity: 1; } 100% { scale: 1; opacity: 1; } }
.riser { position: fixed; z-index: 60; width: 10px; height: 10px; border-radius: 50%; background: #fff6df; box-shadow: 0 0 16px 6px rgba(255, 207, 138, .7); pointer-events: none; }

.opening .copy { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.opening .copy.center .count { margin-top: clamp(18px, 6vh, 90px); }
#top footer { width: 100%; display: grid; justify-items: center; }
#today { width: min(100%, 400px); display: grid; gap: 14px; text-align: left; }
.today { border-radius: 24px; padding: 18px 20px 16px; box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .7); }
.today.enter { animation: cardin .7s var(--ease) both; }
@keyframes cardin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.today .eyebrow { color: var(--lamp); font-size: 10px; }
.today h3 { margin: 10px 0 6px; font: 400 26px/1.08 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.today .why { margin: 0; font: italic 400 15px/1.35 var(--serif); color: var(--cream-2); text-wrap: pretty; }
.acts { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.go-btn { height: 44px; padding: 0 26px; border-radius: 999px; background: var(--lamp); color: #1a1230; font: 600 14px/1 var(--sans); letter-spacing: .01em; box-shadow: 0 0 0 0 rgba(255, 207, 138, .5); transition: transform .3s var(--ease), box-shadow .5s; }
.go-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(255, 207, 138, .14); }
.go-btn:active { transform: scale(.96); }
.soft { font: 500 12px/1 var(--sans); color: var(--cream-2); text-decoration: underline; text-decoration-color: rgba(251, 243, 230, .3); text-underline-offset: 4px; padding: 8px 0; }
.soft:hover { color: var(--cream); }

/* after Done: optional, saved on every tap, closes by itself */
.today.flow { display: grid; gap: 12px; }
.today.flow .eyebrow { margin-bottom: 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lab { font: italic 400 16px/1.2 var(--serif); }
.feel { display: flex; gap: 8px; }
.feel button { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); transition: background .3s, border-color .3s, scale .3s var(--ease); }
.feel button:nth-child(1) { width: 16px; height: 16px; } .feel button:nth-child(2) { width: 18px; height: 18px; } .feel button:nth-child(3) { width: 20px; height: 20px; } .feel button:nth-child(5) { width: 24px; height: 24px; }
.feel { align-items: center; }
.feel button.on { background: var(--lamp); border-color: var(--lamp); }
.mins { display: inline-flex; align-items: baseline; gap: 4px; }
.mins b { font: 400 24px/1 var(--serif); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.mins small { font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream-2); margin-right: 6px; }
.mins button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); font: 400 17px/1 var(--sans); align-self: center; }
.hurt { font: 500 12px/1 var(--sans); padding: 9px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); color: var(--cream-2); transition: background .3s, color .3s; }
.hurt.on { background: rgba(255, 255, 255, .16); color: var(--cream); border-color: rgba(255, 255, 255, .4); }
.pain { padding: 2px 0 0 12px; border-left: 2px solid var(--lamp); font-size: 13px; line-height: 1.45; color: rgba(251, 243, 230, .85); animation: cardin .5s var(--ease) both; }
.pain p { margin: 0 0 6px; }
.today .close { justify-self: end; padding: 2px 0 0; }

.below { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.stones { display: flex; gap: 14px; padding: 6px 4px; }
.stone { display: grid; justify-items: center; gap: 6px; font-style: normal; }
.stone b { width: 11px; height: 11px; border-radius: 50%; border: 1.4px solid rgba(255, 255, 255, .55); position: relative; }
.stone small { font: 500 9px/1 var(--mono); letter-spacing: .08em; color: var(--cream-2); }
.stone.lit b { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 10px 1px rgba(255, 207, 138, .55); }
.stone.now b { border-color: var(--lamp); }
.stone.now b::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: var(--lamp); opacity: .5; animation: pulse 2.6s ease-out infinite; }
.stone.past b { opacity: .3; }
.stone.past small { opacity: .5; }
.step { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2); }
.step b { font: 400 15px/1 var(--serif); letter-spacing: 0; color: var(--cream); display: inline-block; }
.step.bump b { animation: bump .9s var(--ease) .9s both; }
@keyframes bump { 40% { transform: translateY(-4px); color: var(--lamp); } }
.at-top #pill { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }

/* ================= the Ascent ================= */
.dawn { position: absolute; inset: 0; opacity: var(--dawn, .1); background: linear-gradient(to top, rgba(255, 176, 128, .95) 18%, rgba(214, 112, 140, .6) 42%, rgba(90, 60, 130, .2) 70%, rgba(40, 30, 90, 0) 88%); }
.asc-sun { left: 18%; top: calc(80% - var(--sun, 0) * 34%); opacity: calc(var(--sun, 0) * 1.2); }
.ascent.wide .asc-sun { left: 36%; }
.camp path { fill: rgba(30, 30, 70, .9); stroke: rgba(255, 255, 255, .55); stroke-width: 1.3; stroke-linejoin: round; }
.camp .door { stroke-width: 1; }
.camp.reached path { fill: var(--lamp); stroke: #fff2d8; }
.camp .ring { fill: none; stroke: var(--lamp); stroke-width: 1.2; opacity: .8; }
.camp, .rflag { cursor: pointer; }
.hit { fill: transparent; }
.rflag .pole { stroke: rgba(255, 255, 255, .75); stroke-width: 1.3; }
.rflag .pennant { fill: rgba(255, 255, 255, .7); }
.rflag.gold .pennant { fill: var(--lamp); }
.cp path { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 1.3; }
.cp.reached path { fill: rgba(255, 255, 255, .7); }
.quiet { display: flex; gap: clamp(22px, 6vw, 56px); align-items: flex-end; }
.quiet b { display: block; font: 300 clamp(34px, 6vw, 60px)/.9 var(--serif); letter-spacing: -.04em; font-variation-settings: "opsz" 144; font-variant-numeric: tabular-nums; }
.quiet span { display: block; margin-top: 10px; font: 500 10px/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2); max-width: 12ch; }
.ascent .copy h2 { font-size: clamp(38px, 6vw, 80px); }

/* ================= race scenes fill as the block is trained ================= */
.born { position: absolute; inset: 0; animation: born 2.6s var(--ease) .5s both; }
g.born { position: static; transform-box: view-box; }
@keyframes born { from { opacity: 0; } }
g.born.grow { transform-origin: 50% 100%; animation-name: grow; }
@keyframes grow { from { opacity: 0; transform: scaleY(.2); } }
.ash { width: calc(3px * var(--s)); aspect-ratio: 1; border-radius: 50%; background: #7a5a46; top: calc(var(--y) * .55); animation-name: snow; animation-duration: calc(var(--du) * 1.4); opacity: .7; }
.summited .summit .pennant { fill: var(--lamp); }
.howwas { pointer-events: auto; max-width: 400px; margin: 0 0 16px; padding: 16px 18px; border-radius: 22px; display: grid; gap: 12px; }
.howwas .eyebrow { color: var(--lamp); }
.hw-row { display: flex; gap: 10px; }
.hw-row input { min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: var(--cream); font: 400 15px/1 var(--sans); }
.hw-row input::placeholder { color: rgba(251, 243, 230, .45); }
.hw-row input[name="t"] { width: 84px; flex: none; font-family: var(--serif); font-size: 18px; text-align: center; }
.hw-row input[name="n"] { flex: 1; }
.howwas .acts { margin-top: 0; }
.copy input, .copy form { pointer-events: auto; }

/* the year, whole: training beside the races */
.whole-wrap { align-self: center; display: grid; gap: clamp(22px, 5vh, 44px); justify-items: center; }
.whole.train b { font-size: clamp(30px, 5.4vw, 60px); color: var(--cream-2); }
.whole.train em { display: block; margin-top: 6px; font-style: normal; color: var(--lamp); }

/* the week sheet */
.sessions li.lit b { opacity: 1; text-decoration: none; }
.sessions li.lit small { opacity: 1; }
.sessions li.past:not(.lit) { opacity: .5; }
.sessions li.today b::after { content: " · today"; font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lamp); }
.tick:disabled { opacity: .35; cursor: default; }
.kept { margin: 18px 0 4px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2); }
.kept b { font: 400 22px/1 var(--serif); letter-spacing: 0; color: var(--cream); margin-right: 4px; }
.wk-nav { display: flex; justify-content: space-between; padding: 22px 0 6px; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 6px; }
.wk-nav button { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--sans); padding: 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.wk-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the quiet hop between the journey and the Ascent ---- */
.hop { position: fixed; z-index: 25; top: calc(18px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 11px; border-radius: 999px; text-decoration: none; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-2); background: rgba(16, 18, 44, .24); transition: color .3s, background .3s, transform .3s var(--ease); }
.hop:hover { color: var(--cream); background: rgba(16, 18, 44, .45); transform: translateY(-1px); }
.hop svg { width: 13px; height: 13px; fill: none; stroke: var(--lamp); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.hop.back { right: auto; left: calc(14px + env(safe-area-inset-left)); }
.sheet-open .hop { opacity: 0; pointer-events: none; }
a.step { text-decoration: none; padding: 8px 0; }
a.step:hover b { color: var(--lamp); }
.page-ascent .copy { padding-top: calc(74px + env(safe-area-inset-top)); padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
.page-ascent .scene { scroll-snap-align: none; }
html:has(.page-ascent) { scroll-snap-type: none; }

/* ---- moving between pages: a disc of the next page's sky, then that page uncovers ---- */
.veil { position: fixed; z-index: 100; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%) scale(0); will-change: transform; }
html.arriving::after { content: ""; position: fixed; inset: 0; z-index: 100; background: var(--arrive-c, #05081f); opacity: var(--cover, 1); pointer-events: none; }
/* during the Ascent's arrival the lamp travels without its pulse; the slow halo fades back in after */
.halo-w { transition: opacity 1.2s var(--ease); }
.asc-arriving .halo-w { opacity: 0; transition: none; }
.asc-arriving .quiet { transition: none; }

/* ---- the reader's view and the owner's door ---- */
.seen-dot { flex: none; width: 8px; height: 8px; margin: 7px 8px 0; border-radius: 50%; border: 1.3px solid rgba(255, 255, 255, .32); }
.seen-dot.on { background: var(--lamp); border-color: var(--lamp); box-shadow: 0 0 8px 1px rgba(255, 207, 138, .45); }
.tasks label:not(:has(input)) { cursor: default; }
.auth-spot { pointer-events: auto; }
.auth-spot .auth { margin-top: 10px; font-size: 12px; }
.signin { display: grid; gap: 10px; margin-top: 24px; }
.signin input[type=password] { height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: var(--cream); font: 400 16px/1 var(--sans); }
.signin input[type=password]:focus { outline: none; border-color: var(--lamp); }
.signin .say { margin: 0; min-height: 20px; font: italic 400 14px/1.4 var(--serif); color: var(--cream-2); }
.signin .go-btn { justify-self: start; }
.signin .go-btn:disabled { opacity: .6; }

/* ---- home: two quiet controls; About only while home is in view ---- */
/* side by side above every scene; on a phone's home they stack, clear of the centred greeting */
.hops { position: fixed; z-index: 25; top: calc(18px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); display: flex; flex-direction: row; align-items: flex-start; gap: 8px; }
@media (max-width: 899px) { .at-top .hops { flex-direction: column-reverse; align-items: flex-end; } }
.hops .hop { position: static; }
.sheet-open .hops { opacity: 0; pointer-events: none; }

/* ================= About: the year as one climb ================= */
html:has(.page-about) { scroll-snap-type: none; }
.page-about { background: #090d26; }
.ab-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ab-band { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); --p: 0; }
.ab-band.on { opacity: 1; }
.ab-band:not(.on) *, .ab-band:not(.on) *::before, .ab-band:not(.on) *::after { animation-play-state: paused !important; }
.ab-land { position: absolute; inset: -2% 0 0; transform: translate3d(0, calc(var(--climb, 0) * 22vh), 0); will-change: transform; }
.ab-band .route, .ab-band .lit, .ab-band .lit-glow, .ab-band .lamp, .ab-band .summit { display: none; }
.ab-veil { position: absolute; inset: 0; background: radial-gradient(ellipse 100% 60% at 50% 48%, rgba(6, 8, 24, .5), rgba(6, 8, 24, .3)); }
/* words pass under the Home control into a soft night fade rather than colliding with it */
.page-about::after { content: ""; position: fixed; z-index: 2; left: 0; right: 0; top: 0; height: calc(100px + env(safe-area-inset-top)); background: linear-gradient(rgba(6, 8, 24, .9) 35%, rgba(6, 8, 24, 0)); pointer-events: none; }
.ab-page { position: relative; z-index: 1; color: var(--cream); text-align: center; }
.ab-sec { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 16vh clamp(24px, 7vw, 96px); }
.ab-sec.ab-trail, .ab-sec.ab-train { min-height: 0; padding-top: 14vh; padding-bottom: 14vh; }
.ab-top .eyebrow { color: var(--lamp); }
.ab-title { margin: 0; font: 300 clamp(52px, 11vw, 132px)/.94 var(--serif); letter-spacing: -.045em; font-variation-settings: "opsz" 144; text-wrap: balance; }
.ab-top .scroll { margin-top: 6vh; }
.ab-big, .ab-img, .ab-mid { margin: 0; text-shadow: 0 2px 24px rgba(4, 6, 20, .55); text-wrap: balance; }
.ab-big { max-width: 17ch; font: 340 clamp(32px, 6.2vw, 64px)/1.14 var(--serif); letter-spacing: -.02em; }
.ab-img { font: italic 300 clamp(44px, 10vw, 112px)/1 var(--serif); letter-spacing: -.035em; }
.ab-mid { max-width: 20ch; font: 360 clamp(26px, 4.4vw, 44px)/1.2 var(--serif); letter-spacing: -.015em; }
.ab-mid .ph { display: block; }

/* reveal: one curve, opacity and a small lift, a phrase at a time */
.ph { display: inline-block; }
.page-about .ph, .page-about .ab-reveal { opacity: 0; transform: translateY(10px); transition: opacity 1s var(--ease) calc(var(--i, 0) * 140ms), transform 1s var(--ease) calc(var(--i, 0) * 140ms); }
.page-about .ph.in, .page-about .ab-reveal.in { opacity: 1; transform: none; }

/* the trail of nine */
.ab-profile { width: min(100%, 900px); overflow: visible; }
.ab-line { fill: none; stroke: rgba(251, 243, 230, .55); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease) .2s; }
.ab-profile.in .ab-line { stroke-dashoffset: 0; }
.ab-dot .core { fill: var(--cream); }
.ab-dot.peak .core { fill: var(--lamp); }
.ab-dot.peak .ring { fill: none; stroke: var(--lamp); stroke-width: 1.2; opacity: .7; }
/* sizes in viewBox units: large on a phone where the 900-wide drawing is scaled down */
.ab-dot .core { r: 9px; } .ab-dot.peak .core { r: 13px; } .ab-dot.peak .ring { r: 24px; } .ab-dot .hit { r: 30px; }
.ab-peak { font: 500 26px var(--mono); letter-spacing: .1em; fill: var(--lamp); text-transform: uppercase; }
.ab-moves { display: grid; gap: 34px; width: min(100%, 980px); text-align: left; margin-top: 8px; }
.ab-move .eyebrow { color: var(--cream-2); margin-bottom: 6px; }
.ab-move.summit .eyebrow { color: var(--lamp); }
.ab-move ul { list-style: none; margin: 0; padding: 0; }
.ab-move a { display: block; padding: 9px 0; text-decoration: none; }
.ab-move b { display: block; font: 400 24px/1.15 var(--serif); letter-spacing: -.01em; transition: color .3s; }
.ab-move b em { font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: .12em; color: var(--lamp); margin-left: 10px; vertical-align: 4px; }
.ab-move li.peak b { font-size: 30px; }
.ab-move small { display: block; margin-top: 4px; font: 500 11px/1.5 var(--mono); letter-spacing: .05em; color: var(--cream-2); }
.ab-move a:hover b { color: var(--lamp); }
.ab-train .quiet { justify-content: center; margin-top: 18px; }
.ab-follow { margin-top: 10px; }

@media (min-width: 900px) {
  .hops { top: 24px; right: 22px; }
  .ab-moves { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .ab-dot .core { r: 4.5px; } .ab-dot.peak .core { r: 6.5px; } .ab-dot.peak .ring { r: 13px; } .ab-dot .hit { r: 18px; }
  .ab-peak { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .page-about .ph, .page-about .ab-reveal { opacity: 1; transform: none; } .ab-line { stroke-dashoffset: 0; } }
.still .page-about .ph, .still .page-about .ab-reveal { opacity: 1; transform: none; }
.still .ab-line { stroke-dashoffset: 0; }

/* ================= wider screens ================= */
@media (min-width: 900px) {
  .copy:not(.center) header, .copy:not(.center) footer, .copy:not(.center) .count { max-width: 48%; }
  .count { align-self: center; margin-top: 0; }
  .copy.center .count { align-self: start; }
  #sheet { left: auto; right: 18px; top: 18px; bottom: 18px; height: auto; width: 470px; border-radius: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12); transform: translateX(110%); }
  .grab { display: none; }
  #sheet-body { height: 100%; padding-top: 30px; }
  #spine { right: 22px; gap: 8px; }
  #pill { left: clamp(22px, 6vw, 88px); transform: none; bottom: 28px; }
  .sheet-open #pill { transform: translateY(160%); }
  .copy { padding-bottom: 104px; }
  .at-top #pill { transform: translateY(160%); }
  .opening .copy { padding-bottom: 34px; }
  .hop { top: 24px; right: 22px; }
  .hop.back { left: clamp(22px, 6vw, 88px); }
  .page-ascent .copy { padding-top: 84px; padding-bottom: 60px; }
}
@media (max-width: 899px) {
  .hide-s { display: none; }
  .bar { gap: 16px; }
  .line { font-size: 18px; }
}
@media (max-height: 700px) and (max-width: 899px) {
  .count .n { font-size: 96px; }
  .line { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  html { scroll-behavior: auto; }
}

.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
/* frozen frames show every motif in place rather than at its off-screen start */
.still .lantern, .still .leaf, .still .snow, .still .ash { top: calc(8% + var(--y) * .7); bottom: auto; opacity: .9; }
.still .firefly { opacity: .85; }
.still .bird { left: var(--x, 10%); }
.still .halo, .still .dot.soon::after, .still .stone.now b::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .halo, .dot.soon::after { opacity: 0; } }
