/* Reading and vocabulary layouts in the shared crayon palette. */
body.content-page { --page-tint: var(--paper-deep); font-size: 17px; }
body.content-page .wrap { width: min(1160px, calc(100% - 48px)); }
body.content-page main { padding: 0 0 72px; width: auto; margin: 0; }
body.content-page h1, body.content-page h2, body.content-page h3 {
  font-family: Rubik, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
body.content-page h1 { font-size: clamp(2rem, 4.3vw, 3.6rem); line-height: 1.2; color: var(--ink); margin: 0 0 20px; }
body.content-page h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.35; margin: 48px 0 18px; }
body.content-page h3 { font-size: 1.15rem; line-height: 1.5; }
body.content-page p { margin: 0 0 20px; }
body.content-page :is(h2, h3, li[id]) { scroll-margin-top: 112px; }
body.content-page :lang(en) { direction: ltr; unicode-bidi: isolate; }
body.content-page .crumbs { padding: 22px 0; font-size: .82rem; }
body.content-page .crumbs ol { margin: 0; padding: 0; }
body.content-page .crumbs li { margin: 0; }
body.content-page .logo small { font-family: 'Varela Round', sans-serif; }
body.content-page .nav-toggle:focus-visible + .nav-button { outline: 3px solid #426B38; outline-offset: 4px; }
body.content-page header nav a[data-section] { background: var(--paper-deep); }
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: clamp(24px, 4vw, 52px);
  margin-bottom: 40px;
  background: var(--page-tint);
  border: 1.5px solid var(--ink);
  border-radius: 28px 22px 32px 24px / 24px 30px 22px 28px;
  box-shadow: 4px 5px 0 transparent;
}
.page-hero .lead { max-width: 58ch; font-size: 1.08rem; line-height: 1.85; color: var(--ink-soft); margin: 0; }
.page-hero .eyebrow { margin: 0 0 16px; color: var(--navy); font: 1.2rem/1.6 GveretLevin, 'Varela Round', sans-serif; }
.page-meta { color: var(--ink-soft); font-size: .8rem; margin-top: 18px !important; margin-bottom: 0 !important; }
.reading-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 56px; }
.reading-content { min-width: 0; max-width: 760px; }
.reading-content > :first-child, .reading-content > article > :first-child { margin-top: 0; }
.page-toc { position: sticky; top: 110px; max-height: calc(100svh - 130px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.page-toc > p { margin-bottom: 12px; font-size: .85rem; font-weight: bold; }
.page-toc ol { list-style: none; padding: 0; margin: 0; }
.page-toc li { margin: 0; }
.page-toc a { display: block; padding: 8px 0; text-decoration: none; font-size: .85rem; line-height: 1.5; color: var(--ink-soft); }
.page-toc a:hover { color: var(--navy); text-decoration: underline; }
.page-toc li + li { border-top: 1px solid var(--line); }
body.content-page .note { border: 1px solid var(--line); border-radius: 20px; box-shadow: none; padding: 24px; background: var(--card); }
body.content-page .caveat { padding: 22px 24px; background: var(--paper-deep); border-inline-start: 4px solid var(--navy); border-radius: 0 16px 16px 0; }
body.content-page .caveat p:last-child { margin: 0; }
body.content-page details { padding: 0 24px; border: 1px solid var(--line); border-radius: 18px; margin: 18px 0; background: var(--card); }
body.content-page summary { padding: 20px 0; line-height: 1.6; }
body.content-page details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
body.content-page .cards { gap: 22px; margin-block: 24px 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.content-page .cards a { padding: 24px; }
body.content-page .cards a strong { font-family: Rubik, Arial, sans-serif; font-size: 1.2rem; margin-bottom: 10px; }
body.content-page .cards a > span { line-height: 1.8; }
body.content-page .cards a::after { content: '←'; display: block; font-size: 1.4rem; margin-top: 14px; }
body.content-page .topic-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.content-page .topic-cards a { border-color: var(--line); border-radius: 22px 28px 20px 26px; }
body.content-page .topic-cards .topic-label { display: block; width: fit-content; margin-bottom: 22px; padding: 2px 12px; background: var(--paper-deep); border-radius: 50% 18% 45% 22%; font: 2rem/1.35 PatrickHand, sans-serif; color: var(--navy); }
body.content-page .topic-cards li:nth-child(2n) .topic-label { background: #F3E8BD; }
body.content-page .topic-cards li:nth-child(3n) .topic-label { background: #e3efc9; }
.page-topic .page-hero { margin-bottom: 24px; padding-block: 28px; }
body.content-page.page-topic h1 { font-size: clamp(2rem, 3.7vw, 3rem); }
.page-topic .page-hero .lead { max-width: 75ch; }
.lesson-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.lesson-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: .9rem; background: var(--card); }
.lesson-nav a:hover { background: var(--paper-deep); }
body.content-page .words { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 20px 0 48px; }
body.content-page .word { padding: 24px; display: flex; flex-direction: column; min-width: 0; }
body.content-page .word img { background: var(--page-tint); margin-bottom: 20px; }
body.content-page .word h3 { font-family: 'Varela Round', sans-serif; font-size: 1.65rem; line-height: 1.3; margin: 0 0 14px; }
body.content-page .word h3 .he { margin-top: 6px; }
body.content-page .word h3 > [lang="en"] { display: block; font-weight: bold; text-align: start; }
body.content-page .word .sense { font-size: .85rem; text-align: left; }
body.content-page .word .sense > span { display: block; }
body.content-page .word .example { font-size: .9rem; flex: 1; }
body.content-page .word .example .en { text-align: left; }
body.content-page .word .example .he { margin-top: 6px; }
body.content-page .word audio { min-width: 0; max-width: 100%; direction: ltr; }
body.content-page .word .listen-label { font-size: .75rem; }
body.content-page .word-anchor { display: grid; place-items: center; width: 132px; height: 132px; margin: 0 auto 20px; border-radius: 18px; background: var(--page-tint); font: 800 2.4rem Rubik, sans-serif; color: var(--navy); }
.lesson-notes { max-width: 760px; margin-inline: auto; }
.topic-food { --page-tint: #F3E8BD; }
.topic-home { --page-tint: #e3efc9; }
.topic-school { --page-tint: #eee5fa; }
.topic-body { --page-tint: #ffeadc; }
.topic-family { --page-tint: #f8e2ac; }
.page-guide { --page-tint: #e3efc9; }
.page-about { --page-tint: #F3E8BD; }
.page-about .reading-content { margin-inline: auto; }
.page-hub main > .wrap > p, .page-hub main > .wrap > ol:not(.cards) { max-width: 760px; }
.page-science .page-hero { background: var(--navy); }
.page-science .page-hero :is(h1, .eyebrow) { color: var(--card); }
.page-science .page-hero :is(.lead, .page-meta) { color: var(--paper-deep); }
body.content-page .refs { direction: ltr; text-align: left; font-size: .85rem; padding: 24px 24px 24px 40px; border-radius: 18px; background: var(--paper-deep); }
body.content-page .refs li { padding-left: 4px; }
body.content-page .about-photo { max-width: 540px; margin: 32px auto; }
body.content-page .about-photo img { border: 1px solid var(--line); border-radius: 24px; box-shadow: 8px 10px 0 #F3E8BD; }
body.content-page .about-photo figcaption { font-size: .8rem; margin-top: 18px; }
.steps-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0 0 40px; counter-reset: steps; }
.steps-overview li { padding: 24px; border-radius: 20px; background: var(--paper-deep); counter-increment: steps; }
.steps-overview li:nth-child(2) { background: #F3E8BD; }
.steps-overview li:nth-child(3) { background: #e3efc9; }
.steps-overview li::before { content: '0' counter(steps); display: block; font: 2rem PatrickHand, sans-serif; color: var(--navy); margin-bottom: 12px; }
.steps-overview strong { display: block; font-family: Rubik, sans-serif; margin-bottom: 6px; }
.steps-overview span { font-size: .9rem; }
.game-preview { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 28px; padding: 24px; margin: 0 0 36px; border-radius: 24px; background: var(--paper-deep); }
.game-preview video { display: block; width: 100%; height: auto; margin-inline: auto; border-radius: 20px; background: var(--ink); }
.game-preview figcaption { font-size: 1rem; }
.game-preview figcaption strong { display: block; font-family: Rubik, sans-serif; font-size: 1.5rem; margin-bottom: 14px; }
.game-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.game-list li { padding: 24px; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; font-size: .95rem; }
.game-list strong:first-child { display: block; font-family: Rubik, sans-serif; margin-bottom: 10px; }
body.content-page .next-step { margin: 56px 0 0; padding: 28px; border-radius: 24px; background: #F3E8BD; }
.next-step p { font-family: Rubik, sans-serif; font-size: 1.3rem; }
.next-step > a:not(.btn) { display: inline-flex; min-height: 44px; align-items: center; margin: 16px 0 0; }
body.content-page .button { border: 1px solid var(--ink); border-radius: 14px; background: var(--sunshine); box-shadow: 0 4px 0 var(--ink); color: var(--ink); white-space: normal; overflow-wrap: anywhere; }
.page-legal .page-hero { margin-top: 30px; padding: 32px; }
.page-legal .page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-legal .meta { font-size: .8rem; color: var(--ink-soft); margin: 0; }
.page-legal .reading-content { overflow-wrap: anywhere; }
.page-legal table { font-size: .9rem; }
.page-legal .page-toc a { font-size: .8rem; padding-block: 7px; }
.page-legal ol li { margin-bottom: 14px; }
body.content-page footer.site { margin-top: 0; padding: 44px 0 30px; background: var(--paper-deep); font-size: .85rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.footer-brand { font: 800 1.5rem Rubik, sans-serif; text-decoration: none; }
body.content-page footer.site .footer-links { gap: 8px 24px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
body.content-page footer.site a { display: inline-flex; align-items: center; min-height: 44px; }
body.content-page footer.site p { max-width: 85ch; font-size: .8rem; }
.page-not-found .page-hero { margin-top: 36px; }
.page-invite { min-height: 100svh; background: var(--paper); }
.page-invite main { width: min(100%, 480px); padding: 40px 28px; border: 1px solid var(--ink); border-radius: 28px; box-shadow: 8px 10px 0 transparent; background: var(--card); }
body.page-invite h1 { font-family: Rubik, Arial, sans-serif; font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.3; color: var(--ink); }
.page-invite p { color: var(--ink-soft); line-height: 1.8; }
.page-invite a { border: 1px solid var(--ink); border-radius: 14px; background: var(--sunshine); color: var(--ink); }
.page-invite a.secondary { background: var(--paper-deep); }
.page-invite .error { color: var(--wrong-text); }
.page-invite .mark img { width: 76px; height: 66px; object-fit: contain; }
.page-invite noscript p { padding: 14px; border-radius: 12px; background: #F3E8BD; }
@media (max-width: 1000px) {
  .reading-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  body.content-page .words, body.content-page .topic-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body.content-page .wrap { width: calc(100% - 36px); }
  body.content-page .page-hero { grid-template-columns: 1fr; gap: 20px; border-radius: 22px; }
  .page-hero .lead { font-size: 1rem; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .page-toc { position: static; max-height: none; padding: 20px; }
  .page-toc ol { columns: 2; column-gap: 24px; }
  .page-toc li { break-inside: avoid; }
  body.content-page .steps-overview { grid-template-columns: 1fr; }
  .steps-overview li { padding: 20px; margin: 0; }
  .steps-overview li::before { float: inline-end; margin-inline-start: 16px; }
  body.content-page .game-list { grid-template-columns: 1fr; }
  .game-preview { grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 20px; }
  .page-legal .page-hero { padding: 24px; }
}
@media (max-width: 540px) {
  body.content-page { font-size: 16px; }
  body.content-page .page-hero { padding: 24px; margin-bottom: 24px; }
  body.content-page .words, body.content-page .topic-cards, body.content-page .cards { grid-template-columns: minmax(0, 1fr); }
  body.content-page .word { padding: 24px; }
  body.content-page .word audio { max-width: 100%; }
  body.content-page h2 { margin-top: 36px; }
  .page-toc ol { columns: 1; }
  .page-legal .page-toc ol { columns: 2; }
  body.content-page .logo { font-size: 1.1rem; }
  body.content-page .logo small { display: none; }
  body.content-page .next-step { padding: 24px; }
  body.content-page .btn { padding: 14px 20px; font-size: .95rem; }
  .game-preview { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .game-preview video { width: min(100%, 180px); }
}
@media print {
  body.content-page header, body.content-page footer, .page-toc, .lesson-nav, .next-step, body.content-page audio { display: none; }
  body.content-page, body.content-page .page-hero { background: white; color: black; }
  body.content-page .page-hero :is(h1, .lead, .eyebrow, .page-meta) { color: black; }
  body.content-page .wrap, .reading-content { width: 100%; max-width: none; }
  .reading-layout { display: block; }
  body.content-page .words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.content-page .word { break-inside: avoid; box-shadow: none; }
}

body.content-page { --page-tint:var(--paper-deep); }
body.content-page .page-hero { box-shadow:none; background-image:url(/assets/brand/paper.svg); }
body.content-page .button { box-shadow:none; background:var(--sunshine) url(/assets/brand/wax.svg); }
