/* The public site at parlorkids.com (web/scripts/site.mjs writes the pages; decisions 0010 and 0046). For grown-ups:
   parents, teachers and librarians. The Parlor Kids brand: sunflower, story blue, coral and Bert green on cream
   page, warm ink. Fraunces (soft) for headings, Nunito for text, Andika (made for children learning to read) where a
   child might read along. Every file is served by the site itself: the site sends Cross-Origin-Embedder-Policy
   require-corp, and nothing about a visitor goes to another site.
   After editing this file, run `node scripts/site.mjs` so the pages ask for the new version. */

/* Fraunces trimmed to what this file uses (scripts/site-fonts.py): weights 500-700, optical sizes 48-144, SOFT 100 and
   WONK fixed (0 upright, 1 italic). Using another weight or optical size here means widening it there. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('/fonts/fraunces-soft-normal.woff2') format('woff2-variations'), url('/fonts/fraunces-soft-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 500 700; font-display: swap; src: url('/fonts/fraunces-soft-italic.woff2') format('woff2-variations'), url('/fonts/fraunces-soft-italic.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/nunito-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Andika'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/andika-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Andika'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/andika-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --page: #fff6e4;          /* the cream page */
  --card: #ffffff;
  --ink: #2b1d14;           /* warm brown-black: text and Bert's frames */
  --ink-mid: #4a3517;
  --ink-soft: #6b5844;
  --ink-faint: #7a6650;     /* small print: 4.5:1 or better on the page, cards and pale yellow */
  --line: #ecdcb9;
  --sun: #ffc93d;           /* sunflower */
  --sun-soft: #ffe08a;
  --sun-pale: #fff1c8;
  --sun-ink: #5c3f08;       /* text on sunflower that isn't the main ink */
  --blue: #2f5fb3;          /* story blue */
  --blue-deep: #24498c;
  --blue-pale: #e4ebf7;
  --blue-text: #e4ebf7;     /* text on blue */
  --coral: #ff7a59;
  --coral-deep: #b4452b;    /* coral as text: 5:1 on the page */
  --coral-pale: #ffe3da;
  --green: #a9cc55;         /* Bert green */
  --green-deep: #3d6b1f;
  --green-pale: #e8f2d2;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --kids: 'Andika', 'Trebuchet MS', system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 28px;
  --shadow: 0 1px 0 var(--line);
  --lift: 0 24px 48px -20px rgba(110, 72, 4, .38);
  /* The page's own colour (set by the <body> class): its hero, labels and the italic phrase in its heading. */
  --tint: var(--sun-pale); --band: var(--sun); --accent: var(--blue); --label: var(--blue);
}
.theme-sun   { --tint: var(--sun-pale);   --band: var(--sun);       --accent: var(--blue);       --label: var(--blue); }
.theme-blue  { --tint: var(--blue-pale);  --band: var(--blue-pale); --accent: var(--blue);       --label: var(--blue-deep); }
.theme-green { --tint: var(--green-pale); --band: var(--green-pale); --accent: var(--green-deep); --label: var(--green-deep); }
.theme-coral { --tint: var(--coral-pale); --band: var(--coral-pale); --accent: #c24a2c;         --label: var(--coral-deep); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 500 1.125rem/1.6 var(--text); text-rendering: optimizeLegibility; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 2px; text-decoration-color: var(--sun); text-underline-offset: .2em; font-weight: 700; }
a:hover { color: var(--blue); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; font-variation-settings: 'SOFT' 100, 'WONK' 0, 'opsz' 144; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.15; font-variation-settings: 'SOFT' 100, 'WONK' 0, 'opsz' 72; }
h1 em, h2 em { font-style: italic; color: var(--accent); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; }
p { margin: 0 0 1em; }
strong, b { font-weight: 800; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; padding: 10px 16px; background: var(--card); border-radius: 12px; font-weight: 800; }
.skip:focus { left: 8px; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; color: var(--ink-mid); max-width: 34em; }
.muted { color: var(--ink-soft); }
.small { font-size: .95rem; }
.fine { font-size: .88rem; color: var(--ink-faint); line-height: 1.55; }
.label { margin: 0 0 12px; font-size: .9rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 16px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: .95rem; font-weight: 800; }
.theme-blue .page-head .pill { background: var(--blue-pale); color: var(--blue-deep); }
.theme-green .page-head .pill { background: var(--green-pale); color: var(--green-deep); }
.theme-coral .page-head .pill { background: var(--coral-pale); color: var(--coral-deep); }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--sun-pale); color: var(--ink); font-size: .82rem; font-weight: 800; line-height: 1.4; }
.tag-ready { background: var(--ink); color: var(--sun); }
.tag-guide { background: var(--card); color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--line); }
.age-5-7 { background: var(--coral-pale); }
.age-7-10 { background: var(--green-pale); }
.age-10-12 { background: var(--blue-pale); }

/* Buttons --------------------------------------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--page);
  font: 800 1.05rem/1.2 var(--text); text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 #6b4a12;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { color: var(--page); background: #3d2a1c; transform: translateY(-1px); box-shadow: 0 6px 0 #6b4a12; }
.button:active { transform: translateY(3px); box-shadow: 0 2px 0 #6b4a12; }
.button.big { min-height: 60px; padding: 16px 32px; font-size: 1.15rem; }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2.5px var(--ink); }
.button.quiet:hover { background: rgba(43, 29, 20, .06); color: var(--ink); transform: none; }
.button.sun { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 #b07d10; }
.button.sun:hover { background: #ffd35c; color: var(--ink); }
.button svg { flex: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.text-link { font-weight: 800; }

/* Header ---------------------------------------------------------------------------------------------------------- */
.site-header { background: var(--page); }
.has-band .site-header { background: var(--band); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; }
.wordmark { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 12px; font: 700 1.75rem/1 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 0, 'opsz' 72; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.wordmark img { width: 44px; height: 44px; border-radius: 11px; }
.wordmark b { color: var(--blue); font-weight: inherit; }
.has-band.theme-sun .site-header .wordmark b { color: var(--blue-deep); }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.nav a { padding: 8px 10px; color: var(--ink); text-decoration: none; font-weight: 700; border-radius: 10px; }
.nav a:hover { background: rgba(43, 29, 20, .07); color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--coral); border-radius: 0; }
.nav .signin { color: var(--ink-soft); }
.has-band .nav .signin { color: var(--ink-mid); }   /* on sunflower, the softer brown is under 4.5:1 */
.nav .button { min-height: 44px; padding: 8px 20px; margin-left: 10px; font-size: .98rem; color: var(--page); box-shadow: none; }
.nav .button:hover { color: var(--page); background: #3d2a1c; transform: none; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
@media (max-width: 1180px) { .nav { display: none; } .menu { display: block; } }

/* Shared pieces --------------------------------------------------------------------------------------------------- */
.section { padding-block: clamp(56px, 8vw, 112px) 0; }
.section:last-of-type { padding-bottom: clamp(56px, 8vw, 104px); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head .lede, .section-head p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.page-head.doors-head { gap: 0; justify-items: start; padding-bottom: clamp(28px, 4vw, 44px); }
.page-head.doors-head h1 { margin-bottom: .3em; }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; margin-bottom: 28px; }
.door { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 30px 30px 28px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.door:hover { transform: translateY(-2px); color: var(--ink); }
.door:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.door > img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--sun-pale); }
.door-text b { display: block; font: 800 1.45rem/1.2 var(--text); margin-bottom: 6px; }
.door-text span { color: var(--ink-soft); }
.door .button { margin-top: auto; }
.doors-more { color: var(--ink-soft); margin-bottom: clamp(48px, 7vw, 96px); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: 24px; padding: 26px 26px 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; font-size: 1.3rem; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; margin-bottom: 14px; color: var(--blue); }
.soft { background: var(--sun-pale); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); }
.soft p:last-child { margin-bottom: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 38px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .1em; width: 26px; height: 26px; border-radius: 50%; background: var(--green-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%233d6b1f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.crosses li::before { background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8l8 8M16 8l-8 8' stroke='%23b4452b' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: 12px; }
.numbered > li { counter-increment: n; position: relative; background: var(--card); border-radius: 20px; padding: 18px 22px 18px 70px; box-shadow: var(--shadow); }
.numbered > li::before { content: counter(n); position: absolute; left: 20px; top: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); font-weight: 800; font-size: 1rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 999px; background: var(--sun-soft); font-size: .98rem; font-weight: 700; }

/* Speech: Bert's lines and the child's answer. */
.bubble { position: relative; background: var(--card); border-radius: 22px 22px 22px 6px; padding: 14px 20px; font: 600 1.05rem/1.45 var(--text); box-shadow: 0 12px 26px -14px rgba(92, 63, 8, .45); }
.bubble b { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.chat { display: grid; gap: 12px; margin: 0; }
.chat .bert { display: flex; align-items: flex-end; gap: 10px; }
.chat .bert img { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--card); }
.chat .child { justify-self: end; max-width: 88%; margin: 0; background: var(--ink); color: var(--page); border-radius: 22px 22px 6px 22px; padding: 14px 18px; font: 600 1.05rem/1.45 var(--text); }
.chat .child b { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sun-soft); }

/* A painting in a cream frame, slightly tilted. */
.frame { margin: 0; position: relative; }
.frame > img, .frame .frame-pic { width: 100%; border-radius: 22px; border: 12px solid var(--page); box-shadow: var(--lift); background: var(--page); }
.frame.tilt-r > img, .frame.tilt-r .frame-pic { transform: rotate(1.5deg); }
.frame.tilt-l > img, .frame.tilt-l .frame-pic { transform: rotate(-1.2deg); }
.frame figcaption { margin-top: 14px; text-align: center; font-size: .9rem; color: var(--ink-soft); }
.frame .bubble { position: absolute; z-index: 2; max-width: 290px; }

/* Page heads ------------------------------------------------------------------------------------------------------ */
.band { background: var(--band); border-radius: 0 0 48px 48px; }
.band .lede { color: var(--ink-mid); }
.page-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(24px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.page-head.solo { grid-template-columns: minmax(0, 1fr); }
.page-head.solo > * { max-width: 46rem; }
.page-head h1 { max-width: 13em; }
.page-head .lede { margin-bottom: 0; }
@media (max-width: 880px) { .page-head { grid-template-columns: 1fr; } }
.panel { border-radius: 40px; background: var(--blue); position: relative; overflow: hidden; min-height: 360px; display: flex; align-items: flex-end; justify-content: center; padding: 32px 24px 0; }
.panel .tags { position: absolute; top: 24px; right: 24px; display: grid; justify-items: end; gap: 8px; }
.panel .tags span { background: var(--sun); padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 800; }
.panel .tags span + span { background: var(--page); }
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; background: var(--card); border-radius: 32px; padding: 26px; box-shadow: var(--shadow), var(--lift); }
.glance div { border-radius: 22px; padding: 20px; font-weight: 800; line-height: 1.3; }
.glance svg { display: block; width: 34px; height: 34px; margin-bottom: 8px; }
@media (max-width: 480px) { .glance { grid-template-columns: 1fr; } }

/* Home ------------------------------------------------------------------------------------------------------------ */
.home-hero { padding-bottom: clamp(48px, 7vw, 88px); }
.home-hero .lede { max-width: 30em; }
.home-hero .demo { display: grid; justify-items: start; gap: 10px; }
.home-hero .demo p { margin: 0; font-size: .95rem; font-weight: 700; color: var(--sun-ink); }
.characters { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.characters li { display: flex; align-items: center; gap: 12px; padding: 6px 20px 6px 6px; border-radius: 999px; background: var(--sun-soft); }
.characters img { width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--page); object-fit: contain; padding: 2px; }
.characters h2 { margin: 0; font: 800 1rem/1.25 var(--text); letter-spacing: 0; }
.characters p { margin: 0; font-size: .88rem; line-height: 1.3; color: var(--sun-ink); }
.intro-painting { padding-top: 34px; }
.intro-painting .bubble { top: 0; left: -10px; }
/* No overflow clipping around the video: Safari on iPhone can fail to draw or start a video inside a rotated, clipped,
   rounded box. The poster and the video round their own corners instead. The whole picture plays the introduction
   (home-introduction.js); the round button in its middle shows that until it has started. */
.intro-painting .frame-pic { position: relative; aspect-ratio: 4 / 5; transform: rotate(1.5deg); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.intro-painting .frame-pic img, .intro-painting video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.intro-big { position: absolute; left: 50%; top: 50%; z-index: 2; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: var(--ink); box-shadow: 0 0 0 8px rgba(255, 246, 228, .55), 0 14px 28px -10px rgba(43, 29, 20, .6); pointer-events: none; transition: transform .15s ease, opacity .2s ease; }
.intro-big svg { width: 36px; height: 36px; margin-left: 5px; }
.intro-big[hidden] { display: none; }
.frame-pic:hover .intro-big { transform: scale(1.06); }
.intro-controls { position: absolute; right: 22px; bottom: -22px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 6px; border-radius: 999px; background: var(--ink); color: var(--page); box-shadow: 0 10px 22px -8px rgba(43, 29, 20, .55); }
.intro-controls[hidden] { display: none; }
.intro-controls button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--page); font: 800 1rem/1.2 var(--text); cursor: pointer; }
.intro-controls #intro-play svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--sun); color: var(--ink); flex: none; }
.intro-controls button:hover { background: rgba(255, 255, 255, .1); }
.intro-controls button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.intro-controls button:disabled { opacity: .6; cursor: wait; }
.intro-controls #intro-time { padding: 0 6px; font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--sun-soft); }
.intro-controls #intro-captions { min-width: 44px; justify-content: center; padding: 0; color: var(--page); position: relative; }
.intro-controls #intro-captions svg { width: 22px; height: 19px; }
.intro-controls #intro-captions[hidden] { display: none; }
.intro-controls #intro-captions[aria-pressed="true"] { color: var(--sun); }
.intro-controls #intro-captions[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 7px; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: currentColor; }
.intro-caption { position: absolute; left: 14px; right: 14px; bottom: 46px; z-index: 2; margin: 0 auto; width: fit-content; max-width: calc(100% - 28px); padding: 6px 12px; border-radius: 10px; background: rgba(43, 29, 20, .86); color: #fff6e4; font: 700 clamp(.95rem, 3.8vw, 1.1rem)/1.35 var(--text); text-align: center; pointer-events: none; }
.intro-caption[hidden] { display: none; }
.intro-painting video::cue { color: #fff6e4; background: rgba(43, 29, 20, .9); font: 600 17px/1.4 var(--text); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; padding-top: 36px; font-weight: 700; color: var(--ink-mid); }
.trust span { display: inline-flex; align-items: center; gap: 10px; }
.trust svg { width: 22px; height: 22px; color: var(--blue); flex: none; }
@media (max-width: 880px) { .intro-painting { max-width: 520px; width: 100%; justify-self: center; } }

/* A full-width coloured band inside the page (story blue, by default). */
.blue-band { background: var(--blue); color: var(--page); border-radius: 48px; width: min(1248px, 100% - 2 * clamp(0px, 2vw, 24px)); margin-inline: auto; padding-block: clamp(56px, 7vw, 80px); }
.blue-band .label { color: var(--sun-soft); }
.blue-band h2 { color: var(--page); }
.blue-band p, .blue-band .lede { color: var(--blue-text); }
.blue-band a { color: var(--sun-soft); text-decoration-color: currentColor; }
.blue-band .wrap { width: min(var(--wrap), 100% - 2 * clamp(24px, 5vw, 48px)); }
.stat { background: var(--blue-deep); border-radius: var(--radius); padding: 30px 32px; }
.stat .num { margin: 0 0 6px; font: 700 clamp(4rem, 9vw, 6rem)/1 var(--display); font-variation-settings: 'SOFT' 100, 'opsz' 144; color: var(--sun); }
.stat p { color: var(--blue-text); }
.stat p:last-child { margin-bottom: 0; }
.skills { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.skills li { counter-increment: s; background: var(--page); color: var(--ink); border-radius: 22px; padding: 22px; display: grid; gap: 6px; align-content: start; font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.skills li::before { content: counter(s); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: var(--ink); font-weight: 800; margin-bottom: 6px; }
.skills b { color: var(--ink); font-size: 1.15rem; line-height: 1.25; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.steps > li { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.steps .visual { aspect-ratio: 3 / 2; margin: 0; background: var(--sun-pale); display: grid; align-content: center; padding: 22px; }
.steps .visual.pic { padding: 0; position: relative; overflow: hidden; }
/* Pinned to the box: Safari doesn't resolve height: 100% inside a grid box sized by aspect-ratio, so a portrait
   picture (step 3) kept its own height and showed only its top-left corner. */
.steps .visual.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.steps .text { padding: 22px 26px 28px; }
.steps .n { display: block; margin-bottom: 4px; font-weight: 800; color: var(--coral-deep); }
.steps h3 { font: 800 1.35rem/1.25 var(--text); letter-spacing: 0; margin: 0 0 8px; }
.steps p { margin: 0; font-size: 1rem; color: var(--ink-soft); }
.quote { margin: 0; background: var(--sun); border-radius: 36px; padding: clamp(32px, 5vw, 48px); position: relative; }
.quote p { margin: 0; font: italic 600 clamp(1.6rem, 2.8vw, 2.2rem)/1.25 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 72; }
.quote img { position: absolute; right: 32px; bottom: -32px; width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--lift); }
.cta-band { background: var(--sun); border-radius: 40px; padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 52px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band .who { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; flex: 1 1 520px; min-width: 0; }
.cta-band .who > img { width: 120px; height: 120px; border-radius: 27px; box-shadow: var(--lift); }
.cta-band .who > div { flex: 1 1 300px; min-width: 0; }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .3em; }
.cta-band p { margin: 0; color: var(--ink-mid); }
.cta-band .actions { margin-top: 0; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: 30px 22px; }
.tiles a { display: grid; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1rem; line-height: 1.25; }
.tiles img, .tiles .cloth { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px 12px 12px 6px; box-shadow: 0 2px 0 rgba(43, 29, 20, .08), 0 14px 24px -10px rgba(43, 29, 20, .4); transition: transform .15s ease; }
.tiles a:hover img { transform: translateY(-3px) rotate(-1deg); }
.tiles .tag { justify-self: start; }
.covers { display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x proximity; }
.covers a { flex: 0 0 auto; scroll-snap-align: start; }
.covers img { width: 120px; aspect-ratio: 200 / 266; object-fit: cover; border-radius: 4px 9px 9px 4px; box-shadow: 0 12px 22px -10px rgba(43, 29, 20, .45); }

/* Reading comprehension and How it works -------------------------------------------------------------------------- */
.habits { display: grid; gap: clamp(48px, 7vw, 88px); }
.habit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.habit:nth-child(even) > .shot { order: 2; }
.habit .shot { margin: 0; border-radius: 32px; padding: clamp(18px, 3vw, 32px); display: grid; place-items: center; }
.habit:nth-child(5n+1) .shot { background: var(--sun-pale); }
.habit:nth-child(5n+2) .shot { background: var(--blue-pale); }
.habit:nth-child(5n+3) .shot { background: var(--coral-pale); }
.habit:nth-child(5n+4) .shot { background: var(--green-pale); }
.habit:nth-child(5n+5) .shot { background: var(--sun-pale); }
.habit .shot img { border-radius: 18px; box-shadow: 0 16px 32px -14px rgba(43, 29, 20, .35); background: var(--card); }
.habit .n { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: .9rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.habit .n span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: var(--ink); letter-spacing: 0; font-size: 1rem; }
.habit h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
@media (max-width: 880px) { .habit { grid-template-columns: 1fr; } .habit:nth-child(even) > .shot { order: 0; } }
.bands-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.bands-list li { border-radius: var(--radius); padding: 28px 30px; color: var(--ink-mid); font-size: 1.02rem; }
.bands-list .tag { background: var(--card); margin-bottom: 10px; }
.bands-list h3 { margin: 0 0 8px; }
.for-kids { background: var(--sun-soft); border-radius: 40px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: center; }
.for-kids > img { width: 180px; flex: none; }
.for-kids > div { flex: 1 1 420px; min-width: 0; font: 400 1.3rem/1.6 var(--kids); }
.for-kids .label { font-family: var(--text); color: var(--sun-ink); }
.for-kids h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 24px; }
.timeline > li > span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: var(--ink); font-weight: 800; font-size: 1.25rem; position: relative; }
.timeline > li > div { padding: 8px 0 44px; position: relative; }
.timeline > li:not(:last-child) > div::before { content: ""; position: absolute; left: -50px; top: 64px; bottom: 6px; width: 4px; border-radius: 2px; background: #f3d9a6; }
.timeline > li:last-child > span { background: var(--blue); color: var(--page); }
.timeline h3 { font: 800 1.45rem/1.25 var(--text); letter-spacing: 0; margin: 0 0 8px; }
.timeline p { color: var(--ink-mid); max-width: 44rem; }
.timeline .chat { max-width: 640px; background: var(--sun-pale); border-radius: var(--radius); padding: 24px; margin: 6px 0 18px; }
.timeline .chat .cap { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a6420; }
.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; font-size: .95rem; font-weight: 800; }
.ladder .muted { font-weight: 700; }
.ladder span:not(.muted):not([aria-hidden]) { background: var(--card); padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); }
.ladder [aria-hidden] { color: #c9a35a; }
.flow { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.flow li { flex: 1 1 220px; min-width: 0; border-radius: 24px; padding: 24px; display: grid; gap: 6px; align-content: start; font-size: 1rem; color: var(--ink-mid); }
.flow li b { font-size: 1.15rem; color: var(--ink); }
.flow li small { font-size: .85rem; font-weight: 800; }
.flow li:nth-child(1) { background: var(--sun-pale); } .flow li:nth-child(1) small { color: #8a6420; }
.flow li:nth-child(2) { background: var(--blue-pale); } .flow li:nth-child(2) small { color: var(--blue-deep); }
.flow li:nth-child(3) { background: var(--green-pale); } .flow li:nth-child(3) small { color: var(--green-deep); }
.flow li:nth-child(4) { background: var(--coral-pale); } .flow li:nth-child(4) small { color: var(--coral-deep); }
.listen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-top: 32px; }
.listen div { background: var(--blue-deep); border-radius: 24px; padding: 24px; }
.listen b { display: block; margin-bottom: 6px; font-size: 1.15rem; color: var(--page); }
.listen p { margin: 0; font-size: 1rem; }

/* Parents and teachers -------------------------------------------------------------------------------------------- */
.keep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; align-items: start; }
.keep-grid > div { border-radius: 32px; padding: clamp(26px, 4vw, 38px); }
.keep-grid > div:first-child { background: var(--card); box-shadow: var(--shadow); }
.keep-grid > div:last-child { background: var(--green-pale); }
.keep-grid h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.keep-grid li { font-size: 1.02rem; }
.dots { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dots li { position: relative; padding-left: 24px; }
.dots li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.exception { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-start; background: var(--sun-pale); border-radius: var(--radius); padding: 28px 32px; margin-top: 24px; }
.exception .tag { background: var(--sun); flex: none; font-size: .9rem; padding: 6px 14px; }
.exception p { flex: 1 1 520px; margin: 0; font-size: 1.02rem; color: var(--ink-mid); }
.not-friend { background: var(--blue); color: var(--page); border-radius: 32px; padding: clamp(26px, 4vw, 38px); }
.not-friend h2 { color: var(--page); font-size: clamp(1.7rem, 3vw, 2.2rem); }
.not-friend p { color: var(--blue-text); font-size: 1.02rem; }
.not-friend .chip { background: var(--blue-deep); color: var(--page); font-size: .95rem; }
.not-friend .chip:last-child { background: var(--sun); color: var(--ink); }
.plan { background: var(--card); border-radius: 32px; padding: 30px; box-shadow: var(--shadow), var(--lift); display: grid; gap: 18px; }
.plan .bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; }
.plan .bar span:nth-child(1) { flex: 5; background: var(--sun); } .plan .bar span:nth-child(2) { flex: 6; background: var(--coral); } .plan .bar span:nth-child(3) { flex: 4; background: var(--blue); }
.plan ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plan li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.02rem; }
.plan li .tag { flex: none; } .plan li:nth-child(2) .tag { background: var(--coral); } .plan li:nth-child(3) .tag { background: var(--blue); color: var(--page); }
.isnt { background: var(--ink); color: var(--page); border-radius: 32px; padding: clamp(28px, 4vw, 38px) clamp(28px, 4vw, 42px); display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.isnt h2 { margin: 0; color: var(--page); font-size: clamp(1.7rem, 3vw, 2.2rem); }
.isnt .chip { background: #4a3517; color: var(--page); }
.isnt p { flex: 1 1 100%; margin: 0; color: #e9dcc4; font-size: 1.02rem; }
.isnt a { color: var(--sun); }
.fan { display: flex; justify-content: center; align-items: flex-end; padding: 20px 0; }
.fan img { width: clamp(84px, 11vw, 132px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px 10px 10px 6px; margin-left: -18px; box-shadow: 0 14px 26px -8px rgba(43, 29, 20, .35); }
.fan img:first-child { margin-left: 0; transform: rotate(-8deg) translateY(10px); }
.fan img:nth-child(2) { transform: rotate(-3deg); } .fan img:nth-child(3) { position: relative; z-index: 2; width: clamp(96px, 12vw, 146px); }
.fan img:nth-child(4) { transform: rotate(3deg); } .fan img:nth-child(5) { transform: rotate(8deg) translateY(10px); }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; align-items: stretch; }
.duo > div { border-radius: 32px; padding: clamp(26px, 4vw, 38px); display: flex; flex-direction: column; gap: 4px; }
.duo > div > .button { align-self: flex-start; margin-top: auto; }
.duo h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.duo .card-like { background: var(--card); box-shadow: var(--shadow); }

/* The library ----------------------------------------------------------------------------------------------------- */
.counts { display: flex; flex-wrap: wrap; gap: 12px; }
.counts div { background: var(--page); border-radius: 22px; padding: 16px 22px; display: grid; }
.counts b { font: 700 2.6rem/1 var(--display); font-variation-settings: 'SOFT' 100, 'opsz' 96; }
.counts span { font-size: .9rem; font-weight: 700; color: var(--ink-soft); }
.lib-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; padding-block: clamp(24px, 4vw, 44px) clamp(40px, 6vw, 64px); }
.lib-head > div:first-child { flex: 1 1 560px; min-width: 0; }
.lib-head .lede { margin-bottom: 0; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.shelf-head > div { max-width: 44rem; }
.shelf-head h2 { margin-bottom: .25em; }
.shelf-head p { margin: 0; color: var(--ink-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a, .filters button { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--page); box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font: 800 1rem/1.2 var(--text); text-decoration: none; cursor: pointer; }
.filters [aria-pressed="true"], .filters a:hover, .filters button:hover { background: var(--ink); color: var(--page); }
.filters .age-5-7, .filters .age-7-10, .filters .age-10-12 { box-shadow: none; }
.filters .age-5-7 { background: var(--coral-pale); } .filters .age-7-10 { background: var(--green-pale); } .filters .age-10-12 { background: var(--blue-pale); }
.filters .age-5-7:hover, .filters .age-7-10:hover, .filters .age-10-12:hover { background: var(--ink); color: var(--page); }
.books { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.book { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--card); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.book:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 18px 32px -20px rgba(43, 29, 20, .4); }
.book[hidden] { display: none; }
.book img, .cloth { width: 92px; aspect-ratio: 200 / 266; object-fit: cover; border-radius: 4px 8px 8px 4px; box-shadow: 0 8px 16px -6px rgba(43, 29, 20, .35); }
.cloth { display: grid; place-items: center; padding: 8px 6px; color: #fff8e8; font: 700 .72rem/1.2 var(--display); text-align: center; box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 8px 16px -6px rgba(43, 29, 20, .35); }
.book h3 { font: 800 1.08rem/1.25 var(--text); letter-spacing: 0; margin: 0 0 3px; }
.book h3 a { color: var(--ink); text-decoration: none; }
.book h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.book h3 a:focus-visible { outline: none; }
.book:has(h3 a:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.book .by { margin: 0 0 6px; font-size: .88rem; color: var(--ink-soft); }
.book .blurb { margin: 0 0 10px; font-size: .96rem; line-height: 1.45; color: var(--ink-mid); }
.book .meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.book .meta .tag { font-weight: 700; } .book .meta .len { background: #f4ecd9; }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.path-card { border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.path-card:nth-child(6n+1) { background: var(--coral-pale); } .path-card:nth-child(6n+2) { background: var(--sun-pale); } .path-card:nth-child(6n+3) { background: #efe6fb; }
.path-card:nth-child(6n+4) { background: var(--green-pale); } .path-card:nth-child(6n+5) { background: var(--blue-pale); } .path-card:nth-child(6n+6) { background: var(--sun-soft); }
.path-card .spines { display: flex; align-items: flex-end; height: 118px; padding-left: 10px; overflow: hidden; }
.path-card .spines img, .path-card .spines .cloth { width: clamp(54px, 15vw, 78px); flex: none; margin-left: -10px; border-radius: 3px 7px 7px 3px; }
.path-card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; font: 800 1.3rem/1.25 var(--text); letter-spacing: 0; }
.path-card h3 small { font-size: .88rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.path-card > p { margin: 0; font-size: 1rem; color: var(--ink-mid); }
.path-card details summary { cursor: pointer; font-weight: 800; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.path-card details summary::-webkit-details-marker { display: none; }
.path-card details summary::before { content: "+"; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 1.1rem; }
.path-card details[open] summary::before { content: "–"; }
.path { margin: 4px 0 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 1rem; }
.path li span { display: block; color: var(--ink-soft); font-size: .93rem; line-height: 1.45; font-weight: 500; }
.age-section { padding-top: clamp(40px, 6vw, 64px); }
.age-section .shelf-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* Book pages ------------------------------------------------------------------------------------------------------ */
.tint-band { background: var(--tint); border-radius: 0 0 48px 48px; }
.has-tint .site-header { background: var(--tint); }
.theme-sun.has-tint { --label: #8a6420; --accent: #8a5a0c; }
.crumbs { padding-top: 22px; font-size: .95rem; font-weight: 700; color: var(--ink-soft); }
.crumbs a { font-weight: 700; }
.book-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-block: 22px 28px; }
.book-cover img, .book-cover .cloth { width: 220px; height: auto; aspect-ratio: 200 / 266; border-radius: 6px 14px 14px 6px; box-shadow: 0 24px 44px -16px rgba(43, 29, 20, .45); transform: rotate(-2deg); font-size: 1.1rem; }
.book-head h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); margin-bottom: .2em; hyphens: auto; overflow-wrap: break-word; }
.book-head .by { color: var(--ink-mid); margin: 0 0 18px; font-size: 1.15rem; }
.book-head .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.book-head .tags .tag { background: var(--card); font-size: .9rem; padding: 5px 12px; }
.book-head .tags .tag-ready { background: var(--ink); }
.book-head .actions { margin-top: 0; }
.book-head .app-status { margin: 0; font-size: .98rem; color: var(--ink-mid); max-width: 36rem; }
.facts { list-style: none; margin: 0; padding: 0 0 clamp(40px, 6vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.facts li { background: var(--card); border-radius: 22px; padding: 18px 20px; display: grid; gap: 2px; align-content: start; }
.facts small { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--label); }
.facts b { font: 700 1.75rem/1.15 var(--display); font-variation-settings: 'SOFT' 100, 'opsz' 72; }
.facts span { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 640px) { .book-head { grid-template-columns: 1fr; } .book-cover img, .book-cover .cloth { width: 150px; } }
.book-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(48px, 6vw, 72px); }
.book-main { display: grid; gap: 56px; min-width: 0; }
.book-main section > h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.book-main .gives { font: italic 500 1.35rem/1.45 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 48; color: var(--accent); margin: 0; }
.notes-box { background: var(--coral-pale); border-radius: var(--radius); padding: 30px; }
.notes-box h2 { display: flex; align-items: center; gap: 10px; font: 800 1.4rem/1.25 var(--text) !important; letter-spacing: 0; }
.notes-box h2 svg { width: 26px; height: 26px; flex: none; color: var(--coral-deep); }
.notes-box ul { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; font-size: 1.02rem; color: var(--ink-mid); }
.notes-box p { margin: 0; color: var(--ink-mid); }
.scale { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.scale .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: .95rem; font-weight: 700; }
.scale .row span:last-child { color: var(--ink-soft); }
.scale .track { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #d8eaa8, #ffe08a, #ffb39c); }
.scale .track i { position: absolute; top: -5px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--card); }
.scale p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.talk li { display: flex; gap: 14px; align-items: flex-start; }
.talk img { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--sun-pale); }
.talk p { margin: 0; background: var(--card); border-radius: 20px 20px 20px 5px; padding: 14px 18px; font-size: 1.02rem; box-shadow: var(--shadow); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chapters li { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(110px, 170px); gap: 12px; align-items: center; font-size: 1rem; min-height: 32px; }
.chapters .i { font-weight: 800; color: var(--ink-faint); text-align: right; font-variant-numeric: tabular-nums; }
.chapters .t { overflow-wrap: anywhere; line-height: 1.3; }
.chapters .m { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.chapters .m i { display: block; height: 10px; border-radius: 999px; background: var(--green); flex: none; }
.chapters-note { font-size: .92rem; color: var(--ink-soft); margin: -6px 0 14px; }
.tonight { background: var(--blue); color: var(--page); border-radius: 32px; padding: clamp(24px, 4vw, 32px); display: grid; gap: 16px; }
.tonight .label { color: var(--sun-soft); margin: 0; }
.tonight h2 { color: var(--page); margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem) !important; }
.tonight > p { margin: 0; color: var(--blue-text); font-size: 1rem; }
.nights { display: flex; flex-wrap: wrap; gap: 8px; }
.nights button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--blue-deep); color: var(--page); font: 800 1rem/1 var(--text); cursor: pointer; }
.nights button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.nights button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.night { background: var(--page); color: var(--ink); border-radius: 22px; padding: 22px; }
.night[hidden] { display: none; }
.night h3 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin: 0 0 10px; font: 800 1.2rem/1.3 var(--text); letter-spacing: 0; }
.night h3 small { font-size: .92rem; font-weight: 700; color: var(--ink-soft); }
.night ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 22px; }
.night li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0e3c4; font-size: 1rem; }
.night li span { flex: none; font-size: .88rem; font-weight: 700; color: var(--ink-faint); }
.js .tonight .night:not(.on) { display: none; }
.stories-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.stories-head h2 { margin: 0; }
.find { display: grid; gap: 6px; flex: 0 1 320px; }
.find[hidden] { display: none; }
.find label { font-size: .9rem; font-weight: 800; color: var(--ink-soft); }
.find input { min-height: 48px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 600 1.05rem/1.3 var(--text); }
.find input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.stories { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.stories li { display: flex; gap: 10px; align-items: baseline; background: var(--card); border-radius: 14px; padding: 10px 14px; font-size: 1rem; }
.stories li[hidden] { display: none; }
.stories li.famous { background: var(--sun-soft); }
.stories .i { flex: 0 0 30px; text-align: right; font-size: .82rem; font-weight: 800; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.stories .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stories .m { flex: none; font-size: .82rem; font-weight: 700; color: var(--ink-faint); }
.stories-note { margin: 0 0 12px; font-size: .95rem; color: var(--ink-soft); }
.more { margin-top: 14px; }
.more[hidden] { display: none; }
.book-aside { display: grid; gap: 20px; }
.book-aside > div { border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; }
.book-aside .fits { background: var(--card); box-shadow: var(--shadow); }
.book-aside .liked { background: var(--sun-pale); }
.book-aside .join { background: var(--ink); color: var(--page); }
.book-aside .join img { width: 56px; height: 56px; border-radius: 13px; }
.book-aside .join p { margin: 0; font-size: 1.02rem; }
.book-aside .join .button { justify-self: start; }
.book-aside .label { margin: 0; font-size: .8rem; }
.book-aside p { margin: 0; font-size: 1rem; }
.book-aside .fits b { font-size: 1.15rem; display: block; }
.liked ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.liked li a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.liked li img, .liked li .cloth { width: 52px; flex: none; border-radius: 3px 6px 6px 3px; font-size: .5rem; padding: 4px; }
.liked li b { display: block; font-size: 1rem; }
.liked li span { display: block; font-size: .9rem; font-weight: 500; line-height: 1.4; color: var(--ink-soft); }
.about-numbers { padding-top: 8px; }
@media (max-width: 960px) { .book-body { grid-template-columns: minmax(0, 1fr); } }

/* FAQ, help, privacy, terms --------------------------------------------------------------------------------------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 104px); }
.faq-layout .page-head { display: block; padding: 0; }
.faq-layout .ask { background: var(--sun); border-radius: var(--radius); padding: 26px; margin-top: 28px; display: grid; gap: 10px; }
.faq-layout .ask img { width: 84px; }
.faq-layout .ask b { font-size: 1.2rem; }
.faq-layout .ask p { margin: 0; color: var(--ink-mid); font-size: 1rem; }
@media (max-width: 880px) { .faq-layout { grid-template-columns: 1fr; } }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; font-weight: 800; font-size: 1.15rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-pale); font-size: 1.35rem; font-weight: 800; }
.faq details[open] summary::after { content: "–"; background: var(--ink); color: var(--sun); }
.faq details > div { padding: 0 24px 22px; color: var(--ink-mid); font-size: 1.05rem; max-width: 46rem; }
.faq details > div p:last-child, .faq details > div ol:last-child { margin-bottom: 0; }
.prose { padding-bottom: clamp(56px, 8vw, 104px); font-size: 1.08rem; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.prose h3 { margin-top: 1.4em; font: 800 1.25rem/1.3 var(--text); letter-spacing: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: .98rem; background: var(--card); border-radius: 18px; overflow: hidden; }
.prose td:nth-child(2) { overflow-wrap: anywhere; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--sun-pale); }
.prose tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.callout { background: var(--sun-pale); border-radius: 22px; padding: 20px 24px; }
.callout p:last-child { margin-bottom: 0; }
.review-note { background: var(--sun); border-radius: 18px; padding: 14px 18px; margin: 0 0 28px; font-size: 1rem; }
.prose.faq details { margin-bottom: 0; }

/* The request form ------------------------------------------------------------------------------------------------ */
.theme-sun.invite { background: var(--sun); }
.invite .site-header { background: var(--sun); }
.request { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(24px, 4vw, 48px) clamp(64px, 9vw, 120px); }
.request .page-head { display: block; padding: 0; }
.request .bert { display: flex; align-items: flex-end; gap: 18px; margin: 18px 0 8px; }
.request .bert img { width: 140px; flex: none; }
.request .bert .bubble { margin-bottom: 110px; max-width: 280px; }
.request .next { background: var(--page); border-radius: 24px; padding: 22px 24px; display: grid; gap: 8px; max-width: 34rem; }
.request .next h2 { margin: 0; font: 800 1.15rem/1.3 var(--text); letter-spacing: 0; }
.request .next p { margin: 0; font-size: 1rem; color: var(--ink-mid); }
@media (max-width: 880px) { .request { grid-template-columns: 1fr; } .request .bert .bubble { margin-bottom: 60px; } }
.form, .sent { background: var(--page); border-radius: 36px; padding: clamp(26px, 4vw, 40px); box-shadow: 0 30px 60px -24px rgba(110, 72, 4, .45); }
.form { display: grid; gap: 22px; }
.form[hidden], .sent[hidden] { display: none; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 800; }
.field .optional { font-weight: 600; font-style: normal; color: var(--ink-soft); font-size: .9rem; margin-left: 6px; }
.field small { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.field input, .field select { width: 100%; min-height: 54px; padding: 12px 16px; border: 2px solid #e2d3b0; border-radius: 16px; background: var(--card); color: var(--ink); font: 600 1.08rem/1.3 var(--text); }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--coral-deep); }
.check { display: flex; gap: 12px; align-items: center; font-weight: 700; line-height: 1.45; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--ink); }
.form .button { justify-self: stretch; }
.form .fine { margin: 0; }
.form-error { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--coral-pale); color: #8a2c18; font-weight: 800; }
.form-error[hidden] { display: none; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.human-check:not(:empty) { margin: 4px 0 12px; }
.sent img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 16px; }
.sent h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.sent h2:focus { outline: none; }

/* 404 */
.lost { text-align: center; display: grid; justify-items: center; padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 120px); }
.lost img { width: 150px; margin-bottom: 12px; }
.lost .lede { margin-inline: auto; }
.lost .actions { justify-content: center; }

/* Footer ---------------------------------------------------------------------------------------------------------- */
.footer { background: var(--ink); color: #e9dcc4; margin-top: 0; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-block: 56px 64px; font-size: .98rem; }
.footer .wordmark { color: var(--page); font-size: 1.55rem; margin-bottom: 14px; }
.footer .wordmark img { width: 40px; height: 40px; border-radius: 10px; }
.footer .wordmark b { color: var(--sun); }
.footer p { margin: 0 0 6px; }
.footer a { color: var(--sun); text-decoration-color: rgba(255, 201, 61, .5); }
.footer a:hover { color: var(--page); }
.footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 10px 48px; align-content: start; }
.footer nav a { color: var(--page); text-decoration: none; }
.footer nav a:hover { color: var(--sun); }
@media (max-width: 480px) { .footer nav { grid-template-columns: 1fr 1fr; gap: 10px 20px; } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .button, .book { transition: none; } .button:hover, .book:hover { transform: none; } }
@media print { .site-header nav, .menu, .footer nav, .actions, .intro-controls { display: none; } body, .band, .blue-band { background: #fff; color: #000; } }

/* Phones and narrow windows (the pattern most sites use, Mobbin 2026-10-18): a slim header that stays at the top, a
   three-line menu button that turns into a close button, and the menu as a full-width sheet with large rows, Sign in,
   and the invitation button at the end. */
@media (max-width: 1180px) {
  .site-header { position: sticky; top: 0; z-index: 20; }
  .topbar { min-height: 68px; padding-block: 10px; }
  html:has(.menu[open]) .site-header { box-shadow: 0 1px 0 var(--line); }
  .wordmark { font-size: 1.5rem; }
  .wordmark img { width: 40px; height: 40px; }
  .menu summary { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--card); }
  .has-band .menu summary { background: rgba(255, 255, 255, .55); }
  .menu summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .menu-icon { position: relative; width: 22px; height: 16px; display: block; }
  .menu-icon span { position: absolute; left: 0; right: 0; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease, top .2s ease; }
  .menu-icon span:nth-child(1) { top: 0; }
  .menu-icon span:nth-child(2) { top: 6.75px; }
  .menu-icon span:nth-child(3) { top: 13.5px; }
  .menu[open] .menu-icon span:nth-child(1) { top: 6.75px; transform: rotate(45deg); }
  .menu[open] .menu-icon span:nth-child(2) { opacity: 0; }
  .menu[open] .menu-icon span:nth-child(3) { top: 6.75px; transform: rotate(-45deg); }
  .menu-links { position: fixed; top: 68px; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
    padding: 8px var(--gutter) max(24px, env(safe-area-inset-bottom)); background: var(--page); overflow-y: auto; overscroll-behavior: contain; }
  .menu-links a { display: flex; align-items: center; min-height: 58px; padding: 0 4px; border-bottom: 1px solid var(--line);
    font-size: 1.25rem; font-weight: 800; color: var(--ink); text-decoration: none; }
  .menu-links a:hover { color: var(--blue); }
  .menu-links a[aria-current="page"] { box-shadow: inset 5px 0 0 var(--coral); padding-left: 16px; }
  .menu-links .button { justify-content: center; margin-top: 24px; min-height: 56px; border-bottom: 0; color: var(--page); font-size: 1.1rem; }
  .menu-links .button:hover { color: var(--page); }
  html:has(.menu[open]) { overflow: hidden; }
}
@media (max-width: 1180px) and (prefers-reduced-motion: reduce) { .menu-icon span { transition: none; } }
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .actions .button { flex: 1 1 100%; }
  .home-hero .demo { justify-items: stretch; width: 100%; }
  .home-hero .demo .button { width: 100%; }
  .intro-controls { right: 12px; }
  .cta-band .actions { width: 100%; }
}
.book-main .about-numbers > h2.label { font: 800 .85rem/1.3 var(--text); letter-spacing: .12em; }
