/**
 * Print styles. Loaded with media="print" so it never blocks screen rendering.
 * Goal: a clean, ink-friendly article — drop all interactive interface, show the
 * content full width in black on white, and reveal link targets.
 *
 * Every rule is wrapped in `@media print` as defense-in-depth: the enqueue ships
 * the link as media="print", but CSS-defer optimizers (the loadCSS media→"print"
 * swap in our own SPA router, Perfmatters/WP-Rocket/FlyingPress, etc.) can flip a
 * link's media to "all" — which would leak these interface-hiding rules onto the
 * screen and collapse the layout (the sidebar/header become display:none). Gating
 * the rules on @media print makes that flip harmless: they only apply when
 * actually printing, however the <link media> attribute ends up.
 */

@media print {
	@page {
		margin: 18mm;
	}

	body {
		background: #fff !important;
		color: #000 !important;
	}

	/* Hide everything that isn't the article. */
	.minami-header,
	.minami-site-layout__footer,
	.minami-bottomnav,
	.minami-reading-bar,
	.minami-toc,
	.minami-share,
	.minami-reaction,
	.minami-vote,
	.minami-bookmark,
	.minami-autoload,
	.minami-comment-thread,
	.minami-aside,
	.minami-primary-navigation,
	.minami-article__actions,
	.wp-block-template-part nav,
	.minami-search,
	.minami-mode-toggle {
		display: none !important;
	}

	/* Let the article breathe across the full page. */
	.minami-content-grid,
	.minami-content-grid__primary,
	.minami-site-layout__main,
	.minami-article {
		display: block !important;
		grid-template-columns: none !important;
		max-width: none !important;
		width: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.minami-article {
		font-size: 12pt;
		line-height: 1.5;
	}

	.minami-article img {
		max-width: 100% !important;
		height: auto !important;
		break-inside: avoid;
	}

	.minami-article h1,
	.minami-article h2,
	.minami-article h3 {
		break-after: avoid;
	}

	/* Reveal link destinations in body copy (skip in-page anchors). */
	.minami-article a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		word-break: break-all;
	}
}
