/* Print stylesheet — loaded with media="print" so it has zero effect on screen.
   Focuses on essays and blog posts but applies safely to all pages. */

@media print {

  /* ── Hide chrome: nav, footer, skip links, TOC, interactive elements ── */
  #site-header,
  #menu,
  footer.bg-blue-dark-blue,
  .skip-link,
  .essay-toc-sticky-wrap,
  .essay-toc-drawer,
  .essay-toc-backdrop,
  .essay-ref-margin {
    display: none !important;
  }

  /* ── Hide the hero section entirely (background-image doesn't print) ── */
  .essay-hero {
    display: none !important;
  }

  /* ── Show the splash <img> in the article header instead ── */
  .essay-header-below-hero .essay-splash {
    display: block !important;
    width: 100% !important;
    max-height: 300pt !important;
    object-fit: cover;
    margin-bottom: 1rem;
  }

  /* ── Caption: move below splash image instead of above ── */
  .essay-splash-caption {
    margin-top: 0 !important;
    order: 2;
  }
  .essay-header-below-hero {
    display: flex;
    flex-direction: column;
  }
  .essay-header-below-hero .essay-splash {
    order: 1;
  }
  .essay-header-below-hero .essay-splash-caption {
    order: 2;
  }
  .essay-header-below-hero .essay-title {
    order: 3;
  }
  .essay-header-below-hero .essay-subtitle {
    order: 4;
  }
  .essay-header-below-hero .essay-byline {
    order: 5;
  }

  /* ── Reset layout for paper ── */
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
    line-height: 1.6;
  }

  /* Content wrap: remove decorative shadow/radius from scroll-over effect */
  .essay-content-wrap {
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* ── Essay body ── */
  .essay {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .essay-body {
    font-size: 11pt !important;
  }
  .essay-body img {
    max-width: 100% !important;
    max-height: 400pt !important;
    page-break-inside: avoid;
  }

  /* ── Page break control ── */
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
  p, li, blockquote {
    orphans: 3;
    widows: 3;
  }
  img, figure, table, pre {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Links: show URL after link text for reference ── */
  .essay-body a[href^="http"]::after,
  .essay-footer a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #6b7280;
    word-break: break-all;
  }
  /* Don't duplicate URL for footnote popup links (already shown as text) */
  .footnote-popup-link a::after {
    content: none !important;
  }

  /* ── References section: ensure it prints ── */
  .essay-references {
    page-break-before: always;
    break-before: page;
  }
  .essay-ref-list-two-col {
    columns: 1 !important;
    font-size: 9pt !important;
  }

  /* ── Footnote superscripts: keep visible, remove interactive styling ── */
  .essay-body .footnote-click sup {
    color: #1a202c !important;
    cursor: default !important;
  }
  .essay-body .footnote-click {
    cursor: default !important;
  }

  /* ── About the author section ── */
  .essay-about-author-img {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

}
