/*
Theme Name: Crystal Rose Publishing
Theme URI: https://crystalrosepublishing.com
Author: Sebo Marketing
Author URI: https://sebomarketing.com
Description: Custom block theme for Crystal Rose Publishing, a children's book publisher. Brand palette and typography are defined in theme.json; this stylesheet covers what theme.json cannot express.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crystal-rose
Tags: block-theme, full-site-editing, e-commerce, one-column, custom-colors, custom-menu, editor-style
*/

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-optical-sizing: auto;
}

/* Balance short headings rather than leaving a single orphaned word. */
h1,
h2,
h3,
.wp-block-post-title {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

/* Body copy caps its measure even inside wide containers.
   `.cr-price` is exempt: it is a flex row, not prose, and a 68ch cap made
   `justify-content: center` centre the amount inside 680px rather than
   inside its column — which reads as a stray left-aligned price. */
:where(.entry-content) p:not([class*="has-"]):not(.cr-price) {
	max-width: 68ch;
}

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

/* WordPress puts a block-gap margin between every top-level block, which
   leaves a white strip between the header and the first full-bleed section,
   and another between the last section and the footer. Sections carry their
   own padding, so those gaps are never wanted here. */
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-template-part {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
   2. Focus — a single visible treatment everywhere.
      Never remove this; keyboard users depend on it.
   ---------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--forest);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Dark grounds need a light ring to stay visible. */
.cr-on-dark :where(a, button, input, select, textarea):focus-visible {
	outline-color: var(--wp--preset--color--green);
}

.skip-link {
	position: absolute;
	top: -100vh;
	left: 0;
	z-index: 999999;
	padding: 0.85rem 1.5rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	border-bottom-right-radius: 6px;
}

.skip-link:focus {
	top: 0;
}

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

/* -------------------------------------------------------------------------
   3. Links — underlines that sit below the baseline rather than
      slicing through descenders.
   ---------------------------------------------------------------------- */

:where(.entry-content, .wp-block-post-content) a:where(:not(.wp-element-button):not(.wp-block-button__link)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	text-decoration-color: rgba(44, 97, 63, 0.4);
	transition: text-decoration-color var(--wp--custom--transition--base);
}

:where(.entry-content, .wp-block-post-content) a:where(:not(.wp-element-button)):hover {
	text-decoration-color: currentColor;
}

/* Buttons and nav links must not inherit the content underline. */
.wp-block-navigation a,
.wp-element-button,
.wp-block-button__link {
	text-decoration: none;
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color var(--wp--custom--transition--base),
		color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* Secondary button: outlined, for lower-priority actions. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--forest);
	border: 1.5px solid var(--wp--preset--color--forest);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--ink);
}

/* -------------------------------------------------------------------------
   4. Header
   ---------------------------------------------------------------------- */

/* -----------------------------------------------------------------
   Announcement bar

   Sits above the header inside the same sticky wrapper, and collapses
   when the header compacts on scroll — the free-shipping threshold is
   worth the top of the page once, not a permanent strip on every
   screen. Collapsing it is a :has() on the wrapper because the bar is
   the header's *previous* sibling and CSS cannot look backwards.
   ----------------------------------------------------------------- */

.cr-promo {
	position: relative;
	z-index: 2;
	overflow: hidden;
	max-height: 4rem;
	background: var(--wp--preset--color--leaf);
	transition: max-height var(--wp--custom--transition--base),
		opacity var(--wp--custom--transition--base);
}

.cr-promo__text {
	margin: 0;
	padding-block: 0.5rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--ink);
}

.cr-promo__text a {
	color: var(--wp--preset--color--ink);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(74, 78, 82, 0.5);
}

.cr-promo__text a:hover {
	text-decoration-color: currentColor;
}

.wp-site-blocks > .wp-block-template-part:has(.cr-header.is-compact) .cr-promo {
	max-height: 0;
	opacity: 0;
}

/* On a phone the sentence and the link together wrap to two lines, which
   turns a thin strip into a block. The threshold is the message; the link
   is a convenience the rest of the header already provides. */
@media (max-width: 599px) {
	.cr-promo__more {
		display: none;
	}

	.cr-promo__text {
		padding-block: 0.45rem;
	}
}

/* Without JavaScript the header never compacts, so the bar simply stays —
   which is the correct baseline for a message worth reading. */

/* header.js adds this to <html> for the length of one measurement, so it can
   read the header's expanded height instead of whatever height the 180ms
   transition happened to be part-way through. Removed in the same frame. */
.cr-measuring *,
.cr-measuring *::before,
.cr-measuring *::after {
	transition: none !important;
	animation: none !important;
}

/* Stickiness has to live on the template-part wrapper, not on .cr-header.
   WordPress renders the header part inside a <div class="wp-block-template-part">
   that is exactly as tall as the header, and a sticky element cannot travel
   beyond its containing block — so sticking it to .cr-header gives it zero
   travel and it scrolls away immediately. */
.wp-site-blocks > .wp-block-template-part:has(.cr-header),
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	/* The admin bar is position:fixed at the top of the viewport for logged-in
	   users, so a header stuck to 0 slides underneath it. WordPress exposes the
	   bar's height as a custom property (32px, or 46px under 782px), which also
	   keeps this correct when the bar is absent. */
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	/* This subtree resizes itself (promo bar, padding, logo swap) every time
	   is-compact toggles. header.js's spacer keeps the *document* height from
	   changing so the browser has no reason to re-anchor scroll position, but
	   that only cancels out what the spacer actually measures; it does not
	   stop Chrome from picking a node in here as its anchor in the first
	   place. Opting the whole subtree out is the direct fix rather than a
	   side effect of getting the arithmetic right. */
	overflow-anchor: none;
}

/* Fallback for WordPress versions that do not set the custom property. */
body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.cr-header),
body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.cr-header),
	body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

/* Below 600px the admin bar stops being fixed and scrolls away with the page,
   so the header must sit flush again or it leaves a 46px gap. */
@media screen and (max-width: 600px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(.cr-header),
	body.admin-bar .wp-site-blocks > .wp-block-template-part:first-child {
		top: 0;
	}
}

/* The frosted background lives on a pseudo-element, not on .cr-header itself.
   backdrop-filter makes an element the containing block for its
   position:fixed descendants, which collapsed the mobile menu overlay to the
   height of the header instead of the viewport. Keeping the filter on a
   childless pseudo-element preserves the effect without that side effect. */
.cr-header {
	position: relative;
	background: transparent;
	border-bottom: var(--wp--custom--rule--hairline);
}

.cr-header::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
}

.cr-header__bar {
	position: relative;
	z-index: 1;
}

/* The bar carries the vertical rhythm, and shrinks in the compact state.
   Padding is on the bar rather than the header so the sticky background
   still spans the full viewport width. */
.cr-header__bar {
	padding-block: clamp(0.85rem, 1.6vw, 1.35rem);
	transition: padding-block var(--wp--custom--transition--base);
}

.cr-header .custom-logo-link,
/* The original full-colour lockup was a mint-to-cream gradient, which on the
   header's near-white ground read as a faint smudge — the fairy mark all but
   disappeared — so the header used the single-fill forest derivation instead.
   Horiz_v2 (flat Pantone 346C + Cool Gray 11C, no gradient) has enough
   contrast on white to use directly; the older forest/gradient variants are
   still shipped for use elsewhere. */
.cr-header .cr-brand__full {
	margin: 0;
	line-height: 0;
}

.cr-header .cr-brand__full a {
	display: block;
	line-height: 0;
}

.cr-header .cr-brand__full img {
	/* The mark is fine line art and the "PUBLISHING" lettering is light, so
	   the logo needs a little more room than a typical wordmark to stay
	   legible at small sizes. */
	width: clamp(156px, 17vw, 198px);
	height: auto;
	transition: opacity var(--wp--custom--transition--base);
}

.cr-header .cr-brand__full a:hover img {
	opacity: 0.78;
}

/* -----------------------------------------------------------------
   Compact (scrolled) header.

   The `is-compact` class is toggled by assets/js/header.js past a
   scroll threshold. Only the circular fairy mark shows, and the bar
   loses height, so more of the page stays visible while scrolling.
   ----------------------------------------------------------------- */

.cr-brand__mark {
	display: none;
	margin: 0;
	line-height: 0;
}

.cr-brand__mark img {
	display: block;
	width: 46px;
	height: auto;
	transition: opacity var(--wp--custom--transition--base);
}

.cr-brand__mark a:hover img {
	opacity: 0.78;
}

.cr-header.is-compact .cr-header__bar {
	padding-block: 0.5rem;
}

.cr-header.is-compact .cr-brand__full {
	display: none;
}

.cr-header.is-compact .cr-brand__mark {
	display: block;
}

/* Without JS the header simply stays in its full state — the mark is the
   progressive enhancement, not the baseline. */

/* Nav links: an animated rule that grows from the left on hover, and
   stays put for the current page. */
.cr-header .wp-block-navigation-item__content {
	position: relative;
	padding-block: 0.35rem;
	color: var(--wp--preset--color--ink);
}

.cr-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--wp--preset--color--green);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--wp--custom--transition--base);
}

.cr-header .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.cr-header .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after,
.cr-header .wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* -----------------------------------------------------------------
   The Books mega panel

   One <ul> laid out as two columns: the three published titles on the
   left, the unwritten ones on the right. A single 15rem dropdown wrapped
   every title onto two lines and said nothing about what is coming, which
   is most of what the Books menu has to tell anyone right now.

   Core renders a flat list, so the columns come from placing the ten items
   into five explicit rows and letting them flow down-then-across. Keep the
   two halves the same length or the columns fall out of step.
   ----------------------------------------------------------------- */

.cr-header .wp-block-navigation__submenu-container {
	border: none;
	border-radius: 14px;
	padding: 0.4rem;
	min-width: 15rem;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--lifted);
}

.cr-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.6rem 0.85rem;
	border-radius: 8px;
	width: 100%;
}

.cr-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
	display: none;
}

.cr-header .wp-block-navigation__submenu-container a.wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--shell);
	color: var(--wp--preset--color--forest);
}

/* Above the overlay breakpoint only — inside the mobile sheet the same list
   has to stay a single readable column. Kept in step with the 800px
   breakpoint set for the overlay above. */
@media (min-width: 800px) {
	/* Core makes the <li> the panel's containing block, which anchors a
	   full-width panel to a point that slides around with the width of the
	   word "Books" and whatever sits beside it. Taking the positioning off
	   the item hands the job to .wp-block-navigation__container — the
	   navigation list itself — so the panel's right edge lines up with the
	   end of the navigation on every screen instead.

	   `align-self: stretch` is what makes the hover survive the trip down to
	   the panel. The list centres its items, so the item's box ended 4px
	   above the bottom of the list, and the bridge below starts at the
	   list's bottom — leaving a 4px band belonging to neither. A pointer
	   crossing it slowly fired pointerleave and the menu closed; a fast one
	   skipped the band between frames, which is why it only failed
	   sometimes. Stretching the item closes the band. Its own contents stay
	   centred, so nothing moves. */
	.cr-header .cr-nav-books {
		position: static;
		align-self: stretch;
	}

	/* Every declaration below is carried on five classes, because core's
	   open state sets `width: auto` from four of them. At three the panel
	   shrink-to-fitted to about 330px the moment it was genuinely hovered,
	   and both columns wrapped every title onto four lines — a state no
	   screenshot that forces the panel visible will ever reproduce, since
	   forcing it never triggers the rule doing the damage. */
	.cr-header
		.wp-block-navigation
		.has-child.cr-nav-books
		> .wp-block-navigation__submenu-container {
		display: block;
		/* Multi-column rather than a grid. A grid shares its row heights
		   across both columns, so one two-line title on the right opened a
		   matching hole on the left; columns flow independently and the
		   break below decides where the split falls, not the browser. */
		columns: 2;
		column-gap: var(--wp--preset--spacing--30);
		column-rule: var(--wp--custom--rule--hairline);
		box-sizing: border-box;
		width: min(38rem, calc(100vw - 3rem));
		padding: 0.9rem 1.1rem 1rem;
		left: auto;
		right: 0;
		/* Dropped clear of the header rather than starting halfway up it:
		   the navigation list ends at the bottom of its links, which is a
		   bar's worth of padding above the header's own bottom edge. */
		top: calc(100% + 1.4rem);
	}

	/* The gap that offset just opened is not part of the menu item, so a
	   pointer crossing it would fire pointerleave and close the panel. This
	   bridges it with a strip that *is* a descendant of the item, and so
	   keeps both the :hover rule and core's pointerleave handler satisfied.

	   0.2rem taller than the 1.4rem it spans, so it overlaps the stretched
	   item above rather than meeting it on a subpixel boundary. It must not
	   grow much beyond that: it runs the full width of the panel, and the
	   other navigation links sit just above it. */
	.cr-header
		.wp-block-navigation
		.has-child.cr-nav-books
		> .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -1.6rem;
		height: 1.6rem;
	}

	.cr-header
		.wp-block-navigation
		.has-child.cr-nav-books
		> .wp-block-navigation__submenu-container
		> li {
		break-inside: avoid;
	}

	/* Five items each side. Without this the browser balances the two
	   columns by height and the split lands mid-list. */
	.cr-header
		.wp-block-navigation
		.has-child.cr-nav-books
		> .wp-block-navigation__submenu-container
		> li:nth-child(6) {
		break-before: column;
	}
}

/* A column heading, not a destination. Rendered by core as an anchor with no
   href, which is already inert; this stops it looking clickable too. */
.cr-header .cr-nav-group > .wp-block-navigation-item__content {
	margin-bottom: 0.15rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
	cursor: default;
	pointer-events: none;
}

/* Titles with no page yet. Listed because "what else is coming" is a real
   question the Books menu should answer, and unlinked because there is
   nowhere to send anyone. */
.cr-header .cr-nav-soon > .wp-block-navigation-item__content {
	/* A column so the badge lands under the title rather than chasing it
	   along a line that is already close to wrapping. */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	color: var(--wp--preset--color--gray);
	cursor: default;
	pointer-events: none;
}

.cr-header .cr-nav-soon > .wp-block-navigation-item__content::after {
	display: inline-block;
	content: "Coming soon";
	margin-top: 0.2rem;
	padding: 0.1rem 0.45rem;
	position: static;
	width: auto;
	height: auto;
	border-radius: 999px;
	background: var(--wp--preset--color--cream);
	transform: none;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

/* The link that closes each column. */
.cr-header .cr-nav-more > .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--forest);
}

.cr-header .cr-nav-more > .wp-block-navigation-item__content::after {
	display: inline;
	content: "\00a0→";
	position: static;
	width: auto;
	height: auto;
	background: none;
	transform: none;
}

/* -----------------------------------------------------------------
   Where the navigation becomes a hamburger

   Core's overlay menu switches at a hard-coded 600px, and this
   navigation is six items plus a Shop pill and a cart — at 800px the
   pill had already wrapped onto a second line and pushed the header
   taller than the logo. There is no block setting for the breakpoint,
   so the three rules core keys to 600px are restated here at 800px.
   The base styles below 600px are core's own, restored.
   ----------------------------------------------------------------- */

@media (max-width: 799px) {
	.cr-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
		position: fixed;
		width: auto;
		z-index: auto;
	}

	.cr-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

/* -----------------------------------------------------------------
   Mobile overlay menu

   Full-screen, translucent so the page stays faintly visible behind
   it, with a large close control. Woo/WP already render the open and
   close buttons; this is presentation only.
   ----------------------------------------------------------------- */

.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	padding: clamp(1.25rem, 5vw, 2.5rem);
	/* Warm wash — enough to read against, still showing the page beneath.
	   !important because Woo/WP set `background-color: inherit` here at equal
	   specificity, which otherwise picks up the header's opaque white. */
	background-color: rgba(247, 244, 236, 0.9) !important;
	backdrop-filter: blur(16px) saturate(150%);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	align-items: stretch;
	justify-content: flex-start;
}

/* Give the list room below the close button and centre it in the sheet. */
/* WordPress nests two wrappers between the overlay and the menu list
   (__responsive-close, then __responsive-dialog). Both must grow, or the
   content has no height to be centred within. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__responsive-container-content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	/* Centre the list in the sheet rather than stacking it under the close
	   button with dead space below. */
	justify-content: center;
	padding-block: clamp(2rem, 8vh, 4rem);
	width: 100%;
	min-height: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container {
	gap: 0;
	width: 100%;
	max-width: 22rem;
	text-align: center;
	/* WordPress gives the list flex-grow, which pins the items to the top of
	   the sheet. Auto block margins centre it regardless of that. */
	flex: 0 0 auto;
	margin-block: auto;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item {
	width: 100%;
	justify-content: center;
	border-bottom: 1px solid rgba(74, 78, 82, 0.12);
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item:last-child {
	border-bottom: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	/* Comfortable tap target. */
	padding-block: 0.85rem;
	width: 100%;
	justify-content: center;
}

/* The desktop hover rule draws an underline bar; not wanted in the sheet. */
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content::after {
	display: none;
}

/* Two exceptions: the "Coming soon" badge and the closing arrow are content,
   not the hover underline, and the sheet needs them as much as the panel
   does — an unlinked title with nothing marking it is just a dead link. */
.wp-block-navigation__responsive-container.is-menu-open
	.cr-nav-soon
	> .wp-block-navigation-item__content::after {
	display: inline-block;
}

.wp-block-navigation__responsive-container.is-menu-open
	.cr-nav-more
	> .wp-block-navigation-item__content::after {
	display: inline;
}

.wp-block-navigation__responsive-container.is-menu-open
	.cr-nav-soon
	> .wp-block-navigation-item__content {
	align-items: center;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--forest);
}

/* Submenu (Books) sits indented and quieter, always expanded in the sheet. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none;
	background: transparent;
	border: 0;
	padding: 0 0 0.5rem;
	min-width: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item {
	border-bottom: 0;
}

.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	color: var(--wp--preset--color--gray);
	padding-block: 0.6rem;
}

/* Open (hamburger) control. */
.wp-block-navigation__responsive-container-open {
	padding: 0.4rem;
	color: var(--wp--preset--color--ink);
}

.wp-block-navigation__responsive-container-open:hover {
	color: var(--wp--preset--color--forest);
}

/* Close (X) control — enlarged and given a visible hit area, since the
   default is a small bare glyph in the corner. */
.wp-block-navigation__responsive-container-close {
	top: clamp(1.25rem, 5vw, 2.5rem);
	right: clamp(1.25rem, 5vw, 2.5rem);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--soft);
	transition: background-color var(--wp--custom--transition--base),
		color var(--wp--custom--transition--base);
}

.wp-block-navigation__responsive-container-close:hover {
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
}

.wp-block-navigation__responsive-container-close svg {
	width: 26px;
	height: 26px;
}

/* The overlay is fixed to the viewport, so it must clear the admin bar. */
body.admin-bar .wp-block-navigation__responsive-container.is-menu-open {
	top: var(--wp-admin--admin-bar--height, 46px);
}

/* -------------------------------------------------------------------------
   5. Cart indicator in the header
   ---------------------------------------------------------------------- */

.cr-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem;
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: background-color var(--wp--custom--transition--base);
}

.cr-cart:hover {
	background: var(--wp--preset--color--shell);
	color: var(--wp--preset--color--forest);
}

.cr-cart svg {
	width: 22px;
	height: 22px;
	display: block;
}

.cr-cart__count {
	position: absolute;
	top: -1px;
	right: -3px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.cr-cart__count:empty,
.cr-cart__count[data-count="0"] {
	display: none;
}

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

.cr-footer {
	background: var(--wp--preset--color--ink);
	color: rgba(255, 255, 255, 0.82);
}

/* The stacked lockup's fairy mark is hairline linework. At 200px those
   white strokes fall below a device pixel and alias into looking rough,
   which reads as pixelation even though the source is vector. Giving it
   more room is the actual fix. */
.cr-footer .wp-block-site-logo img,
.cr-footer__logo img {
	width: clamp(215px, 22vw, 275px);
	height: auto;
	/* Nudge the fine strokes away from sub-pixel rendering. */
	shape-rendering: geometricPrecision;
}

.cr-footer :where(h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--base);
}

.cr-footer a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.cr-footer a:hover {
	color: var(--wp--preset--color--green);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.cr-footer .wp-block-navigation {
	gap: 0.55rem;
}

.cr-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* -------------------------------------------------------------------------
   7. Editorial pieces
   ---------------------------------------------------------------------- */

/* Eyebrow label above a section heading. */
.cr-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--forest);
}

/* When the eyebrow is a term list (e.g. the product category on a book page)
   its links must not pick up the content underline — at this size and letter
   spacing an underline reads as noise. */
.cr-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.cr-eyebrow a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* The book cover, presented as a physical object.

   The covers are not quite one shape: Dandelion Dust and Superhuman are about
   0.95 wide to tall, Hootie is a square. Side by side the square one finished
   a few pixels short, so every cover is held to the same ratio and the odd one
   is trimmed a sliver from each side, well clear of its title. */
.cr-book-cover img {
	display: block;
	width: 100%;
	aspect-ratio: 0.95;
	object-fit: cover;
	border-radius: 3px 10px 10px 3px;
	box-shadow: var(--wp--preset--shadow--book);
}

/* -----------------------------------------------------------------
   Immersive hero — artwork behind the copy

   A whole-image dim would flatten the painting, so the scrim is
   left-weighted: dark enough for white type on the copy side, and
   clear on the right where the cover sits.
   ----------------------------------------------------------------- */

.cr-hero-immersive {
	position: relative;
	overflow: hidden;
}

.cr-hero-immersive::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(
			100deg,
			rgba(38, 30, 26, 0.88) 0%,
			rgba(38, 30, 26, 0.74) 36%,
			rgba(38, 30, 26, 0.34) 62%,
			rgba(38, 30, 26, 0.12) 100%
		);
}

/* On narrow screens the columns stack, so the copy sits over the middle of
   the image and needs an even wash instead of a side gradient. */
@media (max-width: 781px) {
	.cr-hero-immersive::before {
		background: linear-gradient(
			180deg,
			rgba(38, 30, 26, 0.72) 0%,
			rgba(38, 30, 26, 0.84) 55%,
			rgba(38, 30, 26, 0.72) 100%
		);
	}
}

.cr-hero-immersive .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.cr-hero-immersive__eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	/* Brand green reads well against the dark scrim; it is only unusable
	   on light grounds. */
	color: var(--wp--preset--color--green);
}

.cr-hero-immersive__meta {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.cr-hero-immersive h1 em {
	font-style: italic;
}

/* Lift the cover off the artwork so it reads as a physical object rather
   than part of the painting. */
.cr-book-cover--floating img {
	box-shadow: 0 4px 12px rgba(20, 28, 25, 0.3), 0 28px 64px rgba(20, 28, 25, 0.45);
}

/* Outline button on a dark ground. */
.cr-btn-on-dark .wp-block-button__link,
.wp-block-button.is-style-outline.cr-btn-on-dark > .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, 0.65);
	background: transparent;
}

.cr-btn-on-dark .wp-block-button__link:hover,
.wp-block-button.is-style-outline.cr-btn-on-dark > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--forest);
	border-color: var(--wp--preset--color--base);
}

/* A soft rounded frame for interior artwork. */
.cr-art img {
	border-radius: 14px;
}

/* Pull quote used for the song / refrain from the book. */
.cr-refrain {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	font-style: italic;
	line-height: 1.55;
	color: var(--wp--preset--color--forest);
	text-align: center;
}

/* Decorative divider echoing the dandelion motif. */
.cr-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--green);
}

.cr-divider::before,
.cr-divider::after {
	content: "";
	height: 1px;
	flex: 1 1 auto;
	max-width: 7rem;
	background: currentColor;
}

/* Cards */
.cr-card {
	background: var(--wp--preset--color--base);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--soft);
	overflow: hidden;
	transition: box-shadow var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.cr-card:hover {
	box-shadow: var(--wp--preset--shadow--lifted);
	transform: translateY(-3px);
}

/* -------------------------------------------------------------------------
   8. Blog
   ---------------------------------------------------------------------- */

/* The post grid is declared as a fixed 3-up in the templates, because
   combining columnCount with minimumColumnWidth made WordPress emit an
   unpredictable 2-up. Collapsing for narrower screens is done here. */
.wp-block-post-template.is-layout-grid {
	gap: var(--wp--preset--spacing--30);
}

@media (max-width: 1024px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 660px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* The blog intro sits in a wide container so its rule spans the grid; its
   text should start at the same left edge as the first card, not be centred
   inside it. */
.cr-blog-intro > * {
	margin-inline: 0;
}

.cr-blog-intro p {
	max-width: 58ch;
}

/* Cards stretch to the row height so the "Keep reading" link lands on a
   consistent baseline instead of floating wherever the excerpt ends. */
.cr-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.cr-post-card .wp-block-post-excerpt {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.cr-post-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	padding-top: 0.75rem;
}

.cr-post-card .wp-block-post-excerpt__more-text a {
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(44, 97, 63, 0.35);
}

.cr-post-card .wp-block-post-excerpt__more-text a:hover {
	border-bottom-color: currentColor;
}

.cr-post-card .wp-block-post-featured-image img {
	border-radius: 12px;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.cr-post-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}

.cr-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.cr-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--forest);
}

.cr-meta {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

/* -----------------------------------------------------------------
   The blog, as a blog

   Wireframe 07: a single column of posts with a right-hand rail
   carrying a lead magnet, the socials, a buy prompt, a featured post
   and the categories. The two columns are a core columns block, so
   they stack at 781px with no work — below that the rail simply
   follows the posts, which is the right order on a phone.
   ----------------------------------------------------------------- */

/* One post, listed. The thumbnail column disappears rather than leaving a
   gap when a post has no featured image, which the placeholder posts do
   not. */
.cr-post-row {
	display: grid;
	align-items: start;
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: var(--wp--custom--rule--hairline);
}

.cr-post-row:has(> .wp-block-post-featured-image) {
	grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
	column-gap: var(--wp--preset--spacing--30);
}

/* WordPress gives every child but the first a block-gap top margin, which
   inside a grid lands in the cell and drops the second column. */
.cr-post-row > * {
	margin-top: 0;
}

.cr-post-row .wp-block-post-featured-image {
	margin: 0;
}

.cr-post-row .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px;
}

.cr-post-row .wp-block-post-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.cr-post-row .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.cr-post-row .wp-block-post-title a:hover {
	color: var(--wp--preset--color--forest);
}

.cr-post-row .wp-block-post-excerpt__more-text {
	margin-top: 0.6rem;
	font-weight: 600;
}

.cr-post-row .wp-block-post-excerpt__more-text a {
	text-decoration: none;
	border-bottom: 1px solid rgba(44, 97, 63, 0.35);
}

.cr-post-row .wp-block-post-excerpt__more-text a:hover {
	border-bottom-color: currentColor;
}

/* The last row's rule would sit immediately above the pagination's own. */
.wp-block-post-template > li:last-child .cr-post-row {
	border-bottom: none;
	padding-bottom: 0;
}

@media (max-width: 599px) {
	.cr-post-row:has(> .wp-block-post-featured-image) {
		grid-template-columns: minmax(0, 1fr);
		row-gap: var(--wp--preset--spacing--20);
	}
}

/* The rail. Sticky on wide screens: the posts column is much the taller of
   the two, and a rail that scrolls away by the second post is a rail that
   was not worth the width. */
@media (min-width: 782px) {
	.cr-blog-layout > .wp-block-column:last-child {
		position: sticky;
		/* Clear of the sticky header, which is ~4.5rem compacted. */
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 5.5rem);
		align-self: start;
	}
}

.cr-widget__title {
	margin: 0 0 0.6rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}

.cr-widget__art {
	margin: 0 0 var(--wp--preset--spacing--20);
}

.cr-widget__art img {
	display: block;
	width: 100%;
	border-radius: 12px;
}

.cr-widget--cta .cr-widget__art img {
	box-shadow: var(--wp--preset--shadow--book);
}

/* The rail's icons are the same component as the follow section's, at the
   size a 24rem column can carry. */
.cr-social--compact {
	gap: 0.6rem;
	justify-content: flex-start;
	margin-top: 0;
}

.cr-social--compact a,
.cr-social--compact span {
	width: 44px;
	height: 44px;
}

.cr-social--compact img {
	width: 20px;
	height: 20px;
}

/* One post, promoted. A single anchor rather than a stack of links, so the
   whole card is one target. */
.cr-featured {
	display: block;
	text-decoration: none;
	color: inherit;
}

.cr-featured__art {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 0.7rem;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
}

.cr-featured__date {
	display: block;
	margin-bottom: 0.2rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

.cr-featured__title {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.3;
	color: var(--wp--preset--color--ink);
}

.cr-featured:hover .cr-featured__title {
	color: var(--wp--preset--color--forest);
}

/* Categories, as a list rather than core's bare bullets. */
.cr-widget--categories .wp-block-categories {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.cr-widget--categories .wp-block-categories li {
	padding: 0.45rem 0;
	border-bottom: var(--wp--custom--rule--hairline);
}

.cr-widget--categories .wp-block-categories li:last-child {
	border-bottom: none;
}

.cr-widget--categories .wp-block-categories a {
	text-decoration: none;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.cr-widget--categories .wp-block-categories a:hover {
	color: var(--wp--preset--color--forest);
}


.wp-block-query-pagination {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
   9. Forms — Gravity Forms and core inputs share one look
   ---------------------------------------------------------------------- */

input:where([type="text"], [type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [type="search"], [type="date"]),
select,
textarea,
.wp-block-search__input {
	width: 100%;
	padding: 0.8rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(74, 78, 82, 0.22);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	transition: border-color var(--wp--custom--transition--base),
		box-shadow var(--wp--custom--transition--base);
}

input:where([type="text"], [type="email"], [type="url"], [type="tel"], [type="number"], [type="password"], [type="search"]):focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--forest);
	box-shadow: 0 0 0 3px rgba(44, 97, 63, 0.14);
	outline: none;
}

::placeholder {
	color: rgba(74, 78, 82, 0.5);
	opacity: 1;
}

label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* -----------------------------------------------------------------
   Gravity Forms

   Selectors are doubled up on `.gform_wrapper.gravity-theme` where
   Gravity's own stylesheet would otherwise win on specificity.
   ----------------------------------------------------------------- */

.gform_wrapper.gravity-theme .gform_fields {
	grid-row-gap: var(--wp--preset--spacing--20);
	grid-column-gap: var(--wp--preset--spacing--20);
}

.gform_wrapper.gravity-theme .gfield_label,
.gform_wrapper.gravity-theme legend.gfield_label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	letter-spacing: 0;
}

.gform_wrapper.gravity-theme .gfield_required,
.gform_wrapper.gravity-theme .gfield_required .gfield_required_asterisk {
	color: #a4341f;
	font-weight: 600;
}

/* Five classes: Gravity sets 13px of padding on the description and another
   9px of margin through `.field_sublabel_above`, which between them floated
   the hint 22px clear of the field it belongs to and read as a line of body
   copy rather than a note attached to the input above it. */
.gform_wrapper.gravity-theme .gform_fields .gfield .gfield_description {
	margin-top: 0;
	padding-top: 0.3rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--gray);
	line-height: 1.5;
}

/* Inputs: match the site's field styling, overriding Gravity's. */
.gform_wrapper.gravity-theme .ginput_container input[type="text"],
.gform_wrapper.gravity-theme .ginput_container input[type="email"],
.gform_wrapper.gravity-theme .ginput_container input[type="tel"],
.gform_wrapper.gravity-theme .ginput_container input[type="url"],
.gform_wrapper.gravity-theme .ginput_container input[type="number"],
.gform_wrapper.gravity-theme .ginput_container select,
.gform_wrapper.gravity-theme .ginput_container textarea {
	width: 100%;
	padding: 0.8rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(74, 78, 82, 0.22);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	line-height: 1.5;
	transition: border-color var(--wp--custom--transition--base),
		box-shadow var(--wp--custom--transition--base);
}

/* Tall enough to invite a few sentences, not so tall that the rest of the
   form falls off the screen behind it. It still drags.

   Five classes, because the 192px box came from Gravity's own
   `.gform_wrapper.gravity-theme .gfield textarea.medium`, and Gravity's
   stylesheets load after this one — a tie goes to the plugin.

   Both forms use it: neither question needs 192px of empty box to invite an
   answer, and both boxes still drag. */
.gform_wrapper.gravity-theme .gfield .ginput_container textarea.textarea {
	height: 7rem;
	min-height: 7rem;
	resize: vertical;
}

.gform_wrapper.gravity-theme .ginput_container input:focus,
.gform_wrapper.gravity-theme .ginput_container select:focus,
.gform_wrapper.gravity-theme .ginput_container textarea:focus {
	border-color: var(--wp--preset--color--forest);
	box-shadow: 0 0 0 3px rgba(44, 97, 63, 0.14);
	outline: none;
}

/* Native select needs its own chevron once the default look is replaced. */
.gform_wrapper.gravity-theme .ginput_container select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4E52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 18px 18px;
	padding-right: 2.6rem;
}

/* Submit button — the brand pill. */
.gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.gform_wrapper.gravity-theme .gform_footer button[type="submit"],
.gform_wrapper.gravity-theme .gform_page_footer input[type="button"],
.gform_wrapper.gravity-theme .gform_page_footer input[type="submit"] {
	width: auto;
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 999px;
	padding: 0.95rem 2.1rem;
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background-color var(--wp--custom--transition--base),
		transform var(--wp--custom--transition--base);
}

.gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover,
.gform_wrapper.gravity-theme .gform_footer button[type="submit"]:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	transform: translateY(-1px);
}

.gform_wrapper.gravity-theme .gform_footer {
	padding: var(--wp--preset--spacing--20) 0 0;
	margin: 0;
	justify-content: flex-start;
}

/* Validation */
.gform_wrapper.gravity-theme .gfield_description.validation_message,
.gform_wrapper.gravity-theme .validation_message {
	margin-top: 0.4rem;
	padding: 0.5rem 0.75rem;
	background: #fdf3f1;
	border: 0;
	border-left: 3px solid #a4341f;
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--x-small);
	color: #8f2d1b;
}

.gform_wrapper.gravity-theme .gfield_error input,
.gform_wrapper.gravity-theme .gfield_error select,
.gform_wrapper.gravity-theme .gfield_error textarea {
	border-color: #a4341f;
}

.gform_wrapper.gravity-theme .gform_validation_errors {
	border-radius: 10px;
	border: 0;
	border-left: 3px solid #a4341f;
	background: #fdf3f1;
	box-shadow: none;
	padding: 1rem 1.25rem;
}

.gform_wrapper.gravity-theme .gform_validation_errors > h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: #8f2d1b;
	margin: 0;
}

.gform_wrapper.gravity-theme .gform_validation_errors > h2::before {
	display: none;
}

/* Inline confirmation, for any form not routed to a Thank You page. */
.gform_confirmation_message {
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--shell);
	border-left: 3px solid var(--wp--preset--color--forest);
	border-radius: 10px;
	font-size: var(--wp--preset--font-size--large);
	font-family: var(--wp--preset--font-family--heading);
}

/* -------------------------------------------------------------------------
   10. Section components

   Primitives the content wireframes lean on repeatedly. Layout stays with
   core columns and grids so the client can rearrange a section in the
   editor; these classes only carry what a core block cannot express.
   ---------------------------------------------------------------------- */

/* -----------------------------------------------------------------
   Interior page hero — title over artwork

   Every wireframe opens on a background header image, and the artwork
   is the reason to have one: the client asked for the paintings to
   carry the site. Dimming the whole image far enough for white type to
   clear AA turns a Michelle Clayton painting into a brown smear, so
   the contrast is bought locally instead — a light overall wash for
   cohesion, and a translucent panel behind the copy.

   Behind the panel the compositing works out at roughly 0.74 alpha
   over the artwork, which holds white text above 4.5:1 even on the
   brightest passage of the sunrise painting. Outside it the painting
   keeps most of its brightness.
   ----------------------------------------------------------------- */

.cr-page-hero {
	position: relative;
	overflow: hidden;
}

.cr-page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(38, 30, 26, 0.16) 0%,
		rgba(38, 30, 26, 0.3) 100%
	);
}

.cr-page-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.cr-page-hero .wp-block-cover__inner-container > .wp-block-group {
	/* The block's constrained layout caps its children, not the group, so
	   the panel needs its own measure or it spans the whole viewport.
	   border-box because there is no global box-sizing reset here: with the
	   default content-box the padding is added outside max-width:100% and
	   the panel hangs off the right of a phone screen, clipping the copy. */
	box-sizing: border-box;
	max-width: min(54rem, 100%);
	margin-inline: auto;
	padding: clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.25rem, 3.5vw, 3rem);
	border-radius: 20px;
	background: rgba(38, 30, 26, 0.66);
	backdrop-filter: blur(3px) saturate(115%);
	-webkit-backdrop-filter: blur(3px) saturate(115%);
}

/* The forest eyebrow is unreadable on the scrim; green is the one place
   the brand green is allowed to carry text, as on the home hero. */
.cr-page-hero .cr-eyebrow {
	color: var(--wp--preset--color--green);
}

.cr-page-hero .cr-meta {
	color: rgba(255, 255, 255, 0.74);
}

/* -----------------------------------------------------------------
   Header — Shop as the standing action

   The wireframes set Shop apart from the editorial links, at the far
   right of the bar. It is a nav link rather than a button outside the
   navigation so that it still travels into the mobile overlay.
   ----------------------------------------------------------------- */

.cr-header .cr-nav-shop > .wp-block-navigation-item__content {
	margin-left: 0.5rem;
	padding: 0.6rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.cr-header .cr-nav-shop > .wp-block-navigation-item__content::after {
	display: none;
}

.cr-header .cr-nav-shop > .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

/* In the overlay every item is already a large tap target on its own row,
   so the pill would read as the only "real" link in the sheet. */
.wp-block-navigation__responsive-container.is-menu-open
	.cr-nav-shop
	> .wp-block-navigation-item__content {
	margin-left: 0;
	padding: 0;
	background: transparent;
	color: inherit;
	border-radius: 0;
}


/* -----------------------------------------------------------------
   Icon tiles and numbered steps
   ----------------------------------------------------------------- */

/* A tinted disc rather than a flat brand colour: the trios sit on white,
   shell and cream in different sections, and a cream disc disappears
   entirely on the cream ones. Green at 45% reads on all three. */
figure.cr-tile {
	width: 68px;
	height: 68px;
	margin: 0 auto var(--wp--preset--spacing--20);
	border-radius: 50%;
	background: rgba(157, 215, 178, 0.45);
	display: grid;
	place-items: center;
}

figure.cr-tile img {
	width: 30px;
	height: 30px;
	display: block;
}

/* Left-aligned variant, for split sections rather than centred trios. */
figure.cr-tile.cr-tile--start {
	margin-left: 0;
	margin-right: auto;
}


/* -----------------------------------------------------------------
   Media frames
   ----------------------------------------------------------------- */

/* Interior imagery and the pending-asset placeholders share one frame, so
   swapping a real photograph in later changes nothing but the src. */
.cr-media-frame img {
	display: block;
	width: 100%;
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--soft);
}

/* Square crops for reader photos and product shots, so a portrait phone
   snapshot cannot stretch a row. */
.cr-media-frame--square img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* A grid of spreads from the book: three across, two on a tablet or phone
   so six tall squares do not stack into a scroll. The tiles are square
   crops already; the aspect ratio only keeps a slow image from jumping. */
.cr-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
}

.cr-gallery > .wp-block-image {
	margin: 0;
}

.cr-gallery img {
	aspect-ratio: 1;
	object-fit: cover;
}

@media (max-width: 781px) {
	.cr-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--20);
	}
}

/* A watercolor wash of bubbles behind a section. The scrim keeps it a
   texture: the paper-white gradient sits over the painting, so the heading
   and the speech bubble read as they would on the plain shell ground. The
   section's own background-color stays as the fallback. */
.cr-bubbles-ground {
	background-image:
		linear-gradient(rgba(247, 244, 236, 0.74), rgba(247, 244, 236, 0.74)),
		url("assets/img/art-hootie-bubbles.jpg");
	background-size: cover;
	background-position: center;
}

/* -----------------------------------------------------------------
   Quotes — testimonials, and lines lifted from the books
   ----------------------------------------------------------------- */

.cr-quote {
	height: 100%;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	border-top: 3px solid var(--wp--preset--color--green);
	border-radius: 4px 4px 16px 16px;
	box-shadow: var(--wp--preset--shadow--soft);
}

.cr-quote p {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

.cr-quote .cr-quote__mark {
	margin: 0 0 0.4rem;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1;
	color: var(--wp--preset--color--green);
}

.cr-quote .cr-quote__by {
	margin-top: var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

/* A line from a book, set large beside its artwork. */
.cr-bookquote {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.35;
	color: var(--wp--preset--color--ink);
}

.cr-bookquote__source {
	margin-top: var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

/* -----------------------------------------------------------------
   Reader stories — a child's words in a speech bubble

   This is the one section on the site written by children, so it is
   allowed to be the playful one: a bubble with a tail pointing down
   at the reader's photograph, and a degree or two of rotation so the
   row does not sit on a ruler.
   ----------------------------------------------------------------- */

.cr-kid {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Content sinks to the bottom of the column so the photographs and their
	   captions line up across the row; the bubbles then vary in height above
	   them, which is the right way round for hand-written quotes. */
	justify-content: flex-end;
}

/* Set in the hand font, and a size up: Patrick Hand runs small for its point
   size. The same bubble carries the grown-ups' testimonials on the book pages
   and Living Kindly — the client liked the treatment and asked for it
   everywhere quotes appear, so what was once "children only" is now the
   site's single voice for a quotation. */
.cr-kid__bubble,
.cr-testimonial__text {
	position: relative;
	margin: 0 0 1.6rem;
	padding: var(--wp--preset--spacing--20) calc(var(--wp--preset--spacing--20) + 0.25rem);
	background: var(--wp--preset--color--base);
	border-radius: 26px;
	box-shadow: var(--wp--preset--shadow--soft);
	font-family: var(--wp--preset--font-family--kid);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
	color: var(--wp--preset--color--ink);
	text-align: center;
	/* Keeps the tail's drop shadow from being clipped. */
	overflow: visible;
}

/* The tail. Two stacked triangles rather than one: the outer sits a pixel
   lower in a translucent ink to stand in for the card's shadow, which a
   border triangle cannot inherit. */
.cr-kid__bubble::before,
.cr-kid__bubble::after,
.cr-testimonial__text::before,
.cr-testimonial__text::after {
	content: "";
	position: absolute;
	left: 50%;
	width: 0;
	height: 0;
	border-left: 15px solid transparent;
	border-right: 15px solid transparent;
}

.cr-kid__bubble::before,
.cr-testimonial__text::before {
	bottom: -21px;
	margin-left: -14px;
	border-top: 21px solid rgba(20, 28, 25, 0.07);
}

.cr-kid__bubble::after,
.cr-testimonial__text::after {
	bottom: -18px;
	margin-left: -15px;
	border-top: 19px solid var(--wp--preset--color--base);
}

/* Alternate the lean so three bubbles in a row read as hand-placed. The
   reader stories are columns carrying .cr-kid themselves; the testimonials
   are a group inside an unclassed column, so those lean off the column. */
.cr-kid:nth-child(odd) .cr-kid__bubble,
.wp-block-column:nth-child(3n + 3) .cr-testimonial__text {
	rotate: -1.4deg;
}

.cr-kid:nth-child(even) .cr-kid__bubble,
.wp-block-column:nth-child(3n + 2) .cr-testimonial__text {
	rotate: 1.1deg;
}

/* The opening bubble of a row leans further, which is what stops three
   near-upright cards reading as a grid that failed to line up. */
.cr-kid:first-child .cr-kid__bubble,
.wp-block-column:nth-child(3n + 1) .cr-testimonial__text {
	rotate: -3.4deg;
}

.cr-kid figure {
	margin: 0;
	width: min(210px, 62%);
}

.cr-kid figure img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	/* A cream ring lifts the circle off both the white and shell grounds
	   this section is used on. */
	box-shadow: 0 0 0 8px var(--wp--preset--color--cream),
		var(--wp--preset--shadow--soft);
}

.cr-kid__by {
	margin: var(--wp--preset--spacing--20) 0 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
	text-align: center;
}

/* -----------------------------------------------------------------
   Testimonials — the same speech bubble as the reader stories

   These were cards: a white panel with a green cap and a watermark
   quote glyph, set in the body sans. The client preferred the reader
   stories' bubble and asked for it on every quote, so the card is
   gone and the bubble above carries the words; what is left here is
   the wrapper and the attribution that sits under the tail.
   ----------------------------------------------------------------- */

.cr-testimonial {
	position: relative;
	/* Bottom-aligned, so the attributions line up across a row while the
	   bubbles vary in height above them — the same way round as the reader
	   stories, and the right way round for quotes of different lengths. */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	padding: 0;
	background: none;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

/* The card's green cap and watermark glyph went with the card. */
.cr-testimonial::before,
.cr-testimonial::after {
	content: none;
}

.cr-testimonial > * {
	position: relative;
	/* WordPress gives every child but the first a block-gap top margin, which
	   inside this flex column would double up with the bubble's own tail
	   clearance. */
	margin-top: 0;
}

.cr-testimonial__by {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin: 0;
	padding-top: 0;
	border-top: none;
	text-align: left;
}

.cr-testimonial__avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	color: var(--wp--preset--color--forest);
}

.cr-testimonial__name {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--ink);
	line-height: 1.3;
}

.cr-testimonial__role {
	display: block;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--gray);
}

/* An empty slot, waiting for a quote. Drawn as a dashed bubble rather than
   left blank, so the row reads as three places to fill, one of them filled.
   No tail: there is no name under it to point at yet. */
.cr-testimonial--empty {
	justify-content: center;
}

.cr-testimonial--empty .cr-note {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 11rem;
	margin: 0;
	padding: var(--wp--preset--spacing--30);
	border: 1.5px dashed rgba(44, 97, 63, 0.28);
	border-radius: 26px;
	background: transparent;
	box-sizing: border-box;
}

/* A real testimonial that runs long reads awkwardly squeezed into a
   one-of-three column next to its placeholders, so it gets its own
   centered, narrower row instead — and, unlike the hand-placed columns,
   sits upright rather than leaning. */
.cr-testimonial--wide {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.cr-testimonial--wide .cr-testimonial__text {
	rotate: 0deg;
	font-size: var(--wp--preset--font-size--medium);
}

/* Marks a placeholder quote as not real. Deliberately loud: a sample
   testimonial that reads as genuine is the worst outcome here. */
.cr-tag {
	display: inline-block;
	/* Clear of the bubble below it, whose corner rises with the lean. */
	margin: 0 0 1.1rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gray);
}

/* -----------------------------------------------------------------
   The refrain, as the bee's own speech bubble

   Set to the client's supplied treatment: bold slab on cream, with a
   pair of amber notes. The amber is lifted from the book's own palette
   rather than the brand's — the brand has no warm accent, and the
   notes read as part of the illustration, not as UI.
   ----------------------------------------------------------------- */

/* The character and their bubble, side by side. */
.cr-quote-pair {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2rem);
}

.cr-quote-pair > .cr-quote-pair__who {
	flex: 0 0 clamp(96px, 26%, 168px);
	margin: 0;
}

.cr-quote-pair > .cr-quote-pair__who img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 8px var(--wp--preset--color--base),
		var(--wp--preset--shadow--soft);
}

.cr-quote-pair > .cr-refrain-bubble {
	flex: 1 1 auto;
	min-width: 0;
}

/* With no character beside it the bubble has nothing to point at. */
.cr-quote-pair--solo .cr-refrain-bubble__tail {
	display: none;
}

@media (max-width: 781px) {
	.cr-quote-pair {
		flex-direction: column;
		align-items: center;
	}

	.cr-quote-pair > .cr-quote-pair__who {
		flex-basis: auto;
		width: min(150px, 45%);
	}
}

.cr-refrain-bubble {
	position: relative;
	padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
	background: #fdf8e4;
	border-radius: 28px;
	box-shadow: var(--wp--preset--shadow--soft);
}

.cr-refrain-bubble p {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-weight: 700;
	line-height: 1.45;
	color: var(--wp--preset--color--ink);
	text-align: center;
	text-wrap: balance;
}

/* Hootie's refrain is an eight-line counting song rather than Humble's one
   sentence. At the size above it fills a screen; stepped down it still reads
   as the loudest thing in the section. The line breaks are the song's own, so
   balancing on top of them would fight the verse. */
.cr-refrain-bubble--verse p {
	font-size: clamp(1rem, 1.7vw, 1.25rem);
	line-height: 1.7;
	text-wrap: initial;
}

/* The two notes, set as decorative pseudo-content so they never land in
   the accessible name of the quote. */
.cr-refrain-bubble::before,
.cr-refrain-bubble::after {
	content: "\266A";
	position: absolute;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1;
	color: #e2a13c;
}

.cr-refrain-bubble::before {
	top: clamp(1rem, 2.5vw, 1.75rem);
	left: clamp(0.75rem, 2vw, 1.5rem);
	rotate: -12deg;
}

.cr-refrain-bubble::after {
	bottom: clamp(1rem, 2.5vw, 1.75rem);
	right: clamp(0.75rem, 2vw, 1.5rem);
	rotate: 12deg;
}

/* The tail, pointing left at the bee. Flips to point upward once the
   columns stack, where the bee sits above instead of beside. */
.cr-refrain-bubble__tail {
	position: absolute;
	top: 3.2rem;
	left: -17px;
	width: 0;
	height: 0;
	border-top: 14px solid transparent;
	border-bottom: 14px solid transparent;
	border-right: 18px solid #fdf8e4;
}

@media (max-width: 781px) {
	.cr-refrain-bubble__tail {
		top: -17px;
		left: 3.2rem;
		border-top: none;
		border-right: 14px solid transparent;
		border-left: 14px solid transparent;
		border-bottom: 18px solid #fdf8e4;
	}
}

/* -----------------------------------------------------------------
   Buy options — the book, or the book with its plush friend
   ----------------------------------------------------------------- */

.cr-options {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--30);
}

/* WordPress gives every child but the first a block-gap top margin. Inside a
   grid that margin lands within the cell, so the second option sat lower and
   shorter than the first. The grid's own gap already spaces them. */
.cr-options > * {
	margin-top: 0;
}

@media (min-width: 600px) {
	.cr-options {
		grid-template-columns: 1fr 1fr;
	}
}

.cr-option {
	display: flex;
	flex-direction: column;
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--base);
	border: 1.5px solid rgba(74, 78, 82, 0.16);
	border-radius: 14px;
}

/* The set is the option being recommended, so it carries the brand edge. */
.cr-option--featured {
	border-color: var(--wp--preset--color--forest);
	box-shadow: var(--wp--preset--shadow--soft);
}

.cr-option__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--ink);
}

.cr-option__note {
	margin: 0.15rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--gray);
}

/* The price and button inside an option are already grouped by the card. */
.cr-option .cr-price {
	margin-top: 0.6rem;
}

.cr-option .cr-buy {
	margin-top: auto;
	padding-top: 0.9rem;
}

.cr-option .wp-block-button__link {
	width: 100%;
	padding-inline: 1rem;
	text-align: center;
}

/* A lone option — one plush set on its book page, one hardcover on a shop row —
   would otherwise sit in half a grid with its button wrapped. Let it take a
   comfortable card width of its own. */
.cr-options:has(> :only-child) {
	grid-template-columns: minmax(0, 24rem);
}

/* Under a centred heading, centre the card as well. */
.cr-options--center {
	justify-content: center;
}

/* -----------------------------------------------------------------
   Steps — an illustrated list rather than a numbered trio
   ----------------------------------------------------------------- */

/* The disc is centred against the whole text block rather than pinned to its
   top. Flex-start aligned the disc's *box* with the heading's box, but a
   68px disc against a 26px line box put the icon's optical centre well above
   the words — it read as floating. */
.cr-step {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	align-items: center;
}

.cr-step figure.cr-tile {
	flex: 0 0 auto;
	margin: 0;
	width: 56px;
	height: 56px;
}

.cr-step figure.cr-tile img {
	width: 26px;
	height: 26px;
}

.cr-step__body h3 {
	margin: 0 0 0.3rem;
}

.cr-step__body p {
	margin: 0;
}

/* -----------------------------------------------------------------
   Home hero — the covers on the splatter frame

   The artwork is a border: watercolour splatter around all four edges
   with a clear centre, which is where the copy and the covers sit. It
   is stretched rather than cropped, because `cover` would scale the
   frame until the top and bottom bands fell outside the section — and
   the frame is the whole point of the image. Watercolour blobs take a
   little stretching without anyone noticing; a photograph would not.
   ----------------------------------------------------------------- */

.cr-hero-confetti {
	color: var(--wp--preset--color--ink);
}

.cr-hero-confetti .wp-block-cover__image-background {
	object-fit: fill;
}

/* The frame's splatter is dense for about an eighth of the section's width down
   each side, and the content is 68rem wide, so the content only clears it once
   the section is wider than roughly 1500px. Below that, on a laptop, a tablet
   or a narrow window, and on a phone where the copy and covers also stack into
   a tall column, a stretched frame runs its splatter straight through them.
   The frame is swapped for two strips of the same painting, one above the
   content and one below, with padding that keeps the content clear of them.
   The top strip takes the painting's top edge, the bottom strip its heavier
   bottom edge. */
@media (max-width: 1499px) {
	.cr-hero-confetti {
		--cr-strip: 6.5rem;
		padding-top: calc(var(--cr-strip) + 1rem) !important;
		padding-bottom: calc(var(--cr-strip) + 1rem) !important;
	}

	.cr-hero-confetti .wp-block-cover__image-background {
		display: none;
	}

	.cr-hero-confetti::before,
	.cr-hero-confetti::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		height: var(--cr-strip);
		background: url("assets/img/art-superhuman-confetti.jpg") no-repeat;
		background-size: max(1100px, 100%) auto;
		pointer-events: none;
	}

	/* Each strip is a slice of a larger painting, so its inner edge would end in
	   a ruler-straight line through whatever blob it happens to cross. Fading
	   that edge out lets the paint thin away instead. */
	.cr-hero-confetti::before {
		top: 0;
		background-position: 38% 0;
		-webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
		mask-image: linear-gradient(to bottom, #000 45%, transparent);
	}

	.cr-hero-confetti::after {
		bottom: 0;
		background-position: 55% 100%;
		-webkit-mask-image: linear-gradient(to top, #000 45%, transparent);
		mask-image: linear-gradient(to top, #000 45%, transparent);
	}
}

/* On a big screen the content measure stops growing while the frame keeps
   getting wider, so the covers look smaller the larger the window is. Let the
   fan outgrow its column, mostly to the right so it keeps clear of the copy, and scale with the screen up to a cap.
   The clear middle of the frame has the room, and the glow behind the fan keeps
   it legible where it reaches toward the paint. */
@media (min-width: 1500px) {
	.cr-hero-confetti .cr-hero-books__stack {
		--cr-stack: max(100%, min(36vw, 800px));
		width: var(--cr-stack);
		max-width: none;
		margin-left: calc((100% - var(--cr-stack)) * 0.1);
	}
}

/* Stacked on a phone the column is the full screen width, so the fan is sized
   to stay inside it, tilts included, rather than running off both edges. */
@media (max-width: 781px) {
	.cr-hero-confetti .cr-hero-books__cover {
		width: 38%;
	}

	.cr-hero-confetti .cr-hero-books__cover--center {
		margin-inline: -6%;
	}
}

/* Three covers fanned like books set down on a table, with the newest in the
   middle and on top. A visitor knows this is a children's picture-book
   publisher before reading a word. The centre cover is raised and the outer
   two tuck behind it, so the row reads as a fan rather than a catalogue. */
.cr-hero-books__stack {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0.5rem 1.5rem;
}

/* The same bloom behind the copy: the frame's side blobs run in under the
   start of each line on screens only just wide enough for the full frame. */
.cr-hero-confetti .wp-block-columns > .wp-block-column:first-child {
	position: relative;
	isolation: isolate;
}

.cr-hero-confetti .wp-block-columns > .wp-block-column:first-child::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -10% -12%;
	background: radial-gradient(closest-side, #fff 60%, rgba(255, 255, 255, 0));
	pointer-events: none;
}

/* Where the frame runs close to the covers its splatter would otherwise show
   through behind them and blur their edges. A soft white bloom, feathered to
   nothing at its rim, keeps a clean ground under the fan without a visible
   box or ring. */
.cr-hero-books__stack::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -12% -14%;
	background: radial-gradient(closest-side, #fff 55%, rgba(255, 255, 255, 0));
	pointer-events: none;
}

/* WordPress gives every child but the first a block-gap top margin, which
   would push the outer covers down before they are positioned. */
.cr-hero-books__stack > * {
	margin-top: 0;
}

.cr-hero-books__cover {
	flex: none;
	width: 42%;
	margin: 0;
	transition: rotate var(--wp--custom--transition--base),
		translate var(--wp--custom--transition--base);
}

.cr-hero-books__cover img {
	display: block;
	width: 100%;
}

.cr-hero-books__cover--left {
	rotate: -7deg;
	translate: 0 0.75rem;
	z-index: 1;
}

.cr-hero-books__cover--center {
	z-index: 3;
	margin-inline: -8%;
	translate: 0 -0.5rem;
}

.cr-hero-books__cover--right {
	rotate: 6deg;
	translate: 0 0.75rem;
	z-index: 2;
}

.cr-hero-books__cover:hover {
	rotate: 0deg;
	translate: 0 -0.75rem;
	z-index: 4;
}

@media (prefers-reduced-motion: reduce) {
	.cr-hero-books__cover {
		transition: none;
	}
}

/* -----------------------------------------------------------------
   "Crystal Rose in the News" cards

   One card carries a 4:5 portrait and the other a 16:9 video still,
   so side by side the columns finished a few hundred pixels apart.
   Both media are held to 16:9 and cropped, which is the shape a news
   story wants anyway. The portrait is framed slightly high so the
   crop takes the crown of the head rather than the chin.
   ----------------------------------------------------------------- */

.cr-news-media img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: 50% 22%;
}

/* The Remarkable Women story lives on 8 News Now, so its still links out.
   The play badge tells a visitor it is a video, the way the HopeLink player
   beside it is, rather than a picture that fails to respond. */
.cr-news-media--play a {
	position: relative;
	display: block;
}

.cr-news-media--play a::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") 55% 50% / 55% no-repeat,
		rgba(255, 255, 255, 0.92);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease;
	pointer-events: none;
}

.cr-news-media--play a:hover::after,
.cr-news-media--play a:focus-visible::after {
	transform: scale(1.08);
}

.cr-news-media video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--soft);
	background: #000;
}

/* -----------------------------------------------------------------
   Non-profit partners on Living Kindly

   The section was six headings and six paragraphs on a flat cream
   ground, which the client's writer fairly called visually blank.
   Each one is now a card with a logo slot at the top, so the row has
   a rhythm to it before a word is read.

   The logos themselves are labelled placeholders until the real files
   arrive; the slot is sized for a lockup rather than a square, and
   `object-fit: contain` means a wide logo and a tall one both land on
   the same optical baseline instead of one filling the box.
   ----------------------------------------------------------------- */

.cr-partner {
	box-sizing: border-box;
	height: 100%;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--soft);
}

/* WordPress gives every child but the first a block-gap top margin, which
   inside the card doubles up with the padding. */
.cr-partner > * {
	margin-top: 0;
}

.cr-partner__logo {
	display: grid;
	place-items: center;
	height: 96px;
	margin: 0 0 var(--wp--preset--spacing--20);
}

.cr-partner__logo img {
	width: auto;
	max-width: 100%;
	max-height: 96px;
	object-fit: contain;
}

/* Their own programme rather than a partner's, so it carries the house mark
   at the size a mark wants rather than the size a lockup wants. */
.cr-partner__logo--house img {
	max-height: 64px;
}

/* -----------------------------------------------------------------
   The "we also support" logo row
   ----------------------------------------------------------------- */

.cr-logobar__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cr-logobar__list li {
	margin: 0;
}

.cr-logobar__list img {
	display: block;
	width: auto;
	height: 56px;
	max-width: 100%;
	object-fit: contain;
	/* Real logos will arrive in a dozen different palettes. Muting them keeps
	   the row reading as one band rather than as a ransom note; they come back
	   to full colour on hover. */
	filter: grayscale(1);
	opacity: 0.65;
	transition: filter var(--wp--custom--transition--base),
		opacity var(--wp--custom--transition--base);
}

.cr-logobar__list li:hover img {
	filter: grayscale(0);
	opacity: 1;
}

/* A placeholder is already muted by design; muting it again leaves five blank
   grey rectangles that read as a broken image rather than as a slot waiting
   for a logo. Drop the class when the real files go in. */
.cr-logobar__list img.is-placeholder {
	filter: none;
	opacity: 1;
}

/* The client has named these eight but has not sent logos, so the row carries
   the names as type. A row of grey rectangles says nothing; a row of names is
   the actual information a reader wants from this section, and it is finished
   copy rather than a slot waiting. Swap a <span> for an <img> as each logo
   lands, and drop the modifier once none are left. */
.cr-logobar__list--names {
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.cr-logobar__name {
	display: block;
	padding: 0.55rem 1.1rem;
	border: 1px solid rgba(97, 101, 105, 0.28);  /* gray #616569 */
	border-radius: 999px;
	color: var(--wp--preset--color--gray);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

/* -----------------------------------------------------------------
   The series callout, and the free-shipping note in the cart
   ----------------------------------------------------------------- */

/* Replaces a bare "Order the Series" button that sat alone under the three
   book cards. A panel can carry the price and say where the button goes,
   which a button on its own cannot. */
.cr-series-callout {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--40);
	border-radius: 24px;
	background: var(--wp--preset--color--shell);
	box-shadow: var(--wp--preset--shadow--soft);
}

.cr-series-callout__art {
	margin: 0;
}

.cr-series-callout__art img {
	display: block;
	width: 100%;
	border-radius: 14px;
}

@media (max-width: 781px) {
	.cr-series-callout {
		padding: var(--wp--preset--spacing--30);
	}
}

/* Restated beside the cart and checkout totals. Sized to its text rather
   than to the column: a pill stretched across 76rem stops reading as a
   note and starts reading as a banner. */
.cr-shipnote {
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	margin-bottom: var(--wp--preset--spacing--40);
	padding: 0.65rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--cream);
}

.cr-shipnote__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* -----------------------------------------------------------------
   Prices quoted in page copy

   Rendered by crystal-rose/product-price, which reads WooCommerce. The
   pending modifier marks a figure the client has not confirmed, so a
   placeholder cannot be mistaken for a decided price.
   ----------------------------------------------------------------- */

/* A price and its button read as one cluster: space above the price to
   separate it from the copy, and the button pulled in close beneath.
   The `margin: 0` this replaced also cancelled the block gap, leaving the
   price crammed against the paragraph above it. */
.cr-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	margin: var(--wp--preset--spacing--20) 0 0;
}

/* The buy control is hand-built markup, not a real buttons block, so it
   carries its own flex layout — WordPress's justification classes only work
   alongside the layout classes it generates for itself. */
.cr-buy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7rem;
	margin-top: 0.7rem;
}

.cr-buy--center {
	justify-content: center;
}

.cr-buy .wp-block-button {
	margin: 0;
}

/* With a quantity picker the control is a GET form; the field and the button
   sit on one line and wrap together on a narrow column. */
.cr-buy--form {
	align-items: stretch;
}

.cr-buy--form .quantity {
	flex: 0 0 auto;
}

.cr-buy--form .wp-block-button__link {
	height: 100%;
}

.cr-price__label {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--gray);
}

.cr-price__amount {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	color: var(--wp--preset--color--ink);
}

.cr-price__amount .woocommerce-Price-amount {
	font-weight: inherit;
}

.cr-price__pending {
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--gray);
}

.cr-price__soon {
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: var(--wp--preset--color--cream);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--forest);
}

.cr-price--pending .cr-price__amount {
	color: var(--wp--preset--color--gray);
	text-decoration: underline dotted rgba(74, 78, 82, 0.4);
	text-underline-offset: 0.3em;
}

/* Store notices on an editorial page: only present when WooCommerce has
   something to say, so the padding has to come with them rather than
   leaving a gap under the header on every other page view. */
.cr-notices:has(.woocommerce-notices-wrapper > *) {
	padding-top: var(--wp--preset--spacing--20);
}

/* Zeroing that padding was not enough. WooCommerce renders the holder on
   every page whether or not it has a notice in it, and WordPress's flow
   layout then gives the block *after* it a block-gap top margin — a band of
   white between the sticky header and the full-bleed hero below, on every
   page built on page-no-title.html and on the product templates. So the
   empty holder is taken out of the flow and the margin it caused with it.
   A real notice matches neither selector and behaves normally. */
.cr-notices:not(:has(.woocommerce-notices-wrapper > *)),
.wc-block-store-notices:not(:has(.woocommerce-notices-wrapper > *)) {
	display: none;
}

.cr-notices:not(:has(.woocommerce-notices-wrapper > *)) + *,
.wc-block-store-notices:not(:has(.woocommerce-notices-wrapper > *)) + * {
	margin-block-start: 0;
}

/* For centred compositions, where a left-aligned price would be the one
   thing off-axis. */
.cr-price--center {
	justify-content: center;
}

.cr-buy-note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray);
}

/* Visible to editors only — see crystal_rose_missing_product_note(). */
.cr-buy-missing {
	padding: 0.6rem 0.9rem;
	border-left: 3px solid #a4341f;
	border-radius: 6px;
	background: #fdf3f1;
	font-size: var(--wp--preset--font-size--x-small);
	color: #8f2d1b;
}

/* A footnote qualifying a section rather than a single price. */
.cr-note {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--gray);
}

/* -----------------------------------------------------------------
   Scrolling image row — the Book Nook build

   A swipeable strip rather than a scripted carousel: it needs no
   JavaScript, keeps every image reachable by keyboard and scrollbar,
   and degrades to a plain vertical list if grid is unsupported.
   ----------------------------------------------------------------- */

/* -----------------------------------------------------------------
   Photo grid — the Book Nook build on Living Kindly

   Replaced the carousel there: four photographs of a build read as a
   sequence, and a scroller showed two of them with no sign the other
   two existed. Each image opts into core's lightbox, which is why
   there is no JavaScript here — `{"lightbox":{"enabled":true}}` on the
   image block is enough from WordPress 6.4.
   ----------------------------------------------------------------- */

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

/* WordPress gives every child but the first a block-gap top margin, which
   inside a grid lands within the cell and shortens the second row. */
.cr-photogrid > * {
	margin-top: 0;
}

.cr-photogrid img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 14px;
}

/* Core's lightbox wraps the image in its own button and duplicates the
   figure, so the radius has to be stated on the wrapper too or the corners
   square off the moment the enlarge control is rendered. */
.cr-photogrid .wp-lightbox-container img {
	border-radius: 14px;
}

/* Currently unreferenced — the Book Nook build uses .cr-photogrid above.
   Kept because it is a working component and the fix below was not free. */
.cr-carousel {
	display: grid;
	grid-auto-flow: column;
	/* A fixed percentage, deliberately not `minmax(0, 82%)`. In minmax the
	   percentage is only a growth *limit*: the track sizing algorithm hands
	   each track an equal share of the container and never exceeds it, so
	   four slides in a 552px column came out 123px each and the thing never
	   scrolled. A bare percentage is both floor and ceiling, the row
	   overflows on purpose, and `overflow-x: auto` gets something to do. */
	grid-auto-columns: 82%;
	gap: var(--wp--preset--spacing--20);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	padding-bottom: 0.9rem;
}

.cr-carousel > * {
	margin: 0;
	scroll-snap-align: start;
}

.cr-carousel img {
	display: block;
	width: 100%;
	border-radius: 14px;
}

@media (min-width: 782px) {
	.cr-carousel {
		grid-auto-columns: 48%;
	}
}

/* -----------------------------------------------------------------
   Social links
   ----------------------------------------------------------------- */

.cr-social {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
	list-style: none;
	/* The row needs to sit clear of the paragraph above it — as a bare <ul>
	   inside an HTML block it picks up no block gap of its own. */
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0;
}

.cr-social li {
	margin: 0;
}

.cr-social a,
.cr-social span {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
	transition: transform var(--wp--custom--transition--base),
		box-shadow var(--wp--custom--transition--base);
}

.cr-social a:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--lifted);
}

/* A channel that has not launched yet: shown so the row matches the
   wireframe, but not a link, because there is nothing to link to. Dimmed
   enough to read as inactive, but the mark still has to be recognisable —
   a translucent tile on the cream ground left four blank discs. */
.cr-social span {
	opacity: 0.55;
	box-shadow: none;
	background: var(--wp--preset--color--base);
	cursor: default;
}

.cr-social img {
	width: 24px;
	height: 24px;
	display: block;
}

/* -----------------------------------------------------------------
   Consent checkbox — the reader-story form

   Permission to publish a child's photograph is the most consequential
   control on the site, so it gets a panel of its own rather than the
   default one-line checkbox.
   ----------------------------------------------------------------- */

.cr-consent .gform_wrapper.gravity-theme .gfield--type-consent,
.cr-consent-field {
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--shell);
	border-radius: 12px;
	border-left: 3px solid var(--wp--preset--color--forest);
}

.gform_wrapper.gravity-theme .gfield--type-consent .gfield_consent_label,
.gform_wrapper.gravity-theme .gchoice label {
	display: inline;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

.gform_wrapper.gravity-theme input[type="checkbox"],
.gform_wrapper.gravity-theme input[type="radio"] {
	width: 1.15rem;
	height: 1.15rem;
	margin-right: 0.55rem;
	accent-color: var(--wp--preset--color--forest);
}

/* File upload: Gravity's default input reads as an unstyled browser control
   next to the site's rounded fields. */
.gform_wrapper.gravity-theme .ginput_container_fileupload input[type="file"] {
	width: 100%;
	padding: 0.7rem 0.9rem;
	background: var(--wp--preset--color--base);
	border: 1.5px dashed rgba(74, 78, 82, 0.3);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink);
}

/* Gravity writes its own "Accepted file types: jpg, jpeg, png, heic, webp,
   Max. file size: 8 MB." under every upload, which restated the field's own
   description one line below it. The site has exactly one file field and its
   description says the same thing in fewer words, so this one goes. Delete
   this rule if a file field is ever added without a description of its own. */
/* Gravity writes its own "Accepted file types: jpg, jpeg, png, heic, webp,
   Max. file size: 8 MB." under every upload, and the field carried a second
   line saying the same thing. Both go: the control is plainly optional and
   plainly a file picker, and the limits are still enforced — an oversized or
   wrong-typed file is refused with a validation message, which is the only
   moment any of it matters. `:not(.validation_message)` is what keeps that
   refusal visible. */
.gform_wrapper.gravity-theme .gfield_description.gform_fileupload_rules,
.gform_wrapper.gravity-theme
	.gfield--type-fileupload
	.gfield_description:not(.validation_message) {
	display: none;
}

/* Gravity boxes a consent field's description like a scrollable agreement.
   Here it is one line of reassurance under the checkbox, so it is set as the
   note it is rather than as a second input. */
.gform_wrapper.gravity-theme .gfield_consent_description,
.gform_wrapper.gravity-theme .gfield--type-consent .gfield_consent_description_text {
	padding: 0;
	border: none;
	background: transparent;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
	color: var(--wp--preset--color--gray);
	/* Gravity caps the box at 240px and scrolls it, which is right for a
	   terms-and-conditions field and wrong for one line of reassurance. */
	max-height: none;
	overflow: visible;
}

.gform_wrapper.gravity-theme .gfield_consent_description {
	padding-top: 0.5rem;
}

/* -------------------------------------------------------------------------
   11. Utilities
   ---------------------------------------------------------------------- */

/* Let a wide/full block bleed to the viewport edge on small screens. */
@media (max-width: 600px) {
	.cr-bleed-mobile {
		margin-left: calc(var(--wp--preset--spacing--20) * -1);
		margin-right: calc(var(--wp--preset--spacing--20) * -1);
		border-radius: 0;
	}
}

/* Overlay text needs a scrim to stay readable over artwork. */
.cr-scrim::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(74, 78, 82, 0.55) 0%,
		rgba(74, 78, 82, 0.2) 45%,
		rgba(74, 78, 82, 0.5) 100%
	);
	pointer-events: none;
}

.cr-scrim > * {
	position: relative;
	z-index: 1;
}

/* Photographs inside a blog post: framed like the interior artwork, with a
   quiet caption. A portrait is held to a narrower column, otherwise one
   picture runs to a full screen of scrolling. */
.cr-post-photo {
	margin-block: var(--wp--preset--spacing--30);
}

.cr-post-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

.cr-post-photo--portrait {
	max-width: 22rem;
	margin-inline: auto;
}

.cr-post-photo figcaption {
	margin-top: 0.6rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray);
	text-align: center;
}
