/*
 * Generated base theme shell styles.
 * Keep this layer quiet. Component and block styles remain the primary style authority.
 */
@layer rrwd-base-theme {
	:where(html) {
		min-height: 100%;
	}

	:where(body) {
		margin: 0;
		min-height: 100%;
		background: var(--theme--color--background, var(--wp--preset--color--base, #fff));
		color: var(--theme--color--foreground, var(--wp--preset--color--contrast, #111));
		font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
	}

	:where(.wp-site-blocks) {
		min-height: 100%;
	}

	:where(.rrwd-theme-main) {
		margin: 0;
	}

	:where(.rrwd-theme-main > *) {
		margin-block-start: 0;
	}

	:where([x-cloak]) {
		display: none;
	}

	:where(.rrwd-site-header, .rrwd-site-footer) {
		padding: 1rem clamp(1rem, 4vw, 3rem);
	}

	:where(.rrwd-site-header) {
		align-items: center;
		background: color-mix(
			in srgb,
			var(--theme--color--surface-elevated, var(--wp--preset--color--base, #fff)) 94%,
			transparent
		);
		border-block-end: 1px solid
			var(
				--theme--color--border,
				color-mix(in srgb, var(--wp--preset--color--accent-1, #137d6d) 22%, transparent)
			);
		display: flex;
		gap: 1rem;
		justify-content: space-between;
		position: sticky;
		top: 0;
		z-index: 30;
	}

	:where(.rrwd-site-header__brand) {
		color: var(--theme--color--foreground, var(--wp--preset--color--contrast, #111));
		font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
		font-size: 1rem;
		font-weight: 700;
		text-decoration: none;
	}

	:where(.rrwd-site-nav ul) {
		align-items: center;
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem 1rem;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	:where(.rrwd-site-nav li) {
		position: relative;
	}

	:where(.rrwd-site-nav__item--has-children) {
		align-items: center;
		display: inline-flex;
		gap: 0.25rem;
	}

	:where(.rrwd-site-nav a, .rrwd-site-nav__toggle) {
		align-items: center;
		background: transparent;
		border: 0;
		color: inherit;
		cursor: pointer;
		display: inline-flex;
		font: inherit;
		font-weight: 700;
		gap: 0.35rem;
		padding: 0.45rem 0;
		text-decoration: none;
	}

	:where(.rrwd-site-nav__toggle) {
		font-size: 0.8rem;
		padding-inline: 0.2rem;
	}

	:where(.rrwd-site-nav a:hover, .rrwd-site-nav__toggle:hover, .rrwd-site-nav a[aria-current="page"]) {
		color: var(--theme--color--accent, var(--wp--preset--color--accent-1, #137d6d));
	}

	:where(.rrwd-site-nav a[aria-current="page"]) {
		text-decoration: underline;
		text-underline-offset: 0.3em;
	}

	:where(.rrwd-site-nav__dropdown) {
		background: var(--theme--color--surface-elevated, var(--wp--preset--color--base, #fff));
		border: 1px solid
			var(
				--theme--color--border,
				color-mix(in srgb, var(--wp--preset--color--accent-1, #137d6d) 22%, transparent)
			);
		border-radius: var(--rrwd--radius--medium, 0.5rem);
		box-shadow: 0 18px 45px
			color-mix(
				in srgb,
				var(--theme--color--foreground, var(--wp--preset--color--contrast, #102016)) 12%,
				transparent
			);
		display: grid;
		gap: 0.35rem;
		inset-block-start: calc(100% + 0.75rem);
		inset-inline-start: 0;
		min-width: 13rem;
		padding: 0.75rem;
		position: absolute;
	}

	:where(.rrwd-site-nav__dropdown[hidden]) {
		display: none;
	}

	:where(.rrwd-site-nav__dropdown ul) {
		align-items: stretch;
		display: grid;
		gap: 0.25rem;
	}

	:where(.rrwd-site-nav__dropdown a) {
		border-radius: var(--rrwd--radius--small, 0.25rem);
		display: block;
		padding: 0.5rem 0.65rem;
	}

	:where(.rrwd-site-nav__dropdown a:hover) {
		background: var(--theme--color--surface, var(--wp--preset--color--accent-2, #e8f2ee));
	}

	:where(.rrwd-site-footer) {
		background: var(--wp--preset--color--contrast, #111);
		color: var(--wp--preset--color--base, #fff);
		display: flex;
		flex-wrap: wrap;
		gap: 1.5rem;
		justify-content: space-between;
	}

	:where(.rrwd-site-footer a) {
		color: inherit;
	}

	:where(.rrwd-site-footer__brand) {
		color: inherit;
		font-weight: 800;
		text-decoration: none;
	}

	:where(.rrwd-site-footer__tagline, .rrwd-site-footer__copyright) {
		margin: 0.35rem 0 0;
	}

	:where(.template-blog-archive, .template-blog-post) {
		color: var(--wp--preset--color--contrast, #102016);
		font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
		margin-inline: auto;
		max-width: min(1120px, calc(100vw - 2rem));
		padding-block: clamp(3rem, 8vw, 6rem);
	}

	:where(.template-blog-archive [hidden]) {
		display: none;
	}

	:where(.template-blog-archive__header, .template-blog-post__header) {
		display: grid;
		gap: 1rem;
		margin-bottom: clamp(2rem, 5vw, 4rem);
		max-width: 760px;
	}

	:where(.template-blog-archive__eyebrow, .template-blog-post__back-link) {
		color: var(--wp--preset--color--accent-3, #4d7c0f);
		font-size: 0.9rem;
		font-weight: 800;
		letter-spacing: 0.12em;
		text-transform: uppercase;
	}

	:where(.template-blog-post__back-link) {
		text-decoration: none;
	}

	:where(.template-blog-archive h1, .template-blog-post h1) {
		font-size: clamp(3rem, 7vw, 5.75rem);
		line-height: 0.92;
		margin: 0;
		max-width: 850px;
	}

	:where(.template-blog-archive__header > p, .template-blog-post__header time) {
		font-size: clamp(1.05rem, 2vw, 1.25rem);
		line-height: 1.6;
		margin: 0;
	}

	:where(.template-blog-archive__search) {
		display: grid;
		gap: 0.5rem;
		margin-top: 1rem;
	}

	:where(.template-blog-archive__search label) {
		font-weight: 700;
	}

	:where(.template-blog-archive__search > div) {
		display: grid;
		gap: 0.75rem;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	:where(.template-blog-archive__search input) {
		border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 25%, transparent);
		border-radius: var(--rrwd--radius--sm, 0.375rem);
		font: inherit;
		min-width: 0;
		padding: 0.85rem 1rem;
	}

	:where(.template-blog-archive__search button, .template-blog-archive__excerpt > p:last-child > a) {
		align-items: center;
		background: var(--wp--preset--color--accent-3, #4d7c0f);
		border: 0;
		border-radius: var(--rrwd--radius--sm, 0.375rem);
		color: var(--wp--preset--color--base, #fff);
		display: inline-flex;
		font: inherit;
		font-weight: 800;
		justify-content: center;
		padding: 0.85rem 1rem;
		text-decoration: none;
	}

	:where(.template-blog-archive__grid) {
		display: grid;
		gap: 1rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	:where(.template-blog-archive__grid > li) {
		margin: 0;
	}

	:where(.template-blog-archive__card) {
		border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 16%, transparent);
		border-radius: var(--rrwd--radius--md, 0.5rem);
		display: grid;
		gap: 0.75rem;
		padding: clamp(1.25rem, 3vw, 1.75rem);
	}

	:where(.template-blog-archive__card a) {
		color: inherit;
		text-decoration: none;
	}

	:where(.template-blog-archive__card h2) {
		font-size: clamp(1.35rem, 2vw, 1.75rem);
		line-height: 1.05;
		margin: 0;
	}

	:where(.template-blog-archive__card time, .template-blog-archive__card p) {
		line-height: 1.5;
		margin: 0;
	}

	:where(.template-blog-archive__card time) {
		color: color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 65%, transparent);
		font-size: 0.95rem;
	}

	:where(.template-blog-archive__excerpt > p:last-child > a) {
		justify-self: start;
		margin-top: 0.5rem;
	}

	:where(.template-blog-archive__pagination) {
		align-items: center;
		display: flex;
		gap: 1rem;
		justify-content: space-between;
		margin-top: 2rem;
	}

	:where(.template-blog-archive__pagination a) {
		color: var(--wp--preset--color--accent-3, #4d7c0f);
		font-weight: 800;
	}

	:where(.template-blog-post) {
		max-width: min(840px, calc(100vw - 2rem));
	}

	:where(.template-blog-post__content) {
		font-size: clamp(1.05rem, 2vw, 1.2rem);
		line-height: 1.7;
	}

	:where(.template-blog-post__content > * + *) {
		margin-block-start: 1.25rem;
	}

	:where(.template-blog-post__content a) {
		color: var(--wp--preset--color--accent-3, #4d7c0f);
		font-weight: 800;
	}

	:where(.template-blog-post__content ul, .template-blog-post__content ol) {
		padding-inline-start: 1.25rem;
	}

	@media (max-width: 760px) {
		:where(.rrwd-site-header) {
			align-items: flex-start;
			flex-direction: column;
			position: static;
		}

		:where(.rrwd-site-nav ul) {
			align-items: flex-start;
			flex-wrap: wrap;
		}

		:where(.rrwd-site-nav__dropdown) {
			box-shadow: none;
			position: static;
		}

		:where(.template-blog-archive__grid) {
			grid-template-columns: 1fr;
		}

		:where(.template-blog-archive__search > div) {
			grid-template-columns: 1fr;
		}

		:where(.template-blog-archive__pagination) {
			align-items: flex-start;
			flex-direction: column;
		}
	}
}

/*
 * WordPress frontend parity styles.
 * These selectors intentionally mirror the Astro header and blog template CSS with enough
 * specificity to beat WordPress global block spacing while keeping block assets in charge.
 */
.wp-site-blocks > .rrwd-theme-main.rrwd-theme-main {
	margin: 0;
}

.wp-site-blocks > .rrwd-theme-main.rrwd-theme-main > * {
	margin-block-start: 0;
}

.wp-site-blocks > .rrwd-theme-main.rrwd-theme-main ~ div {
	margin-block-start: 0;
}

.rrwd-site-header.rrwd-site-header,
.rrwd-site-footer.rrwd-site-footer {
	box-sizing: border-box;
	padding: 1rem clamp(1rem, 4vw, 3rem);
}

.rrwd-site-header.rrwd-site-header {
	align-items: center;
	background: color-mix(
		in srgb,
		var(--theme--color--surface-elevated, var(--wp--preset--color--base, #fff)) 94%,
		transparent
	);
	border-block-end: 1px solid
		var(
			--theme--color--border,
			color-mix(in srgb, var(--wp--preset--color--accent-1, #137d6d) 22%, transparent)
		);
	display: flex;
	font-family: var(--wp--preset--font-family--dm-sans, system-ui, sans-serif);
	gap: 1rem;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 30;
}

.rrwd-site-header__brand.rrwd-site-header__brand {
	color: var(--theme--color--foreground, var(--wp--preset--color--contrast, #111));
	font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

.rrwd-site-nav.rrwd-site-nav ul {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rrwd-site-nav.rrwd-site-nav li {
	position: relative;
}

.rrwd-site-nav__item--has-children.rrwd-site-nav__item--has-children {
	align-items: center;
	display: inline-flex;
	gap: 0.25rem;
}

.rrwd-site-nav.rrwd-site-nav a,
.rrwd-site-nav__toggle.rrwd-site-nav__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	gap: 0.35rem;
	padding: 0.45rem 0;
	text-decoration: none;
}

.rrwd-site-nav__toggle.rrwd-site-nav__toggle {
	font-size: 0.8rem;
	padding-inline: 0.2rem;
}

.rrwd-site-nav.rrwd-site-nav a:hover,
.rrwd-site-nav__toggle.rrwd-site-nav__toggle:hover,
.rrwd-site-nav.rrwd-site-nav a[aria-current="page"] {
	color: var(--theme--color--accent, var(--wp--preset--color--accent-1, #137d6d));
}

.rrwd-site-nav.rrwd-site-nav a[aria-current="page"] {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.rrwd-site-nav__dropdown.rrwd-site-nav__dropdown {
	background: var(--theme--color--surface-elevated, var(--wp--preset--color--base, #fff));
	border: 1px solid
		var(
			--theme--color--border,
			color-mix(in srgb, var(--wp--preset--color--accent-1, #137d6d) 22%, transparent)
		);
	border-radius: var(--rrwd--radius--medium, 0.5rem);
	box-shadow: 0 18px 45px
		color-mix(
			in srgb,
			var(--theme--color--foreground, var(--wp--preset--color--contrast, #102016)) 12%,
			transparent
		);
	display: grid;
	gap: 0.35rem;
	inset-block-start: calc(100% + 0.75rem);
	inset-inline-start: 0;
	min-width: 13rem;
	padding: 0.75rem;
	position: absolute;
}

.rrwd-site-nav__dropdown.rrwd-site-nav__dropdown[hidden] {
	display: none;
}

.rrwd-site-nav__dropdown.rrwd-site-nav__dropdown ul {
	align-items: stretch;
	display: grid;
	gap: 0.25rem;
}

.rrwd-site-nav__dropdown.rrwd-site-nav__dropdown a {
	border-radius: var(--rrwd--radius--small, 0.25rem);
	display: block;
	padding: 0.5rem 0.65rem;
}

.rrwd-site-nav__dropdown.rrwd-site-nav__dropdown a:hover {
	background: var(--theme--color--surface, var(--wp--preset--color--accent-2, #e8f2ee));
}

.rrwd-theme-main.rrwd-theme-main > .entry-content > * + * {
	margin-block-start: 0;
}

.rrwd-site-footer.rrwd-site-footer {
	background: var(--wp--preset--color--contrast, #111);
	color: var(--wp--preset--color--base, #fff);
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: space-between;
}

.rrwd-site-footer.rrwd-site-footer a {
	color: inherit;
}

.rrwd-site-footer__brand.rrwd-site-footer__brand {
	color: inherit;
	font-weight: 800;
	text-decoration: none;
}

.rrwd-site-footer__tagline.rrwd-site-footer__tagline,
.rrwd-site-footer__copyright.rrwd-site-footer__copyright {
	margin: 0.35rem 0 0;
}

.template-blog-archive.template-blog-archive,
.template-blog-post.template-blog-post {
	color: var(--wp--preset--color--contrast, #102016);
	font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
	margin-inline: auto;
	max-width: min(1120px, calc(100vw - 2rem));
	padding-block: clamp(3rem, 8vw, 6rem);
}

.template-blog-archive.template-blog-archive [hidden] {
	display: none;
}

.template-blog-archive__header.template-blog-archive__header,
.template-blog-post__header.template-blog-post__header {
	display: grid;
	gap: 1rem;
	margin-bottom: clamp(2rem, 5vw, 4rem);
	max-width: 760px;
}

.template-blog-archive__header.template-blog-archive__header > *,
.template-blog-post__header.template-blog-post__header > * {
	margin-block-start: 0;
}

.template-blog-archive__eyebrow.template-blog-archive__eyebrow,
.template-blog-post__back-link.template-blog-post__back-link {
	color: var(--wp--preset--color--accent-3, #4d7c0f);
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.template-blog-post__back-link.template-blog-post__back-link {
	text-decoration: none;
}

.template-blog-archive.template-blog-archive h1,
.template-blog-post.template-blog-post h1 {
	font-size: clamp(3rem, 7vw, 5.75rem);
	line-height: 0.92;
	margin: 0;
	max-width: 850px;
}

.template-blog-archive__header.template-blog-archive__header > p,
.template-blog-post__header.template-blog-post__header time {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	line-height: 1.6;
	margin: 0;
}

.template-blog-archive__search.template-blog-archive__search {
	display: grid;
	gap: 0.5rem;
	margin-top: 1rem;
}

.template-blog-archive__search.template-blog-archive__search label {
	font-weight: 700;
}

.template-blog-archive__search.template-blog-archive__search > div {
	background: transparent;
	border: 0;
	box-sizing: border-box;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: minmax(0, 1fr) auto;
	max-width: none;
	padding: 0;
}

.template-blog-archive__search.template-blog-archive__search input {
	box-sizing: border-box;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 25%, transparent);
	border-radius: var(--rrwd--radius--sm, 0.375rem);
	font: inherit;
	min-width: 0;
	padding: 0.85rem 1rem;
}

.template-blog-archive__search.template-blog-archive__search button,
.template-blog-archive__excerpt.template-blog-archive__excerpt > p:last-child > a {
	align-items: center;
	background: var(--wp--preset--color--accent-3, #4d7c0f);
	border: 0;
	border-radius: var(--rrwd--radius--sm, 0.375rem);
	box-sizing: border-box;
	color: var(--wp--preset--color--base, #fff);
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	justify-content: center;
	line-height: normal;
	margin: 0;
	padding: 0.85rem 1rem;
	text-decoration: none;
}

.template-blog-archive__grid.template-blog-archive__grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	max-width: none;
	padding: 0;
}

.template-blog-archive__grid.template-blog-archive__grid > li {
	margin: 0;
}

.template-blog-archive__card.template-blog-archive__card {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 16%, transparent);
	border-radius: var(--rrwd--radius--md, 0.5rem);
	display: grid;
	gap: 0.75rem;
	padding: clamp(1.25rem, 3vw, 1.75rem);
}

.template-blog-archive__card.template-blog-archive__card > * {
	margin-block-start: 0;
}

.template-blog-archive__card.template-blog-archive__card a {
	color: inherit;
	text-decoration: none;
}

.template-blog-archive__card.template-blog-archive__card h2 {
	font-size: clamp(1.35rem, 2vw, 1.75rem);
	line-height: 1.05;
	margin: 0;
}

.template-blog-archive__card.template-blog-archive__card time,
.template-blog-archive__card.template-blog-archive__card p {
	line-height: 1.5;
	margin: 0;
}

.template-blog-archive__card.template-blog-archive__card time {
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #102016) 65%, transparent);
	font-size: 0.95rem;
}

.template-blog-archive__excerpt.template-blog-archive__excerpt {
	display: contents;
	margin: 0;
}

.template-blog-archive__excerpt.template-blog-archive__excerpt > p:last-child {
	display: contents;
}

.template-blog-archive__excerpt.template-blog-archive__excerpt > p:last-child > a {
	color: var(--wp--preset--color--base, #fff);
	justify-self: start;
	margin-top: 0.5rem;
	text-decoration: none;
}

.template-blog-archive__pagination.template-blog-archive__pagination {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-top: 2rem;
}

.template-blog-archive__pagination.template-blog-archive__pagination a {
	color: var(--wp--preset--color--accent-3, #4d7c0f);
	font-weight: 800;
}

.template-blog-post.template-blog-post {
	max-width: min(840px, calc(100vw - 2rem));
}

.template-blog-post__content.template-blog-post__content {
	display: block;
	font-size: clamp(1.05rem, 2vw, 1.2rem);
	line-height: 1.7;
	margin-block-start: 0;
}

.template-blog-post__content.template-blog-post__content > * {
	margin-block: 0;
}

.template-blog-post__content.template-blog-post__content > * + * {
	margin-block-start: 1.25rem;
}

.template-blog-post__content.template-blog-post__content a {
	color: var(--wp--preset--color--accent-3, #4d7c0f);
	font-weight: 800;
}

.template-blog-post__content.template-blog-post__content ul,
.template-blog-post__content.template-blog-post__content ol {
	padding-inline-start: 1.25rem;
}

@media (max-width: 820px) {
	.template-blog-archive__grid.template-blog-archive__grid {
		grid-template-columns: 1fr;
	}

	.template-blog-archive__search.template-blog-archive__search > div {
		grid-template-columns: 1fr;
	}

	.template-blog-archive__pagination.template-blog-archive__pagination {
		align-items: flex-start;
		flex-direction: column;
	}
}

.editor-styles-wrapper {
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #111);
	font-family: var(--wp--preset--font-family--outfit, system-ui, sans-serif);
}

.editor-styles-wrapper .is-root-container {
	margin: 0;
	padding: 0;
}

.editor-styles-wrapper .is-root-container > .block-editor-block-list__block {
	margin-block: 0;
	max-width: none;
}

.editor-styles-wrapper .is-root-container > .block-editor-block-list__block + .block-editor-block-list__block {
	margin-block-start: 0;
}
