@media print {
  /* Force light background — dark palette doesn't print */
  * {
    background: #ffffff !important;
    color: #1a1d27 !important;
    border-color: #c8cdd8 !important;
    box-shadow: none !important;
  }

  /* Hide chrome */
  .sidebar,
  .main-header,
  .toc-rail,
  .page-nav,
  .code-copy-btn,
  .theme-toggle,
  .search-trigger,
  .sidebar-user,
  .site-switcher {
    display: none !important;
  }

  /* Full width content */
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  .content-inner { max-width: 100% !important; }
  .content-with-toc { display: block !important; }

  /* Ensure links show URL */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #6b7085 !important;
  }

  /* Don't annotate internal anchor links */
  a[href^="#"]::after { content: ""; }

  /* Code blocks */
  pre, code {
    border: 1px solid #c8cdd8 !important;
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Page breaks */
  h2, h3 { page-break-after: avoid; }
  pre, table { page-break-inside: avoid; }
}
