/* Night to Dawn — real photographs of the sky crossfade from midnight to morning as you scroll.
   html.day flips the ink once the sky is bright enough to need dark text. */
:root {
  --ink: #f4f1ff;
  --ink-soft: rgba(244, 241, 255, .8);
  --line: rgba(244, 241, 255, .24);
  --paper: #0a0d22;
  --sun: #ffbf7a;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 16px;
}
html.day {
  --ink: #13203a;
  --ink-soft: rgba(19, 32, 58, .82);
  --line: rgba(19, 32, 58, .2);
  --paper: #f6f8ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-soft) transparent; }
body {
  font-family: var(--body); font-size: clamp(1rem, .95rem + .25vw, 1.125rem); line-height: 1.6;
  color: var(--ink); background: #05060f; transition: color .8s ease;
  -webkit-tap-highlight-color: transparent;
}
html.loading body { overflow: hidden; }
::selection { background: var(--sun); color: #1b1433; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; border-radius: 6px; }
kbd { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 0 .4em; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
h1, h2, h3, .close-big { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }

/* ---------- loading screen ---------- */
.loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: #05060f; color: #f4f1ff; text-align: center;
  transition: opacity .9s var(--ease-out), visibility 0s .9s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 500; letter-spacing: -.02em; }
.loader-track { width: min(260px, 60vw); height: 2px; background: rgba(244, 241, 255, .18); overflow: hidden; border-radius: 2px; }
.loader-track i { display: block; height: 100%; background: #f4f1ff; transform-origin: left; transform: scaleX(0); transition: transform .4s var(--ease-out); }
.loader-text { font-size: .95rem; color: rgba(244, 241, 255, .7); font-variant-numeric: tabular-nums; }
.loader-skip { margin-top: 6px; font-size: .9rem; color: rgba(244, 241, 255, .8); text-decoration: underline; text-underline-offset: .25em; }

/* ---------- the sky ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #05060f; }
.sky-layer { position: absolute; inset: -2%; width: 104%; height: 104%; max-width: none; object-fit: cover; opacity: 0; will-change: opacity; }
.sky-layer:first-child { opacity: 1; }
/* Vanta fog renders on black; screen blending drops the black so only the glowing mist shows */
.mist { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.mist canvas { width: 100% !important; height: 100% !important; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* blur-text words keep their own line breaks and spacing */
.w { display: inline-block; }

.sky-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 4, 12, .62), rgba(3, 4, 12, .38) 40%, rgba(3, 4, 12, .6)); transition: background .8s ease; }
html.day .sky-scrim { background: linear-gradient(180deg, rgba(246, 248, 255, .35), rgba(246, 248, 255, .15) 50%, rgba(246, 248, 255, .45)); }

/* ---------- chrome ---------- */
.quick-exit {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 100;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  background: #e8455f; color: #fff; font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(120, 10, 40, .6); transition: transform .16s var(--ease-out);
}
.quick-exit svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.quick-exit:active { transform: scale(.97); }

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 24px;
  padding: 16px var(--gutter); transition: transform .4s var(--ease-out), background-color .4s ease;
}
.bar.solid { background: color-mix(in srgb, var(--paper) 72%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.bar.tucked { transform: translateY(-110%); }
.mark { font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.bar ul { list-style: none; display: flex; gap: 26px; }
.bar ul a { text-decoration: none; color: var(--ink-soft); transition: color .2s ease; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: .9rem; white-space: nowrap; transition: background-color .2s ease, transform .16s var(--ease-out); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pill:active { transform: scale(.97); }
.menu { display: none; }
@media (hover: hover) and (pointer: fine) {
  .bar ul a:hover { color: var(--ink); }
  .pill:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px;
  border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--sun); color: #1b1433; }
  .btn-line:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
}

/* ---------- pinned intro: full-screen photo → grid ---------- */
.intro { position: relative; height: 100svh; overflow: hidden; }
.mosaic {
  position: absolute; inset: 84px var(--gutter) clamp(20px, 4vh, 40px);
  display: grid; gap: clamp(8px, 1.2vw, 16px);
  grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-template-areas: "a hero hero b" "c hero hero d" "e f cap cap";
}
.tile { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.t-hero { grid-area: hero; } .t-a { grid-area: a; } .t-b { grid-area: b; } .t-c { grid-area: c; }
.t-d { grid-area: d; } .t-e { grid-area: e; } .t-f { grid-area: f; }
.t-cap { grid-area: cap; display: flex; align-items: center; padding: 0 clamp(4px, 1.5vw, 24px); }
.t-cap p { font-family: var(--display); font-weight: 400; font-size: clamp(1.05rem, .8rem + 1vw, 1.6rem); line-height: 1.3; letter-spacing: -.01em; text-wrap: pretty; }
.hero-shot { position: absolute; inset: 0; overflow: hidden; will-change: clip-path, opacity; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 60%; }
.hero-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 15, .2) 30%, rgba(5, 6, 15, .75)); }
.hero-copy {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(36px, 9vh, 96px); max-width: 44rem;
  color: #f4f1ff; will-change: transform, opacity;
}
.hero-copy h1 { font-size: clamp(3rem, 1rem + 8vw, 7.5rem); line-height: .92; font-weight: 600; letter-spacing: -.045em; margin-bottom: 22px; }
.hero-copy > p { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: rgba(244, 241, 255, .85); max-width: 36rem; margin-bottom: 28px; }
.hero-copy .btn-solid { background: #f4f1ff; color: #0a0d22; }
.hero-copy .btn-line { box-shadow: inset 0 0 0 1.5px #f4f1ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-cue { margin-top: 30px; font-size: .85rem; letter-spacing: .04em; color: rgba(244, 241, 255, .65); }

/* ---------- chapters ---------- */
.chapter { padding: clamp(110px, 16vh, 180px) var(--gutter); max-width: 1240px; margin: 0 auto; }
.chapter-head { max-width: 46rem; margin-bottom: clamp(36px, 6vh, 64px); }
.chapter-head h2 { font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.6rem); line-height: 1; margin-bottom: 18px; }
.chapter-head p { color: var(--ink-soft); max-width: 38rem; font-size: 1.1em; }
.js .reveal { opacity: 0; transform: translateY(24px); }

/* full-bleed nature photographs between chapters, drifting slowly as you scroll */
.band { position: relative; height: clamp(320px, 70vh, 720px); overflow: hidden; margin: 0; }
.band img { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; will-change: transform; }

/* ---------- breathing sunrise ---------- */
.sunrise { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-bottom: clamp(90px, 13vh, 150px); }
.sun-window {
  width: min(340px, 72vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); transform: scale(.82);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1), box-shadow 4s ease;
}
.sun-window img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.8); transition: filter 4s ease; }
.sun-window.in { transform: scale(1); box-shadow: 0 40px 90px -20px rgba(255, 170, 110, .55); }
.sun-window.in img { filter: saturate(1.1) brightness(1.08); }
.sun-window.out, .sun-window.out img { transition-duration: 6s; }
.sun-cue { font-family: var(--display); font-size: 1.4rem; min-height: 1.6em; }

.ground h3 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); margin-bottom: 6px; }
.ground > p { color: var(--ink-soft); margin-bottom: 20px; }
/* the pond: a real photograph of still water, rippled by a height-map simulation */
.pond { position: relative; aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; border-radius: 22px; overflow: hidden; background: #0b1530; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.pond > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pond canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.pond.live canvas { opacity: 1; }
.pond::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3, 6, 20, .55), rgba(3, 6, 20, .05) 45%, rgba(3, 6, 20, .35)); }
.pond-hit { position: absolute; inset: 0; z-index: 2; cursor: pointer; border-radius: inherit; }
.pond-hit:focus-visible { outline-offset: -6px; }
.pond-ui { position: absolute; z-index: 3; left: 0; right: 0; top: clamp(18px, 5%, 40px); text-align: center; color: #f6f3ff; pointer-events: none; padding: 0 16px; transition: opacity .45s ease, filter .45s ease, transform .45s var(--ease-out); }
.pond.fade .pond-ui { opacity: 0; filter: blur(6px); transform: translateY(-6px); }
.pond-step { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.pond-prompt { font-family: var(--display); font-size: clamp(1.4rem, 1rem + 2vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.pond-prompt b { font-weight: 700; }
.pond-dots { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.pond-dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(246, 243, 255, .85); transition: background-color .3s ease, transform .3s var(--ease-out); }
.pond-dots i.on { background: #f6f3ff; transform: scale(1.15); }
.pond-reset { position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 10px 20px; border-radius: 999px; background: rgba(246, 243, 255, .92); color: #0a0d22; font-weight: 600; }

/* ---------- kinds ---------- */
.kinds { border-top: 1px solid var(--line); margin-bottom: clamp(56px, 9vh, 96px); }
.kind { border-bottom: 1px solid var(--line); }
.kind summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(16px, 2.6vh, 26px) 0; }
.kind summary::-webkit-details-marker { display: none; }
.kind-name { font-family: var(--display); font-size: clamp(1.9rem, 1rem + 4vw, 4.2rem); font-weight: 500; letter-spacing: -.035em; line-height: 1; transition: transform .35s var(--ease-out); }
.kind-plus { position: relative; flex: none; width: 26px; height: 26px; }
.kind-plus::before, .kind-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transition: transform .3s var(--ease-out); }
.kind-plus::after { transform: rotate(90deg); }
.kind[open] .kind-plus::after { transform: rotate(0deg); }
.kind p { max-width: 40rem; padding-bottom: 26px; font-size: 1.12em; color: var(--ink-soft); }
.kind[open] p { animation: unfold .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .kind summary:hover .kind-name { transform: translateX(12px); } }
.signs h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); margin-bottom: 14px; }
.signs ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 40px; }
.signs li { padding-left: 20px; position: relative; color: var(--ink-soft); }
.signs li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }

/* ---------- myths ---------- */
.myths { list-style: none; display: grid; gap: 4px; }
.myth { display: grid; grid-template-rows: auto 0fr; transition: grid-template-rows .6s var(--ease-out); }
.myth.struck { grid-template-rows: auto 1fr; }
.truth-wrap { overflow: hidden; }
.myth button { text-align: left; padding: 10px 0; }
.myth-text {
  font-family: var(--display); font-size: clamp(1.5rem, 1rem + 2.4vw, 2.9rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.12;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 2px; transition: background-size .7s var(--ease-io), opacity .5s ease;
}
.myth.struck .myth-text { background-size: 100% 2px; opacity: .55; }
.truth { max-width: 40rem; font-size: 1.12em; padding: 0 0 24px; opacity: 0; transition: opacity .5s ease .2s; }
.myth.struck .truth { opacity: 1; }

/* ---------- helplines ---------- */
.regions { position: relative; display: inline-flex; gap: 2px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 36px; }
.region { position: relative; z-index: 1; padding: 9px 18px; border-radius: 999px; white-space: nowrap; color: var(--ink-soft); transition: color .25s ease; }
.region[aria-selected="true"] { color: var(--paper); font-weight: 600; }
.region-pill { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease-out), width .45s var(--ease-out); }
.lines { border-top: 1px solid var(--line); }
.helpline {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 8px 32px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line); animation: unfold .5s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms);
}
.helpline small { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.helpline h3 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.9rem); line-height: 1.1; font-weight: 500; }
.helpline p { color: var(--ink-soft); }
.reach {
  display: inline-flex; align-items: center; gap: 10px; justify-self: end; min-height: 48px; padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: transform .16s var(--ease-out), background-color .2s ease, color .2s ease;
}
.reach svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.reach:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .reach:hover { background: var(--sun); color: #1b1433; } }
.fine { margin-top: 22px; font-size: .9rem; color: var(--ink-soft); }

/* ---------- support ---------- */
.care { max-width: 52rem; border-top: 1px solid var(--line); }
.care-item { border-bottom: 1px solid var(--line); }
.care-item summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1vw, 1.8rem); font-weight: 500; letter-spacing: -.02em; }
.care-item summary::-webkit-details-marker { display: none; }
.care-item summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-top: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .3s var(--ease-out); }
.care-item[open] summary::after { transform: rotate(-135deg); }
.care-item p { padding-bottom: 24px; max-width: 42rem; color: var(--ink-soft); }
.care-item[open] p { animation: unfold .45s var(--ease-out); }

/* ---------- notes ---------- */
.board { position: relative; height: clamp(360px, 52vh, 500px); border-radius: var(--radius); border: 1px dashed var(--line); touch-action: none; overflow: hidden; }
.note {
  position: absolute; max-width: 220px; padding: 16px 18px; border-radius: 4px; background: #fffdf7; color: #1e2233;
  font-weight: 500; line-height: 1.35; box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 14px 24px -14px rgba(0, 0, 0, .55);
  transform: rotate(var(--r, 0deg)); cursor: grab; user-select: none; touch-action: none; transition: box-shadow .2s ease, transform .2s var(--ease-out);
}
.note.dragging { cursor: grabbing; transform: rotate(0deg) scale(1.04); box-shadow: 0 2px 2px rgba(0, 0, 0, .08), 0 26px 40px -16px rgba(0, 0, 0, .6); z-index: 5; }
.note-form { display: flex; gap: 10px; margin-top: 20px; }
.note-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--paper) 40%, transparent); color: var(--ink); font: inherit; font-size: 16px; }
.note-form input::placeholder { color: var(--ink-soft); }
.note-form input:focus { outline: none; border-color: var(--ink); }

/* ---------- close ---------- */
.close { position: relative; }
.band-close { height: clamp(420px, 85vh, 860px); }
.band-close::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 40, 0) 30%, rgba(10, 20, 40, .7)); }
.close-inner { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(60px, 10vh, 110px); color: #f8f6ff; max-width: 1100px; }
.close-big { font-size: clamp(2.6rem, 1rem + 6.4vw, 6.4rem); line-height: .95; margin-bottom: 28px; }
.close-inner p:not(.close-big) { color: rgba(248, 246, 255, .85); max-width: 38rem; }
.close-inner p + p { margin-top: 6px; }

@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }


/* ---------- where it comes from ---------- */
.roots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-bottom: clamp(56px, 9vh, 96px); }
.root { border-top: 1px solid var(--line); padding-top: 22px; }
.root h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 500; margin-bottom: 10px; }
.root p { color: var(--ink-soft); }
.trauma { max-width: 46rem; }
.trauma h3 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); font-weight: 500; line-height: 1.05; margin-bottom: 18px; }
.trauma p { color: var(--ink-soft); font-size: 1.08em; margin-bottom: 14px; }
.trauma .trauma-kind { color: var(--ink); font-family: var(--display); font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); line-height: 1.3; margin: 26px 0; padding-left: 20px; box-shadow: inset 2px 0 0 var(--sun); }
.source { font-size: .88rem; }

/* ---------- nourishment ---------- */
.no-numbers { margin-top: 14px; font-size: .98em !important; }
.pantry { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.food { padding: 9px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: .95rem; transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out), box-shadow .2s ease; }
.food:active { transform: scale(.96); }
.food[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .food:not([aria-pressed="true"]):hover { box-shadow: inset 0 0 0 1px var(--ink); } }
.food-add { display: flex; gap: 10px; max-width: 34rem; margin-bottom: 28px; }
.food-add input { flex: 1; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--paper) 40%, transparent); color: var(--ink); font: inherit; font-size: 16px; }
.food-add input::placeholder { color: var(--ink-soft); }
.food-add input:focus { outline: none; border-color: var(--ink); }
.plate-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(40px, 7vh, 72px); }
.plate { flex: 1; min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 20px; border: 1px dashed var(--line); }
.plate-empty { color: var(--ink-soft); }
.on-plate { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 16px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 14%, transparent); animation: pop .35s var(--ease-out); }
.on-plate span[aria-hidden] { opacity: .6; }
.nourish-views { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-bottom: 30px; }
.nourish-views h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); font-weight: 500; margin-bottom: 4px; }
.hint { color: var(--ink-soft); font-size: .92rem; margin-bottom: 18px; }
.n-group + .n-group { margin-top: 18px; }
.n-title { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.n-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nut {
  padding: 10px 16px; border-radius: 999px; font-size: .95rem; font-weight: 500; color: var(--ink);
  background: color-mix(in srgb, var(--sun) calc(var(--lvl) * 80%), transparent);
  box-shadow: inset 0 0 0 1px var(--line), 0 0 calc(var(--lvl) * 28px) calc(var(--lvl) * 2px) color-mix(in srgb, var(--sun) calc(var(--lvl) * 90%), transparent);
  opacity: calc(.5 + var(--lvl) * .5); transform: scale(calc(.95 + var(--lvl) * .07));
  transition: background-color .7s var(--ease-out), box-shadow .7s var(--ease-out), opacity .7s ease, transform .7s var(--ease-out), color .7s ease;
}
.nutrient-note, .body-note { margin-top: 18px; min-height: 3.2em; color: var(--ink-soft); }
.nutrient-note b, .body-note b { color: var(--ink); }
.from { display: block; margin-top: 4px; font-size: .92em; }
.body-wrap { position: relative; width: min(260px, 70%); margin: 0 auto; aspect-ratio: 240 / 460; }
.body-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.silhouette { fill: color-mix(in srgb, var(--ink) 8%, transparent); stroke: var(--line); stroke-width: 1.5; }
.spot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; }
.spot::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--sun); opacity: calc(.18 + var(--lvl) * .82); box-shadow: 0 0 calc(var(--lvl) * 26px) calc(var(--lvl) * 8px) color-mix(in srgb, var(--sun) 70%, transparent); transition: opacity .7s ease, box-shadow .7s var(--ease-out); }
.spot span { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 2px); white-space: nowrap; font-size: .72rem; color: var(--ink-soft); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.spot:hover span, .spot:focus-visible span { opacity: 1; }
.spot.thank::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--sun); animation: thank 1.4s var(--ease-out) forwards; }

/* ---------- resources ---------- */
.resources { position: relative; }
.res-nav {
  position: sticky; top: 72px; z-index: 30; display: flex; gap: 4px; width: fit-content; max-width: calc(100% - 2 * var(--gutter)); margin: 0 auto;
  padding: 5px; border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--paper) 70%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line);
}
.res-nav a { padding: 8px 16px; border-radius: 999px; white-space: nowrap; text-decoration: none; color: var(--ink-soft); font-size: .92rem; transition: background-color .3s ease, color .3s ease; }
.res-nav a.here { background: var(--ink); color: var(--paper); }
.resources .chapter { padding-top: clamp(80px, 12vh, 140px); padding-bottom: clamp(40px, 6vh, 70px); }
.step-list, .comm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 22px; }
.step, .comm, .pod {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px; text-decoration: none;
  background: color-mix(in srgb, var(--paper) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .35s var(--ease-out), background-color .3s ease, box-shadow .3s ease;
}
.step h3, .comm h3, .pod h3 { font-size: 1.3rem; font-weight: 500; line-height: 1.15; }
.step p, .comm p, .pod p { color: var(--ink-soft); flex: 1; }
.go { font-size: .9rem; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .step:hover, .comm:hover, .pod:hover { transform: translateY(-4px); background: color-mix(in srgb, var(--paper) 75%, transparent); box-shadow: inset 0 0 0 1px var(--ink); }
}
.shelf {
  display: flex; gap: clamp(18px, 3vw, 36px); overflow-x: auto; padding: 10px var(--gutter) 30px; margin: 0 calc(-1 * var(--gutter));
  scroll-snap-type: x proximity; scrollbar-width: thin; cursor: grab;
}
.shelf.grabbing { cursor: grabbing; scroll-snap-type: none; }
.book { flex: none; width: clamp(190px, 22vw, 240px); scroll-snap-align: start; text-decoration: none; user-select: none; }
.cover { display: block; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; overflow: hidden; margin-bottom: 16px; background: color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: inset 6px 0 8px -4px rgba(0, 0, 0, .35), 0 24px 40px -20px rgba(0, 0, 0, .7); transition: transform .45s var(--ease-out); transform-origin: left center; }
.cover img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.book h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.2; }
.book .by { font-size: .9rem; color: var(--ink-soft); margin: 2px 0 8px; }
.book p:not(.by) { font-size: .92rem; color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) { .book:hover .cover { transform: perspective(800px) rotateY(-12deg) translateY(-4px); } }
.pod-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pod { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.pod-icon { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #1db954; display: grid; place-items: center; }
.pod-icon svg { width: 28px; height: 28px; fill: none; stroke: #0a0d22; stroke-width: 1.8; stroke-linecap: round; }
.pod-icon svg circle { stroke: none; }
.pod-body { flex: 1; min-width: 0; }
.pod .by { font-size: .88rem; margin: 2px 0 6px; }
.pod .go { width: 100%; }
.papers { list-style: none; border-top: 1px solid var(--line); }
.paper { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.paper .topic { grid-row: span 2; font-family: var(--display); font-size: 1.15rem; }
.paper a { font-size: 1.08em; font-weight: 500; text-decoration-color: var(--line); }
.paper a:hover { text-decoration-color: currentColor; }
.paper p { color: var(--ink-soft); font-size: .92rem; }

@keyframes pop { from { opacity: 0; transform: scale(.9); } }
@keyframes thank { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }

/* ---------- pond fallback rings (no WebGL) ---------- */
.pond .ring { position: absolute; z-index: 1; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), inset 0 0 0 2px rgba(255, 255, 255, .35); animation: ring 1.8s var(--ease-out) forwards; }
@keyframes ring { to { transform: scale(calc(14 * var(--s, 1))); opacity: 0; } }

/* ---------- fireflies ---------- */
.body-map { position: relative; }
.nourish { overflow-x: clip; } /* fireflies may roam past the body map, never past the screen */
.fireflies { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); pointer-events: none; z-index: 2; mix-blend-mode: screen; }

/* ---------- ride the wave ---------- */
.surf-stage { position: relative; height: clamp(420px, 70vh, 640px); border-radius: 22px; overflow: hidden; color: #f6f3ff; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.surf-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.surf-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 10, 25, .7), rgba(4, 10, 25, .15) 40%, rgba(4, 10, 25, .7)); }
.surf-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.surf-top { position: absolute; z-index: 2; top: 22px; left: 26px; right: 26px; }
.surf-time { font-family: var(--display); font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.surf-msg { max-width: 34rem; margin-top: 8px; font-size: 1.08em; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); min-height: 3em; }
.surf-controls { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 22px; display: grid; gap: 10px; }
.surf-label { font-size: .95rem; }
.surf-controls input[type="range"] { width: min(100%, 460px); accent-color: #9fe3f0; height: 28px; }
.surf-controls input.nudge { animation: nudge 1.2s var(--ease-out); }
@keyframes nudge { 30% { transform: scale(1.04); filter: drop-shadow(0 0 10px #9fe3f0); } }
.surf-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.surf-stage .btn-solid { background: #f6f3ff; color: #0a0d22; }
.surf-stage .btn-line { box-shadow: inset 0 0 0 1.5px #f6f3ff; color: #f6f3ff; }
.surf-count { margin-top: 14px; color: var(--ink-soft); font-size: .95rem; min-height: 1.5em; }
.surf-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 34px 0 18px; }
.surf-steps li { counter-increment: s; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 16px; }
.surf-steps li::before { content: counter(s); display: block; font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-bottom: 4px; }
.surf-steps b { color: var(--ink); font-weight: 600; }

/* ---------- delay & distract ---------- */
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: clamp(50px, 8vh, 80px); }
.delay { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 20px 24px; border-radius: 22px;
  background: color-mix(in srgb, var(--paper) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.delay p { max-width: 40rem; }
.idea { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--paper) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .35s var(--ease-out), box-shadow .3s ease; }
.idea-pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.idea-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.idea-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.idea h3 { font-size: 1.25rem; font-weight: 500; }
.idea p { color: var(--ink-soft); flex: 1; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; font-size: .92rem; font-weight: 600; text-decoration: none;
  color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out); }
.chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .idea:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--ink); }
  .idea:hover .idea-pic img { transform: scale(1.05); }
  .chip:hover { background: var(--ink); color: var(--paper); }
}

/* ---------- the scripted check-in ---------- */
.companion { max-width: 46rem; border-radius: 26px; padding: 26px; background: color-mix(in srgb, var(--paper) 62%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.comp-head h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 500; }
.comp-head p { color: var(--ink-soft); font-size: .92rem; margin: 4px 0 18px; }
.comp-log { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 18px; line-height: 1.45; animation: pop .35s var(--ease-out); }
.msg.bot { align-self: flex-start; background: color-mix(in srgb, var(--ink) 10%, transparent); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 6px; }
.msg.typing { letter-spacing: .2em; opacity: .7; }
.comp-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- play it out ---------- */
.games { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.lantern-game { position: relative; height: clamp(420px, 66vh, 600px); border-radius: 22px; overflow: hidden; color: #f6f3ff; touch-action: manipulation;
  background: radial-gradient(ellipse at 50% 120%, #2b1d3f, #090b1f 60%, #04050f); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.lantern-game::before { content: ""; position: absolute; inset: 0; opacity: .7;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 30%, #fff, transparent),
    radial-gradient(1px 1px at 88% 42%, #fff, transparent), radial-gradient(1px 1px at 22% 56%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 66%, #fff, transparent),
    radial-gradient(1px 1px at 8% 80%, #fff, transparent), radial-gradient(1px 1px at 52% 8%, #fff, transparent), radial-gradient(1px 1px at 94% 76%, #fff, transparent); }
.lantern-game canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.lg-hud { position: absolute; z-index: 2; top: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.lg-start { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: rgba(4, 5, 15, .55); }
.lg-start[hidden] { display: none; }
.lg-start h3 { font-family: var(--display); font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-weight: 500; }
.lg-start p { max-width: 26rem; color: rgba(246, 243, 255, .85); }
.lg-start .btn-solid { background: #f6f3ff; color: #0a0d22; }
.lg-start .btn-line { box-shadow: inset 0 0 0 1.5px #f6f3ff; color: #f6f3ff; }
.lg-again { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bubbles h3 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); font-weight: 500; }
.bubbles > p { color: var(--ink-soft); margin: 4px 0 16px; }
.bubble-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 14px; border-radius: 20px; background: color-mix(in srgb, var(--paper) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; }
.bubble { aspect-ratio: 1; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 30%, rgba(190, 220, 255, .18) 62%, rgba(140, 170, 220, .32));
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .12), 0 3px 6px -2px rgba(0, 0, 0, .25);
  animation: refill .4s var(--ease-out) both; animation-delay: calc(var(--i) * 12ms); transition: transform .12s var(--ease-out); }
.bubble:active { transform: scale(.9); }
.bubble.popped { background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2); transform: scale(.82); animation: popped .25s var(--ease-out); cursor: default; }
@keyframes popped { 0% { transform: scale(1.12); } 100% { transform: scale(.82); } }
@keyframes refill { from { transform: scale(.4); opacity: 0; } }
/* ---------- calm mode: photographs still change with the time of day, nothing moves ---------- */
.calm *, .calm *::before, .calm *::after { animation: none !important; transition-property: color, background-color, opacity, border-color, filter !important; }
.calm.js .reveal { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .menu { display: inline-block; }
}
@media (max-width: 1100px) {
  .bar ul {
    position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); flex-direction: column; gap: 4px; padding: 12px;
    border-radius: 20px; background: var(--paper); border: 1px solid var(--line);
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  }
  .bar ul a { display: block; padding: 10px 12px; color: var(--ink); }
  .bar ul.open { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 820px) {
  .bar { gap: 8px; padding-block: 12px; }
  .bar ul {
    position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); flex-direction: column; gap: 4px; padding: 12px;
    border-radius: 20px; background: var(--paper); border: 1px solid var(--line);
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  }
  .bar ul a { display: block; padding: 10px 12px; color: var(--ink); }
  .bar ul.open { opacity: 1; transform: none; pointer-events: auto; }
  .mark { font-size: 1.1rem; }
  .pill { padding: 6px 12px; font-size: .85rem; }
  .mosaic {
    inset: 74px var(--gutter) 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 2.2fr 1fr 1fr auto;
    grid-template-areas: "hero hero" "a b" "c d" "cap cap";
  }
  .t-e, .t-f { display: none; }
  .t-cap { padding: 6px 2px 0; }
  .helpline { grid-template-columns: 1fr; }
  .reach { justify-self: start; }
  .roots-grid, .nourish-views { grid-template-columns: 1fr; }
  .paper { grid-template-columns: 1fr; }
  .paper .topic { grid-row: auto; font-size: .95rem; color: var(--ink-soft); }
  .res-nav { top: 62px; }
  .pond { aspect-ratio: 3 / 4; }
  .surf-steps { grid-template-columns: 1fr 1fr; }
  .games { grid-template-columns: 1fr; }
  .surf-stage { height: clamp(520px, 80vh, 680px); }
}
