/**
 * Catalyst Spectrum — Article Print Stylesheet
 *
 * Loaded on single post views only with media="print".
 * Produces clean, readable printed articles with page-break protection,
 * suppressed chrome/navigation, and visible link references.
 */

@page {
	margin: 1.5cm;
	size: portrait;
}

@media print {
	*,
	*::before,
	*::after {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	body {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
		font-size: 11pt !important;
		line-height: 1.5 !important;
		background: #fff !important;
		color: #111 !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Suppress chrome, navigation, sidebars, interactive controls, ads and comments */
	header,
	footer,
	nav,
	aside,
	.catalyst-header,
	.catalyst-footer,
	.catalyst-post-aside,
	.catalyst-article-tools,
	.catalyst-drawer,
	.catalyst-skip-link,
	.catalyst-ad-slot,
	.catalyst-toc,
	.catalyst-preferences,
	.catalyst-back-to-top,
	.catalyst-newsletter,
	.catalyst-comments,
	.catalyst-reading-progress,
	.wp-block-comments,
	.wp-block-buttons {
		display: none !important;
	}

	/* Reset article widths to full page */
	.catalyst-article-single,
	.catalyst-article-grid,
	.catalyst-article__main,
	.catalyst-article-body,
	.entry-content,
	.wp-block-post-content {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-inline: 0 !important;
		padding-inline: 0 !important;
	}

	/* Heading hierarchy and page break protection */
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		break-after: avoid;
		color: #000 !important;
	}

	h1 {
		font-size: 22pt !important;
		line-height: 1.2 !important;
		margin-block-end: 0.5em !important;
	}

	h2 {
		font-size: 16pt !important;
		margin-block-start: 1.2em !important;
	}

	h3 {
		font-size: 13pt !important;
	}

	p, ul, ol, blockquote, pre {
		orphans: 3;
		widows: 3;
	}

	blockquote, figure, pre, table, img {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	blockquote {
		border-inline-start: 3pt solid #777 !important;
		padding-inline-start: 1em !important;
		font-style: italic !important;
	}

	/* Print link URLs after anchor text */
	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #444 !important;
		word-break: break-all;
	}

	/* Avoid printing anchor links */
	a[href^="#"]::after {
		content: "";
	}

	/* Responsive images fit print bounds */
	img {
		max-width: 100% !important;
		height: auto !important;
	}

	figcaption {
		font-size: 9pt !important;
		color: #555 !important;
		margin-block-start: 0.4em !important;
	}

	/* Table borders */
	table {
		border-collapse: collapse !important;
		width: 100% !important;
	}

	th, td {
		border: 1pt solid #ccc !important;
		padding: 6pt !important;
		font-size: 10pt !important;
	}

	th {
		background: #f0f0f0 !important;
		font-weight: bold !important;
	}
}
