/* ============================================================
   PRINT STYLESHEET — article pages
   ------------------------------------------------------------
   Goal: when a reader hits Cmd+P on /news/<slug>, give them a
   clean, paper-friendly page. Strip nav chrome, floating UI,
   share buttons, comments, footer. Show only the article body.
   Expose link URLs (absolute only) inline so printed copies
   remain citable.

   Phase 53.x (perf) — extracted out of global.css (~3KB raw /
   ~700B brotli saved off the render-blocking screen bundle).
   Linked from BaseLayout.astro with media="print" so the browser
   only fetches/parses these rules when the user prints.
   ============================================================ */

/* Hide nav, floating UI, and non-article chrome */
.topbar,
.mobile-tab-bar,
.mobile-section,
.back-to-top,
.btn-back-to-top,
.command-palette,
.cmdk,
.cmdk-overlay,
.reading-progress,
.read-progress,
.progress-bar,
.skip-to-main,
.skip-link,
.shelf-link,
.shelf-more,
.view-all,
.footer,
footer,
.comments,
.comment-section,
.share-buttons,
.share-bar,
.social-share,
.newsletter-cta,
.cta-band,
.related-posts,
.related-articles,
.toc-sticky,
.article-sidebar,
.ad,
.advert,
[data-print="hide"] {
  display: none !important;
}

/* Reset page colors for ink-on-paper */
html, body {
  background: #fff !important;
  color: #000 !important;
}
body {
  font-size: 12pt;
  line-height: 1.5;
}

/* Article body: only this content matters in print */
.article-body,
.article-body * {
  color: #000 !important;
  background: transparent !important;
}
.article-body {
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.article-body h1,
h1 {
  font-size: 18pt;
  page-break-after: avoid;
}
.article-body h2 { font-size: 14pt; }
.article-body h3 { font-size: 12.5pt; }
.article-body p,
.article-body li {
  font-size: 12pt;
}
.article-body .byline,
.byline {
  font-size: 10pt;
  color: #333 !important;
}

/* Avoid awkward page breaks inside atomic blocks */
h1, h2, h3,
img, figure, blockquote, pre, table {
  page-break-inside: avoid;
}
h1, h2, h3 { page-break-after: avoid; }
p, li { orphans: 3; widows: 3; }

/* Neutralize card / badge backgrounds and unify borders */
.card, .pill, .badge, .chip,
.article-body .card,
.article-body .pill,
.article-body blockquote,
.article-body pre,
.article-body table,
.article-body th,
.article-body td {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #ddd !important;
  box-shadow: none !important;
}

/* Expose absolute http(s) link URLs after the link text.
   Skip mailto, tel, fragment, and relative links. */
.article-body a[href^="http"]:after {
  content: " (" attr(href) ")";
  font-size: 10pt;
  color: #555;
  word-break: break-all;
}
.article-body a[href^="http"] {
  color: #000 !important;
  text-decoration: underline;
}

/* Ensure images don't blow past the page */
.article-body img,
.article-body figure img {
  max-width: 100% !important;
  height: auto !important;
}

/* Page margins */
@page {
  margin: 0.75in;
}
