/* Financial News Pro: article template (single posts). Loaded after style.css on singular posts. */

/* ---------------------------------------------------------------- One measure for every block */
.fn-article { --a-w: 1064px; }
.fn-ahead, .fn-ahero, .fn-abody { max-width: calc(var(--a-w) + var(--gut) * 2); }

/* ---------------------------------------------------------------- Header */
.fn-ahead { padding-top: 22px; }
.fn-ahead .fn-crumbs, .fn-ahead nav[aria-label*="readcrumb"] { font-size: 13px; color: var(--ink-3); }
.fn-ahead__k { margin-top: 22px; display: flex; align-items: center; gap: 10px; }
.fn-kicker--partner {
	display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
	background: var(--partner-bg); color: var(--partner); border: 1px solid #f0d9a6; border-radius: 999px;
	font-size: 12px; letter-spacing: .06em;
}
.fn-kicker--partner::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c98a12; }
.fn-ahead__t {
	font-size: clamp(32px, 4.2vw, 54px); font-weight: 750; line-height: 1.06; letter-spacing: -.03em;
	margin-top: 14px; max-width: 21ch; text-wrap: balance;
}
.fn-ahead__dek {
	font-family: var(--f-read); font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2);
	margin-top: 18px; max-width: 62ch; text-wrap: pretty;
}

/* Byline: avatar with initials underneath (shows when the gravatar is blank) */
.fn-byline { margin-top: 26px; gap: 14px 16px; }
.fn-byline__av, .fn-authorbox__av {
	position: relative; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden;
	background: var(--royal-t); color: var(--royal-d); font-weight: 700; letter-spacing: .02em;
}
.fn-byline__av { width: 44px; height: 44px; font-size: 15px; }
.fn-byline__av::before, .fn-authorbox__av::before { content: attr(data-initials); grid-area: 1 / 1; }
.fn-byline__av img, .fn-authorbox__av img { grid-area: 1 / 1; position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fn-byline__meta { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: -.01em; color: var(--ink-3); gap: 2px 14px; }
.fn-byline__meta time { font-variant-numeric: tabular-nums; }
.fn-byline__upd { color: var(--ink-2); }
.fn-byline__upd::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--royal); margin-right: 6px; vertical-align: 1px; }

/* ---------------------------------------------------------------- Lead image: max 16:9, wide charts stay whole */
.fn-ahero { margin-top: 28px; }
.fn-ahero__img { background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.fn-ahero__img img {
	width: 100%; height: auto; border-radius: 0; object-fit: cover; object-position: 50% 35%;
	max-height: calc(min(var(--a-w), 100vw - var(--gut) * 2) * .5625);
}
.fn-ahero figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }
.fn-ahero__credit { font-family: var(--f-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------------------------------------------------------------- Body grid */
.fn-abody { grid-template-columns: minmax(0, 700px) 300px; gap: 40px 64px; justify-content: space-between; padding-top: 36px; padding-bottom: 64px; }

/* Disclosure on contributed posts */
.fn-partner-note { display: block; margin-bottom: 28px; }

/* ---------------------------------------------------------------- Prose */
.fn-prose { color: #14224f; }
.fn-prose > p:first-of-type::first-line { font-weight: inherit; }
.fn-prose > p:first-of-type { font-size: 1.06em; line-height: 1.66; color: var(--ink); }
.fn-prose h2 { position: relative; padding-top: 18px; }
.fn-prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 36px; height: 3px; background: var(--royal); border-radius: 2px; }
.fn-prose a { word-break: break-word; }

/* Quotes */
.fn-prose blockquote:not(.wp-block-pullquote blockquote) {
	position: relative; margin: 1.8em 0; padding: 2px 0 2px 28px; border-left: 3px solid var(--royal);
	font-style: normal; font-size: 1.12em; line-height: 1.55; color: var(--ink);
}
.fn-prose .wp-block-pullquote { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 26px 0 22px; margin: 2.2em 0; }
.fn-prose .wp-block-pullquote blockquote::before {
	content: "\201C"; display: block; font-family: var(--f-read); font-size: 64px; line-height: .6; color: var(--royal); margin-bottom: 12px;
}
.fn-prose .wp-block-pullquote cite { display: block; margin-top: 14px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }

/* Tables: financial data */
.fn-prose table, .fn-prose .wp-block-table table { font-family: var(--f-ui); font-size: 15px; line-height: 1.4; border-top: 2px solid var(--ink); }
.fn-prose .wp-block-table, .fn-prose > table { margin: 2em 0; }
.fn-prose table th, .fn-prose table td { padding: 11px 14px; border-bottom: 1px solid var(--rule); }
.fn-prose table thead th, .fn-prose table tr:first-child th {
	background: transparent; border-bottom: 1px solid var(--ink); font-size: 12.5px; font-weight: 650;
	text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); white-space: nowrap;
}
.fn-prose table tbody tr:nth-child(even) td { background: var(--paper); }
.fn-prose table tbody tr:hover td { background: var(--royal-t); }
.fn-prose table td { font-variant-numeric: tabular-nums lining-nums; }
.fn-prose table td:first-child { font-weight: 600; color: var(--ink); }
.fn-prose .wp-block-table figcaption, .fn-prose table caption { font-size: 13px; color: var(--ink-3); text-align: left; margin-top: 8px; caption-side: bottom; }

/* Lists */
.fn-prose ul { list-style: none; padding-left: 1.4em; }
.fn-prose ul > li { position: relative; }
.fn-prose ul > li::before { content: ""; position: absolute; left: -1.05em; top: .72em; width: 7px; height: 7px; border-radius: 1px; background: var(--royal); }
.fn-prose ol { padding-left: 1.5em; }
.fn-prose ol > li::marker { font-family: var(--f-mono); font-size: .82em; font-weight: 500; }

/* Figures and embeds */
.fn-prose figure img, .fn-prose > p > img { border-radius: 4px; }
.fn-prose iframe { display: block; width: 100%; border: 0; }
.fn-prose iframe[src*="youtube"], .fn-prose iframe[src*="vimeo"], .fn-prose .wp-embed-aspect-16-9 iframe { aspect-ratio: 16 / 9; height: auto; }
.fn-prose iframe[src*="tradingview"] { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
.fn-prose .wp-block-embed { margin: 1.8em 0; }
.fn-prose .twitter-tweet, .fn-prose .instagram-media { margin-left: auto !important; margin-right: auto !important; }

/* ---------------------------------------------------------------- Article foot */
.fn-afoot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule); display: grid; gap: 18px; }
.fn-afoot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fn-afoot__k { font-family: var(--f-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.fn-afoot .fn-tags { margin-top: 0; }
.fn-afoot__end { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }

.fn-authorbox { margin-top: 28px; align-items: start; }
.fn-authorbox__av { width: 76px; height: 76px; font-size: 26px; }

/* ---------------------------------------------------------------- Rail */
.fn-arail { position: sticky; top: 88px; display: grid; gap: 22px; }
.admin-bar .fn-arail { top: 120px; }
.fn-arail__box { background: var(--paper); border-radius: 6px; padding: 18px 18px 8px; }
.fn-arail__t { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.fn-arail .fn-timeline { margin-top: 4px; }
.fn-arail__mr { list-style: none; counter-reset: none; }
.fn-arail__mr li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.fn-arail__mr li:last-child { border-bottom: 0; }
.fn-arail__n { font-family: var(--f-mono); font-size: 20px; font-weight: 500; line-height: 1; color: var(--royal); }
.fn-arail__mr a:hover { color: var(--royal); }

/* ---------------------------------------------------------------- Related */
.fn-related .fn-shead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fn-shead__more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--royal); white-space: nowrap; }
.fn-shead__more .fn-i { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1179px) {
	.fn-abody { grid-template-columns: minmax(0, 720px); justify-content: center; }
	.fn-ahead, .fn-ahero { max-width: calc(720px + var(--gut) * 2); }
	.fn-ahero__img img { max-height: calc(min(720px, 100vw - var(--gut) * 2) * .5625); }
}
@media (max-width: 599px) {
	.fn-ahead { padding-top: 14px; }
	.fn-ahead__t { font-size: 30px; line-height: 1.1; max-width: none; }
	.fn-ahead__dek { font-size: 18px; }
	.fn-byline__meta { font-size: 12px; }
	.fn-ahero { padding: 0; }
	.fn-ahero__img { border-radius: 0; }
	.fn-ahero__img img { max-height: calc(100vw * .5625); }
	.fn-prose > p:first-of-type { font-size: 1.04em; }
	.fn-prose table { font-size: 14px; }
	.fn-prose table th, .fn-prose table td { padding: 9px 10px; }
	.fn-authorbox__av { width: 56px; height: 56px; font-size: 20px; }
	.fn-related .fn-shead__more { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fn-arail { position: static; } }
@media print {
	.fn-progress, .fn-share, .fn-abody__rail, .fn-related, .fn-authorbox__more { display: none !important; }
	.fn-abody { display: block; }
}

/* ---------------------------------------------------------------- Breadcrumb (Yoast markup): one line, "/" separator, title truncates */
.fn-ahead .fn-crumbs { font-size: 13px; color: var(--ink-3); min-width: 0; }
.fn-ahead .fn-crumbs > span { display: flex; align-items: baseline; min-width: 0; font-size: 0; }
.fn-ahead .fn-crumbs > span > span { font-size: 13px; flex: none; }
.fn-ahead .fn-crumbs .breadcrumb_last { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-3); }
.fn-ahead .fn-crumbs a { color: var(--ink-2); font-weight: 550; }
.fn-ahead .fn-crumbs a:hover { color: var(--royal); }
.fn-abody__rail { align-self: stretch; }
