/* Single post and page reading layout. */
.reading-wrap {
	width: min(calc(100% - 40px), var(--pm-reading));
	margin-inline: auto;
}

/* Hero posts start directly below the sticky header; non-hero singular views keep global main spacing. */
.site-main--hero { padding-top: 0; }

.entry-header { margin-bottom: 32px; }

/* Breadcrumbs remain compact so they orient the reader without competing with the title. */
.breadcrumbs { margin: 0 0 14px; }

.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .76rem;
	line-height: 1.45;
	color: var(--pm-muted);
}

.breadcrumbs__item { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumbs__item:not(:last-child)::after { content: "/"; margin: 0 8px; opacity: .55; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--pm-fg); text-decoration: underline; }
.breadcrumbs a:visited { color: var(--pm-muted); }
.breadcrumbs__item:last-child span { overflow-wrap: anywhere; }

.entry-details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 14px;
	font-size: .78rem;
	line-height: 1.5;
	color: var(--pm-muted);
}

.entry-details__item { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
.entry-details__label { font-weight: 750; color: var(--pm-fg); }
.entry-details a { color: inherit; text-decoration: none; }
.entry-details a:hover { color: var(--pm-fg); text-decoration: underline; }
.entry-details a:visited { color: var(--pm-muted); }

.entry-title {
	margin: 0 0 12px;
	font-size: clamp(2rem, 6vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.045em;
}

/* Full-width single-post hero. The article is full width; reading content stays inside .reading-wrap. */
.entry-thumbnail {
	position: relative;
	width: 100%;
	height: clamp(500px, 72vh, 820px);
	height: clamp(500px, 72svh, 820px);
	margin: 0 0 42px;
	overflow: hidden;
	background: var(--pm-bg);
}

.entry-thumbnail::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgb(var(--pm-overlay-rgb) / .68);
	pointer-events: none;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	border-radius: 0;
}

.entry-header--hero {
	position: absolute;
	z-index: 1;
	left: 50%;
	bottom: clamp(30px, 6vh, 72px);
	width: min(calc(100% - 40px), var(--pm-reading));
	margin: 0;
	transform: translateX(-50%);
	color: rgb(var(--pm-hero-text-rgb));
}

.entry-header--hero .breadcrumbs,
.entry-header--hero .entry-details {
	color: rgb(var(--pm-hero-text-rgb) / .82);
}

.entry-header--hero .breadcrumbs a,
.entry-header--hero .entry-details a { color: inherit; }
.entry-header--hero .breadcrumbs a:hover,
.entry-header--hero .entry-details a:hover { color: rgb(var(--pm-hero-text-rgb)); }
.entry-header--hero .entry-details__label { color: rgb(var(--pm-hero-text-rgb) / .96); }

.entry-header--hero .entry-title {
	margin-bottom: 0;
	font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.entry-content {
	font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
	line-height: 1.75;
}

.entry-content > * { max-width: 100%; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	line-height: 1.25;
	letter-spacing: -0.025em;
	scroll-margin-top: 88px;
}

.entry-content h2 {
	margin-top: 2.2em;
	margin-bottom: .8em;
}

.entry-content h3 {
	margin-top: 1.8em;
	margin-bottom: .7em;
}

.entry-content h4 { margin-top: 1.6em; }

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
	margin-top: 0;
	margin-bottom: 1.4em;
}

.entry-content a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.entry-content blockquote {
	margin-left: 0;
	padding-left: 20px;
	border-left: 3px solid var(--pm-accent);
	color: var(--pm-muted);
}

.entry-content pre {
	overflow: auto;
	padding: 18px;
	background: var(--pm-surface);
	color: var(--pm-fg);
	border: 1px solid var(--pm-border);
	border-radius: 8px;
}

.entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .92em;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.4em;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border: 1px solid var(--pm-border);
	text-align: left;
}

/* Lightweight post table of contents: only injected when >= 3 H2/H3 headings exist. */
.article-toc {
	margin: 0 0 2.2em;
	padding: 18px 20px;
	border: 1px solid var(--pm-border);
	border-radius: 8px;
	background: var(--pm-surface);
}

.article-toc__title {
	margin: 0 0 10px;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pm-muted);
}

.article-toc__list {
	margin: 0;
	padding-left: 1.35em;
	font-size: .94em;
	line-height: 1.55;
}

.article-toc__item { margin: .35em 0; }
.article-toc__item--h3 { margin-left: 1.1em; }
.article-toc a { color: var(--pm-fg); text-decoration: none; }
.article-toc a:hover { color: var(--pm-fg); text-decoration: underline; }
.article-toc a:visited { color: var(--pm-muted); }

@media (max-width: 1024px) {
	.entry-thumbnail {
		height: clamp(440px, 64vh, 680px);
		height: clamp(440px, 64svh, 680px);
	}
	.entry-header--hero .entry-title { font-size: clamp(2.35rem, 7vw, 4rem); }
}

@media (max-width: 620px) {
	.reading-wrap { width: min(calc(100% - 28px), var(--pm-reading)); }
	.entry-thumbnail {
		height: clamp(380px, 58vh, 560px);
		height: clamp(380px, 58svh, 560px);
		margin-bottom: 30px;
	}
	.entry-header--hero {
		bottom: 24px;
		width: min(calc(100% - 28px), var(--pm-reading));
	}
	.entry-header--hero .entry-details,
	.entry-header--hero .breadcrumbs__list { font-size: .72rem; }
	.entry-header--hero .entry-title { font-size: clamp(2rem, 10vw, 3.25rem); }
	.article-toc { padding: 16px; }
}

@media (max-height: 600px) and (orientation: landscape) {
	.entry-thumbnail {
		height: clamp(320px, 78vh, 520px);
		height: clamp(320px, 78svh, 520px);
	}
	.entry-header--hero { bottom: 24px; }
}

/* Long-form mobile typography: raise compact metadata and body copy one step. */
@media (max-width: 620px) {
	.entry-header--hero .entry-details,
	.entry-header--hero .breadcrumbs__list,
	.breadcrumbs__list,
	.entry-details { font-size: .79rem; }

	.entry-header--hero .entry-title { font-size: clamp(2.15rem, 10.5vw, 3.35rem); }
	.entry-content { font-size: 1.12rem; }
	.article-toc__title { font-size: .86rem; }
	.article-toc__list { font-size: 1rem; }
}
