/* Xingyi magazine — print stylesheet for issue pages.
 *
 * Deploy: copy to /var/www/visitxingyi/css/magazine-print.css on orange,
 * then add to each /magazine/YYYY-MM/index.html <head>:
 *   <link rel="stylesheet" href="/css/magazine-print.css" media="print">
 * Used by the PDF build (live-browser print-to-PDF, A4, background graphics on).
 */

@page {
  size: A4;
  margin: 20mm 18mm 24mm 18mm;
  @bottom-center {
    content: "Xingyi · Southwest Guizhou, in English · visitxingyi.com/magazine/";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 8pt;
    color: #999;
  }
  @bottom-right {
    content: counter(page);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 8pt;
    color: #999;
  }
}

@media print {
  /* Hide site chrome and on-page navigation */
  header.site,
  footer.site,
  nav.toc,
  .issue-card {
    display: none !important;
  }

  body {
    font-family: Georgia, "Times New Roman", serif;
    color: #141414;
    font-size: 11.5pt;
    line-height: 1.65;
    background: #fff !important;
  }

  main.wrap {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .eyebrow {
    font-size: 9pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 6pt;
  }

  h1 {
    font-size: 27pt;
    line-height: 1.2;
    margin: 0 0 8pt 0;
    break-after: avoid;
  }

  p.lead {
    font-size: 13pt;
    line-height: 1.55;
    color: #333;
    margin-bottom: 18pt;
  }

  section {
    break-inside: avoid;
    margin-bottom: 16pt;
  }

  h2 {
    font-size: 16pt;
    margin: 0 0 8pt 0;
    break-after: avoid;
  }

  h3 {
    font-size: 12.5pt;
    margin: 10pt 0 4pt 0;
    break-after: avoid;
  }

  p, ul, ol {
    margin: 0 0 8pt 0;
  }

  li {
    margin-bottom: 4pt;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
    break-inside: avoid;
    margin: 8pt 0;
  }

  .byline {
    font-style: italic;
    color: #555;
  }

  /* Print: links are dead — keep them calm, show key URLs inline */
  a {
    color: #141414;
    text-decoration: none;
  }
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #777;
    word-break: break-all;
  }
}
