/*
 * Printing an answer should give a single page of the book: the question, the
 * date rule, the answer on ruled lines, and the site's name at the foot.
 * Nothing else — no navigation, no footer, no buttons.
 */

@page {
	margin: 20mm 18mm;
}

@media print {
	body.wif-printing > *:not(.wif-printsheet) {
		display: none !important;
	}

	.wif-printsheet {
		display: block !important;
		position: static;
		color: #000;
		background: #fff;
		font-size: 12pt;
		line-height: 1.7;
	}

	.wif-printsheet__item {
		page-break-after: always;
		break-after: page;
	}

	.wif-printsheet__item:last-child {
		page-break-after: auto;
		break-after: auto;
	}

	.wif-printsheet__question {
		font-size: 15pt;
		font-weight: 600;
		margin: 0 0 1.5em;
	}

	.wif-printsheet__date {
		margin: 0 0 1em;
		padding-bottom: 0.2em;
		border-bottom: 0.5pt solid #000;
		width: 45mm;
		margin-left: auto;
		text-align: right;
		font-size: 10pt;
	}

	/* The writing lines, so a printed answer still looks like the journal. */
	.wif-printsheet__answer {
		white-space: pre-wrap;
		background-image: repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent calc(1.7em - 0.5pt),
			#ccc calc(1.7em - 0.5pt),
			#ccc 1.7em
		);
		background-attachment: local;
	}

	.wif-printsheet__foot {
		margin-top: 2em;
		font-size: 9pt;
		color: #444;
	}

	/* Off-screen while reading; only print builds this. */
	.wifc-heavy,
	.wif-actions,
	.wif-share,
	.wif-links,
	.wif-status,
	.wif-fineprint,
	.wif-questionreact,
	.wif-answer__foot,
	.wif-more,
	.wif-reportform {
		display: none !important;
	}
}

/* Never visible on screen. */
.wif-printsheet {
	display: none;
}
