/* ==========================================================================
   NIOS single post refresh (30.11.2026): Lori's variation 1 + the dark
   category banner of variation 2. Loaded only while the switch in
   inc/post/refresh.php is on; every rule is scoped to body.post-refresh,
   so turning the switch off restores post.css exactly. Mobile first.
   Contrast notes: small copper text uses #8a5418 (the brand #ad6c22 fails
   4.5:1 for small text); gold #d5b06b only on the dark surface.
   ========================================================================== */

.post-refresh .post-single {
	--pr-ink: #2b2722;
	--pr-soft: #4f4a43;
	--pr-copper: #8a5418;
	--pr-copper-hover: #5e3a10;
	--pr-dark: #1d1a17;
	--pr-gold: #d5b06b;
	--pr-gold-hover: #e2c389;
	--pr-gold-active: #c79f55;
	--pr-cream: #fbf6ef;
}

/* ---- Hero: cream band, image overlapping its bottom edge ---- */
.post-refresh .post-hero {
	padding: 16px 0 0;
	background: linear-gradient(to bottom, var(--post-hero) 0, var(--post-hero) calc(100% - 110px), var(--post-bg) calc(100% - 110px), var(--post-bg) 100%);
}
.post-refresh .post-hero__breadcrumb { font: 400 13px/20px var(--nios-font); margin: 0 0 12px; }
.post-refresh .post-hero__breadcrumb a { color: var(--post-muted); }
.post-refresh .post-hero__cat {
	display: inline-block;
	font: 600 13px/20px var(--nios-font);
	color: var(--pr-copper);
	background: var(--pr-cream);
	border: 1px solid var(--post-border);
	border-radius: 999px;
	padding: 3px 12px;
	margin: 0 0 12px;
}
.post-refresh .post-hero__cat:hover { color: var(--pr-copper-hover); text-decoration: none; border-color: var(--pr-copper); }
.post-refresh .post-hero__title { font: 800 30px/1.25 var(--nios-font); margin: 0 0 12px; }
.post-refresh .post-hero__lead { font: 400 16px/1.65 var(--nios-font); color: var(--pr-soft); margin: 0 0 14px; }
.post-refresh .post-meta {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0 0 18px;
	gap: 10px;
}
.post-refresh .post-meta .post-meta__avatar-img,
.post-refresh .post-meta .post-author__avatar-fallback { width: 30px !important; height: 30px !important; }
.post-refresh .post-meta__body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.post-refresh .post-meta__author { font: 600 13px/20px var(--nios-font); margin: 0; }
.post-refresh .post-meta__line { font: 400 13px/20px var(--nios-font); gap: 4px 8px; }
.post-refresh .post-hero__media { border-radius: 16px; overflow: hidden; }

/* ---- Layout ---- */
.post-refresh .post-layout { gap: 24px; padding-top: 22px; }

/* ---- Table of contents: collapsed row on phones ---- */
.post-refresh .post-toc { border-radius: 14px; padding: 14px 16px; }
.post-refresh .post-toc__toggle { font: 700 15px/22px var(--nios-font); min-height: 44px; }
.post-refresh .post-toc__toggle > span:first-child { flex: 1 1 auto; }
.post-refresh .post-toc__count { font: 500 13px/20px var(--nios-font); color: var(--post-muted); }
.post-refresh .post-toc__list { gap: 10px; }
.post-refresh .post-toc__item a { font: 400 15px/1.5 var(--nios-font); color: var(--pr-copper); }
.post-refresh .post-toc__item a:hover,
.post-refresh .post-toc__item a[aria-current="true"] { color: var(--pr-copper-hover); }
.post-refresh .post-toc__item a:focus-visible { outline-color: var(--pr-copper); }
.post-refresh .post-toc__share-btn { width: 44px; height: 44px; }

/* ---- Body ---- */
.post-refresh .post-body { font: 400 17px/1.75 var(--nios-font); color: var(--pr-ink); }
.post-refresh .post-body > p:first-of-type { font-size: 18px; font-weight: 500; color: var(--post-text); }
.post-refresh .post-body p { margin: 0 0 18px; }
.post-refresh .post-body h2 { font: 800 24px/1.35 var(--nios-font); margin: 36px 0 14px; color: var(--post-text); }
.post-refresh .post-body h3 { font: 700 20px/1.4 var(--nios-font); }
.post-refresh .post-body a { color: var(--pr-copper); text-underline-offset: 3px; }
.post-refresh .post-body a:hover { color: var(--pr-copper-hover); }
.post-refresh .post-body a:focus-visible { outline: 2px solid var(--pr-copper); outline-offset: 2px; border-radius: 2px; }

.post-refresh .post-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--post-border);
	border-radius: 12px;
	margin: 0 0 20px;
}
.post-refresh .post-table-wrap table { margin: 0; font-size: 14px; line-height: 1.5; }
.post-refresh .post-table-wrap :is(th, td) { border: 0; border-top: 1px solid var(--post-border); padding: 10px 12px; vertical-align: top; }
.post-refresh .post-table-wrap thead :is(th, td) { border-top: 0; background: var(--post-hero); font-weight: 700; }

.post-refresh .post-body blockquote {
	background: var(--post-quote-bg);
	border-radius: 14px;
	padding: 18px 20px;
	margin: 24px 0;
	font: 600 19px/1.6 var(--nios-font);
}
.post-refresh .post-body blockquote p::before,
.post-refresh .post-body blockquote p::after { content: none; }

/* ---- Mid-article category banner (variation 2, dark) ---- */
.post-refresh .post-cat-banner {
	display: flex;
	flex-direction: column;
	background: var(--pr-dark);
	border-radius: 20px;
	overflow: hidden;
	margin: 28px -6px;
}
.post-refresh .post-cat-banner__media { margin: 0; }
.post-refresh .post-cat-banner__img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 0;
}
.post-refresh .post-cat-banner__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.post-refresh .post-cat-banner__eyebrow { font: 600 13px/1.4 var(--nios-font); color: var(--pr-gold); }
.post-refresh .post-body .post-cat-banner__title {
	margin: 0;
	font: 800 22px/1.3 var(--nios-font);
	color: var(--pr-cream);
}
.post-refresh .post-body .post-cat-banner__text { margin: 0; font: 400 15px/1.6 var(--nios-font); color: #e6ddd1; }
.post-refresh .post-cat-banner__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.post-refresh .post-cat-banner__count { font: 400 13px/1.4 var(--nios-font); color: #cfc4b5; order: -1; }
.post-refresh .post-body a.post-cat-banner__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 22px;
	background: var(--pr-gold);
	color: #121211;
	border-radius: 999px;
	font: 700 16px/1.2 var(--nios-font);
	text-decoration: none;
	transition: background-color .15s ease;
}
.post-refresh .post-body a.post-cat-banner__btn:hover { background: var(--pr-gold-hover); color: #121211; }
.post-refresh .post-body a.post-cat-banner__btn:active { background: var(--pr-gold-active); }
.post-refresh .post-body a.post-cat-banner__btn:focus-visible { outline: 2px solid var(--pr-cream); outline-offset: 2px; }

/* ---- Product CTA after the article: dark band ---- */
.post-refresh .post-cta { background: #121211; border-radius: 20px; padding: 26px 22px; }
.post-refresh .post-cta__eyebrow { color: var(--pr-gold); font-size: 13px; }
.post-refresh .post-cta__heading { color: var(--pr-cream); font: 800 24px/1.3 var(--nios-font); }
.post-refresh .post-cta__text { color: #e6ddd1; font: 400 15px/1.6 var(--nios-font); }
.post-refresh .post-cta .post-cta__primary { background: var(--pr-gold); border-color: var(--pr-gold); color: #121211; border-radius: 999px; min-height: 50px; height: auto; }
.post-refresh .post-cta .post-cta__primary:hover { background: var(--pr-gold-hover); border-color: var(--pr-gold-hover); }
.post-refresh .post-cta .post-cta__secondary { background: transparent; border-color: var(--pr-cream); color: var(--pr-cream); border-radius: 999px; min-height: 50px; height: auto; }
.post-refresh .post-cta :is(.post-cta__primary, .post-cta__secondary):focus-visible { outline: 2px solid var(--pr-cream); outline-offset: 2px; }

/* ---- FAQ: cream panel, white items ---- */
.post-refresh .post-faq { padding: 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.post-refresh .post-faq__heading { font: 800 22px/1.3 var(--nios-font); margin: 0 0 4px; }
.post-refresh .post-faq__item { border-top: 0; background: var(--post-bg); border-radius: 12px; padding: 0 16px; }
.post-refresh .post-faq__item:last-child { padding-bottom: 0; }
.post-refresh .post-faq__question { font: 700 16px/1.45 var(--nios-font); padding: 14px 0; min-height: 44px; }
.post-refresh .post-faq__question:focus-visible { outline-color: var(--pr-copper); }
.post-refresh .post-faq__answer { padding: 0 0 14px; }
.post-refresh .post-faq__answer p { font: 400 15px/1.65 var(--nios-font); color: var(--pr-soft); }

/* ---- Author box: a compact row on phones ---- */
.post-refresh .post-author {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 14px;
	align-items: center;
	text-align: start;
	padding: 18px;
}
.post-refresh .post-author .post-author__avatar-img,
.post-refresh .post-author .post-author__avatar-fallback { grid-row: 1 / span 2; margin: 0; width: 48px !important; height: 48px !important; }
.post-refresh .post-author__name { margin: 0; font-size: 16px; }
.post-refresh .post-author__bio { margin: 2px 0 0; font: 400 14px/1.5 var(--nios-font); }
.post-refresh .post-author__link { grid-column: 1 / -1; margin-top: 14px; width: 100%; }

/* ==========================================================================
   Tablet and desktop (768+)
   ========================================================================== */
@media (min-width: 768px) {
	.post-refresh .post-hero {
		padding: 36px 0 0;
		text-align: center;
		background: linear-gradient(to bottom, var(--post-hero) 0, var(--post-hero) calc(100% - 140px), var(--post-bg) calc(100% - 140px), var(--post-bg) 100%);
	}
	.post-refresh .post-hero__breadcrumb { font-size: 14px; }
	.post-refresh .post-hero__cat { font-size: 14px; padding: 4px 14px; }
	.post-refresh .post-hero__title { font-size: 44px; line-height: 1.2; max-width: 860px; margin-inline: auto; }
	.post-refresh .post-hero__lead { font-size: 19px; max-width: 680px; margin: 0 auto 16px; }
	.post-refresh .post-meta { justify-content: center; margin-bottom: 28px; }
	.post-refresh .post-meta__body { flex: 0 1 auto; justify-content: center; }
	.post-refresh .post-meta__author, .post-refresh .post-meta__line { font-size: 14px; }
	.post-refresh .post-hero__media { border-radius: 24px; max-width: 1040px; margin-inline: auto; }

	.post-refresh .post-layout { max-width: 760px; padding-top: 40px; gap: 32px; }
	.post-refresh .post-toc { padding: 18px 22px; }

	.post-refresh .post-body { font-size: 18px; line-height: 1.8; }
	.post-refresh .post-body > p:first-of-type { font-size: 20px; }
	.post-refresh .post-body h2 { font-size: 30px; line-height: 1.3; margin: 44px 0 16px; }

	.post-refresh .post-cat-banner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		border-radius: 22px;
		margin: 32px 0;
	}
	.post-refresh .post-cat-banner--no-img { grid-template-columns: minmax(0, 1fr); }
	.post-refresh .post-cat-banner__media { grid-column: 2; grid-row: 1; }
	.post-refresh .post-cat-banner__img { height: 100%; min-height: 260px; }
	.post-refresh .post-cat-banner__body { grid-column: 1; grid-row: 1; justify-content: center; gap: 10px; padding: 32px; }
	.post-refresh .post-cat-banner__eyebrow { font-size: 14px; }
	.post-refresh .post-body .post-cat-banner__title { font-size: 27px; line-height: 1.25; }
	.post-refresh .post-body .post-cat-banner__text { font-size: 16px; line-height: 1.65; }
	.post-refresh .post-cat-banner__actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 10px; }
	.post-refresh .post-cat-banner__count { order: 0; font-size: 14px; }
	.post-refresh .post-body a.post-cat-banner__btn { display: inline-flex; padding: 0 26px; }

	.post-refresh .post-cta { padding: 34px 32px; }
	.post-refresh .post-cta__heading { font-size: 28px; }
	.post-refresh .post-faq { padding: 24px 28px; }
	.post-refresh .post-faq__heading { font-size: 26px; }
	.post-refresh .post-author__link { width: auto; justify-self: start; padding-inline: 24px; }
}

/* Desktop wide keeps the existing sticky table of contents column; only the
   reading column and the author card adapt. */
@media (min-width: 1600px) {
	.post-refresh .post-layout:not(.post-layout--no-toc) { max-width: none; }
	.post-refresh .post-layout:not(.post-layout--no-toc) .post-layout__main { max-width: 820px; }
	.post-refresh .post-layout--no-toc { max-width: 820px; }
	.post-refresh .post-author { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
	.post-refresh .post-author .post-author__avatar-img,
	.post-refresh .post-author .post-author__avatar-fallback { grid-row: auto; margin: 0 auto 10px; }
	.post-refresh .post-author__link { justify-self: stretch; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.post-refresh .post-body a.post-cat-banner__btn { transition: none; }
}
