/* print.css — Print stylesheet: hides UI chrome, resets colours to black-on-white */

@media print {
  /* ── Hide non-content UI elements ── */
  nav,
  .sidebar,
  .sidebar-toggle,
  .sidebar-overlay,
  .toc,
  .statusbar,
  .page-nav,
  .scroll-top,
  .page-toolbar,
  .docs-footer-wrap,
  footer,
  .search-overlay,
  .shortcuts-overlay,
  .wp-modal-overlay,
  .nl-modal-overlay,
  .hero-gradient,
  .docs-hero-gradient,
  .docs-hero-grid,
  .grid-bg,
  .cta-gradient,
  .manifesto-gradient,
  .fud-gradient,
  .ra-left-gradient,
  .nav-hamburger {
    display: none !important;
  }

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

  /* ── Body: full width, black on white ── */
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-size: 11pt;
    line-height: 1.65;
    -webkit-font-smoothing: auto;
  }

  /* ── Content area: remove sidebar margin ── */
  .main,
  .content {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: 100%;
  }

  .layout {
    display: block;
    padding-top: 0;
  }

  /* ── Typography ── */
  h1 {
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 0.3rem;
  }

  h2 {
    font-size: 1.15rem;
    color: #222;
    margin-top: 1.8rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
  }

  h3 {
    font-size: 1rem;
    color: #333;
    margin-top: 1.4rem;
  }

  h4 {
    font-size: 0.9rem;
    color: #444;
    margin-top: 1.2rem;
  }

  p {
    margin: 0.6rem 0;
    color: #1a1a1a;
  }

  ul, ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
  }

  li {
    margin: 0.25rem 0;
    color: #1a1a1a;
  }

  /* ── Links: show URLs ── */
  a,
  a.xref {
    color: #333;
    text-decoration: underline;
  }

  .content a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
    word-break: break-all;
  }

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

  /* ── Code blocks ── */
  code {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 0.85em;
    background: #f3f3f3;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: #1a1a1a;
  }

  pre {
    background: #f5f5f5;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.8rem;
    border: 1px solid #e0e0e0;
    page-break-inside: avoid;
  }

  pre code {
    background: none;
    padding: 0;
  }

  /* ── Tables ── */
  table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.85rem;
    page-break-inside: avoid;
  }

  th, td {
    border: 1px solid #ccc;
    padding: 0.4rem 0.6rem;
    text-align: left;
    color: #1a1a1a;
  }

  th {
    background: #f5f5f5;
    font-weight: 600;
  }

  /* ── Breadcrumb and meta ── */
  .breadcrumb {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
  }

  .breadcrumb a {
    color: #888;
    text-decoration: none;
  }

  .breadcrumb a::after {
    content: "" !important;
  }

  .page-meta {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
  }

  .page-meta-sep {
    display: inline;
  }

  .page-meta-sep::before {
    content: " \00B7  ";
  }

  .page-meta-tags {
    font-size: 0.78rem;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 1rem;
  }

  /* ── Callouts ── */
  .callout {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    margin: 0.8rem 0;
    background: #fafafa;
    color: #1a1a1a;
  }

  /* ── Images ── */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  /* ── Prevent widows/orphans ── */
  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  blockquote {
    border-left: 2px solid #ccc;
    padding-left: 1rem;
    color: #333;
    background: none;
    page-break-inside: avoid;
  }
}
