/* usereadily.com. What you saved lies around the phone as slips and the first scroll pulls them in; through the three ways to read, a camera pushes in on the phone; at the end the first print opens out of the card again. Palette and type follow the app: ReadilyPalette in Readily/Views/ReadilyAppearance.swift.
   The theme is an attribute on <html>, set before first paint and switched by the toggle in the header.
   data-layout on <html> is "side" (words left, phone right) or "stack" (phone above its words), set from the screen size. */
:root {
  --label: #b8432e; --paper: #f7f5ee; --surface: #fffdf7; --ink: #182f28; --pine: #285848; --muted: #52635a; --quiet: #4a5850; --line: rgba(24,47,40,0.13);
  --cream: #faf5e0; --sun: #d9533a; --button: #285848; --button-hover: #1f4a3c;
  --radius: 28px; --page: 1120px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  /* Springs from Motion's generator, as CSS linear() curves. --spring has a little overshoot, for the Next card
     arriving. --settle has none, for things that change in place. Each duration includes the spring's settling
     time; the motion looks finished a little over halfway through. */
  --spring: 950ms linear(0, 0.0364, 0.1243, 0.2385, 0.3616, 0.4819, 0.5923, 0.689, 0.7707, 0.8374, 0.8902, 0.9307, 0.9608, 0.9823, 0.997, 1.0064, 1.0119, 1.0145, 1.0152, 1.0146, 1.0132, 1.0115, 1.0096, 1.0078, 1.0061, 1.0046, 1.0034, 1.0024, 1.0016, 1.001, 1.0006, 1);
  --settle: 800ms linear(0, 0.0507, 0.1614, 0.2915, 0.4192, 0.5342, 0.6326, 0.714, 0.7796, 0.8317, 0.8723, 0.9038, 0.9279, 0.9462, 0.96, 0.9704, 0.9781, 0.9839, 0.9882, 0.9913, 0.9937, 0.9954, 0.9966, 0.9975, 0.9982, 0.9987, 1);
  --fade: 220ms ease;
  --shift: 12px; /* how far things travel as they arrive; Reduce Motion sets it to nothing */
  --nav: 64px;
  --z-stage: 2; --z-nav: 30;
  color-scheme: light;
}
/* Dark is its own palette, not an inversion: a green-tinted canvas, text held back from white, quiet structure. */
:root[data-theme="dark"] {
  --label: #f2937a; --paper: #131c19; --surface: #1c2622; --ink: #f0f1e5; --pine: #a9d7ba; --muted: #b2c1b6; --quiet: #b9c5bc; --line: rgba(240,241,229,0.12);
  --button: #397254; --button-hover: #2f6146; color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --shift: 0px; --spring: 200ms ease; --settle: 200ms ease; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-anchor: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.022em; line-height: 1.02; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 1.2rem + 2.6vw, 3.5rem); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
a, button, input, summary { touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html { scroll-padding-top: calc(var(--nav) + 16px); }
::selection { background: color-mix(in oklab, var(--pine) 22%, transparent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.logo { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 40; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }
[hidden] { display: none; }

/* ---------- Header ---------- */
/* Clear over the first view. Once the page has moved it takes the paper's colour, so words pass under it cleanly.
   Side by side it has no bar at all, so the print runs to the top edge of the screen behind it (the words' column
   has its own strip of paper for the logo, further down). */
.nav { position: fixed; inset: 0 0 auto; z-index: var(--z-nav); height: var(--nav); display: flex; align-items: center; gap: 12px;
  padding: 0 max(20px, env(safe-area-inset-left), env(safe-area-inset-right), calc((100% - 1200px) / 2)); color: var(--ink); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity var(--fade);
  background: color-mix(in oklab, var(--paper) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.solid::before { opacity: 1; }
[data-layout="side"] .nav::before { display: none; }
@media (min-width: 1000px) { .nav { padding: 0 max(40px, calc((100% - var(--page)) / 2)); } } /* in line with the words below */
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; text-decoration: none; color: inherit; font: 600 1.15rem var(--serif); }
.brand img { border-radius: 8px; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out; }
.theme-toggle:active { transform: scale(0.97); }
.theme-toggle svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity var(--fade), transform var(--settle); }
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(-60deg) scale(0.6); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; }
.nav-cta { opacity: 0; visibility: hidden; transition: opacity var(--fade), visibility 0s 220ms, transform 150ms ease-out, background-color 150ms ease-out; }
.nav.solid .nav-cta { opacity: 1; visibility: visible; transition: opacity var(--fade), visibility 0s, transform 150ms ease-out, background-color 150ms ease-out; }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { background: color-mix(in oklab, currentColor 10%, transparent); } }
@media (max-width: 379px) { .nav .nav-cta { padding: 0 14px; font-size: 0.92rem; } }
@media (max-width: 349px) { .nav .brand span { display: none; } }

/* ---------- Buttons and the form ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1rem var(--sans); text-decoration: none; white-space: nowrap; background: var(--button); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.14) inset, 0 1px 2px rgba(13,21,18,0.18), 0 6px 14px -8px rgba(13,21,18,0.5);
  transition: transform 150ms ease-out, background-color 150ms ease-out; }
.pill:active { transform: scale(0.97); }
.pill, .theme-toggle { user-select: none; -webkit-user-select: none; } /* a long press on a control should not select its label */
@media (hover: hover) and (pointer: fine) { .pill:hover { background: var(--button-hover); } }
.join { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: min(500px, 100%); }
.join-row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(255,255,255,0.5) inset, 0 18px 40px -26px rgba(13,21,18,0.5); }
.join input[type=email] { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; font: 16px var(--sans); background: transparent; color: var(--ink); }
.join input[type=email]::placeholder { color: color-mix(in oklab, var(--ink) 72%, transparent); }
.join input[type=email]:focus-visible { outline-offset: 0; }
@supports selector(:has(a)) { /* the whole row shows keyboard focus, not a ring inside it */
  .join-row { transition: box-shadow 150ms ease-out; }
  .join input[type=email]:focus-visible { outline: none; }
  .join-row:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--ink), 0 18px 40px -26px rgba(13,21,18,0.5); }
}
.join .pill[aria-disabled="true"] { cursor: progress; opacity: 0.85; }
.join .pill { min-height: 48px; flex: none; }
.trap { position: absolute; left: -9999px; }
@media (max-width: 480px) { .join .pill { padding: 0 18px; } }
@media (max-width: 350px) { .join .pill { padding: 0 14px; font-size: 0.94rem; } .join input[type=email] { padding: 0 8px 0 14px; } }

/* ---------- The phone, lit from above ---------- */
.phone { position: relative; width: var(--pw); aspect-ratio: 71.5 / 149.6; border: calc(var(--pw) * 0.032) solid #0a0e0c; border-radius: calc(var(--pw) * 0.165);
  box-shadow: 0 0 0 calc(var(--pw) * 0.006) #6d746f, 0 0 0 calc(var(--pw) * 0.011) #262c29, 0 calc(var(--pw) * -0.004) 0 calc(var(--pw) * 0.006) rgba(255,255,255,0.35),
    0 30px 60px -20px rgba(13,21,18,0.28), 0 70px 120px -40px rgba(13,21,18,0.32); }
:root[data-theme="dark"] .phone { box-shadow: 0 0 0 calc(var(--pw) * 0.006) #7d857f, 0 0 0 calc(var(--pw) * 0.011) #1d2220, 0 calc(var(--pw) * -0.004) 0 calc(var(--pw) * 0.006) rgba(255,255,255,0.18),
    0 30px 60px -20px rgba(0,0,0,0.5), 0 70px 120px -40px rgba(0,0,0,0.55); }
.phone::before { content: ""; position: absolute; left: calc(var(--pw) * -0.05); top: 18%; width: calc(var(--pw) * 0.014); height: 6%; border-radius: 2px; background: #4a514d;
  box-shadow: 0 calc(var(--pw) * 0.17) 0 0 #4a514d, 0 calc(var(--pw) * 0.33) 0 0 #4a514d, calc(var(--pw) * 1.022) calc(var(--pw) * 0.25) 0 0 #4a514d; }
.phone::after { content: ""; position: absolute; z-index: 5; top: calc(var(--pw) * 0.024); left: 50%; translate: -50% 0; width: 31%; height: calc(var(--pw) * 0.088); border-radius: 999px; background: #050807; }
.screen {
  --s-bg: #f6f3ea; --s-card: #fffdf7; --s-ink: #182f28; --s-muted: #55645b; --s-later: #46594f; --s-pine: #285848; --s-tint: rgba(24,47,40,0.08); --s-mark: #badeb6; --s-button: #285848;
  position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * 0.134); background: var(--s-bg); color: var(--s-ink);
  container-type: inline-size; font-family: var(--sans); isolation: isolate; user-select: none; -webkit-user-select: none; transition: background-color 400ms ease, color 400ms ease; }
:root[data-theme="dark"] .screen {
  --s-bg: #111916; --s-card: #1e2924; --s-ink: #ebeadf; --s-muted: #a7b5ab; --s-later: #c3cec6; --s-pine: #a9d7ba; --s-tint: rgba(235,234,223,0.1); --s-mark: #3f684d; --s-button: #397254; }
.screen button { all: unset; box-sizing: border-box; cursor: pointer; position: relative; touch-action: manipulation; }
.screen button::after { content: ""; position: absolute; inset: -14px -6px; } /* a finger-sized target around small controls */
.screen .seg button::after { inset: -14px 0; } /* side by side, so their targets must not overlap */
.screen button:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 2px; border-radius: 999px; }
.screen .next-card button:focus-visible { outline-color: #faf5e0; }
.status { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 5.8cqi 9cqi 0 11cqi; font: 600 4.4cqi var(--sans); font-variant-numeric: tabular-nums; transition: color 300ms ease; }
.status-icons { display: flex; gap: 1.4cqi; align-items: center; }
.status-icons i { display: block; width: 4.4cqi; height: 2.8cqi; border-radius: 1cqi; background: currentColor; }
.status-icons i:first-child { width: 4cqi; clip-path: polygon(0 100%, 100% 0, 100% 100%); border-radius: 0; }
.status-icons i:last-child { width: 6.8cqi; }

/* One screen of the app at a time. */
/* A screen that leaves fades out quickly; the one that arrives waits a moment and then fades in. So two screens
   are never seen on top of each other. */
.view { position: absolute; inset: 14cqi 0 0; z-index: 1; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(calc(var(--shift) / 2)) scale(0.98);
  transition: opacity 180ms ease-out, transform var(--settle), visibility 0s 220ms; }
body:is([data-step="hero"], [data-step="next"], [data-step="then"]) .view-next, body:is([data-step="listen"], [data-step="along"], [data-step="rsvp"]) .view-reader,
body[data-step="library"] .view-library {
  opacity: 1; visibility: visible; transform: none; transition: opacity 320ms ease-out 110ms, transform var(--settle), visibility 0s; }
/* From the first screen to the reader, the way into an article: the first screen comes toward you, and the reader
   arrives from further back. Going back runs the same thing the other way. Both moves are a scale and a fade. */
.view-next, .view-reader { transform-origin: 50% 34%; }
body:is([data-step="listen"], [data-step="along"], [data-step="rsvp"]) .view-next { transform: scale(1.1); }
body:is([data-step="hero"], [data-step="next"]) .view-reader { transform: scale(0.93); }
.round { display: grid; place-items: center; width: 10cqi; height: 10cqi; border-radius: 50%; background: var(--s-card); box-shadow: 0 0.3cqi 1cqi rgba(24,47,40,0.14); flex: none; font-size: 4.6cqi; }

/* Next */
.view-next { padding: 2cqi 5cqi 0; gap: 3cqi; }
.next-bar { display: flex; justify-content: space-between; align-items: center; font-size: 4.8cqi; }
.next-week { display: flex; justify-content: space-between; font-size: 3.6cqi; font-weight: 600; margin-top: 1cqi; }
.next-week span:last-child { color: var(--s-muted); font-weight: 500; }
.next-week-bar { height: 1.2cqi; border-radius: 1cqi; background: var(--s-tint); overflow: hidden; }
.next-week-bar span { display: block; width: 67%; height: 100%; background: var(--s-pine); transform-origin: left; animation: fill 1400ms cubic-bezier(0.19, 1, 0.22, 1) 600ms both; }
@keyframes fill { from { transform: scaleX(0); } }
.next-card { border-radius: 6cqi; overflow: hidden; background: #1a3a30; color: #faf5e0; box-shadow: 0 2cqi 6cqi -2cqi rgba(24,47,40,0.45); }
/* The card's picture is the same print, in the same place, as the one behind the phone, so the card is a window
   onto it; world.js sets its size and position. */
.next-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.next-art img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.next-card-body { padding: 4.5cqi 5cqi 5cqi; display: grid; gap: 1.6cqi; }
.next-kind, .next-why { display: flex; align-items: center; gap: 1.6cqi; font-size: 3.4cqi; font-weight: 600; }
.next-title { font: 500 8cqi/1.05 var(--serif); }
.next-meta { font-size: 3.2cqi; opacity: 0.8; }
.next-why { font-weight: 500; font-size: 3.1cqi; padding-top: 2.4cqi; margin-top: 1cqi; border-top: 1px solid rgba(250,245,224,0.18); }
.next-actions { display: flex; align-items: center; gap: 4cqi; margin-top: 1.6cqi; font-size: 3.7cqi; font-weight: 600; }
.screen .next-start { display: inline-flex; align-items: center; gap: 1.6cqi; padding: 2.6cqi 4.6cqi 2.6cqi 4cqi; border-radius: 999px; background: #f2e29c; color: #18302a; transition: transform 150ms ease-out; }
.screen .not-now { padding: 1.6cqi 2.4cqi; margin: -1.6cqi -2.4cqi; border-radius: 999px; transition: background-color 150ms ease-out, transform 150ms ease-out; }
.screen .next-start:active, .screen .not-now:active { transform: scale(0.97); }
/* Under the card, as in the app (NextView.swift): two links side by side, then the switch for when your hands are busy. */
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqi; }
.shelf span { display: flex; align-items: center; gap: 2.4cqi; padding: 4.2cqi 3.4cqi; border-radius: 3.2cqi; background: var(--s-card); box-shadow: 0 0 0 1px color-mix(in oklab, var(--s-pine) 17%, transparent); font-size: 4.6cqi; color: var(--s-pine); }
.shelf b { flex: 1; font: 600 4.2cqi var(--sans); color: var(--s-ink); }
.shelf .chev { width: 3.1cqi; height: 3.1cqi; color: var(--s-muted); stroke-width: 2.8; }
.walk { align-self: center; display: inline-flex; align-items: center; gap: 1.8cqi; padding: 2.3cqi 4.2cqi; border-radius: 999px; background: color-mix(in oklab, var(--s-pine) 13%, transparent); color: var(--s-pine); font: 500 3.8cqi var(--sans); white-space: nowrap; }
.walk .icon { width: 4.4cqi; height: 4.4cqi; }
.mini { position: relative; overflow: hidden; margin: auto 0 5cqi; display: flex; align-items: center; gap: 3cqi; padding: 2.4cqi 3.6cqi 2.4cqi 2.4cqi; border-radius: 4cqi; background: var(--s-card);
  box-shadow: 0 1cqi 3cqi -1cqi rgba(24,47,40,0.25), 0 0 0 1px var(--s-tint); font-size: 4.2cqi; }
.mini-art { width: 8.4cqi; height: 8.4cqi; border-radius: 1.8cqi; background: linear-gradient(160deg, #3f684d, #1a3a30); flex: none; }
.mini-text { flex: 1; display: grid; line-height: 1.2; }
.mini-text small { font-size: 2.8cqi; color: var(--s-muted); }
.mini-text b { font-size: 3.6cqi; }
.eq { display: flex; align-items: flex-end; gap: 0.7cqi; height: 3.6cqi; margin-right: 1cqi; }
.eq i { width: 0.8cqi; height: 100%; border-radius: 0.4cqi; background: var(--s-pine); transform-origin: bottom; animation: beat 900ms ease-in-out infinite alternate; animation-play-state: paused; }
.eq i:nth-child(2) { animation-duration: 700ms; animation-delay: -300ms; } .eq i:nth-child(3) { animation-duration: 1100ms; animation-delay: -600ms; }
@keyframes beat { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
body:is([data-step="hero"], [data-step="next"], [data-step="then"]) .mini .eq i { animation-play-state: running; }

/* The reader: Listen, Read along, RSVP */
body { --k: 0; } /* which mode the thumb is under; set before the reader shows, so it never slides in */
body[data-step="along"] { --k: 1; }
body:is([data-step="rsvp"], [data-step="library"], [data-step="then"]) { --k: 2; }
.reader-bar { display: flex; align-items: center; gap: 2.4cqi; padding: 2cqi 4.4cqi 0; transition: opacity var(--fade), visibility 0s; }
.seg { position: relative; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0.9cqi; border-radius: 999px; background: var(--s-tint); }
.seg-thumb { position: absolute; top: 0.9cqi; bottom: 0.9cqi; left: 0.9cqi; width: calc((100% - 1.8cqi) / 3); border-radius: 999px; background: var(--s-card);
  box-shadow: 0 0.3cqi 1cqi rgba(24,47,40,0.18); transform: translateX(calc(var(--k) * 100%)); transition: transform var(--settle); }
.screen .seg button { display: grid; place-items: center; min-height: 9cqi; font: 600 3.6cqi var(--sans); color: var(--s-muted); white-space: nowrap; transition: color var(--fade); }
body[data-step="listen"] .seg [data-go="listen"], body[data-step="along"] .seg [data-go="along"], body[data-step="rsvp"] .seg [data-go="rsvp"] { color: var(--s-ink); }
.reader-body { position: relative; flex: 1; display: grid; min-height: 0; }
.mode { grid-area: 1 / 1; padding: 6cqi 6cqi 0; opacity: 0; visibility: hidden; min-height: 0; transition: opacity var(--fade), visibility 0s 220ms; }
body[data-step="listen"] .mode-listen, body[data-step="along"] .mode-along, body[data-step="rsvp"] .mode-rsvp { opacity: 1; visibility: visible; transition: opacity var(--fade), visibility 0s; }
.reader-host { display: flex; align-items: center; gap: 1.6cqi; font-size: 3.4cqi; font-weight: 500; color: var(--s-pine); }
.reader-title { font: 500 7.4cqi/1.08 var(--serif); margin: 2cqi 0 5cqi; }
.reader-text { font: 4.9cqi/1.6 var(--serif); }
.reader-text + .reader-text { margin-top: 3.6cqi; }
.mode-along { overflow: hidden; }
.along-scroll { transition: transform var(--settle); }
.reader-later { color: var(--s-later); }
.reader-text span { border-radius: 0.8cqi; padding: 0 0.6cqi; margin: 0 -0.6cqi; transition: background-color 120ms ease; }
.reader-text span.on { background: var(--s-mark); }
.mode-listen { display: flex; flex-direction: column; }
.listen-now { flex: 1; display: grid; align-content: center; justify-items: center; gap: 3.4cqi; padding-bottom: 10cqi; }
.wave { display: flex; justify-content: center; align-items: center; gap: 2.4cqi; height: 30cqi; margin-bottom: 4cqi; transform: scaleY(0.12); transition: transform var(--settle); }
body[data-step="listen"] .wave { transform: none; transition: transform var(--settle) 140ms; } /* the sound rises out of a flat line as the screen arrives */
.wave i { width: 2.2cqi; height: 100%; border-radius: 99px; background: var(--s-pine); transform: scaleY(0.3); animation: wave 1100ms ease-in-out infinite alternate; animation-play-state: paused; }
.wave i:nth-child(2n) { animation-duration: 800ms; }
.wave i:nth-child(3n) { animation-duration: 1300ms; animation-delay: -400ms; }
.wave i:nth-child(5n) { animation-delay: -700ms; }
@keyframes wave { from { transform: scaleY(0.18); } to { transform: scaleY(1); } }
body[data-step="listen"] .wave i { animation-play-state: running; }
.progress { width: 100%; height: 1.2cqi; border-radius: 1cqi; background: var(--s-tint); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--s-pine); transform-origin: left; transform: scaleX(var(--read, 0)); }
.reader-dim { color: var(--s-muted); font-size: 3.4cqi; }
body[data-step="rsvp"] .reader-controls { opacity: 0; visibility: hidden; transition: opacity var(--fade), visibility 0s 220ms; }
/* RSVP shows only the word. The mode switch is still there for the keyboard, and comes back while a key has focus on it
   or for a moment after a tap on the word. */
body[data-step="rsvp"] .reader-bar { opacity: 0; pointer-events: none; }
body[data-step="rsvp"] .reader-bar:has(:focus-visible), body.peek[data-step="rsvp"] .reader-bar { opacity: 1; pointer-events: auto; }
.mode-rsvp { display: grid; place-items: center; padding: 0 0 14cqi; }
/* The word, held as the app holds it: a typeface with one width for every letter, one size for every word, and
   the letter the eye rests on starting 35% of the way across. So that letter is in the same place for every word. */
.rsvp-word { display: grid; grid-template-columns: 35% 1ch 1fr; width: 100%; font: 500 8.6cqi/1.2 var(--mono); font-variant-ligatures: none; white-space: nowrap; }
.rsvp-word span:first-child { text-align: right; }
.rsvp-word b { position: relative; font-weight: inherit; text-align: center; color: #c2412a; }
:root[data-theme="dark"] .rsvp-word b { color: #ec6a4c; } /* lighter on the dark screen */
/* A tick above and below that letter. They hang off its box, which is the same for every letter. */
.rsvp-word b::before, .rsvp-word b::after { content: ""; position: absolute; left: 50%; translate: -50% 0; width: max(2px, 0.5cqi); height: 2.2cqi; background: color-mix(in oklab, var(--s-ink) 40%, transparent); }
.rsvp-word b::before { bottom: calc(100% + 1.6cqi); } .rsvp-word b::after { top: calc(100% + 1.6cqi); }
.reader-controls { display: flex; align-items: center; justify-content: space-around; padding: 3cqi 6cqi 9cqi; font-size: 5cqi; transition: opacity var(--fade), visibility 0s; }
.play { display: inline-flex; align-items: center; justify-content: center; gap: 2cqi; padding: 3.2cqi 9cqi; border-radius: 999px; background: var(--s-button); color: #fff; font: 600 3.8cqi var(--sans); }
.play .icon { width: 4.2cqi; height: 4.2cqi; }

/* Library */
.view-library { overflow: hidden; }
.lib { position: relative; padding: 2cqi 5cqi 0; display: grid; gap: 2.8cqi; }
.lib-top { display: flex; justify-content: space-between; }
.lib-title { font: 600 8.6cqi/1 var(--serif); margin-top: 1cqi; }
.lib-search { display: flex; align-items: center; gap: 2cqi; padding: 2.6cqi 3.4cqi; border-radius: 3.4cqi; font-size: 3.5cqi; background: var(--s-tint); color: var(--s-muted); }
.lib-head { display: flex; justify-content: space-between; font-size: 3.2cqi; color: var(--s-muted); margin-top: 1cqi; }
.rows { list-style: none; margin: 0; padding: 0 3cqi; border-radius: 3.6cqi; background: var(--s-card); box-shadow: 0 0 0 1px var(--s-tint); }
.rows li { display: flex; align-items: center; gap: 3cqi; padding: 2.4cqi 0; border-top: 1px solid var(--s-tint); }
.rows li:first-child { border-top: 0; }
.rows .src { display: grid; place-items: center; width: 8cqi; height: 8cqi; border-radius: 2cqi; background: var(--s-tint); color: var(--s-pine); flex: none; font-size: 4.4cqi; }
.rows li > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.rows b { font: 500 3.9cqi var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows small { font-size: 2.9cqi; color: var(--s-muted); display: flex; align-items: center; gap: 1cqi; }

/* ============================================================================================================
   The page: the prints, the first view, the phone, and the six parts of the story.
   ============================================================================================================ */
:root { --long: 1.8; --n: calc(5 + var(--long)); --L: 88svh; --rise: 0px; --cap-h: 0px; --slot-top: var(--nav); --ph: min(calc(100svh - var(--nav) - 56px), 800px); --pw: calc(var(--ph) / 2.092);
  /* The mist of paper under the words, side by side: solid where the words are, gone by the phone's edge, eased
     so there is no visible line where it starts or ends. */
  --mist-side: linear-gradient(90deg, var(--paper) 37%, color-mix(in oklab, var(--paper) 97%, transparent) 41%, color-mix(in oklab, var(--paper) 86%, transparent) 45%,
    color-mix(in oklab, var(--paper) 62%, transparent) 49%, color-mix(in oklab, var(--paper) 30%, transparent) 53%, color-mix(in oklab, var(--paper) 9%, transparent) 56%, color-mix(in oklab, var(--paper) 0%, transparent) 58.5%); }
[data-layout="stack"] { --cap-h: 150px; --L: 64svh; --slot-top: calc(var(--nav) + 6px); --ph: min(calc(100svh - var(--nav) - var(--cap-h) - 38px), 700px); }
main { position: relative; overflow-x: clip; }
.probe { position: absolute; visibility: hidden; width: 0; height: var(--L); }

/* ---------- The prints: one layer under the whole page ---------- */
/* It sticks to the top of the screen for the length of the page. On stacked layouts it first rides up with the
   phone for --rise pixels, so the picture and the phone stay one thing until the phone is in place.
   world.js places each print in it and sets how much of each shows: the first one closes into the card on the
   phone as the page starts to move, and from then on one print fades in behind the phone for each part of the
   story, in step with the scroll. */
.world { position: sticky; top: calc(-1 * var(--rise)); height: calc(100lvh + var(--rise)); margin-bottom: calc(-100lvh - var(--rise)); z-index: 0; overflow: hidden; pointer-events: none;
  transform-origin: 0 0; background: var(--paper); }
.world img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; visibility: hidden; }
.world [data-scene="walk"] { z-index: 1; } .world [data-scene="boat"] { z-index: 2; } .world [data-scene="cabin"] { z-index: 4; }
/* At the end the first print opens out of the card again, over the phone and the words, until it fills the screen. */
.world.out { z-index: 2; }
html.js:not(.placed) :is(.world img, .next-art img) { visibility: hidden !important; } /* nothing is seen to jump into place */
/* The mist of paper where the words sit. Part of the layer, so it closes into the card with the first print. */
.world::after { content: ""; position: absolute; inset: 0; z-index: 6; opacity: var(--mist, 1); }
[data-layout="side"] .world::after { background: linear-gradient(90deg, var(--paper) 34.5%, color-mix(in oklab, var(--paper) 0%, transparent) 52%); }
[data-layout="side"] .world.after::after { background: var(--mist-side); }
/* The last picture has the same soft, wide mist as the prints behind the phone, so the questions and their plus signs sit on paper. */
[data-layout="side"] .world.out::after { background: var(--mist-side); }
[data-layout="stack"] .world::after { left: -150vw; right: -150vw; /* as wide as the print, for the moment the layer shows all of it */ background: linear-gradient(color-mix(in oklab, var(--paper) 82%, transparent) 0, color-mix(in oklab, var(--paper) 70%, transparent) calc(var(--rise) * 0.7), color-mix(in oklab, var(--paper) 0%, transparent) calc(var(--rise) + 60px)); }
/* Stacked, the words are under the phone, so the paper comes up from the bottom to meet them. */
[data-layout="stack"] .world::before { content: ""; position: absolute; inset: 0; z-index: 5; opacity: 0;
  background: linear-gradient(color-mix(in oklab, var(--paper) 0%, transparent) calc(var(--rise) + var(--slot-top) + var(--ph) - 110px), var(--paper) calc(var(--rise) + var(--slot-top) + var(--ph) + 4px)); }
[data-layout="stack"] .world.after::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .world img { transition: opacity 300ms ease; } }

/* ---------- The story: the first view, the phone, and its parts ---------- */
.story { position: relative; z-index: 1; display: grid; }
.hero { grid-area: hero; display: grid; align-content: center; justify-items: start; gap: 20px; }
.hero h1 { font-size: clamp(2.8rem, 1.2rem + 3.6vw, 4.6rem); line-height: 1; }
.hero h1 em { position: relative; display: block; width: max-content; max-width: 100%; }
.hero h1 em::before { content: ""; position: absolute; z-index: -1; left: -3%; right: -2%; bottom: 0.04em; height: 0.38em; background: var(--sun); opacity: 0.3; border-radius: 0.3em 0.1em 0.35em 0.12em; }
.lede { font-size: 1.125rem; max-width: 31em; }
.blocks { grid-area: blocks; }
.phone-slot { grid-area: phone; position: sticky; top: var(--slot-top); align-self: start; display: grid; place-items: center; z-index: 2; }
.cap { display: grid; gap: 18px; justify-items: start; }
.cap > p { color: var(--muted); font-size: 1.125rem; max-width: 24em; }
.dock { display: none; }
@keyframes arrive { from { opacity: 0; transform: translateY(var(--shift)); } }
.hero > * { animation: arrive var(--settle) both; }
.hero > :nth-child(2) { animation-delay: 70ms; } .hero > :nth-child(3) { animation-delay: 180ms; }
.phone-slot { animation: arrive var(--settle) 120ms both; }

/* Side by side: words left, phone right. The phone is in place from the first frame. */
[data-layout="side"] :is(.story, .beta) { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); column-gap: clamp(32px, 5vw, 80px); max-width: calc(var(--page) + 80px); margin: 0 auto; padding: 0 40px; }
[data-layout="side"] .story { grid-template-areas: "hero phone" "blocks phone"; }
/* A strip of paper at the top of the words' column, exactly as wide as the column: the words pass under it, and so
   under the logo, and it thins out below so they leave softly. It reaches a little past the column on both sides,
   for the underline of the first headline. world.js brings it in as the first print starts to move. */
.shade { display: none; }
[data-layout="side"] .shade { display: block; grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; align-self: start; z-index: 3; height: calc(var(--nav) + 26px); margin: 0 -24px 0 -40px; pointer-events: none;
  background: linear-gradient(90deg, var(--paper) calc(100% - 24px), color-mix(in oklab, var(--paper) 0%, transparent));
  -webkit-mask-image: linear-gradient(#000 calc(var(--nav) - 10px), transparent); mask-image: linear-gradient(#000 calc(var(--nav) - 10px), transparent); }
html.js .shade { opacity: 0; }
[data-layout="side"] .hero { min-height: 100svh; padding: calc(var(--nav) + 16px) 0 40px; }
[data-layout="side"] .phone-slot { height: calc(100svh - var(--nav)); }
[data-layout="side"] .block { min-height: var(--L); display: grid; align-content: center; }
[data-layout="side"] .block[data-step="rsvp"] { min-height: calc(var(--L) * var(--long)); } /* the one-word part is longer (--long parts): time for the camera to come in, for a few words at full size, and for it to pull back */
[data-layout="side"] .blocks { padding-bottom: 78svh; } /* after the last part, the stretch of scroll in which the print opens out of the card */

/* Stacked: the words of the first view, then the phone, which rises to the top and stays. The caption of the part
   in view sits in one place under it (the dock) and changes there. The parts' own words stay in the page for
   screen readers and for search. */
[data-layout="stack"] .story { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "tour"; padding: 0 16px; }
[data-layout="stack"] .hero { justify-items: center; text-align: center; padding: calc(var(--nav) + 10px) 4px 16px; gap: 12px; }
[data-layout="stack"] .hero h1 { font-size: clamp(2.1rem, 8.6vw, 3.9rem); }
[data-layout="stack"] .hero h1 em { margin: 0 auto; }
[data-layout="stack"] .hero .lede { font-size: 1.02rem; }
@media (min-width: 900px) { [data-layout="stack"] .hero { padding-top: calc(var(--nav) + 20px); gap: 16px; } [data-layout="stack"] .hero h1 em { display: inline-block; } [data-layout="stack"] .hero .lede { font-size: 1.125rem; } }
[data-layout="stack"] :is(.phone-slot, .blocks, .dock) { grid-area: tour; }
[data-layout="stack"] .phone-slot { justify-self: center; padding-bottom: calc(var(--cap-h) + 14px); } /* room for the words under it, so the phone and its words leave together */
[data-layout="stack"] .block { display: contents; }
[data-layout="stack"] .cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-layout="stack"] .blocks { height: calc(var(--ph) + 14px + var(--n) * var(--L) + 55svh); } /* its parts start once the print is in the card */
[data-layout="stack"] .dock { display: grid; position: sticky; top: calc(var(--slot-top) + var(--ph) + 14px); align-self: start; justify-self: center; z-index: 3;
  width: min(100%, 560px); height: var(--cap-h); padding: 6px 6px 0; transition: opacity var(--fade), visibility 0s; }
body[data-step="hero"] .dock { opacity: 0; visibility: hidden; transition: opacity var(--fade), visibility 0s 220ms; }
.dock-cap { display: grid; align-content: start; gap: 5px; min-height: 0; }
.dock-size { display: none; } /* unseen copies of the captions, used only where the block sizes itself */
.dock-title { font: 500 1.6rem/1.12 var(--serif); letter-spacing: -0.022em; }
.dock-text { color: var(--muted); font-size: 1rem; line-height: 1.42; }
.dock-text:empty { display: none; }

/* Phone-size screens. The drawn phone is as wide as the text column, so its screen can be read, and its lower
   part runs off the bottom of the screen. The words sit on the paper at the bottom and the phone fades into them.
   The words get the room the longest of them needs on this screen (--dock-h, measured by world.js); the phone
   shows in what is left.
   Spacing: one 20px gutter for everything (header, words, phone). The phone sits 16px under the header. In the
   first view the gaps grow as things become less related: 12px headline to text, 20px to the form, 28px to the
   phone. --vis is how much of the phone shows above the words. */
@media (max-width: 599px) {
  [data-layout="stack"] { --gutter: 20px; --nav: 56px; --cap-h: 132px; --slot-top: calc(var(--nav) + 16px);
    --pw: min(calc(100vw - 2 * var(--gutter)), 400px, calc((100svh - var(--nav) - var(--cap-h)) * 0.76)); --ph: calc(var(--pw) * 2.092);
    --vis: calc(100svh - var(--slot-top) - var(--dock-h, var(--cap-h)) - 30px); }
  [data-layout="stack"] .hero { padding: calc(var(--nav) + 14px) 4px 28px; gap: 12px; }
  [data-layout="stack"] .hero .lede { font-size: 1rem; }
  [data-layout="stack"] .hero .join { margin-top: 8px; }
  [data-layout="stack"] .phone-slot { height: calc(100lvh - var(--slot-top)); padding-bottom: 0; align-items: start; }
  [data-layout="stack"] .blocks { height: calc(100lvh - var(--slot-top) + var(--n) * var(--L) + 55svh); }
  [data-layout="stack"] .dock { top: auto; bottom: 0; align-self: end; justify-self: stretch; width: auto; height: auto; min-height: 0; grid-template-rows: auto; align-content: start;
    margin: 0 -16px; padding: 6px var(--gutter) max(16px, env(safe-area-inset-bottom)); background: var(--paper); }
  [data-layout="stack"] .dock::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 56px; pointer-events: none;
    background: linear-gradient(color-mix(in oklab, var(--paper) 0%, transparent), color-mix(in oklab, var(--paper) 38%, transparent) 40%, color-mix(in oklab, var(--paper) 82%, transparent) 75%, var(--paper)); }
  /* and the same under it, for the moment the story ends and the words ride up over the last print */
  [data-layout="stack"] .dock::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 56px; pointer-events: none;
    background: linear-gradient(var(--paper), color-mix(in oklab, var(--paper) 82%, transparent) 25%, color-mix(in oklab, var(--paper) 38%, transparent) 60%, color-mix(in oklab, var(--paper) 0%, transparent)); }
  .dock-cap { gap: 6px; grid-area: 1 / 1; }
  [data-layout="stack"] .dock-size { display: grid; visibility: hidden; pointer-events: none; }
  .dock-title { font-size: 1.5rem; line-height: 1.15; text-wrap: balance; }
  .dock-text { font-size: 1rem; line-height: 1.45; text-wrap: pretty; }
  [data-layout="stack"] .world::before { display: none; } /* the words have their own paper here */
  /* The two buttons on the card can be under the words. When the keyboard reaches one, the phone lifts so it shows. */
  [data-layout="stack"] .phone { transition: translate 250ms cubic-bezier(0.23, 1, 0.32, 1); transform-origin: 50% 0; }
  [data-layout="stack"] body:not([data-step="hero"]) .phone:has(.next-actions :focus-visible) { translate: 0 min(0px, calc(var(--vis) - var(--pw) * 1.45)); }
  /* The phone starts small enough to be seen whole (--s0, worked out in the page's head) and grows from its top
     edge as you scroll; world.js sets the scale from there. Without script it is simply full size. */
  html.js[data-layout="stack"] .phone { transform: scale(var(--s0, 1)); }
  /* Inside the phone, what matters is kept in the part that shows. */
  [data-layout="stack"] .mode-rsvp { align-content: start; padding: max(6cqi, calc(var(--vis) / 2 - 35.5cqi)) 0 0; }
  [data-layout="stack"] .listen-now { flex: none; padding: 5cqi 0 0; }
  [data-layout="stack"] .wave { height: 26cqi; margin-bottom: 3cqi; }
}

/* A phone on its side: two columns, smaller type. */
@media (max-height: 520px) and (min-width: 700px) {
  :root { --ph: calc(100svh - var(--nav) - 16px); }
  [data-layout="side"] :is(.story, .beta) { padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); column-gap: 28px; }
  .hero h1 { font-size: 2rem; } .lede { font-size: 0.95rem; }
  .cap h2, .beta h2 { font-size: 1.6rem; } .cap > p { font-size: 0.98rem; }
}

/* ---------- The pile: what you saved, as loose slips around the phone ---------- */
/* Each slip is a row of the Library lifted off the list. They sit behind the phone and in front of the print.
   pile.js places them and, as the page starts to move, pulls them in under the phone. Three boxes, one job each:
   the button is moved by the script, the box inside it lifts on hover and gives on press, the innermost drifts. */
.slips { position: absolute; inset: 0; pointer-events: none; }
html:not(.js) .slips, html.js:not(.placed) .slips { visibility: hidden; }
.slip { position: absolute; left: 0; top: 0; z-index: -1; margin: 0; padding: 0; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: left;
  cursor: pointer; pointer-events: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.slip[data-off] { visibility: hidden; } /* left out at this screen size: no room for it to show */
.slip-lift { display: block; transition: transform 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.slip-in { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border-radius: 14px; background: var(--surface); white-space: nowrap;
  box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 4px -2px rgba(13,21,18,0.22), 0 14px 26px -16px rgba(13,21,18,0.5);
  animation: drift 7.4s ease-in-out infinite alternate; }
:root[data-theme="dark"] .slip-in { box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(255,255,255,0.05) inset, 0 2px 4px -2px rgba(0,0,0,0.5), 0 14px 26px -16px rgba(0,0,0,0.85); }
.slip .src { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in oklab, var(--ink) 7%, transparent); color: var(--pine); font-size: 18px; flex: none; }
.slip-text { display: grid; min-width: 0; }
.slip b { max-width: 190px; overflow: hidden; text-overflow: ellipsis; font: 500 0.94rem/1.25 var(--serif); letter-spacing: -0.005em; }
.slip small { font-size: 0.75rem; line-height: 1.3; color: var(--muted); }
/* A few pixels of drift, each slip at its own pace, so the pile is not frozen. It stops once they start to move in. */
@keyframes drift { from { transform: translateY(-2px) rotate(-0.35deg); } to { transform: translateY(2px) rotate(0.35deg); } }
.slip:nth-child(2n) .slip-in { animation-duration: 6.1s; animation-delay: -2.2s; }
.slip:nth-child(3n) .slip-in { animation-duration: 8.3s; animation-delay: -4.6s; }
.slip:nth-child(5n) .slip-in { animation-direction: alternate-reverse; }
.slips.fly .slip-in { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .slip:hover .slip-lift { transform: translateY(-3px); } }
.slip:active .slip-lift { transform: scale(0.97); }
/* Picked up with a mouse: above the phone, a little larger, with a longer shadow. */
.slip[data-drag] { z-index: 3; cursor: grabbing; }
.slip[data-drag] .slip-lift, .slip[data-drag]:active .slip-lift { transform: scale(1.04); }
.slip[data-drag] .slip-in { box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 10px -4px rgba(13,21,18,0.25), 0 26px 40px -18px rgba(13,21,18,0.55); }
html.dragging, html.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.slip-tag { display: none; font-style: normal; }
/* Phone-size screens: beside the small phone there is room for a ticket, not for a row. Each slip stands up: its
   picture, and under it the one word that says where the save is from. Whole, never cut by the screen's edge.
   Where even that does not fit (data-bare, set by pile.js), the picture alone, a finger wide. The title and the
   time stay in the slip for screen readers. */
@media (max-width: 599px) {
  .slip .slip-in { flex-direction: column; gap: 3px; padding: 6px 6px 5px; }
  .slip .src { width: 32px; height: 32px; }
  .slip-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .slip-tag { display: block; font: 500 0.6875rem/1.2 var(--sans); color: var(--muted); }
  .slips[data-bare] .slip-tag { display: none; }
  .slips[data-bare] .slip .slip-in { padding: 6px; }
}
/* Small screens, and a phone on its side: a more compact slip, still a finger tall. */
@media (max-width: 599px), (max-height: 520px) and (min-width: 700px) {
  .slip, .slip-in { border-radius: 12px; }
  .slip-in { gap: 8px; padding: 7px 12px 7px 7px; }
  .slip .src { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; }
  .slip b { font-size: 0.875rem; }
  .slip small { font-size: 0.72rem; }
}

/* ---------- The end: the sign-up, with the questions under it, in the last scene ---------- */
/* The cabin is back behind the page for the last part of the story, and stays. The phone leaves; the words keep
   the same column, so the print is seen whole beside them. */
.beta { position: relative; z-index: 3; display: grid; }
/* Side by side it is one screen: the words start a set way down and the questions follow, so opening a question
   moves only what is under it. The last line of the page sits at the bottom of that screen. */
[data-layout="side"] .beta { min-height: 100svh; grid-template-rows: auto auto 1fr; row-gap: clamp(32px, 6svh, 56px); padding-bottom: 22px; }
[data-layout="side"] .beta-body { padding-top: calc(var(--nav) + clamp(28px, 11svh, 112px)); } /* on the words, not the section, so the strip of paper for the logo starts at the section's top */
.beta-body { grid-area: 1 / 1; display: grid; gap: 18px; justify-items: start; }
.beta-body .lede { color: var(--muted); }
.faq { grid-area: 2 / 1; }
.site-foot { grid-area: 3 / 1; align-self: end; color: var(--quiet); font-size: 0.86rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; padding: 15px 0; font: 500 1.14rem var(--serif); text-wrap: balance; user-select: none; -webkit-user-select: none; }
.faq summary::-webkit-details-marker { display: none; }
/* A plus drawn from two bars. Open, the upright bar lies down and it reads as a minus. */
.faq summary i { position: relative; flex: none; width: 36px; height: 36px; margin-right: -6px; border-radius: 50%; color: var(--muted); transition: background-color 150ms ease-out, transform 150ms ease-out, color 150ms ease-out; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 11px; top: 17px; width: 14px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open]:not(.closing) summary i::after { transform: none; }
.faq details[open]:not(.closing) summary i { color: var(--ink); }
.faq summary:active i { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .faq summary:hover i { background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink); } }
.faq-a { overflow: hidden; }
.faq-a p { color: var(--muted); padding: 0 0 18px; max-width: 34em; font-size: 1rem; }
.join-error { color: var(--label); font-size: 0.92rem; }
#beta-error:target { display: block; } /* the worker sends a bad address here, so the message shows without script */

/* Stacked: the words of the sign-up on a band of mist over the print, as in the first view; the questions on
   the paper that follows. */
[data-layout="stack"] .beta { padding: 0 16px; }
[data-layout="stack"] .beta-body { justify-items: center; text-align: center; align-content: start; min-height: 100svh; padding: calc(var(--nav) + 9svh) 4px 40px; gap: 14px; margin: 0 -16px; padding-left: 20px; padding-right: 20px;
  background: linear-gradient(color-mix(in oklab, var(--paper) 0%, transparent), color-mix(in oklab, var(--paper) 84%, transparent) 9svh, color-mix(in oklab, var(--paper) 84%, transparent) 38svh, color-mix(in oklab, var(--paper) 0%, transparent) 58svh); }
[data-layout="stack"] .beta-body .lede { color: var(--ink); }
[data-layout="stack"] .beta-body .join { margin-top: 6px; }
[data-layout="stack"] .faq { margin: 0 -16px; padding: 8px 20px 40px; background: var(--paper); box-shadow: 0 -1px 0 var(--line); }
[data-layout="stack"] .faq > details { max-width: 560px; margin: 0 auto; }
[data-layout="stack"] .faq > details:first-of-type { border-top: 0; }

[data-layout="stack"] .site-foot { margin: 0 -16px; padding: 0 20px max(26px, env(safe-area-inset-bottom)); background: var(--paper); }
[data-layout="stack"] .site-foot { text-align: center; }

/* ---------- The theme switch ---------- */
/* The page changes colour at once. Where a print is on screen, one brush stroke carries the new print across it.
   The stroke is a strip half as wide again as the print, with a bristled right edge (a mask that world.js draws
   once). The strip slides in from the left while the print inside it slides back by the same amount, so the
   print stands still and only the edge moves. Both moves are transforms. */
.brush { position: absolute; left: 0; top: 0; width: 150%; height: 100%; z-index: 1; overflow: hidden; pointer-events: none; will-change: transform;
  -webkit-mask-image: var(--brush-edge); mask-image: var(--brush-edge); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.brush-box { position: absolute; left: 0; top: 0; width: 66.6667%; height: 100%; will-change: transform; }
.brush img { opacity: 1 !important; visibility: visible !important; transition: none !important; } /* its place and size are its print's, copied when the stroke starts */

/* ---------- Reduce Motion: things still appear and change, but nothing travels or loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .wave i, .eq i { animation: none; transform: scaleY(0.6); }
  .next-week-bar span { animation: none; }
  .hero > *, .phone-slot { animation-duration: 200ms; animation-timing-function: ease; }
  .theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { transform: none; }
  .seg-thumb, .along-scroll, .faq summary i, .faq summary i::before, .faq summary i::after, .join-row { transition: none !important; }
  .faq summary:active i { transform: none; }
  .view, .wave { transform: none !important; }
  .phone { transition: none !important; transform: none !important; }
  .pill:active, .theme-toggle:active, .screen .next-start:active, .screen .not-now:active { transform: none; }
  .slip-in { animation: none; }
  .slip-lift { transition: none; }
  .slip:hover .slip-lift, .slip:active .slip-lift { transform: none; }
}

/* ---------- The camera ---------- */
/* closeup.js scales and shifts the phone through the three ways to read. Side by side the phone is then above the
   words and their strip of paper; stacked, the words' block stays above the phone. */
body.measuring .view { transform: none !important; transition: none !important; } /* while closeup.js measures: every screen of the app laid flat */
[data-layout="side"] .phone-slot { z-index: 4; }
/* From one way of reading to the next, as between screens: the one that leaves is out before the one that arrives
   is in. Up close, two of them seen through each other would be hard to miss. */
.mode { transition: opacity 140ms ease-out, visibility 0s 220ms; }
body[data-step="listen"] .mode-listen, body[data-step="along"] .mode-along, body[data-step="rsvp"] .mode-rsvp { transition: opacity 260ms ease-out 120ms, visibility 0s; }
/* The island is an element of its own here, so closeup.js can fade it, with the clock, as the camera comes in. */
.phone::after { content: none; }
.island { position: absolute; z-index: 5; top: calc(var(--pw) * 0.024); left: 50%; translate: -50% 0; width: 31%; height: calc(var(--pw) * 0.088); border-radius: 999px; background: #050807; pointer-events: none; }
/* The line of the one-word part, at the foot of the window while that screen fills it. */
.sub { position: fixed; left: 0; right: 0; bottom: max(28px, 7svh); z-index: 5; margin: 0; padding: 0 24px; text-align: center; pointer-events: none; opacity: 0;
  font: 500 1.375rem/1.2 var(--serif); letter-spacing: -0.012em; color: var(--muted); }
[data-layout="stack"] .sub, html:not(.js) .sub { display: none; }
/* Stacked, on a screen wider than a phone: the words under the phone sit on paper that runs to the bottom of the
   screen, so the phone can grow behind them. */
@media (min-width: 600px) {
  [data-layout="stack"] .dock::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -56px; width: 100vw; height: 100lvh; translate: -50% 0; pointer-events: none;
    background: linear-gradient(color-mix(in oklab, var(--paper) 0%, transparent), color-mix(in oklab, var(--paper) 38%, transparent) 22px, color-mix(in oklab, var(--paper) 82%, transparent) 42px, var(--paper) 56px); }
}
@media (prefers-reduced-motion: reduce) { .sub { display: none; } :root { --long: 1; } } /* no camera: the one-word part is as long as the others */

/* The camera letting go, or coming back, after a tap on the one-word screen: a short ease, so the phone is not seen to jump. */
.phone.eased { transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1); }
@media (prefers-reduced-motion: reduce) { .phone.eased { transition: none; } }

/* ---------- The two small pages: "you're on the list" and "not here" ---------- */
.note { max-width: 560px; margin: 10vh auto 0; padding: 0 20px; display: grid; gap: 16px; justify-items: start; }
.note .plate { width: 160px; height: auto; border-radius: 22px; }
.note h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem); }
.note p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Without script ---------- */
/* The page still reads from top to bottom: the first view with its form over the first print, the phone as a still
   picture of the app's first screen, the six parts as plain headings, then the sign-up and the questions. Nothing
   sticks, and nothing is shown that needs script to work. It is one column at every width. */
html:not(.js) .world { position: absolute; inset: 0 0 auto; height: 100svh; margin: 0; }
html:not(.js) .world .plain { opacity: 1; visibility: visible; object-position: 77% 0; }
html:not(.js) .world::after { opacity: 1; background: linear-gradient(color-mix(in oklab, var(--paper) 66%, transparent), color-mix(in oklab, var(--paper) 80%, transparent) 50%, var(--paper) 96%); }
html:not(.js) .world::before { display: none; }
html:not(.js) .story { display: block; max-width: 640px; margin: 0 auto; padding: 0 20px; }
html:not(.js) .phone-slot { position: static; height: auto; padding: 8px 0 40px; }
html:not(.js) .blocks { display: grid; gap: 30px; height: auto; padding: 0 0 56px; }
html:not(.js) .block { display: block; min-height: 0; }
html:not(.js) .cap { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; justify-items: center; text-align: center; gap: 8px; }
html:not(.js) .beta-body { min-height: 0; padding-top: 16px; background: none; }
html:not(.js) :is(.dock, .slips, .sub, .shade, .theme-toggle, .next-actions) { display: none; } /* no dead buttons, and no words that only script would place */
