/*!
Theme Name: Block Smith
Theme URI: https://blocksmithstudio.com
Author: Block Smith Studio
Author URI: https://blocksmithstudio.com
Description: A native WordPress Full Site Editing (FSE) theme and design-token foundation for the Block Smith builder plugin. Native-first, block-based, and forward-compatible by design.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: block-smith
Tags: full-site-editing, block-styles, block-patterns, blog, portfolio, e-commerce

Block Smith, (C) Block Smith Studio.
Block Smith is distributed under the terms of the GNU GPL v2 or later.
*/

/* -----------------------------------------------------------------------------
 * Focus-visible baseline
 *
 * theme.json drives button/link :hover/:focus/:active (WP 7.0 pseudo-state
 * support). :focus-visible has no theme.json equivalent, so the keyboard-only
 * ring lives here and reads the frozen focus tokens from settings.custom.focus.
 * -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus--width, 2px) solid var(--wp--custom--focus--color, currentColor);
	outline-offset: var(--wp--custom--focus--offset, 2px);
}

/* Only suppress the default ring where :focus-visible is supported. */
@supports selector(:focus-visible) {
	:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
		outline: none;
	}
}

/* -----------------------------------------------------------------------------
 * Dark scheme — scoped custom-property override (decision 022)
 *
 * The palette in theme.json stays flat hex so the Site Editor colour picker
 * remains editable. Dark mode re-defines the VALUES behind the same frozen slugs,
 * exactly as a style variation does, so every block/pattern/demo repaints with no
 * markup change.
 *
 * Gated on [data-scheme="dark"], and ONLY on it. The attribute is written by the
 * builder's pre-paint resolver, which the site owner opts into by enabling dark
 * mode in the settings — the theme itself never reacts to the browser or the
 * operating system. There used to be a `prefers-color-scheme` fallback here so an
 * OS-dark visitor got a dark site even with the feature off; it was removed
 * deliberately (see CHANGELOG): the visitor's OS must not repaint a site whose
 * owner never chose a dark scheme, and the same media query was also matching
 * inside the editor canvas iframe, where no resolver ever runs. With the feature
 * off — or JavaScript off — the site is simply the light design.
 * The VALUES come from `settings.custom.darkPalette` — every variation ships its own
 * dark ramp there, emitted by WordPress as `--wp--custom--dark-palette--*`, so dark
 * mode follows the active look. The literal fallbacks are the Default (Warm) ramp,
 * for the moment before global styles load or a palette with no ramp.
 * -------------------------------------------------------------------------- */

:root[data-scheme="dark"] {
	color-scheme: dark;

	--wp--preset--color--base: var(--wp--custom--dark-palette--base, #16130f);
	--wp--preset--color--contrast: var(--wp--custom--dark-palette--contrast, #f2ebe1);
	--wp--preset--color--primary: var(--wp--custom--dark-palette--primary, #6fc6ab);
	--wp--preset--color--secondary: var(--wp--custom--dark-palette--secondary, #241d16);
	--wp--preset--color--accent: var(--wp--custom--dark-palette--accent, #e39a5f);
	--wp--preset--color--neutral: var(--wp--custom--dark-palette--neutral, #a79c90);
	--wp--preset--color--neutral-light: var(--wp--custom--dark-palette--neutral-light, #201a14);

	--wp--preset--shadow--xs: 0 1px 1px rgba(0, 0, 0, 0.30);
	--wp--preset--shadow--sm: 0 1px 2px rgba(0, 0, 0, 0.40);
	--wp--preset--shadow--md: 0 6px 18px rgba(0, 0, 0, 0.50);
	--wp--preset--shadow--lg: 0 18px 44px rgba(0, 0, 0, 0.60);
	--wp--preset--shadow--xl: 0 28px 72px rgba(0, 0, 0, 0.70);
}

/* -----------------------------------------------------------------------------
 * Dark-scheme corrections for the section styles -- now generated in PHP.
 *
 * The section styles pair a background token with foreground tokens, and those
 * pairings only hold while `base` is the light end of the palette and `contrast` is
 * the dark end. Two different things swap that pair: dark mode, which redefines the
 * values above; and a dark PALETTE, which Midnight ships and a site can author in the
 * Site Editor without any toggle being involved. Both do identical damage and need
 * identical corrections, but only the first can be expressed as a static selector.
 *
 * So the rules moved to blocksmith_theme_scheme_corrections() in functions.php, which
 * states them once and prints them under whichever of the two scopes apply to the
 * request: the explicit [data-scheme="dark"] attribute, and the bare :root when the
 * authored palette is itself dark. (A third, OS-preference scope existed until the
 * `prefers-color-scheme` fallback was removed -- dark is opt-in now.)
 * -------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
 * Headline setting.
 *
 * `balance` evens the last line of a heading instead of leaving one orphaned
 * word, and `pretty` does the same for body copy without the line-count limit.
 * Both degrade to normal wrapping where unsupported. `break-word` is the floor:
 * a heading in a narrow column should overflow gracefully rather than push the
 * layout sideways -- though the real answer to a broken headline is a wider
 * column, not a smaller word.
 * -------------------------------------------------------------------------- */

:where(h1, h2, h3, .wp-block-heading) {
	text-wrap: balance;
	overflow-wrap: break-word;
}

:where(p, li) {
	text-wrap: pretty;
}

/* -----------------------------------------------------------------------------
 * Warm detailing
 *
 * Fraunces and the sand palette carry the character; these are the shapes that
 * go with them. Soft forms, one shadow, one radius scale, and a serif that is
 * allowed to be large. Everything here is opt-in through a block style or a
 * token, so nothing existing changes until a pattern asks for it.
 * -------------------------------------------------------------------------- */

/* The --bs-* names are internal aliases; the VALUES live in theme.json as
   `settings.custom.shape.*` (emitted by WordPress as --wp--custom--shape--*), so
   the user Global Styles layer — a shape style variation, the setup wizard, or
   the builder's Design Tokens settings — restyles every radius and shadow at
   once. The literals here are fallbacks only, and scripts/token-audit.php fails
   the build if they drift from theme.json's values. */
:root {
	--bs-radius-sm: var( --wp--custom--shape--radius-sm, 10px );
	--bs-radius: var( --wp--custom--shape--radius, 16px );
	--bs-radius-lg: var( --wp--custom--shape--radius-lg, 24px );
	--bs-shadow-soft: var( --wp--custom--shape--shadow-soft, 0 18px 50px rgba( 34, 30, 26, 0.09 ) );
	--bs-shadow-lift: var( --wp--custom--shape--shadow-lift, 0 26px 70px rgba( 34, 30, 26, 0.14 ) );
}

/* Eyebrow: small, tracked, in the accent. No rule here — the Warm direction gets
   its structure from soft shapes rather than from hairlines. */
/* `inline-block` shrink-wraps the eyebrow, which quietly defeats
   `has-text-align-center`: the text centres inside a box that is only as wide as
   the text, and the box stays hard left. On a centred hero that read as a
   misaligned label nobody had noticed. A block box centres properly. */
.is-style-eyebrow {
	display: block;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --wp--preset--color--primary );
	margin-bottom: 0.35em;
}

/* A soft card. The border is what stops it dissolving into the sand ground; the
   shadow is what lifts it off. One of each, never both doubled. */
.is-style-soft-card {
	background: var( --bs-card );
	border: 1px solid var( --wp--preset--color--neutral-light );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--60 );
}

.is-style-soft-card.is-style-lifted,
.is-style-lifted {
	box-shadow: var( --bs-shadow-soft );
	border-radius: var( --bs-radius );
}

/* An icon tile: the accent at low opacity, so a row of them reads as a family
   rather than as six competing colours. */
.is-style-icon-tile {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: var( --bs-radius-sm );
	background: color-mix( in srgb, var( --wp--preset--color--primary ) 12%, transparent );
	color: var( --wp--preset--color--primary );
	font-size: var( --wp--preset--font-size--large );
}

/* A dark band that sits inside the page as an object rather than spanning it.
   Used once — for the statistics — so the page has one moment of weight. */
.is-style-inset-band {
	border-radius: var( --bs-radius-lg );
	overflow: hidden;
}

/* Figures set in the display face, tabular so a row of them lines up. */
.is-style-figure {
	font-family: var( --wp--preset--font-family--heading );
	font-size: var( --wp--preset--font-size--xxx-large );
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums lining-nums;
}

/* --- Type utilities (fonts build-out) -------------------------------------- */

/* Small caps, done with the font's own feature rather than a text-transform:
   real small caps keep their capitals, and the slight tracking is what stops
   them reading as a typo at body sizes. */
.is-style-smallcaps {
	font-variant-caps: small-caps;
	letter-spacing: 0.04em;
}

/* Tabular figures at body size — for the price column, the schedule, the spec
   sheet. `.is-style-figure` is the display-size cousin; this one changes the
   numerals and nothing else, so it stacks with any size or colour choice. */
.is-style-tabular {
	font-variant-numeric: tabular-nums lining-nums;
}

/* The standfirst: the article's opening summary, one size up and one shade
   quieter than body copy. The neutral ink clears AA on both the sand and the
   neutral-light grounds (see the contrast audit). */
.is-style-standfirst {
	font-size: var( --wp--preset--font-size--large );
	line-height: 1.5;
	color: var( --wp--preset--color--neutral );
}

/* A designed drop cap. Core's own drop-cap toggle exists but inherits the
   browser's idea of one; this sets the initial in the heading face and the
   primary ink so it belongs to the design system. The generous line-height
   escape hatch (0.85) keeps ascenders from clipping in Fraunces. */
.is-style-dropcap::first-letter {
	float: left;
	font-family: var( --wp--preset--font-family--heading );
	font-size: 3.4em;
	font-weight: 600;
	line-height: 0.85;
	padding-right: 0.12em;
	padding-top: 0.05em;
	color: var( --wp--preset--color--primary );
}

/* Editorial text columns on a Group: CSS columns, so a long passage flows like
   a magazine spread instead of two manually-balanced halves. A hairline rule
   keys it to the editorial idiom; children avoid breaking mid-card. Collapses
   to a single column at the theme's mobile breakpoint. */
.is-style-text-columns {
	columns: 2;
	column-gap: var( --wp--preset--spacing--60 );
	column-rule: 1px solid var( --wp--preset--color--neutral-light );
}

.is-style-text-columns > * {
	break-inside: avoid;
}

.is-style-text-columns > :first-child {
	margin-top: 0;
}

/*
 * The single-column fall-back below the mobile tier is emitted from PHP, by
 * blocksmith_theme_breakpoint_stylesheet() in functions.php. A media query
 * cannot read a custom property, so a breakpoint written here is a literal and
 * `settings.custom.breakpoint.mobile` -- whose value decisions 005 + 006 make
 * the site's to change -- would be honoured nowhere.
 */

/* Media. One radius, one aspect ratio family, and a warm ground behind anything
   that has not loaded — a grey box is the most obvious tell of a demo. */
/* The whole selector is wrapped, not just the descendant: at its old 0,1,1 it
   beat Global Styles, so setting Image radius to 0 in the Site Editor did
   nothing at all. At 0,0,0 the user's choice wins and this is the default. */
:where( .wp-block-image img ),
:where( .wp-block-post-featured-image img ),
:where( .wp-block-cover ) {
	border-radius: var( --bs-radius );
}

:where( .wp-block-image img ) {
	background: var( --wp--preset--color--neutral-light );
}

/*
 * Buttons are pills, and their padding has to be generous enough to earn it --
 * but that is theme.json's call, not this stylesheet's. The rule that stood here
 * carried the SAME selector Global Styles emits for the button element, and the
 * theme stylesheet is registered after wp_enqueue_global_styles, so it printed
 * last and silently ate the Site Editor's button padding control. Padding and
 * weight now live in theme.json at `styles.elements.button` (spacing--30 /
 * spacing--50, weight 500), where the user can actually reach them.
 */

.wp-block-button.is-style-outline .wp-block-button__link {
	background: var( --bs-card );
	border-color: var( --wp--preset--color--neutral-light );
	color: var( --wp--preset--color--contrast );
}

/* Links in running text: underlined, offset clear of the descenders. */
:where( .entry-content, .wp-block-post-content ) p a:not( .wp-element-button ) {
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix( in srgb, currentColor 40%, transparent );
	transition: text-decoration-color 0.16s ease;
}

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

/* Header. One line, logo left, navigation and a pill call-to-action right. The
   site title is set in the display face so the mark reads as a wordmark rather
   than as the first paragraph of the page. */
/*
 * A sticky bar that keeps its full standing height is a sticky bar that eats the
 * page. It rides at 97px at rest and compresses once it is actually stuck, with a
 * translucent ground so the content scrolling beneath it stays legible as motion
 * rather than disappearing behind a solid slab.
 *
 * The hairline is only drawn when stuck: at the top of the page the header and the
 * hero share a ground, and a rule between them is a seam nobody asked for.
 */
.blocksmith-header {
	background: color-mix( in srgb, var( --wp--preset--color--base ) 88%, transparent );
	-webkit-backdrop-filter: saturate( 180% ) blur( 12px );
	backdrop-filter: saturate( 180% ) blur( 12px );
	border-bottom: 1px solid transparent;
	transition: padding-block 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.blocksmith-header.is-stuck {
	/* The block markup writes its padding inline, so a class cannot reach it without
	   this. Same justification as the card fills: the whole job is restyling markup
	   this stylesheet does not own. */
	padding-block: var( --wp--preset--spacing--40 ) !important;
	border-bottom-color: var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	box-shadow: 0 1px 24px rgba( 34, 30, 26, 0.06 );
}

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

	.blocksmith-header {
		transition: none;
	}
}

/* The account and cart icons are utilities, not navigation. Sized down and set in
   the secondary ink so they sit behind the links rather than beside them. */
.blocksmith-header :where( .wp-block-blocksmith-account, .wp-block-blocksmith-mini-cart ) a {
	color: var( --wp--preset--color--neutral );
}

.blocksmith-header :where( .wp-block-blocksmith-account, .wp-block-blocksmith-mini-cart ) a:hover {
	color: var( --wp--preset--color--contrast );
}

.blocksmith-header .wp-block-site-title a {
	white-space: nowrap;
}

/*
 * Navigation and a site title are never running text, so they never take the
 * underline. This used to be scoped to `.blocksmith-header` — the theme's own
 * header part — which meant any OTHER header underlined its whole menu: a demo
 * shipping its own header part, or anything someone builds in the Site Editor.
 * Scoped to the blocks instead, because that is what the rule is actually about.
 */
:where( .wp-block-navigation, .wp-block-site-title ) a {
	text-decoration: none;
}

.blocksmith-header__end {
	gap: var( --wp--preset--spacing--50 );
}

.blocksmith-header .wp-block-navigation a:hover {
	color: var( --wp--preset--color--primary );
}

/*
 * The header call-to-action is a tighter pill than a page button. That is a
 * BUTTON VARIANT, not a header rule, so it lives in
 * styles/blocks/button-compact.json as the `compact` block style and the header
 * part applies it. Written here it out-specified Global Styles and killed the
 * padding control for the one button that appears on every page.
 */

/*
 * Hiding the header call-to-action below the mobile tier is emitted from PHP for
 * the reason given at the text-columns fall-back above: the breakpoint is a
 * token, and a media query cannot read one. It was pinned at 781px here; it is
 * the mobile tier now, which is 768px until the site says otherwise.
 */

/* -----------------------------------------------------------------------------
 * The hero shot.
 *
 * A warm gradient panel carrying three floating cards, standing in for a product
 * screenshot. It is drawn rather than photographed on purpose: a starter site
 * that ships stock imagery looks like a stock site, and a grey placeholder box
 * is worse. This reads as a product without pretending to be one, and it costs
 * no bytes.
 * -------------------------------------------------------------------------- */

.bs-hero-shot {
	position: relative;
	height: clamp( 260px, 36vw, 460px );
	border-radius: var( --bs-radius-lg );
	background:
		radial-gradient( 120% 90% at 82% 8%, color-mix( in srgb, var( --wp--preset--color--accent ) 62%, transparent ), transparent 60% ),
		linear-gradient( 158deg, #2f8c74, var( --wp--preset--color--primary ) 48%, #17564a );
	overflow: hidden;
	isolation: isolate;
}

/* A faint grid, so the field reads as a workspace rather than a swatch. */
.bs-hero-shot::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient( to right, rgba( 255, 255, 255, 0.08 ) 1px, transparent 1px ),
		linear-gradient( to bottom, rgba( 255, 255, 255, 0.08 ) 1px, transparent 1px );
	background-size: 46px 46px;
	mask-image: radial-gradient( 90% 80% at 50% 20%, #000, transparent 78% );
}

/*
 * The floating cards were plain white rectangles, which is exactly what an
 * unstyled placeholder looks like -- the hero read as a failed render. They are
 * meant to suggest the editor: a title bar, two lines of content, a control
 * row. Drawn entirely with gradients so there is no image to load and nothing
 * to translate.
 */
.bs-hero-shot__card {
	position: absolute;
	background: #fff;
	border-radius: var( --bs-radius );
	box-shadow: var( --bs-shadow-lift );
	overflow: hidden;
}

.bs-hero-shot__card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2.1rem;
	background: var( --wp--preset--color--neutral-light );
	border-bottom: 1px solid color-mix( in srgb, var( --wp--preset--color--neutral ) 18%, transparent );
}

/*
 * The card body. A repeating gradient rather than a fixed stack of shadows, so
 * a tall card fills with content instead of leaving three-quarters of itself
 * blank white -- which was the first version, and read as an empty box.
 */
.bs-hero-shot__card::after {
	content: "";
	position: absolute;
	inset: 3.2rem 1.1rem 1.1rem 1.1rem;
	border-radius: 4px;
	--bs-line: color-mix( in srgb, var( --wp--preset--color--contrast ) 10%, transparent );
	background-image:
		linear-gradient( to right, color-mix( in srgb, var( --wp--preset--color--primary ) 48%, transparent ) 0 100%, transparent 0 ),
		repeating-linear-gradient( to bottom, var( --bs-line ) 0 0.42rem, transparent 0.42rem 1.9rem ),
		repeating-linear-gradient( to bottom, var( --bs-line ) 0 0.42rem, transparent 0.42rem 1.9rem );
	background-repeat: no-repeat, repeat-y, repeat-y;
	background-position: 0 0, 0 1.6rem, 0 2.55rem;
	background-size: 42% 0.42rem, 92% 100%, 64% 100%;
}

.bs-hero-shot__card--main {
	inset: 14% auto 12% 8%;
	width: 44%;
}

.bs-hero-shot__card--side {
	inset: 22% 8% auto auto;
	width: 32%;
	height: 46%;
}

.bs-hero-shot__card--chip {
	inset: auto 14% 9% auto;
	width: 20%;
	height: 20%;
	background: color-mix( in srgb, var( --wp--preset--color--base ) 94%, var( --wp--preset--color--primary ) );
}

.bs-hero-shot__card--chip::before {
	content: none;
}

/* The chip is a single figure, not a document: one heavy bar and one light one. */
.bs-hero-shot__card--chip::after {
	inset: 26% 18% auto 18%;
	height: 0.8rem;
	border-radius: 999px;
	background-image: none;
	background-color: color-mix( in srgb, var( --wp--preset--color--primary ) 62%, transparent );
	box-shadow: 0 1.5rem 0 0 color-mix( in srgb, var( --wp--preset--color--contrast ) 12%, transparent );
	mask-image: none;
}

@media ( max-width: 600px ) {

	.bs-hero-shot__card--chip {
		display: none;
	}

	.bs-hero-shot__card--main {
		width: 60%;
	}
}

/* -----------------------------------------------------------------------------
 * Presentation layer
 *
 * A hundred and sixty patterns were written before this design existed, and
 * hand-authoring them is not a plan — it is the reason the last two passes only
 * improved the hero. This layer works the other way round: it targets the
 * structures the patterns ALREADY emit and gives those structures the Warm
 * design language, so every page improves without a byte of pattern markup
 * changing.
 *
 * Everything here keys off signals a pattern genuinely carries — `.has-background`
 * on a column, a large font size inside a coloured band — rather than off class
 * names invented for the occasion. That is what makes it survive a pattern being
 * rewritten later.
 * -------------------------------------------------------------------------- */

/* --- Measure --------------------------------------------------------------- */

/*
 * The single worst thing on every page, and the reason three passes of "still
 * looks basic": every pattern wraps its section in a CONSTRAINED group and then
 * puts the card grid straight inside it, without `align:"wide"`. So a row of
 * three feature cards was laid out inside the 680px reading measure -- 213px per
 * card -- on a 1900px screen. Prose wants 680px. A grid does not.
 *
 * Rather than add `"align":"wide"` to a hundred and sixty patterns (and to every
 * pattern anyone writes after this), promote the structures that are grids: a
 * columns block carrying three or more columns, a two-column split where one
 * side holds media, a gallery, and a query loop. The section heading and its
 * intro paragraph deliberately stay at the reading measure -- a wide grid under
 * a narrow headline is the composition we want, not an accident.
 *
 * A columns block sitting directly inside a FULL-BLEED section is widened
 * unconditionally: a band that spans the whole viewport and then holds a pair of
 * 380px columns in the middle is the shape that made pricing, timelines and CTA
 * banners all look like they had been squeezed. Prose does not live in a columns
 * block, so there is nothing there to protect.
 *
 * A table is the same argument in a different tag. `pricing-matrix` puts four
 * columns of comparison inside the reading measure -- 170px a column -- and
 * `features-comparison` wraps every header cell it has. Two-column tables are
 * left alone, because a term-and-definition table IS prose.
 *
 * Written with `:not(.alignwide):not(.alignfull)` throughout so a pattern that
 * DOES declare its alignment always wins.
 */
:where( .is-layout-constrained ) > .wp-block-columns:not( .alignwide ):not( .alignfull ):not( .alignleft ):not( .alignright ):has( > .wp-block-column:nth-child( 3 ) ),
:where( .is-layout-constrained ) > .wp-block-columns:not( .alignwide ):not( .alignfull ):not( .alignleft ):not( .alignright ):has( .wp-block-image, .wp-block-video, .wp-block-cover, figure ),
:where( .alignfull.is-layout-constrained ) > .wp-block-columns:not( .alignwide ):not( .alignfull ):not( .alignleft ):not( .alignright ),
:where( .is-layout-constrained ) > .wp-block-table:not( .alignwide ):not( .alignfull ):not( .alignleft ):not( .alignright ):has( tr > :nth-child( 3 ) ),
:where( .is-layout-constrained ) > .wp-block-gallery:not( .alignwide ):not( .alignfull ):has( .wp-block-image:nth-child( 3 ) ),
:where( .is-layout-constrained ) > .wp-block-query:not( .alignwide ):not( .alignfull ):has( .wp-block-post-template.is-layout-grid ),
:where( .is-layout-constrained ) > .wp-block-group:not( .alignwide ):not( .alignfull ):has( > .wp-block-query > .wp-block-post-template.is-layout-grid ) {
	max-width: var( --wp--style--global--wide-size );
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/*
 * A three-across grid at the wide measure gives ~400px cards, which is right. A
 * four- or five-across grid gives 300px and under, which is where a card stops
 * being readable -- so those wrap to two-up earlier than the block editor's own
 * 782px breakpoint would.
 */
@media ( max-width: 1100px ) {

	.wp-block-columns:not( .is-not-stacked-on-mobile ):has( > .wp-block-column:nth-child( 4 ) ) {
		flex-wrap: wrap;
	}

	.wp-block-columns:not( .is-not-stacked-on-mobile ):has( > .wp-block-column:nth-child( 4 ) ) > .wp-block-column {
		flex-basis: calc( 50% - var( --wp--preset--spacing--50 ) ) !important;
	}
}

/* --- The card surface ----------------------------------------------------- */

/*
 * Every card on the site was a literal `#fff`. On the sand ground that is
 * exactly right — a white card reads as raised where a sand card reads as a
 * rectangle nobody styled. In DARK MODE it was a disaster: white cards carrying
 * light text, seventy-five failures on the home page alone at 1.16:1, because
 * `#fff` does not know the palette flipped underneath it.
 *
 * One token instead. In the light scheme it is white; in the dark scheme it is
 * the ground lifted a step, which is what "raised" means there.
 *
 * The dark SCHEME is handled below. A dark PALETTE was not: apply Midnight with
 * dark mode switched off and `#fff` is still `#fff`, so every card came back
 * pure white carrying light ink, with no toggle in the picture to flip it. The
 * value is `settings.custom.surface.card` now, which a palette declares for
 * itself (Midnight does); the literal here is only the fallback for a site that
 * declares nothing.
 */
:root {
	--bs-card: var( --wp--custom--surface--card, #fff );
}

:root[data-scheme="dark"] {
	--bs-card: color-mix( in srgb, var( --wp--preset--color--base ) 88%, #ffffff );
}

/* --- Cards ---------------------------------------------------------------- */

/*
 * A column or group that a pattern gave a background to is, almost always, a
 * card: a feature, a testimonial, a plan, a team member. The patterns fill them
 * with a flat tint and square corners, which is the single most "demo" thing on
 * the page. Lift them onto white, round them, and give them one hairline and one
 * shadow — never both doubled.
 */
/* Each arm is wrapped WHOLE, not just its ancestor: half-wrapped it still landed
   at 0,2,0, above Global Styles, so none of these four values could be changed
   in the Site Editor. The hairline reads --wp--custom--border--subtle now; it
   used to be a hand-mixed 14% of the same colour the token mixes at 16%, which
   is one hairline in the design and two numbers in the code. */
:where( .wp-block-columns > .wp-block-column.has-background ),
:where( .wp-block-columns > .wp-block-column[style*="background"] ),
:where( .wp-block-columns > .wp-block-column > .wp-block-group.has-background ),
:where( .wp-block-columns > .wp-block-column > .wp-block-group[style*="background"] ) {
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--60 );
	border: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	box-shadow: var( --bs-shadow-soft );
}

/*
 * Where that background is the quiet neutral tint, replace it with white. On a
 * sand ground a white card reads as raised; a sand card on sand reads as a
 * rectangle someone forgot to style.
 */
/*
 * On a sand ground a white card reads as raised; a sand card on sand reads as a
 * rectangle someone forgot to style. `!important` is load-bearing here and only
 * here: the fill it overrides is an INLINE STYLE on the pattern, and the whole
 * point of this layer is to restyle markup it does not own.
 *
 * Which is why the two class arms are gone. `.has-base-background-color` and
 * `.has-neutral-light-background-color` are not pattern markup being tidied --
 * they are a colour somebody CHOSE, in the editor, out of the palette, and
 * repainting a deliberate choice white is the theme overruling its own user.
 * The attribute arms stay: those are the patterns writing fills inline.
 */
:where( .wp-block-columns ) > .wp-block-column[style*="neutral-light"],
:where( .wp-block-columns ) > .wp-block-column[style*="--base"] {
	background-color: var( --bs-card ) !important;
}

/* Cards want their contents to breathe and their headings to sit tight. */
:where( .wp-block-column.has-background, .wp-block-column[style*="background"] ) > :first-child {
	margin-top: 0;
}

:where( .wp-block-column.has-background, .wp-block-column[style*="background"] ) > :last-child {
	margin-bottom: 0;
}

/* --- Figures -------------------------------------------------------------- */

/*
 * A statistic is a display element, not body copy. Patterns set them at a large
 * preset in the body face, which is why "99.9%" broke across three lines: the
 * number, then the unit, then the label. Set them in the display face, keep them
 * on one line, and use tabular figures so a row of them lines up.
 *
 * HEADINGS ARE EXCLUDED. Keying only off the font size caught prose as well as
 * figures: 115 pattern headings render at these presets, and `nowrap` on a real
 * sentence cannot wrap at mobile, so "Start building your next page today" ran
 * 515px wide inside a 307px column and put 176px of horizontal scroll on the
 * whole page. A figure is a `p` in every pattern that has one (`4.9/5`, `10k+`,
 * `60%`); the heading tags are the signal that separates them. Excluding them
 * also hands headings back their own line-height and tracking, which this rule
 * had been flattening to 1 / -0.03em.
 */
:where( .wp-block-columns ) :is( .has-xx-large-font-size, .has-xxx-large-font-size ):not( :is( h1, h2, h3, h4, h5, h6 ) ) {
	font-family: var( --wp--preset--font-family--heading );
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums lining-nums;
	text-wrap: nowrap;
	white-space: nowrap;
}

/* The label under a figure is a caption, not a sentence. */
:where( .wp-block-columns ) .has-xx-large-font-size + p,
:where( .wp-block-columns ) .has-xxx-large-font-size + p {
	margin-top: var( --wp--preset--spacing--20 );
	font-size: var( --wp--preset--font-size--small );
	opacity: 0.85;
}

/* --- Coloured bands ------------------------------------------------------- */

/*
 * A full-bleed coloured band is punctuation. Give it real vertical room — the
 * patterns tend to set none, which is why the stats band read as a stripe — and
 * round its corners so it sits in the page as an object rather than cutting
 * across it.
 */
.wp-block-group.alignfull.has-background,
.wp-block-group.alignfull[style*="background"] {
	padding-block: var( --wp--preset--spacing--80 );
}

/*
 * The inset is THE ROOT PADDING, not a spacing preset that happens to equal it.
 * `useRootPaddingAwareAlignments` is on, so WordPress publishes the padding in
 * force as --wp--style--root--padding-left/right; reading spacing--50 instead
 * meant the band and the page agreed only for as long as nobody touched
 * Styles > Layout, and every coloured band desynced the moment somebody did.
 */
.wp-block-group.alignfull.has-primary-background-color,
.wp-block-group.alignfull.has-secondary-background-color,
.wp-block-group.alignfull.has-contrast-background-color {
	border-radius: var( --bs-radius-lg );
	margin-left: var( --wp--style--root--padding-left );
	margin-right: var( --wp--style--root--padding-right );
	width: auto;
	max-width: calc( 100% - var( --wp--style--root--padding-left ) - var( --wp--style--root--padding-right ) );
}

/* Inside a dark band the card treatment above would fight the ground. */
:where( .has-primary-background-color, .has-secondary-background-color, .has-contrast-background-color,
	[style*="--primary"], [style*="--secondary"], [style*="--contrast"] )
	:where( .wp-block-column.has-background, .wp-block-column[style*="background"] ) {
	background-color: rgba( 255, 255, 255, 0.08 );
	border-color: rgba( 255, 255, 255, 0.14 );
	box-shadow: none;
}

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

/*
 * Placeholder art is unavoidable in a starter site; a COLD placeholder is not.
 * Warm the ground so an unfilled image reads as part of the palette rather than
 * as a missing asset, and round it like every other surface.
 */
:where( .wp-block-image img, .wp-block-image .components-placeholder, figure.wp-block-image ) {
	border-radius: var( --bs-radius );
	background-color: color-mix( in srgb, var( --wp--preset--color--accent ) 10%, var( --wp--preset--color--neutral-light ) );
}

/*
 * There used to be a rule here holding images inside a columns block at 55%
 * opacity and 20% saturation, so a row of logo placeholders would recede. The
 * logo wall is set as type now (see `.is-style-wordmark`), and the rule was
 * reaching every OTHER image in a columns block as well -- team photos, media
 * splits, gallery tiles -- and draining the colour out of all of them. The
 * recede belongs to the wordmark, which is where it now lives.
 */

/* --- Section rhythm ------------------------------------------------------- */

/*
 * Twelve sections at the same padding on the same ground is a stack, not a page.
 * Give every top-level section real vertical room, and alternate the ground so
 * the eye gets a beat. Only sections that set no background of their own are
 * touched, so a pattern that made a deliberate choice keeps it.
 */
:where( .entry-content, .wp-block-post-content ) > .wp-block-group:not( .has-background ):not( [style*="background"] ) {
	padding-block: var( --wp--preset--spacing--80 );
}

/*
 * Automatic alternation was tried here and removed. Painting every other section
 * looked right on the sections it could see and wrong on the ones it could not:
 * a pattern that sets its own dark fill on a NESTED group still reads, to this
 * selector, as an unpainted section, so the stats band was repainted cream and
 * its white figures were left stranded on it.
 *
 * Rhythm that depends on guessing which sections are already painted is rhythm
 * that will break on the next pattern. It belongs in the patterns, as a declared
 * section style, not in a nth-child rule. The vertical spacing above stays,
 * because that is true of every section regardless of its fill.
 */

/* Section headings get a little more air beneath them than a run of body copy. */
:where( .wp-block-group ) > .wp-block-heading + p {
	margin-top: var( --wp--preset--spacing--30 );
}

/* --- Buttons in context --------------------------------------------------- */

/*
 * The gap between buttons in a row is spacing--30, declared in theme.json at
 * `styles.blocks.core/buttons`. It was the literal 0.75rem here, which is the
 * same number written where nothing can reach it -- not the Site Editor, not a
 * style variation. Same value, somewhere it can be overridden.
 */

.wp-block-button__link {
	transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.wp-block-button__link:hover {
	transform: translateY( -1px );
	box-shadow: var( --bs-shadow-soft );
}

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

	.wp-block-button__link {
		transition: none;
	}

	.wp-block-button__link:hover {
		transform: none;
	}
}

/* -----------------------------------------------------------------------------
 * Footer
 *
 * A single line of copyright lets a site stop; it does not close it. Four columns
 * on the deep warm ground, with the link lists set quiet and the column labels
 * treated as labels rather than as headings that happen to be small.
 * -------------------------------------------------------------------------- */

.blocksmith-footer__label {
	margin: 0 0 0.9em;
	font-family: var( --wp--preset--font-family--body );
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: color-mix( in srgb, var( --bs-ink-inverse ) 60%, transparent );
}

.blocksmith-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.blocksmith-footer__list li + li {
	margin-top: 0.55em;
}

.blocksmith-footer__list a {
	color: color-mix( in srgb, var( --bs-ink-inverse ) 82%, transparent );
	text-decoration: none;
	transition: color 0.16s ease;
}

.blocksmith-footer__list a:hover {
	color: var( --bs-ink-inverse );
}

.blocksmith-footer .wp-block-site-title a {
	color: var( --bs-ink-inverse );
	text-decoration: none;
}

.blocksmith-footer p {
	color: color-mix( in srgb, var( --bs-ink-inverse ) 72%, transparent );
}

/* The subscribe action is secondary here: an outline on a dark ground, not a
   second primary button competing with the one in the header. */
.blocksmith-footer .wp-block-button__link {
	background: transparent;
	border: 1px solid color-mix( in srgb, var( --bs-ink-inverse ) 35%, transparent );
	color: var( --bs-ink-inverse );
}

.blocksmith-footer .wp-block-button__link:hover {
	background: var( --bs-ink-inverse );
	color: var( --bs-footer-ground );
}

.blocksmith-footer__base {
	border-top: 1px solid color-mix( in srgb, var( --bs-ink-inverse ) 16%, transparent );
}

.blocksmith-footer__base p {
	margin: 0;
	color: color-mix( in srgb, var( --bs-ink-inverse ) 55%, transparent );
}

/* The eyebrow uses the accent by default, which on this ground would be the one
   loud thing in an otherwise quiet footer. */
.blocksmith-footer .is-style-eyebrow {
	color: color-mix( in srgb, var( --bs-ink-inverse ) 60%, transparent );
	margin-bottom: 0.8em;
}

/* -----------------------------------------------------------------------------
 * Presentation layer, second pass
 *
 * Everything below came out of reading the rendered pages rather than the
 * markup. Each block names the defect it fixes, because "looks basic" is not
 * actionable a month from now and the specific thing that was wrong is.
 * -------------------------------------------------------------------------- */

/* --- Wordmarks ------------------------------------------------------------ */

/*
 * A logo wall. Set in the display face, tracked out, and held at ~55% so it
 * reads as social proof sitting behind the headline rather than five names
 * shouting louder than the pitch.
 */
.is-style-wordmark {
	font-family: var( --wp--preset--font-family--heading );
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var( --wp--preset--color--contrast );
	opacity: 0.5;
	margin: 0;
	transition: opacity var( --wp--custom--transition--base, 160ms ease );
}

.is-style-wordmark:hover {
	opacity: 0.78;
}

/* --- Section rhythm ------------------------------------------------------- */

/*
 * Two full-bleed sections that share the sand ground used to stack 112px of
 * bottom padding against 112px of top padding: a 224px hole with nothing in it,
 * which is what made the page feel like a list of disconnected blocks rather
 * than a composition. When the ground does not change, the gap should not do
 * the work of a divider -- so the second section pulls its top padding in.
 *
 * A section that DOES change the ground (a brand band, an inverse band, a card
 * field) keeps its full padding: there the padding is what gives the band its
 * body.
 */
.wp-block-post-content > .wp-block-group.alignfull:not( .has-background ):not( [class*="is-style-section-" ] ) + .wp-block-group.alignfull:not( .has-background ):not( [class*="is-style-section-" ] ) {

	/* The padding it overrides is an inline style on the pattern, so a stylesheet
	   rule cannot reach it without this. Same trade as the sticky header. */
	padding-top: var( --wp--preset--spacing--60 ) !important;
}

/*
 * Two dark bands in a row -- a near-black CTA closing the page directly above a
 * dark footer -- merge into one shapeless mass with a hairline of sand between
 * them. Where they do meet, close the gap deliberately instead: no bottom
 * padding on the CTA, and let the footer's own top padding carry the beat.
 */
.wp-block-post-content > [class*="is-style-section-inverse"]:last-child,
.wp-block-post-content > [class*="is-style-section-deep"]:last-child {
	margin-bottom: 0;
}

/* --- Details / FAQ -------------------------------------------------------- */

/*
 * The core details block ships the browser's default disclosure triangle and a
 * square-cornered tint. Four of those stacked is the most "unstyled HTML" thing
 * on the site. Give it the card treatment, swap the marker for a chevron that
 * rotates, and let the whole row respond to hover.
 */
.wp-block-details {
	background: var( --bs-card );
	border: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--40 ) var( --wp--preset--spacing--50 );
	transition: border-color var( --wp--custom--transition--base, 160ms ease ), box-shadow var( --wp--custom--transition--base, 160ms ease );
}

.wp-block-details:hover,
.wp-block-details[open] {
	border-color: color-mix( in srgb, var( --wp--preset--color--primary ) 34%, transparent );
	box-shadow: var( --bs-shadow-soft );
}

.wp-block-details > summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding-right: 2.25rem;
	font-weight: 600;
}

.wp-block-details > summary::-webkit-details-marker,
.wp-block-details > summary::marker {
	display: none;
	content: "";
}

.wp-block-details > summary::after {
	content: "";
	position: absolute;
	right: 0.35rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid var( --wp--preset--color--primary );
	border-bottom: 2px solid var( --wp--preset--color--primary );
	transform: translateY( -70% ) rotate( 45deg );
	transition: transform var( --wp--custom--transition--base, 160ms ease );
}

.wp-block-details[open] > summary::after {
	transform: translateY( -30% ) rotate( 225deg );
}

/* --- Featured pricing card ------------------------------------------------ */

/*
 * The plan a pattern singles out sets its own dark fill inline, which lands
 * OUTSIDE the card rule above (that one keys off the quiet neutral tint), so
 * the featured plan was the one card on the page with square corners. It should
 * be the most finished thing in the row, not the least: same radius, a heavier
 * lift, and half a step forward.
 */
.wp-block-columns > .wp-block-column[style*="background"]:has( .is-style-eyebrow ),
.wp-block-columns > .wp-block-column.has-secondary-background-color,
.wp-block-columns > .wp-block-column.has-contrast-background-color {
	border-radius: var( --bs-radius-lg );
	box-shadow: var( --bs-shadow-lift );
	border: 0;
}

/*
 * A filled column does not inherit a foreground from its fill, and both of the
 * presets above are dark in the shipped palette. So the highlighted plan in
 * `event-tickets` -- its heading, its price and every line of what you get --
 * rendered in body colour on a dark ground: #221E1A on #33291F is 1.17:1,
 * which is not low contrast, it is invisible.
 *
 * Set on the column so it INHERITS. Headings declare no colour of their own in
 * theme.json, so they follow; anything that names a colour, like the accent
 * eyebrow on that same card, still wins.
 *
 * This assumes `secondary` and `contrast` stay dark. They are the two presets
 * the rule above already treats as the lifted dark card, so the assumption is
 * one the file has been making already -- it was simply making it about
 * shadows, where being wrong is invisible, rather than about text, where being
 * wrong is unreadable.
 */
.wp-block-columns > .wp-block-column.has-secondary-background-color,
.wp-block-columns > .wp-block-column.has-contrast-background-color {
	color: var( --wp--preset--color--base );
}

@media ( min-width: 782px ) {

	.wp-block-columns > .wp-block-column.has-secondary-background-color,
	.wp-block-columns > .wp-block-column.has-contrast-background-color {
		transform: translateY( calc( var( --wp--preset--spacing--30 ) * -1 ) );
	}
}

/* --- Lists inside cards --------------------------------------------------- */

/*
 * A feature list in a plan card is a list of things you GET. Bullet dots read as
 * an outline; a check reads as an inventory.
 *
 * Scoped to a column that actually carries a fill — that is what makes it a card.
 * Scoped merely to `.wp-block-column`, it reached every list in every multi-column
 * layout, and put ticks beside all four link lists in a site footer.
 *
 * A list of links is the standing exception even inside a card. The table of
 * contents pattern is a card, and it read "check Overview, check Pricing, check
 * Get started" -- a tick means done or included, and a contents list is neither.
 */
.wp-block-column:is( .has-background, [style*="background"] ) .wp-block-list:not( [style*="list-style" ] ):not( :has( > li:first-child > a:only-child ) ) {
	list-style: none;
	padding-left: 0;
}

.wp-block-column:is( .has-background, [style*="background"] ) .wp-block-list:not( [style*="list-style" ] ):not( :has( > li:first-child > a:only-child ) ) > li {
	position: relative;
	padding-left: 1.6em;
	margin-bottom: 0.4em;
}

.wp-block-column:is( .has-background, [style*="background"] ) .wp-block-list:not( [style*="list-style" ] ):not( :has( > li:first-child > a:only-child ) ) > li::before {
	content: "";
	position: absolute;
	left: 0.1em;
	top: 0.42em;
	width: 0.45em;
	height: 0.78em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate( 45deg );
	opacity: 0.55;
}

/*
 * ...but not everything in a card is something you get. A pros-and-cons section
 * is two of these columns side by side, and the same check appeared beside
 * "Portable content" and beside "Block editor learning curve" -- which reads as
 * though the reader gets the drawbacks as well.
 *
 * A dash, not a cross. A trade-off is a cost, not a failure, and a red X would
 * say something the copy does not.
 *
 * The premise itself was counted rather than argued about: of the twenty-one
 * lists this rule reaches across the whole library, fourteen are plan features
 * and ticket inclusions -- things you genuinely get. So the rule stays opt-out.
 * Inverting it to opt-in would mean editing fourteen patterns to restore what
 * already reads correctly, to spare five.
 *
 * Those five are why the class is no longer called `bs-list-tradeoffs`. It was
 * named after the first pattern that needed it, and the next two are not
 * trade-offs at all: `process-roadmap` ticked "1.0 release" in a quarter that
 * has not happened, and `process-comparison` ticked "Slow handoff" in the
 * column describing the problem. What all three share is that the items are
 * listed, not granted -- which is what `neutral` names.
 */
.wp-block-column:is( .has-background, [style*="background"] ) .wp-block-list:not( [style*="list-style" ] ):not( :has( > li:first-child > a:only-child ) ).bs-list-neutral > li::before {
	top: 0.62em;
	width: 0.55em;
	height: 0;
	border-right: 0;
	transform: none;
}

/* --- Timelines -------------------------------------------------------------- */

/*
 * A timeline is a set of rows with something running between them. Without that
 * something it is a two-column list, which is what `process-timeline` was --
 * indistinguishable from `process-steps-3` sitting beside it in the picker.
 *
 * Each row is its own columns block with the group's block gap between them, so
 * a border on the label column would draw three stubs with holes at the gaps.
 * The rail is therefore a pseudo-element that overshoots its own column by
 * exactly one gap and meets the next row's. Nothing in the layout moves.
 */
.bs-timeline > .wp-block-columns > .wp-block-column:first-child {
	position: relative;
	padding-inline-start: var( --wp--preset--spacing--40 );
}

.bs-timeline > .wp-block-columns > .wp-block-column:first-child::before {
	content: "";
	position: absolute;
	inset-inline-start: -3px;
	top: 0.42em;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var( --wp--preset--color--primary );
}

.bs-timeline > .wp-block-columns > .wp-block-column:first-child::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 1.4em;
	bottom: calc( var( --wp--preset--spacing--50 ) * -1 );
	width: 2px;
	background: color-mix( in srgb, var( --wp--preset--color--primary ) 22%, transparent );
}

/* A timeline that runs on past its final station is pointing at nothing. */
.bs-timeline > .wp-block-columns:last-child > .wp-block-column:first-child::after {
	display: none;
}

/*
 * Stacked, the label sits directly above its own copy and the rail would run
 * through the text rather than beside it.
 */
@media ( max-width: 781px ) {

	.bs-timeline > .wp-block-columns > .wp-block-column:first-child::after {
		display: none;
	}
}

/* --- Link lists are navigation, not prose --------------------------------- */

/*
 * Core's list block ships browser-default discs, and the card rule above
 * deliberately does not reach a column with no fill -- so a footer built from
 * four columns of links renders four bulleted lists, which is the most
 * recognisable "unstyled WordPress" tell there is. Nine of the twenty-two
 * footer patterns build their columns exactly that way.
 *
 * Scoping this to `footer` was tried and is worse: it only takes effect once the
 * pattern is inside a footer template part, so it cannot be verified on the
 * audit pages, and it describes WHERE rather than WHAT. What actually makes
 * these lists different is that every item is a bare link. Testing the first
 * item is enough to say "this is navigation" without catching a prose list that
 * happens to contain a link somewhere in the middle.
 */
.wp-block-list:has( > li:first-child > a:only-child ) {
	list-style: none;
	padding-left: 0;
}

/* --- Placeholder art ------------------------------------------------------ */

/*
 * The warm ground and the radius for borrowed imagery are declared once, in the
 * Media block near the top of this file. A third copy stood here and did nothing
 * the first two did not -- except sit at 0,1,1, which is above Global Styles, so
 * the Site Editor's Image radius control was dead. Removed; nothing replaces it.
 */

/* --- Where the page meets the footer -------------------------------------- */

/*
 * The footer is an inset card: rounded, held off the edges, floating on the
 * sand ground. That works under a light closing section and falls apart under a
 * dark one -- a near-black CTA, a 40px strip of sand, then a brown rounded card,
 * which reads as two dark blocks that failed to line up rather than one closing
 * movement.
 *
 * So when the last thing on the page IS dark, the footer stops being a card and
 * becomes the continuation of it: no gap, no inset, no radius, and enough top
 * padding that the join is a change of content rather than a seam. `:has()`
 * makes this readable from the footer, which is the only place that can see
 * both sides of the join.
 */
main:has( > .wp-block-post-content > [class*="is-style-section-inverse"]:last-child ) + footer > .blocksmith-footer,
main:has( > .wp-block-post-content > [class*="is-style-section-deep"]:last-child ) + footer > .blocksmith-footer,
main:has( > .wp-block-post-content > [class*="is-style-section-brand"]:last-child ) + footer > .blocksmith-footer {
	margin: 0;
	border-radius: 0;
	padding-top: var( --wp--preset--spacing--80 );
	border-top: 1px solid rgba( 255, 255, 255, 0.09 );
}

main:has( > .wp-block-post-content > [class*="is-style-section-inverse"]:last-child ) + footer,
main:has( > .wp-block-post-content > [class*="is-style-section-deep"]:last-child ) + footer,
main:has( > .wp-block-post-content > [class*="is-style-section-brand"]:last-child ) + footer {
	margin-top: 0;
}

/* --- Query loops ---------------------------------------------------------- */

/*
 * A blog index rendered as bare title/excerpt/date in three columns reads as a
 * list of links, not a set of posts. Give each entry the same card the rest of
 * the site uses, so the index belongs to the same design language as everything
 * above it. Only grid layouts: a list layout is a different composition and a
 * card there would fight the reading measure.
 */
:where( .wp-block-post-template.is-layout-grid > li ) {
	display: flex;
	flex-direction: column;
	background: var( --bs-card );
	border: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--55 );
	box-shadow: var( --bs-shadow-soft );
	transition: transform var( --wp--custom--transition--base, 160ms ease ), box-shadow var( --wp--custom--transition--base, 160ms ease );
}

.wp-block-post-template.is-layout-grid > li:hover {
	transform: translateY( -3px );
	box-shadow: var( --bs-shadow-lift );
}

/* Core's Search block width control writes a literal pixel width onto the
   wrapper, with no per-breakpoint escape - so a header that wants a 380px
   search bar on a desktop ships a 380px search bar to a 390px phone, and the
   page scrolls sideways. Measured at 14px of overflow on `header-shop-search`.
   The cap does not touch the chosen width; it only refuses to exceed the space
   the block was given. */
.wp-block-search {
	max-width: 100%;
}

/* The featured image is the card's lid: full-bleed to the padding, square with
   the card's own corner rather than carrying a second radius inside it. */
.wp-block-post-template.is-layout-grid > li > .wp-block-post-featured-image {
	margin: calc( var( --wp--preset--spacing--55 ) * -1 ) calc( var( --wp--preset--spacing--55 ) * -1 ) var( --wp--preset--spacing--45 );
}

.wp-block-post-template.is-layout-grid > li > .wp-block-post-featured-image img {
	border-radius: var( --bs-radius ) var( --bs-radius ) 0 0;
	width: 100%;
}

.wp-block-post-template.is-layout-grid > li > .wp-block-post-title {
	margin-top: 0;
	margin-bottom: var( --wp--preset--spacing--30 );
	/* A card title is not a page title. Whatever h3 the site sets - and the setup
	   wizard sets clamp(1.9rem, 3.7vw, 3.3rem) - a 210px grid card cannot carry
	   it: measured at 53px in a 145px column, which is under three characters a
	   line.

	   The size is relative, not a preset. The preset shipped here first and was
	   wrong: on a site whose body text computes to 24px, `large` computes to
	   23px, so a card title came out smaller than its own excerpt. An `em` is a
	   proportion of the copy the title sits with, so the step survives whatever
	   the site does to its type scale. */
	font-size: 1.25em;
	line-height: 1.25;
	letter-spacing: -0.012em;
}

/* The date is metadata: it belongs at the foot of the card, not wherever the
   excerpt happens to end. */
.wp-block-post-template.is-layout-grid > li > .wp-block-post-date {
	margin-top: auto;
	padding-top: var( --wp--preset--spacing--40 );
	color: var( --wp--preset--color--neutral );
}

/* --- Accent as ink -------------------------------------------------------- */

/*
 * `accent` is a FILL. #C97B3C is right for a band or a graphic, and it carries
 * `contrast` text at 5.03:1. As TEXT it is wrong at both ends: 3.06:1 on the
 * sand ground and 4.32:1 on a deep-brown card, both under AA — a rendered sweep
 * over every page found it in the "MOST POPULAR" plan badge and in every star
 * rating.
 *
 * No single value fixes that. A colour legible on near-white AND near-black at
 * 4.5:1 barely exists, and certainly not in burnt orange. So the accent gets a
 * second, text-only value that follows the surface: dark ink on a light ground,
 * light ink on a dark one. It inherits, so a card that changes the ground
 * changes the ink for everything inside it without knowing what is in there.
 *
 * The slug is untouched: `has-accent-color` still means "the accent", it just
 * resolves to the legible member of the pair.
 */
/*
 * The pair is a SETTING, not a literal: `custom.accentInk` and
 * `custom.accentInkOnDark`. Written here as hex it stayed burnt orange under
 * every variation, including the ones whose accent is teal, crimson, magenta or
 * blue -- a literal cannot know the palette changed underneath it. Each colour
 * variation now ships its own pair, derived from its own accent and measured at
 * 4.6:1 or better against that variation's own grounds in both schemes. The hex
 * below is the default palette's, kept as the fallback for a site with neither.
 */
:root {
	--bs-accent-ink: var( --wp--custom--accent-ink, #9c5312 );
	--bs-accent-ink-on-dark: var( --wp--custom--accent-ink-on-dark, #e3a164 );
}

/*
 * `!important` is not optional here, and not a shortcut. WordPress emits every
 * preset colour class with an `!important` of its own --
 * `.has-accent-color{color:var(--wp--preset--color--accent) !important}` -- so a
 * plain declaration cannot reach this class at any specificity whatsoever.
 */
.has-accent-color {
	color: var( --bs-accent-ink ) !important;
}

/* Every surface the theme knows to be dark hands its children the light ink. */
[class*="is-style-section-deep"],
[class*="is-style-section-inverse"],
.has-secondary-background-color,
.has-contrast-background-color,
.blocksmith-footer,
:root[data-scheme="dark"] {
	--bs-accent-ink: var( --bs-accent-ink-on-dark );
}

/* An accent BAND is a dark-ish fill carrying light text, so accent-as-ink there
   would be the light value fighting its own ground. Text on an accent fill uses
   the contrast token, which is what the section style already sets. */
.has-accent-background-color .has-accent-color,
[class*="is-style-section-accent"] .has-accent-color {
	color: var( --wp--preset--color--contrast ) !important;
}

/* --- Wordmark legibility -------------------------------------------------- */

/*
 * The wordmark was set at 50% opacity so the logo wall would recede. That put it
 * at 3.1:1 — a logo wall is still text someone has to read. Held back with a
 * lighter ink instead of transparency, which keeps the recede and clears AA.
 */
.is-style-wordmark {
	opacity: 1;
	color: color-mix( in srgb, var( --wp--preset--color--contrast ) 62%, var( --wp--preset--color--neutral ) );
}

.is-style-wordmark:hover {
	opacity: 1;
	color: var( --wp--preset--color--contrast );
}

/* --- Text on an accent fill ----------------------------------------------- */

/*
 * `accent` is a mid-tone, and a mid-tone only carries dark text. The rendered
 * sweep found a button filled with accent and set in `base` at 3.06:1 — a
 * primary call to action on a case-study page, failing AA outright. The same
 * pattern would repeat anywhere someone puts light text on the accent.
 *
 * `--bs-on-accent` is "the dark end of the palette", which is `contrast` in the
 * light scheme and `base` in the dark one — the palette inverts, and the rule
 * that survives the inversion is "dark text on a mid fill", not "the contrast
 * token".
 */
:root {
	--bs-on-accent: var( --wp--preset--color--contrast );
}

:root[data-scheme="dark"] {
	--bs-on-accent: var( --wp--preset--color--base );
}

.has-accent-background-color,
.has-accent-background-color .wp-block-button__link.has-accent-background-color {

	/* Overrides a colour the pattern set on the element itself, which is the whole
	   job of this layer. */
	color: var( --bs-on-accent ) !important;
}

/* --- Ink that means "the light end" --------------------------------------- */

/*
 * A pattern writing `has-base-color` on text is not asking for the value of
 * `base`. It is saying "this sits on a dark fill, so use the light end of the
 * palette" — and in the light scheme those are the same thing, which is why it
 * was never noticed. In the dark scheme `base` IS the ground, so every one of
 * those became dark text on a dark fill: a rendered sweep in dark mode found
 * forty failures on the home page at 1.22:1, in the footer, the plan cards and
 * every inverse band.
 *
 * Same reasoning as `--bs-accent-ink` above and as decision 022: the palette
 * inverts, so the rule that survives is stated in terms of the ROLE, not the
 * token. `neutral-light` used as text gets the same treatment — it means
 * "quiet, on a dark fill".
 */
/*
 * The roles are settings too (`custom.inkInverse`, `custom.inkInverseQuiet`), for
 * the same reason as the accent pair: the dark SCHEME flipped them below, but a
 * dark PALETTE never touches `data-scheme`, so under Midnight-with-the-toggle-off
 * "the light end of the palette" still resolved to `base`, which under Midnight
 * IS the dark ground. Midnight declares its own; the defaults here are the light
 * palette's reading, which is what every other variation wants.
 */
:root {
	--bs-ink-inverse: var( --wp--custom--ink-inverse, var( --wp--preset--color--base ) );
	--bs-ink-inverse-quiet: var( --wp--custom--ink-inverse-quiet, var( --wp--preset--color--neutral-light ) );
}

:root[data-scheme="dark"] {
	--bs-ink-inverse: var( --wp--preset--color--contrast );
	--bs-ink-inverse-quiet: color-mix( in srgb, var( --wp--preset--color--contrast ) 70%, var( --wp--preset--color--neutral ) );
}

/*
 * Scoped to the surfaces that make the role TRUE, rather than applied to the
 * class everywhere. Global, this took two palette slugs off the table: a pattern
 * that genuinely wanted `base` or `neutral-light` as text on an ordinary ground
 * could not have it, in any variation, ever. Inside a dark fill the role reading
 * is the right one; outside it the preset class is left to mean what it says.
 *
 * The ancestor list is the one the accent ink uses above, plus the self-matching
 * arm for an element that IS the dark fill and carries the class as well.
 *
 * `!important` stays, because WordPress emits its preset colour classes with
 * `!important` and specificity alone cannot reach them. The reach is what
 * changed, not the weapon.
 */
:is( [class*="is-style-section-deep"],
	[class*="is-style-section-inverse"],
	.has-secondary-background-color,
	.has-contrast-background-color,
	.blocksmith-footer,
	:root[data-scheme="dark"] ) .has-base-color,
:is( [class*="is-style-section-deep"],
	[class*="is-style-section-inverse"],
	.has-secondary-background-color,
	.has-contrast-background-color ).has-base-color {
	color: var( --bs-ink-inverse ) !important;
}

:is( [class*="is-style-section-deep"],
	[class*="is-style-section-inverse"],
	.has-secondary-background-color,
	.has-contrast-background-color,
	.blocksmith-footer,
	:root[data-scheme="dark"] ) .has-neutral-light-color,
:is( [class*="is-style-section-deep"],
	[class*="is-style-section-inverse"],
	.has-secondary-background-color,
	.has-contrast-background-color ).has-neutral-light-color {
	color: var( --bs-ink-inverse-quiet ) !important;
}

/*
 * The mirror of the above on the fill side. A card filled with `secondary` or
 * `contrast` is "the dark card"; in the dark scheme those values are still dark
 * but so is the ground, so the card needs to be the lifted surface instead —
 * otherwise the one card a pattern singled out disappears into the page.
 */
:root[data-scheme="dark"] .wp-block-column.has-secondary-background-color,
:root[data-scheme="dark"] .wp-block-column.has-contrast-background-color,
:root[data-scheme="dark"] .wp-block-column > .wp-block-group.has-secondary-background-color,
:root[data-scheme="dark"] .wp-block-column > .wp-block-group.has-contrast-background-color {
	background-color: color-mix( in srgb, var( --wp--preset--color--base ) 82%, #ffffff ) !important;
}

/* The footer band keeps whatever ground it declared -- it is a band, not a card,
   and a full-width strip lifted like a card reads as a mistake. This is the value
   its own reversed elements (the hover state on the subscribe button) invert to. */
:root {
	--bs-footer-ground: var( --wp--preset--color--secondary );
}

/* --- WooCommerce mini-cart, in the dark scheme ---------------------------- */

/*
 * The mini-cart drawer is WooCommerce's own markup, and it paints itself white
 * from its own stylesheet — `#fff` on the drawer, `base` on the contents. In the
 * light scheme that is fine and matches the site. In the dark scheme the drawer
 * stayed white while the text inherited the page's light ink, so every line in
 * it — the heading, the product names, the prices — was light-on-light. Ten
 * failures per page, in the one surface a shopper opens to check out.
 *
 * The drawer is off-canvas, which is why nothing caught it before: it is invisible
 * on screen until opened, and present in the DOM the whole time.
 */
:root[data-scheme="dark"] .wc-block-mini-cart__drawer,
:root[data-scheme="dark"] .wp-block-woocommerce-mini-cart-contents,
:root[data-scheme="dark"] .wc-block-components-drawer,
:root[data-scheme="dark"] .wc-block-components-drawer__content {
	background-color: var( --wp--preset--color--base ) !important;
	color: var( --wp--preset--color--contrast );
}

:root[data-scheme="dark"] .wc-block-mini-cart__drawer :where( h1, h2, h3, .wc-block-components-product-name, .wc-block-formatted-money-amount, .wc-block-components-product-metadata ) {
	color: var( --wp--preset--color--contrast );
}

/*
 * Order matters: `.has-base-color` above also carries `!important`, and at equal
 * specificity the later rule wins — which would put light ink back on an accent
 * fill. Naming both classes settles it, and says the thing plainly: on an accent
 * fill, the element's own colour class does not get a vote.
 */
.has-accent-background-color.has-base-color,
.has-accent-background-color.has-neutral-light-color,
.has-accent-background-color .wp-block-button__link.has-base-color {
	color: var( --bs-on-accent ) !important;
}

/* --- Striped tables ------------------------------------------------------- */

/*
 * Core's `is-style-stripes` paints odd rows `#f0f0f0` — a literal, and one that
 * has no idea the palette can invert. In the dark scheme it put light text on a
 * near-white row: 1.04:1, on a resource table where every number matters. Same
 * fault as the card surfaces, in core rather than here, so it takes the same
 * answer: derive the stripe from the ground it is sitting on.
 */
.wp-block-table.is-style-stripes tbody tr:nth-child( odd ) {
	background-color: color-mix( in srgb, var( --wp--preset--color--neutral ) 10%, transparent );
}

.wp-block-table.is-style-stripes {
	border-bottom-color: color-mix( in srgb, var( --wp--preset--color--neutral ) 24%, transparent );
}

.wp-block-table thead {
	border-bottom-color: var( --wp--custom--border--strong, color-mix( in srgb, var( --wp--preset--color--neutral ) 40%, transparent ) );
}

.wp-block-table th,
.wp-block-table thead td {
	font-weight: 600;
	text-align: left;
}

.wp-block-table td,
.wp-block-table th {
	padding: 0.7em 0.9em;
	border-color: color-mix( in srgb, var( --wp--preset--color--neutral ) 18%, transparent );
}

/* === Productized demo shapes (2026-08-05) ================================= */

/*
 * Everything below started life as per-demo CSS — Aurum's animated buttons and
 * editorial tables, Artifex's full-bleed image heroes, Substrata's geometry —
 * rebuilt here as theme styles so they are one click in the editor's Styles
 * list instead of a stylesheet only a developer can reach. Each one keys off
 * tokens or currentColor, never a literal, so the dark scheme and every colour
 * variation inherit them for free.
 */

/* --- Buttons: gradient peel ----------------------------------------------- */

/*
 * Aurum's "living button": a gradient that keeps moving inside the pill. The
 * gradient stays inside the primary family — primary into a primary/secondary
 * mix — so the button-element pairing the palettes already guarantee (base text
 * on primary) holds at every stop. The accent is deliberately not in the sweep:
 * a mid-tone orange under light text is an AA failure waiting for its moment.
 */
@keyframes bs-peel {
	from {
		background-position: 0% 50%;
	}

	to {
		background-position: 100% 50%;
	}
}

.wp-block-button.is-style-peel .wp-block-button__link {
	background-image: linear-gradient(
		115deg,
		var( --wp--preset--color--primary ) 0%,
		color-mix( in srgb, var( --wp--preset--color--primary ) 45%, var( --wp--preset--color--secondary ) ) 50%,
		var( --wp--preset--color--primary ) 100%
	);
	background-size: 320% 100%;
	animation: bs-peel 6s linear infinite alternate;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.wp-block-button.is-style-peel .wp-block-button__link:hover,
.wp-block-button.is-style-peel .wp-block-button__link:focus-visible {
	transform: translateY( -2px );
	box-shadow: var( --bs-shadow-soft );
}

/*
 * The quiet sibling: an outline at rest, and the same sweep arrives as the
 * fill on hover. Border and text ride currentColor so the button is legible on
 * any ground it is dropped on, including the dark bands.
 */
.wp-block-button.is-style-peel-outline .wp-block-button__link {
	background-color: transparent;
	background-image: linear-gradient(
		115deg,
		var( --wp--preset--color--primary ) 0%,
		color-mix( in srgb, var( --wp--preset--color--primary ) 45%, var( --wp--preset--color--secondary ) ) 100%
	);
	background-repeat: no-repeat;
	background-size: 0% 100%;
	border: 1px solid color-mix( in srgb, currentColor 45%, transparent );
	color: inherit;
	transition: background-size 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

.wp-block-button.is-style-peel-outline .wp-block-button__link:hover,
.wp-block-button.is-style-peel-outline .wp-block-button__link:focus-visible {
	background-size: 100% 100%;
	border-color: transparent;
	color: var( --wp--preset--color--base );
}

@media ( prefers-reduced-motion: reduce ) {
	.wp-block-button.is-style-peel .wp-block-button__link {
		animation: none;
	}

	.wp-block-button.is-style-peel .wp-block-button__link:hover {
		transform: none;
	}
}

/* --- Tables: editorial ---------------------------------------------------- */

/*
 * Aurum's data tables: hairlines instead of a grid, headers set as small
 * tracked labels, figures that line up. Every line is derived from `neutral`
 * at low strength — the same idiom as the striped-table fix above — so the
 * style survives a dark band without a correction table.
 */
.wp-block-table.is-style-editorial table {
	border-collapse: collapse;
	background: transparent;
	border: 0;
}

.wp-block-table.is-style-editorial th,
.wp-block-table.is-style-editorial thead td {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 0;
	border-bottom: 1px solid var( --wp--custom--border--strong, color-mix( in srgb, var( --wp--preset--color--neutral ) 40%, transparent ) );
	padding: 0.8em 0.9em;
}

.wp-block-table.is-style-editorial td {
	border: 0;
	border-bottom: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	padding: 0.9em;
	font-variant-numeric: tabular-nums lining-nums;
}

.wp-block-table.is-style-editorial tbody tr:last-child td {
	border-bottom: 0;
}

/* --- Details: accordion ---------------------------------------------------- */

/*
 * The FAQ chrome three demos re-drew: hairline rows, a "+" that becomes a "×"
 * by turning 45°, no disclosure triangle. Stacked accordions share their
 * hairline so the list reads as rows, not boxes.
 */
.wp-block-details.is-style-accordion {
	background: transparent;
	border: 0;
	border-top: 1px solid color-mix( in srgb, var( --wp--preset--color--neutral ) 24%, transparent );
	border-bottom: 1px solid color-mix( in srgb, var( --wp--preset--color--neutral ) 24%, transparent );
	border-radius: 0;
	box-shadow: none;
	padding: var( --wp--preset--spacing--40 ) 0;
}

/* The base details treatment above draws a card and a border chevron; the
   accordion is hairline rows, so every part of the card has to be unwound —
   including the hover/open shadow and the ::after chevron's borders. */
.wp-block-details.is-style-accordion:hover,
.wp-block-details.is-style-accordion[open] {
	border-color: color-mix( in srgb, var( --wp--preset--color--primary ) 40%, transparent );
	box-shadow: none;
}

.wp-block-details.is-style-accordion + .wp-block-details.is-style-accordion {
	border-top: 0;
}

.wp-block-details.is-style-accordion > summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --wp--preset--spacing--40 );
	padding-right: 0;
	font-weight: 600;
	cursor: pointer;
}

.wp-block-details.is-style-accordion > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-accordion > summary::after {
	content: "+";
	position: static;
	flex: none;
	width: auto;
	height: auto;
	border: 0;
	font-family: var( --wp--preset--font-family--body );
	font-size: 1.5em;
	font-weight: 300;
	line-height: 1;
	color: var( --wp--preset--color--primary );
	transform: none;
	transition: rotate 0.2s ease;
}

.wp-block-details.is-style-accordion[open] > summary::after {
	transform: none;
	rotate: 45deg;
}

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

	.wp-block-details.is-style-accordion > summary::after {
		transition: none;
	}
}

/* --- Cards that answer the cursor ------------------------------------------ */

/*
 * Aurum's step/engine/price cards all did the same thing: a soft card that
 * lifts a few pixels when hovered. One style instead of three classes. It
 * carries the full card chrome (styles are exclusive — it cannot be stacked on
 * `soft-card`), so picking it is one decision, not two.
 */
.is-style-hover-lift {
	background: var( --bs-card );
	border: 1px solid var( --wp--preset--color--neutral-light );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--60 );
	transition: transform var( --wp--custom--transition--base, 160ms ease ), box-shadow var( --wp--custom--transition--base, 160ms ease );
}

.is-style-hover-lift:hover {
	transform: translateY( -6px );
	box-shadow: var( --bs-shadow-lift );
}

/*
 * The plan a pricing table wants chosen, pre-lifted the way Aurum shipped it:
 * scaled a step, held above its siblings, ringed in the primary. The scale only
 * engages once the columns are actually side by side — scaled cards in a
 * stacked mobile column read as a mistake.
 */
.wp-block-column.is-style-featured-tier {
	background: var( --bs-card );
	border: 1px solid color-mix( in srgb, var( --wp--preset--color--primary ) 45%, transparent );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--60 );
	box-shadow: var( --bs-shadow-soft );
	position: relative;
	z-index: 1;
}

@media ( min-width: 782px ) {
	.wp-block-column.is-style-featured-tier {
		transform: scale( 1.03 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.is-style-hover-lift,
	.is-style-hover-lift:hover {
		transform: none;
	}
}

/* --- The image hero, without wp:cover -------------------------------------- */

/*
 * Artifex's technique, promoted. A cover block re-serializes its media through
 * save(), which is where every demo hit block-validation trouble; a plain group
 * holding a plain image cannot go invalid. The style does the positioning: the
 * first image becomes the room, everything after it stands in the room.
 *
 * The scrim is part of the style, and the ink is FIXED near-white — not `base`,
 * which flips in the dark scheme. Text is standing on a photograph; the
 * photograph does not repaint between schemes, so neither may the text.
 */
[class*="is-style-image-hero"] {
	position: relative;
	overflow: clip;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 72vh;
	border-radius: 0;
	color: #faf6f0;
}

[class*="is-style-image-hero"] > .wp-block-image:first-child {
	position: absolute;
	inset: 0;
	margin: 0;
	z-index: 0;
	pointer-events: none;
}

[class*="is-style-image-hero"] > .wp-block-image:first-child img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

[class*="is-style-image-hero"] > .wp-block-image:first-child::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba( 20, 17, 14, 0.6 ), rgba( 20, 17, 14, 0.18 ) 55%, rgba( 20, 17, 14, 0.28 ) );
}

[class*="is-style-image-hero"] > :not( :first-child ) {
	position: relative;
	z-index: 1;
}

[class*="is-style-image-hero"] :where( h1, h2, h3, h4, h5, h6 ) {
	color: inherit;
}

/* The eyebrow's primary ink is tuned for the sand ground; on a photograph it
   takes the hero's fixed light ink like everything else standing there. */
[class*="is-style-image-hero"] .is-style-eyebrow {
	color: inherit;
}

/* --- Pinned sections ------------------------------------------------------- */

/*
 * Aurum's signature move: the hero stays put and the page arrives over it.
 * `pinned` is the hero's half; the other half is every following sibling
 * getting a ground and a stacking level, or the hero would show through
 * whatever forgot to paint itself. Scoped with `:has()` so pages without a
 * pinned section pay nothing.
 */
:is( .is-style-pinned, .is-style-image-hero-pinned ) {
	position: sticky;
	top: 0;
	z-index: 0;
	border-radius: 0;
	overflow: clip;
}

.wp-block-post-content:has( > :is( .is-style-pinned, .is-style-image-hero-pinned ) ) > :not( .is-style-pinned ):not( .is-style-image-hero-pinned ) {
	position: relative;
	z-index: 1;
}

.wp-block-post-content:has( > :is( .is-style-pinned, .is-style-image-hero-pinned ) ) > :not( .is-style-pinned ):not( .is-style-image-hero-pinned ):not( .has-background ):not( [class*="is-style-section-"] ) {
	background: var( --wp--preset--color--base );
}

/* --- Full-height sections -------------------------------------------------- */

/*
 * The consumer for `--bs-header-height`. The builder publishes that variable on
 * `document.documentElement` whenever the header is annotated, and the
 * transparent-header setting's help text tells the author that a following
 * section can offset itself by it — but nothing in the theme ever read it, so
 * the promise only held for people who hand-wrote their own CSS. This is the
 * read.
 *
 * Opt-in only, never a default: a section that fills the viewport minus the
 * header is what a hero under a transparent header wants, and what nothing else
 * wants.
 *
 * Two things here are load-bearing.
 *
 * 1. The `0px` fallback inside `var()`. With the header setting off nothing
 *    publishes the variable, and `calc( 100svh - var( --bs-header-height ) )`
 *    against an undefined variable does not mean "drop the term" — the whole
 *    declaration is invalid at computed-value time and the section collapses to
 *    its content. The fallback makes the no-header case mean "the full
 *    viewport", which is the sane reading.
 *
 * 2. `svh`, not `vh`. On mobile `100vh` measures the viewport as if the browser
 *    chrome were retracted, so a `100vh` hero overflows by the height of the
 *    toolbar and shoves the fold off-screen. `100svh` is the small viewport —
 *    chrome showing — which is the state the page actually loads in.
 *
 * The `vh` declaration is the fallback for browsers without `svh` units, and it
 * has to come first: a browser that does not understand `svh` discards the
 * second declaration at parse time and keeps this one, while a browser that
 * does understand it takes the later declaration. Declaration order rather than
 * `@supports` because the cascade already does this for nothing.
 *
 * Registered for group and for cover. Cover is the block most likely to be the
 * hero sitting under a transparent header, and the theme already pairs the two
 * this way for `pinned`. The compound `.wp-block-cover.is-style-full-height` is
 * in the selector purely for weight — core ships `.wp-block-cover` with a
 * `min-height` of its own, so matching cover at two classes settles it without
 * reaching for `!important`. A minimum height typed into cover's own sidebar
 * control still wins, because core writes that one inline and an explicit
 * author value should outrank a style variation.
 */
:is( .is-style-full-height, .wp-block-cover.is-style-full-height ) {
	min-height: calc( 100vh - var( --bs-header-height, 0px ) );
	min-height: calc( 100svh - var( --bs-header-height, 0px ) );
}

/* --- Geometry -------------------------------------------------------------- */

/*
 * Substrata's overlays: one hairline circle, one clipped plane, drawn in CSS so
 * they cost nothing to load and recolour themselves from the ink they sit with.
 * Decoration only — both layers are inert to the pointer and invisible to
 * assistive tech.
 */
.is-style-geo {
	position: relative;
	overflow: clip;
}

.is-style-geo::before {
	content: "";
	position: absolute;
	right: -6%;
	bottom: -22%;
	width: 42%;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid color-mix( in srgb, currentColor 26%, transparent );
	pointer-events: none;
}

.is-style-geo::after {
	content: "";
	position: absolute;
	top: -14%;
	left: -8%;
	width: 38%;
	height: 72%;
	background: color-mix( in srgb, currentColor 5%, transparent );
	clip-path: polygon( 0 0, 100% 14%, 80% 100%, 0 86% );
	pointer-events: none;
}

.is-style-geo > * {
	position: relative;
}

/* --- Block Smith query loops join the card language ------------------------ */

/*
 * The core post-template grid above earned its cards; the Block Smith Query
 * Loop renders the same kind of index through its own list markup and was
 * still showing up bare. Same chrome, same hover, same full-bleed lid — one
 * design language across both loop surfaces. List layout stays flush here for
 * the same reason it does above: a card would fight the reading measure.
 */
:where( .blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li ) {
	display: flex;
	flex-direction: column;
	background: var( --bs-card );
	border: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	border-radius: var( --bs-radius );
	padding: var( --wp--preset--spacing--55 );
	box-shadow: var( --bs-shadow-soft );
	transition: transform var( --wp--custom--transition--base, 160ms ease ), box-shadow var( --wp--custom--transition--base, 160ms ease );
}

.blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li:hover {
	transform: translateY( -3px );
	box-shadow: var( --bs-shadow-lift );
}

.blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li > .wp-block-post-featured-image {
	margin: calc( var( --wp--preset--spacing--55 ) * -1 ) calc( var( --wp--preset--spacing--55 ) * -1 ) var( --wp--preset--spacing--45 );
}

.blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li > .wp-block-post-featured-image img {
	border-radius: var( --bs-radius ) var( --bs-radius ) 0 0;
	width: 100%;
}

.blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li > .wp-block-post-title {
	margin-top: 0;
	margin-bottom: var( --wp--preset--spacing--30 );
	/* A card title is not a page title. Whatever h3 the site sets - and the setup
	   wizard sets clamp(1.9rem, 3.7vw, 3.3rem) - a 210px grid card cannot carry
	   it: measured at 53px in a 145px column, which is under three characters a
	   line.

	   The size is relative, not a preset. The preset shipped here first and was
	   wrong: on a site whose body text computes to 24px, `large` computes to
	   23px, so a card title came out smaller than its own excerpt. An `em` is a
	   proportion of the copy the title sits with, so the step survives whatever
	   the site does to its type scale. */
	font-size: 1.25em;
	line-height: 1.25;
	letter-spacing: -0.012em;
}

/* Dates are metadata in both loops: small, tracked, at the foot of the card. */
.wp-block-post-template.is-layout-grid > li > .wp-block-post-date,
.blocksmith-query-loop.is-layout-grid > .blocksmith-query-loop__list > li > .wp-block-post-date {
	margin-top: auto;
	padding-top: var( --wp--preset--spacing--40 );
	color: var( --wp--preset--color--neutral );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums lining-nums;
}

/*
 * The opt-out, for the compositions that are not an index — a one-product loop
 * composing a product page, a loop inside something that is already a card.
 * `flush` returns both loop surfaces to bare markup.
 */
.wp-block-query.is-style-flush .wp-block-post-template.is-layout-grid > li,
.blocksmith-query-loop.is-style-flush > .blocksmith-query-loop__list > li {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	transition: none;
}

.wp-block-query.is-style-flush .wp-block-post-template.is-layout-grid > li:hover,
.blocksmith-query-loop.is-style-flush > .blocksmith-query-loop__list > li:hover {
	transform: none;
	box-shadow: none;
}

.wp-block-query.is-style-flush .wp-block-post-template.is-layout-grid > li > .wp-block-post-featured-image,
.blocksmith-query-loop.is-style-flush > .blocksmith-query-loop__list > li > .wp-block-post-featured-image {
	margin: 0 0 var( --wp--preset--spacing--45 );
}

.wp-block-query.is-style-flush .wp-block-post-template.is-layout-grid > li > .wp-block-post-featured-image img,
.blocksmith-query-loop.is-style-flush > .blocksmith-query-loop__list > li > .wp-block-post-featured-image img {
	border-radius: var( --bs-radius );
}

/* --- Inline forms ----------------------------------------------------------- */

/*
 * Aurum's newsletter row: one field and its button on a single line. The form
 * container is already a wrapping flex row; all this style changes is the
 * submit's claim on it — from "a row of my own" to "the rest of this one" —
 * and the alignment, so the button sits on the field's baseline rather than
 * its label's.
 */
.blocksmith-form.is-style-inline {
	align-items: flex-end;
}

.blocksmith-form.is-style-inline > .blocksmith-form-submit {
	flex: 0 0 auto;
}

/* -----------------------------------------------------------------------------
 * Design-tokens reference pattern (block-smith/design-tokens)
 *
 * A living style guide: every chip, bar and box reads the token it documents --
 * preset classes for colours and gradients, the --bs shape aliases, the shadow
 * presets -- so the page repaints under any variation, palette, shape preset or
 * scheme. Nothing here declares a colour of its own; that would let the
 * reference certify a design that no longer exists.
 * -------------------------------------------------------------------------- */

/* 0.35rem is deliberate and stays a literal: it sits between spacing--10
   (0.25rem) and spacing--20 (0.5rem), and no preset matches it. */
.bs-tokens .bs-token {
	gap: 0.35rem;
}

.bs-tokens .bs-token__chip {
	width: 96px;
	border-radius: var( --bs-radius-sm );
	border: 1px solid var( --wp--custom--border--subtle, color-mix( in srgb, var( --wp--preset--color--neutral ) 16%, transparent ) );
	overflow: hidden;
}

.bs-tokens .bs-token__label {
	margin: 0;
	font-family: var( --wp--preset--font-family--monospace );
	color: var( --wp--preset--color--neutral );
}

.bs-tokens .bs-token__type {
	margin: 0 0 0.2em;
	line-height: 1.15;
}

.bs-tokens .bs-token__spacerow {
	align-items: center;
	gap: var( --wp--preset--spacing--40 );
}

.bs-tokens .bs-token__spacerow .bs-token__label {
	min-width: 2.5rem;
}

.bs-tokens .bs-token__bar {
	background: var( --wp--preset--color--primary );
	border-radius: 999px;
	overflow: hidden;
}

.bs-tokens .bs-token__bar--20 { width: var( --wp--preset--spacing--20 ); }
.bs-tokens .bs-token__bar--40 { width: var( --wp--preset--spacing--40 ); }
.bs-tokens .bs-token__bar--50 { width: var( --wp--preset--spacing--50 ); }
.bs-tokens .bs-token__bar--60 { width: var( --wp--preset--spacing--60 ); }
.bs-tokens .bs-token__bar--70 { width: var( --wp--preset--spacing--70 ); }
.bs-tokens .bs-token__bar--80 { width: var( --wp--preset--spacing--80 ); }
.bs-tokens .bs-token__bar--90 { width: var( --wp--preset--spacing--90 ); }

.bs-tokens .bs-token__radius,
.bs-tokens .bs-token__shadow {
	width: 96px;
	background: var( --wp--preset--color--base );
	overflow: hidden;
}

.bs-tokens .bs-token__radius {
	border: 1px solid var( --wp--custom--border--strong, color-mix( in srgb, var( --wp--preset--color--neutral ) 40%, transparent ) );
}

.bs-tokens .bs-token__radius--sm { border-radius: var( --bs-radius-sm ); }
.bs-tokens .bs-token__radius--base { border-radius: var( --bs-radius ); }
.bs-tokens .bs-token__radius--lg { border-radius: var( --bs-radius-lg ); }

.bs-tokens .bs-token__shadow {
	border-radius: var( --bs-radius-sm );
}

.bs-tokens .bs-token__shadow--xs { box-shadow: var( --wp--preset--shadow--xs ); }
.bs-tokens .bs-token__shadow--sm { box-shadow: var( --wp--preset--shadow--sm ); }
.bs-tokens .bs-token__shadow--md { box-shadow: var( --wp--preset--shadow--md ); }
.bs-tokens .bs-token__shadow--lg { box-shadow: var( --wp--preset--shadow--lg ); }
.bs-tokens .bs-token__shadow--xl { box-shadow: var( --wp--preset--shadow--xl ); }
