/**
 * Single article layout — Phase 2A.5 §15. Reading-first: everything here
 * defers to readability over decoration.
 */

.lbm-breadcrumb {
	font-size: var(--text-meta);
	color: var(--color-neutral-600);
	margin-block: var(--space-5);
}

.lbm-breadcrumb a {
	color: var(--color-neutral-600);
}

.lbm-breadcrumb a:hover {
	color: var(--color-accent);
}

.lbm-breadcrumb__sep {
	margin-inline: var(--space-2);
}

.lbm-single {
	padding-bottom: var(--space-10);
}

.lbm-single__main {
	min-width: 0;
}

.lbm-entry-header {
	max-width: var(--content-max);
	margin-inline: auto;
	margin-bottom: var(--space-7);
}

.lbm-entry-header__title {
	font-size: var(--text-h1);
	margin-top: var(--space-2);
}

.lbm-entry-header--page .lbm-entry-header__title {
	font-size: var(--text-h2);
}

.lbm-entry-header__media {
	margin-top: var(--space-6);
	margin-bottom: 0;
}

.lbm-entry-header__image {
	width: 100%;
	filter: saturate(0.94) contrast(1.03);
}

.lbm-entry-header__caption {
	margin-top: var(--space-2);
}

/* Article body — block-level rhythm within the reading column. */
.lbm-entry-content > * + * {
	margin-top: var(--space-5);
}

.lbm-entry-content h2,
.lbm-entry-content h3 {
	margin-top: var(--space-7);
	margin-bottom: var(--space-4);
}

.lbm-entry-content ul,
.lbm-entry-content ol {
	padding-left: var(--space-6);
}

.lbm-entry-content li + li {
	margin-top: var(--space-3);
}

.lbm-entry-content figure {
	margin-block: var(--space-6);
}

.lbm-entry-content table {
	font-size: 0.9375rem;
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.lbm-entry-content table th,
.lbm-entry-content table td {
	padding: var(--space-3);
	border-bottom: 1px solid var(--color-border);
	text-align: left;
}

.lbm-entry-content pre,
.lbm-entry-content code {
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	background-color: var(--color-surface);
	border-radius: var(--radius-sm);
}

.lbm-entry-content pre {
	padding: var(--space-5);
	overflow-x: auto;
}

.lbm-entry-content code {
	padding: 2px 6px;
	font-size: 0.875em;
}

/* Entry footer — tags, share, related. */
.lbm-entry-footer {
	margin-top: var(--space-9);
	padding-top: var(--space-7);
	border-top: 1px solid var(--color-border);
}

.lbm-entry-footer__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-6);
}

.lbm-tag {
	display: inline-block;
	font-size: var(--text-meta);
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-full);
	color: var(--color-neutral-700);
}

.lbm-tag:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
}

.lbm-entry-footer__share {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-bottom: var(--space-8);
}

.lbm-entry-footer__share-label {
	font-size: var(--text-meta);
	text-transform: uppercase;
	letter-spacing: var(--tracking-kicker);
	color: var(--color-neutral-600);
}

.lbm-entry-footer__share-link {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
	border: 1px solid var(--color-border);
	color: var(--color-neutral-700);
}

.lbm-entry-footer__share-link:hover {
	color: var(--color-accent);
	border-color: var(--color-accent);
}

/* Author authority module. */
.lbm-author-bio {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin-top: var(--space-8);
	padding: var(--space-5);
	background-color: var(--color-surface);
	border-radius: var(--radius-sm);
}

.lbm-author-bio__photo {
	flex-shrink: 0;
}

.lbm-author-bio__body {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: var(--space-3);
}

.lbm-author-bio__label {
	flex-basis: 100%;
	font-size: var(--text-meta);
	text-transform: uppercase;
	letter-spacing: var(--tracking-kicker);
	color: var(--color-neutral-600);
	margin-bottom: var(--space-1);
}

.lbm-author-bio__name {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: var(--text-h4);
	color: var(--color-ink);
}

.lbm-author-bio__text {
	flex-basis: 100%;
	margin-top: var(--space-2);
	color: var(--color-neutral-700);
	max-width: 60ch;
}

.lbm-author-bio__link {
	flex-basis: 100%;
	margin-top: var(--space-2);
	font-size: var(--text-caption);
}

/* Mid-article newsletter capture (P2 roadmap item) — a lighter-weight
   inline sibling to the homepage's .lbm-newsletter beat: a boxed card
   within the reading column rather than its own full-bleed section, so
   it reads as a pause in the article rather than a page-level interrupt. */
.lbm-newsletter-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5);
	margin-block: var(--space-7);
	padding: var(--space-5);
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

.lbm-newsletter-inline__text {
	flex: 1 1 260px;
}

.lbm-newsletter-inline__title {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: var(--text-h4);
	color: var(--color-ink);
}

.lbm-newsletter-inline__dek {
	margin-top: var(--space-1);
	font-size: var(--text-caption);
	color: var(--color-neutral-700);
}

.lbm-newsletter-inline__form {
	display: flex;
	gap: var(--space-3);
	flex: 1 1 320px;
}

.lbm-newsletter-inline__input {
	flex: 1;
	min-width: 0;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background-color: var(--color-paper);
}

@media (max-width: 480px) {
	.lbm-newsletter-inline__form {
		flex-direction: column;
	}
}

/* TEMPORARY: AdSense placeholder preview boxes (P2 roadmap item) — visual
   only, no real ad code yet. Remove/replace once real snippets land; see
   lbm_render_ad_placeholder() in inc/ad-placeholders.php for the single
   place that generates these. Dashed border deliberately reads as
   "not-finished/preview", not a real content block. */
.lbm-ad-placeholder-box {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 90px;
	margin-block: var(--space-6);
	padding: var(--space-5);
	background-color: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
	border: 2px dashed var(--color-accent);
	border-radius: var(--radius-sm);
	text-align: center;
}

.lbm-ad-placeholder-box__label {
	font-size: var(--text-caption);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--tracking-kicker);
	color: var(--color-accent);
}

/* The in-grid category marker (category.php) is injected as a literal
   grid item alongside the post cards, so it inherits a single card-width
   track by default — span the full grid instead so it reads as a
   section break, not a stranded narrow card. Targets both the unfinished
   preview box (.lbm-ad-placeholder-box) and the live in-feed ad's stable
   wrapper (.lbm-ad-infeed, set in lbm_render_ad_placeholder()) — the
   wrapper class exists specifically so this rule doesn't depend on
   AdSense's own <ins>/adsbygoogle markup, which isn't ours to rely on. */
.lbm-card-grid > .lbm-ad-placeholder-box,
.lbm-card-grid > .lbm-ad-infeed {
	grid-column: 1 / -1;
}

/* Site-logo badge standing in for an individual headshot — a rounded
   square, not the circular crop a photo would use, so the logo's own
   shape isn't clipped. */
.lbm-editorial-badge {
	width: 72px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background-color: var(--color-paper);
	border: 1px solid var(--color-border);
}

.lbm-editorial-badge__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: saturate(0.94) contrast(1.03);
}

.lbm-related-posts {
	margin-top: var(--space-8);
	padding-top: var(--space-6);
	border-top: 1px solid var(--color-border);
}

.lbm-related-posts__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-6);
}

.lbm-related-posts__header .lbm-kicker {
	flex-basis: 100%;
	margin-bottom: 0;
}

.lbm-related-posts__title {
	font-size: var(--text-h3);
}

.lbm-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
}

.lbm-related-posts__grid .lbm-card__dek {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 767px) {
	.lbm-related-posts__grid {
		grid-template-columns: 1fr;
	}
}

/* Sidebar rail. */
.lbm-single__sidebar {
	padding-top: var(--space-2);
}

/* Editorial masthead rubric rather than a plain uppercase label: serif
   display type (matching the showcase/trending section headings) plus a
   short accent-colored rule overlapping the full-width border — the same
   "restrained masthead rule" device used on the site footer, echoed here
   at sidebar scale so it reads as this publication's own typographic
   system rather than a generic widget title. */
.lbm-sidebar-popular__title {
	position: relative;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: var(--text-h3);
	color: var(--color-ink);
	margin-bottom: var(--space-5);
	padding-bottom: var(--space-4);
	border-bottom: 1px solid var(--color-border);
}

.lbm-sidebar-popular__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 40px;
	height: 2px;
	background-color: var(--color-accent);
}

.lbm-sidebar-popular__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
}

/* Comments. */
.lbm-comments {
	margin-top: var(--space-9);
	padding-top: var(--space-7);
	border-top: 1px solid var(--color-border);
}

.lbm-comments__title {
	font-size: var(--text-h3);
	margin-bottom: var(--space-6);
}

.lbm-comments__list {
	list-style: none;
}

.lbm-comments__list li + li {
	margin-top: var(--space-5);
}

/* Pagination (shared: category/archive/author/search). */
.lbm-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-8);
}

.lbm-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.lbm-pagination a,
.lbm-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: var(--space-3);
	border-radius: var(--radius-sm);
	font-size: 0.9375rem;
}

.lbm-pagination a:hover {
	background-color: var(--color-surface);
}

.lbm-pagination .current {
	background-color: var(--color-accent);
	color: var(--color-paper);
}
