:root {
  color-scheme: light;
  --night: #1c2148;
  --mauve: #6e5a7e;
  --light: #e9e6ef;
  --haldi: #e3b23c;
  --olive: #5c6426;
  --ink: #20222b;
  --muted: #5b5a6b;
  --night-text: #d9d6e6;
  --display: "Anek Latin", system-ui, sans-serif;
  --body: "Literata", Georgia, serif;
  --gutter: clamp(20px, 6vw, 72px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--light); color: var(--ink); font: 400 17px/1.65 var(--body); }
body, button, textarea, input { font-family: var(--body); }
button, a, summary, input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: .18em; }
button { color: inherit; font-size: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; }
img, svg { display: block; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--haldi);
  outline-offset: 3px;
}
.visually-hidden, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px;
  transform: translateY(-160%); background: var(--haldi); color: var(--ink);
  border-radius: 999px; font: 600 1rem/1 var(--display);
}
.skip-link:focus { transform: none; }

/* The fixed wordmark moves from night to day with the story. */
.sitebar {
  position: fixed; z-index: 50; inset: 0 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: clamp(8px, 2vw, 24px);
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  color: var(--night-text); pointer-events: none; transition: background .35s, color .35s;
}
.sitebar > * { pointer-events: auto; }
.sitebar.is-day {
  color: var(--ink); background: rgba(233, 230, 239, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand {
  min-height: 44px; display: inline-flex; align-items: center; gap: 9px; color: var(--night-text);
  font: 600 1.18rem/1 var(--display); letter-spacing: -.02em; text-decoration: none;
  white-space: nowrap;
}
.sitebar.is-day .brand { color: var(--olive); }
body[data-page]:not([data-page="home"]) .sitebar { color: var(--ink); background: rgba(233, 230, 239, .94); }
body[data-page]:not([data-page="home"]) .sitebar .brand { color: var(--olive); }
.brand-symbol { width: 24px; height: 30px; fill: currentColor; flex: none; }
.wide-links { display: none; align-items: center; gap: clamp(10px, 2vw, 26px); }
.wide-links a, .menu summary {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: inherit; font: 500 1rem/1.2 var(--display); text-decoration: none;
}
.wide-links a, .footer-links a, .footer-contact a, .ending-contact a { min-width: 44px; }
.wide-links a:hover, .menu-panel a:hover, .footer-links a:hover, .ending-contact a:hover { text-decoration: underline; }
.menu { position: relative; font-family: var(--display); }
.menu summary {
  list-style: none; padding: 0 12px; border: 1px solid currentColor; border-radius: 999px;
  cursor: pointer; touch-action: manipulation;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: fixed; z-index: 60; top: calc(env(safe-area-inset-top) + 65px); right: var(--gutter);
  width: min(350px, calc(100vw - 2 * var(--gutter))); padding: 25px 24px 28px;
  color: var(--ink); background: var(--light); border: 1px solid #c9c4d6; border-radius: 0 0 0 24px;
}
.menu-panel > p { color: var(--mauve); font: 500 1.1rem/1.3 var(--display); }
.menu-panel nav { display: grid; margin-top: 12px; }
.menu-panel a {
  min-height: 52px; display: flex; align-items: center; border-bottom: 1px solid #c9c4d6;
  font: 500 1.22rem/1.2 var(--display); text-decoration: none;
}
.contact-pill, .button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 19px; border: 0; border-radius: 999px; text-align: center;
  font: 600 1rem/1.15 var(--display); text-decoration: none; touch-action: manipulation;
}
.contact-pill, .button.primary { background: var(--haldi); color: var(--ink); }
.contact-pill { min-height: 44px; padding: 10px 16px; font-size: .94rem; white-space: nowrap; }
.button.secondary {
  border: 1px solid var(--olive); background: transparent; color: var(--ink);
}
.button:hover, .contact-pill:hover { filter: brightness(.97); }

/* The knot is a sticky, scroll-led opening, with a static readable fallback. */
.act1 { position: relative; height: 420svh; color: var(--night-text); background: var(--night); }
.stage { position: sticky; top: 0; height: 100svh; min-height: 540px; overflow: hidden; isolation: isolate; }
.knot { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; overflow: visible; }
.knot-path, .thread-line { fill: none; stroke: var(--haldi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.knot-hit { fill: none; stroke: transparent; stroke-width: 44px; stroke-linecap: round; pointer-events: stroke; touch-action: pan-y; }
#knotBeads { fill: var(--haldi); }
.hero-intro {
  position: absolute; top: max(15svh, 100px); left: var(--gutter); z-index: 1;
  font: 500 1.06rem/1.25 var(--display); color: #f4f2f8;
}
.hero-intro span { color: var(--night-text); font-size: .94rem; font-weight: 400; }
.thoughts { list-style: none; }
.thought {
  max-width: min(22ch, calc(100vw - 2 * var(--gutter))); color: var(--night-text);
  font: 400 clamp(1.5rem, 6.4vw, 2.6rem)/1.12 var(--display);
  font-stretch: 75%; letter-spacing: -.01em;
}
.js .thought {
  position: absolute; left: var(--gutter); right: var(--gutter); z-index: 2;
  opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s;
  pointer-events: none;
}
.js .thought:nth-child(odd) { top: 27%; }
.js .thought:nth-child(even) { top: auto; bottom: 28%; left: auto; text-align: right; }
.js .thought.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.thought-copy { display: block; }
.mark-button {
  min-height: 44px; margin-top: 12px; padding: 8px 14px; border: 1px solid rgba(217, 214, 230, .7);
  border-radius: 999px; color: var(--night-text); background: transparent;
  font: 500 .94rem/1.1 var(--display); pointer-events: auto; touch-action: manipulation;
}
.mark-button[aria-pressed="true"] { border-color: var(--haldi); background: var(--haldi); color: var(--ink); }
.draft-note {
  max-width: 38ch; color: rgba(217, 214, 230, .77);
  font: 400 .82rem/1.4 var(--display);
}
.js .stage > .draft-note { position: absolute; left: var(--gutter); top: clamp(190px, 25svh, 280px); z-index: 2; }
.js .thought:nth-child(odd) { top: 33%; }
.gentle-note {
  position: absolute; z-index: 4; left: 50%; top: 47%; transform: translate(-50%, -50%);
  color: var(--haldi); font: 600 1.1rem/1 var(--display); opacity: 0; transition: opacity .18s;
}
.gentle-note.is-on { opacity: 1; }
.carry {
  max-width: 12ch; color: #f4f2f8; font: 500 clamp(2.55rem, 10vw, 5.6rem)/.98 var(--display);
  font-stretch: 75%; letter-spacing: -.02em;
}
.js .carry {
  position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter);
  bottom: max(10svh, calc(env(safe-area-inset-bottom) + 46px)); opacity: var(--carry-opacity, 0);
  font-stretch: var(--carry-width, 75%);
}
.hero-hint {
  color: rgba(217, 214, 230, .83); font: 400 .95rem/1.4 var(--display);
}
.js .hero-hint { position: absolute; left: var(--gutter); bottom: max(4svh, env(safe-area-inset-bottom)); }
.hero-location { display: none; }
.dawn { height: 70svh; background: linear-gradient(var(--night), var(--mauve) 46%, var(--light)); }

/* A single drawn thread carries through the light sections. */
.story-surface { position: relative; overflow: clip; }
.life-thread, .interior-thread {
  position: absolute; z-index: 0; top: 0; left: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.thread-line { stroke-width: 1.6; }
.thread-hit { fill: none; stroke: transparent; stroke-width: 44px; pointer-events: stroke; }
#threadBeads { fill: var(--haldi); }
.story-act {
  position: relative; z-index: 1; max-width: 1100px; min-height: 100svh;
  margin: 0 auto; padding: 12svh var(--gutter) 12svh calc(var(--gutter) + 22px);
}
.content-column { max-width: 780px; }
.display-heading {
  max-width: 15ch; margin: 0 0 .52em; font: 500 clamp(2.1rem, 8vw, 4.2rem)/1 var(--display);
  font-stretch: 112%; letter-spacing: -.025em;
}
.lede { max-width: 34ch; font-size: clamp(1.1rem, 3.6vw, 1.25rem); line-height: 1.55; }
.prose { max-width: 36em; }
.prose p + p { margin-top: 1em; }
.intro-copy { margin-top: 1.4rem; }
.ways-list { margin-top: 3rem; border-top: 1px solid #c9c4d6; }
.ways-list details { border-bottom: 1px solid #c9c4d6; }
.ways-list summary {
  min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 12px 2px; list-style: none; cursor: pointer; font: 500 clamp(1.17rem, 4vw, 1.5rem)/1.25 var(--display);
}
.ways-list summary::-webkit-details-marker { display: none; }
.ways-list summary::after { content: "+"; flex: none; color: var(--olive); font-size: 1.4em; }
.ways-list details[open] summary::after { content: "−"; }
.way-body { max-width: 40em; padding: 0 1rem 1.25rem 2px; }
.way-body p + p { margin-top: .8em; }
.facts { margin-top: .8em; color: var(--mauve); font: 500 1rem/1.4 var(--display); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--olive); font: 600 1rem/1.25 var(--display); }
.way-body .text-link { margin-top: .5em; }
.section-heading { margin-top: 14svh; }
.minutes-list { list-style: none; padding: 0; margin-top: 2rem; border-top: 1px solid #c9c4d6; }
.minutes-list li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid #c9c4d6; }
.minutes-list b { color: var(--mauve); font: 500 1.22rem/1.5 var(--display); }
.light-note { margin-top: 1.2rem; color: var(--muted); }
.section-cta { margin-top: 2.2rem; }
.act-tools { min-height: 130svh; }
.tools { display: grid; gap: clamp(4rem, 12vh, 8rem); margin-top: 4rem; }
.tool { max-width: 700px; }
.tool h3 { margin-bottom: .25rem; font: 500 1.55rem/1.25 var(--display); }
.tool > p:not(.breath-word):not(.named-feeling):not(.draft-note) { max-width: 39ch; }
.feelings { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.35rem; }
.feelings button {
  min-height: 44px; padding: 9px 15px; border: 1px solid rgba(92, 100, 38, .65);
  border-radius: 999px; color: var(--olive); background: transparent;
  font: 500 1rem/1 var(--display); touch-action: manipulation;
}
.feelings button[aria-pressed="true"] { color: var(--light); background: var(--olive); }
.named-feeling { min-height: 3.2em; margin-top: 1.15rem; color: var(--olive); font: 500 1.16rem/1.45 var(--display); }
.named-feeling:empty { min-height: 0; margin: 0; }
.breath-word {
  min-height: 1.2em; margin: .5rem 0 1.3rem; color: var(--olive);
  font: 500 clamp(4rem, 18vw, 8.4rem)/1 var(--display); font-stretch: 75%;
  letter-spacing: -.035em; transition: font-stretch 4s linear;
}
.breath-word[data-phase="in"] { font-stretch: 125%; transition-duration: 4s; }
.breath-word[data-phase="hold"] { font-stretch: 125%; transition-duration: 0s; }
.breath-word[data-phase="out"] { font-stretch: 75%; transition-duration: 8s; }
.breath-button { margin-top: 5px; }
.hold-panel {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: end;
  min-height: 270px; max-width: 600px; margin-top: 1.25rem; overflow: hidden;
  border-radius: 28px; background: rgba(92, 100, 38, .08); touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.hold-count {
  grid-column: 1 / -1; grid-row: 1; align-self: start; justify-self: center;
  max-width: 90%; padding: 1.3rem 1rem 0; color: var(--olive); text-align: center;
  font: 500 1.2rem/1.35 var(--display);
}
.hold-panel button {
  position: relative; z-index: 1; grid-row: 2; min-height: 64px; margin: 0 9px 12px;
  border: 1px solid rgba(92, 100, 38, .35); border-radius: 999px; background: rgba(233, 230, 239, .8);
  color: var(--olive); font: 500 1rem/1 var(--display); touch-action: manipulation;
}
.hold-symbol { position: absolute; z-index: 0; left: 50%; bottom: 46px; width: 112px; height: 133px; transform: translateX(-50%); fill: var(--olive); pointer-events: none; }
.hold-symbol [data-arm] { transform-box: fill-box; transform-origin: center; transition: transform .25s, fill .25s; }
.hold-symbol [data-arm].is-tapping { transform: scale(1.08); fill: var(--haldi); }

/* The ending returns to night, and the figure responds to a held press. */
.ending { color: var(--night-text); background: var(--night); }
.ending-inner { max-width: 900px; margin: 0 auto; padding: 12svh var(--gutter) max(12svh, env(safe-area-inset-bottom)); }
.ending .display-heading { color: #f4f2f8; }
.ending .lede { color: var(--night-text); }
.hold-me {
  position: relative; display: grid; place-items: center; width: 170px; height: 190px;
  margin: 0 auto 1rem; padding: 15px; border: 0; color: var(--haldi); background: transparent;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ending-figure { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; fill: transparent; stroke: var(--haldi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ending.is-drawn .ending-figure { fill: var(--haldi); }
.ending-figure circle { fill: transparent; transition: fill 1s ease; }
.ending.is-drawn .ending-figure circle { fill: var(--haldi); }
.ending-figure [data-arm] { transform-box: fill-box; transform-origin: center; transition: transform 3s cubic-bezier(.25, .7, .3, 1), fill 1s ease; }
.ending-figure [data-arm="left"] { transform: translateX(calc(var(--close, 0) * 7px)) rotate(calc(var(--close, 0) * 7deg)); }
.ending-figure [data-arm="right"] { transform: translateX(calc(var(--close, 0) * -7px)) rotate(calc(var(--close, 0) * -7deg)); }
.hold-me.is-held { --close: 1; }
.ending.is-drawn .ending-figure [data-arm] { fill: var(--haldi); }
.hold-me .pulse-ring {
  position: absolute; z-index: 0; width: 65%; aspect-ratio: 1; border: 1px solid var(--haldi);
  border-radius: 50%; opacity: 0; pointer-events: none;
}
.hold-me.is-beating .pulse-ring { animation: pulse .7s ease-out; }
@keyframes pulse { from { transform: scale(.6); opacity: .55; } to { transform: scale(1.55); opacity: 0; } }
.hold-caption { min-height: 1.5em; margin: 0 auto 4rem; color: var(--night-text); text-align: center; font: 400 1rem/1.4 var(--display); }
.ending-lede { margin-bottom: 2rem; }
.mine-list { list-style: none; padding: 0; border-top: 1px solid rgba(217, 214, 230, .35); }
.mine-list li { border-bottom: 1px solid rgba(217, 214, 230, .35); }
.mine-list a {
  min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 10px 2px; color: var(--night-text); font: 400 1.2rem/1.25 var(--display); text-decoration: none;
}
.mine-list a:hover { color: #f4f2f8; }
.mine-list a span { flex: none; color: var(--haldi); font-size: .85rem; }
.mine-list li.is-marked a { color: #f4f2f8; }
.mine-list li.is-marked a span { color: var(--haldi); }
.mine-list .all-marked a { color: var(--haldi); }
.ending-contact { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-top: 2.6rem; }
.ending-contact a { min-height: 44px; display: inline-flex; align-items: center; font: 500 1rem/1.3 var(--display); }
.crisis { max-width: 60ch; margin-top: 2rem; font: 400 .95rem/1.55 var(--display); }
.ending .crisis a, .site-footer .crisis a, .sheet-crisis a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.compact-ending .ending-inner { padding-top: 9svh; }
.compact-ending .ending-contact { margin-top: 2rem; }
.compact-ending .button { margin-top: 2rem; }

/* Shared light pages and their short thread. */
.interior { position: relative; max-width: 1200px; min-height: 100svh; margin: 0 auto; overflow: clip; }
.interior-thread { position: absolute; left: 0; width: 100%; height: 100%; pointer-events: none; }
.interior-thread path { fill: none; stroke: var(--haldi); stroke-width: 1.6; stroke-linecap: round; }
.interior-content { position: relative; z-index: 1; max-width: 900px; margin-left: 12vw; padding: 1px var(--gutter) 12svh clamp(35px, 7vw, 90px); }
.page-intro { max-width: 640px; padding-top: max(18svh, 145px); padding-bottom: 5rem; }
.eyebrow { margin-bottom: .8rem; color: var(--mauve); font: 500 1rem/1.3 var(--display); }
.page-intro .display-heading { max-width: 15ch; }
.page-section { max-width: 760px; padding: 0 0 6rem; }
.section-title { max-width: 24ch; margin-bottom: .7em; font: 500 clamp(1.7rem, 6vw, 2.7rem)/1.08 var(--display); font-stretch: 110%; letter-spacing: -.018em; }
.page-section .section-title { margin-bottom: 1rem; }
.page-section > .prose, .page-section > p.prose { max-width: 37em; }
.service-section { max-width: 690px; padding: 1.7rem 0 5rem; border-top: 1px solid #c9c4d6; scroll-margin-top: 100px; }
.service-section .eyebrow { margin-bottom: .55rem; }
.service-section .section-title { max-width: 22ch; }
.service-section .facts { margin: 1.3rem 0 .8rem; }
.timeline { list-style: none; padding: 0; margin-top: 2rem; border-top: 1px solid #c9c4d6; }
.timeline li { padding: 1.1rem 0 1.25rem; border-bottom: 1px solid #c9c4d6; }
.timeline-year { color: var(--mauve); font: 500 1.1rem/1.3 var(--display); }
.timeline li p { margin-top: .35rem; }
.paper-list { max-width: 40em; list-style: none; padding: 0; margin-top: 1.2rem; border-top: 1px solid #c9c4d6; }
.paper-list li { border-bottom: 1px solid #c9c4d6; }
.paper-list a { min-height: 54px; display: flex; align-items: center; font: 500 1.08rem/1.3 var(--display); }
.session-list { list-style: none; max-width: 680px; padding: 0; margin-top: 2rem; border-top: 1px solid #c9c4d6; }
.session-list li { display: flex; justify-content: space-between; gap: 1rem; min-height: 60px; align-items: center; border-bottom: 1px solid #c9c4d6; }
.session-list li span:first-child { color: var(--mauve); font: 500 1.1rem/1.2 var(--display); }
.session-list li span:last-child { color: var(--muted); font: 400 .96rem/1.3 var(--display); text-align: right; }
.plan-page {
  max-width: 530px; margin-top: 1.5rem; padding: 2rem clamp(1.2rem, 5vw, 3rem);
  border: 1px solid #c9c4d6; background: rgba(255, 255, 255, .27); color: var(--ink);
  font-family: var(--body);
}
.plan-page h3 { margin: .2rem 0 1rem; font: 400 1.12rem/1.4 var(--body); }
.plan-page h3:not(:first-child) { margin-top: 2rem; }
.plan-lines { display: grid; gap: 24px; }
.plan-lines span { height: 1px; background: #c9c4d6; }
.price-section { max-width: 600px; padding: 2rem 0 6rem; border-top: 1px solid #c9c4d6; }
.price { margin: .5rem 0 .3rem; font: 500 clamp(1.55rem, 5vw, 2rem)/1.2 var(--display); }
.price span { display: block; margin-top: .25rem; font-size: 1rem; font-weight: 400; }
.place-heads { display: flex; gap: 12px; margin: 1rem 0 .8rem; }
.place-heads svg { width: 31px; height: 31px; fill: var(--olive); }
.pause-tool { display: flex; align-items: center; min-height: 95svh; padding: 7rem 0; border-top: 1px solid #c9c4d6; }
.pause-tool .tool { width: 100%; }
.pause-tool .eyebrow { margin-bottom: .5rem; }
.pause-tool .section-title { margin-bottom: .4em; }
.pause-tool .hold-panel { min-height: min(50svh, 380px); }

/* A private, local journal with a paper-like reading rhythm. */
.privacy-note {
  max-width: 42ch; margin-top: 1.6rem; color: var(--olive);
  font: 500 1rem/1.5 var(--display);
}
.journal-page { max-width: 930px; }
.journal-form { max-width: 790px; }
.journal-section { padding: 2.6rem 0 4rem; border-top: 1px solid #c9c4d6; }
.journal-section > .eyebrow { margin-bottom: .55rem; }
.journal-section .section-title { margin-bottom: 1.5rem; }
.journal-field { display: grid; gap: .45rem; margin-top: 1.35rem; color: var(--ink); font: 500 1rem/1.4 var(--display); }
.journal-field textarea, .journal-field input[type="date"] {
  display: block; width: 100%; min-height: 70px; padding: 12px 0 9px;
  border: 0; border-bottom: 1px solid #b9b4c5; border-radius: 0; color: var(--ink);
  background: transparent; font: 400 1rem/1.55 var(--body); resize: vertical;
}
.journal-field input[type="date"] { width: min(100%, 260px); min-height: 48px; }
.date-field { max-width: 270px; }
.rating-set, .journal-split { min-width: 0; padding: 0; margin: 1.8rem 0 0; border: 0; }
.rating-set legend, .journal-split legend {
  width: 100%; padding: 0 0 .4rem; color: var(--ink); font: 500 1rem/1.4 var(--display);
}
.rating-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
.rating-field { display: grid; gap: .4rem; margin-top: 1rem; color: var(--ink); font: 500 .98rem/1.3 var(--display); }
.rating-field input { width: 100%; min-height: 44px; accent-color: var(--olive); }
.rating-field output { color: var(--muted); font: 400 .91rem/1.3 var(--display); }
.journal-split .journal-field { margin-top: .75rem; }
.relationship-rating { max-width: 510px; }
.teaf { margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid #c9c4d6; }
.teaf h3 { font: 500 1.45rem/1.2 var(--display); }
.teaf > p { margin-top: .3rem; }
.teaf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.journal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 1rem 0 2rem; }
.save-status { flex: 1 1 100%; color: var(--olive); font: 500 .98rem/1.4 var(--display); }
.journal-actions .button { min-width: 135px; }
.pdf-link { margin: 1rem 0 4rem; color: var(--olive); font: 600 1.02rem/1.4 var(--display); }

/* Page-end footer repeats the direct contact and crisis support. */
.site-footer { color: var(--night-text); background: var(--night); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 4rem var(--gutter) max(3rem, env(safe-area-inset-bottom)); }
.footer-brand { color: var(--night-text); }
.footer-links, .footer-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 1.6rem; }
.footer-links a, .footer-contact a { min-height: 44px; display: inline-flex; align-items: center; font: 400 .98rem/1.3 var(--display); }
.footer-note { margin-top: 1.6rem; color: rgba(217, 214, 230, .75); font: 400 .93rem/1.4 var(--display); }
.not-found { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: var(--gutter); }
.not-found main { width: min(560px, 100%); margin: auto; }
.not-found h1 { margin: .3em 0; font: 500 clamp(2.4rem, 9vw, 4.2rem)/1 var(--display); }
.not-found .button { margin-top: 2rem; }
.not-found-footer { align-self: end; width: min(900px, 100%); color: var(--muted); font: 400 .95rem/1.5 var(--display); }
.not-found-footer > a { min-height: 44px; display: inline-flex; align-items: center; margin-right: 1.5rem; }
.not-found-footer .crisis { margin-top: 1rem; }

/* All words and contact links remain available when JavaScript is off. */
html:not(.js) .act1 { height: auto; min-height: 100svh; }
html:not(.js) .stage {
  position: relative; height: auto; min-height: 100svh; overflow: hidden;
  padding: 130px var(--gutter) 58px;
}
html:not(.js) .stage .knot { display: none; }
html:not(.js) .stage::after {
  content: ""; position: absolute; z-index: 0; top: 140px; right: var(--gutter); bottom: 40px;
  width: 1.6px; background: var(--haldi); opacity: .7; pointer-events: none;
}
html:not(.js) .hero-intro, html:not(.js) .hero-hint, html:not(.js) .draft-note,
html:not(.js) .carry, html:not(.js) .hero-location { position: relative; inset: auto; }
html:not(.js) .thoughts { position: relative; display: grid; gap: 1.6rem; margin: 3rem 0 0; padding: 0; }
html:not(.js) .thought { position: relative; inset: auto; max-width: 24ch; opacity: 1; transform: none; pointer-events: auto; }
html:not(.js) .draft-note { margin-top: 1rem; }
html:not(.js) .carry { max-width: 14ch; margin-top: 3rem; opacity: 1; font-stretch: 100%; }
html:not(.js) .hero-hint { margin-top: .8rem; }
html:not(.js) .hero-location { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; margin-top: .5rem; color: var(--night-text); font: 400 .95rem/1.3 var(--display); }

/* The contact sheet remains reachable with a phone keyboard open. */
.message-sheet {
  position: fixed; inset: auto 0 0; width: min(100%, 680px); max-width: none; max-height: min(92svh, 900px);
  margin: auto auto 0; padding: 0; border: 1px solid #c9c4d6; border-bottom: 0;
  border-radius: 24px 24px 0 0; color: var(--ink); background: var(--light); overflow-y: auto;
}
.message-sheet::backdrop { background: rgba(18, 19, 36, .58); }
.sheet-inner { position: relative; padding: max(28px, env(safe-area-inset-top)) var(--gutter) max(25px, env(safe-area-inset-bottom)); }
.sheet-close {
  min-width: 54px; min-height: 44px; display: block; margin: 0 0 1.5rem auto; padding: 8px 12px;
  border: 1px solid var(--olive); border-radius: 999px; background: transparent;
  color: var(--olive); font: 500 .95rem/1 var(--display);
}
.sheet-inner h2 { max-width: 15ch; font: 500 clamp(1.8rem, 7vw, 2.6rem)/1.05 var(--display); }
.sheet-intro { max-width: 36ch; margin: .7rem 0 1.2rem; }
.field-label { min-height: 44px; display: flex; align-items: flex-end; margin-bottom: .45rem; font: 500 1rem/1.3 var(--display); }
.sheet-inner textarea {
  display: block; width: 100%; min-height: 110px; padding: 12px; border: 1px solid #b9b4c5;
  border-radius: 5px; color: var(--ink); background: rgba(255, 255, 255, .22); font: 400 1rem/1.5 var(--body); resize: vertical;
}
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.sheet-actions .button { flex: 1 1 180px; }
.sheet-crisis { margin-top: 1.2rem; color: var(--muted); }

@media (min-width: 780px) {
  .ending-inner { padding-top: 10svh; }
  .message-sheet {
    inset: 50% auto auto 50%; width: min(620px, calc(100vw - 48px)); max-height: min(90svh, 850px);
    margin: 0; border: 1px solid #c9c4d6; border-radius: 24px; transform: translate(-50%, -50%);
  }
  .sheet-inner { padding: 30px 38px; }
}
@media (min-width: 1024px) {
  .wide-links { display: flex; }
  .menu { display: none; }
  .sitebar { justify-content: flex-start; }
  .contact-pill { margin-left: auto; }
  .story-act { margin-left: 12vw; padding-left: clamp(32px, 6vw, 86px); }
  .interior-content { padding-left: clamp(35px, 7vw, 90px); }
}
@media (max-width: 420px) {
  .sitebar { gap: 7px; }
  .brand { gap: 6px; font-size: 1.05rem; }
  .brand-symbol { width: 21px; }
  .contact-pill { padding-inline: 12px; font-size: .88rem; }
  .menu summary { padding-inline: 10px; }
  .rating-grid, .teaf-grid { grid-template-columns: 1fr; gap: .25rem; }
  .session-list li { align-items: flex-start; flex-direction: column; justify-content: center; gap: .15rem; padding: .7rem 0; }
  .mine-list a { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .act1 { height: auto; min-height: 100svh; }
  .js .stage { position: relative; min-height: 100svh; height: auto; overflow: visible; padding: 140px var(--gutter) 90px; }
  .js .stage .knot { display: none; }
  .js .stage::after {
    content: ""; position: absolute; z-index: 0; top: 140px; right: var(--gutter); bottom: 50px;
    width: 1.6px; background: var(--haldi); opacity: .7; pointer-events: none;
  }
  .js .thoughts { position: relative; display: grid; gap: 1.6rem; margin-top: 3rem; padding: 0; }
  .js .thought, .js .thought:nth-child(n) {
    position: relative; inset: auto; max-width: 24ch; opacity: 1; transform: none;
    text-align: left; pointer-events: auto;
  }
  .js .stage > .draft-note { position: relative; margin-top: 1rem; left: auto; top: auto; }
  .js .carry { position: relative; inset: auto; max-width: 14ch; margin-top: 3rem; opacity: 1; font-stretch: 100%; }
  .js .hero-hint { position: relative; left: auto; bottom: auto; margin-top: .8rem; }
  .hero-location { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; margin-top: .5rem; color: var(--night-text); font: 400 .95rem/1.3 var(--display); }
  .life-thread { transform: none !important; }
  .thread-line, .interior-thread path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .ending-figure { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .pulse-ring { display: none; }
}

@media print {
  @page { margin: 18mm; }
  body { color: #111; background: #fff; font-size: 11pt; }
  .sitebar, .site-footer, .interior-thread, .journal-actions, .pdf-link, .message-sheet, .skip-link { display: none !important; }
  .interior, .interior-content, .journal-page { max-width: none; min-height: 0; margin: 0; padding: 0; overflow: visible; }
  .page-intro { padding: 0 0 12mm; }
  .journal-section { padding: 8mm 0; break-inside: avoid-page; }
  .journal-section .section-title { font-size: 20pt; }
  .journal-field textarea { min-height: 18mm; resize: none; border-bottom-color: #999; }
  .journal-field input[type="date"] { min-height: 12mm; }
  .rating-field input { accent-color: #333; }
  .journal-section, .journal-field, .rating-set, .journal-split, .teaf { break-inside: avoid; }
}
