/* ============================================================
   FLAVOR THEME — print.css (Point #30)
   Ink-friendly printing / "Save as PDF": strip the site chrome,
   force a clean single-column black-on-white document, expose
   link destinations, and avoid ugly page breaks. Loaded as a
   normal stylesheet — the @media print guard scopes it to print.
   ============================================================ */
@media print {
  /* Page box */
  @page { margin: 1.8cm; }

  /* Neutralize colours/effects AND reveal any JS-gated content
     (.scroll-reveal / .stagger-item start at opacity:0 until the
     IntersectionObserver fires — below-the-fold sections would
     otherwise print blank). */
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.5;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide all site chrome, interactive and decorative elements */
  .site-header, .nav-desktop, .hamburger,
  .mobile-overlay, .mobile-drawer, .skip-link,
  .site-footer, .back-to-top, .reading-progress,
  .theme-toggle, .breadcrumbs, .toc-sidebar,
  .share-buttons, .cta-section, .pagination,
  #rgpd-banner, .no-print {
    display: none !important;
  }

  /* Full-width, single-column content */
  .main-content { padding-top: 0 !important; min-height: 0 !important; }
  .container, .content-narrow, .content-wide,
  .article-main, .prose, .section, article {
    max-width: 100% !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }
  .article-layout { display: block !important; }

  /* Typography & page-break behaviour */
  .prose { font-size: 12pt; line-height: 1.6; }
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  p, li, blockquote { orphans: 3; widows: 3; }
  pre, blockquote, table, figure, img {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  img { max-width: 100% !important; height: auto !important; }

  /* Keep structural borders legible in black & white */
  .prose table, .prose th, .prose td,
  .prose pre, .prose code {
    border: 1px solid #999 !important;
  }
  .prose blockquote { border-inline-start: 3px solid #000 !important; }
  .prose th { background: #eee !important; }

  /* Links: black + underlined; expose the destination URL for content
     links (skip in-page anchors and javascript: to avoid noise). */
  a { color: #000 !important; text-decoration: underline; }
  .prose a[href]:not([href^="#"]):not([href^="javascript:"])::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: normal;
    word-break: break-all;
    color: #333 !important;
  }
  abbr[title]::after { content: " (" attr(title) ")"; }
}
