/* Print styles */ /* Base print settings */ @page { margin: 2cm; } body { font-size: 12pt; line-height: 1.5; color: black; background: white; } /* Hide non-essential elements */ .no-print, #banner, #menu, .paginator, #contentinfo { display: none !important; } a.footnote-backref { display: none !important; } /* Show print-only elements */ span.print-only, sup.print-only { display: inline !important; } div.print-only, ol.print-only, ul.print-only { display: block !important; } li.print-only { display: list-item !important; } /* Reset content area for print */ #content { max-width: none; padding: 0; margin: 0; box-shadow: none; } /* Reset colors - override CSS custom properties from screen styles */ a, a:link, a:visited { color: black !important; text-decoration: none; } h1, h2, h3, h4, h5, h6 { color: black !important; } h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: black !important; } /* Headings - page break handling */ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; break-after: avoid; } /* Prevent orphaned headings */ h1, h2, h3 { page-break-inside: avoid; break-inside: avoid; } /* Keep images and code blocks together */ img, pre, blockquote, table, figure { page-break-inside: avoid; break-inside: avoid; } /* Code blocks */ pre, code { font-size: 10pt; background: #f5f5f5 !important; border: 1px solid #ddd; } pre { padding: 0.5cm; white-space: pre-wrap; word-wrap: break-word; } /* Tables */ table { border-collapse: collapse; } th, td { border: 1px solid #ddd; padding: 0.25cm 0.5cm; } /* Images */ img { max-width: 100% !important; } /* Blockquotes */ blockquote { border-left: 3pt solid #ccc; padding-left: 0.5cm; margin-left: 0; } /* Article spacing */ article { page-break-before: auto; }