/* AB Realtor — supplemental styles beyond theme.json.
   Implements DESIGN.md: Primary #1E5A8A / Accent #F2A93B, Playfair Display
   headings over Inter body, 8px radii, 8px spacing scale.

   Color rules of thumb:
   - Primary carries identity AND action (links, nav, primary buttons, eyebrows).
   - Accent is a spark, never a field: gold reads at 1.99:1 on white, so it is
     only ever a background (under #1C2530 text) or a decorative rule — never
     small text on a light surface. */

/* ---------- Header: frosted glass overlay ---------- */
/* Sticky must live on the template-part wrapper: .ab-header's own parent is
   exactly its own height, so sticky on .ab-header itself never engages. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 90;
}

.ab-header {
	position: relative;
	border-bottom: 1px solid var(--wp--preset--color--outline);
}

/* Frosted glass lives on a pseudo-element: backdrop-filter on the header
   itself would make it the containing block for the fixed fullscreen
   mobile-menu overlay, clipping the overlay to the header strip. */
.ab-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.ab-header .wp-block-navigation a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	font-size: 0.9375rem;
	letter-spacing: 0.01em;
	text-decoration: none;
	padding-bottom: 6px;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ab-header .wp-block-navigation a:hover,
.ab-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary-deep);
	border-bottom-color: var(--wp--preset--color--accent);
}

/* The mobile overlay paints Primary Dark, so links invert to white there. */
.ab-header .wp-block-navigation__responsive-container.is-menu-open a,
.ab-header .wp-block-navigation__responsive-container.is-menu-open a:hover {
	color: var(--wp--preset--color--base);
	border-bottom-color: transparent;
}

.ab-brand-name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	line-height: 1.1;
}

.ab-brand-tag {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---------- Buttons ----------
   Primary lives in theme.json. Secondary and Ghost are defined here. */

/* Secondary: transparent, 2px Primary border, Primary text. */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-tint);
	border-color: var(--wp--preset--color--primary-deep);
	color: var(--wp--preset--color--primary-deep);
}

/* Accent CTA: gold fill under Text ink (7.8:1) — gold never carries text. */
.ab-btn-accent .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.ab-btn-accent .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--contrast);
}

/* Ghost / link-style button: no background, Primary text. */
.ab-btn-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	padding-left: 0;
	padding-right: 0;
	text-decoration: underline;
}

.ab-btn-ghost .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--primary-deep);
}

/* Buttons on Primary Dark surfaces.
   A Primary-filled button on the Primary Depth gradient is nearly invisible
   (1.5:1 against the light end), so solid buttons flip to Accent — gold holds
   3.7:1 against the gradient and 7.8:1 under its own ink text. */
.ab-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.ab-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--contrast);
}

.ab-on-dark .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.6);
	color: #ffffff;
}

.ab-on-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #ffffff;
	color: #ffffff;
}

/* ---------- Label / eyebrow (13px, 600, uppercase, 0.08em) ---------- */
.ab-eyebrow {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.ab-on-dark .ab-eyebrow {
	color: #ffffff;
}

/* Topic links inside eyebrows read as labels, not body links. */
.ab-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.ab-eyebrow a:hover {
	text-decoration: underline;
}

/* ---------- Cards ---------- */
.ab-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ab-card:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--modal);
}

.ab-card a {
	text-decoration: none;
}

/* Inline links inside card copy must not rely on color alone (WCAG 1.4.1). */
.ab-card p a {
	text-decoration: underline;
}

/* Large panels and feature imagery use the 16px radius. */
.ab-radius-lg,
.ab-radius-lg img {
	border-radius: var(--wp--custom--radius--lg);
}

/* ---------- Badges (accent chip, ink text) ---------- */
.ab-badge {
	display: inline-block;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.375rem 0.875rem;
	border-radius: var(--wp--custom--radius--sm);
}

/* ---------- Hero ---------- */
.ab-hero {
	position: relative;
	overflow: hidden;
}

.ab-hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(30, 90, 138, 0.18);
	border-radius: var(--wp--custom--radius--sm);
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* ---------- Hero photo slider ----------
   Slides are stacked in a fixed 4:3 box and crossfaded, so the hero never
   reflows between photos. Without JS the first slide alone is visible and no
   controls exist (they are injected by hero-slider.js). */
.ab-hslider {
	position: relative;
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
	box-shadow: var(--wp--custom--shadow--modal);
	background: var(--wp--preset--color--tertiary);
}

.ab-hslider-viewport {
	position: relative;
	aspect-ratio: 4 / 3;
}

.ab-hslide {
	margin: 0;
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.7s ease;
}

.ab-hslide.is-active {
	opacity: 1;
}

.ab-hslide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Reduced motion: swap instantly rather than crossfade. */
.ab-hslider.is-instant .ab-hslide {
	transition: none;
}

/* Browsers without aspect-ratio fall back to a padding box. */
@supports not (aspect-ratio: 4 / 3) {
	.ab-hslider-viewport {
		padding-top: 75%;
	}
}

/* --- controls (present only once JS enhances the slider) --- */
.ab-hslider-arrow,
.ab-hslider-toggle {
	display: none;
}

.ab-hslider.is-enhanced .ab-hslider-arrow,
.ab-hslider.is-enhanced .ab-hslider-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	color: #ffffff;
	background: rgba(28, 37, 48, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background 0.15s ease;
}

.ab-hslider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	padding: 0;
	z-index: 2;
}

.ab-hslider-arrow svg {
	width: 22px;
	height: 22px;
}

.ab-hslider-prev { left: 12px; }
.ab-hslider-next { right: 12px; }
.ab-hslider-next svg { transform: rotate(180deg); }

.ab-hslider-arrow:hover,
.ab-hslider-toggle:hover {
	background: rgba(28, 37, 48, 0.78);
}

/* The scrim guarantees control contrast over any photo (WCAG 1.4.11). */
.ab-hslider-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.75rem 0.875rem 0.75rem;
	background: linear-gradient(180deg, rgba(28, 37, 48, 0) 0%, rgba(28, 37, 48, 0.6) 100%);
}

.ab-hslider.is-enhanced .ab-hslider-bar {
	display: flex;
}

.ab-hslider-dots {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.ab-hslider-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.55);
	transition: background 0.15s ease, transform 0.15s ease;
}

.ab-hslider-dot:hover {
	background: rgba(255, 255, 255, 0.85);
}

.ab-hslider-dot[aria-current="true"] {
	background: var(--wp--preset--color--accent);
	transform: scale(1.3);
}

.ab-hslider-toggle {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	padding: 0;
	flex: 0 0 auto;
}

.ab-hslider-toggle svg {
	width: 17px;
	height: 17px;
}

/* Focus must stay visible against photography, hence the dark companion ring. */
.ab-hslider :is(button):focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(28, 37, 48, 0.65);
}

/* Touch targets: the arrows are decorative duplicates of the dots, so on
   narrow screens they give way to the dot row rather than crowd the photo. */
@media (max-width: 480px) {
	.ab-hslider.is-enhanced .ab-hslider-arrow {
		display: none;
	}
}

/* ---------- Hero property search (glass panel) ---------- */
.ab-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	align-items: stretch;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(30, 90, 138, 0.18);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--custom--shadow--modal);
	padding: 1rem;
	margin-top: 2rem;
}

.ab-search label {
	flex: 1 1 140px;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.ab-search select {
	font: inherit;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--wp--preset--color--contrast);
	background: #ffffff;
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 0.625rem 0.75rem;
	width: 100%;
}

.ab-search select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -1px;
}

.ab-search button {
	flex: 1 0 auto;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	color: #ffffff;
	background: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--md);
	padding: 0.75rem 1.5rem;
	cursor: pointer;
	transition: background 0.15s ease;
	align-self: flex-end;
	min-height: 42px;
}

.ab-search button:hover {
	background: var(--wp--preset--color--primary-deep);
	border-color: var(--wp--preset--color--primary-deep);
}

.ab-search-note {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.75rem;
}

/* Stack the search controls on small screens. */
@media (max-width: 640px) {
	.ab-search label,
	.ab-search button {
		flex: 1 1 100%;
	}
}

/* ---------- Accent rules ---------- */
.ab-accent-rule {
	width: 56px;
	height: 3px;
	background: var(--wp--preset--color--accent);
	border: none;
	margin: 0;
}

/* Page/article titles carry their own left-anchored accent rule. */
h1.wp-block-post-title:not(.has-text-align-center)::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	background: var(--wp--preset--color--accent);
	margin-top: 1.125rem;
}

/* Balanced headline wrapping (avoids widows in multi-line headings). */
h1, h2, h3 {
	text-wrap: balance;
}

/* ---------- Lifestyle photo band ---------- */
.ab-life-img img {
	width: 100%;
	height: auto;
	display: block;
}

.ab-life-img .wp-element-caption {
	text-align: center;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-top: 0.75rem;
}

/* ---------- Promise cards (commitment quotes) ---------- */
.ab-promise {
	border-top: 3px solid var(--wp--preset--color--accent);
}

.ab-promise-quote {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Stats ---------- */
.ab-stat-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	line-height: 1.2;
}

.ab-on-dark .ab-stat-number {
	color: #ffffff;
}

/* ---------- Card grids: equal heights, CTAs pinned to the bottom ----------
   Scoped to cards that are a column's first child (the tool-card grids);
   cards stacked under other blocks (e.g. the About contact card) keep
   natural height. The margin overrides cancel the constrained layout's
   auto inline margins, which would otherwise shrink-center flex children.
   Only a card that is alone in its column stretches: a 100% card followed
   by more blocks (the Contact page's "What happens after you write" list)
   pushes them out of the column and under the footer. */
.wp-block-column > .ab-card:first-child {
	display: flex;
	flex-direction: column;
}

.wp-block-column > .ab-card:only-child {
	height: 100%;
}

.wp-block-column > .ab-card:first-child > *,
.ab-archive-card > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.wp-block-column > .ab-card:first-child > .wp-block-buttons {
	/* auto margin pins the CTA to the card bottom but resolves to 0 in the
	   row's tallest card, swallowing the block gap — padding restores it */
	margin-top: auto;
	padding-top: 0.875rem;
}

/* ---------- Archive / query grids ---------- */
.ab-archive-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.ab-archive-card .wp-block-post-excerpt {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.ab-archive-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	padding-top: 0.5rem;
}

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

.ab-archive-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* ---------- Footer ---------- */
.ab-footer a {
	color: rgba(255, 255, 255, 0.88);
	text-decoration: none;
}

.ab-footer a:hover {
	color: #ffffff;
	text-decoration: underline;
}

/* 0.72 alpha keeps the fine print at AA (4.6:1) even against the light
   end of the Primary Depth gradient. */
.ab-footer .ab-fine {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.8125rem;
}

/* ---------- Section stacking ---------- */
/* Full-bleed page sections must sit flush: the global block gap otherwise
   paints base-colored strips between adjacent colored sections and above
   the footer. Inner layouts keep their own gaps. */
.wp-site-blocks > * + *,
main.wp-block-group > * + * {
	margin-block-start: 0;
}

/* ---------- Misc ---------- */
::selection {
	background: var(--wp--preset--color--primary);
	color: #ffffff;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ab-card, .ab-card:hover { transform: none; transition: none; }
}

/* =====================================================================
   v3.2 — conversion layer
   Intent fork, trap cards, micro-market comparison, area cards, process,
   tools grid, FAQ, callouts, market snapshot, mobile contact bar.
   ===================================================================== */

/* Anchor jumps land below the sticky header. */
[id] { scroll-margin-top: 96px; }

/* ---------- Photo hero (replaces the slider) ----------
   A single full-bleed photo with a left-weighted scrim, so white text stays
   readable over the water while the house on the right stays visible. */
.ab-hero--photo {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(560px, 80vh, 780px);
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--80);
	background: var(--wp--preset--color--primary-deep);
	overflow: hidden;
}

.ab-hero--photo .ab-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: 85% 50%;
	z-index: -2;
}

.ab-hero--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(12, 32, 50, 0.92) 0%, rgba(12, 32, 50, 0.84) 45%, rgba(12, 32, 50, 0.45) 66%, rgba(12, 32, 50, 0.08) 88%, rgba(12, 32, 50, 0) 100%);
}

.ab-hero--photo .ab-hero-inner > * {
	max-width: 620px;
	margin-left: 0 !important;
}

.ab-hero--photo h1 {
	color: #ffffff;
	margin-top: 1.25rem;
	text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

.ab-hero-lede {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.125rem;
	line-height: 1.6;
}

.ab-hero--photo .ab-hero-kicker {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
	color: #ffffff;
}

.ab-hero--photo .ab-fork-note {
	color: rgba(255, 255, 255, 0.85);
}

.ab-hero--photo .ab-fork-note a {
	color: #ffffff;
}

@media (max-width: 781px) {
	.ab-hero--photo {
		min-height: 0;
	}

	.ab-hero--photo::before {
		background: linear-gradient(180deg, rgba(12, 32, 50, 0.82) 0%, rgba(12, 32, 50, 0.9) 100%);
	}
}

/* ---------- Lifestyle photo mosaic ---------- */
.ab-photos {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	grid-template-rows: repeat(2, clamp(180px, 20vw, 280px));
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--50);
}

.ab-photo {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--tertiary);
}

.ab-photo--lead {
	grid-row: span 2;
}

.ab-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.ab-photo:hover img {
	transform: scale(1.04);
}

.ab-photo figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 2.5rem 1rem 0.875rem;
	background: linear-gradient(180deg, rgba(12, 32, 50, 0) 0%, rgba(12, 32, 50, 0.78) 100%);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.9375rem;
}

.ab-photos .ab-photo:nth-child(4) { grid-column: 2; }
.ab-photos .ab-photo:nth-child(5) { grid-column: 3; }

@media (max-width: 781px) {
	.ab-photos {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 220px repeat(2, 150px);
	}

	.ab-photo--lead {
		grid-column: span 2;
		grid-row: auto;
	}

	.ab-photos .ab-photo:nth-child(4),
	.ab-photos .ab-photo:nth-child(5) { grid-column: auto; }

	.ab-photos .ab-photo:nth-child(5) { display: none; }
}

/* ---------- Feature image (micro-markets, valuation) ---------- */
.ab-feature-img {
	margin: 0;
}

.ab-feature-img img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--custom--shadow--modal);
}

.ab-feature-img figcaption {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.75rem;
}

/* ---------- Hero intent fork (replaces the search bar) ---------- */
.ab-fork {
	display: grid;
	gap: 0.625rem;
	margin-top: 1.75rem;
}

.ab-fork-item {
	position: relative;
	display: block;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--md);
	padding: 0.95rem 3rem 0.95rem 1.25rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--custom--shadow--card);
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ab-fork-item::after {
	content: "→";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.25rem;
	color: var(--wp--preset--color--primary);
	transition: transform 0.15s ease;
}

.ab-fork-item:hover,
.ab-fork-item:focus-visible {
	border-color: var(--wp--preset--color--primary);
	border-left-color: var(--wp--preset--color--accent);
	box-shadow: var(--wp--custom--shadow--modal);
	transform: translateY(-1px);
}

.ab-fork-item:hover::after { transform: translate(4px, -50%); }

.ab-fork-label {
	display: block;
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.35;
}

.ab-fork-text {
	display: block;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.125rem;
}

.ab-fork-note {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.875rem;
}

/* ---------- Trap cards ---------- */
.ab-traps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.ab-trap {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.75rem 1.5rem;
}

.ab-trap-num {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--wp--preset--color--accent);
	width: max-content;
}

.ab-trap h3 {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0.25rem 0 0.5rem;
}

.ab-trap p {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
	margin: 0 0 1rem;
}

.ab-trap > a {
	margin-top: auto;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ab-trap--cta {
	background: var(--wp--preset--gradient--primary-depth);
	border-color: transparent;
	color: #ffffff;
	justify-content: center;
}

.ab-trap--cta h3 { color: #ffffff; }
.ab-trap--cta p { color: rgba(255, 255, 255, 0.85); }

.ab-trap-btn {
	align-self: flex-start;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--wp--custom--radius--md);
	padding: 0.75rem 1.25rem;
}

.ab-trap-btn:hover { background: var(--wp--preset--color--accent-deep); }

/* ---------- Comparison tables (homepage pockets + page content) ---------- */
.ab-compare,
figure.wp-block-table.ab-compare {
	margin: 0;
}

.ab-compare table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	overflow: hidden;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.ab-compare th,
.ab-compare td {
	text-align: left;
	vertical-align: top;
	padding: 0.875rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--outline);
}

.ab-compare tr:last-child th,
.ab-compare tr:last-child td { border-bottom: 0; }

.ab-compare thead th {
	background: var(--wp--preset--color--primary-deep);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.9375rem;
}

.ab-compare thead th span {
	display: block;
	font-weight: 400;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.78);
}

.ab-compare tbody th {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	white-space: nowrap;
}

.ab-compare tbody tr:nth-child(even) { background: var(--wp--preset--color--tertiary); }

.ab-compare figcaption,
.ab-compare .wp-element-caption {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.625rem;
	text-align: left;
}

@media (max-width: 781px) {
	.ab-compare { overflow-x: auto; }
	.ab-compare table { min-width: 560px; }
	.ab-compare tbody th { white-space: normal; }
}

/* ---------- Checkmark list ---------- */
.ab-checks {
	list-style: none;
	padding-left: 0;
}

.ab-checks li {
	position: relative;
	padding-left: 1.875rem;
	margin-bottom: 0.75rem;
}

.ab-checks li::before {
	content: "";
	position: absolute;
	left: 0.25rem;
	top: 0.45em;
	width: 0.5rem;
	height: 0.9rem;
	border: solid var(--wp--preset--color--primary);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

.ab-portrait img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* ---------- Area cards ---------- */
.ab-areas {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.ab-area {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.5rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ab-area:hover,
.ab-area:focus-visible {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--modal);
}

.ab-area h3 {
	font-size: 1.375rem;
	margin: 0 0 0.375rem;
}

.ab-area h3::after {
	content: " →";
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
}

.ab-area p {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
	margin: 0 0 0.75rem;
}

.ab-area-trade {
	margin-top: auto !important;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wp--preset--color--outline);
	color: var(--wp--preset--color--contrast) !important;
	font-size: 0.9375rem !important;
}

.ab-area-trade span {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* ---------- Process steps ---------- */
.ab-process {
	list-style: none;
	counter-reset: ab-step;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	padding: 0;
	margin: var(--wp--preset--spacing--50) auto 0;
}

.ab-process li {
	counter-increment: ab-step;
	position: relative;
	padding-top: 3.5rem;
}

.ab-process li::before {
	content: counter(ab-step);
	position: absolute;
	top: 0;
	left: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.125rem;
}

.ab-process li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 1.25rem;
	left: 3.25rem;
	right: calc(-1 * var(--wp--preset--spacing--40) + 0.75rem);
	height: 2px;
	background: var(--wp--preset--color--outline);
}

.ab-process h3 {
	font-size: 1.1875rem;
	line-height: 1.3;
	margin: 0 0 0.375rem;
}

.ab-process p {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
	margin: 0;
}

.ab-process-note {
	text-align: center;
	margin-top: var(--wp--preset--spacing--50);
	color: var(--wp--preset--color--muted);
}

/* Ordered steps inside page content. */
ol.ab-steps {
	list-style: none;
	counter-reset: ab-step;
	padding-left: 0;
}

ol.ab-steps > li {
	counter-increment: ab-step;
	position: relative;
	padding: 0 0 1.25rem 3.25rem;
	min-height: 2.25rem;
}

ol.ab-steps > li::before {
	content: counter(ab-step);
	position: absolute;
	left: 0;
	top: -0.125rem;
	width: 2.25rem;
	height: 2.25rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary-tint);
	color: var(--wp--preset--color--primary-deep);
	font-weight: 700;
}

/* ---------- Tools grid ---------- */
.ab-tools-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.ab-tool-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.5rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ab-tool-card:hover,
.ab-tool-card:focus-visible {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--modal);
}

.ab-tool-kind {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.ab-tool-card h3,
.ab-tool-card .ab-tool-h {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0.375rem 0;
}

.ab-tool-card h3::after,
.ab-tool-card .ab-tool-h::after {
	content: " →";
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
}

.ab-tool-card p {
	font-size: 1rem;
	color: var(--wp--preset--color--muted);
	margin: 0;
}

/* ---------- FAQ (core details blocks) ---------- */
.ab-faq > .wp-block-details {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 0;
	margin: 0 0 0.625rem !important;
}

.ab-faq > .wp-block-details summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	font-weight: 600;
	font-size: 1.0625rem;
	padding: 1.125rem 3rem 1.125rem 1.25rem;
}

.ab-faq > .wp-block-details summary::-webkit-details-marker { display: none; }

.ab-faq > .wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--wp--preset--color--primary);
}

.ab-faq > .wp-block-details[open] summary::after { content: "–"; }

.ab-faq > .wp-block-details summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: var(--wp--custom--radius--md);
}

.ab-faq > .wp-block-details > :not(summary) {
	padding: 0 1.25rem;
	color: var(--wp--preset--color--muted);
}

.ab-faq > .wp-block-details > :last-child { padding-bottom: 1.125rem; }

/* ---------- Callout box (page content CTAs, key notes) ---------- */
.ab-callout {
	background: var(--wp--preset--color--accent-tint);
	border: 1px solid #f2ddb8;
	border-left: 4px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--md);
	padding: clamp(1.25rem, 3vw, 2rem) !important;
}

.ab-callout .ab-lf { box-shadow: none; }

/* ---------- Market snapshot (ab_market_snapshot) ---------- */
.ab-snapshot {
	margin: var(--wp--preset--spacing--40) 0 0;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.25rem;
}

.ab-snapshot-head { display: grid; gap: 0.125rem; margin-bottom: 0.75rem; }
.ab-snapshot-head strong { font-family: var(--wp--preset--font-family--heading); font-size: 1.25rem; }
.ab-snapshot-meta { font-size: 0.8125rem; color: var(--wp--preset--color--muted); }
.ab-snapshot-scroll { overflow-x: auto; }

.ab-snapshot table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 620px; }
.ab-snapshot th, .ab-snapshot td { text-align: right; padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--wp--preset--color--outline); white-space: nowrap; }
.ab-snapshot th:first-child { text-align: left; }
.ab-snapshot thead th { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--wp--preset--color--muted); white-space: normal; vertical-align: bottom; }
.ab-snapshot-note { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 0.75rem 0 0; }

/* ---------- Mobile contact bar ---------- */
.ab-mobile-bar { display: none; }

@media (max-width: 781px) {
	.ab-mobile-bar {
		display: grid;
		grid-template-columns: 1fr 1fr 1.4fr;
		gap: 0.5rem;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 95;
		padding: 0.5rem 0.625rem calc(0.5rem + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.94);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--wp--preset--color--outline);
		box-shadow: 0 -4px 16px rgba(28, 37, 48, 0.08);
	}

	.ab-mobile-bar a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 2.875rem;
		border-radius: var(--wp--custom--radius--md);
		font-weight: 600;
		font-size: 0.9375rem;
		text-decoration: none;
		color: var(--wp--preset--color--primary);
		border: 2px solid var(--wp--preset--color--primary);
		background: #ffffff;
	}

	.ab-mobile-bar a.is-primary {
		background: var(--wp--preset--color--primary);
		color: #ffffff;
	}

	/* Keep the footer's last line clear of the fixed bar. */
	.wp-site-blocks { padding-bottom: 4.25rem; }

	/* Mobile-first layouts for the new grids. */
	.ab-traps,
	.ab-areas,
	.ab-tools-grid,
	.ab-process { grid-template-columns: 1fr; }

	.ab-process li:not(:last-child)::after { display: none; }

	/* The header phone button duplicates the bar on small screens. */
	.ab-header .ab-btn-accent { display: none; }
}

@media (min-width: 782px) and (max-width: 1100px) {
	.ab-traps,
	.ab-areas,
	.ab-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ab-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ab-process li::after { display: none; }
}

@media print {
	.ab-mobile-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.ab-fork-item, .ab-fork-item::after, .ab-area, .ab-tool-card { transition: none; transform: none !important; }
}
