/*
 * Print stylesheet. Loaded with media="print" (functions.php).
 *
 * PRESERVED PRINT RULES per docs/legacy-dom-contract.md row 29-33 and row
 * 35: the table/list/bingo/checklist rules below are copied verbatim from
 * the original art-crawl.html <style> block (same selectors: .print-sheet,
 * .ps-hd, .pad, .bingo, .chk, .hunt, .pimg, .pimg-s, .pstamp, .colorpage
 * svg, .addr-note) — printSheet() in route-app.js depends on this output
 * looking right, and none of it has been rewritten.
 *
 * THE ONE INTENTIONAL ADAPTATION (row 35): the original rule
 * `header,main,footer{display:none!important}` selected the legacy file's
 * bare tag-name chrome. The new theme's top-level wrapper elements are
 * `.nac-header`, `.nac-main`, `.nac-footer` (see header.php/footer.php), so
 * the hide-everything-except-the-active-sheet rule below targets those
 * instead — this is a required, documented adaptation, not an oversight.
 */
@media print {
  .nac-header,
  .nac-main,
  .nac-footer,
  .nac-nav,
  .nac-mobile-menu,
  .nac-hero__illustration,
  .nac-admin-preview-banner {
    display: none !important;
  }
  /*
   * PHASE 2.1 FIX (docs/phase-2-1-remediation-report.md): the admin-only
   * preview banner (inc/preview.php) is fixed-position chrome that exists
   * ONLY while viewing ?nac_preview=front-page as an administrator — it has
   * no equivalent on the live site at all. Explicitly hiding it here means
   * it can never appear in a browser print preview, a printed route/kids
   * sheet, or a PDF saved from the print dialog, regardless of which sheet
   * is active. The WP admin toolbar (#wpadminbar) is already hidden on
   * print by WordPress core's own admin-bar stylesheet — confirmed live,
   * not assumed, in docs/phase-2-1-remediation-report.md.
   */
  body { background: #fff; color: #111; }
  .print-sheet.on { display: block; color: #111; font-family: Georgia, serif; }
  .ps-hd { text-align: center; border-bottom: 3px double #111; padding-bottom: 10px; margin-bottom: 12px; }
  .ps-hd h1 { font-size: 20pt; letter-spacing: 0.08em; font-family: Georgia, serif; }
  /* ABOUT H1 CORRECTION (2026-09-13): sheet titles are <p class="ps-title"> now
   * (one semantic <h1> per page); render them exactly as the h1 rule did,
   * including the UA heading defaults (bold, block, 0.67em margins). */
  .ps-hd .ps-title { display: block; font-size: 20pt; font-weight: bold; letter-spacing: 0.08em; font-family: Georgia, serif; margin: 0.67em 0; }
  .ps-hd p { font-size: 9.5pt; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .print-sheet th, .print-sheet td { border: 1px solid #999; padding: 5px 7px; text-align: left; vertical-align: top; }
  .print-sheet th { background: #eee; font-size: 8pt; text-transform: uppercase; }
  .pstamp { display: inline-block; width: 30px; height: 30px; border: 2px dashed #777; border-radius: 50%; }
  .pad { border: 1.5px solid #111; padding: 9px 12px; margin: 10px 0; text-align: center; font-size: 9pt; }
  .pad strong { display: block; }
  .print-sheet tr, .print-sheet li { page-break-inside: avoid; break-inside: avoid; }
  .pimg { width: 70pt; height: 52pt; object-fit: cover; border: 1px solid #999; display: block; }
  .pimg-s { width: 56pt; height: 42pt; object-fit: cover; border: 1px solid #999; flex-shrink: 0; margin-right: 8pt; }
  .chk li { display: flex; align-items: center; }
  .chk li.dh { display: block; }
  .addr-note { font-size: 8pt; color: #555; margin-top: 4px; font-style: italic; }
  .bingo { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .bingo td { border: 2px solid #111; height: 86px; text-align: center; font-size: 9.5pt; padding: 4px; }
  .hunt li, .chk li { font-size: 11pt; padding: 7px 0; list-style: none; border-bottom: 1px dotted #999; }
  .hunt li:before { content: "◻ "; font-size: 13pt; }
  .chk li.dh:before { content: ""; }
  .chk li.dh { border-bottom: 2.5px solid #111; font-size: 12.5pt; margin-top: 10px; letter-spacing: 0.06em; }
  .chk li:before { content: "◻ "; font-size: 13pt; }
  .colorpage svg { width: 100%; height: auto; }
}

/* ---------- D0 CORRECTIONS (2026-09-13): coloring pages + challenge board ---------- */
@media print {
  @page { margin: 0.45in; }
  /* Coloring: one drawing per page, the SVG fills the sheet. */
  .nac-coloring-sheet__page { page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid; }
  .nac-coloring-sheet__page:last-child { page-break-after: auto; break-after: auto; }
  .nac-coloring-sheet__head { display: flex; justify-content: space-between; align-items: baseline; font-family: Georgia, serif; font-size: 11pt; margin: 0 0 6pt; }
  .nac-coloring-sheet__title { font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; }
  .nac-coloring-sheet__page svg { width: 100%; height: auto; max-height: 8.9in; display: block; }
  /* Challenge board */
  .nac-challenge__intro { display: flex; gap: 14pt; align-items: flex-start; margin-bottom: 10pt; font-size: 9.5pt; }
  .nac-challenge__team { flex: 0 0 44%; border: 1.5px solid #111; padding: 8pt 10pt; }
  .nac-challenge__team p { margin: 0 0 6pt; }
  .nac-challenge__howto { flex: 1; margin: 0; padding-left: 16pt; }
  .nac-challenge__howto li { margin-bottom: 4pt; }
  .nac-challenge__days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; }
  .nac-challenge__day { border: 2px solid #111; border-radius: 8pt; padding: 8pt 10pt; page-break-inside: avoid; break-inside: avoid; }
  .nac-challenge__day-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid #111; padding-bottom: 4pt; margin-bottom: 5pt; }
  .nac-challenge__day-num { font-size: 15pt; font-weight: bold; letter-spacing: 0.08em; }
  .nac-challenge__day-where { font-size: 9pt; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; }
  .nac-challenge__wall, .nac-challenge__mission { font-size: 9.5pt; margin: 0 0 4pt; line-height: 1.35; }
  .nac-challenge__proof { display: flex; gap: 8pt; margin-top: 6pt; }
  .nac-challenge__photo { flex: 1; height: 92pt; border: 1.5px dashed #777; display: flex; align-items: flex-end; justify-content: center; font-size: 7.5pt; color: #777; padding-bottom: 3pt; }
  .nac-challenge__signoff { flex: 0 0 92pt; display: flex; flex-direction: column; align-items: center; gap: 3pt; font-size: 7.5pt; text-align: center; }
  .nac-challenge__stamp { display: block; width: 44pt; height: 44pt; border: 2.5px dashed #111; border-radius: 50%; }
  .nac-challenge__sig { margin-top: auto; font-size: 7.5pt; }
  .nac-challenge__finish { display: flex; gap: 14pt; align-items: center; margin: 12pt 0 6pt; page-break-inside: avoid; break-inside: avoid; }
  .nac-challenge__tally { flex: 1; border: 2px solid #111; padding: 10pt; font-size: 10pt; display: flex; flex-direction: column; gap: 6pt; }
  .nac-challenge__tally-boxes { display: flex; gap: 6pt; }
  .nac-challenge__tally-boxes i { display: block; width: 22pt; height: 22pt; border: 2px solid #111; border-radius: 4pt; }
  .nac-challenge__badge { flex: 0 0 150pt; text-align: center; font-size: 8pt; }
  .nac-challenge__badge svg { width: 120pt; height: 120pt; display: block; margin: 0 auto 4pt; }
}
