/**
 * Print stylesheet for FinXJournal single posts. Enqueued with
 * media="print" only on is_singular('post') (see inc/setup.php), so it
 * costs nothing on screen and never loads on other templates.
 *
 * Goal: a clean, self-contained printout someone would actually forward
 * or file — headline, byline, the article itself, nothing interactive or
 * promotional — with FinXJournal branding top and bottom instead of the
 * on-screen chrome.
 */

@page {
	margin: 2cm 1.8cm;
}

* {
	box-shadow: none !important;
	text-shadow: none !important;
	background: transparent !important;
}

html,
body {
	background: #fff !important;
	color: #000 !important;
	font-size: 12pt;
}

/* Strip everything that isn't the article itself. */
.finx-utility-bar,
.finx-masthead,
.finx-primary-nav,
.finx-back-to-top,
.finx-footer,
.finx-reading-progress,
.finx-breadcrumb,
.finx-share,
.finx-new-badge,
.finx-tags,
.finx-up-next,
.finx-layout > aside,
main > .finx-hr,
main > .finx-section,
.finx-ad-slot,
form,
button {
	display: none !important;
}

.finx-print-only {
	display: block !important;
}

body,
main,
.finx-container,
.finx-layout,
article.finx-single {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.finx-layout {
	display: block !important;
}

/* Branded print masthead, replacing the on-screen header. */
.finx-print-masthead {
	display: flex !important;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 2px solid #000;
	padding-bottom: 10px;
	margin-bottom: 20px;
}
.finx-print-logo {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20pt;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.finx-print-tagline {
	font-size: 9pt;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #333 !important;
}

/* Headline block. */
.finx-eyebrow {
	font-size: 9pt;
	letter-spacing: 0.08em;
	color: #333 !important;
	margin-bottom: 6px;
}
h1 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 22pt;
	line-height: 1.25;
	margin: 0 0 10px;
	page-break-after: avoid;
	break-after: avoid;
}
.finx-deck {
	font-size: 12.5pt;
	font-style: italic;
	color: #222 !important;
	margin-bottom: 10px;
}
.finx-byline {
	font-size: 9.5pt;
	color: #333 !important;
	border-top: 1px solid #999;
	border-bottom: 1px solid #999;
	padding: 6px 0;
	margin-bottom: 16px;
}

/* Lead image. Capped to a fixed max-height (not just max-width) — the
   theme's lead art runs a tall 12:7 crop, and without a height cap a
   full-width render is tall enough that "page-break-inside: avoid" was
   shoving the whole figure onto page 2 wholesale, stranding page 1 almost
   entirely blank beneath the byline. A shorter block both looks better on
   paper and reliably fits in whatever space is left on the current page. */
figure {
	page-break-inside: avoid;
	break-inside: avoid;
	margin: 0 auto 6px;
	text-align: center;
}
figure img,
figure svg {
	max-width: 100% !important;
	max-height: 2.6in !important;
	width: auto !important;
	height: auto !important;
}
figcaption {
	font-size: 8.5pt;
	color: #444 !important;
	margin-bottom: 16px;
}

/* Article body. */
.finx-article-body {
	column-count: 1 !important;
	font-size: 11.5pt;
	line-height: 1.55;
}
.finx-article-body p {
	orphans: 3;
	widows: 3;
	margin-bottom: 10px;
}
.finx-article-body h2,
.finx-article-body h3 {
	font-size: 14pt;
	page-break-after: avoid;
	break-after: avoid;
}
.finx-article-body blockquote {
	column-span: none;
	border-left: 3px solid #000;
	border-top: none;
	border-bottom: none;
	padding: 2px 0 2px 16px;
	margin: 16px 0;
	text-align: left;
	page-break-inside: avoid;
	break-inside: avoid;
}
.finx-article-body blockquote p {
	font-size: 13pt;
	max-width: none;
	margin: 0;
}
.finx-article-body a {
	color: #000 !important;
	text-decoration: underline;
}
/* Show the destination of outbound links — the reader can't click a
   printed page. Skip same-page anchors, which have nowhere useful to go. */
.finx-article-body a[href^="http"]:after {
	content: " (" attr(href) ")";
	font-size: 8.5pt;
	color: #555 !important;
	font-weight: normal;
	word-break: break-all;
}

/* Author box. */
.finx-author-box {
	display: flex !important;
	gap: 12px;
	border-top: 1px solid #999;
	padding-top: 12px;
	margin-top: 20px;
	page-break-inside: avoid;
	break-inside: avoid;
}
.finx-author-avatar img {
	filter: grayscale(1);
}
.finx-author-name {
	font-weight: 700;
}
.finx-author-role,
.finx-author-bio {
	color: #333 !important;
	font-size: 9.5pt;
}

/* Branded print footer. */
.finx-print-footer {
	margin-top: 24px;
	padding-top: 10px;
	border-top: 2px solid #000;
	font-size: 8.5pt;
	color: #333 !important;
}
.finx-print-footer p {
	margin: 2px 0;
}
.finx-print-footer-brand {
	font-weight: 700;
	font-size: 10.5pt;
	color: #000 !important;
}
