/**
 * Heavens Cedarcrest 0.7.4 compact rhythm overrides.
 * Loaded after the base and page-specific stylesheets.
 */

:root {
	--cc-block-gap: clamp(8px, 1.15vw, 14px);
	--cc-compact-wide-gap: clamp(14px, 2vw, 26px);
	--cc-inner-leading-gap: clamp(18px, 2vw, 28px);
}

/* Keep page sections close without shrinking interactive targets. */
.archive-content,
.archive-main .archive-content,
.singular-surface {
	padding-bottom: clamp(42px, 5vw, 72px);
}

.archive-real-content {
	margin-bottom: clamp(18px, 3vw, 32px);
}

.archive-real-content.has-media,
.connect-grid,
.events-grid,
.prayer-intro-grid,
.giving-hero__grid,
.footer-grid {
	gap: var(--cc-compact-wide-gap);
}

.post-grid,
.taxonomy-card-grid,
.content-rail,
.legacy-gallery,
.prayer-list,
.giving-methods {
	gap: var(--cc-block-gap);
}

.legacy-gallery {
	margin-top: clamp(18px, 3vw, 32px);
	padding-bottom: 10px;
}

.legacy-media,
.entry-content > figure,
.entry-content > .wp-block-image,
.entry-content > .wp-block-gallery,
.entry-content > .wp-block-video,
.entry-content > .wp-block-audio,
.entry-content > .wp-block-embed {
	margin-top: clamp(14px, 2vw, 24px);
	margin-bottom: clamp(14px, 2vw, 24px);
}

.entry-content > h2,
.entry-content > h3,
.entry-content > h4 {
	margin-top: 1.15em;
	margin-bottom: 0.5em;
}

.rail-controls {
	margin-top: clamp(26px, 4vw, 48px);
	margin-bottom: 12px;
}

.footer-grid {
	row-gap: clamp(18px, 2.5vw, 28px);
}

.footer-bottom {
	margin-top: 24px;
	padding-top: 18px;
}

/* Worship recordings: narrow, low-profile rows with a still-usable player. */
.legacy-audio-playlist {
	width: min(100%, 720px);
	gap: 8px;
	margin: 16px auto 22px;
}

.legacy-audio-track {
	grid-template-columns: minmax(118px, 156px) minmax(240px, 1fr);
	gap: 8px;
	padding: 7px 9px;
	border-radius: 12px;
}

.legacy-audio-track h3 {
	font-size: 0.76rem;
	line-height: 1.2;
}

.legacy-audio-track audio {
	min-width: 0;
	height: 34px;
}

/* Home sections share the same tighter rhythm as inner pages. */
.home-v2-section {
	padding-block: clamp(22px, 2.8vw, 36px);
}

.home-v2-section-heading {
	margin-bottom: clamp(12px, 1.5vw, 18px);
}

.home-v2-rail__track {
	gap: 10px;
	padding-bottom: 8px;
}

.home-v2-story,
.home-v2-feature {
	padding-top: clamp(18px, 2.4vw, 30px);
	padding-bottom: clamp(18px, 2.4vw, 30px);
}

.home-v2-story__inner,
.home-v2-feature__inner {
	gap: clamp(16px, 2.5vw, 26px);
}

.home-v2-story__copy > p,
.home-v2-feature__copy > p {
	margin-top: 10px;
	margin-bottom: 12px;
}

@media (max-width: 560px) {
	:root {
		--cc-inner-leading-gap: 16px;
	}

	.archive-content,
	.archive-main .archive-content,
	.singular-surface {
		padding-bottom: 38px;
	}

	.legacy-audio-playlist {
		width: 100%;
		gap: 7px;
		margin-top: 14px;
		margin-bottom: 18px;
	}

	.legacy-audio-track {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
		padding: 8px 9px;
		border-radius: 12px;
	}

	.legacy-audio-track h3 {
		font-size: 0.74rem;
	}

	.legacy-audio-track audio {
		width: 100%;
		height: 34px;
	}
}

/* Release 0.7.5: compact cards and restrained article headings site-wide. */
.archive-content,
.archive-main .archive-content,
.singular-surface {
	padding-top: clamp(24px, 3vw, 40px);
}

.post-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 270px));
	justify-content: center;
	gap: 12px;
}

.post-card {
	width: 100%;
	max-width: 270px;
	border-radius: 16px;
}

.post-card:hover,
.post-card:focus-within {
	transform: translateY(-2px);
}

.post-card-media {
	aspect-ratio: 16 / 10;
}

.post-card.category-nasha-komanda .post-card-media img {
	object-position: center top;
}

.post-card-body,
.post-card--audio .post-card-body {
	min-height: 0;
	padding: 13px 14px 14px;
}

.post-card-meta {
	gap: 4px 8px;
	font-size: 0.6rem;
	line-height: 1.25;
}

.post-card-kicker {
	margin: 0 0 5px;
	font-size: 0.64rem;
	line-height: 1.25;
}

.post-card h2,
.post-card--audio h2 {
	display: -webkit-box;
	margin: 7px 0 8px;
	overflow: hidden;
	font-size: clamp(1.08rem, 1.35vw, 1.34rem);
	line-height: 1.12;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.post-card-excerpt,
.post-card--audio .post-card-excerpt {
	flex: 0 1 auto;
	margin-top: auto;
	color: var(--cc-muted);
	font-size: 0.78rem;
	line-height: 1.4;
}

.post-card-excerpt p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card-read-more {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 7px;
	color: var(--cc-accent-text);
	font-family: var(--cc-sans);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.055em;
	text-decoration: none;
	text-transform: uppercase;
}

.post-card-read-more:hover,
.post-card-read-more:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.post-card--audio {
	max-width: 300px;
}

.post-card--audio .post-card-audio {
	height: 34px;
	margin-top: 2px;
}

.taxonomy-card-grid {
	width: min(100%, 840px);
	margin-inline: auto;
	gap: 12px;
}

.taxonomy-card {
	min-height: clamp(170px, 18vw, 220px);
	border-radius: 18px;
}

.taxonomy-card strong {
	right: 16px;
	bottom: 16px;
	left: 16px;
	font-size: clamp(1.2rem, 1.75vw, 1.75rem);
	line-height: 1;
}

.single-content-header {
	margin-bottom: clamp(16px, 2vw, 26px);
}

.single-content-header h1,
.single-editorial-header h1 {
	max-width: 20ch;
	font-size: clamp(1.8rem, 3vw, 3rem);
	line-height: 1.08;
}

.entry-content > h1 {
	font-size: clamp(1.65rem, 2.7vw, 2.7rem);
}

.entry-content > h2 {
	font-size: clamp(1.4rem, 2.2vw, 2.15rem);
}

.entry-content > h3 {
	font-size: clamp(1.18rem, 1.8vw, 1.7rem);
}

@media (max-width: 560px) {
	.archive-content,
	.archive-main .archive-content,
	.singular-surface {
		padding-top: 20px;
	}

	.post-grid {
		grid-template-columns: minmax(0, 270px);
		gap: 10px;
	}

	.post-card h2,
	.post-card--audio h2 {
		font-size: 1.12rem;
	}

	.taxonomy-card-grid {
		gap: 10px;
	}

	.taxonomy-card {
		min-height: 170px;
	}

	.single-content-header h1,
	.single-editorial-header h1 {
		font-size: clamp(1.65rem, 8vw, 2.25rem);
	}
}

/* Release 2.0.0: slimmer shared chrome, alternating homepage surface and sermon rows. */
:root {
	--cc-chrome-clearance: 78px;
}

body.home .site-chrome,
body.home .site-chrome.is-scrolled,
body:not(.home) .site-chrome,
body:not(.home) .site-chrome.is-scrolled {
	padding-top: 5px;
}

body.home .site-chrome::before,
body.home .site-chrome.is-scrolled::before,
body:not(.home) .site-chrome::before,
body:not(.home) .site-chrome.is-scrolled::before {
	inset: -4px 0 -6px;
}

body.home .site-header,
body.home .site-chrome.is-scrolled .site-header,
body.home .header-inner,
body:not(.home) .site-header,
body:not(.home) .site-chrome.is-scrolled .site-header,
body:not(.home) .header-inner {
	min-height: 56px;
}

body.home .site-chrome .site-brand,
body:not(.home) .site-chrome .site-brand {
	gap: 10px;
}

body.home .site-chrome .site-brand-logo img,
body:not(.home) .site-chrome .site-brand-logo img {
	width: 48px;
	max-width: 48px;
	height: 48px;
}

body.home .site-chrome .site-brand-copy small,
body:not(.home) .site-chrome .site-brand-copy small {
	font-size: 0.54rem;
	letter-spacing: 0.19em;
}

body.home .site-chrome .site-brand-copy strong,
body:not(.home) .site-chrome .site-brand-copy strong {
	margin-top: 4px;
	font-size: clamp(1.55rem, 2vw, 1.9rem);
}

body.home .site-chrome .heavens-menu-toggle,
body:not(.home) .site-chrome .heavens-menu-toggle {
	width: 44px;
	min-width: 44px;
	height: 44px;
	min-height: 44px;
	border-radius: 12px;
}

/* Match the About rail to the neutral (Prayer) story without bypassing palettes. */
.home-v2-about {
	background-color: var(--home-neutral);
	background-image: radial-gradient(rgba(64, 65, 64, 0.045) 1px, transparent 1px);
	background-size: 13px 13px;
}

/* Sermon archives keep .post-card nodes so infinite pagination can append safely. */
.archive-term-propovidi .post-grid,
.archive-term-sermons .post-grid,
.archive-term-propovedi .post-grid,
.archive-term-propovedi-ru .post-grid {
	width: min(100%, 720px);
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin: 16px auto 22px;
}

.archive-term-propovidi .post-card--audio,
.archive-term-sermons .post-card--audio,
.archive-term-propovedi .post-card--audio,
.archive-term-propovedi-ru .post-card--audio {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 0;
	background: var(--cc-surface);
	border: 1px solid var(--cc-line);
	border-radius: 12px;
	box-shadow: none;
}

.archive-term-propovidi .post-card--audio:hover,
.archive-term-propovidi .post-card--audio:focus-within,
.archive-term-sermons .post-card--audio:hover,
.archive-term-sermons .post-card--audio:focus-within,
.archive-term-propovedi .post-card--audio:hover,
.archive-term-propovedi .post-card--audio:focus-within,
.archive-term-propovedi-ru .post-card--audio:hover,
.archive-term-propovedi-ru .post-card--audio:focus-within {
	transform: none;
}

.archive-term-propovidi .post-card--audio .post-card-body,
.archive-term-sermons .post-card--audio .post-card-body,
.archive-term-propovedi .post-card--audio .post-card-body,
.archive-term-propovedi-ru .post-card--audio .post-card-body {
	display: grid;
	grid-template-columns: minmax(118px, 156px) minmax(240px, 1fr);
	gap: 8px;
	align-items: center;
	padding: 7px 9px;
}

.archive-term-propovidi .post-card--audio :is(.post-card-meta, .post-card-kicker),
.archive-term-sermons .post-card--audio :is(.post-card-meta, .post-card-kicker),
.archive-term-propovedi .post-card--audio :is(.post-card-meta, .post-card-kicker),
.archive-term-propovedi-ru .post-card--audio :is(.post-card-meta, .post-card-kicker) {
	display: none;
}

.archive-term-propovidi .post-card--audio h2,
.archive-term-sermons .post-card--audio h2,
.archive-term-propovedi .post-card--audio h2,
.archive-term-propovedi-ru .post-card--audio h2 {
	display: block;
	margin: 0;
	overflow: visible;
	font-family: var(--cc-sans);
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1.2;
	-webkit-box-orient: initial;
	-webkit-line-clamp: initial;
}

.archive-term-propovidi .post-card--audio .post-card-audio,
.archive-term-sermons .post-card--audio .post-card-audio,
.archive-term-propovedi .post-card--audio .post-card-audio,
.archive-term-propovedi-ru .post-card--audio .post-card-audio {
	width: 100%;
	min-width: 0;
	height: 34px;
	margin: 0;
}

@media (max-width: 820px) {
	:root {
		--cc-chrome-clearance: 68px;
	}

	body.home .site-chrome,
	body.home .site-chrome.is-scrolled,
	body:not(.home) .site-chrome,
	body:not(.home) .site-chrome.is-scrolled {
		padding-top: 4px;
	}

	body.home .site-header,
	body.home .site-chrome.is-scrolled .site-header,
	body.home .header-inner,
	body:not(.home) .site-header,
	body:not(.home) .site-chrome.is-scrolled .site-header,
	body:not(.home) .header-inner {
		min-height: 50px;
	}

	body.home .site-chrome .site-brand,
	body.home .header-inner,
	body:not(.home) .site-chrome .site-brand,
	body:not(.home) .header-inner {
		gap: 8px;
	}

	body.home .site-chrome .site-brand-logo img,
	body:not(.home) .site-chrome .site-brand-logo img {
		width: 42px;
		max-width: 42px;
		height: 42px;
	}

	body.home .site-chrome .site-brand-copy small,
	body:not(.home) .site-chrome .site-brand-copy small {
		font-size: 0.46rem;
		letter-spacing: 0.15em;
	}

	body.home .site-chrome .site-brand-copy strong,
	body:not(.home) .site-chrome .site-brand-copy strong {
		margin-top: 3px;
		font-size: 1.35rem;
	}

	body.home .site-chrome .heavens-menu-toggle,
	body:not(.home) .site-chrome .heavens-menu-toggle {
		width: 44px;
		min-width: 44px;
		height: 44px;
		min-height: 44px;
	}
}

@media (max-width: 560px) {
	:root {
		--cc-chrome-clearance: 60px;
	}

	body.home .site-chrome,
	body.home .site-chrome.is-scrolled,
	body:not(.home) .site-chrome,
	body:not(.home) .site-chrome.is-scrolled {
		padding-top: 3px;
	}

	body.home .site-header,
	body.home .site-chrome.is-scrolled .site-header,
	body.home .header-inner,
	body:not(.home) .site-header,
	body:not(.home) .site-chrome.is-scrolled .site-header,
	body:not(.home) .header-inner {
		min-height: 46px;
	}

	body.home .site-chrome .site-brand-logo img,
	body:not(.home) .site-chrome .site-brand-logo img {
		width: 40px;
		max-width: 40px;
		height: 40px;
	}

	body.home .site-chrome .site-brand-copy small,
	body:not(.home) .site-chrome .site-brand-copy small {
		font-size: 0.4rem;
		letter-spacing: 0.11em;
	}

	body.home .site-chrome .site-brand-copy strong,
	body:not(.home) .site-chrome .site-brand-copy strong {
		margin-top: 2px;
		font-size: 1.22rem;
	}

	.archive-term-propovidi .post-grid,
	.archive-term-sermons .post-grid,
	.archive-term-propovedi .post-grid,
	.archive-term-propovedi-ru .post-grid {
		width: 100%;
		gap: 7px;
		margin-top: 14px;
		margin-bottom: 18px;
	}

	.archive-term-propovidi .post-card--audio .post-card-body,
	.archive-term-sermons .post-card--audio .post-card-body,
	.archive-term-propovedi .post-card--audio .post-card-body,
	.archive-term-propovedi-ru .post-card--audio .post-card-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
		padding: 8px 9px;
	}

	.archive-term-propovidi .post-card--audio h2,
	.archive-term-sermons .post-card--audio h2,
	.archive-term-propovedi .post-card--audio h2,
	.archive-term-propovedi-ru .post-card--audio h2 {
		font-size: 0.74rem;
	}
}
