/* Nossa Coloring promo site. Tokens first; everything below reads tokens only. */
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --ground: #ffffff;
  --ink: #1a1c2e;
  --muted: #4d5068;
  --sheet: #f2f4f7;
  --sun: #ffc93c;
  --deep: #b8521f;
  --amber: #e9a23b;
  --ocean: #5fb8dc;
  --coral: #ef8a86;

  --display-font: "Fredoka", ui-rounded, system-ui, sans-serif;
  --text-font: "Nunito", ui-rounded, system-ui, sans-serif;

  /* five sizes */
  --t-poster: clamp(64px, 10vw, 150px);
  --t-display: clamp(44px, 5.8vw, 88px);
  --t-h2: clamp(32px, 4vw, 60px);
  --t-body: clamp(17px, 1.35vw, 19px);
  --t-small: 15px;

  --m: clamp(16px, 2.5vw, 32px);       /* the one pair of outer margins */
  --gap: clamp(8px, 1.4vw, 20px);
  --section: clamp(80px, 9vw, 128px);  /* space above and below a section */
  --r: 28px;                            /* the one corner radius for fields and tiles */
  --pill: 9999px;                       /* the motif: the crayon capsule */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { interpolate-size: allow-keywords; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink) var(--sheet); accent-color: var(--ink); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text-font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.on-ink :focus-visible { outline-color: var(--sun); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display-font); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.display { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.03em; font-weight: 600; }
.h2 { font-size: var(--t-h2); line-height: 1.04; }
.lead { font-size: var(--t-body); max-width: 46ch; }
.small { font-size: var(--t-small); line-height: 1.45; }
.wrap { padding-inline: var(--m); }
.section { padding-block: var(--section); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--ground); display: flex; align-items: center; gap: 24px; padding: 14px var(--m); min-height: 72px; }
.mark { font: 700 26px/1 var(--display-font); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.mark span { color: var(--deep); }
.nav-links { display: flex; gap: 8px; }
.nav-links a { text-decoration: none; font: 600 var(--t-body)/1 var(--display-font); padding: 14px 16px; border-radius: var(--pill); transition: background-color 160ms var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="true"] { background: var(--sheet); }
@media (max-width: 760px) { .nav-links a:not(:first-child) { display: none; } .nav { min-height: 64px; gap: 8px; } }

/* ---------- buttons: capsule, flat, one shape ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: var(--pill); border: 0; background: var(--ink); color: var(--ground); font: 600 var(--t-body)/1 var(--display-font); text-decoration: none; cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.btn:hover { background: var(--sun); color: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn.small { min-height: 44px; padding: 0 20px; }
.btn.quiet { background: var(--ground); color: var(--ink); }
.btn.quiet:hover { background: var(--ink); color: var(--ground); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { min-width: 232px; }
@media (max-width: 560px) { .btn-row .btn { flex: 1 1 100%; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: center; padding-left: var(--m); min-height: calc(100svh - 72px); }
.hero-copy { grid-column: 1 / 7; padding-block: 24px 48px; }
.hero-copy .display { margin-bottom: 28px; }
.hero-copy .lead { margin-bottom: 32px; }
.cues { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; }
.cues li { display: flex; align-items: center; gap: 10px; font-size: var(--t-small); font-weight: 700; }
.cues li::before { content: ""; width: 10px; height: 22px; border-radius: var(--pill); background: var(--c, var(--sun)); }

.stage { grid-column: 7 / 13; align-self: stretch; margin-block: 0 24px; background: var(--sheet); border-radius: 32px 0 0 32px; padding: clamp(20px, 2.4vw, 36px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-width: 0; }
.js .stage:not(.is-in) { clip-path: inset(0 0 0 100%); }
.stage.is-in { animation: shutter 1.1s var(--ease) both; }
@keyframes shutter { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.paper-wrap { position: relative; height: min(58svh, 620px); aspect-ratio: 2204 / 2854; max-width: 100%; }
.paper-wrap .paper { height: 100%; width: 100%; }
.paper { position: relative; width: auto; height: min(58svh, 620px); max-width: 100%; aspect-ratio: 2204 / 2854; background: var(--ground); border-radius: 12px; overflow: hidden; touch-action: manipulation; cursor: crosshair; }
.paper svg, .paper img { width: 100%; height: 100%; }
.paper svg #regions path { transition: fill 280ms var(--ease); }
.paper svg #lines { pointer-events: none; }
.paper:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.paper-hint { position: absolute; inset: auto 12px 12px auto; background: var(--ink); color: var(--ground); font: 600 var(--t-small)/1 var(--display-font); padding: 10px 14px; border-radius: var(--pill); pointer-events: none; transition: opacity 300ms; }
.paper.touched .paper-hint { opacity: 0; }

.crayons { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(4px, 0.6vw, 8px); width: min(100%, 680px); }
.crayon { appearance: none; border: 0; padding: 0; height: clamp(64px, 6.2vw, 92px); border-radius: var(--pill); background: var(--c); cursor: pointer; transition: transform 220ms var(--ease), outline-offset 220ms var(--ease); outline: 3px solid transparent; outline-offset: 0; min-width: 0; }
.crayon:hover { transform: translateY(-6px); }
.crayon[aria-checked="true"] { transform: translateY(-14px); outline: 3px solid var(--ink); outline-offset: 3px; }
.crayon:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding: 0; min-height: 0; }
  .hero-copy { grid-column: 1; padding: 24px var(--m) 40px; }
  .stage { grid-column: 1; border-radius: 32px 32px 0 0; margin: 0; padding: 24px var(--m) 32px; }
  .paper-wrap { height: auto; width: min(100%, 420px); }
  .paper { height: auto; width: min(100%, 420px); }
  .crayons { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 8px; }
  .crayon { height: 64px; }
}

/* ---------- reveal ---------- */
.js .rise { opacity: 0; transform: translateY(26px); }
.js .rise.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }

/* ---------- section heads ---------- */
.head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.head h2 { grid-column: 1 / 8; }
.head p { grid-column: 9 / 13; }
@media (max-width: 900px) { .head h2, .head p { grid-column: 1 / -1; } .head p { margin-top: 16px; } }

/* ---------- shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(20px, 2.4vw, 36px) var(--gap); }
.shelf a { text-decoration: none; display: block; }
.cover { width: 100%; aspect-ratio: 720 / 932; object-fit: cover; border-radius: 12px; background: var(--sheet); transition: transform 280ms var(--ease); }
.shelf a:hover .cover, .shelf a:focus-visible .cover { transform: translateY(-8px); }
.shelf-name { display: block; margin-top: 12px; font: 600 var(--t-body)/1.2 var(--display-font); }
.shelf-note { display: block; margin-top: 2px; font-size: var(--t-small); color: var(--muted); }
.shelf .all { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 720 / 932; padding: 20px; background: var(--sheet); border-radius: 12px; font: 600 var(--t-body)/1.15 var(--display-font); transition: background-color 200ms var(--ease); }
.shelf a:hover .all { background: var(--sun); }
@media (max-width: 1100px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .shelf { grid-template-columns: repeat(2, 1fr); } }

/* ---------- how it works: two fields and one slider ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78svh, 720px); position: relative; background: var(--ground); }
.how-clause { padding: 48px var(--m) 150px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.how-clause h2 { font-size: var(--t-h2); line-height: 1.04; max-width: 14ch; }
.how-clause p { max-width: 34ch; }
.how-frag { background: var(--sheet); display: flex; align-items: center; justify-content: center; padding: 32px var(--m) 160px; }
.frag { position: relative; width: min(100%, 360px); }
.frag-bezel { background: transparent; border-radius: 22px; padding: 0; transition: background-color 400ms var(--ease), padding 400ms var(--ease), border-radius 400ms var(--ease); }
.frag[data-s="1"] .frag-bezel, .frag[data-s="2"] .frag-bezel, .frag[data-s="3"] .frag-bezel { background: var(--ink); padding: 16px; border-radius: 32px; }
.frag .paper { height: auto; width: 100%; cursor: default; border-radius: 8px; }
.frag-dock { display: flex; gap: 6px; justify-content: center; margin-top: 0; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 400ms var(--ease), opacity 400ms var(--ease), margin 400ms var(--ease); }
.frag-dock i { width: 26px; height: 40px; border-radius: var(--pill); background: var(--c); display: block; }
.frag[data-s="1"] .frag-dock, .frag[data-s="2"] .frag-dock, .frag[data-s="3"] .frag-dock { max-height: 48px; opacity: 1; margin-top: 12px; }
.frag-stars { position: absolute; top: 28px; right: 28px; display: flex; gap: 4px; opacity: 0; transform: scale(0.6); transition: opacity 400ms var(--ease), transform 400ms var(--ease); pointer-events: none; }
.frag[data-s="3"] .frag-stars { opacity: 1; transform: none; }
.frag-tag { position: absolute; top: -18px; left: 0; background: var(--ground); font: 600 var(--t-small)/1 var(--display-font); padding: 8px 14px; border-radius: var(--pill); }
.how-ctl { position: absolute; left: var(--m); right: var(--m); bottom: 32px; }
.how-track { position: relative; height: 44px; }
.how-track::before, .how-fill { content: ""; position: absolute; left: 0; top: 18px; height: 8px; border-radius: var(--pill); }
.how-track::before { right: 0; background: #c9cdd8; }
.how-fill { width: var(--p, 0%); background: var(--ink); transition: width 200ms var(--ease); }
.how-ctl input { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.how-ctl input::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.how-ctl input::-moz-range-track { height: 44px; background: transparent; }
.how-ctl input::-webkit-slider-thumb { -webkit-appearance: none; width: 56px; height: 32px; margin-top: 6px; border-radius: var(--pill); background: var(--sun); border: 0; transition: transform 160ms var(--ease); }
.how-ctl input::-moz-range-thumb { width: 56px; height: 32px; border-radius: var(--pill); background: var(--sun); border: 0; }
.how-ctl input:active::-webkit-slider-thumb { transform: scale(1.1); }
.how-names { position: relative; height: 52px; margin-top: 4px; }
.how-names button { position: absolute; top: 0; left: calc(var(--k) * 33.333%); transform: translateX(calc(var(--k) * -33.333%)); appearance: none; background: transparent; border: 0; font: 600 var(--t-body)/1.2 var(--display-font); color: var(--muted); padding: 10px 4px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.how-names button[aria-current="true"] { color: var(--ink); }
@media (max-width: 900px) {
  .how { grid-template-columns: 1fr; min-height: 0; }
  .how-frag { order: -1; padding: 40px var(--m) 24px; }
  .how-clause { padding: 24px var(--m) 24px; }
  .how-ctl { position: static; padding: 0 var(--m) 32px; }
  .how-names { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .how-names button { position: static; transform: none; white-space: normal; text-align: left; }
  .how-ctl-wrap { background: var(--ground); }
}

/* ---------- feature board ---------- */
.board { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 104px; gap: 8px; padding-inline: var(--m); }
.bt { position: relative; overflow: hidden; border-radius: var(--r); background: var(--sheet); padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.bt h3 { font: 600 var(--t-body)/1.15 var(--display-font); letter-spacing: -0.01em; }
.bt p { font-size: var(--t-small); line-height: 1.35; max-width: 32ch; }
.bt.head-tile { justify-content: flex-start; background: var(--ground); padding: 0; }
.bt.head-tile h2 { font-size: var(--t-h2); line-height: 1.04; }
.bt.sun { background: var(--sun); } .bt.ink { background: var(--ink); color: var(--ground); }
.bt.amber { background: var(--amber); } .bt.ocean { background: var(--ocean); } .bt.coral { background: var(--coral); }
.zone { position: absolute; inset: 0 0 96px 0; overflow: hidden; }
.zone > svg { width: 100%; height: 100%; }
.bt .side { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; height: 100%; object-fit: cover; }
.bt.has-side h3, .bt.has-side p { max-width: 44%; }
.crop { position: absolute; top: 0; right: 0; bottom: 0; width: 40%; overflow: hidden; }
.crop img { width: 100%; height: 100%; object-fit: cover; transform: scale(2.4); transform-origin: 70% 38%; }
.bt.has-crop h3, .bt.has-crop p { max-width: 54%; }
.stars-zone { display: flex; gap: 6px; padding: 22px 22px 0; }
.stars-zone svg { width: 56px; height: 56px; }
.b-head { grid-column: 1 / 7; grid-row: 1 / 3; }
.b-fill { grid-column: 1 / 7; grid-row: 3 / 7; }
.b-brush { grid-column: 7 / 10; grid-row: 1 / 5; }
.b-crayon { grid-column: 10 / 13; grid-row: 1 / 3; }
.b-stars { grid-column: 10 / 13; grid-row: 3 / 5; }
.b-zoom { grid-column: 7 / 13; grid-row: 5 / 7; }
.b-safe { grid-column: 1 / 13; grid-row: 7 / 8; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: end; }
.b-safe > div { padding: 0 4px; }
.strip { display: flex; gap: 10px; align-items: flex-start; padding: 22px 22px 0; }
.strip .paper { height: auto; width: calc((100% - 20px) / 3); cursor: default; border-radius: 8px; flex: none; }
.bt.b-fill p { max-width: 52ch; }
@media (max-width: 800px) {
  .board { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 38vw; gap: 6px; padding-inline: 6px; }
  .b-head { grid-column: 1 / 3; grid-row: 1 / 2; } .b-fill { grid-column: 1 / 3; grid-row: 2 / 4; }
  .b-brush { grid-column: 1 / 2; grid-row: 4 / 6; } .b-crayon { grid-column: 2 / 3; grid-row: 4 / 5; } .b-stars { grid-column: 2 / 3; grid-row: 5 / 6; }
  .b-zoom { grid-column: 1 / 3; grid-row: 6 / 7; } .b-safe { grid-column: 1 / 3; grid-row: 7 / 8; grid-template-columns: 1fr; gap: 12px; align-content: center; }
  .bt.head-tile { padding-inline: calc(var(--m) - 6px); }
  .bt { padding: 16px; } .zone { bottom: 84px; } .b-brush .zone { bottom: 136px; } .b-fill .zone { bottom: 108px; }
  .strip { padding: 16px 16px 0; gap: 6px; } .strip .paper { width: calc((100% - 12px) / 3); }
  .stars-zone { padding: 16px 16px 0; } .stars-zone svg { width: 40px; height: 40px; }
}

/* ---------- free ---------- */
.free { background: var(--sheet); }
.free-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.free-grid h2 { grid-column: 1 / 5; align-self: start; position: sticky; top: 104px; }
.free-list { grid-column: 5 / 13; display: grid; gap: 8px; }
.free-item { border-radius: var(--r); padding: clamp(24px, 3vw, 40px); background: var(--ground); display: grid; gap: 8px; }
.free-item b { font: 600 var(--t-h2)/1.04 var(--display-font); letter-spacing: -0.02em; }
.free-item.a { background: var(--amber); } .free-item.b { background: var(--ocean); } .free-item.c { background: var(--sun); }
.free-item span { max-width: 52ch; }
@media (max-width: 900px) { .free-grid h2, .free-list { grid-column: 1 / -1; } .free-grid h2 { margin-bottom: 28px; position: static; } }

/* ---------- faq ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.faq-grid h2 { grid-column: 1 / 5; position: sticky; top: 104px; align-self: start; }
.faq { grid-column: 5 / 13; display: grid; gap: 8px; }
.faq details { background: var(--sheet); border-radius: var(--r); transition: background-color 200ms var(--ease); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; padding: 16px 24px; font: 600 var(--t-body)/1.25 var(--display-font); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; flex: none; width: 16px; height: 16px; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; border-radius: 8px; background: currentColor; transition: transform 250ms var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] { background: var(--sun); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq .ans { padding: 0 24px 24px; max-width: 52ch; }
@media (max-width: 900px) { .faq-grid h2, .faq { grid-column: 1 / -1; } .faq-grid h2 { position: static; margin-bottom: 24px; } .faq summary { min-height: 64px; } }

/* ---------- closing band: two verbs, equal ---------- */
.get { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-inline: 8px; }
.get a { position: relative; display: block; min-height: clamp(300px, 42svh, 440px); padding: 28px; text-decoration: none; overflow: hidden; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.get a.pb { background: var(--sun); color: var(--ink); border-top-left-radius: 32px; }
.get a.ap { background: var(--ink); color: var(--ground); border-top-right-radius: 32px; }
.get a.pb:hover { background: var(--ink); color: var(--sun); }
.get a.ap:hover { background: var(--sun); color: var(--ink); }
.get a p { max-width: 26ch; font-size: var(--t-body); font-weight: 700; }
.get a svg { position: absolute; top: 28px; right: 28px; width: 48px; height: 48px; transition: transform 300ms var(--ease); }
.get a:hover svg { transform: translate(6px, -6px); }
.get a b { position: absolute; left: 24px; bottom: 24px; font: 700 var(--t-display)/0.95 var(--display-font); letter-spacing: -0.03em; }
@media (max-width: 760px) { .get { grid-template-columns: 1fr; } .get a { min-height: 34svh; } }

/* ---------- footer ---------- */
.foot { background: var(--sheet); padding: 72px var(--m) 28px; }
.blocks { display: flex; gap: clamp(8px, 1.6vw, 24px); align-items: flex-end; height: clamp(120px, 24vw, 340px); }
.bw { display: flex; gap: 4px; align-items: flex-end; height: 100%; min-width: 0; }
.blocks b { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; background: var(--c); color: var(--fg, var(--ground)); font: 700 var(--t-poster)/0.82 var(--display-font); letter-spacing: -0.04em; padding-bottom: 0.2em; border-radius: 12px 12px 0 0; overflow: hidden; }
.foot-cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); margin-top: 56px; font-size: var(--t-small); }
.foot-cols ul { grid-column: span 2; display: grid; gap: 4px; align-content: start; }
.foot-cols a { display: inline-block; padding: 8px 0; text-decoration: none; font-weight: 700; }
.foot-cols a:hover { text-decoration: underline; }
.foot-cols .about { grid-column: 9 / 13; color: var(--muted); max-width: 60ch; }
.foot-base { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 800px) { .foot-cols ul { grid-column: span 6; margin-bottom: 20px; } .foot-cols .about { grid-column: 1 / -1; } }

/* ---------- book pages ---------- */
.book-hero { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: center; padding-left: var(--m); min-height: calc(100svh - 72px); }
.book-copy { grid-column: 1 / 7; padding-block: 32px 48px; }
.book-copy h1 { font-size: var(--t-h2); line-height: 1.04; margin-bottom: 24px; }
.book-copy .lead { margin-bottom: 32px; }
.book-stage { grid-column: 7 / 13; align-self: stretch; display: flex; align-items: center; justify-content: center; background: var(--tint); border-radius: 32px 0 0 32px; padding: 24px; margin-bottom: 24px; }
.book-stage > img { height: calc(100svh - 72px - 72px - 24px); width: auto; max-width: 100%; border-radius: 12px; object-fit: cover; aspect-ratio: 720 / 932; }
.sheet { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px var(--gap); }
.sheet figure { min-width: 0; }
.sheet img { width: 100%; aspect-ratio: 240 / 311; object-fit: cover; border-radius: 8px; background: var(--sheet); }
.sheet figcaption { margin-top: 6px; font: 600 var(--t-small)/1.2 var(--display-font); overflow-wrap: anywhere; }
.rules { display: grid; gap: 10px; margin-top: 28px; }
.rules li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.rules li::before { content: ""; flex: none; width: 10px; height: 22px; border-radius: var(--pill); background: var(--tint); }
@media (max-width: 1100px) { .sheet { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px) {
  .book-hero { grid-template-columns: 1fr; padding: 0; min-height: 0; }
  .book-copy { grid-column: 1; padding: 24px var(--m) 40px; }
  .book-copy h1 { font-size: 6.4vw; }
  .book-stage { grid-column: 1; border-radius: 32px 32px 0 0; margin: 0; padding: 32px var(--m); }
  .book-stage > img { height: 62svh; }
}
@media (max-width: 640px) { .book-stage > img { height: 52svh; } .book-copy h1 { font-size: var(--t-h2); } }
@media (max-width: 640px) { .sheet { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel { overflow-x: auto; } .reel-track { width: max-content; }
  .burst { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .stage:not(.is-in) { opacity: 1; transform: none; clip-path: none; }
}

@media (max-width: 640px) {
  .blocks { flex-direction: column; align-items: stretch; height: auto; gap: 12px; }
  .bw { height: 38vw; flex: none !important; }
  .bw:first-child b { font-size: 16vw; } .bw:last-child b { font-size: 11vw; }
}

/* ---------- hero extras: stars, burst, crayon entrance ---------- */
.stars { position: absolute; top: 10px; left: 10px; display: flex; gap: 2px; pointer-events: none; }
.stars svg { width: 30px; height: 30px; }
.stars path { fill: #dfe3ea; transition: fill 300ms var(--ease); }
.stars svg.on path { fill: var(--sun); }
.stars svg.on { animation: pop 500ms var(--ease); }
@keyframes pop { 0% { transform: scale(0.5); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.burst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 12px; }
.burst i { position: absolute; left: 50%; top: 46%; width: 12px; height: 26px; border-radius: var(--pill); background: var(--c); animation: burst 1.2s var(--ease) forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) rotate(0) scale(0.5); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); opacity: 0; } }
.stage.is-in .crayon { animation: crayon-up 700ms var(--ease) backwards; animation-delay: calc(var(--n, 0) * 45ms + 450ms); }
@keyframes crayon-up { from { transform: translateY(46px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- cover reel ---------- */
.reel { overflow: hidden; padding-block: 8px 0; }
.reel-track { display: flex; gap: 16px; width: max-content; animation: reel 80s linear infinite; }
.reel:hover .reel-track, .reel:focus-within .reel-track { animation-play-state: paused; }
.reel a { flex: none; display: block; border-radius: 12px; transition: transform 280ms var(--ease); }
.reel a:hover { transform: translateY(-8px); }
.reel img { height: clamp(200px, 19vw, 290px); width: auto; aspect-ratio: 420 / 544; border-radius: 12px; object-fit: cover; background: var(--sheet); }
@keyframes reel { to { transform: translateX(calc(-50% - 8px)); } }

/* ---------- shelf tint plates ---------- */
.shelf a { padding: 12px 12px 14px; margin: -12px -12px -14px; border-radius: 22px; transition: background-color 260ms var(--ease); }
.shelf a:hover, .shelf a:focus-visible { background: color-mix(in srgb, var(--t, var(--sun)) 26%, #fff); }

/* ---------- how: tilt and progress capsules ---------- */
.frag-bezel { transition: background-color 400ms var(--ease), padding 400ms var(--ease), border-radius 400ms var(--ease), transform 600ms var(--ease); }
.frag[data-s="0"] .frag-bezel { transform: rotate(-3deg); }
.how-dots { display: flex; gap: 8px; margin-top: 12px; }
.how-dots i { width: 34px; height: 12px; border-radius: var(--pill); background: #c9cdd8; transition: width 400ms var(--ease), background-color 300ms; }
.how-dots i.past { background: var(--ink); }
.how-dots i.on { width: 72px; background: var(--sun); }

/* ---------- faq open animation (progressive) ---------- */
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 320ms var(--ease), content-visibility 320ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ---------- book page: the page as it looks in the app ---------- */
.book-stage { position: relative; }
.tablet { position: absolute; right: clamp(16px, 3vw, 48px); bottom: clamp(16px, 3vw, 40px); width: clamp(120px, 12.5vw, 190px); background: var(--ink); border-radius: 22px; padding: 8px; transition: transform 400ms var(--ease); }
.tablet img { width: 100%; aspect-ratio: 420 / 544; object-fit: cover; border-radius: 12px; background: var(--ground); }
.book-stage:hover .tablet { transform: translateY(-8px) rotate(2deg); }
@media (max-width: 900px) { .tablet { width: clamp(96px, 26vw, 150px); } }

/* ---------- phone action dock ---------- */
.dock { display: none; }
@media (max-width: 760px) {
  .dock { position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; gap: 8px; padding: 10px var(--m) calc(10px + env(safe-area-inset-bottom)); background: var(--sheet); transform: translateY(110%); transition: transform 320ms var(--ease); }
  .dock.on { transform: none; }
  .dock .btn { flex: 1; min-width: 0; padding: 0 12px; }
}

/* ---------- idle nudge ---------- */
@keyframes nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.paper.idle .paper-hint { animation: nudge 1.1s var(--ease) 3; }
@media (prefers-reduced-motion: reduce) { .paper.idle .paper-hint { animation: none; } }

/* ---------- navigation polish ---------- */
[id] { scroll-margin-top: 88px; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 40; background: var(--ink); color: var(--ground); padding: 14px 22px; border-radius: var(--pill); font: 600 var(--t-body)/1 var(--display-font); text-decoration: none; transition: top 160ms var(--ease); }
.skip:focus { top: 12px; }
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
