/* ==========================================================================
   Print styles — replaces the mkdocs-print-site plugin.
   Lets readers use the browser's native "Print -> Save as PDF" on any page
   with a clean, content-only layout (no chrome, no interactive elements).
   ========================================================================== */

@media print {
  /* Hide site chrome and interactive-only elements */
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-sidebar--primary,
  .md-sidebar--secondary,
  .md-nav,
  .md-footer,
  .md-top,
  .md-feedback,
  .md-search,
  .md-banner,
  .md-content__button,
  .md-source,
  .md-dialog,
  .card-filter-wrapper {
    display: none !important;
  }

  /* Let content use the full page width */
  .md-main__inner,
  .md-content,
  .md-content__inner,
  .md-grid {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* Keep code, tables, and admonitions from being clipped across pages */
  .md-typeset pre,
  .md-typeset table,
  .md-typeset .admonition,
  .md-typeset details,
  .md-typeset .grid.cards > ul > li {
    break-inside: avoid;
    overflow: visible !important;
  }

  .md-typeset pre > code {
    white-space: pre-wrap !important;
    word-break: break-word;
  }

  /* Avoid orphaned headings at the bottom of a page */
  .md-typeset h1,
  .md-typeset h2,
  .md-typeset h3,
  .md-typeset h4 {
    break-after: avoid;
  }

  /* Expand the URL after external links so printouts remain useful */
  .md-typeset a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    word-break: break-all;
    color: #555;
  }

  /* Ensure backgrounds/brand colors render in print */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
