/* ============================================================================
   page.css: /for/seizure-tracking/  (scroll-craft v5, the aging-parents format)
   Same format as /for/aging-parents/: one take through one long day in one room.
   The ground is a fixed layer (.ap-day) that never cuts; the acts are pinned frames
   that hand off over it. The class prefix stays "ap-" because this sheet is the aging
   sheet carried over; what is this page's own is marked "SEIZURE" below (the drifting
   scraps of paper instead of group-text bubbles, the peak lines, the medication list,
   the readout caption).
   Rules for THIS page only. The engine (/sc/scrollcraft.css) and the brand tokens
   (/sc/brand.css) are never edited. Colours come from var(--sc-*) / var(--ch-*) so
   both themes follow html[data-theme]. page.js writes the day's light into the
   --ap-* variables on <html> and sets body[data-ink].
   ========================================================================== */

:root {
  /* THE ONE WIDTH. Apple.com: 980px content column inside a 1024px box, 22px gutters
     (16px below 833px). Every text column, phone group, header and footer row sits
     inside it. Grounds, the day layer and the leaves are decoration and run full bleed. */
  --wrapmax: 1024px;
  --gut: 22px;
  --vw: min(1vw, 10.24px);          /* 1vw, but never more than 1% of the 1024px box */
  --navh: 60px;
  --font-body: var(--sc-font-text);       /* aliases consent.js reads */
  --font-display: var(--sc-font-display);

  --ap-link: #425030;                /* sage for small text on cream and on warm grounds (>= 4.5:1) */
  --ap-leaf1: #7A8B5C;
  --ap-leaf2: #4A6741;
  --ap-vein: rgba(250, 246, 240, .30);
  --ap-glow: 255 196 120;            /* lamp light, r g b */

  /* defaults the script overwrites on <html> as the day moves */
  --ap-g0: 247 239 226;
  --ap-g1: 250 246 240;
  --ap-sx: 24; --ap-sy: 22; --ap-sr: -9; --ap-sa: .5; --ap-sc: 244 214 150;
  --ap-lo: 0; --ap-bo: .5;
}
@media (max-width: 833px) { :root { --gut: 16px; --navh: 56px; } }
html[data-theme="dark"] {
  --ap-link: #D3DFAE;
  --ap-leaf1: #6B7C4F;
  --ap-leaf2: #3E5736;
  --ap-vein: rgba(242, 237, 230, .16);
  --ap-g0: 38 35 30; --ap-g1: 28 27 24;
}

html { overflow-x: clip; scroll-padding-top: 4.5rem; }
body { overflow-x: clip; background: rgb(var(--ap-g1)); font-family: var(--sc-font-text); }
main { overflow-x: clip; position: relative; z-index: 1; }

/* the night (light theme only): the ink turns cream. Dark theme is already cream ink. */
html[data-theme="light"] body[data-ink="night"] {
  --sc-ink: #F2EDE6;
  --sc-ink-soft: #CFC7BC;
  --sc-accent: #9DAE7A;
  --sc-accent-ink: #1C1B18;
  --sc-hairline: #48433D;
  --sc-hairline-strong: #5A544C;
  --ap-link: #B8C68F;
  --ap-vein: rgba(242, 237, 230, .16);
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ap-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; left: 1rem; top: .75rem; z-index: 2000;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  padding: .7rem 1.1rem; border-radius: var(--sc-r-pill); font-weight: 600; text-decoration: none;
  transform: translateY(-220%);
}
.skip-link:focus { transform: none; }

.ap-wrap { width: 100%; max-width: var(--wrapmax); margin-inline: auto; padding-inline: var(--gut); }

/* ------------------------------------------------------------ type kit -- */
.ap-label {
  font-family: var(--sc-font-text); font-weight: 600; font-size: .75rem; line-height: 1.5;
  letter-spacing: .16em; text-transform: uppercase; color: var(--sc-ink-soft); margin: 0;
}
.ap-label--lead { margin-bottom: 1.1rem; }
.ap-h1, .ap-h2, .ap-h3, .ap-strain, .ap-big, .ap-line {
  font-family: var(--sc-font-display); font-weight: 500; margin: 0; color: var(--sc-ink); text-wrap: balance;
}
.ap-h1 {
  font-size: clamp(2.1rem, 1.05rem + calc(4.3 * var(--vw)), 4.35rem);
  line-height: 1.04; letter-spacing: -.026em; font-weight: 600;
}
.ap-h1 em, .ap-h2 em { font-style: italic; font-weight: 500; color: var(--ap-link); }
.ap-h2 {
  font-size: clamp(1.9rem, 1.1rem + calc(3.4 * var(--vw)), 3.6rem);
  line-height: 1.06; letter-spacing: -.024em; font-weight: 600;
}
.ap-h2--s { font-size: clamp(1.6rem, 1.1rem + calc(2.1 * var(--vw)), 2.5rem); letter-spacing: -.018em; }
.ap-h2--xl { font-size: clamp(2.3rem, 1.2rem + calc(4.6 * var(--vw)), 4.6rem); letter-spacing: -.03em; line-height: 1.02; }
.ap-h3 {
  font-size: clamp(1.45rem, 1.1rem + calc(1.45 * var(--vw)), 2.2rem);
  line-height: 1.14; letter-spacing: -.016em; font-weight: 600;
}
.ap-h4 {
  font-family: var(--sc-font-display); font-weight: 600; margin: 0; color: var(--sc-ink);
  font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em;
}
.ap-lead {
  font-size: clamp(1.02rem, .95rem + .45vw, 1.28rem); line-height: 1.6; color: var(--sc-ink-soft);
  max-width: 54ch; margin: 1.1rem 0 0; text-wrap: pretty;
}
.ap-body {
  font-size: var(--sc-t-base); line-height: 1.72; color: var(--sc-ink-soft);
  max-width: 58ch; margin: 0; text-wrap: pretty;
}
.ap-big {
  font-size: clamp(1.55rem, 1rem + calc(2.55 * var(--vw)), 2.7rem);
  line-height: 1.2; letter-spacing: -.016em; max-width: 24em; text-wrap: pretty;
}
.ap-link {
  color: var(--ap-link); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .26em;
  transition: color 140ms var(--sc-ease-out);
}
.ap-link:hover { color: var(--sc-ink); }
.ap-link--big { font-size: 1.05rem; padding-block: .6rem; display: inline-block; }

.ap-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .8rem 1.6rem; border-radius: var(--sc-r-md);
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-family: var(--sc-font-text); font-weight: 600; font-size: 1rem; line-height: 1.25;
  text-decoration: none; text-align: center;
  transition: transform 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out), border-color 140ms;
}
.ap-btn:hover { background: color-mix(in oklab, var(--sc-accent) 86%, var(--sc-ink)); }
.ap-btn:active { transform: scale(.97); }
.ap-btn--ghost {
  background: transparent; color: var(--sc-ink);
  box-shadow: inset 0 0 0 1px var(--sc-hairline-strong);
}
.ap-btn--ghost:hover { background: color-mix(in oklab, var(--sc-ink) 7%, transparent); }
.ap-btn--lg { min-height: 3.6rem; padding-inline: 2.1rem; font-size: 1.08rem; }
.ap-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem; margin-top: 1.7rem; }
@media (min-width: 834px) { .ap-cta .ap-btn { white-space: nowrap; } }

/* ============================================================== chrome =====
   Banner as the live site has it. The nav is a fixed minimal bar: the wordmark,
   the one CTA, the theme switch and a menu; the seven site links live in the menu.  */
.pre-release-banner { position: relative; z-index: 72; }
.pre-release-banner a { display: inline-block; padding: .75rem .25rem; margin-block: -.75rem; min-height: 44px; box-sizing: border-box; vertical-align: middle; text-decoration: underline; text-underline-offset: .2em; }

.nav {
  position: sticky; top: 0; z-index: 70; height: var(--navh);
  background: transparent; border-bottom: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* the bar's own ground sits on a pseudo-element: a backdrop-filter on .nav itself would
   become the containing block of the fixed menu drawer inside it */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgb(var(--ap-g0) / .8);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 1px 0 var(--sc-hairline);
  opacity: 0; transition: opacity 260ms var(--sc-ease-out);
}
.nav.is-solid::before { opacity: 1; }
.nav-inner {
  height: var(--navh); padding-block: 0; gap: .5rem; justify-content: flex-start;
  max-width: var(--wrapmax); margin-inline: auto; padding-inline: var(--gut);
}
.brand { margin-right: auto; color: var(--sc-ink) !important; font-size: 1.15rem; min-height: 44px; }
.brand-tag { display: none; color: var(--sc-ink-soft); background: transparent; border: 1px solid var(--sc-hairline-strong); }
@media (min-width: 700px) { .brand-tag { display: inline-block; } }
.nav .theme-toggle { width: 44px; height: 44px; color: var(--sc-ink); flex: none; }
.nav .theme-toggle:hover { background: color-mix(in oklab, var(--sc-ink) 9%, transparent); color: var(--sc-ink); }
.nav-inner > .theme-toggle .theme-toggle-label { display: none; }
.ap-barcta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; flex: none;
  border-radius: var(--sc-r-pill); background: var(--sc-accent); color: var(--sc-accent-ink) !important;
  font: 600 .875rem/1 var(--sc-font-text); text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--sc-ease-out), background-color 140ms;
}
.ap-barcta:hover { background: color-mix(in oklab, var(--sc-accent) 86%, var(--sc-ink)); }
.ap-barcta:active { transform: scale(.97); }
.nav .mobile-menu-toggle {
  width: 52px; height: 44px; flex: none; background: transparent; box-shadow: none;
  border: 1px solid var(--sc-hairline-strong); color: var(--sc-ink);
}
html[data-theme="dark"] .nav .mobile-menu-toggle { background: transparent; border-color: var(--sc-hairline-strong); }

/* the drawer: opens under the bar at every width */
.nav-links {
  left: auto; right: max(var(--gut), calc((100vw - var(--wrapmax)) / 2 + var(--gut)));
  top: calc(var(--ap-navb, 60px) + 8px);
  width: min(344px, calc(100vw - 2 * var(--gut)));
  transform: translateY(-10px) scale(.98); transform-origin: 100% 0;
}
body.mobile-menu-open .nav-links { transform: none; }
.nav-links .theme-toggle { display: none; }
.nav-links a, .nav-links .theme-toggle { color: var(--text); }

/* footer: kept as the site has it; only its inner width follows the shared box.
   Small print is lifted one step (text-3 to text-2) so it clears 4.5:1 on its ground. */
footer { position: relative; z-index: 2; }
footer .footer-inner, footer .footer-disclaimer { color: var(--text-2); }
footer .footer-links { gap: 0 8px; }
footer .footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
footer .footer-disclaimer { font-size: 13px; }
.nav .brand-tag { font-size: 12px; }

/* =============================================================== the day ===
   One fixed layer behind everything: the ground, the window light, the lamp and
   the scraps of paper. It never cuts; page.js moves it.                         */
.ap-day {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--ap-g0)), rgb(var(--ap-g1)));
}
.ap-day__sun {
  position: absolute; left: calc(var(--ap-sx) * 1%); top: calc(var(--ap-sy) * 1%);
  width: min(96vmax, 1560px); height: min(74vmax, 1160px);
  display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 3.6vmax;
  transform: translate3d(-50%, -50%, 0) rotate(calc(var(--ap-sr) * 1deg)) skewX(-15deg);
  opacity: var(--ap-sa); will-change: transform, opacity;
}
.ap-day__sun i { display: block; background: rgb(var(--ap-sc)); border-radius: 6px; filter: blur(22px); }
.ap-day__lamp {
  position: absolute; left: 50%; bottom: 0; width: 150vmax; height: 110vmax;
  transform: translate3d(-50%, 44%, 0);
  background: radial-gradient(closest-side, rgb(var(--ap-glow) / .46), rgb(var(--ap-glow) / .15) 52%, transparent 78%);
  opacity: var(--ap-lo);
}
/* SEIZURE: the scraps of paper. The "scrap of paper or a notes app you'll never find again"
   from the page's own first scene, drifting up through the night: weeks of memory in loose
   pieces. They stop and fade when the pattern is finally in front of you (the peak). */
.ap-scrap {
  position: absolute; left: 0; bottom: -18vh; width: clamp(46px, 5.6vw, 84px); height: auto;
  color: var(--sc-ink-soft); opacity: calc(var(--ap-bo) * .4);
  animation: ap-rise 38s linear infinite; animation-play-state: var(--ap-bps, running);
  will-change: transform;
}
.ap-scrap--1 { left: 11%; --bx: 5vw; --r0: -9deg; --r1: 7deg; animation-duration: 41s; }
.ap-scrap--2 { left: 63%; width: clamp(40px, 4.8vw, 70px); --bx: -7vw; --r0: 11deg; --r1: -6deg; animation-duration: 33s; animation-delay: -15s; }
.ap-scrap--3 { left: 85%; width: clamp(36px, 4.2vw, 62px); --bx: 3vw; --r0: -4deg; --r1: 12deg; animation-duration: 47s; animation-delay: -29s; }
@keyframes ap-rise {
  from { transform: translate3d(0, 0, 0) rotate(var(--r0, 0deg)); }
  to   { transform: translate3d(var(--bx, 0), -134vh, 0) rotate(var(--r1, 0deg)); }
}
.ap-day.is-still .ap-scrap { animation-play-state: paused; opacity: 0; transition: opacity 1.8s var(--sc-ease-out); }
@media (max-width: 700px) {
  /* a narrow screen: the scraps keep to the outer edges and dim while words are on */
  .ap-scrap { transition: opacity .8s var(--sc-ease-out); }
  .ap-scrap--1 { left: 1%; --bx: 2vw; }
  .ap-scrap--2 { left: 80%; --bx: -3vw; }
  .ap-scrap--3 { left: 89%; --bx: 0vw; }
  .ap-day.is-words .ap-scrap { opacity: calc(var(--ap-bo) * .12); }
  .ap-day.is-words.is-still .ap-scrap { opacity: 0; }
}
.sc-grain { opacity: .035; }
html[data-theme="dark"] .sc-grain { opacity: .05; }

/* ========================================================== pinned stages ==
   The engine makes .ap-stage sticky and 100svh. These are the shared layers.   */
.ap-stage { overflow: clip; }
/* the leaves hang past the bottom edge of these two stages and rise away with them, never cut by a hard line */
.ap-hero .ap-stage, .ap-close .ap-stage { overflow: visible; }

/* ---- the phone: a real screenshot in a CSS bezel ---- */
.ap-phone {
  position: absolute; left: 50%; top: 0; z-index: 4;
  width: var(--pw);
  transform: translate3d(-50%, var(--ty, 0px), 0) scale(var(--ps, 1));
  transform-origin: 50% 0; will-change: transform;
}
.ap-bezel {
  position: relative; padding: calc(var(--pw) * .026);
  border-radius: calc(var(--pw) * .15);
  background: linear-gradient(150deg, #34302b, #15130f 55%, #211e19);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .16), var(--sc-e3);
}
.ap-scr { position: relative; aspect-ratio: 1320 / 2868; border-radius: calc(var(--pw) * .125); overflow: hidden; background: #0d0c0a; }
.ap-scr > img, .ap-scr__a > img, .ap-scr__b > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-scr > .th-d, html[data-theme="dark"] .ap-scr > .th-l { display: none; }
html[data-theme="dark"] .ap-scr > .th-d { display: block; }
.ap-isl {
  position: absolute; z-index: 3; top: calc(var(--pw) * .049); left: 50%;
  width: calc(var(--pw) * .30); height: calc(var(--pw) * .088); transform: translateX(-50%);
  border-radius: 999px; background: #0a0908;
  pointer-events: none;
}
.ap-phone__shadow {
  position: absolute; left: 6%; right: 6%; bottom: -2.2%; height: 5%; z-index: -1;
  background: radial-gradient(closest-side, rgba(40, 28, 16, .42), transparent); filter: blur(7px);
}
html[data-theme="dark"] .ap-phone__shadow { background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); }

/* ---- foreground leaves: out of focus, the camera passes them ---- */
.ap-leaf {
  position: absolute; bottom: -3%; z-index: 6; pointer-events: none;
  width: clamp(118px, 21vw, 300px);
  transform: translate3d(0, var(--lf, 0px), 0); will-change: transform;
  filter: blur(5px); opacity: .88;
}
.ap-leaf svg { width: 100%; height: auto; overflow: visible; }
.ap-leaf--l { left: calc(-1 * clamp(14px, 2.4vw, 40px)); }
.ap-leaf--r { right: calc(-1 * clamp(14px, 2.4vw, 40px)); }
.ap-leaf--r svg { transform: scaleX(-1); }
html[data-theme="dark"] .ap-leaf { opacity: .62; }
html[data-theme="dark"] .ap-lamp { opacity: .72; }
html[data-theme="dark"] .ap-close .ap-label, html[data-theme="dark"] .ap-close .ap-lead { color: var(--sc-ink); }

/* =========================================================== ACT 1 hero ===== */
.ap-hero { margin-top: calc(-1 * var(--navh)); }
.ap-hero__copy {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20; text-align: center;
  padding-top: calc(var(--navh) + clamp(1.1rem, 4.2svh, 3rem)); padding-bottom: .5rem;
}
.ap-hero__copy .ap-h1 { max-width: 15.5em; margin-inline: auto; }
.ap-sub {
  font-size: clamp(1.02rem, .95rem + .5vw, 1.3rem); line-height: 1.55; color: var(--sc-ink-soft);
  max-width: 34em; margin: 1.15rem auto 0; text-wrap: balance;
}
.ap-hero .ap-phone { --hph: clamp(300px, calc(100svh - var(--navh) - 176px), 650px); --pw: min(calc(var(--hph) * .4726), 66vw); }
.ap-hero__meta { position: absolute; left: 0; right: 0; bottom: clamp(.9rem, 3svh, 2rem); z-index: 20; text-align: center; padding-inline: var(--gut); }
.ap-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; }
.ap-chips li { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 500; color: var(--sc-ink); }
.ap-chips svg { width: 1.15rem; height: 1.15rem; color: var(--ap-link); flex: none; }
.ap-fine { margin: .55rem auto 0; font-size: .86rem; line-height: 1.5; color: var(--sc-ink-soft); max-width: 44em; text-wrap: balance; }

/* =========================================================== ACT 2 lede ===== */
.ap-lede { position: relative; padding-block: clamp(3.5rem, 12svh, 8rem) clamp(2rem, 6svh, 4.5rem); }
.ap-lede__in > * + * { margin-top: 1.7rem; }
.ap-lede .ap-body { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); }
.ap-body--aside { padding-top: .2rem; }

/* ============================================================ ACT 3 hours === */
.ap-beat { position: absolute; inset: 0; display: grid; align-content: center; padding-top: var(--navh); pointer-events: none; }
.ap-beat > .ap-wrap { pointer-events: none; }
.ap-beat--intro { text-align: left; }
.ap-beat--intro .ap-h2 { max-width: 12em; }
.ap-scene { max-width: 38rem; display: grid; gap: 1.1rem; }
.ap-beat--b .ap-scene { margin-left: auto; }
.ap-strain {
  font-size: clamp(1.45rem, 1rem + calc(2.4 * var(--vw)), 2.5rem);
  line-height: 1.16; letter-spacing: -.018em; text-wrap: pretty;
}
/* SEIZURE: each scene's second sentence rides under the first, quieter */
.ap-strain__then {
  display: block; margin-top: .7rem; color: var(--sc-ink-soft);
  font-size: clamp(1.1rem, .95rem + calc(1.05 * var(--vw)), 1.6rem); line-height: 1.3; letter-spacing: -.01em;
}
.ap-fix { margin: .2rem 0 0; font-size: clamp(1rem, .95rem + .45vw, 1.22rem); line-height: 1.55; color: var(--sc-ink-soft); max-width: 32em; text-wrap: pretty; }
.ap-fix strong { color: var(--ap-link); font-weight: 600; }
.ap-scene .ap-label { color: var(--ap-link); }

/* ============================================================== ACT 4 peak == */
.ap-peak { --navs: calc(var(--navh) + 14px); --wordsh: clamp(9rem, 33svh, 17rem); }
.ap-peak__words {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20; height: calc(var(--navs) + var(--wordsh));
  display: grid; align-items: end; padding-bottom: .6rem; text-align: center; pointer-events: none;
}
.ap-peak__words .ap-wrap { position: relative; height: 100%; }
.ap-line { position: absolute; left: var(--gut); right: var(--gut); bottom: 0; margin: 0; }
.ap-line--title { font-size: clamp(2rem, 1.1rem + calc(3.6 * var(--vw)), 3.8rem); }
.ap-line--say {
  font-size: clamp(1.12rem, .9rem + calc(1.55 * var(--vw)), 1.95rem); line-height: 1.26; letter-spacing: -.012em;
  max-width: 24em; margin-inline: auto; text-wrap: pretty; font-weight: 500;
}
/* SEIZURE: "The moment it clicks" is a small label over the italic line */
.ap-line--short { font-size: clamp(1.45rem, 1rem + calc(2.8 * var(--vw)), 2.9rem); }
.ap-line--short .ap-line__t { font: inherit; font-style: italic; letter-spacing: -.016em; margin: 0; color: inherit; text-wrap: balance; }
.ap-line--short .ap-label { margin-bottom: .7rem; color: var(--ap-link); }
.ap-line--end { font-size: clamp(1.02rem, .9rem + calc(.9 * var(--vw)), 1.5rem); line-height: 1.4; max-width: 38em; margin-inline: auto; text-wrap: pretty; }
.ap-peak .ap-phone {
  --hph: clamp(250px, calc(100svh - var(--navs) - var(--wordsh) - 40px), 640px);
  --pw: min(calc(var(--hph) * .4726), 62vw);
}
.ap-phone__halo {
  position: absolute; left: 50%; top: 50%; z-index: -1; width: calc(var(--pw) * 3.4); height: calc(var(--pw) * 3.4);
  transform: translate(-50%, -50%); pointer-events: none; opacity: var(--halo, 0);
  background: radial-gradient(closest-side, rgb(var(--ap-glow) / .5), rgb(var(--ap-glow) / .17) 46%, transparent 74%);
}
.ap-peak .ap-scr img { opacity: var(--lit, 0); filter: brightness(calc(.4 + .6 * var(--lit, 0))); }
/* the lit phone's light is the blurred halo element behind it (no zero-offset box-shadow glow) */
.ap-peak .ap-bezel { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .2), var(--sc-e3); }

.ap-dawn { height: clamp(34svh, 60svh, 70svh); }

/* ============================================================ ACT 5 built === */
.ap-built { position: relative; padding-block: clamp(2.5rem, 8svh, 5rem) clamp(4rem, 12svh, 8rem); }
.ap-built__head .ap-h2 { max-width: 13em; }
.ap-feats { margin-top: clamp(3rem, 9svh, 6rem); display: grid; gap: clamp(3.4rem, 10svh, 6.5rem); }
.ap-feat { display: grid; gap: 1.05rem; max-width: 44rem; padding-top: 1.6rem; border-top: 1px solid var(--sc-hairline-strong); }
.ap-feat:nth-child(even) { margin-left: auto; }
.ap-feat .ap-label { color: var(--ap-link); }
.ap-feat .ap-h3 { max-width: 17em; }
/* SEIZURE: the four medication lines (all four required cautions, verbatim) */
.ap-medlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; max-width: 58ch; }
.ap-medlist li {
  position: relative; padding-left: 1.5rem;
  font-size: var(--sc-t-base); line-height: 1.72; color: var(--sc-ink-soft); text-wrap: pretty;
}
.ap-medlist li::before {
  content: ""; position: absolute; left: .15rem; top: .78em; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--ap-link);
}

/* =========================================================== ACT 6 inside === */
.ap-inside__head { position: absolute; left: 0; right: 0; top: 0; z-index: 20; padding-top: calc(var(--navh) + clamp(.8rem, 3svh, 2rem)); text-align: left; pointer-events: none !important; }
.ap-inside__head .ap-h2 { max-width: 13em; }
.ap-inside__head .ap-lead { max-width: 46ch; }
.ap-inside .ap-phone { --hph: clamp(270px, calc(100svh - var(--navh) - 196px), 660px); --pw: min(calc(var(--hph) * .4726), 62vw); z-index: 3; }
.ap-scr__a, .ap-scr__b { position: absolute; inset: 0; }
.ap-scr__b { opacity: 0; will-change: opacity; }
.ap-caps { position: absolute; left: 0; right: 0; bottom: clamp(.9rem, 3.4svh, 2.2rem); z-index: 20; height: 6.2rem; text-align: center; pointer-events: none; }
.ap-caps .ap-wrap { position: relative; height: 100%; }
.ap-cap { position: absolute; left: var(--gut); right: var(--gut); bottom: 0; margin: 0 auto; max-width: 36em; font-size: 1rem; line-height: 1.5; color: var(--sc-ink-soft); text-wrap: balance; }
.ap-cap b { display: block; font-family: var(--sc-font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; color: var(--sc-ink); margin-bottom: .1rem; }

/* ============================================================== ACT 7 calm === */
.ap-calm { position: relative; padding-block: clamp(2.5rem, 8svh, 5rem) clamp(4rem, 10svh, 7rem); display: block; }
.ap-calm .ap-h2 { max-width: 15em; }
.ap-priv { list-style: none; margin: clamp(2.2rem, 6svh, 3.4rem) 0 0; padding: 0; display: grid; gap: 0; max-width: 46rem; }
.ap-priv li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 1.1rem; row-gap: .45rem; padding-block: 1.6rem; border-top: 1px solid var(--sc-hairline-strong); }
.ap-priv li:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.ap-priv svg { grid-row: 1 / span 2; width: 2.3rem; height: 2.3rem; color: var(--ap-link); margin-top: .1rem; }
.ap-priv .ap-body { grid-column: 2; }
.ap-pricing { margin-top: clamp(4rem, 11svh, 7rem); max-width: 46rem; }
.ap-pricing p:last-child { margin-top: 1.5rem; }
.ap-faq { margin-top: clamp(4rem, 11svh, 7rem); max-width: 46rem; }
.ap-faq details { border-top: 1px solid var(--sc-hairline-strong); }
.ap-faq details:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.ap-faq .ap-h2 { margin-bottom: 1.6rem; }
.ap-faq summary {
  list-style: none; cursor: pointer; position: relative; padding: 1.25rem 3rem 1.25rem 0; min-height: 44px;
  font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.3; letter-spacing: -.01em; color: var(--sc-ink);
}
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%; width: .72rem; height: .72rem;
  border-right: 2px solid var(--ap-link); border-bottom: 2px solid var(--ap-link);
  transform: translateY(-70%) rotate(45deg); transition: transform 220ms var(--sc-ease-out);
}
.ap-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ap-faq summary:hover { color: var(--ap-link); }
.ap-faq__body { padding: 0 0 1.6rem; max-width: 58ch; color: var(--sc-ink-soft); line-height: 1.72; text-wrap: pretty; }

/* ============================================================ ACT 8 close ==== */
.ap-close__copy { position: absolute; inset: 0; z-index: 20; display: grid; align-content: center; padding-top: var(--navh); }
.ap-close__copy .ap-h2 { max-width: 11em; }
.ap-close__copy .ap-lead { max-width: 46ch; font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--sc-ink); }
.ap-cta--close { justify-content: flex-start; margin-top: 2rem; gap: .5rem 1.6rem; }
.ap-lamp {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(34rem 34rem at calc(var(--sc-mx, .62) * 100%) calc(var(--sc-my, .4) * 100%), rgb(var(--ap-glow) / .42), rgb(var(--ap-glow) / .12) 55%, transparent 72%);
}
.ap-close [data-sc-spotlight]::after, .ap-close[data-sc-spotlight]::after { display: none; }
.ap-leaf--close { z-index: 2; }
.ap-leaf--close.ap-leaf--l { bottom: -2%; left: -3vw; }
.ap-leaf--close.ap-leaf--r { bottom: -3%; right: -3vw; }

/* =========================================================== other doors === */
.ap-more { position: relative; padding-block: clamp(2.5rem, 7svh, 4.5rem) clamp(3rem, 8svh, 5rem); background: transparent; }
.ap-doors { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem 2rem; }
.ap-doors a { display: inline-block; padding-block: .75rem; font-size: 1.02rem; }

/* ============================================================ focus states === */
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 6px; }
.ap-barcta:focus-visible, .ap-btn:focus-visible { outline-offset: 3px; }

/* =========================================================== phones (<=700) === */
@media (max-width: 700px) {
  /* the chips cross the foreground leaves on a phone: each rides on its own soft ground */
  .ap-chips { gap: .4rem .5rem; }
  .ap-chips li { padding: .28rem .7rem; border-radius: 999px; background: rgb(var(--ap-g1) / .95); }
  .ap-fine { padding: .2rem .5rem; border-radius: 10px; background: rgb(var(--ap-g1) / .92); }
  /* the chip row and fine print stack to about 170 to 190px on a phone: the resting phone stops above them */
  .ap-hero .ap-phone { --hph: clamp(230px, calc(100svh - var(--navh) - 240px), 650px); --pw: min(calc(var(--hph) * .4726), 58vw); }
  .ap-hero__copy .ap-h1 { font-size: clamp(2rem, 1.3rem + 4.4vw, 2.5rem); }
  .ap-cta { flex-direction: column; align-items: stretch; margin-top: 1.3rem; }
  .ap-cta--close { align-items: flex-start; }
  .ap-cta--close .ap-btn { align-self: stretch; }
  .ap-sub { margin-top: .9rem; }
  .ap-scene { max-width: none; }
  .ap-beat--b .ap-scene { margin-left: 0; }
  .ap-feat:nth-child(even) { margin-left: 0; }
  .ap-link--big { font-size: .96rem; text-wrap: balance; }
  /* the lit phone drifts up 16px while the last paragraph is on: 24px more room keeps the words clear of its top edge */
  .ap-peak .ap-phone { --hph: clamp(200px, calc(100svh - var(--navs) - var(--wordsh) - 64px), 640px); --pw: min(calc(var(--hph) * .4726), 56vw); }
  .ap-inside .ap-phone { --pw: min(calc(var(--hph) * .4726), 56vw); }
  .ap-priv li { grid-template-columns: 2.2rem 1fr; column-gap: .85rem; }
  .ap-priv svg { width: 2rem; height: 2rem; }
  .ap-doors { gap: 0 1.6rem; }
  /* the peak's last paragraph and the Patterns readout are long: the words get more of the frame */
  .ap-peak { --wordsh: clamp(9rem, 39svh, 17rem); }
  .ap-line--say { font-size: clamp(1.08rem, .95rem + 1.5vw, 1.4rem); }
  .ap-line--end { font-size: clamp(.98rem, .9rem + .55vw, 1.12rem); line-height: 1.36; }
  .ap-inside .ap-phone { --hph: clamp(250px, calc(100svh - var(--navh) - 258px), 660px); }
  .ap-caps { height: 9.6rem; bottom: .7rem; }
  .ap-cap { font-size: .92rem; line-height: 1.42; }
  .ap-cap b { font-size: 1.1rem; }
}
@media (max-height: 700px) and (max-width: 700px) {
  .ap-label--lead { margin-bottom: .6rem; }
  .ap-hero .ap-phone { --hph: clamp(230px, calc(100svh - var(--navh) - 252px), 650px); }
}
/* short, narrow phones: the close copy sits at the top of the frame instead of centred and its two leaves are smaller, so the
   secondary link ends well above the two bottom leaves and never lies over one */
@media (max-height: 700px) and (max-width: 420px) {
  .ap-close__copy { align-content: start; padding-top: calc(var(--navh) + 1.1rem); }
  .ap-leaf--close { width: 98px; }
}
@media (max-height: 600px) and (max-width: 420px) {
  .ap-leaf--close { width: 78px; }
}
/* the smallest screens (a 568px-tall phone): the close's copy is tightened so the whole ask sits under the bar */
@media (max-height: 600px) and (max-width: 420px) {
  .ap-close__copy .ap-h2 { font-size: clamp(1.9rem, 8.4vw, 2.2rem); }
  .ap-close__copy .ap-lead { font-size: .95rem; line-height: 1.42; }
  .ap-cta--close { margin-top: 1.05rem; }
  .ap-close .ap-label--lead { margin-bottom: .45rem; }
}

/* ============================================ reduced motion: the whole page,
   finished, in a calm static layout. Nothing is pinned and nothing moves. ===== */
html.ap-static .ap-act { height: auto !important; }
html.ap-static .ap-stage { position: relative; top: auto; height: auto; overflow: visible; display: grid; gap: clamp(2.4rem, 7svh, 4rem); padding-block: clamp(3.5rem, 10svh, 6rem); }
html.ap-static [data-sc-cue], html.ap-static .ap-hero__meta, html.ap-static .ap-hero__copy {
  opacity: 1 !important; transform: none !important; pointer-events: auto !important;
}
html.ap-static .ap-hero { margin-top: 0; }
html.ap-static .ap-hero .ap-stage { padding-top: calc(var(--navh) + 2.5rem); }
html.ap-static .ap-hero__copy, html.ap-static .ap-hero__meta, html.ap-static .ap-inside__head, html.ap-static .ap-caps,
html.ap-static .ap-beat, html.ap-static .ap-close__copy, html.ap-static .ap-peak__words { position: relative; inset: auto; height: auto; padding-top: 0; padding-bottom: 0; }
html.ap-static .ap-beat { display: block; padding: 0; }
html.ap-static .ap-phone { position: relative; left: auto; top: auto; margin-inline: auto; transform: none !important; }
html.ap-static .ap-phone--hero, html.ap-static .ap-phone--inside, html.ap-static .ap-phone--peak { --ps: 1; }
html.ap-static .ap-leaf, html.ap-static .ap-scrap, html.ap-static .ap-lamp, html.ap-static .ap-isl[hidden] { display: none; }
html.ap-static .ap-line { position: relative; left: auto; right: auto; bottom: auto; margin: 0 auto 1.1rem; }
html.ap-static .ap-peak__words .ap-wrap { height: auto; }
html.ap-static .ap-line--short { margin-top: 1.6rem; }
html.ap-static .ap-line--end { margin-top: .4rem; }
html.ap-static .ap-peak .ap-scr img { opacity: 1 !important; filter: none !important; }
html.ap-static .ap-phone__halo { display: none; }
html.ap-static .ap-cap { position: relative; left: auto; right: auto; margin: 0 auto 1.4rem; }
html.ap-static .ap-caps .ap-wrap { height: auto; }
html.ap-static .ap-scr__b { position: relative; opacity: 1 !important; inset: auto; margin-top: 1rem; }
html.ap-static .ap-inside .ap-scr { aspect-ratio: auto; background: transparent; overflow: visible; border-radius: 0; }
html.ap-static .ap-inside .ap-scr__a, html.ap-static .ap-inside .ap-scr__b { position: relative; inset: auto; }
html.ap-static .ap-inside .ap-scr > img, html.ap-static .ap-inside .ap-scr__a > img, html.ap-static .ap-inside .ap-scr__b > img { position: relative; height: auto; aspect-ratio: 1320 / 2868; border-radius: calc(var(--pw) * .125); }
/* u2 phone glue (PLAN 2.1): inner radius for the component, and a screen-sized in-flow box per layer in free mode */
.ap-scr__a, .ap-scr__b { --ph-r: calc(var(--pw) * .125); }
html.ap-static .ap-inside .ap-scr__a, html.ap-static .ap-inside .ap-scr__b { aspect-ratio: 1320 / 2868; overflow: hidden; border-radius: calc(var(--pw) * .125); }
html.ap-static .ap-inside .ap-phone { --pw: min(300px, 70vw); }
html.ap-static .ap-inside .ap-bezel { background: transparent; box-shadow: none; padding: 0; }
html.ap-static .ap-inside .ap-isl { display: none; }
html.ap-static .ap-scene { max-width: 40rem; }
html.ap-static .ap-beat--b .ap-scene { margin-left: 0; }
html.ap-static .ap-hero .ap-phone { --pw: min(300px, 62vw); }
html.ap-static .ap-peak .ap-phone { --pw: min(300px, 62vw); }
html.ap-static .ap-dawn { height: 0; }
html.ap-static .ap-close .ap-stage { padding-block: clamp(3rem, 8svh, 5rem); }
html.ap-static .ap-hours .ap-stage { gap: clamp(3.2rem, 9svh, 5.5rem); }
@media (prefers-reduced-motion: reduce) {
  .ap-scrap { animation: none; }
  .ap-day__sun { will-change: auto; }
  .nav::before { transition: none; }
}

/* reduced motion: the split kinetic heading shows whole, at rest */
html.ap-static [data-sc-kinetic], html.ap-static [data-sc-kinetic] * { opacity: 1 !important; transform: none !important; clip-path: none !important; visibility: visible !important; }

/* narrow phones (360): the bar must fit brand, theme, Join beta and menu inside the gutters */
@media (max-width: 420px) {
  .nav-inner { gap: .2rem; }
  .brand { padding-right: .2rem; font-size: 1.05rem; gap: .4rem; }
  .nav .theme-toggle { width: 44px; } /* 44px tap target; width regained from brand and button padding */
  .ap-barcta { padding: 0 .7rem; font-size: .84rem; }
  .nav .mobile-menu-toggle { width: 44px; }
}

/* The hero chip row holds no controls: never let it block the hero buttons on a short phone. */
.ap-hero__meta, .ap-hero__meta * { pointer-events: none !important; }
