/*
 * D-Central — print stylesheet (Authority Moat W2-116)
 * Clean, citable printouts / print-to-PDF of the dark-first reference pages
 * (1,443-term glossary, 650 error codes, chip/spec sheets, 49 datasets).
 * Enqueued with media="print"; also wrapped in @media print as a belt-and-suspenders
 * guard in case an optimizer concatenates it without the media attribute.
 * Purely additive — screen rendering is never affected.
 */
@media print {
	:root {
		--dc-bg-primary: #ffffff;
		--dc-bg-secondary: #ffffff;
		--dc-bg-surface: #ffffff;
		--dc-bg-elevated: #ffffff;
		--dc-text-primary: #111111;
		--dc-text-secondary: #333333;
		--dc-text-muted: #555555;
		--dc-border: #cccccc;
		--dc-border-subtle: #dddddd;
	}

	html,
	body {
		background: #ffffff !important;
		color: #111111 !important;
	}

	/* Hide site chrome + non-content navigation/CTAs */
	.dc-header-group,
	.dc-footer,
	.dc-search-overlay,
	.dc-sticky-mobile-cta,
	.dc-header-spacer,
	.skip-link,
	.dc-skip-link,
	#wpadminbar,
	.dc-data-hub-nav,
	.dc-related-data,
	.dc-announcement,
	.dc-announce,
	a[download],
	.dc-cta,
	.dc-newsletter {
		display: none !important;
	}

	/* Content: full width, readable */
	.dc-article,
	.dc-content,
	main,
	article {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
		color: #111111 !important;
	}

	a {
		color: #111111 !important;
		text-decoration: underline;
	}

	/* Keep printouts citable: show the URL after in-prose links (not table/nav links). */
	.dc-content p a[href^="http"]::after,
	.dc-content li a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		color: #555555;
		word-break: break-all;
	}

	/* Data tables: print the WHOLE table, not the clipped horizontal-scroll box. */
	table,
	[class*="__table"] {
		display: table !important;
		width: 100% !important;
		overflow: visible !important;
		border-collapse: collapse !important;
		font-size: 9.5pt !important;
		page-break-inside: auto;
	}

	th,
	td {
		border: 1px solid #bbbbbb !important;
		padding: 3px 5px !important;
		color: #111111 !important;
		background: #ffffff !important;
		text-align: left;
	}

	thead th {
		background: #eeeeee !important;
		color: #111111 !important;
	}

	tr,
	.dc-glossary-card,
	.dc-chipcard,
	.dc-card {
		page-break-inside: avoid;
	}

	h1,
	h2,
	h3,
	h4 {
		color: #111111 !important;
		page-break-after: avoid;
	}

	img {
		max-width: 100% !important;
		height: auto !important;
	}

	/* Citability source line at the end of the printed content. */
	.dc-content::after {
		content: "Source: d-central.tech — D-Central Technologies. Free, citable reference data (CC BY 4.0).";
		display: block;
		margin-top: 1.5em;
		padding-top: 0.5em;
		border-top: 1px solid #bbbbbb;
		font-size: 8.5pt;
		color: #555555;
	}

	@page {
		margin: 1.6cm;
	}
}
