/* Print stylesheet (Implementation Unit U7). Linked with media="print", so these rules
 * apply only when the reader uses "Download PDF" (window.print()) or the browser print
 * dialog. Brand fonts come from colors_and_type.css's local @font-face (linked for all
 * media) — no Google Fonts dependency in the printed output (R8). Token-only; no raw hex.
 *
 * Page numbers use paged-media margin boxes where the engine supports them (Prince,
 * Paged.js); Chromium ignores margin-box content, so page numbers are best-effort — see
 * the plan's Open Questions. */

@page {
  margin: 18mm 16mm 20mm;
  @bottom-right { content: counter(page); color: var(--aq-gray); font-size: 10px; }
}

/* Screen-only chrome is removed from the printed book. */
.booknav,
.skip-link,
.download-pdf { display: none !important; }

/* The single-page layout becomes a normal flow for print. */
body.book-layout { display: block; }
.book { max-width: none; margin: 0; padding: 0; }

/* Cover on its own page, then the table of contents, then one section per page. */
.book-cover { break-after: page; }
.print-toc { display: block; break-after: page; }
.book-section { break-before: page; break-inside: avoid-page; overflow: visible; }

/* Interactive specimens can't print — show the labeled link in place of the iframe. */
.embed iframe { display: none !important; }
.embed::after { content: none !important; }
.embed-fallback { display: block !important; color: var(--aq-purple); }

/* Keep ink reasonable and avoid clipped wide content in print. */
.md-content pre { white-space: pre-wrap; word-break: break-word; }
.book-section { box-shadow: none; }
