@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/comfortaa-cyrillic-400-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/comfortaa-latin-400-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  font-family: "Comfortaa", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-text: #fcf3e8;
  --opening-text: #b55c17;
  --content-text: #f5dca2;
  --light-text: #fcf3e8;
  --dark-text: #482728;
  --accent: #e6a817;
  --page-inline: clamp(1.25rem, 5vw, 6.5rem);
  --scene-transition: 900ms;
  --text-transition: 420ms;
  --panel-edge: clamp(0.16rem, 0.2vw, 0.25rem);
  --opening-line-height: clamp(2.432rem, 3.4816vw, 4.16rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  background: #17120b;
}

body {
  margin: 0;
  min-width: 20rem;
  color: var(--light-text);
  background: #17120b;
  overflow-x: hidden;
  font-family: inherit;
}

button, input, textarea, select { font: inherit; }
a { color: inherit; }

.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: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #21170b;
  background: #fff8e8;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.scene {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #17120b;
  isolation: isolate;
}

.scene__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-position, center);
  opacity: 0;
  transition: opacity var(--scene-transition) ease;
}
.scene__image.is-active { opacity: 1; }

.site-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: clamp(2rem, 5vw, 6rem);
  padding:
    max(clamp(1.5rem, 4.2vw, 4rem), env(safe-area-inset-top))
    max(clamp(1.25rem, 7vw, 7.5rem), env(safe-area-inset-right))
    0
    max(clamp(1.25rem, 7vw, 7.5rem), env(safe-area-inset-left));
  pointer-events: none;
}

.logo-link,
.primary-nav { pointer-events: auto; }

.logo-link {
  position: relative;
  display: block;
  width: clamp(14rem, 23vw, 23rem);
  aspect-ratio: 545.37 / 169.75;
  line-height: 0;
}

.logo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity var(--text-transition) ease;
}

.logo--light { opacity: 1; }
html[data-page="home"][data-active-scene="swing"] .logo--light { opacity: 0; }
html[data-page="home"][data-active-scene="swing"] .logo--opening { opacity: 1; }
html[data-header-tone="dark"] .logo--light { opacity: 0; }
html[data-header-tone="dark"] .logo--opening { opacity: 1; }

.primary-nav {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(1.4rem, 3vw, 3.2rem);
  margin-top: clamp(0.7rem, 1.25vw, 1.25rem);
  color: var(--nav-text);
  font-size: clamp(0.85rem, 1.22vw, 1.25rem);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  transition: color var(--text-transition) ease;
}
html[data-header-tone="dark"] .primary-nav { color: var(--opening-text); }

.primary-nav a {
  text-decoration: none;
  text-underline-offset: 0.3em;
}
.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a[aria-current] { text-decoration: underline; }

.story {
  position: relative;
  z-index: 2;
  width: 100%;
}

.chapter,
.thought,
.functional-section {
  position: relative;
  width: 100%;
}

/* Reliable no-JavaScript fallback: every thought remains ordinary readable HTML. */
.thought {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(7rem, 15vh, 10rem) var(--page-inline) clamp(5rem, 12vh, 8rem);
  user-select: text;
  -webkit-user-select: text;
}

.thought__panel {
  position: relative;
  width: min(100%, 58rem);
  padding: var(--panel-padding, clamp(1.5rem, 3vw, 3.1rem));
  color: var(--panel-text, var(--light-text));
  background: var(--panel-bg, transparent);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-align: var(--panel-align, left);
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  isolation: isolate;
}

.thought__panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--underlay-left, 0);
  top: var(--underlay-top, 0);
  width: var(--underlay-width, 0);
  height: var(--underlay-height, 0);
  background: var(--panel-bg, transparent);
  opacity: 0;
  pointer-events: none;
}

.thought__panel > * {
  position: relative;
  z-index: 1;
}

.thought--bare .thought__panel {
  padding: 0;
  background: transparent;
}

/* Fixed narrative mode only after validation. */
html.engine-ready .thought {
  display: block;
  min-height: var(--step-height, 112vh);
  min-height: var(--step-height-svh, 112svh);
  padding: 0;
}

html.engine-ready .thought__panel {
  position: fixed;
  z-index: 12;
  top: var(--panel-top, 50%);
  left: var(--panel-left, auto);
  right: var(--panel-right, auto);
  width: fit-content;
  max-width: var(--panel-width, 40vw);
  padding: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(var(--panel-anchor, -50%)) translateY(0.7rem);
  transition:
    opacity var(--text-transition) ease,
    transform var(--text-transition) ease,
    visibility 0s linear var(--text-transition);
  will-change: opacity;
}

html.engine-ready .thought__panel.is-underlay-ready::before { opacity: 1; }

html.engine-ready .thought.is-active .thought__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(var(--panel-anchor, -50%));
  transition:
    opacity var(--text-transition) ease,
    transform var(--text-transition) ease,
    visibility 0s linear 0s;
}

.thought__panel h1,
.thought__panel h2,
.thought__panel p,
.thought__panel ul {
  margin: 0;
  max-width: 100%;
  text-wrap: balance;
}

.thought__panel h1,
.thought__panel h2,
.thought__panel p,
.thought__panel li {
  font-family: inherit;
  font-weight: 400;
}

.thought__panel p,
.thought__panel li {
  font-size: clamp(1.3rem, 2.15vw, 2.5rem);
  line-height: 1.34;
  letter-spacing: 0;
}

.thought__panel .key {
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.22;
}

.thought__panel .long {
  font-size: clamp(1.15rem, 1.85vw, 2.15rem);
  line-height: 1.42;
}

.thought__panel .compact {
  font-size: clamp(1.05rem, 1.55vw, 1.8rem);
  line-height: 1.42;
}

.thought__panel .secondary {
  margin-top: clamp(0.85rem, 1.4vw, 1.35rem);
  font-size: clamp(1.1rem, 1.95vw, 2.2rem);
  line-height: 1.38;
  color: inherit;
}

.thought__panel .line-list {
  display: grid;
  gap: 0.45em;
  padding: 0;
  list-style: none;
}

.thought__panel .line-list li::before {
  content: "— ";
}

.thought__panel .eyebrow {
  margin-bottom: 0.85rem;
  font-size: clamp(0.78rem, 1.05vw, 1.05rem);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.action-link {
  display: inline-block;
  margin-top: clamp(1rem, 2vw, 1.8rem);
  font-size: clamp(0.95rem, 1.35vw, 1.3rem);
  line-height: 1.4;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}
.action-link:hover,
.action-link:focus-visible { text-decoration: none; }

.thought__panel ::selection,
.functional-panel ::selection,
.contact-card ::selection {
  color: #21170b;
  background: #ffe2a6;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 50%;
  right: max(1rem, env(safe-area-inset-right));
  display: grid;
  gap: 0.48rem;
  transform: translateY(-50%);
  color: var(--nav-text);
  font-family: inherit;
  transition: color var(--text-transition) ease;
}
html[data-header-tone="dark"] .sidebar { color: var(--opening-text); }

.sidebar a {
  position: relative;
  display: grid;
  place-items: center end;
  width: 2.35rem;
  height: 1.35rem;
  text-decoration: none;
}
.sidebar a::before {
  content: "";
  width: 0.72rem;
  height: 1px;
  background: currentColor;
  opacity: 0.56;
  transform-origin: right center;
  transition: width 180ms ease, opacity 180ms ease;
}
.sidebar a span {
  position: absolute;
  top: 50%;
  right: 3rem;
  padding: 0;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.2;
  color: currentColor;
  background: transparent;
  border: 0;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transform: translate(0.35rem, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 160ms;
  pointer-events: none;
}
.sidebar a:hover span,
.sidebar a:focus-visible span {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 0s;
}
.sidebar a.is-active::before {
  width: 1.45rem;
  opacity: 1;
}
.sidebar a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.scroll-indicator-wrap {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: max(1.6rem, env(safe-area-inset-bottom));
  width: 34px;
  height: 55px;
  transform: translateX(-50%);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 350ms ease, visibility 0s linear 350ms;
}
html.engine-ready .scroll-indicator-wrap.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 350ms ease, visibility 0s linear 0s;
}
.scroll-downs {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 55px;
}
.mousey {
  display: block;
  width: 3px;
  padding: 10px 15px;
  height: 35px;
  border: 2px solid currentColor;
  border-radius: 25px;
  opacity: 0.75;
  box-sizing: content-box;
}
.scroller {
  display: block;
  width: 3px;
  height: 10px;
  border-radius: 25%;
  background-color: currentColor;
  animation: scroll 2.2s cubic-bezier(.15, .41, .69, .94) infinite;
}
@keyframes scroll {
  0% { opacity: 0; }
  10% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* Functional blocks stay in the document flow, on the painting. */
.functional-section {
  z-index: 5;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(8rem, 15vh, 11rem), env(safe-area-inset-top))
    var(--page-inline)
    max(clamp(4rem, 10vh, 7rem), env(safe-area-inset-bottom));
}

.functional-panel {
  width: min(48rem, 48vw);
  padding: clamp(1.25rem, 2.5vw, 2.4rem);
  color: var(--dark-text);
  background: rgba(252, 243, 232, 0.91);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Functional content enters as the narrative thought leaves. */
html.engine-ready .functional-section .functional-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.7rem);
  transition:
    opacity var(--text-transition) ease,
    transform var(--text-transition) ease,
    visibility 0s linear var(--text-transition);
}
html.engine-ready .functional-section.is-active .functional-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity var(--text-transition) ease,
    transform var(--text-transition) ease,
    visibility 0s linear 0s;
}
.functional-panel--left { justify-self: start; }
.functional-panel--right { justify-self: end; }
.functional-panel h1,
.functional-panel h2,
.functional-panel p { margin-top: 0; }
.functional-panel h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3vw, 3.1rem);
  line-height: 1.2;
  font-weight: 400;
}
.functional-panel p {
  font-size: clamp(0.95rem, 1.25vw, 1.2rem);
  line-height: 1.55;
}

.participation-grid,
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.participation-grid a,
.gift-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  color: var(--dark-text);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(72, 39, 40, 0.18);
  border-radius: 0;
  text-decoration: none;
  font-size: clamp(0.78rem, 1vw, 1rem);
  line-height: 1.35;
}
.participation-grid a:hover,
.participation-grid a:focus-visible { background: rgba(255, 255, 255, 0.72); }

.amberine-form {
  display: grid;
  gap: 0.85rem;
}
.field {
  display: grid;
  gap: 0.35rem;
}
.field label,
.consent-row {
  font-size: clamp(0.78rem, 0.95vw, 0.95rem);
  line-height: 1.4;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.68rem 0.75rem;
  color: var(--dark-text);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(72, 39, 40, 0.22);
  border-radius: 0;
}
.field textarea { min-height: 7.4rem; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--opening-text); }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.submit-button:focus-visible,
.form-back:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
}
.consent-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem;
  gap: 0.55rem;
  align-items: start;
}
.consent-info {
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  color: inherit;
  background: rgba(252, 243, 232, 0.08);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}
.consent-info:hover { background: rgba(252, 243, 232, 0.17); }
.consent-info:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.submit-button,
.form-back {
  justify-self: start;
  padding: 0.72rem 1rem;
  color: #fcf3e8;
  background: var(--opening-text);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.form-back {
  margin-bottom: 1rem;
  color: var(--dark-text);
  background: transparent;
  padding-left: 0;
}
.form-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 0.82rem;
}

.form-status--success {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(34rem, calc(100vw - 3rem));
  min-height: 0;
  margin: 0;
  padding: 1.15rem 1.5rem;
  box-sizing: border-box;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.45;
  color: #fcf3e8;
  background: rgba(69, 39, 19, 0.86);
  border: 1px solid rgba(252, 243, 232, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0.7rem 2.2rem rgba(0, 0, 0, 0.18);
}
[hidden] { display: none !important; }

.privacy-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-width: none;
  max-height: min(44rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  color: var(--dark-text);
  background: transparent;
  border: 0;
  overflow: visible;
}
.privacy-dialog::backdrop {
  background: rgba(23, 18, 11, 0.76);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.privacy-dialog__surface {
  position: relative;
  max-height: min(44rem, calc(100dvh - 2rem));
  padding: clamp(1.25rem, 3vw, 2.4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--dark-text);
  background: rgba(252, 243, 232, 0.98);
}
.privacy-dialog__close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  margin: -0.45rem -0.45rem 0.35rem 0.75rem;
  padding: 0;
  color: var(--dark-text);
  background: #fcf3e8;
  border: 1px solid rgba(72, 39, 40, 0.35);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.privacy-dialog__close:focus-visible {
  outline: 2px solid var(--opening-text);
  outline-offset: 3px;
}
.privacy-dialog h2,
.privacy-dialog h3,
.privacy-dialog p,
.privacy-dialog ul { margin-top: 0; }
.privacy-dialog h2 {
  margin-bottom: 1.2rem;
  color: var(--opening-text);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 400;
  line-height: 1.25;
}
.privacy-dialog h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.privacy-dialog p,
.privacy-dialog li {
  font-size: 0.95rem;
  line-height: 1.55;
}
.privacy-dialog ul { padding-left: 1.25rem; }
.privacy-dialog__section + .privacy-dialog__section {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(72, 39, 40, 0.18);
}
.privacy-dialog__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0;
}
.privacy-dialog a {
  color: var(--opening-text);
  text-underline-offset: 0.28em;
}
body.privacy-dialog-open { overflow: hidden; }

.contact-page {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(8rem, 15vh, 11rem), env(safe-area-inset-top))
    clamp(2rem, 11vw, 12rem)
    max(clamp(4rem, 8vh, 7rem), env(safe-area-inset-bottom));
  color: var(--dark-text);
}
.contact-card {
  display: grid;
  gap: clamp(1.2rem, 2.4vh, 2.25rem);
  width: min(48rem, 64vw);
  text-align: center;
}
.contact-item { display: grid; gap: 0.25rem; }
.contact-role {
  font-size: clamp(0.82rem, 1.1vw, 1.1rem);
  line-height: 1.45;
}
.contact-name {
  font-size: clamp(1.1rem, 1.6vw, 1.55rem);
  line-height: 1.35;
}
.contact-email {
  color: var(--opening-text);
  font-size: clamp(0.95rem, 1.35vw, 1.3rem);
  text-underline-offset: 0.3em;
}
.contact-phone,
.contact-details-link {
  justify-self: center;
  color: var(--opening-text);
  text-underline-offset: 0.3em;
}
.contact-phone {
  font-size: clamp(0.92rem, 1.2vw, 1.15rem);
  text-decoration: none;
}
.contact-phone:hover,
.contact-phone:focus-visible { text-decoration: underline; }
.contact-details-link {
  margin-top: 0.25rem;
  font-size: clamp(0.78rem, 1vw, 0.98rem);
}

.details-page {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(8.5rem, 17vh, 12rem), env(safe-area-inset-top))
    clamp(1.5rem, 8vw, 8rem)
    max(clamp(3rem, 7vh, 5rem), env(safe-area-inset-bottom));
  color: var(--dark-text);
}
.details-card {
  width: min(58rem, 76vw);
  padding: clamp(1.15rem, 2.4vw, 2.2rem);
  background: rgba(252, 243, 232, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.details-card h1 {
  margin: 0 0 clamp(1rem, 2vw, 1.65rem);
  color: var(--opening-text);
  font-size: clamp(1.55rem, 2.8vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
}
.details-card h2 {
  margin: 0 0 0.7rem;
  color: var(--opening-text);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.3;
}
.bank-details-section {
  margin-top: clamp(1.6rem, 3vw, 2.6rem);
  padding-top: clamp(1.2rem, 2vw, 1.8rem);
  border-top: 1px solid rgba(72, 39, 40, 0.24);
  scroll-margin-top: 8rem;
}
.bank-transfer-note {
  margin: 0 0 1rem;
  padding: 0.72rem 0.82rem;
  font-size: clamp(0.84rem, 1vw, 0.98rem);
  line-height: 1.5;
  background: rgba(181, 92, 23, 0.1);
}
.details-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.foundation-details {
  display: grid;
  gap: 0.72rem;
  margin: 0;
}
.foundation-details > div {
  display: grid;
  grid-template-columns: minmax(12rem, 0.75fr) minmax(0, 1.6fr);
  gap: clamp(0.8rem, 2vw, 2rem);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(72, 39, 40, 0.16);
}
.foundation-details dt,
.foundation-details dd {
  margin: 0;
  font-size: clamp(0.78rem, 1vw, 0.98rem);
  line-height: 1.48;
}
.foundation-details dt { color: rgba(72, 39, 40, 0.72); }
.foundation-details dd { overflow-wrap: anywhere; }
.foundation-details a { color: var(--opening-text); text-underline-offset: 0.25em; }
.details-back {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--opening-text);
  font-size: clamp(0.82rem, 1vw, 1rem);
  text-underline-offset: 0.3em;
}

.page-legal {
  min-height: 100vh;
  min-height: 100svh;
  color: var(--dark-text);
  background: #8b7954;
}
.legal-page {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(clamp(8.5rem, 17vh, 12rem), env(safe-area-inset-top))
    max(clamp(1rem, 6vw, 5rem), env(safe-area-inset-right))
    max(clamp(3rem, 7vh, 5rem), env(safe-area-inset-bottom))
    max(clamp(1rem, 6vw, 5rem), env(safe-area-inset-left));
}
.legal-card {
  width: min(64rem, 100%);
  padding: clamp(1.25rem, 3vw, 3rem);
  background: rgba(252, 243, 232, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.legal-card h1,
.legal-card h2,
.legal-card h3,
.legal-card p,
.legal-card ul { margin-top: 0; }
.legal-card h1 {
  max-width: 25ch;
  margin-bottom: 0.7rem;
  color: var(--opening-text);
  font-size: clamp(1.65rem, 3.5vw, 3.1rem);
  font-weight: 400;
  line-height: 1.2;
}
.legal-card h2 {
  margin: 2rem 0 0.7rem;
  color: var(--opening-text);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.35;
}
.legal-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}
.legal-card p,
.legal-card li {
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.65;
}
.legal-card ul { padding-left: 1.35rem; }
.legal-card li + li { margin-top: 0.35rem; }
.legal-meta {
  margin-bottom: 1.6rem;
  color: rgba(72, 39, 40, 0.72);
  font-size: 0.88rem !important;
}
.legal-notice {
  margin: 1.4rem 0;
  padding: 1rem;
  background: rgba(181, 92, 23, 0.08);
  border-left: 2px solid var(--opening-text);
}
.legal-card a {
  color: var(--opening-text);
  text-underline-offset: 0.28em;
  overflow-wrap: anywhere;
}
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(72, 39, 40, 0.16);
}
.legal-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Home — approved A1.4.3 composition. */
body.page-home #wonder {
  --panel-top: 37.2vh;
  --panel-left: 15.2vw;
  --panel-right: auto;
  --panel-width: 31vw;
  --panel-anchor: 0%;
  --panel-bg: transparent;
  --panel-text: var(--opening-text);
  --panel-align: left;
  --panel-padding: 0;
}
body.page-home #wonder-2 { --panel-top: calc(37.2vh - var(--opening-line-height)); }
body.page-home #life {
  --panel-top: 52%;
  --panel-left: auto;
  --panel-right: 4.5vw;
  --panel-width: 39vw;
  --panel-anchor: -50%;
  --panel-bg: rgba(139, 121, 67, 0.40);
  --panel-text: var(--content-text);
  --panel-align: center;
  --panel-padding: var(--panel-edge);
}
body.page-home #abundance {
  --panel-top: 54%;
  --panel-left: 7.4vw;
  --panel-right: auto;
  --panel-width: 45vw;
  --panel-anchor: -50%;
  --panel-bg: rgba(47, 29, 11, 0.30);
  --panel-text: var(--content-text);
  --panel-align: center;
  --panel-padding: var(--panel-edge);
}
body.page-home #world-of-fruit {
  --panel-top: 49%;
  --panel-left: 7.5vw;
  --panel-right: auto;
  --panel-width: 50vw;
  --panel-anchor: -50%;
  --panel-bg: rgba(83, 56, 14, 0.27);
  --panel-text: var(--content-text);
  --panel-align: left;
  --panel-padding: var(--panel-edge);
}
body.page-home #amberine,
body.page-home #beginning {
  --panel-top: 53%;
  --panel-left: auto;
  --panel-right: 4.5vw;
  --panel-width: 45vw;
  --panel-anchor: -50%;
  --panel-bg: rgba(101, 73, 44, 0.22);
  --panel-text: var(--content-text);
  --panel-align: center;
  --panel-padding: var(--panel-edge);
}
body.page-home #fruit-3 { --panel-width: 54vw; }
body.page-home #amberine-1 { --panel-width: 46vw; }
body.page-home #amberine-2 { --panel-width: 51vw; }
body.page-home #amberine-3 { --panel-width: 49vw; }
body.page-home #beginning { --panel-top: 54%; --panel-width: 47vw; }
body.page-home #wonder .thought__panel .key {
  max-width: 14ch;
  font-size: clamp(1.9rem, 2.72vw, 3.25rem);
  line-height: 1.28;
  text-wrap: pretty;
}
body.page-home #wonder-2 .key--opening-second {
  max-width: none;
  text-align: left;
  text-wrap: nowrap;
}
body.page-home #wonder-2 .key--opening-second span {
  display: block;
  white-space: nowrap;
}
body.page-home #abundance .thought__panel .key { font-size: clamp(2rem, 3.45vw, 3.9rem); }
body.page-home #world-of-fruit .thought__panel .key {
  font-size: clamp(2.2rem, 4.25vw, 4.8rem);
  line-height: 1.18;
}
body.page-home #beginning h2 {
  font-size: clamp(1.65rem, 2.65vw, 3rem);
  line-height: 1.28;
}

/* Forest Garden */
body.page-forest-garden .chapter--living {
  --panel-top: 54%; --panel-right: 4.5vw; --panel-left: auto; --panel-width: 43vw;
  --panel-bg: rgba(72, 39, 40, 0.36); --panel-text: var(--content-text); --panel-align: left;
}
body.page-forest-garden #living-2 { --panel-width: 47vw; }
body.page-forest-garden .chapter--cooperation {
  --panel-top: 55%; --panel-left: 5.5vw; --panel-right: auto; --panel-width: 46vw;
  --panel-bg: rgba(72, 39, 40, 0.34); --panel-text: var(--content-text); --panel-align: left;
}
body.page-forest-garden .chapter--world {
  --panel-top: 54%; --panel-left: 5.5vw; --panel-right: auto; --panel-width: 55vw;
  --panel-bg: rgba(72, 39, 40, 0.30); --panel-text: var(--content-text); --panel-align: left;
}
body.page-forest-garden .chapter--world .thought__panel .key { font-size: clamp(1.8rem, 3.05vw, 3.45rem); }

/* About */
body.page-about .chapter--about {
  --panel-top: 57%; --panel-right: 4.5vw; --panel-left: auto; --panel-width: 44vw;
  --panel-bg: rgba(72, 39, 40, 0.35); --panel-text: var(--content-text); --panel-align: left;
}
body.page-about .chapter--essentials {
  --panel-top: 57%; --panel-left: 4.5vw; --panel-right: auto; --panel-width: 44vw;
  --panel-bg: rgba(72, 39, 40, 0.35); --panel-text: var(--content-text); --panel-align: left;
}
body.page-about .chapter--whole {
  --panel-top: 57%; --panel-right: 4.5vw; --panel-left: auto; --panel-width: 46vw;
  --panel-bg: rgba(72, 39, 40, 0.35); --panel-text: var(--content-text); --panel-align: left;
}
body.page-about .chapter--work {
  --panel-top: 55%; --panel-left: 4.5vw; --panel-right: auto; --panel-width: 49vw;
  --panel-bg: rgba(101, 73, 44, 0.27); --panel-text: var(--content-text); --panel-align: left;
}
body.page-about .chapter--about-forest {
  --panel-top: 55%; --panel-right: 4.5vw; --panel-left: auto; --panel-width: 47vw;
  --panel-bg: rgba(101, 73, 44, 0.27); --panel-text: var(--content-text); --panel-align: left;
}
body.page-about .chapter--work .thought__panel p,
body.page-about .chapter--about-forest .thought__panel p { font-size: clamp(1.05rem, 1.55vw, 1.75rem); }

/* Take part */
body.page-take-part .chapter--take-part {
  --panel-top: 55%; --panel-left: 5.5vw; --panel-right: auto; --panel-width: 43vw;
  --panel-bg: rgba(72, 39, 40, 0.34); --panel-text: var(--content-text); --panel-align: left;
}
body.page-take-part #take-part-1 .thought__panel .key {
  font-size: clamp(1.9rem, 3.8vw, 4.275rem);
}
body.page-take-part #take-part-1 .thought__panel .secondary {
  font-size: clamp(1.045rem, 1.8525vw, 2.09rem);
}
body.page-take-part .functional-panel { margin-left: 0; }
body.page-take-part .functional-panel--narrative {
  color: var(--content-text);
  background: rgba(72, 39, 40, 0.34);
}
body.page-take-part .functional-panel--narrative .participation-grid a {
  color: inherit;
  background: rgba(252, 243, 232, 0.08);
  border: 0;
}
body.page-take-part .functional-panel--narrative .participation-grid a:hover,
body.page-take-part .functional-panel--narrative .participation-grid a:focus-visible {
  background: rgba(252, 243, 232, 0.17);
}
body.page-take-part .functional-panel--narrative .form-back,
body.page-take-part .functional-panel--narrative .submit-button {
  color: inherit;
  border-color: currentColor;
}

/* Gift: both the introduction and the choices are present on arrival. */
body.page-gift .chapter--gift {
  --panel-top: 55%;
  --panel-left: 5.5vw;
  --panel-right: 5.5vw;
  --panel-width: none;
  --panel-bg: transparent;
  --panel-text: var(--content-text);
  --panel-align: left;
}
html.engine-ready body.page-gift .thought--gift-split .thought__panel {
  width: auto;
  max-width: none;
}
.gift-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(20rem, 0.82fr);
  align-items: center;
  gap: clamp(1.25rem, 3.5vw, 4rem);
}
.gift-copy-panel,
.gift-ways-panel {
  color: var(--content-text);
  background: rgba(72, 39, 40, 0.34);
  padding: clamp(1rem, 2vw, 1.8rem);
}
.gift-copy-panel h1,
.gift-copy-panel p,
.gift-ways-panel h2 { margin: 0; }
.gift-ways-panel h2 {
  margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
  font-size: clamp(1.55rem, 2.6vw, 2.75rem);
  line-height: 1.2;
  font-weight: 400;
}
body.page-gift .gift-grid {
  grid-template-columns: 1fr;
}
body.page-gift .gift-option {
  color: inherit;
  background: rgba(252, 243, 232, 0.08);
  border: 0;
}
.gift-details-link {
  display: inline-block;
  margin-top: clamp(0.75rem, 1.2vw, 1rem);
  color: inherit;
  font-size: clamp(0.76rem, 0.95vw, 0.95rem);
  text-underline-offset: 0.3em;
}
.gift-methods {
  display: grid;
  gap: 0.75rem;
}
.gift-method {
  padding: clamp(0.75rem, 1.2vw, 1rem);
  background: rgba(252, 243, 232, 0.1);
}
.gift-method h3,
.gift-method p { margin: 0; }
.gift-method h3 {
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.3;
  font-weight: 500;
}
.gift-method p {
  margin-top: 0.48rem;
  font-size: clamp(0.82rem, 0.94vw, 0.96rem);
  line-height: 1.42;
}
.gift-account {
  display: grid;
  gap: 0.12rem;
}
.gift-account span,
.gift-currency-note { opacity: 0.82; }
.gift-account strong {
  font-size: 1.02em;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.gift-invoice-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.45rem;
  color: inherit;
  font-size: clamp(0.85rem, 1vw, 1rem);
  text-underline-offset: 0.3em;
}

/* Page transition: no white flash. */
body::after {
  content: "";
  position: fixed;
  z-index: 90;
  inset: 0;
  background: #17120b;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}
body.is-leaving::after {
  opacity: 1;
  visibility: visible;
  transition: opacity 260ms ease, visibility 0s linear 0s;
}

@media (max-width: 1100px) {
  .gift-split-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.72fr);
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .site-header { grid-template-columns: 1fr; }
  .logo-link { width: min(15rem, 58vw); }
  .functional-panel { width: min(48rem, 72vw); }
  html.engine-ready body.page-gift .thought--gift-split .thought__panel {
    left: var(--page-inline);
    right: var(--page-inline);
    width: auto;
  }
  .gift-split-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .gift-copy-panel,
  .gift-ways-panel { padding: 0.9rem; }
}

@media (max-width: 760px) {
  :root { --page-inline: clamp(1rem, 5vw, 1.5rem); }
  body.page-home #wonder { --opening-line-height: clamp(2.112rem, 9.216vw, 3.2rem); }
  .sidebar { display: none; }
  .site-header {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  .logo-link { width: min(12rem, 56vw); }
  .thought { padding-right: var(--page-inline); }
  html.engine-ready .thought__panel {
    top: 58%;
    left: var(--page-inline);
    right: var(--page-inline);
    width: auto;
    max-width: none;
    transform: translateY(-50%) translateY(0.7rem);
  }
  html.engine-ready .thought.is-active .thought__panel { transform: translateY(-50%); }
  html.engine-ready body.page-home #wonder .thought__panel {
    top: 37%;
    left: 9vw;
    right: auto;
    width: 68vw;
    transform: none translateY(0.7rem);
  }
  html.engine-ready body.page-home #wonder .thought.is-active .thought__panel { transform: none; }
  html.engine-ready body.page-home #wonder #wonder-2 .thought__panel { top: calc(37% - var(--opening-line-height)); }
  html:not(.engine-ready) .thought__panel { padding: var(--panel-edge); }
  .thought--bare .thought__panel { padding: 0; }
  .thought__panel p,
  .thought__panel li { font-size: clamp(1.05rem, 4.75vw, 1.55rem); }
  .thought__panel .key { font-size: clamp(1.65rem, 7.2vw, 2.55rem); }
  .thought__panel .long { font-size: clamp(0.95rem, 4.05vw, 1.3rem); }
  .thought__panel .compact { font-size: clamp(0.88rem, 3.65vw, 1.18rem); }
  body.page-home #wonder .thought__panel .key { font-size: clamp(1.65rem, 7.2vw, 2.5rem); }
  .thought__panel .secondary { font-size: clamp(1rem, 4.3vw, 1.35rem); }
  body.page-home #beginning h2 { font-size: clamp(1.35rem, 5.6vw, 2rem); }
  .functional-section {
    align-items: start;
    padding-top: max(8rem, env(safe-area-inset-top));
  }
  .functional-panel { width: 100%; padding: 1rem; }
  .participation-grid,
  .gift-grid { grid-template-columns: 1fr; }
  .contact-page { padding-left: 17vw; padding-right: 17vw; }
  .contact-card { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene__image,
  html.engine-ready .thought__panel,
  .sidebar a::before,
  .sidebar a span,
  body::after { transition: none; }
  .scroller { animation: none; opacity: 1; transform: translateY(8px); }
  .touch-cue__dot { animation: none; opacity: 1; transform: translate(-50%, -12px); }
}

@media (forced-colors: active) {
  .thought__panel,
  .functional-panel { background: Canvas; color: CanvasText; }
}

/* Foundation header matched to approved sample. */
body.page-about .site-header {
  --about-nav-top: clamp(0.78rem, 1.18vw, 1.12rem);
  --about-nav-line: clamp(1.05rem, 1.55vw, 1.56rem);
  --about-identity-gap: clamp(0.62rem, 0.95vw, 0.9rem);
  --about-charter-width: clamp(3.7981rem, 4.2655vw, 5.358rem);
  grid-template-columns: auto minmax(8rem, 1fr) auto;
  grid-template-areas: "logo tool nav";
  column-gap: clamp(2.25rem, 4.6vw, 5.75rem);
  padding-bottom: clamp(0.7rem, 1.1vw, 1rem);
  background: rgba(176, 107, 22, 0.22);
}
body.page-about .logo-link { grid-area: logo; }

.about-nav-group {
  grid-area: nav;
  position: relative;
  justify-self: end;
  width: max-content;
  max-width: min(62vw, 46rem);
  pointer-events: none;
}
body.page-about .about-nav-group .primary-nav {
  justify-self: end;
  margin-top: var(--about-nav-top);
  pointer-events: auto;
}

.page-identity {
  position: absolute;
  top: calc(var(--about-nav-top) + var(--about-nav-line) + var(--about-identity-gap));
  left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--nav-text);
  font-size: clamp(1rem, 1.28vw, 1.48rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-align: center;
  transform: none;
  pointer-events: none;
  transition: color var(--text-transition) ease;
}
html[data-header-tone="dark"] .page-identity { color: var(--opening-text); }

.page-identity__line {
  display: block;
  width: max-content;
  max-width: none;
  margin-inline: auto;
  white-space: nowrap;
}

.header-tool {
  grid-area: tool;
  position: relative;
  justify-self: center;
  align-self: start;
  display: inline-grid;
  place-items: center;
  width: var(--about-charter-width);
  height: auto;
  aspect-ratio: 406 / 483;
  margin-top: calc(var(--about-nav-top) + 0.02rem);
  color: var(--nav-text);
  text-decoration: none;
  pointer-events: auto;
  transition: color var(--text-transition) ease, opacity 180ms ease;
}
html[data-header-tone="dark"] .header-tool { color: var(--opening-text); }
.header-tool img {
  display: block;
  width: 100%;
  height: auto;
}
.header-tool span {
  position: absolute;
  top: 50%;
  left: calc(100% + 0.55rem);
  padding: 0.28rem 0.42rem;
  color: currentColor;
  background: rgba(72, 39, 40, 0.76);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(0.3rem, -50%);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}
.header-tool:hover span,
.header-tool:focus-visible span {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 0s;
}
.header-tool:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

/* Contacts: approved warm field beneath logo and navigation. */
body.page-contact .site-header {
  padding-bottom: clamp(0.8rem, 1.5vw, 1.35rem);
  background: rgba(143, 106, 56, 0.22);
}

@media (max-width: 900px) {
  body.page-about .site-header {
    grid-template-columns: auto 1fr;
    grid-template-areas: "logo tool";
    column-gap: 1rem;
    padding-bottom: 0.5rem;
  }
  body.page-about .about-nav-group { display: none; }
  body.page-about .header-tool {
    justify-self: end;
    width: clamp(3.04095rem, 12.901vw, 3.686rem);
    margin-top: 0.1rem;
  }
  .page-identity { display: none; }
}

/* SITE1.0.14 — mobile header, navigation and touch cue. */
.mobile-menu-toggle,
.mobile-menu-panel,
.touch-cue {
  display: none;
}
.touch-cue__label { display: none; }

.mobile-menu-panel[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header,
  body.page-about .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo menu";
    align-items: start;
    column-gap: 1rem;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      clamp(0.8rem, 3vw, 1.1rem)
      max(1rem, env(safe-area-inset-left));
    background: rgba(176, 107, 22, 0.22);
  }

  body.page-contact .site-header {
    background: rgba(143, 106, 56, 0.22);
  }

  .site-header > .primary-nav,
  body.page-about .about-nav-group,
  body.page-about .header-tool {
    display: none;
  }

  .logo-link,
  body.page-about .logo-link {
    grid-area: logo;
    width: min(12rem, 56vw);
  }

  .mobile-menu-toggle {
    grid-area: menu;
    align-self: center;
    justify-self: end;
    display: grid;
    place-items: center;
    width: clamp(3rem, 12.5vw, 3.45rem);
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    color: var(--nav-text);
    background: transparent;
    border: 1.35px solid currentColor;
    border-radius: 50%;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: background 180ms ease, color var(--text-transition) ease;
  }

  html[data-page="home"][data-active-scene="swing"] .mobile-menu-toggle,
  html[data-header-tone="dark"] .mobile-menu-toggle {
    color: var(--opening-text);
  }

  .mobile-menu-toggle:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
  }

  .mobile-menu-toggle[aria-expanded="true"] {
    background: rgba(252, 243, 232, 0.11);
  }

  .mobile-menu-toggle__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
  }

  .mobile-menu-toggle__dot {
    display: block;
    width: 0.24rem;
    height: 0.24rem;
    border-radius: 50%;
    background: currentColor;
  }

  .mobile-menu-panel {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: grid;
    min-height: 100dvh;
    padding:
      max(8rem, calc(env(safe-area-inset-top) + 7rem))
      max(1.5rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1.5rem, env(safe-area-inset-left));
    overflow-y: auto;
    color: #fcf3e8;
    background: rgba(74, 42, 16, 0.985);
    pointer-events: auto;
  }

  body.page-contact .mobile-menu-panel {
    background: rgba(66, 43, 23, 0.985);
  }

  .mobile-primary-nav {
    align-self: center;
    display: grid;
    gap: clamp(1.15rem, 5vh, 2rem);
    width: min(100%, 24rem);
    margin: 0 auto;
    text-align: center;
    font-size: clamp(1.35rem, 6vw, 1.9rem);
    line-height: 1.3;
  }

  .mobile-primary-nav > a {
    display: block;
    padding: 0.25rem;
    text-decoration: none;
    text-underline-offset: 0.3em;
  }

  .mobile-primary-nav > a[aria-current] {
    text-decoration: underline;
  }

  .mobile-primary-nav__charter {
    margin-top: 0.35rem;
    font-size: 0.78em;
  }

  body.mobile-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .scene {
    height: 100dvh;
  }

  .thought,
  .functional-section {
    min-height: 100dvh;
  }

  /* The open sky above the figures is the quiet reading field on portrait screens. */
  html.engine-ready body.page-home #life .thought__panel {
    top: 32%;
    left: 8vw;
    right: 8vw;
    text-align: center;
  }

  /* A touch gesture replaces the desktop mouse symbol. */
  .mousey {
    display: none;
  }

  .touch-cue {
    position: relative;
    display: block;
    width: 34px;
    height: 55px;
    opacity: 0.8;
  }

  .touch-cue::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 9px;
    width: 1px;
    height: 30px;
    background: currentColor;
    transform: translateX(-50%);
  }

  .touch-cue__dot {
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 9px;
    height: 9px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: amberine-touch-rise 2.1s ease-in-out infinite;
  }

  body.swipe-hint-visible .touch-cue__label {
    position: absolute;
    left: 50%;
    bottom: 61px;
    display: block;
    width: max-content;
    max-width: 78vw;
    padding: 0.42rem 0.68rem;
    color: #fcf3e8;
    background: rgba(33, 23, 11, 0.68);
    font-size: 0.76rem;
    line-height: 1.25;
    white-space: nowrap;
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  @keyframes amberine-touch-rise {
    0% { opacity: 0; transform: translate(-50%, 0); }
    18% { opacity: 1; }
    78% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -24px); }
  }
}

/* iPhone landscape: keep the established desktop navigation visible. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 900px) {
  .site-header,
  body.page-about .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo nav";
    align-items: start;
    gap: clamp(1rem, 3vw, 2rem);
    padding:
      max(0.65rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      0
      max(1rem, env(safe-area-inset-left));
    background: transparent;
  }

  body.page-contact .site-header {
    padding-bottom: 0.65rem;
    background: rgba(143, 106, 56, 0.22);
  }

  .logo-link,
  body.page-about .logo-link {
    grid-area: logo;
    width: min(12rem, 27vw);
  }

  .site-header > .primary-nav,
  body.page-about .about-nav-group .primary-nav {
    display: flex;
    gap: clamp(0.8rem, 2.25vw, 1.45rem);
    margin-top: 0.45rem;
    font-size: clamp(0.72rem, 1.55vw, 0.95rem);
  }

  body.page-about .about-nav-group {
    grid-area: nav;
    display: block;
    justify-self: end;
    max-width: none;
  }

  body.page-about .page-identity,
  body.page-about .header-tool,
  .mobile-menu-toggle,
  .mobile-menu-panel {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.mobile-menu-open .logo--opening { opacity: 0 !important; }
  body.mobile-menu-open .logo--light { opacity: 1 !important; }
  body.mobile-menu-open .mobile-menu-toggle { color: #fcf3e8 !important; }

  html.engine-ready body.page-home #life .thought__panel {
    top: 23%;
  }
}


/* SITE1.0.14 — final mobile refinements. */
@media (orientation: portrait) and (max-width: 900px) {
  /* On the opening painting, the sky itself is the reading field. */
  html[data-page="home"][data-active-scene="swing"] .site-header {
    background: transparent;
  }

  html[data-page="home"][data-active-scene="swing"] .logo--opening {
    opacity: 0;
  }

  html[data-page="home"][data-active-scene="swing"] .logo--light {
    opacity: 1;
  }

  html[data-page="home"][data-active-scene="swing"] .mobile-menu-toggle {
    color: #fcf3e8;
  }

  /* A restrained dot rhythm connects the menu button with the open menu. */
  .mobile-primary-nav {
    gap: clamp(1.45rem, 5.6vh, 2.25rem);
  }

  .mobile-primary-nav > a {
    position: relative;
    letter-spacing: 0.01em;
  }

  .mobile-primary-nav > a:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: clamp(-1.05rem, -2.8vh, -0.72rem);
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.48;
    transform: translateX(-50%);
  }

  .mobile-primary-nav > a[aria-current] {
    text-decoration: none;
  }

  .mobile-primary-nav > a[aria-current]::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.28rem;
    width: 2.7rem;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%);
  }
}

/* The gift page needs a native, compact composition in short landscape viewports. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 900px),
       (orientation: landscape) and (max-height: 520px) {
  body.page-gift {
    overflow-y: auto;
  }

  html.engine-ready body.page-gift .thought--gift-split {
    display: block;
    min-height: 100dvh;
    padding:
      max(5.4rem, calc(env(safe-area-inset-top) + 4.7rem))
      max(1rem, env(safe-area-inset-right))
      max(1.25rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  html.engine-ready body.page-gift .thought--gift-split .thought__panel,
  html.engine-ready body.page-gift .thought--gift-split.is-active .thought__panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: min(100%, 68rem);
    max-width: none;
    margin: 0 auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  body.page-gift .gift-split-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(15.5rem, 0.8fr);
    align-items: stretch;
    gap: clamp(0.65rem, 2vw, 1.1rem);
  }

  body.page-gift .gift-copy-panel,
  body.page-gift .gift-ways-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(0.75rem, 1.65vw, 1rem);
  }

  body.page-gift .gift-copy-panel .key {
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.15;
  }

  body.page-gift .gift-copy-panel .secondary.compact {
    margin-top: 0.55rem;
    font-size: clamp(0.82rem, 1.65vw, 1.02rem);
    line-height: 1.34;
  }

  body.page-gift .gift-ways-panel h2 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.2rem, 2.35vw, 1.55rem);
    line-height: 1.2;
  }

  body.page-gift .gift-grid {
    gap: 0.45rem;
  }

  body.page-gift .gift-option {
    min-height: 0;
    padding: 0.7rem 0.8rem;
    font-size: clamp(0.82rem, 1.55vw, 0.98rem);
  }
}

/* SITE1.0.24 — additive navigation and section tools only. */
.nav-language-inline,
.nav-language {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin-left: clamp(0.2rem, 0.6vw, 0.6rem);
  font-size: 0.68em;
  line-height: 1;
  white-space: nowrap;
}
.nav-language-inline a,
.nav-language a { opacity: 0.62; text-decoration: none; }
.nav-language-inline a.is-active,
.nav-language a.is-active { opacity: 1; text-decoration: underline; text-underline-offset: 0.28em; }
.mobile-language-switch { display: none; }

.amberine-toolstrip {
  display: flex;
  align-items: start;
  justify-content: center;
  color: var(--nav-text);
}
.amberine-tool {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(3.1rem, 3.65vw, 4.15rem);
  height: clamp(3.55rem, 4.1vw, 4.7rem);
  color: var(--nav-text);
  text-decoration: none;
}
.amberine-tool__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.amberine-tool__label {
  position: absolute;
  top: calc(100% + 0.15rem);
  left: 50%;
  padding: 0.24rem 0.38rem;
  color: #fcf3e8;
  background: rgba(72,39,40,.86);
  font-size: .68rem;
  line-height: 1.15;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, .16rem);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}
.amberine-tool:hover .amberine-tool__label,
.amberine-tool:focus-visible .amberine-tool__label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%,0);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s;
}
.amberine-tool:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.amberine-tool.is-disabled { cursor: help; }
.mobile-amberine-toolstrip { display:none; }

/* Forest Garden: Base + Atlas evenly share only the free field between logo and menu. */
@media (min-width: 901px) {
  body.page-forest-garden .site-header {
    grid-template-columns: auto minmax(10rem,1fr) auto;
    grid-template-areas: "logo tools nav";
    column-gap: 0;
  }
  body.page-forest-garden .logo-link { grid-area: logo; }
  body.page-forest-garden .primary-nav { grid-area: nav; }
  body.page-forest-garden .amberine-toolstrip--forest {
    grid-area: tools;
    width: 100%;
    margin-top: clamp(.12rem,.38vw,.38rem);
    padding-inline: clamp(.65rem,1.25vw,1.25rem);
    justify-content: space-evenly;
    box-sizing: border-box;
  }
  body.page-forest-garden .amberine-tool:first-child {
    width: clamp(4.55rem,5.05vw,5.55rem);
    height: clamp(3.45rem,3.75vw,4.15rem);
  }
  body.page-forest-garden .amberine-tool:last-child {
    width: clamp(4.095rem,4.545vw,4.995rem); /* Atlas exactly 10% smaller */
    height: clamp(3.105rem,3.375vw,3.735rem);
  }
}

/* About retains the approved v1.0.14 composition: section signs occupy the old Charter field. */
body.page-about .amberine-toolstrip--about {
  grid-area: tool;
  position: relative;
  justify-self: center;
  align-self: start;
  gap: clamp(.24rem,.46vw,.5rem);
  margin-top: calc(var(--about-nav-top) + .02rem);
}
body.page-about .amberine-toolstrip--about .amberine-tool {
  width: clamp(2.65rem,3.05vw,3.65rem);
  height: clamp(3.3rem,3.8vw,4.45rem);
}

/* Support / Gift: one section sign in the otherwise unused middle field. */
@media (min-width:901px) {
  body.page-take-part .site-header,
  body.page-gift .site-header,
  body.page-all-opportunities .site-header {
    grid-template-columns: auto minmax(6rem,1fr) auto;
    grid-template-areas: "logo tools nav";
    column-gap: clamp(1rem,2vw,2rem);
  }
  body.page-take-part .logo-link,
  body.page-gift .logo-link,
  body.page-all-opportunities .logo-link { grid-area:logo; }
  body.page-take-part .primary-nav,
  body.page-gift .primary-nav,
  body.page-all-opportunities .primary-nav { grid-area:nav; }
  body.page-take-part .amberine-toolstrip--center,
  body.page-gift .amberine-toolstrip--center,
  body.page-all-opportunities .amberine-toolstrip--center {
    grid-area:tools;
    align-self:start;
    margin-top:clamp(.25rem,.6vw,.6rem);
  }
}

/* All opportunities: native scrolling starts below the fixed header. */
body.page-all-opportunities { height:100dvh; overflow:hidden; }
body.page-all-opportunities .site-header {
  padding-bottom: clamp(.72rem,1.15vw,1.02rem);
  background: rgba(176,107,22,.22);
}
.opportunities-viewport {
  position: fixed;
  z-index:8;
  top: var(--opportunities-header-bottom,8.8rem);
  right:0; bottom:0; left:0;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
}
.opportunities-content { width:min(76rem,100%); margin:0 auto; padding:clamp(1.4rem,3.6vw,3.2rem) var(--page-inline) max(4rem,env(safe-area-inset-bottom)); }
.opportunities-intro { max-width:min(55rem,92vw); margin-bottom:clamp(1.4rem,2.6vw,2.2rem); color:var(--content-text); }
.opportunities-intro h1,.opportunities-intro p,.opportunity-group h2,.opportunity-group ul { margin:0; }
.opportunities-intro h1 { font-size:clamp(2rem,3.7vw,3.8rem); line-height:1.18; font-weight:400; }
.opportunities-intro p { margin-top:.7rem; font-size:clamp(1rem,1.38vw,1.32rem); line-height:1.5; }
.opportunities-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(1.05rem,2.2vw,1.75rem) clamp(1.2rem,2.5vw,2rem); align-items:start; }
.opportunity-group { color:var(--content-text); }
.opportunity-group h2 { margin-bottom:.7rem; font-size:clamp(1.16rem,1.7vw,1.62rem); line-height:1.35; font-weight:400; }
.opportunity-group ul { display:grid; gap:.44rem; padding:0; list-style:none; }
.opportunity-group li { font-size:clamp(.86rem,1.02vw,1rem); line-height:1.48; }
.opportunity-group li::before { content:"— "; }
.opportunities-intro h1 > span,.opportunities-intro p > span,.opportunity-group h2 > span,.opportunity-group li > span,.opportunity-action {
  padding:.06em .16em; background:rgba(72,39,40,.35); -webkit-box-decoration-break:clone; box-decoration-break:clone;
}
.opportunity-action { display:inline-block; margin-top:.82rem; color:var(--content-text); font-size:clamp(.84rem,.98vw,.96rem); line-height:1.4; text-underline-offset:.3em; }

@media (max-width:900px) {
  .nav-language-inline,.nav-language,.amberine-toolstrip { display:none !important; }
  .mobile-language-switch {
    position:absolute; right:0; bottom:max(1.1rem,env(safe-area-inset-bottom)); left:0;
    display:flex; justify-content:center; gap:.4em; font-size:1rem; line-height:1;
  }
  .mobile-language-switch a { color:#ead6bc; opacity:1; text-decoration:none; }
  .mobile-language-switch a.is-active { color:#fff8ee; opacity:1; text-decoration:underline; text-underline-offset:.28em; }
  .mobile-amberine-toolstrip {
    display:flex; justify-content:center; gap:clamp(1.4rem,8vw,2.2rem);
    margin-top:clamp(1rem,3.3vh,1.55rem); padding-top:clamp(.9rem,2.8vh,1.25rem);
    border-top:1px solid rgba(252,243,232,.2);
  }
  .mobile-amberine-tool {
    display:grid; justify-items:center; gap:.34rem; width:min(5.8rem,26vw);
    color:#fcf3e8; font-size:.72rem; line-height:1.2; text-align:center; text-decoration:none;
  }
  .mobile-amberine-tool.is-disabled { color:#CAAF84; }
  .mobile-amberine-tool .amberine-tool__img { width:2.8rem; height:3.2rem; }
  body.page-forest-garden .mobile-amberine-tool:first-child .amberine-tool__img { width:3.3rem; height:3.1rem; }
  body.page-forest-garden .mobile-amberine-tool:last-child .amberine-tool__img { width:2.97rem; height:2.79rem; }
  .mobile-amberine-tool__status { display:block; margin-top:.16rem; font-size:.82em; opacity:.78; }
  .opportunities-grid { grid-template-columns:1fr; gap:1.35rem; }
  .opportunities-content { padding-top:1.25rem; }
}

@media (orientation:landscape) and (min-width:600px) and (max-width:900px) {
  .nav-language-inline,.nav-language { display:inline-flex; margin-left:.15rem; font-size:.62em; }
  body.page-forest-garden .site-header {
    grid-template-columns:auto minmax(7rem,1fr) auto;
    grid-template-areas:"logo tools nav";
    column-gap:0;
  }
  body.page-forest-garden .amberine-toolstrip--forest {
    grid-area:tools; width:100%; margin-top:.12rem; padding-inline:.45rem; justify-content:space-evenly;
  }
  body.page-forest-garden .amberine-tool:first-child { width:2.45rem; height:2.05rem; }
  body.page-forest-garden .amberine-tool:last-child { width:2.205rem; height:1.845rem; }
  .amberine-tool__label { display:none; }
  .opportunities-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* SITE1.0.24 — section signs must remain interactive inside the inert header. */
.amberine-tool {
  pointer-events: auto;
}


/* SITE1.0.26 — form fit repair only; wheel engine remains v1.0.25 unchanged. */
body.page-take-part [data-participation-form] {
  padding: clamp(1rem, 1.65vw, 1.55rem);
  max-height: calc(
    100svh
    - max(clamp(8rem, 15vh, 11rem), env(safe-area-inset-top))
    - max(clamp(4rem, 10vh, 7rem), env(safe-area-inset-bottom))
  );
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.page-take-part [data-participation-form] .amberine-form { gap: .58rem; }
body.page-take-part [data-participation-form] .field { gap: .24rem; }
body.page-take-part [data-participation-form] .field input,
body.page-take-part [data-participation-form] .field select { min-height: 2.55rem; padding-block: .52rem; }
body.page-take-part [data-participation-form] .field textarea { min-height: 5.25rem; padding-block: .52rem; }
body.page-take-part [data-participation-form] .form-back { margin-bottom: .45rem; }
body.page-take-part [data-participation-form] .form-status { min-height: 1.15em; }

/* The same existing form, when summoned from All opportunities, must remain wholly reachable below the fixed header. */
body.page-all-opportunities .opportunities-form-panel:not([hidden]) {
  margin: clamp(1rem, 2.2vw, 1.8rem) var(--page-inline) max(1.5rem, env(safe-area-inset-bottom));
  max-height: calc(100dvh - var(--opportunities-header-bottom, 8.8rem) - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (orientation: portrait) and (max-width: 900px) {
  body.page-take-part [data-participation-form] {
    max-height: calc(100svh - max(7rem, env(safe-area-inset-top)) - max(2rem, env(safe-area-inset-bottom)));
  }
}

/* SITE1.0.39 — responsive navigation, readable functional pages and honest gift status. */
.gift-status {
  margin: 0;
  padding: .8rem .9rem;
  font-size: clamp(.95rem, 1.15vw, 1.08rem);
  line-height: 1.5;
  background: rgba(252, 243, 232, .1);
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (min-width: 901px) {
  html.engine-ready body.page-plan-journey .thought--plan-left .thought__panel {
    left: clamp(4rem, 8vw, 9rem);
    right: auto;
    width: min(35rem, 38vw);
    max-width: 38vw;
  }
  html.engine-ready body.page-plan-journey .thought--plan-right .thought__panel {
    left: auto;
    right: clamp(4rem, 8vw, 9rem);
    width: min(35rem, 38vw);
    max-width: 38vw;
  }
}

@media (max-width: 900px) {
  /* Compact navigation is used in portrait and landscape; the desktop row no longer collides. */
  .site-header > .primary-nav,
  body.page-about .about-nav-group,
  body.page-about .about-nav-group .primary-nav,
  .nav-language-inline,
  .nav-language,
  .amberine-toolstrip {
    display: none !important;
  }
  .mobile-menu-toggle { display: grid !important; }
  .mobile-menu-panel:not([hidden]) { display: grid !important; }
  body.mobile-menu-open .story,
  body.mobile-menu-open .plan-viewport,
  body.mobile-menu-open .opportunities-viewport,
  body.mobile-menu-open .contact-page,
  body.mobile-menu-open .details-page,
  body.mobile-menu-open .scroll-indicator-wrap {
    visibility: hidden;
  }
  .mobile-primary-nav > a[aria-current] { text-decoration: none; }
  .mobile-primary-nav > a[aria-current]::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -.28rem;
    width: 2.7rem;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%);
  }

  .field label,
  .consent-row,
  .gift-status,
  .foundation-details dt,
  .foundation-details dd,
  .contact-role,
  .contact-phone,
  .contact-details-link,
  .opportunity-group li,
  .opportunity-action,
  body.page-plan .plan-block li {
    font-size: 1rem;
  }
  .contact-name,
  .contact-email { font-size: clamp(1rem, 4.4vw, 1.3rem); }
  .opportunity-group h2 { font-size: clamp(1.15rem, 4.7vw, 1.42rem); }
  .opportunity-action { min-height: 2.75rem; padding-block: .55rem; }
}

@media (orientation: landscape) and (max-width: 900px) and (max-height: 520px) {
  .site-header,
  body.page-about .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo menu";
    padding:
      max(.55rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      .45rem
      max(1rem, env(safe-area-inset-left));
  }
  .logo-link,
  body.page-about .logo-link { width: min(10rem, 27vw); }
  .mobile-menu-toggle { width: 2.85rem; }
  .mobile-menu-panel {
    align-content: start;
    padding:
      max(4.2rem, calc(env(safe-area-inset-top) + 3.7rem))
      max(1.25rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
  }
  .mobile-primary-nav {
    align-self: start;
    gap: .7rem;
    font-size: clamp(1rem, 3.8vh, 1.3rem);
  }
  .mobile-primary-nav > a:not(:last-child)::after { display: none; }
  .mobile-amberine-toolstrip {
    gap: 1.1rem;
    margin-top: .55rem;
    padding-top: .55rem;
  }
  .mobile-amberine-tool .amberine-tool__img { width: 2.25rem; height: 2.5rem; }
  .mobile-language-switch {
    position: static;
    align-self: end;
    margin-top: .75rem;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  body.page-gift { overflow-y: auto; }
  html.engine-ready body.page-gift .thought--gift-split {
    display: block;
    min-height: 100dvh;
    padding:
      max(7rem, calc(env(safe-area-inset-top) + 6.2rem))
      max(1rem, env(safe-area-inset-right))
      max(1.5rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }
  html.engine-ready body.page-gift .thought--gift-split .thought__panel,
  html.engine-ready body.page-gift .thought--gift-split.is-active .thought__panel {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    max-width: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  body.page-gift .gift-split-layout { grid-template-columns: 1fr; }
  body.page-gift .gift-copy-panel,
  body.page-gift .gift-ways-panel { padding: 1rem; }
}

/* v1.0.27 — Plan: one continuous, businesslike vertical ribbon. */
body.page-plan { height:100dvh; overflow:hidden; }
body.page-plan .scene__image[data-scene-image="pomona"] { opacity:1; }
body.page-plan .plan-viewport {
  position:fixed;
  z-index:8;
  top:var(--plan-header-bottom, 9.2rem);
  right:0; bottom:0; left:0;
  overflow-x:hidden; overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
}
body.page-plan .plan-content {
  width:min(66rem,100%);
  margin:0 auto;
  padding:clamp(1.35rem,3vw,2.7rem) var(--page-inline) max(5rem,env(safe-area-inset-bottom));
  color:var(--content-text);
}
body.page-plan .plan-intro { margin-bottom:clamp(1.8rem,3.4vw,3rem); }
body.page-plan .plan-intro h1,
body.page-plan .plan-stage,
body.page-plan .plan-block h2,
body.page-plan .plan-block ul,
body.page-plan .plan-number,
body.page-plan .plan-next-stage h2 { margin:0; }
body.page-plan .plan-intro h1 { font-size:clamp(2rem,3.5vw,3.5rem); line-height:1.15; font-weight:400; }
body.page-plan .plan-stage { margin-top:.7rem; font-size:clamp(1.05rem,1.4vw,1.35rem); line-height:1.4; }
body.page-plan .plan-intro h1,
body.page-plan .plan-stage,
body.page-plan .plan-block h2,
body.page-plan .plan-number,
body.page-plan .plan-block li,
body.page-plan .plan-next-stage h2 {
  width:fit-content; max-width:100%; padding:.06em .16em;
  background:rgba(72,39,40,.35);
  -webkit-box-decoration-break:clone; box-decoration-break:clone;
}
body.page-plan .plan-block { margin:0 0 clamp(2rem,4vw,3.8rem); }
body.page-plan .plan-number { margin-bottom:.45rem; font-size:clamp(.78rem,.92vw,.92rem); line-height:1.3; }
body.page-plan .plan-block h2 { margin-bottom:.85rem; font-size:clamp(1.3rem,2vw,1.85rem); line-height:1.32; font-weight:400; }
body.page-plan .plan-block ul { display:grid; gap:.5rem; padding:0; list-style:none; }
body.page-plan .plan-block li { font-size:clamp(.9rem,1.05vw,1.02rem); line-height:1.52; }
body.page-plan .plan-block li::before { content:"— "; }
body.page-plan .plan-next-stage { padding:clamp(.5rem,1vw,1rem) 0 1rem; }
body.page-plan .plan-next-stage h2 { font-size:clamp(1.5rem,2.4vw,2.3rem); line-height:1.3; font-weight:400; }

/* Keep the submit label optically centered in its button. */
.submit-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1.15;
  min-height:2.65rem;
}

@media (orientation:portrait) and (max-width:900px) {
  body.page-plan .plan-viewport { top:max(6.8rem, calc(env(safe-area-inset-top) + 5.9rem)); }
  body.page-plan .plan-content { padding-top:1.2rem; }
}

/* SITE1.0.28 — server-side contact form. */
.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}


/* SITE1.0.32 — portrait composition, stable mobile forms and cache-safe delivery. */

/* The Plan is an operational document and uses the clearest light tone. */
body.page-plan .plan-content { color: var(--light-text); }

@media (orientation: portrait) and (max-width: 900px) {
  /* The painting remains behind the open menu; page copy never shows through it. */
  body.mobile-menu-open .story,
  body.mobile-menu-open .plan-viewport,
  body.mobile-menu-open .opportunities-viewport,
  body.mobile-menu-open .contact-page,
  body.mobile-menu-open .details-page,
  body.mobile-menu-open .scroll-indicator-wrap {
    visibility: hidden;
  }

  html.touch-stepper-ready,
  html.touch-stepper-ready body {
    overscroll-behavior-y: none;
  }

  .details-page {
    place-items: start center;
    padding:
      max(7.4rem, calc(env(safe-area-inset-top) + 6.5rem))
      max(1rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }
  .details-card {
    width: 100%;
    padding: 1rem;
  }
  .details-card h1 { font-size: clamp(1.5rem, 7vw, 2.1rem); }
  .foundation-details > div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }
  .foundation-details dt,
  .foundation-details dd { font-size: clamp(0.76rem, 3.45vw, 0.95rem); }

  /* Keep the three About signs and their captions on one optical baseline. */
  body.page-about .mobile-amberine-toolstrip { align-items: flex-start; }
  body.page-about .mobile-amberine-tool {
    grid-template-rows: 3.2rem auto;
    gap: .18rem;
  }
  body.page-about .mobile-amberine-tool .amberine-tool__img { align-self: center; }
  body.page-about .mobile-amberine-tool > span {
    display: flex;
    min-height: 2.25rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.18;
  }

  /* Opening: both statements occupy the same unbroken field of sky. */
  html.engine-ready body.page-home #wonder .thought__panel,
  html.engine-ready body.page-home #wonder #wonder-2 .thought__panel {
    top: 31.5%;
    left: 8.5vw;
    right: 7vw;
    width: auto;
    max-width: none;
  }
  body.page-home #wonder .thought__panel .key {
    max-width: 84vw;
    font-size: clamp(1.55rem, 6.45vw, 2.3rem);
    line-height: 1.28;
  }
  /* v1.0.33: desktop keeps the approved three-line cadence; on portrait,
     the last two fragments share one line. */
  body.page-home #wonder-2 .key--opening-second {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: .32em;
    width: max-content;
    max-width: 84vw;
    white-space: normal;
  }
  body.page-home #wonder-2 .key--opening-second span {
    display: block;
    white-space: nowrap;
  }
  body.page-home #wonder-2 .key--opening-second span:first-child {
    grid-column: 1 / -1;
  }

  /* Home paintings: each text block has its own quiet field. */
  html.engine-ready body.page-home #life .thought__panel {
    top: 18.5%;
    left: 8vw;
    right: 8vw;
    width: auto;
    text-align: center;
  }
  html.engine-ready body.page-home #abundance .thought__panel {
    top: 55%;
    left: 5vw;
    right: 38vw;
    width: auto;
    text-align: left;
  }
  body.page-home .scene__image[data-scene-image="still-life"] {
    object-position: 38% 50% !important;
  }
  body.page-home #abundance .thought__panel .key {
    font-size: clamp(1.35rem, 5.45vw, 2rem);
  }
  body.page-home #abundance-2 .thought__panel .key {
    font-size: clamp(1.25rem, 5.05vw, 1.85rem);
  }
  body.page-home #abundance .thought__panel .secondary {
    font-size: clamp(.88rem, 3.8vw, 1.12rem);
  }
  html.engine-ready body.page-home #world-of-fruit .thought__panel {
    top: 31%;
    left: 7vw;
    right: 7vw;
    width: auto;
    text-align: left;
  }
  body.page-home #world-of-fruit .thought__panel .key {
    font-size: clamp(1.55rem, 6.1vw, 2.25rem);
  }
  body.page-home .scene__image[data-scene-image="garden"] {
    object-position: 38% 50% !important;
  }
  html.engine-ready body.page-home #amberine .thought__panel {
    top: 75%;
    left: 6vw;
    right: 34vw;
    width: auto;
    text-align: left;
  }
  html.engine-ready body.page-home #beginning .thought__panel {
    top: 78%;
    left: 6vw;
    right: 6vw;
    width: auto;
    text-align: center;
  }
  body.page-home #amberine .thought__panel .key,
  body.page-home #beginning .thought__panel h2 {
    font-size: clamp(1.35rem, 5.45vw, 2rem);
  }
  body.page-home #beginning .thought__panel .secondary {
    font-size: clamp(.98rem, 4vw, 1.22rem);
  }

  /* About: move Pomona to the right and keep all copy away from her face. */
  body.page-about:not(.page-plan) .scene__image[data-scene-image="pomona"],
  body.page-plan .scene__image[data-scene-image="pomona"] {
    object-position: 35% 50% !important;
  }
  body.page-about:not(.page-plan) .scene__image[data-scene-image="garden"] {
    object-position: 38% 50% !important;
  }
  html.engine-ready body.page-about:not(.page-plan) .chapter--about .thought__panel,
  html.engine-ready body.page-about:not(.page-plan) .chapter--essentials .thought__panel,
  html.engine-ready body.page-about:not(.page-plan) .chapter--whole .thought__panel {
    left: 5vw;
    right: 35vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  html.engine-ready body.page-about:not(.page-plan) .chapter--about .thought__panel { top: 68%; }
  html.engine-ready body.page-about:not(.page-plan) .chapter--essentials .thought__panel { top: 62%; }
  html.engine-ready body.page-about:not(.page-plan) .chapter--whole .thought__panel { top: 71%; }
  body.page-about:not(.page-plan) .chapter--about .thought__panel .long,
  body.page-about:not(.page-plan) .chapter--essentials .thought__panel .long,
  body.page-about:not(.page-plan) .chapter--whole .thought__panel .long {
    font-size: clamp(.86rem, 3.55vw, 1.08rem);
    line-height: 1.4;
  }
  body.page-about:not(.page-plan) .chapter--essentials .thought__panel .secondary {
    font-size: clamp(.88rem, 3.65vw, 1.12rem);
  }
  html.engine-ready body.page-about:not(.page-plan) .chapter--about-forest .thought__panel {
    top: 76%;
    left: 6vw;
    right: 6vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  body.page-about:not(.page-plan) .chapter--about-forest .thought__panel .key {
    font-size: clamp(1.28rem, 5.15vw, 1.9rem);
  }
  body.page-about:not(.page-plan) .chapter--about-forest .thought__panel .compact {
    font-size: clamp(.82rem, 3.4vw, 1.02rem);
    line-height: 1.38;
  }

  /* The English Plan still uses the approved step-by-step journey. */
  body.page-plan-journey .scene__image[data-scene-image="pomona"] {
    object-position: 35% 50% !important;
  }
  html.engine-ready body.page-plan-journey .chapter--plan .thought__panel {
    top: 67%;
    left: 5vw;
    right: 35vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  body.page-plan-journey .chapter--plan .thought__panel .long {
    font-size: clamp(1.08rem, 4.45vw, 1.42rem);
  }
  body.page-plan-journey .chapter--plan .thought__panel .compact {
    font-size: clamp(.8rem, 3.3vw, 1rem);
  }

  /* Forest Garden: the figure is held to the right; the reading field stays left. */
  body.page-forest-garden .scene__image[data-scene-image="grape"] {
    object-position: 35% 49% !important;
  }
  html.engine-ready body.page-forest-garden .chapter--living .thought__panel,
  html.engine-ready body.page-forest-garden .chapter--cooperation .thought__panel {
    top: 67%;
    left: 5vw;
    right: 35vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  html.engine-ready body.page-forest-garden .chapter--world .thought__panel {
    top: 63%;
    left: 6vw;
    right: 6vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  body.page-forest-garden .thought__panel .key {
    font-size: clamp(1.35rem, 5.45vw, 2rem);
  }
  body.page-forest-garden .thought__panel .long {
    font-size: clamp(.84rem, 3.45vw, 1.06rem);
    line-height: 1.4;
  }

  /* Participation: preserve the woman on the right and the invitation on the left. */
  body.page-take-part:not(.page-all-opportunities) .scene__image[data-scene-image="woman"] {
    object-position: 43% 50% !important;
  }
  html.engine-ready body.page-take-part:not(.page-all-opportunities) #take-part-1 .thought__panel {
    top: 64%;
    left: 5vw;
    right: 34vw;
    width: auto;
    max-width: none;
    text-align: left;
  }
  body.page-take-part:not(.page-all-opportunities) #take-part-1 .thought__panel .key {
    font-size: clamp(1.32rem, 5.3vw, 1.95rem);
  }
  body.page-take-part:not(.page-all-opportunities) #take-part-1 .thought__panel .secondary {
    font-size: clamp(.84rem, 3.45vw, 1.05rem);
    line-height: 1.4;
  }

  /* Plan: a narrow left ribbon leaves Pomona visible throughout the native scroll. */
  body.page-plan .plan-viewport {
    top: max(6.8rem, calc(env(safe-area-inset-top) + 5.9rem));
  }
  body.page-plan .plan-content {
    width: 74vw;
    margin: 0 auto 0 4vw;
    padding: 1.15rem .25rem max(4rem, env(safe-area-inset-bottom));
  }
  body.page-plan .plan-intro h1 { font-size: clamp(1.7rem, 7vw, 2.25rem); }
  body.page-plan .plan-stage { font-size: clamp(.92rem, 3.8vw, 1.12rem); }
  body.page-plan .plan-block h2 { font-size: clamp(1.12rem, 4.6vw, 1.42rem); }
  body.page-plan .plan-block li { font-size: clamp(.78rem, 3.25vw, .96rem); }

  /* On the narrative participation page the form becomes its own stable viewport. */
  html.participation-form-open { overflow: hidden; }
  body.page-take-part:not(.page-all-opportunities).participation-form-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
  }
  html.engine-ready body.page-take-part:not(.page-all-opportunities).participation-form-open
    [data-participation-form]:not([hidden]) {
    position: fixed;
    z-index: 34;
    top: max(6.7rem, calc(env(safe-area-inset-top) + 5.8rem));
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(.75rem, env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
    width: auto;
    max-height: none;
    margin: 0;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--content-text);
    background: rgba(72, 39, 40, .94);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  body.page-take-part:not(.page-all-opportunities).participation-form-open .sidebar,
  body.page-take-part:not(.page-all-opportunities).participation-form-open .scroll-indicator-wrap {
    visibility: hidden;
  }
body.page-take-part [data-participation-form] input,
  body.page-take-part [data-participation-form] textarea,
  body.page-take-part [data-participation-form] select {
    font-size: 1rem;
  }
}

/* SITE1.0.39 — final optical polish; swipe and form controllers are unchanged. */
.contact-phone {
  margin-top: 0.72rem;
}

@media (min-width: 901px) {
  /* Both source SVGs use the same canvas, but the Database drawing sits lower
     inside it. This compensates for that internal whitespace, not the tool row. */
  body.page-forest-garden .amberine-toolstrip--forest
    .amberine-tool:first-child .amberine-tool__img {
    transform: translateY(-0.32rem);
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  /* The opening pair rises by half a text line without changing its X axis. */
  html.engine-ready body.page-home #wonder .thought__panel,
  html.engine-ready body.page-home #wonder #wonder-2 .thought__panel {
    top: calc(31.5% - 0.82rem);
  }

  /* These thoughts now use the quiet fields requested in testing. */
  html.engine-ready body.page-home #life .thought__panel {
    top: 61.5%;
  }
  html.engine-ready body.page-home #world-of-fruit .thought__panel {
    top: 50%;
  }

  /* Keep the About tools in one genuine grid: section links no longer inherit
     the dots, padding or active underline of the four principal menu links. */
  body.page-about .mobile-amberine-toolstrip {
    align-items: flex-start;
  }
  body.page-about .mobile-amberine-tool {
    grid-template-rows: 3.2rem 2.7rem;
    align-content: start;
    padding: 0;
  }
  body.page-about .mobile-amberine-tool > span {
    min-height: 2.7rem;
  }

  /* Forest-garden explanations gain the unused field above them. */
  html.engine-ready body.page-forest-garden #living-2 .thought__panel,
  html.engine-ready body.page-forest-garden #cooperation-2 .thought__panel,
  html.engine-ready body.page-forest-garden #cooperation-3 .thought__panel {
    top: 56.5%;
  }
  body.page-forest-garden #living-2 .thought__panel .long,
  body.page-forest-garden #cooperation-2 .thought__panel .long,
  body.page-forest-garden #cooperation-3 .thought__panel .long {
    font-size: clamp(0.99rem, 4.15vw, 1.24rem);
    line-height: 1.36;
  }

  /* About: retain every horizontal position and use more of the free height. */
  html.engine-ready body.page-about:not(.page-plan) #about-1 .thought__panel {
    top: 55%;
  }
  html.engine-ready body.page-about:not(.page-plan) #essentials-1 .thought__panel {
    top: 53.5%;
  }
  html.engine-ready body.page-about:not(.page-plan) #whole-1 .thought__panel,
  html.engine-ready body.page-about:not(.page-plan) #whole-2 .thought__panel,
  html.engine-ready body.page-about:not(.page-plan) #whole-3 .thought__panel {
    top: 56%;
  }
  body.page-about:not(.page-plan) #about-1 .thought__panel .long,
  body.page-about:not(.page-plan) #whole-1 .thought__panel .long,
  body.page-about:not(.page-plan) #whole-2 .thought__panel .long,
  body.page-about:not(.page-plan) #whole-3 .thought__panel .long {
    font-size: clamp(0.99rem, 4.15vw, 1.24rem);
    line-height: 1.36;
  }
  body.page-about:not(.page-plan) #essentials-1 .thought__panel .long,
  body.page-about:not(.page-plan) #essentials-1 .thought__panel .secondary {
    font-size: clamp(0.99rem, 4.15vw, 1.24rem);
    line-height: 1.36;
  }

  /* Participation: a wider reading field shortens the block, so it can rise
     four lines while its text and underlay remain safely below the logo. */
  html.engine-ready body.page-take-part:not(.page-all-opportunities)
    #take-part-1 .thought__panel {
    top: 52.5%;
    left: 5vw;
    right: 18vw;
  }
  body.page-take-part:not(.page-all-opportunities)
    #take-part-1 .thought__panel .key {
    font-size: clamp(1.38rem, 5.55vw, 2.02rem);
    line-height: 1.27;
  }
  body.page-take-part:not(.page-all-opportunities)
    #take-part-1 .thought__panel .secondary {
    font-size: clamp(1.08rem, 4.35vw, 1.38rem);
    line-height: 1.36;
  }
}

/* Keep functional copy at a comfortable minimum after all historical page overrides. */
@media (max-width: 900px) {
  .field label,
  .consent-row,
  .gift-status,
  .gift-method p,
  .gift-invoice-link,
  .foundation-details dt,
  .foundation-details dd,
  .contact-role,
  .contact-phone,
  .contact-details-link,
  .opportunity-group li,
  .opportunity-action,
  body.page-plan .plan-block li {
    font-size: 1rem;
    line-height: 1.5;
  }
  .contact-name,
  .contact-email { font-size: clamp(1rem, 4.4vw, 1.3rem); }
  .opportunity-group h2 { font-size: clamp(1.15rem, 4.7vw, 1.42rem); }
}

/* SITE1.0.39 — keep the landscape Life statements below the logo and above the figures. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 900px) and (max-height: 520px) {
  html.engine-ready body.page-home #life .thought__panel,
  html.engine-ready body.page-home #life .thought.is-active .thought__panel {
    top: max(4rem, calc(env(safe-area-inset-top) + 3.75rem));
    left: 8vw;
    right: auto;
    width: 55vw;
    max-width: 55vw;
    text-align: center;
    transform: none;
  }

  body.page-home #life .thought__panel p,
  body.page-home #life .thought__panel .key {
    font-size: clamp(1.05rem, 2.25vw, 1.18rem);
    line-height: 1.32;
  }
}

/* SITE1.0.39 — the Forest Garden desktop tool row must not create an
   implicit second header row after landscape switches to the compact menu. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 900px) and (max-height: 520px) {
  body.page-forest-garden .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo menu";
  }
}

/* SITE1.0.39 — use the quiet fields already present in the portrait paintings
   to keep supporting copy genuinely readable without moving it onto figures. */
@media (orientation: portrait) and (max-width: 900px) {
  body.page-home #abundance .thought__panel .secondary,
  body.page-home #beginning .thought__panel .secondary,
  body.page-about:not(.page-plan) #about-forest-1 .thought__panel .compact,
  body.page-plan-journey .chapter--plan .thought__panel .compact,
  body.page-gift .gift-details-link {
    font-size: 1rem;
    line-height: 1.4;
  }

  body.page-plan-journey .chapter--plan .thought__panel .eyebrow {
    font-size: 0.9rem;
    line-height: 1.35;
  }
}

/* The English step-by-step Plan formerly began at x=0 in phone landscape.
   A real safe margin keeps its underlay and first letters inside the frame. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 900px) and (max-height: 520px) {
  html.engine-ready body.page-plan-journey .chapter--plan .thought__panel,
  html.engine-ready body.page-plan-journey .chapter--plan .thought.is-active .thought__panel {
    left: max(1rem, env(safe-area-inset-left));
    right: auto;
    width: min(40vw, 22rem);
    max-width: 40vw;
    text-align: left;
  }
}

/* On the shortest 320 px portrait viewport the enlarged Forest Garden copy
   rises into the empty field below the figure's face instead of being clipped. */
@media (orientation: portrait) and (max-width: 340px) and (max-height: 640px) {
  html.engine-ready body.page-about:not(.page-plan) #about-forest-1 .thought__panel {
    top: 70.5%;
  }
}

/* SITE1.0.41 — comfortable touch targets without changing the paintings or typography. */
@media (max-width: 900px) {
  body.page-take-part [data-participation-form] .field input,
  body.page-take-part [data-participation-form] .field select,
  body.page-take-part [data-participation-form] .submit-button,
  body.page-take-part [data-participation-form] .form-back {
    min-height: 2.75rem;
  }

  .contact-email,
  .contact-phone,
  .contact-details-link,
  .gift-details-link,
  .details-back,
  .foundation-details a[href] {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .contact-email,
  .contact-phone,
  .contact-details-link {
    justify-self: center;
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  body.page-take-part:not(.page-all-opportunities).participation-form-open
    .chapter .thought__panel {
    visibility: hidden;
    pointer-events: none;
  }
}

/* A quiet authorial 404 page, built from the same visual language as Amberine. */
.page-not-found {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--light-text);
}

.not-found-page {
  position: relative;
  z-index: 3;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(7.5rem, calc(env(safe-area-inset-top) + 6.5rem))
    max(1.25rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
}

.not-found-card {
  width: min(34rem, 100%);
  margin-left: clamp(0rem, 8vw, 7rem);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: rgba(72, 39, 40, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.not-found-code,
.not-found-card h1,
.not-found-card p {
  margin: 0;
}

.not-found-code {
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
}

.not-found-card h1 {
  max-width: 18ch;
  font-size: clamp(1.7rem, 4.5vw, 3.4rem);
  line-height: 1.2;
  font-weight: 400;
}

.not-found-card p {
  max-width: 42ch;
  margin-top: 1rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  margin-top: 1.4rem;
}

.not-found-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: inherit;
  text-underline-offset: 0.32em;
}

@media (max-width: 900px) {
  .not-found-card {
    margin: auto 0 0;
  }
}

@media (max-width: 340px) and (max-height: 640px) {
  .page-not-found {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .not-found-page {
    min-height: 100%;
    padding-top: max(5.5rem, calc(env(safe-area-inset-top) + 5rem));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .not-found-card {
    padding: 1rem;
  }

  .not-found-code {
    margin-bottom: 0.45rem;
  }

  .not-found-card h1 {
    font-size: 1.48rem;
    line-height: 1.18;
  }

  .not-found-card p {
    margin-top: 0.7rem;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .not-found-actions {
    gap: 0.4rem 1rem;
    margin-top: 0.75rem;
  }
}

@media (max-width: 900px) {
  .legal-page {
    padding-top: max(7.25rem, calc(env(safe-area-inset-top) + 6.5rem));
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
  .legal-card { padding: clamp(1rem, 5vw, 1.5rem); }
  .legal-card p,
  .legal-card li { font-size: 1rem; line-height: 1.62; }
  .privacy-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .privacy-dialog__surface {
    max-height: calc(100dvh - 1rem);
    padding: 1rem;
  }
}
