/* Foundation (towers.app/foundation): your app is a small shop on a miniature street at dusk; we bring people in; they
   pay. Three photographs of one handmade tabletop miniature, taken from the same camera, carry the landing page: the
   hero, and the pinned scene that flips through them as the visitor scrolls. Dusk navy under the pictures, warm paper
   and sand for the light parts, ink for the words, and the lit window's amber on every button (with ink on it).
   Bricolage Grotesque sets the display, Onest the text. Parts are told apart by their whole field colour, never by
   lines, outlined boxes or shadows. Every text colour passes WCAG AA on its ground. Shared by the landing page and the
   guides; the dashboard (app/app.css) builds on these tokens. */
:root {
  --dusk: #17284a;          /* the sky in the pictures, a little deeper: the hero and the show */
  --dusk-2: #213760;        /* a tone step on dusk */
  --paper: #f6f0e7;         /* the light ground */
  --paper-2: #efe6d8;       /* a tone step on paper */
  --card: #fcf9f4;          /* the box people type in, on dusk or sand */
  --sand: #ece2d3;          /* the close, the footer, calm blocks */
  --sand-2: #e3d6c3;        /* a tone step on sand */
  --ink: #1b1916;
  --ink-2: #4a443c;         /* second line: 8.4:1 on paper */
  --ink-3: #655d52;         /* third line: 5.6:1 on paper, 5:1 on sand */
  --light: #f6f0e7;         /* words on dusk: 12.6:1 */
  --light-2: #c4cad8;       /* second line on dusk: 8.6:1 */
  --amber: #f2ad62;         /* the lit window: every button, ink on it (9:1) */
  --amber-2: #ea9d4a;
  --ok: #2e7a4c;
  --warn: #9a5f12;
  --bad: #b3402a;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --m: max(20px, env(safe-area-inset-left, 0px));
  --max: 1320px;
  --bar: 64px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
  /* the photographs: 2752x1536, the shop in the right two-thirds, the empty sky in the left third above the street */
  --ar: 1.7917;
}
@media (min-width: 900px) { :root { --m: clamp(32px, 4.2vw, 72px); --bar: 76px; } }
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; font: 400 18px/1.55 var(--text); background: var(--paper); color: var(--ink); overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; font-optical-sizing: auto; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }

/* ---------- the button: one shape, fully round, amber with ink, gives on press ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--amber); color: var(--ink); font: 600 17px/1 var(--text); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--amber-2); } }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 999px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- the bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--bar); padding: 0 var(--m); position: relative; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 17px; line-height: 1; white-space: nowrap; }
.brand img { width: 22px; height: 22px; }
.brand b { font: 650 19px/1 var(--display); letter-spacing: -0.02em; }
.brand span { color: var(--ink-3); }
.bar nav { display: flex; align-items: center; gap: 28px; font-size: 16px; font-weight: 500; }
.bar nav a { text-decoration: none; white-space: nowrap; padding: 8px 0; }
.bar nav a:hover { text-decoration: underline; }
.bar nav a[aria-current] { text-decoration: underline; }
@media (max-width: 699px) { .bar nav a:not(.in) { display: none; } }

/* ---------- the box: what someone gives us (waitlist.js reads what they paste) ---------- */
.box { display: grid; gap: 12px; background: var(--card); color: var(--ink); border-radius: 26px; padding: 18px 10px 10px 22px; max-width: 560px; cursor: text;
  transition: box-shadow 160ms ease; container-type: inline-size; }
.box:focus-within { box-shadow: 0 0 0 2px var(--amber); }
.box textarea { display: block; width: 100%; min-height: 28px; max-height: 180px; padding: 0 12px 0 0; border: 0; background: none; resize: none; outline: none;
  font: 400 18px/1.5 var(--text); color: var(--ink); }
.box textarea::placeholder { color: var(--ink-3); opacity: 1; }
.box .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.box .seen { min-width: 0; font-size: 14px; line-height: 1.35; color: var(--ink-3); overflow-wrap: anywhere; }
.box .seen b { color: var(--ink); font-weight: 600; }
/* a narrow box (a phone, a short desk's hero, a guide's side) gives the placeholder two lines and the button the width */
@container (max-width: 420px) {
  .box textarea { min-height: 54px; font-size: 17px; }
  .box .row { flex-wrap: wrap; gap: 10px; }
  .box .seen { padding-right: 10px; }
  .box .btn { width: 100%; }
}
@media (max-width: 559px) { .box { padding: 16px 8px 8px 18px; gap: 10px; border-radius: 24px; } }

/* ---------- the landing page ---------- */
.home { background: var(--dusk); }
.home main { background: var(--paper); }
.home .bar { background: var(--dusk); color: var(--light); }
.home .brand span { color: var(--light-2); }

/* A photograph cropped to cover its box, anchored on the shop: --fx/--fy place the crop (as object-position). */
.pic { position: relative; overflow: clip; background: var(--dusk); }
.pic img { width: 100%; height: 100%; object-fit: cover; object-position: calc(var(--fx, 0.8) * 100%) calc(var(--fy, 0.7) * 100%); }

/* The hero. On a phone: the picture as a band cropped to the shop, the words under it on the dusk. */
.hero { position: relative; background: var(--dusk); color: var(--light); }
.hero .pic { --fx: 0.86; --fy: 0.72; height: clamp(150px, calc(100svh - 548px), 340px); }
.hero .words { padding: 26px var(--m) 44px; }
.hero h1 { font-size: clamp(32px, calc((100vw - 2 * var(--m)) / 8.3), 60px); line-height: 1; letter-spacing: -0.035em; }
@media (max-height: 700px) and (max-width: 559px) { .hero .words { padding-top: 20px; } .lede { margin-top: 12px; } .hero .box { margin-top: 18px; } }
.ln { display: block; overflow: clip; padding: 0.04em 0 0.14em; margin: -0.04em 0 -0.14em; }
.ln > span { display: inline-block; }
.lede { margin-top: 16px; max-width: 29em; font-size: 18px; line-height: 1.5; color: var(--light); }
.hero .box { margin-top: 24px; }
.under { margin-top: 14px; font-size: 15px; line-height: 1.45; color: var(--light-2); }
@media (min-width: 560px) and (max-width: 899px) {
  .hero .pic { height: clamp(220px, calc(100svh - 520px), 52vw); --fx: 0.9; }
  .hero h1 { font-size: clamp(44px, 8.2vw, 64px); }
}
/* On a desk the picture fills the first screen and the words sit on its empty sky. Wide windows only: a tall one keeps
   the phone's shape, since the sky is only the picture's left third. */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  /* on the picture: the brand on the sky, the links on the shop's roof in pure white (4.5:1 or more on its lightest part) */
  .home .bar { position: absolute; inset: 0 0 auto; background: none; color: #fff; }
  .home .bar nav { font-weight: 600; }
  .hero .under { color: var(--light); }
  .hero { height: max(560px, min(100svh, 100vw / var(--ar))); container-type: size; overflow: clip; }
  .hero .pic { position: absolute; inset: 0; height: auto; --fx: 0.25; --fy: 0.8; }
  .hero .words {
    --fx: 0.25; --fy: 0.8;
    --iw: max(100cqw, 100cqh * var(--ar));
    --ih: calc(var(--iw) / var(--ar));
    --ix: calc((100cqw - var(--iw)) * var(--fx));
    --iy: calc((100cqh - var(--ih)) * var(--fy));
    /* the sky's right edge is the near lamp post, 38.5% across the picture; the street starts at 71% down */
    --col: min(620px, calc(var(--ix) + var(--iw) * 0.395 - var(--m) - 22px));
    position: absolute; z-index: 1; left: var(--m); top: var(--bar); width: var(--col);
    height: max(380px, calc(var(--iy) + var(--ih) * 0.76 - var(--bar)));
    display: flex; flex-direction: column; justify-content: center; padding: 0 0 8px;
  }
  .hero h1 { font-size: clamp(46px, calc(var(--col) / 8.1), 84px); }
  .lede { margin-top: 20px; font-size: clamp(18px, 1.3vw, 21px); max-width: 27em; }
  .hero .box { margin-top: 28px; }
  .hero .box .btn { padding: 0 22px; }
  .hero .box .seen { font-size: 13.5px; }
}
/* The entrance: the picture develops in, then the headline sets in by lines, once. */
@media (prefers-reduced-motion: no-preference) {
  .hero .pic img { animation: develop 1200ms var(--ease-out) both; }
  .hero .ln > span { animation: set-in 860ms var(--ease-expo) both; animation-delay: calc(220ms + var(--i, 0) * 80ms); }
  .hero .ln + .ln { --i: 1; }
  .hero [data-load] { animation: rise 680ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
}
@keyframes develop { from { opacity: 0; transform: scale(1.045); } }
@keyframes set-in { from { transform: translateY(112%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* The show: one street, three moments. Without the script (crawlers, reduced motion) the three frames stand in a
   column, each with its caption; with it they're pinned and scrubbed by the scroll, one caption at a time. The
   thresholds are here as variables, for the script (it picks the caption, and scrubs the frames where CSS scroll
   timelines don't exist): --c1..--c3 start each caption; --a2/--b2 and --a3/--b3 are the quick crossfades. */
.show { position: relative; background: var(--dusk); color: var(--light); --c1: 0; --c2: 0.335; --c3: 0.665; --a2: 0.31; --b2: 0.355; --a3: 0.64; --b3: 0.685; }
.show .anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.stage { padding: 88px 0 40px; }
.show h2 { padding: 0 var(--m); font-size: clamp(42px, 12vw, 72px); letter-spacing: -0.035em; }
.fr { margin: 32px 0 0; }
.fr .pic { --fx: 0.74; --fy: 0.75; aspect-ratio: 1.2; max-height: 82svh; width: 100%; }
.cap { padding: 18px var(--m) 8px; font: 600 clamp(28px, 8.4vw, 44px)/1.1 var(--display); letter-spacing: -0.025em; max-width: 22em; text-wrap: balance; }
@media (min-width: 900px) { .fr .pic { aspect-ratio: var(--ar); } .stage { padding-top: 120px; } }
@media (prefers-reduced-motion: no-preference) {
  .js .show { height: 300svh; view-timeline: --show block; }
  .js .stage { position: sticky; top: 0; height: 100svh; padding: 0 0 2svh; overflow: clip; display: flex; flex-direction: column; justify-content: center; }
  .js .frames { position: relative; height: min(83vw, 50svh); margin: 26px 0 118px; }
  .js .fr { position: absolute; inset: 0; margin: 0; }
  .js .fr .pic { height: 100%; aspect-ratio: auto; max-height: none; }
  .js .f2, .js .f3 { opacity: 0; }
  .js .cap { position: absolute; top: calc(100% + 20px); left: 0; padding: 0 var(--m); opacity: 0; transform: translateY(14px);
    transition: opacity 180ms ease, transform 180ms ease; }
  .js .cap.is-on { opacity: 1; transform: none; transition: opacity 460ms var(--ease-out) 60ms, transform 620ms var(--ease-out) 60ms; }
}
/* On a desk it's one continuous scene: the show's pinned stage starts behind the hero, so the hero's words scroll away
   off the same picture, then the heading and the captions arrive on its sky, above the people, as the frames turn. */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .js .hero { height: 100svh; min-height: 0; z-index: 2; background: none; }
  .js .hero .pic { visibility: hidden; }
  .js .show { height: 400svh; margin-top: -100svh; --c1: 0.2; --c2: 0.49; --c3: 0.75; --a2: 0.47; --b2: 0.51; --a3: 0.73; --b3: 0.77; }
  .js .show .anchor { top: 70svh; }
  .js .stage { display: block; padding: 0; container-type: size; }
  .js .frames { position: absolute; inset: 0; height: auto; margin: 0; }
  .js .fr .pic { --fx: 0.25; --fy: 0.8; }
  .js .show h2, .js .cap {
    --iw: max(100cqw, 100cqh * var(--ar));
    --ix: calc((100cqw - var(--iw)) * 0.25);
    --col: min(560px, calc(var(--ix) + var(--iw) * 0.39 - var(--m) - 24px));
    --top: clamp(40px, 11svh, 120px);
    --h2: clamp(48px, 4.6vw, 76px);
  }
  .js .show h2 { position: absolute; z-index: 2; left: var(--m); top: var(--top); padding: 0; font-size: var(--h2); width: var(--col);
    opacity: 0; transform: translateY(16px); transition: opacity 200ms ease, transform 200ms ease; }
  .js .show.is-h h2 { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .cap { top: calc(var(--top) + var(--h2) + 26px); left: var(--m); width: var(--col); padding: 0; font-size: clamp(28px, 2.5vw, 42px); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .f2 { animation: f2-in linear both; animation-timeline: --show; animation-range: contain 0% contain 100%; }
    .js .f3 { animation: f3-in linear both; animation-timeline: --show; animation-range: contain 0% contain 100%; }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) and (min-aspect-ratio: 5/4) {
    .js .f2 { animation-name: f2-desk; }
    .js .f3 { animation-name: f3-desk; }
  }
}
/* quick crossfades, never a long double exposure (the same numbers as --a2..--b3) */
@keyframes f2-in { 0%, 31% { opacity: 0; } 35.5%, 100% { opacity: 1; } }
@keyframes f3-in { 0%, 64% { opacity: 0; } 68.5%, 100% { opacity: 1; } }
@keyframes f2-desk { 0%, 47% { opacity: 0; } 51%, 100% { opacity: 1; } }
@keyframes f3-desk { 0%, 73% { opacity: 0; } 77%, 100% { opacity: 1; } }
/* the desk's picture develops in on the show's first frame, which is the one on screen there */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .js .show .f1 img { animation: develop 1200ms var(--ease-out) both; }
}

/* What you get: the paper field */
.get { background: var(--paper); color: var(--ink); padding: 88px var(--m) 96px; }
.get .wrap, .close .wrap { max-width: var(--max); margin: 0 auto; }
.get h2 { font-size: clamp(40px, 10.5vw, 72px); letter-spacing: -0.035em; }
.gets { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }
.gets li { font: 500 clamp(24px, 6.2vw, 36px)/1.14 var(--display); letter-spacing: -0.022em; text-wrap: balance; max-width: 19em; }
.prompt { margin-top: 48px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 31em; }
.prompt b { color: var(--ink); font-weight: 600; }
.early { margin-top: 14px; font-size: 16px; color: var(--ink-3); }
@media (min-width: 900px) {
  .get { padding: 150px var(--m) 160px; }
  .get .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .get h2 { grid-column: 1 / span 5; grid-row: 1; align-self: start; }
  .gets { grid-column: 7 / -1; grid-row: 1 / span 2; margin: 4px 0 0; gap: 34px; }
  .gets li { font-size: clamp(30px, 2.7vw, 42px); }
  .get .after { grid-column: 1 / span 5; grid-row: 2; align-self: end; }
  .prompt { margin-top: 48px; font-size: 19px; max-width: 24em; }
}

/* The close: the sand field */
.close { background: var(--sand); color: var(--ink); padding: 88px var(--m) 40px; }
.close h2 { font-size: clamp(40px, 10.5vw, 72px); letter-spacing: -0.035em; }
.close .box { margin-top: 28px; }
.faq { margin-top: 56px; display: grid; gap: 6px; }
.faq details { background: var(--sand-2); border-radius: 18px; transition: background-color 160ms ease; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px;
  padding: 14px 20px; font: 600 18px/1.3 var(--text); letter-spacing: -0.01em; border-radius: 18px; -webkit-tap-highlight-color: transparent; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 20px; text-align: center; font: 400 28px/0.8 var(--text); color: var(--ink-2); transition: transform 260ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.guides { margin-top: 72px; }
.guides h3 { font-size: 26px; letter-spacing: -0.025em; }
.guides ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 2px 32px; }
.guides a { display: block; padding: 9px 0; font-size: 17px; font-weight: 500; color: var(--ink); text-decoration: none; }
.guides a:hover { text-decoration: underline; }
@media (min-width: 640px) { .guides ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .close { padding: 150px var(--m) 56px; }
  .close .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .close h2 { grid-column: 1 / -1; font-size: clamp(56px, 6.4vw, 96px); }
  .close .box { grid-column: 1 / span 6; margin-top: 56px; }
  .close .faq { grid-column: 8 / -1; margin-top: 56px; }
  .guides { grid-column: 1 / -1; margin-top: 120px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .guides h3 { grid-column: 1 / span 3; padding-top: 6px; }
  .guides ul { grid-column: 4 / -1; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) { .guides ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* reveals below the fold: once, rising; hidden only when the script runs */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 820ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- the footer ---------- */
.foot { background: var(--sand); color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 36px var(--m) max(36px, env(safe-area-inset-bottom));
  font-size: 15px; }
.foot .grow { flex: 1 1 auto; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.home .foot { padding-top: 24px; }
@media (max-width: 559px) { .foot .grow { flex-basis: 100%; } }
@media (min-width: 900px) { .foot > * { max-width: var(--max); } .foot { padding-left: max(var(--m), calc((100% - var(--max)) / 2)); padding-right: max(var(--m), calc((100% - var(--max)) / 2)); } }

/* ---------- the sheet: join the waitlist ---------- */
.sheet { width: min(460px, calc(100vw - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; border-radius: 30px; overflow: auto;
  background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(13, 22, 41, 0.62); }
.sheet[open] { animation: sheet-in 460ms var(--ease-expo) both; }
.sheet[open]::backdrop { animation: fade 300ms ease both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes fade { from { opacity: 0; } }
.sheet .in { display: grid; gap: 16px; padding: 38px 32px 32px; }
.sheet h2 { font-size: 34px; letter-spacing: -0.03em; padding-right: 40px; line-height: 1.02; }
.sheet p { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.sheet .x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink);
  font-size: 24px; line-height: 1; cursor: pointer; transition: transform 140ms var(--ease-out); }
.sheet .x:active { transform: scale(0.94); }
.sheet .what { background: var(--sand); border-radius: 16px; padding: 12px 16px; font-size: 15px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.sheet .what b { color: var(--ink); font-weight: 600; }
.sheet .g { min-height: 44px; display: flex; justify-content: center; }
.sheet .g:empty { min-height: 0; }
.sheet .or { text-align: center; font-size: 14.5px; color: var(--ink-3); }
.sheet form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; background: var(--card); border-radius: 999px; padding: 6px;
  transition: box-shadow 160ms ease; }
.sheet form:focus-within { box-shadow: 0 0 0 2px var(--amber); }
.sheet input { min-width: 0; height: 48px; padding: 0 16px; border: 0; background: none; outline: none; font-size: 17px; }
.sheet input::placeholder { color: var(--ink-3); opacity: 1; }
.sheet form .btn { height: 48px; padding: 0 24px; }
.sheet .err { color: var(--bad); font-size: 15px; }
.sheet .err:empty { display: none; }
.sheet .tick { width: 52px; height: 52px; border-radius: 50%; background: var(--amber); color: var(--ink); display: grid; place-items: center; }
.sheet .done .btn { justify-self: start; }
@media (max-width: 559px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92svh; }
  .sheet .in { padding: 34px 22px max(26px, env(safe-area-inset-bottom)); }
  .sheet h2 { font-size: 30px; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}

/* ---------- a guide: a reading page ---------- */
.reading { background: var(--paper); }
.reading .bar { max-width: calc(1200px + 2 * var(--m)); margin: 0 auto; }
.doc { max-width: calc(1200px + 2 * var(--m)); margin: 0 auto; padding: 28px var(--m) 112px; display: grid; gap: 72px; }
.doc article { min-width: 0; max-width: 680px; font-size: 19px; line-height: 1.65; color: var(--ink); }
.crumbs { font-size: 15px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.doc h1 { margin-top: 20px; font-size: clamp(38px, 8.6vw, 62px); line-height: 1.02; letter-spacing: -0.035em; }
.doc .meta { margin-top: 18px; font-size: 15px; color: var(--ink-3); }
.doc .lead { margin-top: 32px; }
.doc .lead p { font-size: 21px; line-height: 1.55; color: var(--ink); }
.doc .lead p + p { margin-top: 16px; }
.doc article > h2 { margin: 72px 0 18px; font-size: clamp(27px, 5.6vw, 36px); line-height: 1.08; letter-spacing: -0.03em; }
.doc article > p { color: #2f2b26; }
.doc article > p + p { margin-top: 18px; }
.doc article > ol, .doc article > ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; color: #2f2b26; }
.doc article > ol { counter-reset: step; }
.doc article > ol > li { counter-increment: step; position: relative; padding-left: 38px; }
.doc article > ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; min-width: 22px; font: 650 19px/1.65 var(--display); color: var(--ink-3); }
.doc article > ul > li { position: relative; padding-left: 26px; }
.doc article > ul > li::before { content: ''; position: absolute; left: 3px; top: 0.66em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.doc article > p + ol, .doc article > p + ul { margin-top: 20px; }
.tbl { margin-top: 30px; overflow-x: auto; border-radius: 18px; background: var(--paper-2); -webkit-overflow-scrolling: touch; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.tbl th { background: var(--sand-2); text-align: left; font-weight: 600; font-size: 15px; color: var(--ink); padding: 14px 18px; white-space: nowrap; }
.tbl td { padding: 14px 18px; vertical-align: top; color: #2f2b26; }
.tbl td:first-child { font-weight: 600; color: var(--ink); min-width: 150px; }
.tbl tbody tr:nth-child(even) td { background: var(--sand); }
@media (max-width: 699px) { .tbl table { min-width: 560px; } .tbl td, .tbl th { padding: 12px 14px; } }
.doc .faq { margin-top: 8px; }
.doc .faq details { background: var(--paper-2); }
.doc .faq details p { font-size: 17.5px; }
.doc .src { margin-top: 72px; }
.doc .src h2 { font-size: 22px; letter-spacing: -0.02em; }
.doc .src ol { margin: 14px 0 0; padding: 0 0 0 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.doc .src a { color: var(--ink-2); overflow-wrap: anywhere; }
.doc .src a:hover { color: var(--ink); }
.doc aside { display: grid; gap: 40px; align-content: start; min-width: 0; }
.calm { background: var(--sand); border-radius: 28px; padding: 30px 26px 26px; display: grid; gap: 14px; }
.calm h2 { font-size: 30px; line-height: 1.04; letter-spacing: -0.03em; }
.calm p { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.calm .box { margin-top: 6px; padding: 16px 8px 8px 18px; }
.more h2 { font: 600 15px/1.3 var(--text); letter-spacing: 0; color: var(--ink-3); }
.more ul { list-style: none; margin: 8px 0 0; padding: 0; }
.more a { display: block; padding: 8px 0; font-size: 17px; font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; }
.more a:hover { text-decoration: underline; }
@media (min-width: 1100px) {
  .doc { grid-template-columns: minmax(0, 680px) 340px; justify-content: space-between; padding-top: 40px; }
  .doc aside { align-self: stretch; align-content: start; grid-template-rows: auto 1fr; }
  .doc aside .more { order: -1; }
  .doc aside .calm { position: sticky; top: 28px; align-self: start; }
}
