/* Book Puzzles print stylesheet.
   Loaded with media="print" — see functions.php enqueue.
   Goal: a puzzle and its answer key both come out legible on plain paper. */

@page {
	margin: 1.4cm;
}

body {
	background: #fff !important;
	color: #000 !important;
	font-size: 12pt;
	line-height: 1.4;
}

/* Hide everything that isn't the puzzle itself. */
.bpz-header,
.bpz-footer,
.bpz-hero,
.bpz-strip,
.bpz-newsletter,
.bpz-postnav,
.bpz-pagination,
.bpz-breadcrumb,
.bpz-sidebar,
.bpz-print-actions,
.bpz-no-print,
.skip-link,
section[aria-labelledby="bpz-related-title"] {
	display: none !important;
}

.bpz-entry__layout {
	display: block !important;
}

.bpz-entry {
	padding: 0 !important;
}

.bpz-wrap {
	width: 100% !important;
	margin: 0 !important;
}

a {
	color: #000 !important;
	text-decoration: none !important;
}

a[href]::after {
	content: none !important;
}

.bpz-entry__title {
	font-size: 20pt;
}

/* Force every answer open on paper — a printed page can't click a <summary>. */
.bpz-reveal {
	border: 1px solid #000 !important;
	break-inside: avoid;
}

.bpz-reveal > summary {
	display: none !important;
}

.bpz-reveal .bpz-reveal__body {
	display: block !important;
	background: #fff !important;
}

/* When printing only the puzzle (not the key), hide answers unless the
   answer key section itself is being printed. JS toggles this via
   data-bpz-print-mode on <html>; with no JS, both puzzle and key print
   together, which is still a fully usable, correct document. */
html[data-bpz-print-mode="puzzle"] .bpz-reveal .bpz-reveal__body,
html[data-bpz-print-mode="puzzle"] .bpz-key {
	display: none !important;
}

html[data-bpz-print-mode="key"] .bpz-q,
html[data-bpz-print-mode="key"] .bpz-clue {
	display: none !important;
}

html[data-bpz-print-mode="key"] .bpz-instructions {
	display: none !important;
}

.bpz-key {
	page-break-before: always;
	break-before: page;
	border: 2px solid #000 !important;
}

.bpz-wordsearch table,
.bpz-wordsearch td {
	border-color: #000 !important;
	color: #000 !important;
}

.bpz-q,
.bpz-clue {
	border: 1px solid #000 !important;
	break-inside: avoid;
}

.bpz-scramble {
	color: #000 !important;
}

.bpz-tile {
	border-color: #000 !important;
	box-shadow: none !important;
	color: #000 !important;
	background: #fff !important;
}
