/**
 * Print styles.
 *
 * Production teams print location pages, permit notes and project briefs to take into
 * the field, often somewhere with no signal. This makes those pages genuinely usable on
 * paper: no navigation furniture, readable serif body text, and link destinations
 * spelled out so a printed reference is still followable.
 */

@page {
	margin: 18mm 16mm;
}

/*
 * The screen design is near-black. Printing it as designed would flood a page with
 * toner and render the body copy invisible, so the whole canvas is inverted back to
 * paper here. Body weight goes up too: the screen face is a 300 weight, which prints
 * far too faint at 11pt.
 */
body {
	background: #fff !important;
	background-image: none !important;
	color: #000 !important;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 11pt;
	font-weight: 400;
	line-height: 1.45;
}

/* Interface furniture that means nothing on paper. */
.hfn-header,
.hfn-footer,
.wp-block-navigation,
.wp-block-search,
.hfn-brief,
.hfn-filters,
.wp-block-query-pagination,
.skip-link,
.hfn-testimonials__controls,
.wp-block-comments,
#wpadminbar,
.hfn-breadcrumbs {
	display: none !important;
}

/*
 * The atmospheric layers exist to make a dark screen feel lit. On paper they are a grey
 * wash over every page, so they are removed outright rather than dimmed.
 */
.hfn-grain,
.hfn-beam,
.hfn-beam--soft {
	display: none !important;
}

/* Glass surfaces, glows and gradients all resolve to muddy grey when rasterised. */
.hfn-glass,
.hfn-card-surface,
.hfn-card-photo,
.hfn-badge,
.hfn-tag,
.hfn-btn--solid,
.hfn-btn--ghost {
	border-color: #999 !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #000 !important;
	backdrop-filter: none !important;
}

/*
 * Photography is greyscaled on screen as a design choice. That filter is left in place
 * for print: it is already the tonal treatment the images were selected for, and it
 * reproduces predictably on a monochrome office printer.
 */
.hfn-card-photo img {
	filter: grayscale(1) contrast(1.1);
}

main {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

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

h1 {
	font-size: 20pt;
}

h2 {
	font-size: 15pt;
}

h3 {
	font-size: 13pt;
}

p,
li,
blockquote,
figure,
table {
	page-break-inside: avoid;
	break-inside: avoid;
	orphans: 3;
	widows: 3;
}

img {
	max-width: 100% !important;
	page-break-inside: avoid;
	break-inside: avoid;
}

a {
	color: #000;
	text-decoration: underline;
}

/*
 * Print the destination after each link. Restricted to content links: doing it for
 * every link on the page would bury the text in URLs.
 */
.entry-content a[href^="http"]::after {
	content: " (" attr(href) ")";
	font-size: 9pt;
	word-break: break-all;
}

/* Fragment and mail links do not need expanding. */
.entry-content a[href^="#"]::after,
.entry-content a[href^="mailto"]::after {
	content: "";
}

/* Facts and definition lists are the reason these pages get printed. */
.hfn-facts__list .hfn-definition {
	display: grid;
	grid-template-columns: 12em 1fr;
	gap: 0.5em;
	padding-block: 0.25em;
	border-bottom: 1px solid #ccc;
}

.hfn-definition dt {
	font-weight: 700;
}

/* The review-date disclaimer must survive to paper: a printed permit note carried into
   the field is exactly where stale information does damage. */
.hfn-facts__review,
.hfn-review-note {
	padding: 0.5em;
	border: 1px solid #000;
	font-size: 9.5pt;
	font-style: italic;
}

.hfn-grid {
	display: block;
}

.hfn-card {
	margin-block-end: 1em;
	page-break-inside: avoid;
	break-inside: avoid;
}
