/* single.css — single post template (astro EfSyn-style, dimocracy brand).
   Scoped to .single / .single__*. Foundation tokens from critical.css :root.
   Shared chrome (.breadcrumb, .section-header, .post, .aside*, .tag-item,
   .post-thumbnail) lives in main.css; this file adds the reading polish. */

/* ---------- Layout: header band + two columns ---------- */
/* The article wrapper carries post_class() output, which includes the bare
   `.post` class — and main.css styles `.post` as a horizontal flex row (the
   list-card component). Neutralise that on the single article so its sections
   stack normally. Specificity (.single.article = 0,2,0) beats `.post` (0,1,0). */
.single.article {
	display: block;
	gap: 0;
	padding: 0;
	border-bottom: 0;
	align-items: initial;
}

.single__section-header {
	margin-bottom: 0;
	border-top: 0;
}

.single__container {
	max-width: 1160px;
}

/* Two tracks sized to their content and centred together, so there is no dead
   space between the article (max 760) and the sidebar (320). */
.single__layout {
	display: grid;
	grid-template-columns: minmax(0, 760px) 320px;
	justify-content: center;
	gap: 44px;
	align-items: start;
	padding: 28px 0 64px;
}

.single__main {
	min-width: 0;
}

/* The article column keeps a comfortable reading measure even though the
   main grid track is wide (astro --prose-max ≈ 56ch; we use ~720px). */
.single__main > .single {
	max-width: 760px;
}

/* ---------- Hero: vignette · title · lead · utilities ---------- */
.single__hero {
	margin-bottom: 26px;
}

.single__vignette {
	display: inline-block;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .7px;
	text-transform: uppercase;
	color: var(--color-accent-red);
	margin-bottom: 14px;
}

.single__vignette:hover {
	color: var(--color-accent-red-dark);
}

.single__title {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.16;
	letter-spacing: -.4px;
	color: var(--color-ink);
	margin: 0 0 16px;
	text-wrap: balance;
}

.single__lead {
	font-family: var(--font-sans);
	font-weight: 400;
	font-size: 19px;
	line-height: 1.5;
	color: var(--color-muted);
	margin: 0 0 22px;
	max-width: 62ch;
}

/* Utilities bar: byline (avatar + author/date) left, share right.
   Hairline rules top & bottom — astro .article-utilities polish. */
.single__utilities {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	padding: 16px 0;
	border-top: 1px solid var(--color-line);
	border-bottom: 1px solid var(--color-line);
}

.single__byline {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.single__avatar {
	flex: 0 0 auto;
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--color-line);
}

.single__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single__byline-text {
	display: flex;
	flex-flow: column nowrap;
	gap: 3px;
	min-width: 0;
}

.single__author {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.1;
	color: var(--color-ink);
}

.single__author:hover {
	color: var(--color-accent-red);
}

.single__date {
	font-family: var(--font-sans);
	font-weight: 400;
	font-size: 12px;
	letter-spacing: .2px;
	line-height: 1.2;
	color: var(--color-faint);
}

/* Share buttons — outlined squares that fill red on hover (astro icon nav). */
.single__share {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.single__share-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--color-line-strong);
	color: var(--color-ink);
	transition: var(--transition, all .2s ease);
}

.single__share-link:hover {
	background: var(--color-accent-red);
	border-color: var(--color-accent-red);
	color: #fff;
}

/* ---------- Featured image ---------- */
.single__featured {
	margin: 0 0 30px;
	position: relative;
}

.single__featured-img {
	display: block;
	width: 100%;
	height: auto;
}

.single__featured-caption {
	font-family: var(--font-sans);
	font-weight: 400;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--color-faint);
	text-align: right;
	margin-top: 8px;
}

/* ---------- Article body: prose typography ---------- */
.single__body {
	font-family: var(--font-sans);
	font-size: 18px;
	line-height: 1.72;
	color: var(--color-text);
	max-width: 680px;
}

.single__body > * {
	margin-top: 0;
	margin-bottom: 1.45em;
}

.single__body > *:last-child {
	margin-bottom: 0;
}

.single__body p {
	margin: 0 0 1.45em;
}

/* Inline links — astro dotted-red underline that goes solid + tinted on hover. */
.single__body :is(p, li, blockquote, figcaption) a {
	color: var(--color-accent-red);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
	transition: background-color .2s ease, color .2s ease;
}

.single__body :is(p, li, blockquote, figcaption) a:hover {
	text-decoration-style: solid;
	background: rgba(208, 27, 40, .08);
	color: var(--color-accent-red-dark);
}

/* Dropcap on the first paragraph — astro .dropcap, serif, 5em float.
   Imported posts (feed pipeline / ad-inserter) wrap the body in a leading
   <div>, so the real first paragraph is `.single__body > div:first-child > p`
   rather than a direct child — match both shapes so the dropcap is reliable. */
.single__body > p:first-of-type::first-letter,
.single__body > div:first-child > p:first-of-type::first-letter {
	float: left;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 4.6em;
	line-height: .78;
	margin: .04em .1em 0 0;
	color: var(--color-ink);
}

.single__body h2,
.single__body h3,
.single__body h4 {
	font-family: var(--font-serif);
	font-weight: 700;
	color: var(--color-ink);
	line-height: 1.22;
	letter-spacing: -.2px;
	margin: 1.7em 0 .55em;
}

.single__body h2 { font-size: 25px; }
.single__body h3 { font-size: 21px; }
.single__body h4 { font-size: 18px; }

.single__body img {
	max-width: 100%;
	height: auto;
}

.single__body figure {
	margin: 1.7em 0;
}

.single__body figcaption {
	font-family: var(--font-sans);
	font-size: 12.5px;
	color: var(--color-faint);
	text-align: right;
	margin-top: 7px;
}

.single__body ul,
.single__body ol {
	margin: 0 0 1.45em;
	padding-left: 1.3em;
}

.single__body li {
	margin-bottom: .5em;
}

/* Blockquote — astro pull-quote: serif, red rule, oversized opening mark. */
.single__body blockquote {
	position: relative;
	margin: 1.8em 0;
	padding: 4px 0 4px 26px;
	border-left: 4px solid var(--color-accent-red);
	font-family: var(--font-serif);
	font-weight: 500;
	font-size: 1.06em;
	line-height: 1.4;
	color: var(--color-ink);
}

.single__body blockquote p {
	margin: 0 0 .5em;
}

.single__body blockquote p:last-child {
	margin-bottom: 0;
}

/* Highlight callout (astro .highlight) — tinted block with a big red symbol. */
.single__body .highlight {
	position: relative;
	background: var(--color-bg-alt);
	padding: 16px 18px;
	border-left: 4px solid var(--color-accent-red);
	font-weight: 400;
}

.single__body .highlight::before {
	content: var(--symbol, "#");
	float: left;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 3.2em;
	line-height: .72;
	margin: .02em .18em 0 0;
	color: var(--symbol-color, var(--color-accent-red));
}

.single__body strong,
.single__body b {
	font-weight: 700;
	color: var(--color-ink);
}

.single__body iframe {
	max-width: 100%;
	display: block;
}

/* wp_link_pages */
.single__pagelinks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 1.8em 0 0;
	font-family: var(--font-sans);
	font-size: 14px;
}

.single__pagelinks-label {
	font-weight: 600;
	color: var(--color-muted);
}

.single__pagelinks a,
.single__pagelink {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--color-line-strong);
	font-weight: 600;
}

.single__pagelinks a:hover {
	border-color: var(--color-accent-red);
	color: var(--color-accent-red);
}

/* ---------- Footer: tags · author box · related ---------- */
.single__footer {
	margin-top: 40px;
	display: flex;
	flex-flow: column nowrap;
	gap: 40px;
	max-width: 680px;
}

/* Tags — astro tag-list (reuses .tag-item from main.css), with a red-ruled heading. */
.single__tags-heading {
	display: inline-flex;
	align-items: center;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .6px;
	color: var(--color-ink);
	margin: 0 0 14px;
	padding-left: 14px;
	position: relative;
	text-transform: uppercase;
}

.single__tags-heading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--color-accent-red);
}

.single__tag-list {
	list-style: none;
	display: flex;
	flex-flow: row wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.single__tag {
	display: inline-block;
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 12px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .3px;
	padding: 8px 12px;
	background: var(--color-bg-alt);
	color: var(--color-muted);
	border: 1px solid var(--color-line);
	transition: var(--transition, all .2s ease);
}

.single__tag:hover {
	color: #fff;
	background: var(--color-accent-red);
	border-color: var(--color-accent-red);
}

/* Author bio box — astro author block: avatar + eyebrow + name + bio. */
.single__authorbox {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	padding: 22px;
	background: var(--color-bg-alt);
	border-top: 3px solid var(--color-accent-red);
}

.single__authorbox-avatar {
	flex: 0 0 auto;
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--color-line);
}

.single__authorbox-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single__authorbox-body {
	min-width: 0;
}

.single__authorbox-eyebrow {
	display: block;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--color-faint);
	margin-bottom: 4px;
}

.single__authorbox-name {
	display: inline-block;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	color: var(--color-ink);
	margin-bottom: 8px;
}

.single__authorbox-name:hover {
	color: var(--color-accent-red);
}

.single__authorbox-bio {
	font-family: var(--font-sans);
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-muted);
	margin: 0;
}

/* Related grid — astro post-grid--default: 2x2 cards under a ruled heading. */
.single__related-heading {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: -.2px;
	color: var(--color-ink);
	margin: 0 0 18px;
	padding: 0 0 10px;
	border-bottom: 2px solid var(--color-ink);
	text-transform: uppercase;
}

.single__related-heading a {
	color: inherit;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.single__related-heading a::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-accent-red);
	flex: 0 0 auto;
}

.single__related-heading a:hover {
	color: var(--color-accent-red);
}

.single__related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px 26px;
}

/* Related cards are vertical (override the shared horizontal .post row). */
.single__related-card {
	display: flex;
	flex-flow: column nowrap;
	gap: 0;
	padding: 0;
	border-bottom: 0;
}

.single__related-card .post-thumbnail {
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 16 / 10;
	margin: 0 0 12px;
}

.single__related-card .content {
	gap: 6px;
}

.single__related-card .title {
	font-size: 16px;
	line-height: 1.3;
}

.single__related-card .date {
	font-family: var(--font-sans);
	font-size: 11px;
	letter-spacing: .3px;
	text-transform: uppercase;
	color: var(--color-faint);
}

/* ---------- Sidebar ---------- */
.single__aside {
	min-width: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.single__layout {
		grid-template-columns: minmax(0, 680px) 280px;
		gap: 36px;
	}
	.single__main > .single {
		max-width: 680px;
	}
}

@media (max-width: 900px) {
	.single__layout {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.single__main > .single,
	.single__body,
	.single__footer {
		max-width: none;
	}
	.single__aside {
		max-width: 680px;
	}
}

@media (max-width: 600px) {
	.single__title {
		font-size: 25px;
	}
	.single__lead {
		font-size: 17px;
	}
	.single__body {
		font-size: 17px;
	}
	.single__body > p:first-of-type::first-letter,
	.single__body > div:first-child > p:first-of-type::first-letter {
		font-size: 3.8em;
	}
	.single__utilities {
		gap: 12px;
	}
	.single__related-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}
	.single__authorbox {
		flex-direction: column;
		gap: 14px;
		padding: 18px;
	}
}

/* Desktop: a touch larger title, matching astro's clamp top end. */
@media (min-width: 1019px) {
	.single__title {
		font-size: 34px;
	}
}
