/*
Theme Name: Ennis Builders
Theme URI: https://www.ennisteam.com
Author: Ennis Builders & Realtors
Description: Block theme for Ennis Builders & Realtors. Every page is built from normal WordPress blocks, so text, photos, buttons and menus are all editable in the WordPress editor (Appearance → Editor for the header, footer and menus; Pages for page content).
Version: 1.26.8
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: Proprietary — Ennis Builders & Realtors
Text Domain: ennis-builders
*/

/* Small touches theme.json can't express. Keep this file short. */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }

/* ---------- Header ---------- */
.ennis-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .ennis-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ennis-header { top: 0; position: relative; } }

.ennis-header .wp-block-site-logo img { max-height: 54px; width: auto; }
.ennis-header .wp-block-navigation .wp-block-navigation-item__content { padding: 0.4rem 0; }
.ennis-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--night) !important;
	color: #fff !important;
	border: 1px solid rgba(255,255,255,0.12) !important;
	border-radius: 6px;
	padding: 0.4rem 0;
	min-width: 230px;
	box-shadow: var(--wp--preset--shadow--lift);
}
.ennis-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1.1rem;
}
.ennis-header .wp-block-navigation-item__content:hover,
.ennis-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--brand) !important; }
.ennis-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--night) !important;
	color: #fff !important;
	padding: 1.5rem;
}
.ennis-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important; box-shadow: none; padding-left: 1rem;
}
.ennis-phone a { color: #fff; text-decoration: none; white-space: nowrap; }
.ennis-phone a:hover { color: var(--wp--preset--color--brand); }
@media (max-width: 1100px) { .ennis-header .ennis-hide-tablet { display: none !important; } }
@media (max-width: 600px) { .ennis-header .ennis-hide-mobile { display: none !important; } }
/* Tablets: the full menu doesn't fit on one line below ~900px, so use the ☰ menu button up to 959px
   (WordPress on its own only switches below 600px). */
@media (min-width: 600px) and (max-width: 959px) {
	.ennis-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ennis-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.ennis-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
}

/* ---------- Text helpers (pick these as block "Styles" in the editor) ---------- */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.85rem !important;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-dark);
}
.has-night-background-color .is-style-eyebrow,
.has-ink-background-color .is-style-eyebrow,
.wp-block-cover .is-style-eyebrow { color: var(--wp--preset--color--brand); }

.is-style-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }

/* Checklist with green checks */
ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist li { position: relative; padding-left: 1.9rem; margin-bottom: 0.55rem; }
ul.is-style-checklist li::before {
	content: ""; position: absolute; left: 0; top: 0.35em;
	width: 1.15rem; height: 1.15rem; border-radius: 50%;
	background: var(--wp--preset--color--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Numbered steps list */
ol.is-style-steps { list-style: none; padding-left: 0; counter-reset: step; }
ol.is-style-steps li { counter-increment: step; position: relative; padding-left: 3.4rem; margin-bottom: 1.4rem; min-height: 2.4rem; }
ol.is-style-steps li::before {
	content: counter(step); position: absolute; left: 0; top: -0.1rem;
	width: 2.4rem; height: 2.4rem; border-radius: 50%;
	display: grid; place-items: center;
	font-family: var(--wp--preset--font-family--heading); font-weight: 700;
	background: var(--wp--preset--color--ink); color: var(--wp--preset--color--brand);
}

/* ---------- Cards ---------- */
.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	box-shadow: var(--wp--preset--shadow--soft);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.is-style-card:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--lift); }
.is-style-card > .wp-block-image:first-child { margin-top: 0; }
.is-style-card > .wp-block-image:first-child img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.is-style-card .wp-block-buttons { margin-top: auto; }

/* Equal-height cards in a row */
.wp-block-columns .wp-block-column > .is-style-card { height: 100%; display: flex; flex-direction: column; }

/* Photo with rounded corners */
.wp-block-image.is-style-photo img { border-radius: 10px; box-shadow: var(--wp--preset--shadow--soft); }

/* Stats band numbers */
.ennis-stat-number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--brand);
	font-variant-numeric: tabular-nums;
}
/* Real number for screen readers while the visible digits count up */
.ennis-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Full-width page sections sit flush against each other (no white strips between them) */
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }
main > .wp-block-post-content:last-child { margin-bottom: 0; }

/* Cover hero tweaks */
.wp-block-cover.is-style-hero h1 { text-wrap: balance; }
/* Keep hero text lined up with the page content even when the text is placed bottom-left */
.wp-block-cover.is-style-hero.has-custom-content-position .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: var(--wp--style--global--wide-size, 1240px) !important;
	margin-inline: auto !important;
}
.wp-block-cover .wp-block-cover__inner-container > *:last-child { margin-bottom: 0; }

/* Galleries: tidy square crops */
.wp-block-gallery.is-style-tidy .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

/* FAQ (Details block) */
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600; font-size: 1.1rem; cursor: pointer; list-style: none; position: relative; padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: 0; top: -0.1rem; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--brand-dark);
}
.wp-block-details[open] summary::after { content: "–"; }

/* Floor plan / PDF file links */
.wp-block-file { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.wp-block-file .wp-block-file__button { font-family: var(--wp--preset--font-family--heading); }

/* Contact form wrapper (BuilderTrend) */
.ennis-form-card iframe, #btIframe { width: 100%; min-height: 660px; border: 0; background: transparent; }

/* Footer */
.ennis-footer a { color: #fff; text-decoration: none; }
.ennis-footer a:hover { color: var(--wp--preset--color--brand); }
.ennis-footer ul { list-style: none; padding-left: 0; }
.ennis-footer ul li { margin-bottom: 0.45rem; }
.ennis-footer .wp-block-social-links .wp-social-link { background: rgba(255,255,255,0.1) !important; color: #fff !important; }

/* Mobile sticky call bar (added by the Ennis Builders Site plugin) */
.ennis-mobile-bar { display: none; }
@media (max-width: 700px) {
	.ennis-mobile-bar {
		display: grid; grid-template-columns: 1fr 1fr; gap: 0;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		font-family: var(--wp--preset--font-family--heading); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .9rem;
		box-shadow: 0 -4px 16px rgba(0,0,0,.18);
	}
	.ennis-mobile-bar a { display: block; text-align: center; padding: 0.95rem 0.5rem; text-decoration: none; }
	.ennis-mobile-bar a.call { background: var(--wp--preset--color--night); color: #fff; }
	.ennis-mobile-bar a.quote { background: var(--wp--preset--color--brand); color: var(--wp--preset--color--night); }
	body.has-ennis-mobile-bar { padding-bottom: 52px; }
	body.has-ennis-mobile-bar #ennis-chat-bubble { bottom: 70px !important; }
	body.has-ennis-mobile-bar #ennis-ai-chat-panel { bottom: 140px !important; }
}

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

/* ---------- Comparison tables (e.g. Compare all ten plans) ---------- */
.wp-block-table.ennis-compare { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wp-block-table.ennis-compare table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--wp--preset--color--base); font-size: 0.95rem; }
.wp-block-table.ennis-compare th,
.wp-block-table.ennis-compare td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.8rem 1rem; text-align: left; vertical-align: top; }
.wp-block-table.ennis-compare thead th { background: var(--wp--preset--color--night); color: #fff; font-family: var(--wp--preset--font-family--heading); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; border-bottom: 0; }
.wp-block-table.ennis-compare tbody tr:nth-child(even) td { background: var(--wp--preset--color--surface); }
.wp-block-table.ennis-compare td:first-child { font-family: var(--wp--preset--font-family--heading); font-weight: 600; white-space: nowrap; }
.wp-block-table.ennis-compare td:first-child a { color: var(--wp--preset--color--ink); text-decoration: none; }
.wp-block-table.ennis-compare td:first-child a:hover { color: var(--wp--preset--color--brand-dark); text-decoration: underline; }
.wp-block-table.ennis-compare figcaption { font-size: 0.85rem; color: var(--wp--preset--color--muted); margin-top: 0.75rem; text-align: left; }


/* ==========================================================================
   Polish pass (design review): readability, contrast, phone length
   ========================================================================== */

/* Jump links (e.g. a hero button to #contact) land below the sticky header */
[id] { scroll-margin-top: 96px; }

/* Card text: easier reading (audience is 35–70) */
.is-style-card p { font-size: 1rem !important; }

/* Contact form: never cut off the Send button; quieter frame on phones */
.ennis-form-fallback { font-size: 0.9rem; color: var(--wp--preset--color--muted); margin: 0.5rem 0 0; text-align: center; }
@media (max-width: 600px) {
	.ennis-form-card iframe, #btIframe { min-height: 780px; }
	.ennis-form-card { padding: 0.25rem !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
}

/* Contrast: links on black sections use Ennis green (8.7:1), not dark green */
main .has-night-background-color a:not(.wp-element-button),
main .has-ink-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--brand); }
/* Plain links inside a dark hero (e.g. the FAQ "Jump to" line): white with a green underline */
.wp-block-cover.is-dark p:not(.is-style-eyebrow) a:not(.wp-element-button) {
	color: var(--wp--preset--color--base); text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--brand); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
/* Text over photos stays readable on bright skies and concrete */
.wp-block-cover .is-style-eyebrow,
.wp-block-cover p.has-small-font-size { text-shadow: 0 1px 10px rgba(0,0,0,.75); }

/* Section intros above a wide grid line up with the grid's left edge */
.is-layout-constrained > :is(h2, h3, .is-style-eyebrow):not(.has-text-align-center):has(~ .alignwide) {
	max-width: var(--wp--style--global--wide-size) !important;
}
.is-layout-constrained > p:not(.has-text-align-center):not(.is-style-eyebrow):has(~ .alignwide) {
	max-width: var(--wp--style--global--content-size, 720px) !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size, 1240px)) / 2)) !important;
	margin-right: auto !important;
}
/* Button rows in those sections (jump links, "see more") line up with the grid too */
.is-layout-constrained:has(> .alignwide) > .wp-block-buttons:not(.is-content-justification-center) {
	max-width: var(--wp--style--global--wide-size) !important;
}

/* Galleries: a lone last photo stays the same size as the rest */
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { flex-grow: 0; }

/* Team portraits: faces framed the same way */
.is-style-card > .wp-block-image:first-child img[style*="3/4"] { object-position: 50% 18%; }

/* Phones: shorter pages, bigger targets */
@media (max-width: 781px) {
	/* Stats band: 2 x 2 instead of four tall rows */
	.wp-block-columns:has(.ennis-stat-number) { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
	/* Footer: Build and Company side by side */
	.ennis-footer .wp-block-columns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
	.ennis-footer .wp-block-column:first-child,
	.ennis-footer .wp-block-column:last-child { grid-column: 1 / -1; }
	.ennis-footer ul li { margin-bottom: 0; }
	.ennis-footer ul:not(.wp-block-social-links) li a { display: inline-block; padding: 0.5rem 0; }
}
@media (max-width: 600px) {
	/* Photo link cards (services, plans, guides) turn into compact rows: photo left, text right */
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) {
		display: grid; grid-template-columns: 40% 1fr; align-content: start; column-gap: 0;
	}
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > * { grid-column: 2; margin-block-start: 0.35rem !important; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > figure:first-child {
		grid-column: 1; grid-row: 1 / span 4; margin: 0 !important; position: relative; min-height: 128px;
	}
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > figure:first-child img {
		position: absolute; inset: 0; width: 100% !important; height: 100% !important; aspect-ratio: auto; object-fit: cover;
	}
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > h3 { margin-block-start: 0.85rem !important; font-size: 1.05rem !important; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > :is(h3, p) { padding-left: 0.9rem !important; padding-right: 0.75rem !important; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child > a) > p:last-child { margin-bottom: 0.85rem; }
	.wp-block-columns:has(> .wp-block-column.is-style-card) { gap: 0.9rem !important; }
	.wp-block-columns + .wp-block-columns:has(> .wp-block-column.is-style-card) { margin-top: 0.9rem !important; }
	.is-style-card:hover { transform: none; }

	/* Team cards: small portrait left, name / role / contact right, bio toggle across the bottom */
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) {
		display: grid; grid-template-columns: 116px 1fr; column-gap: 0; align-content: start; padding-bottom: 0.5rem !important;
	}
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > * { grid-column: 2; margin-block-start: 0.3rem !important; overflow-wrap: break-word; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > figure:first-child {
		grid-column: 1; grid-row: 1 / span 4; align-self: start; margin: 0 !important;
	}
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > figure:first-child img { aspect-ratio: 4 / 5 !important; height: auto; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > h3 { margin-block-start: 0.8rem !important; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > :is(h3, p, ul) { padding-left: 0.9rem !important; padding-right: 0.75rem !important; font-size: 0.95rem; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > :is(.wp-block-details, ul) { grid-column: 1 / -1; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > ul { padding-left: 2.1rem !important; }
	.wp-block-column.is-style-card:has(> figure.wp-block-image:first-child img[style*="3/4"]) > .is-style-eyebrow { font-size: 0.72rem !important; }

	/* Page headers: shorter, darker toward the bottom where the text sits, full-width buttons */
	.wp-block-cover.is-style-hero { min-height: 320px !important; }
	.wp-block-cover.is-style-hero .wp-block-cover__gradient-background {
		background: linear-gradient(180deg, rgba(10,10,10,.5) 0%, rgba(10,10,10,.82) 100%) !important;
	}
	.wp-block-cover .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.wp-block-cover .wp-block-button, .wp-block-cover .wp-block-button__link { width: 100%; text-align: center; }
}

/* Homepage "family behind every project" row */
.ennis-avatar img { border-radius: 50%; object-position: 50% 18%; box-shadow: var(--wp--preset--shadow--soft); }
.ennis-family-row { gap: 1rem !important; }
@media (max-width: 600px) {
	.ennis-family-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.5rem 0.75rem !important; }
	.ennis-avatar img { width: 104px !important; }
}
/* Plan-grid help tiles */
.ennis-cta-tile:hover { transform: none; }

/* ==========================================================================
   Layout polish: model pages, team, gallery, motion
   ========================================================================== */

/* Header tightens with a soft shadow once the visitor scrolls */
.ennis-header { transition: padding .25s ease, box-shadow .25s ease; }
.ennis-header.is-scrolled { padding-top: 0.45rem !important; padding-bottom: 0.45rem !important; box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.ennis-header .wp-block-site-logo img { transition: max-height .25s ease; }
.ennis-header.is-scrolled .wp-block-site-logo img { max-height: 44px; }

/* Cards and photos fade up as they come into view (only below the first screen) */
.ennis-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.ennis-reveal.is-in { opacity: 1; transform: none; }

/* Linked card photos zoom slightly on hover */
.is-style-card > figure.wp-block-image:first-child { overflow: hidden; }
.is-style-card > figure.wp-block-image:first-child > a img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.is-style-card:hover > figure.wp-block-image:first-child > a img { transform: scale(1.045); }

/* Hero label used as a way back ("ADU plans › ADU 645") */
.wp-block-cover .is-style-eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(119,190,67,.5); }
.wp-block-cover .is-style-eyebrow a:hover { color: #fff; border-color: #fff; }

/* Model pages: "At a glance" fits its contents and comes first on phones */
.wp-block-column > .is-style-card.ennis-glance { height: auto; }
@media (max-width: 781px) {
	.wp-block-column:has(> .ennis-glance) { order: -1; }
}
/* Previous / all plans / next */
.ennis-plan-nav { font-family: var(--wp--preset--font-family--heading); font-weight: 600; letter-spacing: .02em; }
.ennis-plan-nav a { text-decoration: none; padding: 0.4rem 0.25rem; display: inline-block; }
.ennis-plan-nav a:hover { text-decoration: underline; }

/* Team: bios fold open under each person */
.wp-block-details.ennis-bio { margin-top: 0.25rem; }
.wp-block-details.ennis-bio summary { font-size: 0.95rem; color: var(--wp--preset--color--brand-dark); padding-top: 0.35rem; padding-bottom: 0.35rem; }
.wp-block-details.ennis-bio summary::after { font-size: 1.2rem; top: 0.25rem; }
.wp-block-details.ennis-bio p { margin-top: 0.6rem; }

/* Gallery jump links: compact pills, one swipeable line on phones */
.ennis-jump { gap: 0.5rem !important; }
.ennis-jump .wp-block-button__link { padding: 0.55rem 1.05rem !important; font-size: 0.8rem !important; border-width: 1.5px !important; white-space: nowrap; }
@media (max-width: 600px) {
	.ennis-jump { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.4rem; margin-inline: calc(-1 * var(--wp--style--root--padding-left, 1rem)); padding-inline: var(--wp--style--root--padding-left, 1rem); scrollbar-width: none; }
	.ennis-jump::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ennis-header, .ennis-header .wp-block-site-logo img, .is-style-card > figure.wp-block-image:first-child > a img { transition: none; }
	.is-style-card:hover > figure.wp-block-image:first-child > a img { transform: none; }
}

/* ==========================================================================
   Visual refinement (art-direction review): calmer type, crisper components
   ========================================================================== */
:root { --ennis-radius: 4px; }

/* Type: balanced headings, tidy paragraph endings */
h1, h2, h3, .wp-block-heading { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Footer sits flush against the last section */
.wp-site-blocks > .wp-block-template-part:last-child,
.wp-site-blocks > footer { margin-block-start: 0 !important; }

/* Section headers line up with the wide grid below them, with a steady gap */
.is-layout-constrained > .wp-block-group.is-layout-constrained:has(> .is-style-eyebrow:not(.has-text-align-center)):has(~ .alignwide) {
	max-width: var(--wp--style--global--wide-size) !important;
}
.is-layout-constrained > .wp-block-group.is-layout-constrained:has(> .is-style-eyebrow:not(.has-text-align-center)):has(~ .alignwide) > * {
	margin-left: 0 !important;
}
.is-layout-constrained > .wp-block-group:not(.alignfull):has(> .is-style-eyebrow) + :not(.alignfull) { margin-block-start: var(--wp--preset--spacing--40) !important; }

/* Eyebrow labels: small tracked caps with a short green rule (the site's signature detail) */
.is-style-eyebrow { font-size: .78rem !important; letter-spacing: .18em; line-height: 1.4; }
.is-style-eyebrow:has(+ :is(h1, h2, h3))::before {
	content: ""; display: inline-block; width: 1.75rem; height: 2px; margin-right: .75rem;
	background: var(--wp--preset--color--brand); vertical-align: middle; transform: translateY(-2px);
}
.is-style-eyebrow.has-text-align-center:has(+ :is(h1, h2, h3))::before { display: block; margin: 0 auto .8rem; transform: none; }
.is-style-eyebrow + :is(h1, h2, h3) { margin-block-start: .65rem !important; }
@media (max-width: 600px) { .is-style-eyebrow { letter-spacing: .12em; } }

/* Cards: crisp hairline instead of border + shadow, small radius */
.is-style-card {
	border: 0;
	border-radius: var(--ennis-radius);
	box-shadow: 0 0 0 1px rgba(21,21,21,.08), 0 1px 2px rgba(21,21,21,.04);
}
.is-style-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(21,21,21,.08), 0 18px 36px -14px rgba(21,21,21,.22); }
/* "See the plan" style links: small tracked caps, underline draws in on hover */
.is-style-card p.has-heading-font-family a {
	text-decoration: none; color: var(--wp--preset--color--brand-dark);
	font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	padding-bottom: 2px; transition: background-size .3s ease;
}
.is-style-card:hover p.has-heading-font-family a,
.is-style-card p.has-heading-font-family a:hover { background-size: 100% 1px; }
/* Columns with padding and a vertical alignment get width:100% from WordPress; count the
   padding inside that width so tiles like "Not sure which plan fits?" don't spill past the grid. */
.wp-block-columns > .wp-block-column { box-sizing: border-box; }
/* Card rows: truly equal columns on desktop */
@media (min-width: 782px) {
	.wp-block-columns:has(> .wp-block-column.is-style-card) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
	.ennis-cta-tile { align-self: stretch !important; display: flex; flex-direction: column; justify-content: center; }
}
/* Blog: the link to company news (and back) above the posts, tall enough to tap */
.ennis-blog-links a { display: inline-block; padding: 0.6rem 0; }
.ennis-blog-links + .wp-block-query { margin-top: 0.75rem; }
/* Short last row of a 3-across card set (Our Team): keep cards one-third wide, centered */
@media (min-width: 782px) {
	.wp-block-columns.ennis-thirds { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.wp-block-columns.ennis-thirds > .wp-block-column { grid-column: span 2; }
	.wp-block-columns.ennis-thirds > .wp-block-column:first-child:nth-last-child(2) { grid-column: 2 / span 2; }
	.wp-block-columns.ennis-thirds > .wp-block-column:first-child:nth-last-child(1) { grid-column: 3 / span 2; }
}
/* Text-only tiles beside photo cards (e.g. Agents): a tinted aside, not a stretched empty box */
.wp-block-columns:has(> .is-style-card > figure:first-child) > .is-style-card:not(:has(> figure)):not(.ennis-cta-tile) {
	align-self: start; background: var(--wp--preset--color--brand-tint); box-shadow: none;
}

/* Line icons on text-only cards */
.is-style-card.ennis-icon::before {
	content: ""; display: block; width: 44px; height: 44px; border-radius: var(--ennis-radius);
	margin: 0 0 1.1rem;
	background: var(--wp--preset--color--brand-tint) var(--ennis-icon) center / 22px no-repeat;
}
.ennis-icon--home { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M10 21v-6h4v6'/%3E%3C/svg%3E"); }
.ennis-icon--key { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E"); }
.ennis-icon--users { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ennis-icon--grid { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.ennis-icon--trend { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 7-8.5 8.5-5-5L2 17'/%3E%3Cpath d='M16 7h6v6'/%3E%3C/svg%3E"); }
.ennis-icon--file { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E"); }
.ennis-icon--book { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E"); }
.ennis-icon--droplet { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z'/%3E%3C/svg%3E"); }
.ennis-icon--zap { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E"); }
.ennis-icon--pin { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.ennis-icon--phone { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.ennis-icon--compass { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36 6.36-2.12z'/%3E%3C/svg%3E"); }
.ennis-icon--eye { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ennis-icon--target { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.ennis-icon--heart { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E"); }
.ennis-icon--clipboard { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E"); }
.ennis-icon--phone-screen { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3Cpath d='M9 7h6M9 11h6'/%3E%3C/svg%3E"); }
.ennis-icon--wrench { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
.ennis-icon--plus { --ennis-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B1F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M8 12h8'/%3E%3Cpath d='M12 8v8'/%3E%3C/svg%3E"); }


/* Buttons: smooth hovers; outline buttons fill on hover */
.wp-element-button { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link { border-width: 1.5px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); color: #fff; }
:is(.has-night-background-color, .has-ink-background-color, .wp-block-cover, .has-brand-dark-background-color) .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; border-color: #fff !important; color: var(--wp--preset--color--night) !important; }

/* Inside-page heroes: darken where the text is, let the photo breathe on the right */
@media (min-width: 601px) {
	.wp-block-cover.is-style-hero.has-custom-content-position .wp-block-cover__gradient-background {
		background:
			linear-gradient(90deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.55) 42%, rgba(10,10,10,.08) 100%),
			linear-gradient(0deg, rgba(10,10,10,.45) 0%, rgba(10,10,10,0) 45%) !important;
	}
}
.wp-block-cover.is-style-hero .is-style-lead { color: rgba(255,255,255,.88) !important; max-width: 34em; }
.wp-block-cover.is-style-hero h1 { max-width: 14em; }

/* Process steps: outlined numbers joined by a thin line; works on black sections too */
ol.is-style-steps li::before { background: #fff; color: var(--wp--preset--color--brand-dark); border: 1.5px solid var(--wp--preset--color--ink); font-weight: 600; box-sizing: border-box; }
ol.is-style-steps li:not(:last-child)::after {
	content: ""; position: absolute; left: calc(1.2rem - .5px); top: 2.6rem; bottom: -1.3rem;
	width: 1px; background: var(--wp--preset--color--line);
}
:is(.has-night-background-color, .has-ink-background-color) ol.is-style-steps li::before { background: transparent; color: var(--wp--preset--color--brand); border-color: var(--wp--preset--color--brand); }
:is(.has-night-background-color, .has-ink-background-color) ol.is-style-steps li:not(:last-child)::after { background: rgba(255,255,255,.14); }
@media (min-width: 782px) {
	.wp-block-columns:has(ol.is-style-steps) > .wp-block-column:first-child { position: sticky; top: 110px; align-self: flex-start; }
}

/* Stats band: calmer numbers, tracked caps labels, hairline dividers */
.ennis-stat-number { font-weight: 500; letter-spacing: -0.03em; font-size: clamp(2.6rem, 4.6vw, 3.75rem) !important; }
.ennis-stat-number + p {
	font-family: var(--wp--preset--font-family--heading); text-transform: uppercase;
	letter-spacing: .14em; font-size: .75rem !important; color: rgba(255,255,255,.62) !important; margin-top: .9rem !important;
}
@media (min-width: 782px) {
	.wp-block-columns:has(.ennis-stat-number) > .wp-block-column + .wp-block-column { border-left: 1px solid rgba(255,255,255,.12); padding-left: clamp(1.25rem, 3vw, 2.5rem); }
}

/* FAQ: a round +/x marker, hover colour, top rule on the first question, readable answer width */
.wp-block-details summary { padding: .35rem 3rem .35rem 0; transition: color .2s ease; }
.wp-block-details summary:hover { color: var(--wp--preset--color--brand-dark); }
.wp-block-details summary::after, .wp-block-details[open] summary::after {
	content: ""; position: absolute; right: 0; top: 50%; width: 1.9rem; height: 1.9rem; margin-top: -.95rem;
	border-radius: 50%; border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--brand-dark);
	background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat,
	            linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
	transition: transform .25s ease, background-color .2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); background-color: var(--wp--preset--color--brand-tint); border-color: transparent; }
.wp-block-details:not(.ennis-bio):first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.wp-block-details > :not(summary) { max-width: 62ch; color: #33332f; }
.has-night-background-color .wp-block-details > :not(summary) { color: rgba(255,255,255,.82); }
.wp-block-details.ennis-bio summary::after, .wp-block-details.ennis-bio[open] summary::after { width: 1.5rem; height: 1.5rem; margin-top: -.75rem; top: 50%; }

/* Photos: one small radius, no drop shadows; split photos square up with their text */
.wp-block-image.is-style-photo img { border-radius: var(--ennis-radius); box-shadow: none; }
.wp-block-gallery.is-style-tidy .wp-block-image img { border-radius: var(--ennis-radius); }
.wp-block-columns .wp-block-image.is-style-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
/* Portraits: white studio backgrounds blend into warm off-white */
.is-style-card > figure.wp-block-image:first-child:has(img[style*="3/4"]),
.ennis-avatar a { background: var(--wp--preset--color--surface); }
.is-style-card > figure.wp-block-image:first-child img[style*="3/4"],
.ennis-avatar img { mix-blend-mode: multiply; }
.ennis-avatar a { display: inline-block; border-radius: 50%; }
.ennis-avatar img { box-shadow: 0 0 0 1px var(--wp--preset--color--line); }
/* Floor-plan sheets: framed and evened up */
.wp-block-image img[alt*="floor plan" i] { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 1rem; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ennis-radius); box-shadow: none; }

/* Dark-green call-to-action band */
.has-brand-dark-background-color .is-style-eyebrow { color: var(--wp--preset--color--brand-tint); }
.has-brand-dark-background-color a:not(.wp-element-button) { color: #fff; }
.has-brand-dark-background-color .wp-element-button:hover { background: var(--wp--preset--color--brand) !important; color: var(--wp--preset--color--night) !important; }

/* 750 sq ft callouts and other tinted panels */
.alignwide.has-brand-tint-background-color { border-radius: var(--ennis-radius); border-left: 3px solid var(--wp--preset--color--brand); padding: clamp(2rem, 5vw, 3.5rem) !important; }
.alignwide.has-brand-tint-background-color.is-layout-constrained > * { margin-left: 0 !important; }

/* Footer: green top rule, softer links, a phone number that stands out */
.ennis-footer { border-top: 3px solid var(--wp--preset--color--brand); }
.ennis-footer ul li { margin-bottom: .6rem; }
.ennis-footer ul a { color: rgba(255,255,255,.78); transition: color .2s ease; }
.ennis-footer ul a:hover { color: #fff; }
.ennis-footer a[href^="tel:"] { font-family: var(--wp--preset--font-family--heading); font-size: 1.35rem; font-weight: 500; letter-spacing: -.01em; color: #fff; }
.ennis-footer .wp-block-social-links .wp-social-link { background: transparent !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.ennis-footer .wp-block-social-links .wp-social-link:hover { box-shadow: inset 0 0 0 1px var(--wp--preset--color--brand); }

/* Contact form card: framed with a green top edge */
.ennis-form-card { border-radius: var(--ennis-radius); border-top: 3px solid var(--wp--preset--color--brand) !important; padding: clamp(1.5rem, 3vw, 2.25rem) !important; }
@media (max-width: 600px) { .ennis-form-card { border-top: 0 !important; padding: .25rem !important; } }

/* Links and keyboard focus */
a { text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, summary, input, select, textarea, .wp-element-button):focus-visible { outline: 2px solid var(--wp--preset--color--brand-dark); outline-offset: 3px; }
:where(.has-night-background-color, .has-ink-background-color, .has-brand-dark-background-color, .wp-block-cover, .ennis-header, .ennis-footer) :focus-visible { outline-color: var(--wp--preset--color--brand); }
:focus:not(:focus-visible) { outline: none; }

/* Big portrait cards (About founders, Agents) stop at a sensible height on desktop */
@media (min-width: 782px) {
	.is-style-card > figure.wp-block-image:first-child img[style*="3/4"] { max-height: 520px; width: 100%; }
}

/* ==========================================================================
   Bold where it carries weight
   ========================================================================== */
/* Page titles in the photo headers: bold, like the logo */
.wp-block-cover h1 { font-weight: 700; letter-spacing: -0.02em; }
/* Stats numbers */
.ennis-stat-number { font-weight: 700 !important; letter-spacing: -0.035em; }
/* Card titles and team names stand out from the text under them */
.is-style-card :is(h2, h3, h4) { font-weight: 600; }
.ennis-family-row p.has-heading-font-family { font-weight: 600 !important; }
/* Bold text inside paragraphs and lists */
strong, b { font-weight: 700; }
/* "Bold" heading style, pickable in the editor (block sidebar → Styles → Bold) */
.wp-block-heading.is-style-bold { font-weight: 700 !important; letter-spacing: -0.02em; }

/* ==========================================================================
   Mixing fonts: Jost (headings) · Inter (reading) · Newsreader (accent serif)
   ========================================================================== */
/* Intro lines under page titles: an elegant serif beneath the bold Jost headline */
.is-style-lead {
	font-family: var(--wp--preset--font-family--accent);
	font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem) !important;
	font-weight: 400; line-height: 1.45; letter-spacing: -0.005em;
}
/* "Accent (serif)" paragraph style: key statements in serif italic */
.is-style-accent {
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic; font-weight: 400;
	font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem) !important; line-height: 1.4;
	color: var(--wp--preset--color--ink);
}
.has-night-background-color .is-style-accent, .wp-block-cover .is-style-accent { color: #fff; }
/* An italic word inside a heading turns into the accent serif ("Know before you <em>build</em>") */
:is(h1, h2, h3) em { font-family: var(--wp--preset--font-family--accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
/* Quotes */
.wp-block-quote p { font-family: var(--wp--preset--font-family--accent); }
/* Serif intro over photos: a touch larger and narrower so it reads easily */
.wp-block-cover .is-style-lead { font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem) !important; max-width: 28em; }
/* Longer quotes (e.g. the Company Prayer) at a comfortable reading size */
.wp-block-quote:has(p + p) p { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); line-height: 1.55; }

/* Memorial page portrait */
.ennis-memorial-photo img { border-radius: var(--ennis-radius, 4px); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px -12px rgba(0,0,0,.18); }
/* Quote credit: smaller, upright, quieter than the quote itself */
.wp-block-quote cite { display: block; margin-top: .75rem; font-family: var(--wp--preset--font-family--body); font-style: normal; font-size: .9rem; letter-spacing: .02em; color: var(--wp--preset--color--muted, #5f6b63); }
/* 3D floor plan: a centered figure, not a full-width wall of drawing */
.ennis-plan-3d { max-width: 760px; margin-inline: auto !important; }

/* Renderings say so on every image (galleries marked ennis-renderings, and any image the theme spots as a rendering).
   The long selectors beat WordPress's own captioned-gallery style, which otherwise blanks the label. */
.ennis-renderings .wp-block-image, .wp-block-image.is-rendering, .wp-block-post-featured-image.is-rendering { position: relative; }
.ennis-renderings .wp-block-image::before,
.wp-block-image.is-rendering::before,
.wp-block-post-featured-image.is-rendering::before,
.wp-block-gallery.has-nested-images.ennis-renderings figure.wp-block-image:has(figcaption)::before,
.wp-block-gallery.has-nested-images figure.wp-block-image.is-rendering:has(figcaption)::before,
.wp-block-cover.is-rendering::after {
	content: "Rendering"; position: absolute; top: 8px; left: 8px; right: auto; bottom: auto; z-index: 2; pointer-events: none;
	width: auto; height: auto; max-height: none; -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none;
	padding: .3rem .5rem .28rem; border-radius: 2px; background: rgba(12, 14, 12, .62); color: #fff;
	font: 600 .62rem/1 var(--wp--preset--font-family--heading); letter-spacing: .14em; text-transform: uppercase;
}
/* On a header photo the label sits bottom-right, clear of the headline and buttons */
.wp-block-cover.is-rendering::after { top: auto; left: auto; right: 12px; bottom: 12px; z-index: 3; }
.ennis-renderings .wp-element-caption {
	background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,0)) !important;
	font-size: .8rem !important; padding-top: 2rem !important;
}

/* ==========================================================================
   Audit round 4: phone polish and small fixes
   ========================================================================== */

/* Phone numbers and email addresses always stay on one line (no "559-/544-9511") */
a[href^="tel:"] { white-space: nowrap; }
.wp-block-button__link[href^="tel:"] { white-space: normal; } /* long button labels (Spanish) wrap; plain phone links stay on one line */
/* Emails break only where the page allows it (after the @ on team cards), never mid-name */
a[href^="mailto:"] { overflow-wrap: normal; word-break: normal; }
/* Team cards: no extra line under the bio toggle (it read as an empty strip) */
.is-style-card > .wp-block-details.ennis-bio { border-bottom: 0; }
/* Long words in tables wrap between words, never mid-word */
.wp-block-table td, .wp-block-table th { overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* Contact form: a short "loading" line instead of a blank box until BuilderTrend's form arrives */
.ennis-form-frame { position: relative; }
.ennis-form-frame::before {
	content: attr(data-loading); position: absolute; left: 0; right: 0; top: 2.5rem;
	text-align: center; font-size: .95rem; color: var(--wp--preset--color--muted);
}
.ennis-form-frame.is-loaded::before { content: none; }
.ennis-form-frame iframe { position: relative; }

/* Comparison table on phones: say it scrolls sideways */
@media (max-width: 700px) {
	.wp-block-table.ennis-compare::before {
		content: "Swipe sideways to see every column \2192"; display: block; position: sticky; left: 0;
		margin-bottom: .6rem; font-size: .85rem; color: var(--wp--preset--color--muted);
	}
}

/* Quote credit on dark bands stays readable */
:is(.has-night-background-color, .has-ink-background-color, .has-brand-dark-background-color, .wp-block-cover) .wp-block-quote cite { color: rgba(255,255,255,.75); }

/* How it works: each project's steps fold open (closed on phones, open on bigger screens) */
.wp-block-details.ennis-fold { border: 0 !important; margin: 0; }
.wp-block-details.ennis-fold > summary {
	font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large);
	font-weight: 600; line-height: 1.25; color: var(--wp--preset--color--ink); padding-top: 0;
}
.wp-block-details.ennis-fold > :not(summary) { max-width: none; }
@media (min-width: 701px) {
	.wp-block-details.ennis-fold > summary { cursor: default; padding-right: 0; }
	.wp-block-details.ennis-fold > summary::after { display: none; }
}

/* ==========================================================================
   Audit round 5: phone layouts and polish
   ========================================================================== */

/* Blog tables on phones: columns size to their words, so no word splits mid-way ("advantag/e") */
@media (max-width: 600px) {
	.wp-block-post-content .wp-block-table table.has-fixed-layout { table-layout: auto; }
	.wp-block-post-content .wp-block-table.wp-block-table td, .wp-block-post-content .wp-block-table.wp-block-table th { word-break: normal; overflow-wrap: normal; }
}

/* About: Brian and Sandra's long bios read full width on phones, with the portrait above */
@media (max-width: 600px) {
	.wp-block-column.is-style-card.ennis-founder:has(> figure.wp-block-image:first-child img[style*="3/4"]) { display: block; padding-top: 1rem !important; }
	.wp-block-column.is-style-card.ennis-founder > figure:first-child { max-width: 200px; margin: 0 auto 0.75rem !important; }
	.wp-block-column.is-style-card.ennis-founder > :is(h3, p, ul) { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* Round portrait (a photo that came as a circle on black): crop to the circle, keep it modest */
.wp-block-image.ennis-portrait-round { max-width: 240px; border-radius: 50%; overflow: hidden; }
.wp-block-columns .wp-block-image.ennis-portrait-round img, .wp-block-image.ennis-portrait-round img { border-radius: 50%; aspect-ratio: 1 !important; width: 100%; height: auto; object-fit: cover; transform: scale(1.07); box-shadow: none; }
@media (max-width: 781px) { .wp-block-image.ennis-portrait-round { margin-inline: auto; } }

/* A single portrait beside text: no taller than about a third of a phone screen */
@media (max-width: 781px) {
	.wp-block-image.ennis-portrait { max-width: 230px; margin-inline: auto; }
}

/* Phone galleries in two columns: a lone last photo spans the row instead of sitting by itself */
@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images:not(.columns-1) figure.wp-block-image:last-of-type:nth-of-type(odd) { width: 100% !important; }
}

/* Gallery page: room between the "Jump to" buttons and the first section */
.ennis-jump { margin-bottom: var(--wp--preset--spacing--40) !important; }

/* Phone call bar: hidden while the header photo's own buttons are on screen, then slides up */
@media (max-width: 700px) {
	.ennis-mobile-bar { transition: transform .25s ease, visibility .25s; }
	.ennis-mobile-bar.is-tucked { transform: translateY(110%); visibility: hidden; }
}

/* ==========================================================================
   Audit round 6
   ========================================================================== */

/* Contact form: the panel hugs BuilderTrend's form (its fields are about 300 px wide) instead of a half-empty box */
@media (min-width: 601px) {
	.ennis-form-card { max-width: 480px; margin-inline: auto !important; width: 100%; }
}
/* On phones the form sits in a light panel too, so its inset fields read as part of a card */
@media (max-width: 600px) {
	.ennis-form-card { background: #fff !important; border: 1px solid var(--wp--preset--color--line) !important; border-radius: var(--ennis-radius); padding: .5rem 0 !important; }
}

/* A plan or map shown whole (never cropped to the photo frame); tap to see it full size */
.wp-block-image.ennis-whole img { height: auto; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--ennis-radius); }

/* Blog header on phones: one layer of side padding, like every other page */
@media (max-width: 781px) {
	main > .wp-block-cover.is-style-hero > .wp-block-cover__inner-container.has-global-padding { padding-left: 0; padding-right: 0; }
}

/* Phones: a smaller chat bubble, so it covers less text as you scroll */
@media (max-width: 700px) {
	#ennis-chat-bubble { width: 44px !important; height: 44px !important; right: 12px !important; }
	#ennis-chat-bubble svg { width: 20px !important; height: 20px !important; }
}

/* Gallery "Jump to" buttons wrap onto two lines on phones instead of running off the edge */
@media (max-width: 600px) {
	.ennis-jump { flex-wrap: wrap !important; overflow: visible !important; }
}

/* Phone header photos: a lighter shade at the top so the photo shows, still dark where the text sits */
@media (max-width: 600px) {
	.wp-block-cover.is-style-hero .wp-block-cover__gradient-background {
		background: linear-gradient(180deg, rgba(10,10,10,.28) 0%, rgba(10,10,10,.5) 40%, rgba(10,10,10,.8) 100%) !important;
	}
}

/* Project stories: the dated timeline (an ordered list) reads as a sequence of numbered stops on a line. */
ol.ennis-timeline { list-style: none; counter-reset: step; padding-left: 0; margin: 0 auto; max-width: 760px; }
ol.ennis-timeline li { counter-increment: step; position: relative; padding: 0 0 1.1rem 2.75rem; }
ol.ennis-timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%;
	background: var(--wp--preset--color--brand); color: var(--wp--preset--color--ink); font: 600 0.85rem/1.9rem var(--wp--preset--font-family--heading); text-align: center; }
ol.ennis-timeline li::after { content: ""; position: absolute; left: calc(0.95rem - 1px); top: 2rem; bottom: 0.15rem; width: 2px; background: var(--wp--preset--color--line); }
ol.ennis-timeline li:last-child::after { display: none; }
ol.ennis-timeline li:last-child { padding-bottom: 0; }

/* Calculator sources table: one stacked card per row on phones */
@media (max-width: 600px) {
	.ennis-sources thead { display: none; }
	.ennis-sources tr, .ennis-sources td { display: block; }
	.ennis-sources td { border: 0; padding: 2px 12px; }
	.ennis-sources td:first-child { font-weight: 600; padding-top: 12px; }
	.ennis-sources td:last-child { font-size: .85rem; padding-bottom: 12px; }
}

/* City pages: plan cost table ([ennis_adu_city_costs]) */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.ennis-city-costs td { white-space: nowrap; }
.ennis-city-costs td:nth-child(3), .ennis-city-costs td:nth-child(4) { font-variant-numeric: tabular-nums; }
.ennis-city-costs table { min-width: 0; }
@media (max-width: 600px) {
	.ennis-city-costs th:nth-child(2), .ennis-city-costs td:nth-child(2) { display: none; }
	.ennis-city-costs table { font-size: .9rem; }
	.ennis-city-costs td:first-child { white-space: normal; }
	.ennis-city-costs td, .ennis-city-costs th { padding: 8px 6px; }
}

/* ==========================================================================
   Audit 8 fixes
   ========================================================================== */

/* City cost table: the blog's comparison-table look, without its phone min-width */
.wp-block-table.ennis-compare.ennis-city-costs table { min-width: 0; }
.wp-block-table.ennis-city-costs th:nth-child(n+3), .wp-block-table.ennis-city-costs td:nth-child(n+3) { text-align: right; }
.wp-block-table.ennis-city-costs tr.is-featured td { font-weight: 700; }
.wp-block-table.ennis-city-costs tr.is-featured td:first-child a { color: var(--wp--preset--color--brand-dark); }
@media (max-width: 600px) {
	.wp-block-table.ennis-compare.ennis-city-costs th, .wp-block-table.ennis-compare.ennis-city-costs td { padding: .6rem .5rem; }
}

/* Photo captions: a stronger dark band so white words read on light photos */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
	background: linear-gradient(0deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%);
	padding: 2rem .6rem .55rem; text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
/* On phones the caption sits under the photo instead of covering it */
@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images.is-style-tidy figure.wp-block-image:has(figcaption) { flex-direction: column; }
	.wp-block-gallery.has-nested-images.is-style-tidy figure.wp-block-image:has(figcaption) img { flex: 0 0 auto !important; height: auto !important; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; } /* beats core's :not(#individual-image) rule */
	.wp-block-gallery.has-nested-images.is-style-tidy figure.wp-block-image figcaption.wp-element-caption {
		position: static; background: none; color: var(--wp--preset--color--muted); text-shadow: none;
		padding: .35rem .1rem 0; font-size: .78rem; line-height: 1.35; max-height: none; overflow: visible;
	}
}

/* City rules: the full list folds away under the key facts */
.ennis-rules-more { margin-top: 1rem; }
.ennis-rules-more > summary { font-weight: 600; cursor: pointer; }

/* ==========================================================================
   Audit 9 fixes
   ========================================================================== */

/* City cost table on phones: fit 390 px with no sideways scroll (plan names wrap, tighter cells), so no swipe hint */
@media (max-width: 600px) {
	.wp-block-table.ennis-compare.ennis-city-costs::before { content: none; }
	.wp-block-table.ennis-compare.ennis-city-costs table { font-size: .85rem; }
	.wp-block-table.ennis-compare.ennis-city-costs td:first-child { white-space: normal; }
	.wp-block-table.ennis-compare.ennis-city-costs th, .wp-block-table.ennis-compare.ennis-city-costs td { padding: .55rem .35rem; }
	.wp-block-table.ennis-compare.ennis-city-costs th:first-child, .wp-block-table.ennis-compare.ennis-city-costs td:first-child { padding-left: .5rem; }
	.wp-block-table.ennis-compare.ennis-city-costs thead th { letter-spacing: .04em; }
}

/* Blog tables: the comparison-table look. "is-fit" tables wrap to the screen instead of scrolling sideways */
.wp-block-table.ennis-compare.is-fit table { min-width: 0; }
.wp-block-table.ennis-compare.is-fit td:first-child { white-space: normal; }
@media (max-width: 700px) {
	.wp-block-table.ennis-compare.is-fit::before { content: none; }
	.wp-block-table.ennis-compare.is-fit th, .wp-block-table.ennis-compare.is-fit td { padding: .6rem .5rem; }
}

/* Audit 10 fixes */
.ennis-nowrap { white-space: nowrap; }
.ennis-city-beds { display: none; }
@media (max-width: 600px) {
	.ennis-city-beds { display: block; font-family: var(--wp--preset--font-family--body); font-weight: 400; font-size: .8rem; color: var(--wp--preset--color--muted); }
}
/* Long addresses (portal URLs) wrap instead of widening the page on phones */
main p, main li, main td { overflow-wrap: break-word; }
/* Captions on dark bands (e.g. "Inside our ADUs"): light words, no overlay band, on phones */
@media (max-width: 600px) {
	:is(.has-night-background-color, .has-ink-background-color) .wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
		color: #d9d9d2; background: none; background-image: none; text-shadow: none; padding: .35rem .1rem 0;
	}
}
@media (max-width: 600px) {
	/* the renderings caption band (above) is !important too */
	.ennis-renderings .wp-element-caption { background: none !important; padding-top: .35rem !important; }
	:is(.has-night-background-color, .has-ink-background-color) .ennis-renderings .wp-element-caption { color: #d9d9d2; }
}

/* Audit 11 fixes */
/* Phone header photos: darker at the top too, so the small label above the title reads on light skies */
@media (max-width: 600px) {
	.wp-block-cover.is-style-hero .wp-block-cover__gradient-background {
		background: linear-gradient(180deg, rgba(10,10,10,.5) 0%, rgba(10,10,10,.58) 40%, rgba(10,10,10,.82) 100%) !important;
	}
	.wp-block-cover.is-style-hero .is-style-eyebrow { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
	/* While a price table is on screen, the chat bubble steps aside so it doesn't cover the rent column */
	body.ennis-hide-chat #ennis-chat-bubble { opacity: 0; pointer-events: none; transform: scale(.6); visibility: hidden; }
	/* Plan tables in posts: the plan name already says the size, so the size column goes on phones */
	.wp-block-table.ennis-compare.is-plan-table th:nth-child(2), .wp-block-table.ennis-compare.is-plan-table td:nth-child(2) { display: none; }
}
#ennis-chat-bubble { transition: transform .15s ease, opacity .2s ease, visibility .2s; }
/* City table: a two-story plan in a city with a low height limit */
.ennis-city-limit { display: block; font-family: var(--wp--preset--font-family--body); font-weight: 400; font-size: .78rem; color: #8a5a00; }
.wp-block-table.ennis-city-costs tr.is-limited td { color: var(--wp--preset--color--muted); }

/* ADU financing guide: the "ways to pay" table becomes one card per way on phones */
@media (max-width: 700px) {
	.wp-block-table.ennis-compare.is-ways table, .wp-block-table.ennis-compare.is-ways tbody, .wp-block-table.ennis-compare.is-ways tr, .wp-block-table.ennis-compare.is-ways td { display: block; width: auto; }
	.wp-block-table.ennis-compare.is-ways thead { display: none; }
	.wp-block-table.ennis-compare.is-ways tr { padding: .9rem .75rem; border-bottom: 1px solid var(--wp--preset--color--line); }
	.wp-block-table.ennis-compare.is-ways tbody tr:nth-child(even) { background: var(--wp--preset--color--surface); }
	.wp-block-table.ennis-compare.is-ways tbody tr td { border: 0; padding: .2rem 0; background: none; }
	.wp-block-table.ennis-compare.is-ways td:first-child { font-size: 1.05rem; padding-bottom: .35rem; }
	.wp-block-table.ennis-compare.is-ways td:nth-child(3)::before { content: "Good for: "; font-weight: 600; }
	.wp-block-table.ennis-compare.is-ways td:nth-child(4)::before { content: "Watch for: "; font-weight: 600; }
}

/* Blog posts: a wide comparison table breaks out of the 720 px text column (the text stays put) */
body.single-post .wp-block-post-content > .wp-block-table.alignwide {
	width: min(var(--wp--style--global--wide-size, 1240px), calc(100vw - 48px)); max-width: none !important;
	margin-left: 50% !important; margin-right: 0 !important; transform: translateX(-50%);
}

/* Before/after sliders (assets/js/site.js): one photo, a divider to drag, labels in the corners */
.ennis-ba:not(.is-ready) { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ennis-ba:not(.is-ready) > figure { margin: 0; }
.ennis-ba-stage { position: relative; overflow: hidden; border-radius: 8px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; --pos: 50%; background: var(--wp--preset--color--surface); }
.ennis-ba-stage img { display: block; width: 100%; height: auto; margin: 0; pointer-events: none; -webkit-user-drag: none; border-radius: 0; }
.ennis-ba-stage img:first-child { aspect-ratio: 4 / 3; object-fit: cover; } /* pairs side by side line up (audit 14) */
.ennis-ba-stage img + img { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--pos)); }
.ennis-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); pointer-events: none; }
.ennis-ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff no-repeat center / 26px 26px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E"); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.ennis-ba-stage.has-focus .ennis-ba-handle::after { outline: 3px solid var(--wp--preset--color--brand, #7ab648); outline-offset: 2px; }
.ennis-ba-stage.is-dragging .ennis-ba-handle::after { transform: translate(-50%, -50%) scale(1.06); }
.ennis-ba-label { position: absolute; z-index: 2; top: 12px; padding: 5px 10px; border-radius: 4px; background: rgba(10, 10, 10, .68); color: #fff; font-family: var(--wp--preset--font-family--heading); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; pointer-events: none; }
.ennis-ba-label.is-before { left: 12px; }
.ennis-ba-label.is-after { right: 12px; }
.ennis-ba-range { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ennis-ba-caption { margin-top: .6rem !important; font-size: .9rem; color: var(--wp--preset--color--muted); }
@media (max-width: 600px) {
	.ennis-ba-handle::after { width: 40px; height: 40px; background-size: 22px 22px; }
	.ennis-ba-label { top: 8px; font-size: .66rem; padding: 4px 8px; }
	.ennis-ba-label.is-before { left: 8px; }
	.ennis-ba-label.is-after { right: 8px; }
}

/* "Where we've built" map ([ennis_build_map]): the map with town pins, and the jobs at each town beside it */
.ennis-bmap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
.ebm-map { position: relative; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--wp--preset--color--line); }
.ebm-svg { display: block; width: 100%; height: auto; }
.ebm-ours { fill: var(--wp--preset--color--brand-tint, #eef6e7); stroke: var(--wp--preset--color--brand-dark, #3f6b1f); stroke-width: 1.5; stroke-linejoin: round; }
.ebm-other { fill: #f3f2ee; stroke: #d8d5cc; stroke-width: 1; stroke-linejoin: round; }
.ebm-county { font: 600 15px/1 var(--wp--preset--font-family--heading, sans-serif); letter-spacing: .1em; fill: var(--wp--preset--color--brand-dark, #3f6b1f); }
.ebm-ref { fill: #8a877e; }
.ebm-reflabel { font: 15px/1 var(--wp--preset--font-family--body, sans-serif); fill: #6b685f; }
.ebm-insetbox { fill: #fff; }
.ebm-insetframe { fill: none; stroke: #bdb9ad; stroke-width: 1.5; }
.ebm-pin { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-9px, -50%); text-decoration: none; color: var(--wp--preset--color--ink); white-space: nowrap; z-index: 1; }
.ebm-pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 9px), -50%); }
.ebm-dot { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--wp--preset--color--brand-dark, #3f6b1f); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); box-sizing: border-box; }
.ebm-pin.is-next .ebm-dot { background: #fff; border: 4px solid var(--wp--preset--color--brand-dark, #3f6b1f); }
.ebm-name { font: 600 .82rem/1.2 var(--wp--preset--font-family--heading, sans-serif); padding: 3px 7px; border-radius: 4px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ebm-pin:hover .ebm-name, .ebm-pin:focus-visible .ebm-name, .ebm-pin.is-active .ebm-name { background: var(--wp--preset--color--ink, #151515); color: #fff; }
.ebm-pin:focus-visible { outline: none; }
.ebm-pin:focus-visible .ebm-dot { outline: 3px solid var(--wp--preset--color--brand, #7ab648); outline-offset: 2px; }
.ebm-pin.is-active { z-index: 2; }
.ebm-pin::before { content: ""; position: absolute; inset: -13px -4px; } /* a 44 px tall tap area around the dot and name */
.ebm-town:focus { outline: none; }
@media (min-width: 901px) { .ebm-map { position: sticky; top: 96px; } } /* the map stays beside the long town list */
.ebm-list { display: grid; gap: 10px; }
.ebm-town { padding: 14px 16px; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; background: #fff; scroll-margin-top: 110px; transition: border-color .2s, box-shadow .2s; }
.ebm-town.is-active, .ebm-town:target { border-color: var(--wp--preset--color--brand-dark, #3f6b1f); box-shadow: 0 0 0 2px var(--wp--preset--color--brand-tint, #eef6e7); }
.ebm-town h3 { margin: 0 0 6px; font-size: 1.05rem; }
.ebm-town h3 small { display: block; margin-top: 2px; font: 400 .82rem/1.3 var(--wp--preset--font-family--body, sans-serif); color: var(--wp--preset--color--muted); }
.ebm-town ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ebm-town li { font-size: .95rem; line-height: 1.35; }
.ebm-town li span { display: block; font-size: .82rem; color: var(--wp--preset--color--muted); }
.ebm-note { margin: 12px 0 0; font-size: .85rem; color: var(--wp--preset--color--muted); }
@media (max-width: 900px) {
	.ennis-bmap { grid-template-columns: 1fr; }
	.ebm-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 600px) {
	.ebm-name { font-size: .7rem; padding: 2px 5px; }
	.ebm-dot { width: 14px; height: 14px; flex-basis: 14px; border-width: 2px; }
	.ebm-pin { gap: 4px; transform: translate(-7px, -50%); }
	.ebm-pin.is-left { transform: translate(calc(-100% + 7px), -50%); }
	.ebm-county { font-size: 22px; }
	.ebm-reflabel { font-size: 22px; }
}

/* Spanish pages: the rendering tag in Spanish */
.is-lang-es .ennis-renderings .wp-block-image::before,
.is-lang-es .wp-block-image.is-rendering::before,
.is-lang-es .wp-block-post-featured-image.is-rendering::before,
.is-lang-es .wp-block-gallery.has-nested-images.ennis-renderings figure.wp-block-image:has(figcaption)::before,
.is-lang-es .wp-block-gallery.has-nested-images figure.wp-block-image.is-rendering:has(figcaption)::before,
.is-lang-es .wp-block-cover.is-rendering::after { content: "Imagen de diseño"; }
