/* MindCall website, direction "The Call" (website/DESIGN.md).
   The colours mirror src/constants/palette.ts, whose final hex codes are still
   an open decision (DECISIONS.md, Open 1). When the app's palette changes,
   change these too. */

/* Self-hosted, not from Google Fonts: a request to Google's servers would
   send every visitor's IP address there, which the privacy policy does not
   cover. Both faces are under the SIL Open Font License (fonts/OFL-*.txt). */
@font-face { font-family: "Outfit"; font-weight: 300; font-display: swap; src: url("fonts/Outfit_300Light.woff2") format("woff2"), url("fonts/Outfit_300Light.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("fonts/Outfit_400Regular.woff2") format("woff2"), url("fonts/Outfit_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("fonts/Outfit_500Medium.woff2") format("woff2"), url("fonts/Outfit_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("fonts/Outfit_600SemiBold.woff2") format("woff2"), url("fonts/Outfit_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Reenie Beanie"; font-weight: 400; font-display: swap; src: url("fonts/ReenieBeanie_400Regular.woff2") format("woff2"), url("fonts/ReenieBeanie_400Regular.ttf") format("truetype"); }

:root {
  --bg: #FDFCF8;
  --surface: #FFFFFF;
  --sage: #E8EFE8;
  --lavender: #EFEDF4;
  --text: #292524;
  /* A shade darker than the spec's #78716C, which fails 4.5:1 on the pastels. */
  --muted: #6B645F;
  --faint: #A8A29E;
  /* Apricot is a fill, never text: on paper it is far under 4.5:1. */
  --accent: #FF9F6E;
  --on-accent: #292524;
  --ink: #292524;
  --on-ink: #FDFCF8;
  --border: #E7E5E4;
  --border-soft: #F5F5F4;
  --field: #FAFAF9;
  --end: #B5402F;
  --glass: rgb(253 252 248 / 0.72);
  --todo-bg: #FFE9A8;
  --todo-text: #4A3A00;

  --sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --script: "Reenie Beanie", "Bradley Hand", cursive;

  --radius: 2rem;
  --radius-lg: 2.5rem;
  /* Shadows tinted toward stone, never pure black. */
  --shadow: 0 4px 20px -2px rgb(41 37 36 / 0.06);
  --shadow-phone: 0 40px 80px -30px rgb(41 37 36 / 0.45);

  /* Touch answers fast; arrivals are slower, on purpose. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --press: 160ms;
  --quick: 200ms;
  --arrive: 600ms;

  --nav: 4.5rem;
  --gutter: 1rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1917;
    --surface: #292524;
    --sage: #2A322B;
    --lavender: #322F3A;
    --text: #F5F5F4;
    --muted: #A8A29E;
    --faint: #78716C;
    --ink: #F5F5F4;
    --on-ink: #1C1917;
    --border: #3A3532;
    --border-soft: #302B29;
    --field: #231F1D;
    --end: #D9604A;
    --glass: rgb(41 37 36 / 0.72);
    --shadow: 0 4px 20px -2px rgb(0 0 0 / 0.35);
    --shadow-phone: 0 40px 80px -30px rgb(0 0 0 / 0.7);
    --todo-bg: #5A4A10;
    --todo-text: #FFF3C4;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--text); --border: var(--text); --border-soft: var(--text); }
}

@media (min-width: 40rem) { :root { --gutter: 1.5rem; } }

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav) + 2rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

h1, h2, h3 { text-wrap: balance; font-weight: 500; letter-spacing: -0.025em; }
p, li, dd { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 0.375rem; }

.skip {
  position: absolute; left: 1rem; top: -100%; z-index: 60;
  background: var(--surface); color: var(--text); padding: 0.75rem 1.25rem; border-radius: 999px;
}
.skip:focus-visible { top: 0.75rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 45rem; }
.narrow-wide { max-width: 56rem; }

/* The handwritten word: one per heading at most, for the word that matters. */
.script {
  font-family: var(--script); font-weight: 400; letter-spacing: 0;
  font-size: 1.25em; line-height: 0.8;
  color: var(--muted);
}

/* ── Grain: a fixed, untouchable layer of noise so flat colour reads as paper. */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.3; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-contrast: more) { .grain { display: none; } }

/* ── The mark: the Level m (design/logo/kit), a mask so it takes the text colour. */
.mark {
  display: inline-block; flex: none; width: 2rem; height: 2rem; background: var(--text);
  -webkit-mask: url("mark.svg") center / contain no-repeat; mask: url("mark.svg") center / contain no-repeat;
}
.brand-name { font-weight: 600; text-transform: lowercase; letter-spacing: 0; }

/* ── Floating nav ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0.75rem; left: 50%; z-index: 40;
  transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 52rem);
  min-height: var(--nav);
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.brand {
  display: inline-flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; min-width: 2.75rem;
  font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none;
  margin-right: auto;
}
.site-header nav { display: flex; align-items: center; gap: 0.125rem; }
.site-header nav a:not(.cta) {
  color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; border-radius: 999px;
  transition: color var(--quick) ease;
}
.site-header nav a[aria-current="page"] { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .site-header nav a:not(.cta):hover { color: var(--text); }
}
.cta {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.125rem;
  background: var(--ink); color: var(--on-ink); border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform var(--press) var(--ease-out);
}
.cta:active { transform: scale(0.97); }
/* Under 360px there is room for one text link; Privacy stays in the footer. */
@media (max-width: 22.4rem) {
  .site-header nav a[href$="privacy"]:not([aria-current]) { display: none; }
}
@media (max-width: 30rem) {
  .site-header { padding-left: 0.75rem; }
  .site-header nav a:not(.cta) { padding: 0 0.4rem; font-size: 0.875rem; white-space: nowrap; }
  .cta { padding: 0 0.875rem; font-size: 0.875rem; }
  .brand .brand-name { display: none; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0 1.5rem; border-radius: 999px;
  font: 500 1rem/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
/* Hover only where there is a pointer to hover with: a tap must not stick. */
@media (hover: hover) and (pointer: fine) {
  .btn-ink, .cta, .play, .lines .ways a { transition: transform var(--press) var(--ease-out), background-color var(--quick) ease; }
  .btn-ink:hover, .cta:hover, .play:hover, .lines .ways a:not(.quiet):hover { background-color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
  .hero .btn-ink:hover { background-color: #3A3532; }
  .lines .ways a.quiet:hover { background-color: var(--border-soft); }
  .faq summary { transition: background-color var(--quick) ease; }
  .faq summary:hover { background-color: var(--field); }
  .seg-btn[aria-pressed="false"]:hover { color: var(--muted); }
}
.btn-ink { background: var(--ink); color: var(--on-ink); }
/* On the apricot panel the ink stays stone in both themes. */
.hero .btn-ink { background: #292524; color: #FDFCF8; }
.hero :focus-visible { outline-color: #292524; }

/* A status, said plainly, until there is a store link to put in its place.
   Not a form: there is no list to join, and a field that collects an email
   and does nothing with it is a promise we cannot keep. */
.status-pill {
  display: inline-flex; align-items: center; min-height: 3.25rem; padding: 0 1.375rem;
  border-radius: 999px; font-weight: 500; white-space: nowrap; cursor: default;
  background: rgb(253 252 248 / 0.5); color: #292524;
}
.status-pill.on-paper { border-color: var(--border); background: var(--surface); color: var(--text); }

main { padding-top: calc(var(--nav) + 1.5rem); }
section { position: relative; }

/* ── 1. Hero: the call comes in ──────────────────────────────────────────────
   The page's one loud moment. Apricot carries the panel; stone text on it is
   7.5:1. Muted stone is not used here (it falls under 3:1 on apricot). */
.hero { padding: 0 0.75rem; }
.hero-panel {
  max-width: 76rem; margin: 0 auto;
  background: var(--accent); color: #292524;
  border-radius: var(--radius-lg);
  display: grid; overflow: hidden; isolation: isolate;
  padding: 2.75rem 1.25rem 0;
}
.hero .eyebrow { margin: 0; font-size: 0.9375rem; font-weight: 500; }
.hero h1 {
  font-size: clamp(2.75rem, 11.5vw, 5.25rem); line-height: 1; letter-spacing: -0.035em;
  margin: 0.875rem 0 1.25rem; max-width: 11em;
}
.hero h1 .script { color: #292524; }
.hero .lede { font-size: 1.1875rem; line-height: 1.5; max-width: 28rem; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-phone { display: flex; justify-content: center; margin-top: 3rem; height: 25rem; }
.hero-phone .phone { width: 17rem; height: 34rem; }

@media (min-width: 56rem) {
  .hero { padding: 0 1.25rem; }
  .hero-panel {
    grid-template-columns: 1.15fr 0.85fr; align-items: center;
    padding: 3rem 4rem; min-height: min(46rem, calc(100dvh - var(--nav) - 3rem));
  }
  .hero-phone { margin-top: 0; height: auto; }
  .hero-phone .phone { width: 19rem; height: 39rem; }
}

/* ── The phone, and the call screen inside it (src/app/(app)/call.tsx) ───── */
.phone {
  flex: none; position: relative;
  border-radius: 3rem; padding: 0.625rem;
  background: #1C1917; box-shadow: var(--shadow-phone);
}
.screen {
  height: 100%; border-radius: 2.4rem; overflow: hidden;
  background: var(--bg); color: var(--text);
}
.call-screen {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 3.25rem 1.25rem 1.75rem;
}
.call-top .who { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.call-top .state { color: var(--muted); font-size: 1rem; }
.orb {
  position: relative; width: 9.5rem; height: 9.5rem; margin: 2.75rem 0 2rem; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 0 60px -10px var(--accent);
}
.orb::after {
  content: ""; width: 54%; height: 54%; background: #292524;
  -webkit-mask: url("mark.svg") center / contain no-repeat; mask: url("mark.svg") center / contain no-repeat;
}
.orb-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
}
.hint {
  font-size: 0.875rem; color: var(--text);
  background: var(--lavender); border-radius: 999px; padding: 0.5rem 1rem;
}
.controls { display: flex; gap: 1.25rem; margin-top: auto; }
.ctrl { display: grid; justify-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--muted); }
.disc {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--lavender);
  display: grid; place-items: center;
}
.disc svg { width: 1.375rem; height: 1.375rem; fill: var(--text); }
.disc.end { background: var(--end); }
.disc.end svg { fill: var(--bg); width: 1.625rem; height: 1.625rem; }

/* The circle breathes while it listens: two rings leave it and fade, four
   seconds a breath. Constant motion, so it is linear in time and slow; under
   Reduce Motion the rings stay hidden and the circle holds still. */
@keyframes ring {
  from { transform: scale(1); opacity: 0.55; }
  to { transform: scale(1.55); opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .orb-ring { animation: ring 4s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
  .orb-ring + .orb-ring { animation-delay: 2s; }
}

/* ── Arrival ─────────────────────────────────────────────────────────────────
   The hero settles in once on load; everything else rises 16px and fades in
   the first time it is seen, staggered 60ms. Only with the script running, so
   without it everything is simply there. Under Reduce Motion: a fade, no
   movement. */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise var(--arrive) var(--ease-out) both; }
  .hero-copy .rise:nth-child(2) { animation-delay: 60ms; }
  .hero-copy .rise:nth-child(3) { animation-delay: 120ms; }
  .hero-copy .rise:nth-child(4) { animation-delay: 180ms; }
  .hero-phone.rise { animation-delay: 200ms; animation-duration: 900ms; }

  html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--arrive) var(--ease-out), transform var(--arrive) var(--ease-out); transition-delay: var(--d, 0ms); }
  html.js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: fade 400ms ease both; }
  html.js .reveal { opacity: 0; transition: opacity 400ms ease; }
  html.js .reveal.in { opacity: 1; }
}

/* ── Section rhythm ──────────────────────────────────────────────────────── */
.thoughts, .how, .privacy, .faq-section { padding-block: clamp(4rem, 10vw, 7rem); }
.thoughts { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.nowrap { white-space: nowrap; }
section h2 { font-size: clamp(2.125rem, 6.5vw, 3.25rem); line-height: 1.05; margin: 0 0 1rem; }
.section-lede { color: var(--muted); font-size: 1.125rem; max-width: 36rem; margin: 0; }

/* ── 2. Thoughts: a strip you flick through sideways ─────────────────────── */
.thought-strip {
  list-style: none; margin: 2.5rem 0 0; padding: 0.5rem max(var(--gutter), calc((100vw - 68rem) / 2 + var(--gutter))) 1.5rem;
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - 68rem) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.thought-strip::-webkit-scrollbar { display: none; }
.thought-strip:focus-visible { outline-offset: -2px; border-radius: 1.5rem; }
.thought-strip li {
  flex: none; width: min(18rem, 78vw); min-height: 10.5rem; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  background: var(--surface); border-radius: 1.5rem; padding: 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--border-soft);
}
.thought-strip time { font-size: 0.875rem; color: var(--muted); }
.thought-strip p { margin: 0; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }
/* With a mouse there is no flick, so on wide screens the strip wraps instead:
   staggered, like notes on a wall, every one in reach. */
@media (min-width: 64rem) {
  .thought-strip {
    overflow: visible; flex-wrap: wrap; justify-content: center; row-gap: 2.75rem; scroll-snap-type: none;
    max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter); padding-bottom: 3rem;
  }
  .thought-strip li { width: calc((100% - 2rem) / 3); }
  .thought-strip li:nth-child(3n + 2) { transform: translateY(1.5rem); }
}

/* ── 3. How a call goes: a call log, one hairline down the side ──────────── */
.steps { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 3.5rem; }
.step { display: grid; gap: 1.5rem; padding-left: 1.5rem; border-left: 1px solid var(--border); }
.step h3 { font-size: clamp(1.75rem, 5vw, 2.25rem); line-height: 1.1; margin: 0 0 0.75rem; }
.step-text p { margin: 0 0 0.75rem; color: var(--muted); max-width: 34rem; }
.step-text p:last-child { margin-bottom: 0; }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.photo { margin: 0; }
@media (min-width: 56rem) {
  .step { grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; padding-left: 2.5rem; }
  .step:nth-child(2) .step-media { margin-top: 0.5rem; }
}

.example-tag { margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.convo {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); display: grid; gap: 0.75rem; font-size: 1rem; line-height: 1.45;
}
.bubble { max-width: 85%; }
.bubble.me { justify-self: end; background: var(--lavender); padding: 0.625rem 1rem; border-radius: 1.25rem 1.25rem 0.375rem 1.25rem; }
.bubble.app { justify-self: start; display: grid; grid-template-columns: 1.375rem 1fr; gap: 0.625rem; }
.avatar { width: 1.375rem; height: 1.375rem; margin-top: 0.1rem; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.avatar::after {
  content: ""; width: 60%; height: 60%; background: #292524;
  -webkit-mask: url("mark-small.svg") center / contain no-repeat; mask: url("mark-small.svg") center / contain no-repeat;
}
.recap { margin-top: 0.5rem; background: var(--sage); border-radius: 1.25rem; padding: 1.125rem 1.25rem; }
.recap-title { margin: 0 0 0.5rem; font-weight: 500; }
.recap dl { margin: 0; display: grid; gap: 0.5rem; }
.recap dt { font-size: 0.8125rem; color: var(--muted); }
.recap dd { margin: 0; }

/* ── 4. Read it, or hear it ─────────────────────────────────────────────── */
.listen { padding-block: 1rem clamp(4rem, 10vw, 7rem); }
.listen-panel {
  background: var(--lavender); border-radius: var(--radius-lg);
  padding: 2.5rem 1.25rem; display: grid; gap: 2.25rem;
}
.listen-copy p { color: var(--muted); max-width: 30rem; margin: 0 0 1.25rem; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.facts li { padding-left: 1.25rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.625rem; height: 1px; background: var(--text); }
@media (min-width: 56rem) {
  .listen-panel { grid-template-columns: 0.9fr 1.1fr; padding: 4rem; gap: 4rem; align-items: center; }
}

.answer {
  background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
/* Segmented control: the thumb slides under the chosen word. */
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 0.25rem;
  background: var(--field); border: 1px solid var(--border); border-radius: 999px; max-width: 16rem;
}
.seg-thumb {
  position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0.25rem; width: calc(50% - 0.25rem);
  background: var(--ink); border-radius: 999px;
  transition: transform var(--quick) var(--ease-out);
}
.answer[data-mode="listen"] .seg-thumb { transform: translateX(100%); }
.seg-btn {
  position: relative; min-height: 2.75rem; border: 0; background: none; cursor: pointer;
  font: 500 0.9375rem/1 var(--sans); color: var(--text); border-radius: 999px;
  transition: color var(--quick) ease;
}
.seg-btn[aria-pressed="true"] { color: var(--on-ink); }
.seg-btn:focus-visible { outline-offset: 2px; border-radius: 999px; }

/* The player opens below the toggle in Listen mode (rows, not height). */
.player { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 250ms var(--ease-out); }
.answer[data-mode="listen"] .player { grid-template-rows: 1fr; }
.player-inner {
  overflow: hidden; min-height: 0; display: flex; align-items: center; gap: 0.75rem;
  opacity: 0; transition: opacity var(--quick) ease;
}
.answer[data-mode="listen"] .player-inner { opacity: 1; padding-top: 1rem; }
.play {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--ink); display: grid; place-items: center;
  transition: transform var(--press) var(--ease-out);
}
.play:active { transform: scale(0.94); }
.play svg { width: 1rem; height: 1rem; fill: var(--on-ink); }
.play[data-playing="true"] .when-paused, .play[data-playing="false"] .when-playing { display: none; }
.voice { font-size: 0.9375rem; font-weight: 500; }
.speed { margin-left: auto; font-size: 0.875rem; color: var(--muted); }

.answer-text { margin: 1.25rem 0 0; font-size: 1.1875rem; line-height: 1.6; font-weight: 300; }
.answer-text .s { border-radius: 0.375rem; padding: 0.05em 0.15em; margin: 0 -0.15em; transition: background-color 300ms ease, color 300ms ease; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* As in the app (SpokenText): while following, the rest is muted and the
   sentence being spoken sits on sage. */
.answer[data-mode="listen"] .answer-text .s { color: var(--muted); }
.answer[data-mode="listen"] .answer-text .s.on { color: var(--text); background: var(--sage); }
.answer-note { margin: 1rem 0 0; font-size: 0.875rem; color: var(--muted); }
.answer[data-mode="read"] .when-listen, .answer[data-mode="listen"] .when-read { display: none; }
@media (prefers-reduced-motion: reduce) {
  .answer-text .s, .seg-thumb, .player, .player-inner { transition: none; }
}

/* ── 5. Patterns, on sage, full bleed ───────────────────────────────────── */
.patterns { background: var(--sage); padding-block: clamp(4rem, 10vw, 7rem); }
.patterns-grid { display: grid; gap: 2.5rem; }
.patterns-photo { margin: 0; }
.patterns-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 60% 50%; border-radius: var(--radius); }
.patterns-copy > p { max-width: 32rem; margin: 0 0 1rem; color: var(--muted); }
.cards { display: grid; gap: 0.875rem; max-width: 26rem; }
.patterns-copy .example-tag { margin-top: 2rem; }
.pcard { background: var(--surface); border-radius: 1.5rem; padding: 1.25rem 1.375rem; box-shadow: var(--shadow); }
.pcard p { margin: 0; font-size: 1.125rem; line-height: 1.4; }
.pcard .pill { display: inline-block; margin-bottom: 0.625rem; font-size: 0.8125rem; background: var(--sage); border-radius: 999px; padding: 0.2rem 0.625rem; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  html.js .pcard.reveal.in:nth-of-type(1) { transform: rotate(-1deg); }
  html.js .pcard.reveal.in:nth-of-type(2) { transform: rotate(1deg) translateX(1.5rem); }
}
@media (min-width: 56rem) {
  .patterns-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
  .patterns-photo img { aspect-ratio: 4 / 5; }
  /* The cards lean over the photo's edge, like notes left on it. */
  .cards { margin-left: -7rem; }
}

/* ── 6. Privacy: a ledger, the verb doing the work ──────────────────────── */
.ledger { margin: 2.5rem 0 0; max-width: 56rem; }
.ledger .row { display: grid; gap: 0.25rem 2rem; padding-block: 1.5rem; border-bottom: 1px solid var(--border); }
.ledger .row:first-child { border-top: 1px solid var(--border); }
.ledger dt { font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.ledger dd { margin: 0; font-size: 1.125rem; color: var(--muted); max-width: 36rem; align-self: center; }
@media (min-width: 40rem) { .ledger .row { grid-template-columns: 11rem 1fr; } }
.privacy-foot { margin: 1.75rem 0 0; color: var(--muted); }

/* ── 7. FAQ ──────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 0.625rem; margin-top: 2rem; max-width: 45rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 1.25rem;
  interpolate-size: allow-keywords;
}
.faq summary {
  list-style: none; cursor: pointer; border-radius: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.5rem; padding: 1.125rem 1.375rem; font-weight: 500; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 1rem; height: 1rem;
  background:
    linear-gradient(var(--text), var(--text)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 1.5px 100% no-repeat;
  transition: transform var(--quick) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.375rem 1.375rem; color: var(--muted); }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 250ms var(--ease-out), content-visibility 250ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  .faq details::details-content, .faq summary::after { transition: none; }
}

/* ── 8. The close ────────────────────────────────────────────────────────── */
.get { text-align: center; padding-block: clamp(4rem, 10vw, 6.5rem); }
/* The app icon, as it sits on a home screen: stone m on apricot. */
.app-icon {
  width: 4.5rem; height: 4.5rem; margin: 0 auto 1.75rem; border-radius: 1.25rem;
  background: var(--accent); display: grid; place-items: center;
}
.app-icon::after {
  content: ""; width: 62%; height: 62%; background: #292524;
  -webkit-mask: url("mark.svg") center / contain no-repeat; mask: url("mark.svg") center / contain no-repeat;
}
.get h2 { font-size: clamp(2.5rem, 8vw, 3.75rem); line-height: 1.02; }
.get p { color: var(--muted); max-width: 26rem; margin: 0 auto 2rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--border); font-size: 0.9375rem; }
.disclaimer { margin: 0 0 1.5rem; max-width: 40rem; color: var(--text); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; justify-content: space-between; color: var(--muted); }
.site-footer .brand { font-size: 0.9375rem; margin: 0; color: var(--muted); }
.site-footer .brand .mark { width: 1.375rem; height: 1.375rem; background: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0 -0.625rem; }
.site-footer nav a { color: var(--muted); display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.625rem; }

/* ── Documents: privacy, terms, crisis resources, open ──────────────────── */
.doc { padding-top: calc(var(--nav) + 3rem); padding-bottom: 4rem; }
.doc h1 { font-size: clamp(2.5rem, 9vw, 3.5rem); line-height: 1.05; margin: 0 0 0.5rem; }
.doc .meta { color: var(--muted); font-size: 0.9375rem; margin: 0 0 2rem; }
.doc h2 { font-size: 1.625rem; line-height: 1.2; margin: 3rem 0 0.75rem; }
.doc h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; margin: 1.75rem 0 0.5rem; }
.doc p, .doc li { font-weight: 300; font-size: 1.125rem; line-height: 1.7; }
.doc strong { font-weight: 500; }
.doc ul { padding-left: 1.375rem; }
.doc li + li { margin-top: 0.375rem; }
.doc .summary {
  background: var(--sage); border-radius: var(--radius); padding: 0.75rem 2rem 1rem; margin-bottom: 0.5rem;
}
.doc .summary h2 { margin-top: 1.25rem; }

.toc {
  font-size: 0.9375rem; columns: 2; column-gap: 2rem; margin: 1.5rem 0 0;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.25rem 2.75rem; box-shadow: var(--shadow);
}
.toc li { font-weight: 400 !important; font-size: 0.9375rem !important; break-inside: avoid; }
.toc a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; }
.toc li + li { margin-top: 0 !important; }

.table-scroll { overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; border-radius: 1rem; border: 1px solid var(--border); }
@supports (animation-timeline: scroll()) {
  @keyframes edges {
    from { --fade-start: 0px; --fade-end: 2rem; }
    10% { --fade-start: 2rem; }
    90% { --fade-end: 2rem; }
    to { --fade-start: 2rem; --fade-end: 0px; }
  }
  @property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
  @property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
  .table-scroll {
    animation: edges linear both;
    animation-timeline: scroll(self inline);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
  }
}
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; min-width: 32.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 500; background: var(--lavender); }

mark.todo { background: var(--todo-bg); color: var(--todo-text); border-radius: 4px; padding: 0 4px; font-size: 0.9em; }

/* Crisis resources: the number first, big enough to hit with a shaking thumb. */
.urgent {
  background: var(--sage); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 0 0 2.5rem;
}
.urgent p { margin: 0; font-weight: 400 !important; }
.lines { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0.75rem; }
.lines li { margin: 0 !important; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 1.25rem; padding: 1.125rem 1.25rem; }
.lines .name { font-weight: 500; display: block; }
.lines .note { display: block; color: var(--muted); font-size: 1rem; }
.lines .ways { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.lines .ways a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.125rem; border-radius: 999px;
  background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 500; font-size: 1rem;
  transition: transform var(--press) var(--ease-out);
}
.lines .ways a.quiet { background: var(--field); color: var(--text); border: 1px solid var(--border); }
.lines .ways a:active { transform: scale(0.97); }

@media (max-width: 35rem) {
  body { font-size: 1rem; }
  .toc { columns: 1; }
  .doc p, .doc li { font-size: 1.0625rem; }
}
