* {
	max-width: 100%;
}

body {
	font-family: system-ui, Arial;
	line-height: 1.3;
}

main {
	max-width: 200mm;
	margin: 0 auto;
}

pre code {
	display: block;
	margin: -2rem -0 -3rem -24ch;
}

p:has(img) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(calc(200mm / 3 - 1rem), 1fr));
	gap: 1rem;
}

.expanded {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	object-fit: contain;
	background-color: rgba(255, 255, 255, 0.95);
	z-index: 1000;
	cursor: zoom-out !important;
}

@media print {
	nav, header, details {
		display: none;
	}

	a {
		color: inherit;
		text-decoration: none;
	}

	p + p:has(img) {
		page-break-before: avoid;
	}

	h1, h2, h3, h4, h5, h6, p, ul, ol {
		page-break-inside: avoid;
		page-break-after: avoid;
		margin: .5rem 0;
	}

}