@media print {
  /* Hide navigation and UI chrome */
  .site-header,
  .site-footer,
  .reading-progress,
  .sidebar-card .share-btns,
  .theme-toggle,
  .nav-toggle,
  .share-btn,
  .back-link {
    display: none !important;
  }

  /* Page setup */
  @page {
    margin: 2cm;
    size: A4;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Article layout — single column */
  .article-grid {
    display: block !important;
  }

  .sidebar {
    display: none !important;
  }

  .article-main {
    max-width: 100% !important;
  }

  /* Typography */
  h1 { font-size: 20pt; margin-bottom: 0.5em; }
  h2 { font-size: 14pt; margin-top: 1.5em; break-after: avoid; }
  h3 { font-size: 12pt; break-after: avoid; }

  p { orphans: 3; widows: 3; }

  /* Links — show URLs */
  .prose a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  .prose a[href^="#"]::after,
  .prose a[href^="javascript:"]::after {
    content: "";
  }

  /* Badges */
  .type-badge,
  .sev-badge,
  .sector-badge {
    border: 1px solid #999 !important;
    background: none !important;
    color: #333 !important;
    print-color-adjust: exact;
  }

  /* Sources */
  .sources-section { border-top: 1pt solid #ccc; margin-top: 1.5em; }

  /* Code blocks */
  pre, code {
    background: #f5f5f5 !important;
    border: 1pt solid #ddd !important;
    print-color-adjust: exact;
  }

  /* Page breaks */
  .related-section { break-before: page; }

  /* Borders */
  .article-header { border-bottom: 1pt solid #ccc; }
  .sources-section { border-top: 1pt solid #ccc; }
}
