:root {
	--cs-layout-reading: var(--wp--custom--container--reading, 48rem);
	--cs-layout-content: var(--wp--custom--container--content, var(--wp--style--global--content-size, 92rem));
	--cs-layout-full: var(--wp--custom--container--full, var(--wp--style--global--wide-size, 100rem));
	--cs-shell-padding-inline: var(--cs-gutter);
	--cs-shell-reading: min(100% - (var(--cs-shell-padding-inline) * 2), var(--cs-layout-reading));
	--cs-shell-content: min(100% - (var(--cs-shell-padding-inline) * 2), var(--cs-layout-content));
	--cs-shell-full: min(100% - (var(--cs-shell-padding-inline) * 2), var(--cs-layout-full));
	--cs-shell-bleed: min(100vw, calc(100% + (var(--cs-gutter) * 2)));
	--cs-rhythm-section: clamp(2.4rem, 4.2vw, 3.8rem);
	--cs-rhythm-section-tight: clamp(1.3rem, 2.2vw, 2rem);
	--cs-rhythm-section-loose: clamp(3.2rem, 5.4vw, 4.8rem);
	--cs-rhythm-panel: clamp(1rem, 1.4vw, 1.35rem);
	--cs-rhythm-content: clamp(1.2rem, 2.1vw, 1.75rem);
	--cs-section-block-gap: clamp(1.55rem, 2.5vw, 2.25rem);
	--cs-section-head-gap: clamp(0.8rem, 1.6vw, 1.2rem);
	--cs-section-head-max: 52rem;
	--cs-page-section-gap: clamp(1.25rem, 2.4vw, 2rem);
	--cs-hero-follow-space: clamp(4rem, 7vw, 6rem);
	--cs-block-card-padding: clamp(1rem, 1.8vw, 1.35rem);
	--cs-block-card-gap: clamp(0.6rem, 1.2vw, 0.9rem);
	--cs-block-grid-gap: clamp(1rem, 1.8vw, 1.6rem);
	--cs-block-inline-gap: clamp(0.95rem, 1.6vw, 1.2rem);
	--cs-block-question-padding-y: clamp(0.95rem, 1.7vw, 1.1rem);
	--cs-block-question-padding-x: clamp(1rem, 1.8vw, 1.2rem);
	--cs-block-answer-padding-bottom: clamp(1rem, 1.8vw, 1.15rem);
	--cs-site-max-width: var(--cs-layout-content);
	--cs-gutter: clamp(1rem, 2.2vw, 2rem);
	--cs-color-bg: var(--wp--preset--color--bg);
	--cs-color-surface: var(--wp--preset--color--surface);
	--cs-color-surface-muted: var(--wp--preset--color--surface-muted);
	--cs-color-surface-strong: var(--wp--preset--color--surface-strong);
	--cs-color-border: var(--wp--preset--color--border);
	--cs-color-border-strong: var(--wp--preset--color--border-strong);
	--cs-color-text: var(--wp--preset--color--text);
	--cs-color-text-soft: var(--wp--preset--color--text-soft);
	--cs-color-text-faint: var(--wp--preset--color--text-faint);
	--cs-color-primary: var(--wp--preset--color--primary);
	--cs-color-accent: var(--wp--preset--color--accent);
	--cs-color-accent-soft: var(--wp--preset--color--accent-soft);
	--cs-radius-sm: var(--wp--custom--radius--sm);
	--cs-radius-md: var(--wp--custom--radius--md);
	--cs-radius-lg: var(--wp--custom--radius--lg);
	--cs-radius-xl: var(--wp--custom--radius--xl, calc(var(--cs-radius-lg) + 0.5rem));
	--cs-radius-pill: var(--wp--custom--radius--pill);
	--cs-shadow-soft: var(--wp--custom--shadow--soft);
	--cs-shadow-lift: var(--wp--custom--shadow--lift);
	--cs-shadow-line: var(--wp--custom--shadow--line);
	--cs-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 252, 255, 0.7));
	--cs-surface-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88));
	--cs-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88));
	--cs-card-muted-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(238, 243, 248, 0.98));
	--cs-surface-muted-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 243, 248, 0.98));
	--cs-card-shadow: 0 10px 26px rgba(15, 23, 42, 0.03), var(--cs-shadow-line);
	--cs-surface-shadow: 0 12px 30px rgba(15, 23, 42, 0.035), var(--cs-shadow-line);
	--cs-panel-shadow: 0 12px 30px rgba(15, 23, 42, 0.035), var(--cs-shadow-line);
	/* Defaults until Theme Options inline runs; align with theme.json settings.typography defaults. */
	--cs-font-body: var(--wp--preset--font-family--ui-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
	--cs-font-heading: var(--wp--preset--font-family--ui-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
	--cs-body-font-weight: 300;
	--cs-body-line-height: 1.78;
	--cs-paragraph-line-height: 1.82;
	--cs-list-line-height: 1.72;
	--cs-heading-letter-spacing: -0.055em;
	--cs-heading-line-height: 0.96;
	--cs-heading-scale: 1;
	--cs-focus-ring: 2px solid color-mix(in srgb, var(--cs-color-primary) 26%, white);
	--cs-focus-offset: 3px;
	--cs-button-bg: color-mix(in srgb, var(--cs-color-primary) 94%, var(--cs-color-text));
	--cs-button-bg-strong: color-mix(in srgb, var(--cs-color-primary) 72%, var(--cs-color-text));
	--cs-motion-duration-fast: 170ms;
	--cs-motion-duration-medium: 220ms;
	--cs-motion-duration-slow: 420ms;
	--cs-motion-hover-lift: -0.5px;
}

html,
body,
.wp-site-blocks {
	overflow-x: clip;
}

html.has-codex-smooth-scroll {
	scroll-behavior: smooth;
}

html.cs-motion-level-subtle {
	--cs-motion-duration-fast: 120ms;
	--cs-motion-duration-medium: 170ms;
	--cs-motion-duration-slow: 300ms;
	--cs-motion-hover-lift: -0.25px;
}

html.cs-motion-level-balanced {
	--cs-motion-duration-fast: 170ms;
	--cs-motion-duration-medium: 220ms;
	--cs-motion-duration-slow: 420ms;
	--cs-motion-hover-lift: -0.5px;
}

html.cs-motion-level-expressive {
	--cs-motion-duration-fast: 220ms;
	--cs-motion-duration-medium: 280ms;
	--cs-motion-duration-slow: 520ms;
	--cs-motion-hover-lift: -1px;
}

html:not(.has-cs-motion-hover) {
	--cs-motion-hover-lift: 0px;
}

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

	html.has-cs-motion,
	html.has-cs-motion-reduced {
		--cs-motion-duration-fast: 0ms;
		--cs-motion-duration-medium: 0ms;
		--cs-motion-duration-slow: 0ms;
		--cs-motion-hover-lift: 0px;
	}
}

@media (min-width: 1024px) {
	:root {
		--cs-shell-padding-inline: clamp(60px, 4vw, 88px);
	}
}

.cs-shell,
.cs-container,
.cs-container-base,
.cs-shell--base,
.cs-container--base,
.cs-container--content,
.cs-shell--content {
	width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-section {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.cs-section.cs-shell,
.cs-section.cs-container,
.cs-section.cs-container-base,
.cs-section.cs-shell--base,
.cs-section.cs-container--base,
.cs-section.cs-container--content,
.cs-section.cs-shell--content {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.cs-section.cs-container-wide,
.cs-section.cs-shell--wide,
.cs-section.cs-container--wide,
.cs-section.cs-container-full,
.cs-section.cs-shell--full,
.cs-section.cs-container--full {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.cs-container-wide,
.cs-shell--wide,
.cs-container--wide {
	width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-container-text,
.cs-shell--text,
.cs-container--text,
.cs-container--reading,
.cs-shell--reading,
.cs-container--narrow,
.cs-shell--narrow {
	width: var(--cs-shell-reading);
	margin-inline: auto;
}

.cs-container-full,
.cs-shell--full,
.cs-container--full {
	width: var(--cs-shell-full);
	max-width: none;
	margin-inline: auto;
}

.wp-site-blocks > .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	width: var(--cs-shell-content);
}

.wp-site-blocks > .is-layout-constrained > .alignwide {
	width: var(--cs-shell-content);
}

.cs-section.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	width: 100%;
	max-width: 100%;
}

.cs-page-content-shell {
	width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-page-content-shell > * {
	width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-page-content-shell > .wp-block-codex-slate-image-slider.cs-image-slider--contained,
.cs-page-content-shell > .cs-image-slider.cs-image-slider--contained {
	width: 100%;
	margin-inline: 0;
}

.cs-page-content-shell > :where(
	p,
	ul,
	ol,
	dl,
	blockquote,
	pre,
	table,
	.wp-block-table,
	.wp-block-verse,
	.wp-block-code,
	.wp-block-preformatted,
	.wp-block-pullquote,
	.wp-block-quote,
	.wp-block-details
) {
	width: var(--cs-shell-reading);
}

.cs-page-content-shell > * + * {
	margin-top: var(--cs-rhythm-content);
}

.cs-page-content-shell > .alignwide {
	width: var(--cs-shell-content);
}

.cs-page-content-shell > .alignfull {
	width: 100vw;
	width: 100dvw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
	margin-inline: calc(50% - 50dvw);
}

.cs-page-content-shell > .cs-home-editorial-composition {
	width: 100%;
	max-width: var(--cs-shell-full);
	margin-inline: auto;
}

.cs-page-content-shell > .cs-home-editorial-composition > .alignwide {
	width: var(--cs-shell-content);
	max-width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-page-content-shell > .cs-home-editorial-composition > .alignfull,
.cs-page-content-shell > .cs-home-editorial-composition > .wp-block-codex-slate-image-slider,
.cs-page-content-shell > .cs-home-editorial-composition > .cs-image-slider,
.cs-page-content-shell > .cs-home-editorial-composition > .wp-block-codex-slate-immersive-cta {
	width: 100vw;
	width: 100dvw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
	margin-inline: calc(50% - 50dvw);
}

.cs-view-main {
	width: 100%;
	display: grid;
	row-gap: var(--cs-page-section-gap);
}

.cs-view-main > * {
	margin-block: 0;
}

/* Override Gutenberg flow gap (often 48px) between sibling sections in page main wrappers. */
.cs-view-main.is-layout-flow > * + *,
.cs-view-main.wp-block-group-is-layout-flow > * + * {
	margin-block-start: 0;
}

.cs-view-main:not(.cs-home-main) > .cs-view-hero-shell:first-child {
	min-height: clamp(19rem, 50vh, 33rem);
	padding-top: clamp(1.6rem, 3vw, 2.6rem);
	padding-bottom: clamp(2.1rem, 4vw, 3rem);
	display: flex;
	align-items: flex-end;
	background:
		radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--cs-color-accent-soft) 52%, transparent), transparent 52%),
		linear-gradient(
			180deg,
			color-mix(in srgb, var(--cs-color-surface-muted) 74%, var(--cs-color-bg)),
			color-mix(in srgb, var(--cs-color-bg) 92%, var(--cs-color-surface-muted))
		);
	border-bottom: 1px solid color-mix(in srgb, var(--cs-color-border) 72%, var(--cs-color-surface));
}

.cs-view-content-shell > .wp-block-post-content {
	max-width: 100%;
}

/* Keep the home composition full width so section-side padding matches the immersive hero shell. */
.cs-home-main .cs-view-content-shell > .cs-page-content-shell {
	width: 100%;
	max-width: none;
}

.cs-home-main .cs-page-content-shell > .cs-home-editorial-composition > .cs-section {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.cs-home-main .cs-page-content-shell > .cs-section {
	width: 100%;
	max-width: var(--cs-shell-full);
	margin-inline: auto;
}

/* Mirror home envelope sizing on services archive and quote surfaces. */
.cs-services-archive-main > .cs-view-content-shell,
.cs-services-archive-main > .cs-view-list-shell,
.cs-services-archive-main > .cs-view-closing-shell,
.cs-quote-main > .cs-view-content-shell,
.cs-quote-main > .cs-block-quote-request {
	width: 100%;
	max-width: var(--cs-shell-full);
	margin-inline: auto;
}

/* Keep service single sections aligned with the same outer shell envelope. */
.cs-service-single-main > .cs-view-media-shell,
.cs-service-single-main > .cs-view-meta-shell,
.cs-service-single-main > .cs-view-content-shell,
.cs-service-single-main > .cs-view-closing-shell {
	width: 100%;
	max-width: var(--cs-shell-full);
	margin-inline: auto;
}

.cs-services-archive-main .cs-view-content-shell > .wp-block-codex-slate-editorial-media,
.cs-services-archive-main .cs-view-content-shell > .cs-block-editorial-media {
	width: var(--cs-shell-full) !important;
	max-width: var(--cs-shell-full) !important;
	margin-inline: auto;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Ensure editorial-media in services does not reintroduce side margins via container utility classes. */
.cs-services-archive-main .cs-view-content-shell > .wp-block-codex-slate-editorial-media.cs-section.cs-container-wide,
.cs-services-archive-main .cs-view-content-shell > .cs-block-editorial-media.cs-section.cs-container-wide {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

/* Match services grid wrapper behavior to editorial-media: no extra side margins in archive view. */
.cs-services-archive-main .cs-view-list-shell > .cs-services-archive-query-shell.cs-container-wide,
.cs-services-archive-main .cs-view-list-shell > .wp-block-group.cs-services-archive-query-shell.cs-container-wide,
.cs-services-archive-main .cs-view-list-shell > .cs-services-archive-query-shell > .wp-block-codex-slate-services-grid.cs-section.cs-container-wide,
.cs-services-archive-main .cs-view-list-shell > .cs-services-archive-query-shell > .cs-block-services-grid.cs-section.cs-container-wide {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

.cs-services-archive-main .cs-view-content-shell > .wp-block-codex-slate-editorial-media > .cs-editorial-media__content,
.cs-services-archive-main .cs-view-content-shell > .wp-block-codex-slate-editorial-media > .cs-editorial-media__visual,
.cs-services-archive-main .cs-view-content-shell > .cs-block-editorial-media > .cs-editorial-media__content,
.cs-services-archive-main .cs-view-content-shell > .cs-block-editorial-media > .cs-editorial-media__visual {
	min-width: 0;
	width: 100%;
	max-width: none;
}

.cs-view-hero-shell > .cs-page-hero,
.cs-view-hero-shell > .cs-context-hero {
	width: var(--cs-shell-content);
	margin-inline: auto;
}

.cs-view-meta-shell > .cs-single-meta,
.cs-view-meta-shell > .cs-services-archive-note-shell {
	margin-inline: auto;
	width: var(--cs-shell-content);
}

.cs-view-media-shell > .cs-page-featured-image,
.cs-view-list-shell > .wp-block-query,
.cs-view-list-shell > .cs-services-archive-query-shell,
.cs-view-closing-shell.cs-service-single-cta-shell,
.cs-view-closing-shell > .cs-service-single-cta-shell {
	margin-inline: auto;
	width: var(--cs-shell-full);
}

.cs-view-closing-shell {
	width: 100%;
	max-width: none;
}

.cs-view-closing-shell > .alignfull,
.cs-view-closing-shell > .wp-block-codex-slate-immersive-cta.alignfull,
.cs-view-closing-shell > .wp-block-codex-slate-service-cta.alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

.cs-view-content-shell > .cs-page-content-shell > :first-child {
	margin-top: 0;
}

.cs-view-content-shell > .cs-page-content-shell > :last-child {
	margin-bottom: 0;
}

.cs-view-content-shell > .cs-page-content-shell > .cs-section:first-child,
.cs-home-content-shell > .cs-section:first-child {
	padding-top: 0;
}

.cs-view-content-shell > .cs-page-content-shell > .cs-section + .cs-section {
	margin-top: var(--cs-rhythm-section);
}

.cs-home-content-shell > * {
	margin-top: 0;
	margin-bottom: 0;
}

.cs-home-content-shell > * + * {
	margin-top: var(--cs-rhythm-section-loose);
}

.cs-home-content-shell > .alignwide,
.cs-home-content-shell > .alignfull {
	max-width: none;
}

.cs-home-content-shell > .alignwide {
	width: var(--cs-shell-content);
}

.cs-home-content-shell > .alignfull {
	width: 100%;
}

.cs-section {
	padding-block: clamp(2.8rem, 4.8vw, 4.6rem);
	box-sizing: border-box;
}

.cs-section > :where(
	.cs-section-block,
	.wp-block-group,
	.wp-block-columns,
	.wp-block-query,
	.wp-block-cover,
	.wp-block-media-text
) {
	width: min(100%, var(--cs-layout-full));
	max-width: min(100%, var(--cs-layout-full));
	margin-inline: auto;
}

.cs-section > .alignfull {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.cs-section > .wp-block-group,
.cs-section > .wp-block-columns,
.cs-section > .wp-block-query,
.cs-section > .wp-block-cover,
.cs-section > .wp-block-media-text {
	margin-top: 0;
	margin-bottom: 0;
}

.cs-section > * + * {
	margin-top: var(--cs-rhythm-section-tight);
}

.cs-section > .cs-section-head + .wp-block-columns,
.cs-section > .cs-section-head + .wp-block-query,
.cs-section > .cs-section-head + .wp-block-group {
	margin-top: var(--cs-rhythm-section);
}

.cs-section--tight {
	padding-block: clamp(1.9rem, 3.1vw, 2.8rem);
}

.cs-section--loose {
	padding-block: clamp(4.2rem, 7vw, 6.8rem);
}

.cs-section-block {
	display: grid;
	row-gap: var(--cs-section-block-gap);
}

.cs-section-block--intro {
	row-gap: var(--cs-section-head-gap);
}

.cs-section-block--cards > .cs-grid {
	gap: var(--cs-block-grid-gap);
}

.cs-section-block > * {
	margin-top: 0;
	margin-bottom: 0;
}

.cs-section-block .cs-section-head--canonical {
	row-gap: var(--cs-section-head-gap);
	max-width: var(--cs-section-head-max);
}

.cs-section-block .cs-section-head--canonical .cs-lead {
	max-width: 60ch;
}

.cs-flow > * + * {
	margin-top: var(--wp--preset--spacing--sm);
}

.cs-stack > * + * {
	margin-top: var(--wp--preset--spacing--md);
}

.cs-stack--sm > * + * {
	margin-top: var(--wp--preset--spacing--sm);
}

.cs-stack--lg > * + * {
	margin-top: var(--wp--preset--spacing--lg);
}

.cs-stack--xl > * + * {
	margin-top: var(--wp--preset--spacing--xl);
}

.cs-grid {
	display: grid;
	gap: clamp(1rem, 1.8vw, 1.6rem);
}

.cs-grid--2 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.cs-grid--3 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.cs-grid--4 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.cs-grid--cards > * {
	height: 100%;
}

.cs-frame {
	border: 1px solid color-mix(in srgb, var(--cs-color-border) 80%, white);
	border-radius: var(--cs-radius-lg);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.82));
	box-shadow: var(--cs-shadow-line);
	min-height: 100%;
}

.cs-section-head {
	display: grid;
	gap: clamp(0.55rem, 0.95vw, 0.95rem);
	max-width: 46rem;
}

.cs-section-head > * {
	margin-top: 0;
	margin-bottom: 0;
}

.cs-section-head--center {
	margin-inline: auto;
	text-align: center;
}

.cs-section-title {
	margin: 0;
	color: var(--cs-color-text);
	font-size: clamp(1.95rem, 3.8vw, 3rem);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1.01;
}

.cs-text-soft,
.cs-muted {
	color: var(--cs-color-text-soft);
}

.cs-text-faint {
	color: var(--cs-color-text-faint);
}

.cs-lead {
	max-width: 64ch;
	font-size: clamp(1.05rem, 1.35vw, 1.22rem);
	line-height: 1.8;
}

.cs-section-head > :where(p:last-child, .wp-block-paragraph:last-child) {
	max-width: 54ch;
}

.cs-anchor {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--cs-color-text-faint);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cs-anchor::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 1px;
	background: color-mix(in srgb, var(--cs-color-primary) 24%, var(--cs-color-border));
}

@media (min-width: 782px) {
	.cs-grid--2,
	.cs-grid--services {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.cs-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.cs-stack--xl > * + * {
		margin-top: clamp(2.5rem, 4vw, 3rem);
	}
}

@media (max-width: 781px) {
	.cs-view-main:not(.cs-home-main) > .cs-view-hero-shell:first-child {
		min-height: clamp(16rem, 46vh, 24rem);
		padding-top: clamp(1rem, 4.2vw, 1.45rem);
		padding-bottom: clamp(1.4rem, 5.8vw, 2rem);
	}

	.cs-page-content-shell {
		width: min(100% - (var(--cs-gutter) * 2), 100%);
	}

	.cs-page-content-shell > * {
		width: 100%;
	}

	.cs-page-content-shell > .alignfull {
		width: 100%;
		margin-inline: 0;
	}
}
