/* Children's-book style helpers for site, PDF, and EPUB */

:root {
  --page-max-width: 38rem;
  --page-margin-block: 3rem;
  --page-line-height: 1.7;
}

/* Page-like block for story pages */
.page {
  max-width: var(--page-max-width);
  margin: var(--page-margin-block) auto;
  font-size: 1.25rem;
  line-height: var(--page-line-height);
}

.page h1,
.page h2,
.page h3 {
  line-height: 1.25;
}

/* Larger, friendlier text for single-sentence lines */
.big {
  font-size: 1.5rem;
}

/* Center helpers */
.center {
  text-align: center;
}

/* Images that should stretch edge-to-edge in the page area */
img.fullbleed {
  width: 100%;
  display: block;
}

/* A wide illustration block (e.g., a two-page spread look on web) */
.spread {
  display: block;
  margin: 2rem auto;
  text-align: center;
}

/* Manual page break hook for PDF/print */
.page-break {
  break-after: page;
  page-break-after: always;
}

/* Hero page with text overlay at bottom */
.hero-page {
  position: relative;
}
.hero-page img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 70%);
  color: #fff;
  padding: 1rem 1.25rem;
  line-height: 1.6;
}

.openblock.page.hero-page .paragraph.hero-caption.small { /* role-sized caption */
  font-size: 18px !important; /* 50% larger than 12px */
  line-height: 1.5 !important;
}
.paragraph.hero-caption.small p {
  font-size: inherit !important; /* inherit 12px from container */
  line-height: 1.6 !important;
  /* Outline for readability over images */
  -webkit-text-stroke: 0.5px rgba(0,0,0,0.6) !important;
  text-shadow: 0 0 2px rgba(0,0,0,0.7), 0 1px 2px rgba(0,0,0,0.7), 1px 0 2px rgba(0,0,0,0.7), 0 -1px 2px rgba(0,0,0,0.7), -1px 0 2px rgba(0,0,0,0.7) !important;
  margin: 0;
}
@media (prefers-color-scheme: light) {
  .hero-caption { color: #fff; }
}
@media (prefers-color-scheme: dark) {
  .hero-caption { color: #f7f7f7; }
}

@media print {
  body {
    font-size: 18px;
    line-height: 1.7;
  }
}


