/*
 * EFLL Site Design - rewritten post bodies (includes/post-rewrite.php). Loaded only when a rewrite is shown
 * (body.efll-rw-on), after post-design.css. Uses the post design's tokens (--pd-*) with literal fallbacks, so
 * it also reads correctly if the post design is off and Astra prints the body in .entry-content.
 *
 * Scope: :is(post design article body, Astra entry content). :is() takes its most specific argument
 * (0,3,1), so these rules outrank post-design.css's "body.efll-sd .efll-pd .efll-pd-content h2"-style rules.
 */

/* ---- Key takeaways: tinted callout, gold rule, diamond markers ------------------------------------ */
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways {
	margin: 6px 0;
	padding: 26px 30px 28px;
	border: 1px solid #eadfbf;
	border-left: 4px solid var(--pd-gold, #d4a72c);
	background: #fbf7ec;
	color: var(--pd-text, #374151);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways h2 {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	font-family: var(--pd-cond, "Barlow Condensed", "Arial Narrow", Arial, sans-serif);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--pd-gold3, #7a5a0c);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways :is(ul, ol) {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways li {
	position: relative;
	margin: 0;
	padding-left: 24px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--pd-dark, #111827);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways li::before {
	content: "\25C6";
	position: absolute;
	left: 0;
	top: .32em;
	font-size: 11px;
	line-height: 1.6;
	color: var(--pd-gold, #d4a72c);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways li::marker {
	content: none;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways :is(p, li) + p {
	margin-top: 10px;
}

/* ---- Lead photo (inserted after the takeaways box) ------------------------------------------------- */
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-lead {
	margin: 4px 0;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-lead img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
}

/* ---- FAQ: h2, then question (h3) / answer (p) pairs separated by hairlines ------------------------ */
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > h2 {
	margin: 18px 0 8px;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > h3 {
	margin: 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--pd-line, #e5e7eb);
	font-size: 20px;
	line-height: 1.4;
	color: var(--pd-navy, #1b304b);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > h2 + h3 {
	border-top: 0;
	padding-top: 6px;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > :is(p, ul, ol, table, blockquote) {
	margin: 8px 0 0;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > :is(p, ul, ol, table, blockquote):last-child {
	margin-bottom: 4px;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > :is(p, ul, ol) + h3 {
	margin-top: 20px;
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > :is(ul, ol) {
	padding-left: 1.4em;
}

/* ---- Disclaimer: small, muted, set off by a hairline ---------------------------------------------- */
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-disclaimer {
	margin: 10px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--pd-line, #e5e7eb);
	font-size: 14px;
	line-height: 1.6;
	color: var(--pd-muted, #6b7280);
}
:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-disclaimer :is(em, strong, a) {
	color: inherit;
	font-weight: inherit;
}

/* ---- Tables: bordered cells, readable first column, horizontal scroll on phones ------------------- */
/* Post design: bare tables already sit in div.efll-pd-table (overflow-x:auto, outer border, navy head). */
body.efll-rw-on.efll-sd .efll-pd .efll-pd-content :is(th, td) {
	border: 1px solid var(--pd-line, #e5e7eb);
}
body.efll-rw-on.efll-sd .efll-pd .efll-pd-content thead :is(th, td) {
	border-color: var(--pd-navy, #1b304b);
}
body.efll-rw-on.efll-sd .efll-pd .efll-pd-content tbody tr > :first-child {
	font-family: var(--pd-sans, "Barlow", "Helvetica Neue", Arial, sans-serif);
	font-weight: 600;
	color: var(--pd-navy, #1b304b);
}
body.efll-rw-on.efll-sd .efll-pd .efll-pd-content .efll-pd-table {
	border-color: #dbe2ea;
}
/* Fallback when the post design is off: the table itself scrolls. */
body.efll-rw-on .entry-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-collapse: collapse;
	font-size: 16px;
	line-height: 1.55;
}
body.efll-rw-on .entry-content :is(th, td) {
	padding: 10px 14px;
	border: 1px solid #e5e7eb;
	text-align: left;
	vertical-align: top;
}
body.efll-rw-on .entry-content thead :is(th, td) {
	background: #1b304b;
	color: #ffffff;
}

@media (max-width: 640px) {
	:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways {
		padding: 20px 18px 22px;
	}
	:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways li {
		font-size: 16px;
	}
	:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-faq > h3 {
		font-size: 18px;
	}
	body.efll-rw-on .entry-content table {
		font-size: 15px;
	}
}

@media print {
	:is(body.efll-sd .efll-pd .efll-pd-content, body.efll-rw-on .entry-content) .efll-rw-takeaways {
		background: none;
	}
}
