/* === Print Stylesheet for nh-journal === */

@media print {
  /* Hide non-essential UI */
  .gh-head,
  .gh-foot,
  .gh-subscribe,
  .nh-toc-toggle,
  .nh-toc,
  .gh-reading-progress,
  .gh-share,
  .gh-carousel,
  .gh-comments,
  .gh-navigation,
  .gh-loadmore,
  .gh-search,
  .gh-burger,
  .gh-rss-link,
  .nh-code-copy,
  .gh-theme-toggle,
  .nh-heading-anchor,
  .nh-saved-link,
  .gh-foot-social-link,
  .nh-toc-toggle,
  .gh-research-pdf {
    display: none !important;
  }

  /* Reset layout */
  .gh-site {
    display: block;
  }

  .gh-main {
    padding: 0;
  }

  .gh-canvas {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .gh-article-header,
  .gh-content,
  .gh-article-footer {
    grid-column: 1 / -1;
    max-width: none;
  }

  /* Typography for print */
  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
  }

  h1, h2, h3, h4 {
    color: #000;
    page-break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  /* Show URLs for links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #333;
  }

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

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

  figure {
    page-break-inside: avoid;
  }

  /* Code blocks */
  pre {
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  /* Poetry */
  pre.poetry {
    text-align: center;
  }

  /* Research template print */
  .gh-research-layout > .gh-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3.2rem;
  }

  .gh-research-meta {
    position: static;
    font-size: 11pt;
  }

  .gh-research-abstract {
    background: transparent;
    border-left: 2px solid #000;
    border-radius: 0;
    padding: 1rem 1.5rem;
  }

  .gh-research-keyword {
    border-color: #999;
    color: #333;
  }

  /* Page breaks */
  .gh-article-header {
    page-break-after: avoid;
  }

  .gh-content > * + h2,
  .gh-content > * + h3 {
    page-break-before: auto;
  }
}
