/* Foilbook mini-site. One stylesheet for every page.
   Colors come from the app's design system (Deckbook/Design/Skin.swift):
   dark mode is the navy vinyl with gold, light mode is the pearl binder page.
   No outside requests: system fonts only (SF Pro Rounded on Apple devices). */

:root {
  color-scheme: light dark;

  /* The app's fixed colors, the same in both modes. */
  --gold: #F4CE3B;
  --gold-hi: #F7D85A;
  --gold-lo: #E9B824;
  --gold-ink: #111111;

  /* Light: the pearl page. */
  --bg-top: #F8F7FB;
  --bg: #F2F3F8;
  --ink: #141A26;
  --sub: #525B70;
  --line: rgba(20, 26, 38, 0.14);
  --dash: rgba(20, 26, 38, 0.26);
  --sleeve: rgba(20, 26, 38, 0.05);
  --sleeve-line: rgba(20, 26, 38, 0.14);
  --sleeve-gloss: rgba(255, 255, 255, 0.7);
  --lamp: rgba(244, 206, 59, 0.26);
  --lamp-soft: rgba(244, 206, 59, 0.08);
  --link: #141A26;
  --link-line: #E9B824;
  --accent-text: #7A5600;
  --focus: #7A5600;

  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);

  /* The landing page's row of three sleeves. */
  --pw: clamp(228px, calc((100svh - 300px) / 2.09), 312px);   /* the phone's width */
  --sw: calc(var(--pw) + 44px);                                  /* a sleeve's width */
  --gap: clamp(14px, 1.8vw, 26px);
  --row: calc(3 * var(--sw) + 2 * var(--gap));
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: the navy vinyl. */
    --bg-top: #232B3D;
    --bg: #161C29;
    --ink: #F2F5FA;
    --sub: #9AA5BC;
    --line: rgba(255, 255, 255, 0.14);
    --dash: #6B7490;
    --sleeve: rgba(255, 255, 255, 0.05);
    --sleeve-line: rgba(255, 255, 255, 0.13);
    --sleeve-gloss: rgba(255, 255, 255, 0.16);
    --lamp: rgba(244, 206, 59, 0.16);
    --lamp-soft: rgba(244, 206, 59, 0.05);
    --link: #F4CE3B;
    --link-line: rgba(244, 206, 59, 0.55);
    --accent-text: #F4CE3B;
    --focus: #F4CE3B;
  }
}

/* ── Base ─────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 720px);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

::selection { background: var(--gold); color: var(--gold-ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s ease-out, color 0.18s ease-out;
}
a:hover { text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(46rem + 2 * var(--gutter)); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--gold); color: var(--gold-ink); padding: 8px 16px;
  border-radius: 8px; font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Header: the icon and name, and the coming-soon pill ──────── */

.head {
  width: 100%; max-width: calc(var(--row) + 2 * var(--gutter)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 12px;
  padding: 18px var(--gutter) 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-weight: 900; font-size: 20px; letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 22.5%; box-shadow: 0 2px 6px -2px rgba(22, 28, 41, 0.45); }

/* Coming soon: a label, not a button. */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 6px 14px;
  border-radius: 999px; border: 1.5px solid var(--gold-lo);
  background: rgba(244, 206, 59, 0.16); color: var(--accent-text);
  font-weight: 800; font-size: 14px; line-height: 1.2; white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; flex: none; }
@media (prefers-color-scheme: dark) {
  .pill { border-color: var(--gold); background: rgba(244, 206, 59, 0.08); }
}

/* ── Footer ───────────────────────────────────────────────────── */

.foot {
  width: 100%; max-width: calc(var(--row) + 2 * var(--gutter)); margin: 64px auto 0;
  padding: 22px var(--gutter) 34px;
  text-align: center; font-size: 13.5px; color: var(--sub); line-height: 1.5;
}
.foot::before {
  content: ""; display: block; height: 1px; background: var(--line); margin: 0 0 12px;
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 10px; }
.foot nav a { color: var(--sub); text-decoration: none; font-weight: 700; padding: 10px 2px; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link-line); }
.foot nav a[aria-current="page"] { color: var(--ink); }
.foot nav span { opacity: 0.6; }
.foot p { margin: 4px auto 0; max-width: 46rem; }
.foot .unofficial { margin-top: 12px; font-size: 12.5px; opacity: 0.85; }

/* ── Landing: the row of sleeves ──────────────────────────────── */
/* The phone playing the app sits in the middle sleeve, like an owned card.
   The sleeves beside it are blanks, the way Foilbook shows a missing card,
   and they hold the promise. */

.landing { padding: 0 var(--gutter); overflow-x: clip; }

.stage {
  position: relative; isolation: isolate;
  display: grid; justify-content: center; align-items: stretch;
  grid-template-columns: var(--sw) var(--sw) var(--sw);
  gap: var(--gap);
  max-width: 1200px; margin: 0 auto; padding-top: clamp(4px, 1.5vh, 20px);
}
.stage::before {
  /* A lamp over the middle sleeve. */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 46%; width: min(1000px, 100vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--lamp), var(--lamp-soft) 55%, rgba(244, 206, 59, 0) 100%);
}

.sleeve { position: relative; border-radius: 24px; }

.sleeve--phone {
  display: grid; place-items: center; padding: 22px;
  background: var(--sleeve);
  box-shadow: inset 0 0 0 1.5px var(--sleeve-line);
}
.sleeve--phone::after {
  /* The sleeve's gloss along its top edge. */
  content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 22px; border-radius: 22px 22px 0 0;
  background: linear-gradient(var(--sleeve-gloss), rgba(255, 255, 255, 0)); pointer-events: none;
}
.sleeve--phone .phone { --phone-w: var(--pw); }

.sleeve--blank {
  display: flex; flex-direction: column; justify-content: center;
  padding: 30px 26px;
  border: 2px dashed var(--dash);
}
.sleeve-no {
  position: absolute; top: 16px; left: 20px;
  font: 800 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--sub);
}
.sleeve--right .sleeve-no { left: auto; right: 20px; }

.say {
  margin: 0; font-size: clamp(36px, calc(var(--sw) / 6.2), 60px); font-weight: 900;
  letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance;
}
.sleeve--left .say { text-align: right; }
.say .gold {
  background-image: linear-gradient(transparent 60%, rgba(244, 206, 59, 0.9) 60%, rgba(244, 206, 59, 0.9) 90%, transparent 90%);
  padding: 0 0.04em;
}
@media (prefers-color-scheme: dark) {
  .say .gold { background-image: none; color: var(--gold); padding: 0; }
}
.tail { margin: 18px 0 0; font-size: 15px; font-weight: 650; color: var(--sub); line-height: 1.45; }

/* Wide screens: the side sleeves hold real photos of the family's binder pages
   (from their own scans), with the words on a dark fade at the bottom. Nick picked
   this on 2026-10-06. On narrow screens the sleeves are just the headline. */
@media (min-width: 1001px) {
  .sleeve--blank {
    border: 0; overflow: hidden; justify-content: flex-end; color: #fff;
    background: linear-gradient(180deg, rgba(14, 18, 28, 0) 28%, rgba(14, 18, 28, 0.55) 52%, rgba(14, 18, 28, 0.93) 80%), var(--photo) center / cover;
    box-shadow: inset 0 0 0 1.5px var(--sleeve-line), 0 22px 44px rgba(0, 0, 0, 0.28);
  }
  .sleeve--left { --photo: url(img/binder-left.jpg); }
  .sleeve--right { --photo: url(img/binder-right.jpg); }
  .stage .sleeve--blank .say, .stage .sleeve--blank .tail { text-align: left; }
  .sleeve--blank .tail { color: rgba(255, 255, 255, 0.82); }
  .sleeve--blank .say .gold { background-image: none; color: #F4CE3B; padding: 0; }
  .sleeve--blank .sleeve-no { color: #fff; background: rgba(14, 18, 28, 0.6); padding: 6px 8px; border-radius: 8px; }
}
.sleeve--left .tail { text-align: right; }

/* ── Landing: one bar per step, filling as it plays, with arrows ─ */

.chapnav {
  margin: 22px auto 0;
  width: min(100%, calc(var(--sw) * 2.75));
  display: flex; align-items: center; gap: 12px;
}
.chapters {
  list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
}
.step-btn {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 44px; height: 44px; border-radius: 50%; margin: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink); background: var(--sleeve); border: 1.5px solid var(--sleeve-line);
  transition: background 0.2s ease-out, border-color 0.2s ease-out, transform 0.15s ease-out;
}
.step-btn svg { width: 20px; height: 20px; }
.step-btn:hover { border-color: var(--gold); background: var(--lamp-soft); }
.step-btn:active { transform: scale(0.94); }
.step-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.chapter-now { display: none; margin: 10px 0 0; text-align: center; font-size: 15px; font-weight: 750; color: var(--ink); }
.chapters button {
  appearance: none; -webkit-appearance: none; border: 0; background: none; margin: 0;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer; display: block; width: 100%;
  padding: 8px 2px 6px; border-radius: 8px; min-height: 44px;
}
.chapters button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bar { display: block; height: 4px; border-radius: 2px; overflow: hidden; background: var(--line); }
.bar i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  transform-origin: left; transform: scaleX(0);
}
.lab { display: block; margin-top: 8px; font-size: 13px; font-weight: 750; color: var(--sub); line-height: 1.25; transition: color 0.2s ease-out; }
.lab b { font: 800 11px/1 var(--mono); margin-right: 5px; opacity: 0.7; }
.chapters button:hover .lab, .chapters .is-on .lab { color: var(--ink); }

/* ── Landing: one line and the facts ──────────────────────────── */

.under { text-align: center; max-width: 40rem; margin: 26px auto 0; }
.line { margin: 0 auto; font-size: 18px; line-height: 1.55; color: var(--sub); max-width: 34em; }
.line strong { color: var(--ink); font-weight: 750; }
.req { margin: 0; font-size: 14px; color: var(--sub); }

/* ── Landing: what the app does, one block each ─────────────────── */
/* Words on one side, a real screen from the app in a card sleeve on the other.
   Phones get the words first, then the screen. */

.feats {
  max-width: 1000px; margin: clamp(56px, 9vw, 112px) auto 0;
  display: grid; gap: clamp(64px, 10vw, 128px);
}
.feat { display: grid; gap: 26px; align-items: center; }
.feat-copy { max-width: 34rem; }
.feat-no {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 800 12.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub);
}
.feat-no span {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px;
  border-radius: 7px; background: var(--gold); color: var(--gold-ink); letter-spacing: 0.02em;
}
.feat h2 {
  font-size: clamp(31px, 7.6vw, 50px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02;
  margin: 0 0 16px; text-wrap: balance;
}
.feat h2 .gold, .end h2 .gold {
  background-image: linear-gradient(transparent 60%, rgba(244, 206, 59, 0.9) 60%, rgba(244, 206, 59, 0.9) 90%, transparent 90%);
  padding: 0 0.04em;
}
.feat-copy p { margin: 0 0 14px; font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.feat-copy .feat-no { font-size: 12.5px; line-height: 1; margin-bottom: 14px; }
.feat-copy .feat-more { font-size: 15.5px; line-height: 1.5; color: var(--sub); font-weight: 550; margin: 0; }

/* The screen in a card sleeve, like the phone above. */
.feat-shot {
  position: relative; margin: 0; width: 100%; max-width: 400px; justify-self: center;
  padding: 12px; border-radius: 26px;
  background: var(--sleeve);
  box-shadow: inset 0 0 0 1.5px var(--sleeve-line);
}
.feat-shot::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 20px; border-radius: 24px 24px 0 0;
  background: linear-gradient(var(--sleeve-gloss), rgba(255, 255, 255, 0)); pointer-events: none;
}
.feat-shot img {
  width: 100%; height: auto; border-radius: 16px; background: #202634;
  box-shadow: 0 18px 36px -18px rgba(14, 18, 27, 0.55);
}

/* Tall screens sit a little narrower on phones, so the page stays short. */
@media (max-width: 759px) {
  .feat-shot--tall { max-width: 300px; }
}

/* Misprints: the one block in foil, with the app's holo edge. */
@property --foil-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.feat--foil {
  --card: #FFFFFF;
  position: relative; isolation: isolate;
  padding: clamp(22px, 5vw, 48px) clamp(18px, 5vw, 52px);
  border-radius: 30px; border: 2.5px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from var(--foil-a), #F4CE3B, #F59BC5, #9CC9F7, #A8EFC2, #E9B824, #C9A8F5, #F4CE3B) border-box;
  box-shadow: 0 30px 60px -36px rgba(122, 86, 0, 0.45);
  animation: foil 9s linear infinite;
}
.feat--foil::before {
  /* A soft sheen across the card. */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(90% 70% at 100% 0%, var(--lamp), rgba(244, 206, 59, 0) 70%);
}
@keyframes foil { to { --foil-a: 360deg; } }
.feat--foil .feat-shot { background: rgba(20, 26, 38, 0.06); }

.mis-list { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 8px; }
.mis-list li {
  display: grid; grid-template-columns: auto; gap: 1px;
  padding: 10px 14px 11px; border-radius: 14px;
  border: 1.5px dashed var(--dash); font-size: 15.5px; line-height: 1.4; color: var(--sub); font-weight: 550;
}
.mis-list b { color: var(--ink); font-weight: 850; font-size: 15px; }

/* The note, and its "How to tell" opened under it, tucked in a little crooked. */
.feat-shot--stack .shot-pull {
  width: 88%; margin: 12px 0 0 auto; position: relative;
  border-radius: 14px; background: #2B3242;
  box-shadow: 0 0 0 2px var(--gold), 0 20px 36px -16px rgba(14, 18, 27, 0.6);
  transform: rotate(-1.6deg); transform-origin: 80% 0;
}

/* ── Landing: the smaller things, as blank sleeves ─────────────── */

.more { max-width: 1080px; margin: clamp(72px, 11vw, 136px) auto 0; }
.more-title {
  font-size: clamp(26px, 5.6vw, 36px); font-weight: 900; letter-spacing: -0.03em; margin: 0 0 20px;
}
.more-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.more-grid li {
  position: relative; padding: 18px 18px 18px 66px; border-radius: 20px;
  border: 2px dashed var(--dash);
}
.more-grid svg {
  position: absolute; left: 16px; top: 18px; width: 36px; height: 36px; padding: 7px; border-radius: 11px;
  background: rgba(244, 206, 59, 0.18); color: var(--accent-text);
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.more-grid h3 { font-size: 17px; font-weight: 850; letter-spacing: -0.01em; margin: 0 0 4px; line-height: 1.25; }
.more-grid p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--sub); font-weight: 550; }

/* ── Landing: the close ───────────────────────────────────────── */

.end {
  max-width: 40rem; margin: clamp(72px, 11vw, 128px) auto 0; text-align: center;
}
.end img { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22.5%; box-shadow: 0 14px 28px -12px rgba(22, 28, 41, 0.55); }
.end h2 { font-size: clamp(28px, 6vw, 40px); font-weight: 900; letter-spacing: -0.03em; margin: 0 0 14px; text-wrap: balance; }
.end p { margin: 0 auto 10px; font-size: 16.5px; line-height: 1.55; color: var(--ink); max-width: 32em; }
.end .req { color: var(--sub); font-size: 14.5px; }

@media (prefers-color-scheme: dark) {
  .feat h2 .gold, .end h2 .gold { background-image: none; color: var(--gold); padding: 0; }
  .feat--foil { --card: #1B2232; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
  .feat--foil .feat-shot { background: rgba(255, 255, 255, 0.04); }
  .more-grid svg { background: rgba(244, 206, 59, 0.12); }
}

@media (min-width: 560px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(32px, 6vw, 80px); }
  .feat:nth-child(even) { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
  .feat:nth-child(even) .feat-shot { order: -1; }
  .feat-shot { max-width: none; }
  .feat h2 { font-size: clamp(32px, 4.3vw, 50px); }
}
/* Tablets: the foil block is too narrow for two columns inside its edge, so it stacks. */
@media (min-width: 760px) and (max-width: 1000px) {
  .feat.feat--foil { grid-template-columns: minmax(0, 1fr); }
  .feat--foil .feat-copy { max-width: none; }
  .feat--foil .feat-shot { max-width: 440px; }
  .feat--foil .mis-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1001px) {
  .feat { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
  .feat:nth-child(even) { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
  .feat:nth-child(even) .feat-copy { justify-self: end; }
  .feat.feat--foil { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
  .feat-copy p { font-size: 19px; }
  .more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .more-grid li { padding: 20px; }
  .more-grid svg { position: static; display: block; margin: 0 0 14px; }
}

/* As each screen scrolls in, it slides into its sleeve. Only moves, never hides: without
   scroll-linked animation support (or with Reduce Motion) everything simply sits in place. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feat-shot, .more-grid li {
      animation: slide-in ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}
@keyframes slide-in { from { transform: translateY(26px) rotate(-1.2deg); } to { transform: none; } }

/* Entrances. */
.sleeve--phone { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both; }
.sleeve--left { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both; }
.sleeve--right { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── The iPhone frame that plays the app ──────────────────────── */
/* Geometry follows the iPhone 17 Pro screen. The top 88/1560 of the screen is
   the frame's own status bar; the clips (720 x 1472) fill the rest. */

.phone {
  --phone-w: 300px;
  position: relative;
  width: var(--phone-w);
  max-width: 100%;
  container-type: inline-size;
  flex: none;
}
.phone-body {
  position: relative;
  padding: 3.6cqw;
  border-radius: 16.4cqw;
  background: linear-gradient(150deg, #4A5368 0%, #1B2130 18%, #0E121B 50%, #1B2130 82%, #3B4458 100%);
  box-shadow:
    inset 0 0 0 0.55cqw rgba(255, 255, 255, 0.16),
    inset 0 0 0 1.4cqw #0B0E15,
    0 2px 0 0 rgba(255, 255, 255, 0.06),
    0 44px 80px -34px rgba(14, 18, 27, 0.75),
    0 18px 36px -20px rgba(14, 18, 27, 0.6);
}
/* Side buttons: action and volume on the left, the side button on the right. */
.phone-body::before,
.phone-body::after {
  content: ""; position: absolute; width: 1.2cqw; border-radius: 1cqw;
  background: linear-gradient(90deg, #2B3245, #4A5368);
}
.phone-body::before { left: -0.9cqw; top: 22%; height: 7%; box-shadow: 0 13cqw 0 #3B4458, 0 30cqw 0 #3B4458; }
.phone-body::after { right: -0.9cqw; top: 31%; height: 13%; background: linear-gradient(270deg, #2B3245, #4A5368); }

.phone-screen {
  position: relative;
  aspect-ratio: 720 / 1560;
  border-radius: 12.8cqw;
  overflow: hidden;
  background: #202634;               /* the app's top bar, behind the status bar */
  isolation: isolate;
}
.phone-media {
  position: absolute;
  left: 0; top: 5.641%;               /* 88 / 1560 */
  width: 100%; height: 94.359%;
  object-fit: cover; object-position: top center;
  display: block;
  background: #202634;
  z-index: 1; opacity: 1;
  transition: opacity 0.32s ease-out;
}
/* The next clip waits under the one playing, then fades in over it. */
.phone-media.is-spare { z-index: 0; opacity: 0; transition: opacity 0s linear 0.32s; }

.phone-time,
.phone-icons {
  position: absolute; top: 3.38%; transform: translateY(-50%);
  color: #F2F5FA; z-index: 2; pointer-events: none;
}
.phone-time {
  left: 9.5%;
  font: 600 4.5cqw/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
}
.phone-icons { right: 7.5%; width: 17.5cqw; height: auto; fill: currentColor; }
.phone-island {
  position: absolute; z-index: 3;
  top: 1.26%; left: 34.35%; width: 31.3%; height: 4.23%;
  border-radius: 999px; background: #000;
}
.phone-screen::after {
  /* A faint glass reflection over the screen. */
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 34%);
}

/* Pause and play. Hidden until the script runs, so it never shows as a dead button. */
.phone-toggle {
  position: absolute; right: -12px; bottom: -12px; z-index: 5;
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 2px solid #F4CE3B;
  background: #0E121B; color: #F4CE3B;
  box-shadow: 0 8px 18px -8px rgba(14, 18, 27, 0.8);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease-out;
}
.phone-toggle[hidden] { display: none; }
.phone-toggle:hover { transform: scale(1.06); background: #172853; }
.phone-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.phone-toggle:focus-visible { outline: 3px solid #F4CE3B; outline-offset: 3px; }

/* ── Support and privacy ──────────────────────────────────────── */

.doc { padding-top: clamp(28px, 5vw, 56px); }
.doc h1 {
  font-size: clamp(2.3rem, 4.6vw + 0.8rem, 3.6rem);
  font-weight: 900; letter-spacing: -0.035em; line-height: 1.0;
  margin: 0 0 12px; text-wrap: balance;
}
.doc .sub { color: var(--sub); font-size: 15px; font-weight: 650; margin: 0 0 32px; }
.doc h2 {
  font-size: 22px; font-weight: 850; letter-spacing: -0.01em;
  margin: 48px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.doc h2::before {
  content: ""; width: 4px; align-self: stretch; min-height: 20px; border-radius: 2px; background: var(--gold); flex: none;
}
.doc p, .doc li { color: var(--ink); }
.doc p { margin: 0 0 16px; }
.doc ul { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; padding-left: 2px; }
.doc li::marker { color: var(--accent-text); }
.doc hr { border: 0; border-top: 2px dashed var(--dash); margin: 48px 0 0; }

/* The contact box on the support page: a blank binder sleeve, like the landing page's. */
.doc .card {
  position: relative;
  margin: 0 0 24px;
  padding: 26px 28px;
  border-radius: 24px;
  border: 2px dashed var(--dash);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--lamp-soft), rgba(244, 206, 59, 0) 60%),
    var(--sleeve);
  font-size: 18px;
}
.doc .card p { margin: 0; }
.doc .card a { font-weight: 800; font-size: 1.08em; }

/* ── Reduced motion ───────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .sleeve--phone, .sleeve--left, .sleeve--right { animation: none; }
  .feat--foil { animation: none; }
  .lab, a, .phone-toggle, .step-btn { transition: none; }
  .phone-media, .phone-media.is-spare { transition: none; }
}

/* ── Narrow screens: the promise on top, then the phone ───────── */

@media (max-width: 1000px) {
  :root { --pw: min(68vw, 290px); }
  .head { max-width: 640px; }
  .foot { max-width: 640px; }
  .stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .sleeve--left { order: -2; }
  .sleeve--right { order: -1; }
  .sleeve--phone { order: 0; margin-top: 22px; padding: 16px; border-radius: 22px; }
  .sleeve--blank { border: 0; padding: 0; width: 100%; }
  .sleeve-no { display: none; }
  .say { font-size: clamp(34px, 8.6vw, 54px); text-align: center !important; }
  .sleeve--left .tail, .sleeve--right .tail { display: none; }
  .chapnav { width: min(100%, 620px); }
  /* The phone lies on a photo of the family's binder page (Nick picked this, 2026-10-06). */
  .sleeve--phone {
    background: linear-gradient(rgba(14, 18, 28, 0.35), rgba(14, 18, 28, 0.55)), url(img/binder-left.jpg) center / cover;
    box-shadow: inset 0 0 0 1.5px var(--sleeve-line), 0 18px 40px rgba(0, 0, 0, 0.3);
    padding: 26px 22px; width: 100%; max-width: 420px;
  }
}
@media (max-width: 560px) {
  .head { flex-wrap: wrap; }
  .pill { font-size: 13px; padding: 5px 12px; min-height: 34px; }
  .doc .card { padding: 20px; font-size: 17px; }
}
@media (max-width: 640px) {
  .chapnav { gap: 10px; }
  .chapters { gap: 5px; }
  .chapters button { padding: 20px 0; min-height: 44px; }
  .lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chapter-now { display: block; }
}
@media (max-width: 400px) {
  body { font-size: 16.5px; }
  .line { font-size: 16.5px; }
}

/* Who the app is for, under the headline (cold read, 2026-10-06: a phone visitor could not tell). */
.who { margin: 12px 0 0; font-size: 14px; font-weight: 650; line-height: 1.4; color: rgba(255, 255, 255, 0.82); }
@media (max-width: 1000px) {
  .who { color: var(--sub); text-align: center; font-size: 15px; margin-top: 10px; }
}
