/*
 * Sha Nails front-end styles (plain CSS, no build step).
 *
 * Tokens (colours, sizes, spacing, radii) come from theme.json as
 * --wp--preset--* and --wp--custom--* variables. The rules here are what
 * theme.json cannot express: layout of the templates, hover effects, and
 * the custom CSS that used to live in the global styles of the old
 * Twenty Twenty-Five setup.
 *
 * Sections:
 *  1. Base
 *  2. Accessibility helpers
 *  3. Buttons
 *  4. Cards and hover effects (legacy classes kept)
 *  5. Header and navigation
 *  6. Footer
 *  7. Pills, post cards and lists
 *  8. Page, blog index, archive, search, 404
 *  9. Single post
 * 10. Comments
 * 11. Temporary rules for plugin markup and old content (move to blocks in M3)
 */

:root {
	--sn-header-height: 94px;
	--sn-header-height-scrolled: 75px;
	--sn-focus: var(--wp--preset--color--contrast);
}

/* Anchor targets (#newsletter, #main) must not land under the sticky header. */
html {
	scroll-padding-top: calc(var(--sn-header-height) + var(--wp-admin--admin-bar--height, 0px));
}

/* Anchor links scroll smoothly, unless the visitor asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {

	html {
		scroll-behavior: smooth;
	}
}

/* 1. Base ---------------------------------------------------------------- */

/* Link underline thickness and offset (from Twenty Twenty-Five). */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}

/* Reduce widows and orphans (progressive enhancement). */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
	text-wrap: pretty;
}

/* The "more" link is a block-level element. */
.more-link {
	display: block;
}

/* Long lines of preformatted text scroll instead of widening the page. */
:where(pre) {
	overflow-x: auto;
}

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

/* Brand signature: a green italic word inside a heading (M3 format).
 * Large text only (3:1), so it uses the deeper highlight green.
 * Dark areas keep the brand green (8.31:1 on ink). */
mark.sn-highlight {
	background: transparent;
	color: var(--wp--custom--color--highlight-large);
	font-style: italic;
}

.is-style-section-dark mark.sn-highlight,
.is-style-section-dark-framed mark.sn-highlight,
.site-footer mark.sn-highlight {
	color: var(--wp--preset--color--accent-1);
}

/* Older pages (home, The Foundations of Nail Extensions, Nails Foundations)
 * colour heading words with the brand green preset (has-accent-1-color,
 * #40c52c, 2.3:1 on light backgrounds). Large heading words use the deeper
 * highlight green, like
 * mark.sn-highlight (Robi's colour ruling, 2026-10-09). The preset class
 * carries !important, so these rules do too; the dark areas below win back
 * the brand green (8.31:1 on ink), which is why they come after. Covers the
 * highlighted words, the numbered step headings (01 to 04) and the stars. */
:is(h1, h2, h3, h4, h5, h6, p) mark.has-accent-1-color,
:is(h1, h2, h3, h4, h5, h6).has-accent-1-color,
p.has-accent-1-color.has-large-font-size {
	color: var(--wp--custom--color--highlight-large) !important;
}

.site-footer mark.has-accent-1-color,
.is-style-section-dark mark.has-accent-1-color,
.is-style-section-dark-framed mark.has-accent-1-color,
.is-style-section-dark .has-accent-1-color,
.is-style-section-dark-framed .has-accent-1-color,
.has-background[style*="#0b4b01"] .has-accent-1-color,
.has-background[style*="#111111"] .has-accent-1-color,
.has-contrast-background-color .has-accent-1-color {
	color: var(--wp--preset--color--accent-1) !important;
}

/* Dark backgrounds that do not carry the Dark band block style (a gradient
 * or the ink colour set by hand on a group): eyebrows, links and the focus
 * ring behave as on .is-style-section-dark, so they never end up as dark
 * green on ink. */
.has-background[style*="#0b4b01"],
.has-background[style*="#111111"],
.has-contrast-background-color {
	--sn-focus: var(--wp--preset--color--base);
}

.has-background[style*="#0b4b01"] .is-style-text-subtitle,
.has-background[style*="#111111"] .is-style-text-subtitle,
.has-contrast-background-color .is-style-text-subtitle {
	color: var(--wp--preset--color--accent-1);
}

.has-background[style*="#0b4b01"] a:not(.wp-block-button__link),
.has-background[style*="#111111"] a:not(.wp-block-button__link),
.has-contrast-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--accent-1);
}

/* 2. Accessibility helpers ---------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	overflow-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
	background: var(--wp--preset--color--contrast);
	clip-path: none;
	color: var(--wp--preset--color--base);
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	height: auto;
	left: 0.5rem;
	line-height: 1;
	padding: 1rem 1.5rem;
	text-decoration: none;
	top: 0.5rem;
	width: auto;
	z-index: 100000;
}

/* Visible focus for everything that can be focused. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--sn-focus);
	outline-offset: 3px;
}

/* On dark areas the focus ring flips to white. */
.site-footer,
.is-style-section-dark,
.is-style-section-dark-framed {
	--sn-focus: var(--wp--preset--color--base);
}

#main:focus {
	outline: none;
}

/*
 * Photo cover with a video button (bio-split, hero-intro), 16:9 like the
 * photo on the home page. Until a photo is added the cover is only the brown
 * overlay over white, and the white button text cannot be read on that.
 * A dark base makes the overlay land on a dark brown (about 8:1).
 */
.sn-cover-photo:not(:has(.wp-block-cover__image-background, .wp-block-cover__video-background)) {
	background-color: var(--wp--preset--color--contrast);
}

/* 3. Buttons ------------------------------------------------------------- */

/* Base look of a button link. Colours, padding and type: theme.json. */
:where(.wp-block-button__link, .wp-element-button) {
	box-sizing: border-box;
	cursor: pointer;
	display: inline-block;
	text-align: center;
	text-decoration: none;
	overflow-wrap: break-word;
}

/* Hover lift. The background stays green on hover. */
:root :where(.wp-block-button .wp-block-button__link) {
	transition: transform var(--wp--custom--transition--lift);
}

:root :where(.wp-element-button:hover, .wp-block-button__link:hover) {
	background-color: var(--wp--preset--color--accent-1);
	transform: translateY(-5px);
}

/* 4. Cards and hover effects -------------------------------------------- */

/* The legacy class is kept so the existing groups need no rewrite (49 uses). */
.box-shadow-on-hover {
	border: 1px solid var(--wp--custom--color--card-border) !important;
	transition: all 0.3s ease !important;
}

.box-shadow-on-hover:hover {
	border-color: var(--wp--preset--color--accent-1) !important;
	box-shadow: var(--wp--preset--shadow--glow-lg);
	transform: translateY(-4px);
}

.is-style-card,
.post-card,
.guide-cta {
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.is-style-card:hover,
.post-card:hover {
	border-color: var(--wp--preset--color--accent-1);
	box-shadow: var(--wp--preset--shadow--glow-lg);
	transform: translateY(-4px);
}

/*
 * Accordion cards (FAQ): the question row stretches over the card's padding,
 * so a click anywhere on a closed card opens it. Once open, the question row
 * and the top of the card close it; the answer stays clickable for links and
 * text selection. --sn-details-pad must match the card's padding (spacing 40
 * in every FAQ).
 */
.wp-block-details.is-style-card {
	--sn-details-pad: var(--wp--preset--spacing--40);
}

.wp-block-details.is-style-card > summary {
	margin: calc(-1 * var(--sn-details-pad));
	padding: var(--sn-details-pad);
	cursor: pointer;
}

.wp-block-details.is-style-card[open] > summary {
	margin-bottom: 0;
	padding-bottom: 0;
}

/* 5. Header and navigation ---------------------------------------------- */

/*
 * The header box keeps --sn-header-height in every state, so nothing on the
 * page moves when it changes. The visible bar inside it (.site-header__bar)
 * gets shorter once the page scrolls (is-scrolled, about 20% less) and
 * follows the section under it (is-on-dark). States: assets/js/header.js.
 * The empty strip left under a shorter bar lets clicks through.
 */
.site-header {
	--sn-header-fg: var(--wp--preset--color--contrast);
	--sn-header-bg: var(--wp--preset--color--base);
	--sn-header-glass: rgb(255 255 255 / 0.8);
	--sn-header-line: rgb(17 17 17 / 0.08);
	--sn-header-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--sn-header-speed: 0.35s;
	--sn-logo-width: 120px;
	--sn-logo-scale: 1;
	height: var(--sn-header-height);
	pointer-events: none;
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0);
	z-index: 10;
}

.site-header.is-on-dark {
	--sn-header-fg: var(--wp--preset--color--base);
	--sn-header-bg: var(--wp--preset--color--contrast);
	--sn-header-glass: rgb(17 17 17 / 0.78);
	--sn-header-line: rgb(255 255 255 / 0.1);
	--sn-focus: var(--wp--preset--color--base);
}

.site-header.is-scrolled {
	--sn-logo-scale: 0.8;
}

/* The background sits on a pseudo-element: a backdrop-filter on the bar
 * itself would trap the fixed mobile overlay inside the bar. */
.site-header__bar {
	color: var(--sn-header-fg);
	pointer-events: auto;
	position: relative;
	z-index: 0;
}

.site-header__bar::before {
	background-color: var(--sn-header-bg);
	box-shadow: 0 1px 0 transparent;
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.site-header.is-scrolled .site-header__bar::before {
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	background-color: var(--sn-header-glass);
	box-shadow: 0 1px 0 var(--sn-header-line), 0 12px 32px -20px rgb(0 0 0 / 0.3);
}

.site-header__inner {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--30);
	justify-content: space-between;
	min-height: var(--sn-header-height);
}

.site-header.is-scrolled .site-header__inner {
	min-height: var(--sn-header-height-scrolled);
}

/* Logo: both images share one grid cell and cross-fade; the shrink is a
 * transform, so the text beside it does not reflow. */
.site-branding {
	flex: 0 0 auto;
	min-width: 0;
}

.site-branding .custom-logo-link {
	align-items: center;
	display: grid;
	transform: scale(var(--sn-logo-scale));
	transform-origin: left center;
	width: var(--sn-logo-width);
}

.site-branding__logo {
	display: block;
	grid-area: 1 / 1;
	height: auto;
	width: 100%;
}

.site-branding__logo--light {
	opacity: 0;
}

.site-header.is-on-dark .has-light-logo .custom-logo {
	opacity: 0;
}

.site-header.is-on-dark .site-branding__logo--light {
	opacity: 1;
}

.site-branding__name {
	color: inherit;
	font-family: var(--wp--preset--font-family--playfair-display);
	font-size: var(--wp--preset--font-size--large);
	text-decoration: none;
}

.site-header__actions {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: clamp(1.25rem, 3vw, 2.75rem);
	justify-content: flex-end;
}

/* Call-to-action button. */
.site-header__cta-list,
.site-nav__cta {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header__cta-list .wp-block-button__link {
	white-space: nowrap;
}

.site-header.is-scrolled .site-header__cta-list .wp-block-button__link {
	padding: 15px 38px;
}

/* Links. */
.site-nav__list {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: clamp(1.25rem, 2.6vw, 2.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list > li {
	position: relative;
}

.site-nav__list > li > a,
.site-nav__parent {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	gap: 0.4em;
	letter-spacing: 0.14em;
	line-height: 1;
	padding: 0.75rem 0;
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
}

/* A green line that draws in under the link. */
.site-nav__list > li > a::after,
.site-nav__parent::after {
	background: var(--wp--preset--color--accent-1);
	border-radius: 2px;
	bottom: 0.35rem;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	right: 0;
	transform: scaleX(0);
	transform-origin: right center;
}

.site-nav__list > li > a:hover::after,
.site-nav__list > li > a:focus-visible::after,
.site-nav__list > .current-menu-item > a::after,
.site-nav__list > .current_page_parent > a::after,
.site-nav__parent:hover::after,
.site-nav__parent:focus-visible::after,
.site-nav__list > .is-open > .site-nav__parent::after,
.site-nav__list > .current-menu-ancestor > .site-nav__parent::after {
	transform: scaleX(1);
	transform-origin: left center;
}

.site-nav__chevron {
	flex: none;
}

.site-nav__list > .is-open .site-nav__chevron {
	transform: rotate(180deg);
}

.site-nav__group-label {
	display: none;
}

/* Dropdown panel. */
.site-nav__list .sub-menu {
	background: var(--wp--preset--color--base);
	border-radius: 16px;
	box-shadow: 0 0 0 1px rgb(17 17 17 / 0.06), 0 24px 48px -16px rgb(17 17 17 / 0.28);
	color: var(--wp--preset--color--contrast);
	display: grid;
	gap: 0.5rem;
	left: 50%;
	list-style: none;
	margin: 0;
	opacity: 0;
	padding: 0.5rem;
	position: absolute;
	top: calc(100% + 0.75rem);
	transform: translate(-50%, 8px);
	width: min(23.5rem, calc(100vw - 2rem));
	visibility: hidden;
}

/* An invisible bridge over the gap, so the pointer can reach the panel. */
.site-nav__list .sub-menu::before {
	content: "";
	height: 0.75rem;
	left: 0;
	position: absolute;
	right: 0;
	top: -0.75rem;
}

.site-nav__list > .is-open > .sub-menu {
	opacity: 1;
	transform: translate(-50%, 0);
	visibility: visible;
}

.site-nav__list .sub-menu a {
	border-radius: 10px;
	color: inherit;
	display: grid;
	gap: 0.2rem;
	padding: 0.85rem 2.75rem 0.85rem 1rem;
	position: relative;
	text-decoration: none;
}

.site-nav__list .sub-menu a::after {
	color: var(--wp--preset--color--accent-text);
	content: "→";
	font-size: 1.1rem;
	opacity: 0;
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translate(-6px, -50%);
}

.site-nav__list .sub-menu a:hover,
.site-nav__list .sub-menu a:focus-visible,
.site-nav__list .sub-menu .current-menu-item > a {
	background: color-mix(in srgb, var(--wp--preset--color--accent-2) 16%, var(--wp--preset--color--base));
}

.site-nav__list .sub-menu a:hover::after,
.site-nav__list .sub-menu a:focus-visible::after {
	opacity: 1;
	transform: translate(0, -50%);
}

.site-nav__label {
	font-family: var(--wp--preset--font-family--playfair-display);
	font-size: 1.15rem;
	line-height: 1.25;
}

.site-nav__desc {
	color: var(--wp--preset--color--accent-4);
	font-size: 13px;
	line-height: 1.4;
}

/* Social icons in the header: small, with a thin line before them. They
 * take the header colour, and turn green on hover. */
.site-nav__social .social-links {
	align-items: center;
	display: flex;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__social .social-link {
	border-radius: 50%;
	color: inherit;
	padding: 7px;
}

.site-nav__social .social-link svg {
	height: 18px;
	width: 18px;
}

.site-nav__social .social-link:hover,
.site-nav__social .social-link:focus-visible {
	color: var(--wp--preset--color--accent-1);
}

.site-header:not(.is-on-dark) .site-nav__social .social-link:hover,
.site-header:not(.is-on-dark) .site-nav__social .social-link:focus-visible {
	color: var(--wp--preset--color--accent-text);
}

/* Mobile toggle and close buttons. */
.site-nav__toggle,
.site-nav__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	line-height: 0;
	padding: 0;
	width: 44px;
}

.site-nav__toggle svg,
.site-nav__close svg {
	fill: currentcolor;
}

/* Motion: only once the first state is painted (is-ready), and never for
 * visitors who ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {

	.site-header.is-ready .site-header__bar,
	.site-header.is-ready .site-header__bar::before,
	.site-header.is-ready .site-branding__logo,
	.site-header.is-ready .site-header__inner,
	.site-header.is-ready .custom-logo-link,
	.site-header.is-ready .site-header__cta-list .wp-block-button__link {
		transition-duration: var(--sn-header-speed);
		transition-property: background-color, box-shadow, color, opacity, min-height, transform, padding, -webkit-backdrop-filter, backdrop-filter;
		transition-timing-function: var(--sn-header-ease);
	}

	.site-nav__list > li > a::after,
	.site-nav__parent::after {
		transition: transform 0.3s var(--sn-header-ease);
	}

	.site-nav__chevron {
		transition: transform 0.25s var(--sn-header-ease);
	}

	.site-nav__list .sub-menu {
		transition: opacity 0.2s ease, transform 0.25s var(--sn-header-ease), visibility 0s linear 0.25s;
	}

	.site-nav__list > .is-open > .sub-menu {
		transition-delay: 0s;
	}

	.site-nav__list .sub-menu a {
		transition: background-color 0.2s ease;
	}

	.site-nav__list .sub-menu a::after {
		transition: opacity 0.2s ease, transform 0.25s var(--sn-header-ease);
	}

	.site-header__cta-list .wp-block-button__link:hover {
		transform: translateY(-1px);
	}
}

/* Mobile and tablet: the links move into a full-screen overlay. */
@media (max-width: 899px) {

	:root {
		--sn-header-height: 76px;
		--sn-header-height-scrolled: 62px;
	}

	.site-header {
		--sn-logo-width: 96px;
	}

	.site-header__actions {
		gap: var(--wp--preset--spacing--20);
	}

	.site-header__actions .site-nav {
		margin-right: -10px;
		order: 2;
	}

	.site-header__cta-list .wp-block-button__link {
		font-size: 11px;
		letter-spacing: 1.2px;
		line-height: 1;
		padding: 13px 18px;
	}

	.site-header.is-scrolled .site-header__cta-list .wp-block-button__link {
		padding: 11px 16px;
	}

	.site-nav.is-enhanced .site-nav__panel {
		display: none;
	}

	.site-nav.is-open .site-nav__panel {
		background: radial-gradient(80% 60% at 100% 100%, var(--wp--custom--color--dark-green) 0%, var(--wp--preset--color--contrast) 70%);
		bottom: 0;
		color: var(--wp--preset--color--base);
		display: flex;
		flex-direction: column;
		left: 0;
		overflow-y: auto;
		padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
		position: fixed;
		right: 0;
		top: 0;
		z-index: 100000;
		--sn-focus: var(--wp--preset--color--base);
	}

	.admin-bar .site-nav.is-open .site-nav__panel {
		top: var(--wp-admin--admin-bar--height, 46px);
	}

	.site-nav__close {
		align-self: flex-end;
	}

	.site-nav__close[hidden],
	.site-nav__toggle[hidden] {
		display: none;
	}

	.site-nav.is-open .site-nav__list {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
		margin-top: var(--wp--preset--spacing--30);
	}

	.site-nav.is-open .site-nav__list > li {
		border-bottom: 1px solid rgb(255 255 255 / 0.12);
	}

	.site-nav.is-open .site-nav__list > li > a {
		font-family: var(--wp--preset--font-family--playfair-display);
		font-size: 1.9rem;
		font-weight: 400;
		letter-spacing: 0;
		padding: 1.1rem 0;
		text-transform: none;
	}

	.site-nav.is-open .site-nav__list > li > a::after {
		display: none;
	}

	.site-nav.is-open .site-nav__list > .current-menu-item > a {
		color: var(--wp--preset--color--accent-1);
	}

	/* Dropdowns become a labelled group, always open. */
	.site-nav__parent {
		display: none;
	}

	.site-nav.is-open .site-nav__group-label {
		color: var(--wp--preset--color--accent-1);
		display: block;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.18em;
		padding: 1.4rem 0 0.25rem;
		text-transform: uppercase;
	}

	.site-nav.is-open .site-nav__list .sub-menu {
		background: none;
		box-shadow: none;
		color: inherit;
		gap: 0;
		opacity: 1;
		padding: 0 0 0.75rem;
		position: static;
		transform: none;
		visibility: visible;
		width: auto;
	}

	.site-nav.is-open .site-nav__list .sub-menu a {
		padding: 0.7rem 2.5rem 0.7rem 0;
	}

	.site-nav.is-open .site-nav__list .sub-menu a::after {
		color: var(--wp--preset--color--accent-1);
		opacity: 1;
		right: 0.25rem;
		transform: translate(0, -50%);
	}

	.site-nav.is-open .site-nav__list .sub-menu a:hover,
	.site-nav.is-open .site-nav__list .sub-menu a:focus-visible,
	.site-nav.is-open .site-nav__list .sub-menu .current-menu-item > a {
		background: none;
	}

	.site-nav.is-open .site-nav__label {
		font-size: 1.5rem;
	}

	.site-nav.is-open .site-nav__desc {
		color: rgb(255 255 255 / 0.65);
	}

	.site-nav.is-open .site-nav__social {
		margin-top: auto;
		order: 1;
		padding-top: var(--wp--preset--spacing--50);
	}

	.site-nav.is-open .site-nav__social .social-links {
		gap: var(--wp--preset--spacing--20);
	}

	.site-nav.is-open .site-nav__social .social-link {
		margin-left: -7px;
	}

	.site-nav.is-open .site-nav__social .social-link svg {
		height: 24px;
		width: 24px;
	}

	.site-nav__cta {
		order: 2;
		padding-top: var(--wp--preset--spacing--30);
	}

	.site-nav__cta .wp-block-button {
		width: 100%;
	}

	.site-nav__cta .wp-block-button__link {
		display: block;
		text-align: center;
		width: 100%;
	}
}

/* Below 600px the WordPress admin bar scrolls away with the page. */
@media (max-width: 599px) {

	.site-header {
		top: 0;
	}
}

@media (min-width: 900px) {

	.site-nav__panel {
		--sn-nav-gap: clamp(1rem, 2vw, 1.75rem);
		align-items: center;
		display: flex;
		gap: var(--sn-nav-gap);
	}

	/* Social icons left of the links, a thin divider between them. The
	 * space on each side of the divider is the panel gap (the icons' own
	 * 7px padding counts as part of it). */
	.site-nav__social {
		border-right: 1px solid color-mix(in srgb, currentcolor 22%, transparent);
		padding-right: calc(var(--sn-nav-gap) - 7px);
	}

	.site-nav__toggle,
	.site-nav__close,
	.site-nav__cta {
		display: none;
	}
}

html.has-nav-open {
	overflow: hidden;
}

/* 6. Footer -------------------------------------------------------------- */

.site-footer__panel {
	background: var(--wp--preset--color--contrast);
	border: 10px solid var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--panel);
	color: var(--wp--preset--color--base);
	margin-top: -10px;
	padding-bottom: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--60);
}

/* Links on the dark footer and dark bands keep the brand green.
 * theme.json elements.link is the text green, which fails on ink. */
.site-footer a,
.is-style-section-dark a:not(.wp-block-button__link),
.is-style-section-dark-framed a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--accent-1);
}

/* Eyebrows on dark bands: the text green fails on ink, the brand green
 * does not. */
.is-style-section-dark .is-style-text-subtitle,
.is-style-section-dark-framed .is-style-text-subtitle {
	color: var(--wp--preset--color--accent-1);
}

.site-footer a:hover {
	color: var(--wp--preset--color--base);
}

.site-footer__cols {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer__brand {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--style--block-gap);
}

.site-footer__logo {
	display: block;
}

.site-footer__logo-img {
	display: block;
	height: auto;
	width: 140px;
}

.site-footer__tagline {
	margin: 0;
}

.site-footer__heading {
	font-size: 2.3rem;
	margin-bottom: var(--wp--preset--spacing--30);
	margin-top: 0;
}

.site-footer__social .social-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	list-style: none;
	margin: 0;
	padding: 0;
}

.social-link {
	color: var(--wp--preset--color--base);
	display: flex;
	padding: 6px;
	text-decoration: none !important;
}

.social-link svg {
	display: block;
	fill: currentcolor;
	height: 24px;
	width: 24px;
}

.site-footer .social-link:hover,
.social-link:focus-visible {
	color: var(--wp--preset--color--accent-1);
}

.site-footer__bottom {
	display: flex;
	font-size: var(--wp--preset--font-size--small);
	justify-content: center;
	margin-top: var(--wp--style--block-gap);
	padding-top: calc(var(--wp--preset--spacing--70) + var(--wp--style--block-gap));
}

/* One shrink-wrapped line: centred when it fits, left-aligned when it wraps. */
.site-footer__line {
	text-align: left;
}

.site-footer__copy,
.site-footer__legal,
.legal-links,
.legal-links li {
	display: inline;
}

.site-footer__copy,
.legal-links {
	margin: 0;
	padding: 0;
}

.legal-links {
	list-style: none;
}

.legal-links li::before {
	content: "\2013" / "";
	margin-inline: 0 0.3em;
}

/* Items after the first also need space before the dash. */
.legal-links li + li::before {
	margin-inline-start: 0.3em;
}

@media (max-width: 781px) {

	.site-footer__cols {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 7. Pills, post cards and lists ---------------------------------------- */

.sn-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sn-pill {
	background: var(--wp--custom--color--pill-bg);
	border: 0.8px solid var(--wp--custom--color--pill-border);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--custom--color--pill-text);
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.8;
	padding: 2px 10px;
	text-decoration: none;
	white-space: nowrap;
}

.sn-pill:hover {
	color: var(--wp--custom--color--pill-text);
	text-decoration: underline;
}

/*
 * The card grid keeps its tracks even with one or two posts: three columns
 * on desktop (as the home journal section was), two on tablets, one on
 * phones. `auto-fit` would stretch two cards to half the width each. The
 * compact list in the single-post sidebar stays one column.
 */
.post-cards {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) {

	.post-cards:not(.post-cards--compact) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {

	.post-cards:not(.post-cards--compact) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.post-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--color--card-border);
	border-radius: var(--wp--custom--radius--card);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--40);
}

.post-card__image,
.post-compact__image,
.post-row__image {
	display: block;
	overflow: hidden;
}

.post-card__image {
	border-radius: 10px;
}

.post-card__image img {
	aspect-ratio: 4 / 3;
	display: block;
	object-fit: cover;
	transition: transform 0.6s ease;
	width: 100%;
}

.post-card:hover .post-card__image img {
	transform: scale(1.06);
}

.post-card__title,
.post-compact__title {
	font-size: var(--wp--preset--font-size--large);
	margin: 0;
}

.post-card__title a,
.post-compact__title a,
.post-row__title a {
	color: inherit;
	text-decoration: none;
}

.post-card__title a:hover,
.post-compact__title a:hover,
.post-row__title a:hover {
	text-decoration: underline;
}

.post-card__meta {
	color: var(--wp--preset--color--accent-4);
	column-gap: 1rem;
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

.post-card__excerpt {
	margin: 0;
}

.post-compact {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.post-compact__image {
	border-radius: var(--wp--custom--radius--image);
}

.post-compact__image img {
	aspect-ratio: 3 / 2;
	display: block;
	object-fit: cover;
	width: 100%;
}

.post-compact__more {
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

/* 8. Page, blog index, archive, search, 404 ---------------------------- */

.site-main--page,
.site-main--list {
	margin-bottom: var(--wp--preset--spacing--70);
	margin-top: var(--wp--preset--spacing--60);
}

.site-main--bare {
	margin-top: 0;
}

.page-article {
	padding-bottom: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--60);
}

.archive-header {
	margin-bottom: var(--wp--preset--spacing--60);
}

.archive-title {
	margin: 0;
}

.archive-description {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--medium);
	margin-top: var(--wp--preset--spacing--30);
}

.post-list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
}

.post-row {
	align-items: center;
	display: grid;
	gap: var(--wp--preset--spacing--50);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* No featured image: a single text column that keeps the content width
 * (960px) instead of stretching across the 1340px list, so the excerpt
 * lines stay readable. It lines up with the page title on the left. */
.post-row--text {
	grid-template-columns: minmax(0, 1fr);
	max-width: var(--wp--style--global--content-size);
}

.post-row__image img {
	display: block;
	width: 100%;
}

.post-row__title {
	margin: 0;
}

.post-row__excerpt {
	font-size: var(--wp--preset--font-size--medium);
	margin-top: var(--wp--style--block-gap);
}

.post-row__excerpt p {
	margin: 0;
}

.post-row__more {
	margin: var(--wp--style--block-gap) 0 0;
}

.sn-pagination {
	font-size: var(--wp--preset--font-size--large);
	margin-top: var(--wp--preset--spacing--60);
}

.sn-pagination .nav-links {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.sn-pagination .page-numbers {
	color: var(--wp--preset--color--contrast);
	padding: 0.25rem 0.6rem;
	text-decoration: none;
}

.sn-pagination a.page-numbers:hover {
	text-decoration: underline;
}

.sn-pagination .page-numbers.current {
	font-weight: 600;
	text-decoration: underline;
}

.search-form-wrap {
	margin-bottom: var(--wp--preset--spacing--60);
}

.search-form {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--medium);
	gap: 0.5rem 1.125rem;
	line-height: 1.6;
}

.search-field {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 3.125rem;
	color: var(--wp--preset--color--contrast);
	flex: 1 1 14rem;
	font: inherit;
	max-width: 30rem;
	padding: 0.7rem 1.5625rem;
}

.search-submit {
	border: 0;
	border-radius: 3.125rem;
}

.not-found-latest {
	margin-top: var(--wp--preset--spacing--70);
}

.not-found-latest h2 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-bottom: var(--wp--preset--spacing--40);
	margin-top: 0;
}

@media (max-width: 781px) {

	.post-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 9. Single post --------------------------------------------------------- */

.site-main--single {
	margin-top: var(--wp--preset--spacing--60);
}

.post-hero__inner {
	align-items: center;
	display: grid;
	gap: var(--wp--preset--spacing--60);
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.post-hero__text {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.post-hero__title {
	margin: 0 0 var(--wp--preset--spacing--30);
}

.post-byline,
.post-reading-time {
	color: var(--wp--preset--color--accent-4);
	margin: 0;
}

.post-byline__sep {
	margin: 0 0.25em;
}

.post-hero__text .sn-pills {
	margin-top: var(--wp--preset--spacing--30);
}

.post-hero__image {
	margin: 0;
}

.post-hero__image img {
	aspect-ratio: 3 / 2;
	border-radius: var(--wp--custom--radius--card);
	display: block;
	object-fit: cover;
	width: 100%;
}

.post-body {
	padding-bottom: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--70);
}

.post-body__grid {
	display: grid;
	gap: var(--wp--preset--spacing--60);
	grid-template-columns: minmax(0, 1fr);
}

.entry-footer {
	margin-top: var(--wp--preset--spacing--60);
}

.entry-written-by {
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 var(--wp--preset--spacing--30);
}

.post-sidebar {
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.post-sidebar__title,
.guide-cta__title {
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 var(--wp--preset--spacing--30);
}

.post-sidebar__list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.guide-cta {
	background: var(--wp--preset--color--accent-5);
	border: 1px solid var(--wp--custom--color--card-border);
	border-radius: var(--wp--custom--radius--card);
	padding: var(--wp--preset--spacing--40);
}

.guide-cta__text {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 var(--wp--preset--spacing--30);
}

.guide-cta .wp-block-button__link {
	display: block;
}

.site-main--single > .alignfull {
	margin-top: 0;
}

@media (min-width: 960px) {

	.post-body__grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
	}

	.post-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--sn-header-height) + var(--wp--preset--spacing--30));
	}
}

@media (max-width: 781px) {

	.post-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 10. Comments ---------------------------------------------------------- */

.comments-area {
	margin-bottom: var(--wp--preset--spacing--70);
	margin-top: var(--wp--preset--spacing--70);
}

.comments-title {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: 0;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	padding-left: var(--wp--preset--spacing--40);
}

.comment-body {
	margin-bottom: var(--wp--preset--spacing--50);
}

.comment-author .avatar {
	border-radius: 100px;
	float: left;
	margin-right: 1rem;
}

.comment-metadata,
.comment-metadata a,
.reply a {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}

.comment-form label {
	font-size: var(--wp--preset--font-size--small);
}

.comment-form input:not([type="submit"], [type="checkbox"]),
.comment-form textarea {
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 0.25rem;
	box-sizing: border-box;
	font: inherit;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	width: 100%;
}

/* 11. Temporary rules (move into the blocks in M3) ----------------------- */

/*
 * Image zoom on the home "Latest from the blog" cards (a core query loop
 * for now). Moves to src/blocks/post-cards/style.css when that block exists.
 */
.post-card-zoom .wp-block-post-featured-image {
	border-radius: 10px;
	overflow: hidden;
}

.post-card-zoom .wp-block-post-featured-image img {
	transition: transform 0.6s ease;
	width: 100%;
}

.post-card-zoom:hover .wp-block-post-featured-image img {
	transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {

	:root :where(.wp-block-button .wp-block-button__link),
	.box-shadow-on-hover,
	.is-style-card,
	.post-card,
	.post-card__image img,
	.post-card-zoom .wp-block-post-featured-image img {
		transition: none !important;
	}

	:root :where(.wp-element-button:hover, .wp-block-button__link:hover),
	.box-shadow-on-hover:hover,
	.is-style-card:hover,
	.post-card:hover,
	.post-card:hover .post-card__image img,
	.post-card-zoom:hover .wp-block-post-featured-image img {
		transform: none;
	}
}
