/* ==========================================================================
   CJ Anomaly Log — hardcopy. Used two ways:
   1. Inside the print frame opened by "Download a hardcopy" (body.cjal-hc-frame).
   2. As a print stylesheet on the case-file page, for the browser's own Print.
   ========================================================================== */

@page { size: auto; margin: 12mm 13mm 13mm; }

/* --- 2. Browser Print on the page itself: show only the hardcopy --- */
body:not(.cjal-hc-frame) * { visibility: hidden !important; }
body:not(.cjal-hc-frame) .cjal-hc,
body:not(.cjal-hc-frame) .cjal-hc * { visibility: visible !important; }
body:not(.cjal-hc-frame) .cjal-hc { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
body:not(.cjal-hc-frame) #wpadminbar { display: none !important; }
/* Modern browsers: drop everything that isn't on the path to the hardcopy, so no blank pages follow. */
body:not(.cjal-hc-frame) > *:not(:has(.cjal-hc)),
body:not(.cjal-hc-frame) *:has(> .cjal-hc) > *:not(.cjal-hc),
body:not(.cjal-hc-frame) *:has(.cjal-hc) > *:not(:has(.cjal-hc)):not(.cjal-hc) { display: none !important; }
body:not(.cjal-hc-frame) *:has(.cjal-hc) { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; min-height: 0 !important; }
body:not(.cjal-hc-frame) .cjal-file { padding: 0 !important; background: none !important; position: static !important; margin: 0 !important; width: auto !important; }

/* --- The hardcopy itself --- */
html, body.cjal-hc-frame { margin: 0; padding: 0; background: #fff; }
.cjal-hc {
	display: block;
	color: #111;
	background: #fff;
	font-family: "Courier Prime", "Courier New", Courier, monospace;
	font-size: 8.6pt;
	line-height: 1.42;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}
.cjal-hc, .cjal-hc * { box-sizing: border-box; color: #111 !important; }
.cjal-hc h1, .cjal-hc h2, .cjal-hc p, .cjal-hc ul, .cjal-hc ol { margin: 0; padding: 0; letter-spacing: normal; text-transform: none; }
.cjal-hc h1::before, .cjal-hc h2::before, .cjal-hc h2::after { content: none !important; display: none !important; }

.hc-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	padding-bottom: 6px;
	border-bottom: 3px double #111;
}
.hc-brand { display: flex; align-items: center; gap: 10px; }
.hc-logo { width: 38px; height: 38px; object-fit: contain; }
.hc-org { font-family: "Special Elite", "Courier New", monospace; font-size: 14pt; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.hc-dept { font-size: 7pt; text-transform: uppercase; letter-spacing: .22em; margin-top: 4px; }
.hc-caseno { border: 1.5px solid #111; padding: 3px 8px; text-align: right; }
.hc-caseno span { display: block; font-size: 7pt; text-transform: uppercase; letter-spacing: .18em; }
.hc-caseno strong { font-size: 10.5pt; letter-spacing: .06em; }

.hc-stamps { display: flex; gap: 12px; justify-content: flex-end; margin: 10px 6px 8px; }
.hc-stamp {
	font-family: "Special Elite", "Courier New", monospace;
	font-size: 10.5pt;
	text-transform: uppercase;
	letter-spacing: .12em;
	padding: 2px 10px;
	border: 2.5px solid #b5301b;
	border-radius: 3px;
	transform: rotate(-4deg);
	opacity: .9;
}
.cjal-hc .hc-stamp { color: #b5301b !important; }
.hc-stamp--record { transform: rotate(3deg); border-color: #111; }
.cjal-hc .hc-stamp--record { color: #111 !important; }
.cjal-hc .hc-stamp--record.is-unv { color: #b5301b !important; border-color: #b5301b; }

.hc-title { font-family: "Special Elite", "Courier New", monospace; font-weight: 400; font-size: 16pt; line-height: 1.15; margin: 2px 0 8px; }

.hc-facts { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 8.4pt; }
.hc-facts th, .hc-facts td { border: 1px solid #111; padding: 2px 6px; text-align: left; vertical-align: top; }
.hc-facts th { width: 13%; font-weight: 600; font-size: 6.6pt; text-transform: uppercase; letter-spacing: .14em; background: #eee; }

.hc-sec { margin-top: 9px; break-inside: auto; }
.hc-sec h2 {
	break-after: avoid;
	page-break-after: avoid;
	font-size: 7pt;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .2em;
	border-bottom: 1px solid #111;
	padding-bottom: 1px;
	margin-bottom: 5px;
}
.hc-story p { margin: 0 0 .55em; text-align: justify; hyphens: auto; }
.hc-story img, .hc-story figure { display: none; }
.hc-q ul { list-style: none; border-left: 3px solid #111; padding-left: 10px; }
.hc-q li { margin-bottom: 2px; }
.hc-q li::before { content: "? "; font-weight: 600; }
.hc-sources { padding-left: 14pt !important; }
.hc-sources li { margin-bottom: 4px; break-inside: avoid; }
.hc-tier { display: inline-block; font-size: 6.2pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; border: 1px solid #111; padding: 0 4px; margin-right: 4px; vertical-align: 1px; }
.hc-url { display: block; font-size: 6.8pt; word-break: break-all; color: #333; }

.hc-foot {
	margin-top: 10px;
	padding-top: 4px;
	border-top: 3px double #111;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 6.5pt;
	text-transform: uppercase;
	letter-spacing: .1em;
}
.hc-foot span:first-child { text-transform: none; letter-spacing: 0; word-break: break-all; }
.hc-motto { font-weight: 600; text-transform: none; letter-spacing: .04em; }

/* One page: file.js measures the file and scales it down (zoom) to fit when needed. */
/* Keep theme table and list styles out of the hardcopy. */
.cjal-hc table, .cjal-hc th, .cjal-hc td, .cjal-hc li, .cjal-hc p { font-family: inherit !important; line-height: inherit; letter-spacing: inherit; }
.cjal-hc .hc-facts th { letter-spacing: .14em; }

/* Faint CJ seal behind the text, centred on the sheet. */
.cjal-hc { position: relative; }
.cjal-hc > *:not(.hc-watermark) { position: relative; z-index: 1; }
.cjal-hc .hc-watermark {
	position: absolute;
	z-index: 0;
	left: 50%;
	top: 50%;
	width: 62%;
	max-width: 440px;
	height: auto;
	transform: translate(-50%, -50%);
	opacity: .07;
	pointer-events: none;
}
