/* Storyo — storyo.app
   The palette and the sky come straight from the app: a daytime sky that fades
   to a cream horizon in light mode, a starry night in dark mode, navy ink, and
   the gold star from the icon. Headings use the app's rounded face. */

:root {
  --sky-top: #73b8f5;
  --sky-mid: #b5dbfc;
  --paper: #f6efdc;
  --card: #fffbf0;
  --ink: #1a245c;
  --ink-2: #4a5487;
  --rule: rgba(26, 36, 92, 0.16);
  --star: #ffd94d;
  --link: #1d5fd1;
  --night-1: #0a1233;
  --night-2: #121a52;
  --night-3: #211a5c;
  --bezel: #1c1d24;
  --bezel-edge: #9a9da8;
  --shadow: 0 1px 2px rgba(26, 36, 92, 0.1), 0 14px 34px -14px rgba(26, 36, 92, 0.38);

  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: "Literata", "Iowan Old Style", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.6rem, 1.4rem + 5vw, 4.75rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10164a;
    --card: #1a2263;
    --ink: #f1f3ff;
    --ink-2: #b3bbea;
    --rule: rgba(241, 243, 255, 0.18);
    --link: #9cc4ff;
    --bezel: #05060f;
    --bezel-edge: #6b7196;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 36px -14px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The root background is what shows while the page rubber-bands and, in
     Safari, what tints the browser chrome. Safari extends the top edge of it
     above the page and the bottom edge below, so a half-and-half gradient
     gives the sky at the top and the paper at the bottom. */
  background: linear-gradient(to bottom, var(--sky-top) 50%, var(--paper) 50%);
}
@media (prefers-color-scheme: dark) {
  html { background: linear-gradient(to bottom, var(--night-1) 50%, var(--paper) 50%); }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
}

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

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 {
  font-family: var(--round);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 20;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-head { position: absolute; inset: 0 0 auto 0; z-index: 10; }

.nav {
  max-width: var(--wrap); margin-inline: auto;
  padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--round); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.01em;
  color: #1a245c; text-decoration: none;
}
.brand img { border-radius: 23%; box-shadow: 0 2px 8px rgba(26, 36, 92, 0.3); }

.nav-links { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.75rem); }
.nav-links a {
  font-family: var(--round); font-weight: 700; font-size: var(--step--1);
  color: #1a245c; text-decoration: none;
}
.nav-links a, .nav-cta { white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.nav-cta {
  font-family: var(--round); font-weight: 800; font-size: var(--step--1);
  padding: 0.5rem 0.95rem; border-radius: 999px;
  background: #1a245c; color: #fff !important;
}
.nav-cta.is-soon { background: rgba(255, 255, 255, 0.55); color: #1a245c !important; }

@media (prefers-color-scheme: dark) {
  .brand, .nav-links a { color: #fff; }
  .nav-cta { background: #fff; color: #10164a !important; }
  .nav-cta.is-soon { background: rgba(255, 255, 255, 0.16); color: #fff !important; }
}

@media (max-width: 34rem) {
  .nav-links a[href$="#stories"], .nav-cta.is-soon { display: none; }
  .brand span { font-size: 1.25rem; }
}

/* ── Sky ────────────────────────────────────────────────────────────────── */

.sky {
  position: relative;
  background:
    radial-gradient(38rem 26rem at 86% 8%, rgba(255, 246, 205, 0.95), rgba(255, 246, 205, 0) 62%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--paper) 100%);
}

@media (prefers-color-scheme: dark) {
  .sky {
    background:
      radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 27% 42%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 41% 12%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 58% 30%, #fff 50%, transparent 51%),
      radial-gradient(2px 2px at 73% 14%, #ffe9a3 50%, transparent 51%),
      radial-gradient(1px 1px at 88% 38%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 94% 9%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 6% 52%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 66% 58%, #fff 50%, transparent 51%),
      linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 48%, var(--night-3) 78%, var(--paper) 100%);
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(6.5rem, 12vw, 9rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}

.hero h1 { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.03em; line-height: 0.98; color: #1a245c; }
.hero-lede { font-size: var(--step-1); line-height: 1.5; margin-top: 1.4rem; max-width: 27rem; color: #25306b; }
.hero-cta { margin-top: 2rem; }

@media (prefers-color-scheme: dark) {
  .hero h1 { color: #fff; }
  .hero-lede { color: #d6dcff; }
}

.store-badge { display: inline-block; border-radius: 12px; }
.store-badge img { height: 56px; width: auto; }

.store-soon {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--round); font-weight: 800; font-size: var(--step-0);
  background: #1a245c; color: #fff; padding: 0.8rem 1.25rem; border-radius: 999px;
}
.store-soon-mark {
  width: 0.95rem; height: 0.95rem; flex: none; background: var(--star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@media (prefers-color-scheme: dark) {
  .store-soon { background: #fff; color: #10164a; }
  .store-soon-mark { background: #e0a800; }
}

/* The fan: three finished pages and the snapshot they were painted from. */
.fan { position: relative; aspect-ratio: 1 / 1.04; max-width: 33rem; width: 100%; justify-self: center; }

.fan-page, .fan-photo {
  position: absolute; margin: 0;
  border-radius: 1.1rem; overflow: hidden; background: var(--card);
  box-shadow: 0 2px 4px rgba(16, 22, 74, 0.18), 0 26px 50px -18px rgba(16, 22, 74, 0.55);
}
.fan-page img, .fan-photo img { width: 100%; height: 100%; object-fit: cover; }

.fan-page.is-left  { width: 50%; aspect-ratio: 1; left: 0;   top: 2%;  transform: rotate(-6deg); }
.fan-page.is-right { width: 50%; aspect-ratio: 1; right: 0;  top: 8%;  transform: rotate(5deg); }
.fan-page.is-front { width: 58%; aspect-ratio: 1; left: 24%; top: 40%; transform: rotate(-1.5deg); }

.fan-photo {
  width: 27%; aspect-ratio: 1; left: 3%; bottom: 3%;
  border: 0.45rem solid #fff; border-bottom-width: 1.5rem; border-radius: 0.35rem;
  transform: rotate(-6deg);
}

@media (prefers-reduced-motion: no-preference) {
  .fan-page, .fan-photo { animation: fan-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .fan-page.is-left  { --from: translate(40%, 60%) rotate(0deg) scale(0.9); animation-delay: 220ms; }
  .fan-page.is-right { --from: translate(-40%, 52%) rotate(0deg) scale(0.9); animation-delay: 300ms; }
  .fan-page.is-front { --from: translate(0, 8%) rotate(0deg) scale(0.92); animation-delay: 120ms; }
  .fan-photo         { --from: translate(90%, -40%) rotate(4deg) scale(1.2); animation-delay: 0ms; animation-duration: 700ms; }
  @keyframes fan-in { from { transform: var(--from); opacity: 0; } }
}

.fan-note {
  grid-column: 1 / -1; justify-self: end; max-width: 34rem; width: 100%;
  font-size: 0.8125rem; color: var(--ink-2); opacity: 0.8; text-align: center; margin-top: -1rem;
}

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  .fan { order: 2; max-width: 28rem; }
  .fan-note { justify-self: center; margin-top: 0; order: 3; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section > .wrap > h2, .section-head h2 { font-size: var(--step-3); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { margin-top: 0.9rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }

/* How it works — a real sequence, so it is numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3.5vw, 3rem); counter-reset: step; }
.step { counter-increment: step; }
.step-art { position: relative; aspect-ratio: 1; border-radius: 1.25rem; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.step-art img { width: 100%; height: 100%; object-fit: cover; }
.step-art.is-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--paper); }
.step h3 { font-size: var(--step-2); margin-top: 1.4rem; display: flex; align-items: baseline; gap: 0.6rem; }
.step h3::before {
  content: counter(step);
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: inline-grid; place-items: center; align-self: center;
  background: var(--star); color: #1a245c; font-size: 1.15rem; font-weight: 900;
}
.step p { margin-top: 0.6rem; color: var(--ink-2); }

@media (max-width: 52rem) {
  .steps { grid-template-columns: 1fr; max-width: 26rem; }
}

/* Devices */
.screens { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }

.device { margin: 0; }
.device-frame {
  background: var(--bezel); padding: clamp(0.5rem, 1.3vw, 0.95rem);
  border-radius: clamp(1.1rem, 2.6vw, 1.9rem);
  /* A hairline ring outside the bezel, so the dark frame reads against the page. */
  box-shadow: 0 0 0 1px var(--bezel-edge), 0 2px 3px rgba(16, 22, 74, 0.25), 0 40px 70px -30px rgba(16, 22, 74, 0.65);
}
.device-frame img { width: 100%; border-radius: clamp(0.6rem, 1.4vw, 1rem); }
.device figcaption { margin-top: 1.1rem; max-width: 34rem; }
.device figcaption strong { font-family: var(--round); font-weight: 800; font-size: var(--step-1); display: block; line-height: 1.25; }
.device figcaption span { color: var(--ink-2); display: block; margin-top: 0.3rem; }

.device.is-phone .device-frame { border-radius: clamp(1.6rem, 3.4vw, 2.6rem); padding: clamp(0.45rem, 1vw, 0.7rem); }
.device.is-phone .device-frame img { border-radius: clamp(1.2rem, 2.6vw, 2rem); }

.screens-lead { position: relative; }
.screens-duo { display: grid; grid-template-columns: minmax(0, 3.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.screens-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
.screens-feature { display: grid; grid-template-columns: minmax(0, 3.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.screens-feature figcaption { margin-top: 0; }

@media (max-width: 46rem) {
  .screens-duo { grid-template-columns: 1fr; }
  .screens-duo .is-phone { max-width: 15rem; }
  .screens-pair { grid-template-columns: 1fr; }
  .screens-feature { grid-template-columns: 1fr; }
  .screens-feature figcaption { margin-top: 1.1rem; }
}

/* Page lock — the reader screenshot dressed as it looks locked: a closed lock
   over the toolbar's open one, the hold chip by the page dots, and numbered
   pins that match the steps beside it. Positions are percentages of the
   1800×1254 screenshot; sizes use container units so they scale with it. */
.lock { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.lock-screen { position: relative; container-type: inline-size; }
.lock-screen > img { width: 100%; border-radius: clamp(0.6rem, 1.4vw, 1rem); }

.lock-button {
  position: absolute; left: 93.55%; top: 3.35%; translate: -50% -50%;
  width: 3.3cqw; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: #f8f6f1;
}
.lock-button svg { width: 2.1cqw; fill: #1c1c1e; }

.lock-taps { position: absolute; left: 26%; top: 62%; }
.lock-taps i {
  position: absolute; width: 5.5cqw; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  border: 0.3cqw solid rgba(255, 255, 255, 0.95); background: rgba(40, 44, 70, 0.35);
  box-shadow: 0 0.2cqw 0.8cqw rgba(16, 22, 74, 0.3);
}
.lock-taps i:nth-child(2) { left: 7cqw; top: -5cqw; }
.lock-taps i:nth-child(3) { left: -4cqw; top: 6cqw; }

.lock-bar {
  position: absolute; left: 50%; bottom: 3.5%; translate: -50% 0;
  display: flex; align-items: center; gap: 0.8cqw;
  font: 600 1.45cqw/1 var(--round); color: #1c1c1e; white-space: nowrap;
}
.lock-dots, .lock-chip {
  display: inline-flex; align-items: center; height: 3.4cqw; padding-inline: 1.2cqw; border-radius: 999px;
  background: rgba(255, 255, 255, 0.72); box-shadow: 0 0.2cqw 0.8cqw rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lock-dots { gap: 0.55cqw; }
.lock-dots i { width: 0.6cqw; aspect-ratio: 1; border-radius: 50%; background: rgba(28, 28, 30, 0.3); }
.lock-dots i.is-on { width: 1.6cqw; border-radius: 999px; background: #1c1c1e; }
.lock-chip { gap: 0.55cqw; }
.lock-chip svg { width: 1.5cqw; fill: currentColor; }

.lock-pin {
  position: absolute; translate: -50% -50%;
  width: max(1.6rem, 3.6cqw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font: 900 max(0.85rem, 1.9cqw)/1 var(--round); color: #1a245c; background: var(--star);
  box-shadow: 0 0 0 0.3cqw #fff, 0 0.4cqw 1.2cqw rgba(16, 22, 74, 0.35);
}
.lock-pin.is-2 { left: 39%; top: 50%; }

/* Loupes: the screenshot again as a background, magnified by --z around the
   point --fx/--fy (in cqw of the 100cqw-wide screenshot), with the locked UI
   redrawn at the same zoom so it stays sharp. */
.loupe { position: absolute; left: var(--x); top: var(--y); width: var(--d); aspect-ratio: 1; }
.loupe-lens {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: #cfd2d6 url("images/screens/ipad-reader.jpg") no-repeat;
  background-size: calc(var(--z) * 100cqw) auto;
  background-position: calc(var(--d) / 2 - var(--z) * var(--fx)) calc(var(--d) / 2 - var(--z) * var(--fy));
  box-shadow: 0 0 0 0.55cqw #fff, 0 0 0 0.75cqw rgba(26, 36, 92, 0.12), 0 1.2cqw 3cqw -0.6cqw rgba(16, 22, 74, 0.55);
}
.loupe .lock-button, .loupe .lock-bar {
  left: calc(50% + var(--z) * (var(--ex) - var(--fx)));
  top: calc(50% + var(--z) * (var(--ey) - var(--fy)));
  bottom: auto; translate: -50% -50%; scale: var(--z);
}
.loupe .lock-pin { left: 14.6%; top: 14.6%; }

/* The toolbar's lock, centred in the lens. */
.loupe.is-lock { --d: 19cqw; --x: 68cqw; --y: 3.5cqw; --z: 3; --fx: 93.55cqw; --fy: 2.33cqw; }
.loupe.is-lock .lock-button { --ex: 93.55cqw; --ey: 2.33cqw; }
/* The dots and the chip, hanging off the bottom of the screen. */
.loupe.is-chip { --d: 30cqw; --x: 62cqw; --y: 46cqw; --z: 2.1; --fx: 54.5cqw; --fy: 65.5cqw; }
.loupe.is-chip .lock-bar { --ex: 50cqw; --ey: 65.5cqw; }

@media (prefers-reduced-motion: no-preference) {
  .lock-taps i { animation: lock-tap 3.6s ease-out infinite both; }
  .lock-taps i:nth-child(2) { animation-delay: 0.5s; }
  .lock-taps i:nth-child(3) { animation-delay: 1s; }
  @keyframes lock-tap {
    0% { scale: 0.4; opacity: 0; }
    6% { scale: 0.7; opacity: 1; }
    12% { scale: 0.75; opacity: 1; }
    34%, 100% { scale: 1.3; opacity: 0; }
  }
  /* The shake the app gives when a swipe is refused. */
  .lock-chip { animation: lock-shake 3.6s ease-in-out 1.6s infinite; }
  @keyframes lock-shake {
    0%, 10%, 100% { translate: 0; color: #1c1c1e; }
    2% { translate: -0.5cqw; color: #d9342b; }
    4% { translate: 0.5cqw; color: #d9342b; }
    6% { translate: -0.35cqw; }
    8% { translate: 0.35cqw; }
  }
}

.lock-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; counter-reset: lock; }
.lock-steps li { counter-increment: lock; display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; }
.lock-steps li::before {
  content: counter(lock); grid-row: span 2;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--star); color: #1a245c; font: 900 1.15rem/1 var(--round);
}
.lock-steps h3 { font-size: var(--step-1); line-height: 1.25; align-self: center; }
.lock-steps p { margin-top: 0.3rem; color: var(--ink-2); }

@media (max-width: 52rem) {
  .lock { grid-template-columns: 1fr; }
  .lock-demo { margin-bottom: 7vw; }
  .lock-steps { max-width: 34rem; }
}

/* Library */
.shelf + .shelf { margin-top: clamp(3rem, 6vw, 4.5rem); }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.25rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--rule); margin-bottom: 1.75rem; }
.shelf-head h3 { font-size: var(--step-2); }
.shelf-head p { color: var(--ink-2); }

.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.75rem, 3.4vw, 2.75rem) clamp(1.1rem, 2.6vw, 2.25rem); }
@media (max-width: 46rem) { .books { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A cover reads as a book, not a card: square spine edge on the left, a soft
   fore-edge on the right, and a hinge line where the board folds. */
.book-cover {
  width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--card);
  border-radius: 3px 0.7rem 0.7rem 3px;
  box-shadow: inset 0 0 0 1px rgba(26, 36, 92, 0.08), 3px 3px 0 -1px var(--card), 5px 5px 0 -1px rgba(26, 36, 92, 0.2), 0 18px 28px -16px rgba(26, 36, 92, 0.5);
}
.book-title { font-size: 1.1rem; margin-top: 1rem; line-height: 1.2; }
.book-lesson { font-style: italic; color: var(--ink-2); font-size: var(--step--1); margin-top: 0.25rem; line-height: 1.4; }
.book-meta { font-family: var(--round); font-weight: 700; font-size: 0.78rem; color: var(--ink-2); margin-top: 0.3rem; }

/* Reading together */
.together { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.together-lead h2 { font-size: var(--step-3); }
.together-lead p { margin-top: 1rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.text-link { font-family: var(--round); font-weight: 800; display: inline-block; margin-top: 1.5rem; }

.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding-block: 1.15rem; border-top: 2px solid var(--rule); }
.facts div:last-child { border-bottom: 2px solid var(--rule); }
.facts dt { font-family: var(--round); font-weight: 800; font-size: var(--step-1); line-height: 1.25; }
.facts dd { margin: 0.3rem 0 0; color: var(--ink-2); }
.facts dd[lang] { word-break: keep-all; }

@media (max-width: 52rem) { .together { grid-template-columns: 1fr; } }

/* Night band: what happens to the photo */
.night {
  background:
    radial-gradient(1.5px 1.5px at 9% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 37% 16%, #ffe9a3 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 71% 24%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 95% 18%, #fff 50%, transparent 51%),
    linear-gradient(180deg, var(--night-1), var(--night-2) 55%, var(--night-3));
  color: #f1f3ff;
}
.night h2 { font-size: var(--step-3); max-width: 30rem; }
.night a { color: #ffe27a; }
.promises { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(2rem, 5vw, 4rem); }
.promises li { padding-left: 2rem; position: relative; }
.promises li::before {
  content: ""; position: absolute; left: 0; top: 0.3rem; width: 1.15rem; height: 1.15rem; background: var(--star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.promises strong { font-family: var(--round); font-weight: 800; font-size: var(--step-1); display: block; line-height: 1.25; }
.promises span { color: #c3caf3; display: block; margin-top: 0.3rem; }
.night-more { margin-top: clamp(2rem, 4vw, 3rem); }
@media (max-width: 46rem) { .promises { grid-template-columns: 1fr; } }

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

.site-foot { border-top: 2px solid var(--rule); padding-block: 2.5rem 3.5rem; }
.foot-inner { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; }
.site-foot .brand { color: var(--ink); font-size: 1.2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot-links a { font-family: var(--round); font-weight: 700; font-size: var(--step--1); color: var(--ink); }
.foot-credit { font-size: var(--step--1); color: var(--ink-2); margin-left: auto; }
.foot-credit a { color: inherit; }
@media (max-width: 46rem) { .foot-credit { margin-left: 0; } }

/* ── Long-form pages: For parents, privacy, terms, support ──────────────── */

.page-doc .site-head, .page-parents .site-head { position: static; }
.page-doc .site-head, .page-parents .site-head {
  background: linear-gradient(180deg, var(--sky-top), var(--sky-mid));
}
@media (prefers-color-scheme: dark) {
  .page-doc .site-head, .page-parents .site-head { background: linear-gradient(180deg, var(--night-1), var(--night-2)); }
}

.doc-hero { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem); }
.doc-hero-inner { max-width: 46rem; margin-inline: auto; }
.doc-hero h1 { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.03em; color: #1a245c; }
.doc-hero p { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; color: #25306b; max-width: 38rem; }
@media (prefers-color-scheme: dark) {
  .doc-hero h1 { color: #fff; }
  .doc-hero p { color: #d6dcff; }
}
.page-parents .doc-hero.sky { background: linear-gradient(180deg, var(--sky-mid) 0%, var(--paper) 100%); }
@media (prefers-color-scheme: dark) {
  .page-parents .doc-hero.sky { background: linear-gradient(180deg, var(--night-2) 0%, var(--paper) 100%); }
}

.prose { max-width: 46rem; margin-inline: auto; padding: 0 var(--gutter) clamp(3.5rem, 8vw, 6rem); font-size: 1.125rem; line-height: 1.72; }
.prose.legal { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.prose > * + * { margin-top: 1.15em; }
.prose h1 { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.03em; }
.prose h2 { font-size: var(--step-3); margin-top: 2.4em; scroll-margin-top: 1.5rem; }
.prose h3 { font-size: var(--step-2); margin-top: 1.9em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.35em; margin-bottom: 0; }
.prose li + li { margin-top: 0.45em; }
.prose li > ul { margin-top: 0.45em; }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 2px solid var(--rule); margin-block: 2.5em; }
.prose sup { font-family: var(--round); font-weight: 700; font-size: 0.68em; line-height: 0; }
.prose sup a { text-decoration: none; padding: 0 0.1em; }

.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; display: block; overflow-x: auto; }
.prose th { font-family: var(--round); font-weight: 800; text-align: left; white-space: nowrap; }
.prose th, .prose td { padding: 0.75rem 1rem 0.75rem 0; vertical-align: top; border-bottom: 2px solid var(--rule); min-width: 9rem; }

.short { background: var(--card); border-radius: 1.25rem; padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow); }
.short h2 { margin-top: 0; font-size: var(--step-2); }
.short ol { margin-top: 1rem; }
.short li::marker { font-family: var(--round); font-weight: 800; }

.aside { border-left: 4px solid var(--star); padding: 0.2rem 0 0.2rem 1.25rem; color: var(--ink-2); }

.sources { font-size: 0.95rem; line-height: 1.55; }
.sources li { overflow-wrap: anywhere; scroll-margin-top: 1.5rem; }
.sources li:target { background: color-mix(in srgb, var(--star) 28%, transparent); border-radius: 0.4rem; box-shadow: 0 0 0 0.4rem color-mix(in srgb, var(--star) 28%, transparent); }

.pages-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-block: 2rem; }
.pages-row img { border-radius: 0.9rem; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }
