/* Fold Daily landing: an open book. The left page (the stage) stays put; the right page scrolls.
   Brand from brand/README.md (logo files in img/logo/, colours in brand/tokens.json) and docs/DESIGN.md:
   warm paper, lamp-lit sepia desk (never black), Fraunces + Inter, six piece inks. */

@font-face { font-family: Fraunces; font-weight: 700; font-display: swap; src: url(/fonts/Fraunces_700Bold.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-weight: 900; font-display: swap; src: url(/fonts/Fraunces_900Black.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/Inter_400Regular.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/Inter_600SemiBold.woff2) format('woff2'); }

:root {
  --bg: #F4EFE6;          /* paper desk */
  --surface: #FFFDF8;     /* a sheet */
  --step: #E8DFCF;        /* paper edge: one tone off the ground */
  --ink: #1D1B18;
  --muted: #5F5A52;
  --desk: #433829;        /* the lamp-lit desk, the stage */
  --desk-ink: #F5ECDA;
  --page: #EADFC8;        /* parchment under the lamp */
  --page-edge: #D2C2A2;
  --page-ink: #33291C;
  --pencil: #8A7A60;
  --accent: #E2574C;      /* coral, the folded corner */
  --wrong: #D2453A;

  --t-xl: clamp(56px, 7vw, 120px);
  --t-l: clamp(38px, 4.2vw, 68px);
  --t-m: clamp(24px, 2.2vw, 34px);
  --t-s: 18px;
  --t-xs: 15px;

  --margin: clamp(20px, 3.4vw, 56px);
  --radius: 6px;
  --gap: clamp(120px, 18vh, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.28, .5, 1); /* small overshoot, paper settling */
  --book: min(42vh, calc((50vw - 64px - 6px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-s)/1.55 Inter, system-ui, sans-serif; overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 900; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #3D5A80; outline-offset: 3px; }
::selection { background: #E9B44C; color: var(--ink); }

/* ---------- the spread ---------- */
.spread { display: grid; grid-template-columns: 1fr 1fr; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--desk); align-self: start; }
.layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s .7s; }
.layer.on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.reading { min-width: 0; padding-inline: var(--margin); }
.column p, .lede { max-width: 48ch; }
.column > section { padding-top: var(--gap); }

/* ---------- the book on the stage ---------- */
.layer-play { align-content: center; gap: 26px; padding: 32px; }
.book { --size: var(--book); position: relative; display: grid; grid-template-columns: var(--size) var(--size); gap: 6px; perspective: 1800px; }
.page { position: relative; width: var(--size); aspect-ratio: 1; background: var(--page); border-radius: var(--radius); padding: 6%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); }
.book > .page { box-shadow: 0 2px 3px rgba(30, 20, 8, .25), 0 18px 40px rgba(30, 20, 8, .32); } /* taste-skill-ignore: DESIGN.md pages have soft layered shadows */
.page-source::after { content: ''; position: absolute; left: 0; bottom: 0; width: 11%; aspect-ratio: 1; background: var(--accent); clip-path: polygon(0 0, 100% 100%, 0 100%); border-bottom-left-radius: var(--radius); pointer-events: none; }
.cell { border: 0; padding: 0; margin: 1.5px; background: var(--page-edge); border-radius: 4px; cursor: pointer; background-size: 12px; transition: transform .25s var(--spring); }
button.cell:hover:not(.piece) { transform: scale(.92); }
span.cell { cursor: default; }
.page-target .cell, .mini .page + .page .cell, .dev-right .cell { background: transparent; border-radius: 2px; cursor: default; }
.page-target .cell.want, .mini .page + .page .cell.want, .dev-right .cell.want { border: 1.5px dashed var(--pencil); background-color: rgba(154, 138, 112, .16); }
.cell.ghost { opacity: .6; border-color: transparent !important; }
.cell.miss { background: var(--wrong) !important; animation: pulse .5s 2; }
.cell.piece { margin: 0; border-radius: 1.5px; box-shadow: inset 0 1px rgba(255, 255, 255, .18); } /* taste-skill-ignore: cardstock edge highlight, DESIGN.md */
.reveal-art { position: absolute; inset: 6%; width: 88%; height: 88%; opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--spring); transform: scale(.92); pointer-events: none; }
.solved .reveal-art { opacity: 1; transform: scale(1); }
.solved .page-target .cell { opacity: 0; transition: opacity .5s; }
/* The left page, flipped over onto the right when you fold. */
.flap { position: absolute; left: 0; top: 0; width: var(--size); aspect-ratio: 1; transform-origin: calc(100% + 3px) 50%; transform-style: preserve-3d; transition: transform .9s var(--spring); pointer-events: none; visibility: hidden; }
.flap .face { position: absolute; inset: 0; background: var(--page); border-radius: var(--radius); backface-visibility: hidden; padding: 6%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); }
.flap .back { transform: rotateY(180deg); background: var(--page-edge); }
.folding .flap { visibility: visible; }
.folding .page-source { visibility: hidden; }
.paper-bits { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.paper-bits i { position: absolute; width: 10px; height: 14px; border-radius: 1px; animation: bit 1.5s var(--ease) forwards; }

.tray { display: flex; flex-wrap: wrap; gap: 14px 20px; justify-content: center; align-items: center; min-height: 104px; max-width: calc(var(--book) * 2 + 6px); --sq: clamp(18px, 1.7vw, 24px); }
.tray-piece { border: 0; padding: 6px; background: transparent; border-radius: var(--radius); display: grid; gap: 1px; transition: transform .3s var(--spring); }
button.tray-piece { cursor: pointer; }
.tray-piece i { width: var(--sq); height: var(--sq); border-radius: 2px; display: block; background-size: 12px; }
.tray-piece i.off { visibility: hidden; }
button.tray-piece:hover { transform: translateY(-3px) rotate(-2deg); }
.tray-piece[aria-pressed="true"] { transform: scale(1.14) translateY(-3px); outline: 2px solid var(--desk-ink); outline-offset: 2px; }

.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, calc(var(--book) * 2 + 6px)); }
.stage-note { color: var(--desk-ink); font-size: var(--t-xs); }
.stage-actions { display: flex; gap: 10px; flex: none; }
.stage-still { width: 60%; }

.layer-picture { background: var(--page); }
.layer-picture figure { margin: 0; width: min(68%, 66vh); display: grid; gap: 24px; justify-items: center; }
.layer-picture img { width: 100%; animation: drift 14s ease-in-out infinite alternate; }
.layer-picture figcaption { font: 900 var(--t-m)/1 Fraunces, serif; color: var(--page-ink); letter-spacing: -0.02em; }

/* ---------- the foldable: a phone drawn from the app's own page, hinge follows the scroll ---------- */
.device { --p: 0; --dev: min(40vh, 19vw); --ghost: 0; --cover: 0; position: relative; display: grid; grid-template-columns: var(--dev) var(--dev); gap: 22px; perspective: 1600px; transform: translateX(calc(var(--p) * -25%)); }
.device .page { --size: var(--dev); width: var(--dev); border-radius: 12px; outline: 10px solid #1F1A13; } /* the phone's bezel */
.dev-right { grid-column: 2; border-radius: 0 12px 12px 0 !important; }
.dev-front { border-radius: 12px 0 0 12px !important; }
.dev-right .dev-ghost { opacity: var(--ghost); border-color: transparent !important; }
.dev-right .cell:not(.dev-ghost) { opacity: 1; }
.dev-left { grid-column: 1; grid-row: 1; position: relative; transform-origin: calc(100% + 11px) 50%; transform-style: preserve-3d; transform: rotateY(calc(var(--p) * -180deg)); }
.dev-front { backface-visibility: hidden; }
.dev-back { position: absolute; inset: -10px; background: #1F1A13; border-radius: 22px; backface-visibility: hidden; transform: rotateY(180deg); display: grid; align-content: center; justify-items: center; }
.dev-back img { width: 78%; opacity: var(--cover); }
.device-inline { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 600 var(--t-xs)/1 Inter, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .22s var(--spring), background-color .18s, border-color .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn-big { min-height: 56px; padding: 0 30px; font-size: var(--t-s); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #EB6A60; }
.btn-ink { background: var(--desk-ink); color: var(--page-ink); }
.btn-ink:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--desk-ink); border: 2px solid #7B6A50; }
.btn-ghost:hover { border-color: var(--desk-ink); }
.btn[disabled], .btn[disabled]:hover { opacity: .45; cursor: default; transform: none; }
.btn-wide { width: 100%; min-height: 54px; }
.btn-ghost-ink { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost-ink:hover { background: var(--step); }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; padding-block: 28px clamp(32px, 6vh, 64px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
/* The lock-up file carries its own clear space (one strip width); the negative margin lines the F up with the text below. */
.wordmark { display: inline-flex; flex: none; }
.wordmark img { height: 48px; width: auto; max-width: none; margin: -8.5px; }
.bar-links { display: flex; flex-wrap: wrap; gap: 6px clamp(14px, 1.6vw, 24px); font-size: var(--t-xs); font-weight: 600; }
.bar-links a { text-decoration: none; }
.bar-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hero-main { margin-block: auto; padding-block: 32px; display: grid; gap: clamp(20px, 3.4vh, 32px); }
h1 { font-size: clamp(40px, 5.4vw, 104px); line-height: 1; letter-spacing: -0.03em; margin-left: -0.03em; }
h1 span { white-space: nowrap; display: block; }
.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; max-width: 42ch; }
.hero-duo { font: 900 var(--t-m)/1.15 Fraunces, serif; letter-spacing: -0.015em; text-wrap: balance; }
.hero-duo a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hero-duo a:hover { text-decoration-color: var(--ink); }
.hero-act { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; font-size: var(--t-xs); }

/* ---------- how it works ---------- */
h2 { font-size: var(--t-l); line-height: 1.02; margin-bottom: 24px; letter-spacing: -0.025em; }
.how { padding-top: clamp(48px, 8vh, 96px) !important; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.how h2 { margin-bottom: 0; }
.statement { font: 900 var(--t-m)/1.15 Fraunces, serif; letter-spacing: -0.015em; color: var(--muted); transition: color .4s; }
.step.active .statement { color: var(--ink); }
.step-fig { display: none; }

/* ---------- small product drawings ---------- */
.mini { --size: calc(50% - 2px); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mini .page { width: 100%; border-radius: 4px; }
.mini .cell { margin: 1px; border-radius: 2px; }
.mini .cell.piece { margin: 0; }
.mini-art { position: absolute; inset: 6%; width: 88%; height: 88%; }
.mini-peek { perspective: 800px; }
.mini-peek .page:first-child { transform-origin: 100% 50%; transform: rotateY(-48deg); }

/* ---------- iPhone Duo: the one place the reading page goes to the night desk, so the whole screen is the phone's ---------- */
.column > .foldables { margin: var(--gap) calc(var(--margin) * -1) 0; padding: clamp(72px, 13vh, 136px) var(--margin); background: var(--desk); color: var(--desk-ink); display: grid; gap: 28px; }
.foldables h2 { font-size: clamp(56px, 6.4vw, 112px); line-height: .96; letter-spacing: -0.03em; margin: 0 0 0 -0.03em; }
.foldables .statement { color: var(--desk-ink); max-width: 24ch; }
.hinge { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 22px; max-width: 44ch; }
.hinge h3 { font-size: var(--t-m); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 4px; }
.also { margin-top: clamp(28px, 5vh, 56px); display: grid; gap: 10px; }
.also-label { font-weight: 600; }
.devices { list-style: none; margin: 0 0 6px; padding: 0; font: 900 var(--t-m)/1.14 Fraunces, serif; letter-spacing: -0.015em; }

/* ---------- pictures ---------- */
.pictures { display: grid; gap: 28px; }
.pictures h2 { margin-bottom: -4px; }
.wall { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.wall button { border: 0; padding: 10%; background: var(--step); border-radius: var(--radius); cursor: pointer; aspect-ratio: 1; transition: transform .25s var(--spring), background-color .15s; }
.wall button:hover { transform: scale(1.05) rotate(-1.5deg); }
.wall button[aria-pressed="true"] { background: var(--page-edge); }

/* ---------- habit: each one composed for what it shows ---------- */
.habit { display: grid; gap: clamp(72px, 11vh, 112px); }
.habit h2 { margin-bottom: -32px; }
.module h3 { font-size: var(--t-m); line-height: 1.12; margin-bottom: 8px; letter-spacing: -0.015em; }
.module p { max-width: 38ch; }
.module-share { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.share { margin: 0; background: var(--surface); color: var(--ink); padding: 26px 20px 16px; display: grid; justify-items: center; text-align: center; gap: 6px; transform: rotate(-2deg); clip-path: polygon(0 0, 84% 0, 100% 11%, 100% 100%, 0 100%); position: relative; }
.share::after { content: ''; position: absolute; top: 0; right: 0; width: 16%; height: 11%; background: var(--accent); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.share-day { font-size: 12px; color: var(--muted); }
.share-name { font: 700 22px/1 Fraunces, serif; }
.share-num { font: 900 clamp(56px, 6vw, 84px)/1.05 Fraunces, serif; letter-spacing: -0.02em; }
.share-squares { display: flex; gap: 5px; }
.share-squares i { width: 18px; height: 18px; border-radius: 3px; background: #D2453A; }
.share-squares i.right { background: #1F8A70; }
.share-line { font: 700 19px/1.2 Fraunces, serif; margin-top: 6px; }
.share-sub { font-size: 13px; color: var(--muted); }
.share-url { font-size: 12px; color: var(--muted); margin-top: 14px; }
.module-crane { display: grid; gap: 24px; }
.cranes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); background: var(--step); border-radius: var(--radius); padding: 14px 8px; }
.cranes svg { width: 100%; }
.cranes svg:last-child { transform: scale(1.28); transform-origin: 50% 60%; }
.cranes svg.rise.in:last-child { transform: scale(1.28); }
.module-duel { display: grid; gap: 24px; }
.duel-fig { margin: 0; background: var(--desk); color: var(--desk-ink); border-radius: var(--radius); padding: clamp(14px, 1.6vw, 24px); display: grid; gap: clamp(14px, 1.6vw, 24px); --sq: clamp(9px, .9vw, 14px); }
.duel-side { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: center; justify-items: center; }
.duel-flip { transform: rotate(180deg); }
.duel-side .mini { width: 100%; }
.duel-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; min-height: 58px; }
.duel-tray .tray-piece { padding: 2px; }
.duel-tray i { background-size: 6px; }
.duel-text { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.6vw, 40px); }
.module-more { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vh, 56px) clamp(20px, 2.6vw, 40px); }
.reminder { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 2.6vw, 40px); align-items: center; }
.note { margin: 0; padding: 16px 18px; display: grid; gap: 6px; background: var(--desk); color: var(--desk-ink); border-radius: 16px; font-size: var(--t-xs); line-height: 1.4; }
.note-app { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.note-app img { height: 27px; width: auto; margin: -5px -5px -5px -4px; }

/* ---------- questions ---------- */
.questions details { background: var(--step); border-radius: var(--radius); margin-bottom: 6px; }
.questions summary { padding: 18px 20px; cursor: pointer; font: 700 clamp(19px, 1.6vw, 24px)/1.25 Fraunces, serif; letter-spacing: -0.01em; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; transition: color .15s; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: ''; flex: none; width: 14px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 100%, 0 100%); transition: transform .3s var(--spring); }
.questions details[open]:not(.closing) summary::after { transform: rotate(-90deg); }
.questions details p { padding: 0 20px 20px; }
/* The answer is a sheet folded in half under its question; it opens like a letter (app.js drives the angle). */
.answer { position: relative; }
.answer.folding { overflow: hidden; perspective: 900px; }
.answer.folding .answer-flat { visibility: hidden; }
.answer-half { position: absolute; left: 0; right: 0; overflow: hidden; background: var(--step); backface-visibility: hidden; will-change: transform; }
.answer-half.top { top: 0; transform-origin: 50% 0; }
.answer-half.bottom { bottom: 0; transform-origin: 50% 100%; }
.answer-half > div { position: absolute; left: 0; right: 0; }
.answer-half.top > div { top: 0; }
.answer-half.bottom > div { bottom: 0; }
.answer-half::after { content: ''; position: absolute; inset: 0; background: var(--page-ink); opacity: var(--shade, 0); pointer-events: none; }

/* ---------- call to action: the one section that breaks the spread ---------- */
.cta { margin-top: 96px; min-height: 88svh; background: var(--accent); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 80px var(--margin); }
.cta-line { display: grid; gap: 24px; }
.cta-line p { max-width: 34ch; font-size: clamp(18px, 1.5vw, 22px); }
.cta h2 { font-size: clamp(56px, 6.4vw, 112px); line-height: .96; margin: 0; letter-spacing: -0.03em; }
.dialog { justify-self: center; width: min(100%, 440px); background: var(--surface); padding: 28px; border-radius: 10px; display: grid; gap: 12px; box-shadow: 0 24px 60px rgba(60, 20, 10, .28); } /* taste-skill-ignore: the sheet floats over the field */
.dialog-title { font: 900 var(--t-m)/1.1 Fraunces, serif; }
.dialog-small { font-size: var(--t-xs); color: var(--muted); }
.dialog-small.err { color: var(--ink); font-weight: 600; }
.dialog-small a { text-underline-offset: 3px; }
.field { display: grid; gap: 6px; margin-top: 4px; font-size: var(--t-xs); font-weight: 600; }
.field input { width: 100%; min-height: 54px; padding: 0 16px; font: 400 var(--t-s)/1.2 Inter, sans-serif; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; }
.field input::placeholder { color: #8A8478; }
.pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.pick legend { padding: 0; margin-bottom: 6px; font-size: var(--t-xs); font-weight: 600; }
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick label { position: relative; display: block; }
.pick input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; background: var(--step); font: 600 var(--t-xs)/1 Inter, sans-serif; transition: background-color .18s, color .18s, transform .22s var(--spring); }
.pick label:hover span { transform: translateY(-1px); }
.pick input:active + span { transform: scale(.96); }
.pick input:checked + span { background: var(--ink); color: var(--surface); }
.pick input:focus-visible + span { outline: 3px solid #3D5A80; outline-offset: 3px; }
.hp { position: absolute; height: 0; overflow: hidden; opacity: 0; pointer-events: none; } /* a field only scripts fill in */
.dialog .btn-accent { margin-top: 6px; font-size: var(--t-s); }
.dialog[aria-busy="true"] .btn { opacity: .6; pointer-events: none; }
.dialog-done { justify-items: start; transform-origin: 50% 0; }
.dialog-done:focus { outline: none; } /* focused by script so it is read out, not a control */
.dialog-done img { height: 84px; width: auto; margin: -14px; }
.dialog-done.unfold { animation: unfold .7s var(--spring) both; }

/* ---------- footer: the name returns at full width ---------- */
.foot { padding: 72px var(--margin) 28px; overflow: hidden; }
/* The wordmark file has 20 units of clear space around 288 of letters: scaled so the letters span the page margins. */
.foot-name { margin: 0 0 20px; }
.foot-name img { width: 113.87%; max-width: none; margin: -4.4% 0 -3.4% -6.93%; }
.foot-legal { margin-top: 14px; font-size: var(--t-xs); color: var(--muted); max-width: 80ch; }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: var(--t-xs); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { text-underline-offset: 3px; }

/* ---------- entrances ---------- */
.rise { opacity: 0; transform: translateY(24px); }
.rise.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes unfold { from { transform: perspective(900px) rotateX(-80deg); opacity: 0; } }
@keyframes nudge { 40% { transform: scale(1.1); } }
.btn.ready { animation: nudge .7s var(--spring) 2; }
@keyframes drift { to { transform: scale(1.04) rotate(-1.2deg); } }
@keyframes bit { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

@media (min-width: 900px) {
  /* Half a pixel of paper can show where the band meets the stage on odd window widths: tuck the band under it. */
  .column > .foldables { margin-left: calc(var(--margin) * -1 - 1px); padding-left: calc(var(--margin) + 1px); }
}

@media (max-width: 1099px) {
  .bar-links { width: 100%; }
}

/* ---------- phone and tablet: the stage leads, then releases ---------- */
@media (max-width: 899px) {
  :root { --gap: clamp(88px, 12vh, 120px); --book: calc((100vw - 40px - 6px) / 2); --margin: 20px; }
  html { scroll-padding-top: 16px; }
  .spread { display: block; }
  .hero { min-height: auto; padding-block: 20px 36px; }
  .hero-main { padding-block: 32px 0; }
  h1 { font-size: min(11.4vw, 84px); }
  .bar-links { width: auto; }
  .stage { position: relative; height: auto; overflow: visible; align-self: stretch; }
  .reading { display: contents; }
  .hero, .column { padding-inline: var(--margin); display: block; }
  .hero { display: flex; }
  .spread { display: flex; flex-direction: column; }
  .hero { order: 1; }
  .stage { order: 2; }
  .column { order: 3; }
  .layer { position: static; }
  .layer-phone, .layer-picture { display: none; }
  .layer-play { position: relative; opacity: 1; visibility: visible; padding: 28px 20px; }
  .tray { --sq: 20px; display: grid; grid-template-columns: auto auto; justify-items: center; }
  .stage-foot { width: 100%; flex-wrap: wrap; }
  .stage-note { min-height: 3em; flex: 1 1 100%; }
  .stage-actions { flex: 1 1 100%; }
  .stage-actions .btn { flex: 1; }
  .how h2 { margin-bottom: 8px; }
  .step { min-height: 0; padding-top: 44px; }
  .statement { color: var(--ink); }
  .step-fig { display: block; margin-bottom: 8px; background: var(--desk); padding: 16px; border-radius: var(--radius); }
  .device-inline { --dev: calc((100vw - 40px - 42px) / 2); display: grid; }
  .wall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .device-inline { margin: 10px; }
  .module-share, .duel-text, .module-more, .reminder { grid-template-columns: 1fr; }
  .wall button { padding: 12%; }
  .share { width: min(78%, 300px); justify-self: center; }
  .cta { grid-template-columns: 1fr; min-height: auto; padding-block: 64px; margin-top: var(--gap); }
  .cta h2 { font-size: 15vw; }
  .foldables h2 { font-size: min(13vw, 96px); }
  .wordmark img { height: 44px; margin: -8px; }
  .dialog { justify-self: stretch; width: 100%; }
  .foot { padding-top: 56px; }
}

@media (min-width: 600px) and (max-width: 899px) {
  :root { --book: min(40vw, 42vh); }
  .step-fig { max-width: 440px; }
  .device-inline { --dev: 40vw; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .rise.in { opacity: 1; transform: none; transition: none; }
  .flap { transition: none; }
  .layer, .layer.on { transition: opacity .2s; }
  .layer-picture img { animation: none; }
  .dialog-done.unfold, .btn.ready { animation: none; }
  .pick span { transition: none; }
  .cell.miss { animation: none; }
  .btn, .tray-piece, .wall button, .cell { transition: none; }
}

/* ---------- privacy and terms ---------- */
.doc-page { max-width: 64ch; margin: 0 auto; padding: 64px var(--margin) 120px; display: grid; gap: 16px; }
.doc-page h1 { font-size: var(--t-l); line-height: 1.05; margin-left: 0; }
.doc-page h2 { font-size: var(--t-m); margin: 32px 0 0; }
