/* Children's Liturgy Guide — site.css
 * WCAG-AA accessibility baseline (frozen B2-M1-P2, decision A-031).
 *
 * Contrast ratios (WCAG 2.1 relative luminance formula):
 *   Body text  #1a1a1a on #ffffff:  16.6:1  (AA body requires 4.5:1)  ✓
 *   Links      #0b5fad on #ffffff:   6.8:1  (AA body requires 4.5:1)  ✓
 *   Visited    #7a4fa3 on #ffffff:   6.0:1  (AA body requires 4.5:1)  ✓
 *   Focus      #005fcc on #ffffff:   5.7:1  (AA non-text requires 3:1) ✓
 *   Meta/muted #444444 on #ffffff:   9.7:1  (AA body requires 4.5:1)  ✓
 */

/* ── Reset / base ───────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;        /* 16px in all major browsers */
  line-height: 1.6;
  color: #1a1a1a;         /* 16.6:1 on #ffffff ✓ */
  background-color: #ffffff;
}

/* ── Skip link (visually hidden until focused) ───────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #005fcc;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  z-index: 100;
}

/* ── Focus styles (global) ───────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid #005fcc; /* 5.7:1 on #ffffff ✓ */
  outline-offset: 2px;
}

/* ── Links ───────────────────────────────────────────────────────────────── */

a {
  color: #0b5fad;           /* 6.8:1 on #ffffff ✓ */
  text-decoration: underline;
}

a:visited {
  color: #7a4fa3;           /* 6.0:1 on #ffffff ✓ */
}

a:hover,
a:focus {
  text-decoration: none;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

header,
main,
footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

header {
  border-bottom: 1px solid #d0d0d0;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d0d0d0;
  font-size: 0.875rem;
  color: #444444;           /* 9.7:1 on #ffffff ✓ */
}

.site-footer {
  margin: 0;
}

/* ── Subtle / contextual links ────────────────────────────────────────────
 * Links that sit inside dense or contextual surfaces — footer, breadcrumbs,
 * the cycle/season meta line on guide pages, and the section headings on the
 * all-guides index — read as plain text at rest (inherit color, no underline)
 * and reveal as links on :hover and :focus-visible (accent color + underline,
 * overriding the global "underline-off-on-hover" rule for body links).
 *
 * Why subtle-at-rest: the standard `a` blue/underline shouts at the reader
 * inside a footer paragraph or a breadcrumb strip; users orient by structure
 * (separator chars, parent nav landmark, surrounding labels) rather than by
 * per-link decoration. Distinctness returns on interaction.
 *
 * Contrast ratios (WCAG 2.1):
 *   Rest    inherited from parent (footer #444444 = 9.7:1; meta #444444 = 9.7:1;
 *           heading #1a1a1a = 16.6:1) — all AA ✓
 *   Hover   #0b5fad on #ffffff:  6.8:1  (AA ✓)
 */
footer a,
.breadcrumb a,
.cycle-season a,
.guides-index .cycle-block > h2 a,
.guides-index .season-block > h3 a {
  color: inherit;
  text-decoration: none;
}

footer a:hover, footer a:focus-visible,
.breadcrumb a:hover, .breadcrumb a:focus-visible,
.cycle-season a:hover, .cycle-season a:focus-visible,
.guides-index .cycle-block > h2 a:hover,
.guides-index .cycle-block > h2 a:focus-visible,
.guides-index .season-block > h3 a:hover,
.guides-index .season-block > h3 a:focus-visible {
  color: #0b5fad;
  text-decoration: underline;
}

/* Breadcrumb strip: small, muted, below the page <h1>. */
.breadcrumb {
  color: #444444;
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
}

/* ── Site header inner flex layout (logo + title/nav) ───────────────────── */

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-content {
  min-width: 0; /* allow flex child to shrink on narrow viewports */
}

/* Logo: intrinsic 180×180px PNG constrained to header scale via CSS.
 * width/height attributes on the <img> match the source PNG to prevent CLS.
 * Height tuned to read as a banner-scale mark next to the site title. */
.site-logo {
  height: 64px;
  width: auto;
  flex-shrink: 0;
}

/* ── Site name ───────────────────────────────────────────────────────────── */

.site-name {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

.site-name a {
  color: #1a1a1a;
  text-decoration: none;
}

.site-name a:hover,
.site-name a:focus {
  text-decoration: underline;
}

/* ── Primary nav ─────────────────────────────────────────────────────────── */

.site-nav {
  margin-top: 0.5rem;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  color: #0b5fad;
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a:focus {
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: none;
}

/* ── Homepage CTA ────────────────────────────────────────────────────────── */

.cta {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
}

/* ── Homepage prev/current/next widget (B2-M2-P4) ─────────────────────────
 * The widget intentionally reuses guide-page styles (.cycle-season,
 * .topic-title, .reading-attribution / .citation, plain <h3>Summary</h3>)
 * so the card visually matches an individual guide page. The widget-specific
 * rules below are limited to the prev/next nav bar, the card frame, and the
 * day-name heading.
 */

.guide-widget {
  margin-top: 1.75rem;
}

/* Prev / next top bar — two columns, label-on-top day-name-below. The
 * uppercase letter-spaced label mirrors the .cycle-season treatment so the
 * meta-language is visually consistent across the page. */
.guide-widget__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: stretch;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}

.guide-widget__nav-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #1a1a1a;
  flex: 1 1 0;
  min-width: 0;
}

.guide-widget__nav-item--prev { text-align: left; }
.guide-widget__nav-item--next { text-align: right; }

.guide-widget__nav-item--empty {
  /* keeps the bar two-column when one direction is exhausted */
  flex: 1 1 0;
}

.guide-widget__nav-label {
  color: #444444;          /* 9.7:1 ✓ */
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-widget__nav-day {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;          /* body color; reads as plain text at rest */
  margin-top: 0.05rem;
}

.guide-widget__nav-item:hover .guide-widget__nav-day,
.guide-widget__nav-item:focus-visible .guide-widget__nav-day {
  color: #0b5fad;          /* 6.8:1 ✓ — link color on hover/focus only */
  text-decoration: underline;
}

/* Featured current-day card frame. */
.guide-widget__card {
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 1.25rem 1.5rem 1rem;
  background-color: #fafbfc;
}

/* Day-name heading — link-styled but in heading typography so it reads as a
 * title, not a navigation link. Mirrors how cycle/season links inside
 * `.cycle-season` inherit color and use a subtle hover signal (see
 * `.cycle-season a` rule earlier in this file). */
.guide-widget__day {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.guide-widget__day a {
  color: inherit;
  text-decoration: none;
}

.guide-widget__day a:hover,
.guide-widget__day a:focus-visible {
  color: #0b5fad;
  text-decoration: underline;
}

.guide-widget__card .cycle-season {
  margin-top: 0.2rem;
  margin-bottom: 0.75rem;
}

.guide-widget__card .topic-title {
  margin-top: 0.2rem;
}

.guide-widget__card h3 {
  /* "Summary" label sits closer to the body than the default h3 spacing. */
  margin-top: 0.9rem;
  margin-bottom: 0.25rem;
}

.guide-widget__card .reading-attribution {
  margin-bottom: 0.25rem;
}

.guide-widget__more {
  margin: 0.85rem 0 0;
  font-size: 1rem;
}

/* Narrow screens: stack the nav vertically so each direction has room for
 * the full day-name without truncation. */
@media (max-width: 540px) {
  .guide-widget__nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  .guide-widget__nav-item--next { text-align: left; }
  .guide-widget__card {
    padding: 1rem 1.1rem 0.85rem;
  }
}

/* ── Guides index ────────────────────────────────────────────────────────── */

.guides-index .cycle-block {
  margin-bottom: 1.5rem;
}

.guides-index .season-block {
  margin-top: 1rem;
}

.guide-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.25rem 0 0.5rem;
}

.guide-list li {
  margin: 0.15rem 0;
}

/* ── 404 ─────────────────────────────────────────────────────────────────── */

.not-found .read-aloud {
  font-style: italic;
}

/* ── Headings ────────────────────────────────────────────────────────────── */

h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

/* h2 — major section divider; horizontal rule underneath for clear separation */
h2 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #aaaaaa;
}

/* h3 — subsection within a section; muted color, no rule */
h3 {
  font-size: 1.0625rem;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  color: #333333;           /* 12.6:1 ✓ */
}

/* ── Guide header (day name + cycle/season + topic_title + citation) ───── */

.guide-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid #d0d0d0;
  margin-bottom: 0.5rem;
}

.guide-header h1 {
  margin-top: 0.25rem;
}

.cycle-season {
  color: #444444;           /* 9.7:1 ✓ */
  font-size: 0.9375rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topic-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0.75rem 0 0.25rem;
  line-height: 1.3;
}

.reading-attribution {
  margin: 0.5rem 0 0;
  color: #444444;           /* 9.7:1 ✓ */
  font-size: 0.9375rem;
}

.reading-attribution .citation {
  color: #1a1a1a;
  font-weight: 600;
}

/* ── Section guidance prose (under <h2>/<h3>, above content) ─────────────
 * Guidance text is secondary instructional context — clearly de-emphasized
 * vs. main content so volunteers' eyes land on what to do, not on the
 * meta-instructions.
 */
.guidance {
  color: #555555;           /* 7.5:1 ✓ */
  font-size: 0.9375rem;
  margin: 0.25rem 0 0.75rem;
}

/* ── Read-aloud script panel ─────────────────────────────────────────────
 * Distinct paneled treatment so a leader can see at a glance what is meant
 * to be read aloud vs. what is helper context. Soft warm tint + gold left
 * border + preserved whitespace.
 *
 *   Background  #fbf7ec  (soft cream)
 *   Border-left #8a5a00  (warm amber, 5.0:1 against #ffffff)
 *   Body color  #1a1a1a  (16.6:1 on #ffffff; 15.5:1 on #fbf7ec)
 */
.read-aloud {
  background-color: #fbf7ec;
  border-left: 4px solid #8a5a00;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1.25rem;
  white-space: pre-wrap;
  color: #1a1a1a;
}

/* ── Q&A blocks (warm-up + reading + application questions) ──────────────
 * Example answers are always visible but visually distinguished (italic,
 * muted color, smaller). No collapsed disclosure. Bridge gets the same
 * treatment with a labeled prefix.
 */
.qa {
  margin: 0.4rem 0 1rem;
}

.qa .q {
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
}

.qa .example {
  margin: 0.2rem 0 0;
  color: #555555;           /* 7.5:1 ✓ */
  font-style: italic;
  font-size: 0.9375rem;
}

.qa .example .example-label {
  font-style: normal;
  font-weight: 600;
}

/* Read-aloud panels may carry an inline <strong> label prefix
 * (e.g., "Bridge to the reading:" before the bridge text). */
.read-aloud strong {
  font-weight: 700;
}

/* Numbered question lists — leader-friendly enumeration, no extra
 * "Discussion" labels per question (the section h3 already says it). */
.questions {
  padding-left: 1.5rem;
  margin: 0.25rem 0 1rem;
}

.questions > li.qa {
  margin-bottom: 0.6rem;
}

.key-points {
  margin: 0.25rem 0 0.75rem 1.25rem;
}

/* ── Word search ─────────────────────────────────────────────────────────
 * 15×15 letter grid as <table>; no <th> (per A-021). No <caption> — the
 * <h2>Word Search</h2> + guidance prose already name and contextualize the
 * activity; the word_list <ul> below is the substance for non-visual users.
 */
.word-search {
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.word-search td {
  border: 1px solid #888888;
  width: 1.75rem;
  height: 1.75rem;
  text-align: center;
  vertical-align: middle;
  font-size: 1rem;
}

.word-list {
  columns: 2;
  padding-left: 1.25rem;
}

/* ── Calendar page (B2-M2-P5) ─────────────────────────────────────────────
 * USCCB-style month-grid calendar. Static scaffolding renders at build time;
 * the inline script in calendar.html populates the grid from /guide-index.json
 * on load. Days with packets link to their canonical guide; days without
 * render visibly but inactive; days outside [window.start, window.end] render
 * with a distinct dimmed treatment and a per-cell "Browse by day" affordance.
 *
 * Contrast notes:
 *   has-guide background  #eaf3fb (link-blue tint) — text #1a1a1a → 14.9:1 ✓
 *   today  border         #005fcc (matches focus ring) — 5.7:1 ✓ vs white
 *   out-of-window dim     #6b6b6b on #f3f3f3 — 5.6:1 ✓ (still AA)
 */

.calendar-page .guidance {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.calendar-root[hidden] { display: none; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.calendar-nav__label {
  flex: 1 1 auto;
  text-align: center;
  margin: 0;
  font-size: 1.25rem;
  border-bottom: none;
  padding-bottom: 0;
}

.calendar-nav__btn {
  font: inherit;
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #b0b6bd;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  min-width: 2.25rem;
}

.calendar-nav__btn:hover,
.calendar-nav__btn:focus-visible {
  border-color: #0b5fad;
  color: #0b5fad;
}

.calendar-nav__today {
  margin-left: 0.25rem;
  font-size: 0.875rem;
}

.calendar-viewport {
  position: relative;
}

.calendar-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-grid thead th {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444444;            /* 9.7:1 ✓ */
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid #d0d0d0;
  text-align: center;
}

.calendar-grid tbody td {
  vertical-align: top;
  border: 1px solid #e1e4e8;
  height: 4.5rem;
  width: 14.28%;  /* 1/7 — keeps columns equal even with light cell content */
}

/* `.calendar-cell` is applied to <td> elements — do NOT set display:block here
 * or the table layout collapses to a single column. The inner <a> (for
 * --has-guide cells) is the element that fills the cell as a click target. */
.calendar-cell {
  padding: 0.35rem 0.4rem;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #ffffff;
  position: relative;
}

.calendar-cell--blank {
  background: #fafbfc;
}

.calendar-cell__date {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
}

.calendar-cell__day-name {
  font-size: 0.75rem;
  color: #1a1a1a;
  margin-top: 0.15rem;
  /* clamp long day_names to a 2-line preview inside the cell */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Has-guide cells are tinted by liturgical color AND carry a saturated
 * left-edge stripe in the same hue. The light tint keeps the day-name
 * readable on top; the stripe is the authoritative color marker — solving
 * the "rose/violet/red light tints look too similar" problem without
 * darkening the bg into text-readability territory.
 *
 * Tints (bg, AA against body color #1a1a1a):
 *   green   #e8f5e9   15.3:1 ✓
 *   red     #ffd6d6   14.0:1 ✓
 *   violet  #f3e5f5   15.6:1 ✓
 *   rose    #fbe1ef   14.7:1 ✓
 *   white   #fffaf0   16.4:1 ✓
 *
 * Stripes use the saturated dot colors (#2e7d32 / #c62828 / #6a1b9a /
 * #e91e63 / #c2a878 for white→gold) so the hue is unambiguous at a glance.
 */
.calendar-cell--has-guide {
  background: #eaf3fb;
  box-shadow: inset 4px 0 0 0 #0b5fad;  /* default link-blue stripe */
}
.calendar-cell--color-green {
  background: #e8f5e9;
  box-shadow: inset 4px 0 0 0 #2e7d32;
}
.calendar-cell--color-red {
  background: #ffd6d6;
  box-shadow: inset 4px 0 0 0 #c62828;
}
.calendar-cell--color-violet {
  background: #f3e5f5;
  box-shadow: inset 4px 0 0 0 #6a1b9a;
}
.calendar-cell--color-rose {
  background: #fbe1ef;
  box-shadow: inset 4px 0 0 0 #e91e63;
}
.calendar-cell--color-white {
  background: #fffaf0;
  box-shadow: inset 4px 0 0 0 #c2a878;
}

.calendar-cell--has-guide a {
  display: block;
  margin: -0.35rem -0.4rem;        /* expand to fill the cell padding */
  padding: 0.35rem 0.4rem;
  color: inherit;
  text-decoration: none;
}

.calendar-cell--has-guide a:hover,
.calendar-cell--has-guide a:focus-visible {
  filter: brightness(0.94);
  text-decoration: none;
}

.calendar-cell--has-guide a:hover .calendar-cell__day-name,
.calendar-cell--has-guide a:focus-visible .calendar-cell__day-name {
  text-decoration: underline;
  color: #0b5fad;
}

.calendar-cell--no-guide {
  color: #444444;            /* 9.7:1 ✓ */
}

.calendar-cell--out {
  background: #f3f3f3;
  color: #6b6b6b;            /* 5.6:1 ✓ on #f3f3f3 */
}

/* Multi-form indicator (e.g. Christmas Vigil/Night/Dawn beyond Day).
 * Sits below the day-name link; the "+N more" link routes to the season
 * index where all forms are listed. */
.calendar-cell__alts {
  display: block;
  font-size: 0.7rem;
  color: #444444;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.calendar-cell__alts a {
  color: #0b5fad;
}

/* Partial-window notice — single banner below the grid when any day in the
 * rendered month is outside the available range. Replaces the noisy per-cell
 * "Browse by day" link that repeated on every out-of-window cell. */
.calendar-partial-notice {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #fffaf0;
  border-left: 4px solid #8a5a00;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.calendar-cell--today {
  outline: 2px solid #005fcc; /* matches global focus ring; 5.7:1 ✓ */
  outline-offset: -2px;
}

.calendar-out-panel {
  border: 1px solid #d0d0d0;
  background: #fafbfc;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.calendar-out-panel__heading {
  margin-top: 0;
  font-size: 1.0625rem;
}

.calendar-out-panel__links {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 0;
}

.calendar-legend {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #444444;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Liturgical-color dot — used in the calendar legend and on guide-page
 * `.cycle-season` meta lines. Five solid swatches with a subtle border so the
 * ivory "White" variant stays visible against the page background. */
.lit-color-dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  vertical-align: middle;
  position: relative;
  top: -0.08em;            /* nudge up to optically center against UPPERCASE */
  margin-right: 0.1em;
  border: 1px solid rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  /* Force background colors to print — most engines drop bg fills by default. */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.lit-color-dot--green  { background: #2e7d32; }
.lit-color-dot--red    { background: #c62828; }
.lit-color-dot--violet { background: #6a1b9a; }
.lit-color-dot--rose   { background: #e91e63; }
.lit-color-dot--white  { background: #fffaf0; border-color: #c2a878; }

/* Stronger guide-page variant — bigger and darker-bordered so the swatch
 * carries its own weight on the meta line rather than reading as a faint
 * accent. Same fill colors as the calendar legend dot. */
.lit-color-dot--guide-meta {
  margin-left: 0.55em;
  margin-right: 0;
  width: 0.95em;
  height: 0.95em;
  border-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

@media (max-width: 540px) {
  .calendar-grid tbody td { height: 3.4rem; }
  .calendar-cell__day-name { display: none; }
  .calendar-nav__today { display: none; }
}

/* ── Print-only / screen-only utilities ───────────────────────────────────
 * Toggle visibility between screen and print without duplicating markup.
 * `.print-only` elements are hidden on screen; `.screen-only` and the
 * `.guidance--screen-only` modifier are hidden in print. The modifier form
 * composes onto the base `.guidance` class so the on-screen typography is
 * unaffected — only the print pass excludes the marked instance.
 */
.print-only { display: none; }

/* ── Print stylesheet (B2-M2-P3) ──────────────────────────────────────────
 * Content-vs-chrome framing (A-037): UI chrome is hidden in print; content
 * survives. `.guidance` prose prints — it's content for the recipient, not
 * chrome for the screen viewer. The one exception is `.guidance--screen-only`
 * (applied to `WORD_SEARCH_GUIDANCE`), because the word search becomes a
 * standalone kid-facing handout where the guidance prose would compete with
 * the layout.
 *
 * The printed artifact is bimodal:
 *   (a) leader sheet  — session content with prep / flow / scripts / Q&A
 *   (b) kid handout   — standalone word-search page (own page-break)
 * Each carries a "ChildrensLiturgy.org" attribution at its end so either half
 * can be photocopied or handed off independently and still trace back.
 *
 * Verification target: top-aligned + horizontally-centered word-search
 * handout (no vertical-centering attempt — avoids `min-height: 100vh` +
 * flex `justify-content` interactions with forced page-breaks across engines).
 *
 * Safari verification: DEFERRED with human-authorized 48-hour post-launch
 * fix SLA (P3 ships with Chrome-only verification). Structural mitigation
 * (word search as `<table>` per A-032) is already in place from M1.
 */
@media print {
  @page { margin: 0.5in; }

  /* Hide UI chrome — content survives. */
  body > header,
  body > footer,
  .skip-link,
  .calendar-page {
    display: none !important;
  }

  /* Print/screen toggles. */
  .print-only { display: block; }
  .screen-only,
  .guidance--screen-only { display: none !important; }

  /* Base print typography — black ink on white, no link decoration. */
  body {
    color: #000;
    background: #ffffff;
    font-size: 11pt;
    line-height: 1.45;
  }
  a, a:visited { color: inherit; text-decoration: none; }

  /* Drop visual flair that exists for screen scanning; preserve typographic
   * hierarchy that carries content semantics (italic, muted color, size). */
  .read-aloud {
    background-color: transparent;
    border-left: none;
    padding: 0;
    margin: 0.4rem 0 0.9rem;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Keep heading + first content together; avoid orphan headings. */
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid-page;
  }
  h2 { border-bottom: 1px solid #888; }

  /* Print-only brand mark, top-right of the guide-header. The on-screen
   * site <header> is hidden in print (chrome); this re-introduces the
   * favicon-logo (A-035) beside the day-name <h1> so the leader sheet
   * carries visible identity without re-rendering the screen header.
   * Float-right lets the existing .guide-header children flow to the left
   * of the logo — no wrapper, no flex restructure. Scoped to the leader
   * sheet only; .word-search-handout (the kid-facing handout half of the
   * bimodal print artifact, A-037) intentionally does NOT carry this. */
  .guide-header__logo {
    float: right;
    height: 0.7in;
    width: auto;
    margin: 0 0 0.4rem 0.4in;
  }

  /* Print-only attribution placement (end of session content + bottom of
   * word-search handout). Per-page repetition via `@page` margin-box is
   * deliberately NOT pursued — Chrome's margin-box support is partial and
   * the human-authorized Safari deferral makes engine-fights costly. */
  .print-attribution {
    text-align: center;
    color: #555;
    font-size: 0.85em;
    margin-top: 1.25rem;
  }

  /* Word-search standalone handout — forced fresh page; top-aligned +
   * horizontally-centered (human-confirmed target 2026-06-09). */
  .word-search-handout {
    page-break-before: always;
    break-before: page;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* On-screen "Word Search" h2 and "Words to find" h3 step aside in print;
   * the centered topic_title carries the page-title role on the handout. */
  .word-search-handout > h2,
  .word-search-handout > h3 {
    display: none;
  }

  .word-search-handout__title {
    font-size: 1.6em;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.4rem;
  }
  .word-search-handout__citation {
    text-align: center;
    color: #444;
    margin: 0 0 1rem;
  }

  /* Centered grid; the table is small enough to fit a page — avoid
   * accidental splits. */
  .word-search-handout .word-search {
    margin: 0 auto 1rem;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Centered multi-column word bank (no bullets, no indent). Column count
   * chosen so the longest words in the corpus do not overflow at 11pt. */
  .word-search-handout .word-list {
    columns: 3;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
    max-width: 6in;
  }
}
