.listing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.map-price-pin {
	position: relative;
	display: flex;
	align-items: center;
	gap: 5px;
	background: var(--color-primary);
	border: 2px solid #fff;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transform: translateY(-10px);
}
.map-price-pin::after {
	content: "";
	position: absolute;
	bottom: -7px;
	left: 16px;
	border-width: 7px 6px 0;
	border-style: solid;
	border-color: var(--color-primary) transparent transparent transparent;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.map-price-pin-icon { color: #fff; flex-shrink: 0; }
.map-price-pin:hover { background: var(--color-accent); z-index: 1; }
.map-price-pin:hover::after { border-color: var(--color-accent) transparent transparent transparent; }

.listing-card {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	/* overflow stays visible so the ribbon can hang past the left edge */
	background: #fff;
	box-shadow: 0 1px 3px rgba(58, 64, 70, 0.08);
	transition: box-shadow .2s, transform .2s;
}
/* Only clickable cards (rendered as <a>) get the lift-on-hover — plain <div>
   cards like the VOW-gated sold listings shouldn't look interactive. */
a.listing-card:hover {
	box-shadow: 0 10px 28px rgba(58, 64, 70, 0.18), 0 2px 6px rgba(58, 64, 70, 0.1);
	transform: translateY(-3px);
}
.listing-card .photo {
	aspect-ratio: 4 / 3;
	background: var(--color-bg-alt);
	border-radius: var(--radius) var(--radius) 0 0;
}
.listing-card .photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius) var(--radius) 0 0;
}
.listing-card .body { padding: 14px; }
.listing-card .price { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.listing-card .address { color: var(--color-muted); margin-bottom: 8px; }
.listing-card .meta { display: flex; gap: 12px; font-size: 14px; color: var(--color-muted); }
.listing-office, .listing-card .listing-office { font-size: 10px; color: var(--color-muted); margin-top: 6px; }
.badge,
.listing-card .badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	background: var(--color-accent);
	color: #fff;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 8px;
}
.badge-rental {
	background: #2a7d4f;
}
.listing-card .open-house-badge,
.open-house-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	background: #fff3cd;
	color: #6b5300;
	padding: 4px 10px;
	border-radius: 4px;
	margin-bottom: 8px;
}
.open-house-schedule {
	background: var(--color-accent);
	color: #fff;
	text-align: center;
	border-radius: var(--radius);
	padding: 12px 18px;
	margin: -16px auto 28px; /* tuck up toward the gallery */
	max-width: 900px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.open-house-schedule strong {
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: 13px;
	margin-right: 12px;
}
.open-house-schedule ul {
	display: inline;
	margin: 0;
	padding: 0;
	list-style: none;
}
.open-house-schedule li { display: inline; }
.open-house-schedule li:not(:last-child)::after {
	content: "\2022";
	margin: 0 10px;
	opacity: .6;
}

.search-page {
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--header-height));
	overflow: hidden;
}
.search-page-filters {
	flex-shrink: 0;
	padding: 16px 20px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
}
.search-page-filters .nl-search-box {
	margin-bottom: 12px;
}
.search-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	flex: 1;
	overflow: hidden;
}
.search-results-col {
	overflow-y: auto;
	padding: 24px 20px;
}
.search-layout #search-map {
	height: 100%;
	border-left: 1px solid var(--color-border);
}
@media (max-width: 900px) {
	.search-page { height: auto; overflow: visible; }
	.search-layout { grid-template-columns: 1fr; }
	.search-results-col { overflow-y: visible; padding: 16px; }
	.search-layout #search-map { height: 320px; border-left: none; border-top: 1px solid var(--color-border); order: -1; }
}

.nl-search-box {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}
.nl-search-box input[type="text"] {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-size: 16px;
}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}
.filter-bar select, .filter-bar input { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.filter-bar .filter-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	font-weight: 600;
	cursor: pointer;
}

.listing-detail-gallery { margin-bottom: 24px; }
.listing-detail-gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }

.gallery-main { position: relative; margin-bottom: 10px; }
.gallery-main img { width: 100%; aspect-ratio: 16/10; }
.gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gallery-nav:hover { background: rgba(0, 0, 0, 0.75); }
.gallery-nav-prev { left: 12px; }
.gallery-nav-next { right: 12px; }
.gallery-count {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 13px;
	padding: 4px 10px;
	border-radius: 999px;
}

.gallery-thumbs-wrap { position: relative; }
.gallery-thumbs {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 4px 4px 10px;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: var(--color-primary, #2a5db0) transparent;
}
.gallery-thumbs::-webkit-scrollbar { height: 6px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--color-primary, #2a5db0); border-radius: 999px; }
.gallery-thumbs::-webkit-scrollbar-track { background: var(--color-border); border-radius: 999px; }
.gallery-thumbs-wrap::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 10px;
	width: 36px;
	background: linear-gradient(to right, transparent, var(--color-bg, #fff));
	pointer-events: none;
}
.gallery-thumbs img {
	width: 90px;
	flex: 0 0 auto;
	cursor: pointer;
	opacity: 0.65;
	border: 2px solid transparent;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}
.gallery-thumbs img:hover { opacity: 1; transform: translateY(-2px); }
.gallery-thumbs img.active { opacity: 1; border-color: var(--color-primary, #2a5db0); }

.listing-detail-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	max-width: 1240px;
	margin: 0 auto;
}

.request-showing-card {
	background: var(--color-bg-alt, #f4f5f7);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 20px;
}
.request-showing-card h3 { margin-top: 0; }
.request-showing-card .form-row input,
.request-showing-card .form-row textarea,
.request-showing-card .form-row select {
	background: #fff;
}
/* Match the select to the other fields (inherit the .form-row input sizing). */
.request-showing-card .form-row select { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; color: inherit; }

/* Inline submit feedback */
.enquiry-success { text-align: center; padding: 12px 4px; }
.enquiry-success-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #1c7c4a; color: #fff; font-size: 26px; line-height: 48px; }
.enquiry-success p { margin: 4px 0; }
.enquiry-error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: #fbe9e7; color: #a5281b; font-size: 14px; }
@media (max-width: 900px) {
	.listing-detail-layout { grid-template-columns: 1fr; }
}

.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.spec-table td:first-child { color: var(--color-muted); width: 45%; }

.quote-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}
.quote-card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 28px 24px 24px;
	position: relative;
}
.quote-mark {
	font-size: 56px;
	line-height: 1;
	color: var(--color-accent, #f57f20);
	font-family: Georgia, serif;
	margin-bottom: 4px;
}
.quote-text { font-size: 18px; line-height: 1.5; margin-bottom: 20px; }
.quote-byline { display: flex; align-items: center; gap: 12px; }
.quote-photo {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.quote-photo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-accent, #f57f20);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
}
.quote-context { font-size: 13px; color: var(--color-muted); }

.vow-gate {
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 24px;
	margin: 24px 0;
	max-width: 760px;
}
.vow-gate h3 { margin-top: 0; }
.vow-gate p { color: var(--color-muted); font-size: 14px; }
.vow-gate-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.vow-gate-panel {
	flex: 1 1 280px;
	min-width: 260px;
}
.vow-gate-panel h4 { margin-top: 0; font-size: 15px; }
.vow-forgot { margin-top: 10px; font-size: 13px; }
.vow-forgot summary { cursor: pointer; color: var(--color-muted); }
.vow-forgot form { margin-top: 10px; }
.vow-gate-panel + .vow-gate-panel {
	border-left: 1px solid var(--color-border);
	padding-left: 24px;
}
@media (max-width: 600px) {
	.vow-gate-panel + .vow-gate-panel {
		border-left: none;
		border-top: 1px solid var(--color-border);
		padding-left: 0;
		padding-top: 24px;
	}
}

.marketing-checklist {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 24px;
	max-width: 760px;
	margin: 0 auto;
	padding: 0;
	text-align: left;
}
.marketing-checklist li { display: flex; align-items: baseline; gap: 8px; }
.marketing-checklist li::before { content: "\2713"; color: var(--color-accent, #f57f20); font-weight: 700; }
.marketing-checklist a { color: var(--color-accent, #f57f20); font-weight: 600; text-decoration: underline; }

/* --- Home staging page --- */
.staging-copy { max-width: 760px; margin: 0 auto; }
.staging-copy p { font-size: 18px; line-height: 1.75; margin: 0 0 18px; }

/* Hero teaser linking down to the free-book section */
.staging-teaser {
	display: inline-flex; align-items: center; gap: 16px;
	margin: 24px auto 0; padding: 14px 20px;
	background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 999px;
	box-shadow: 0 6px 18px rgba(58, 64, 70, 0.10);
	text-decoration: none; color: var(--color-text);
	text-align: left; transition: transform .15s ease, box-shadow .15s ease;
}
.staging-teaser:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(58, 64, 70, 0.16); }
.staging-teaser-thumb { width: 46px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 4px 8px rgba(58, 64, 70, 0.28)); }
.staging-teaser-text { display: flex; flex-direction: column; line-height: 1.35; }
.staging-teaser-text strong { color: var(--color-primary); }
.staging-teaser-text small { color: var(--color-muted); }
.staging-teaser-cta { flex: 0 0 auto; color: var(--color-accent); font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) {
	.staging-teaser { flex-wrap: wrap; justify-content: center; text-align: center; border-radius: var(--radius); }
	.staging-teaser-cta { flex-basis: 100%; margin-top: 4px; }
}

.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px; }
.ba-slider {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: 0 4px 16px rgba(58, 64, 70, 0.14);
	user-select: none;
	background: var(--color-bg-alt);
	line-height: 0;
}
.ba-slider > img.ba-after { display: block; width: 100%; height: auto; }
.ba-before { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; }
.ba-before img { display: block; height: auto; max-width: none; } /* width set by JS to match slider */
.ba-range {
	position: absolute; inset: 0; width: 100%; height: 100%;
	margin: 0; opacity: 0; cursor: ew-resize;
}
.ba-handle {
	position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
	background: #fff; transform: translateX(-50%); pointer-events: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.ba-handle::after {
	content: ""; position: absolute; top: 50%; left: 50%;
	width: 40px; height: 40px; border-radius: 50%; background: #fff;
	transform: translate(-50%, -50%); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.ba-handle::before {
	content: "\2194"; position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%); z-index: 1; color: var(--color-primary);
	font-size: 18px; line-height: 1;
}
.ba-label {
	position: absolute; top: 12px; padding: 3px 11px; font-size: 12px; font-weight: 600;
	letter-spacing: .03em; text-transform: uppercase; border-radius: 12px;
	color: #fff; background: rgba(0, 0, 0, 0.55); line-height: 1.6;
}
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }

.staging-book { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 32px; align-items: center; }
/* Book is a transparent PNG so the section background shows through — use a
   drop-shadow filter (follows the book's shape) instead of a rectangular box-shadow. */
.staging-book-cover img { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 24px rgba(58, 64, 70, 0.28)); }
.staging-book-body h2 { margin-top: 0; }
.staging-book-body p { font-size: 18px; line-height: 1.7; margin-bottom: 20px; }
.book-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.book-form input[type="email"] { flex: 1 1 220px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.book-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; }
.book-status { margin: 12px 0 0; font-weight: 600; }
.book-status.is-ok { color: #2a7d4f; }
.book-status.is-error { color: #b03636; }
.book-fineprint { font-size: 13px !important; color: var(--color-muted); margin: 10px 0 0 !important; }
@media (max-width: 640px) {
	.staging-book { grid-template-columns: 1fr; }
	.staging-book-cover { max-width: 260px; margin: 0 auto; }
	.ba-grid { grid-template-columns: 1fr; }
}

.marketing-highlight {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
	margin-bottom: 56px;
}
.marketing-highlight.reverse > .marketing-highlight-img { order: 2; }
.marketing-highlight-img img { width: 100%; border-radius: var(--radius); }
.marketing-highlight-subtitle { color: var(--color-muted); font-weight: 600; }
@media (max-width: 760px) {
	.marketing-highlight { grid-template-columns: 1fr; }
	.marketing-highlight.reverse > .marketing-highlight-img { order: 0; }
}

.awards-section { text-align: center; }
.awards-section h1 { margin-bottom: 4px; }
.awards-section h2 { font-weight: 400; color: var(--color-muted); margin-top: 0; }
.awards-subtitle { color: var(--color-muted); margin-bottom: 24px; }
.awards-photo { max-width: 100%; height: auto; margin-bottom: 24px; border-radius: var(--radius); }
.awards-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 8px 48px;
	max-width: 760px;
	margin: 0 auto;
	text-align: left;
}
.awards-list { list-style: none; padding: 0; margin: 0; }
.awards-list li { padding: 4px 0; color: var(--color-muted); }
.awards-footnote { font-size: 12px; color: var(--color-muted); margin-top: 20px; }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.agent-card { text-align: center; }
.agent-card .photo { border-radius: 50%; width: 140px; height: 140px; object-fit: cover; margin: 0 auto 12px; }
.agent-card-contact { font-size: 13px; color: var(--color-muted); margin-top: -8px; }

.agent-profile {
	display: flex;
	gap: 40px;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-bottom: 32px;
}
.agent-profile-photo { flex: 0 0 220px; }
.agent-profile-photo img { width: 220px; height: 220px; object-fit: cover; border-radius: var(--radius); display: block; }
.agent-profile-social { list-style: none; display: flex; gap: 14px; margin: 14px 0 0; padding: 0; }
.agent-profile-social a { color: var(--color-muted); }
.agent-profile-info { flex: 1; min-width: 280px; }
.agent-profile-info h1 small { font-size: 16px; font-weight: 400; color: var(--color-muted); }
.agent-profile-location { color: var(--color-muted); margin-top: 4px; }
.agent-profile-contact { list-style: none; padding: 0; margin: 16px 0 20px; }
.agent-profile-contact li { margin-bottom: 4px; }

.agent-bio { max-width: 720px; margin-bottom: 32px; }
.agent-bio hr { border: none; border-top: 1px solid var(--color-border); margin: 8px 0 16px; }
.bio-more summary { cursor: pointer; color: var(--color-accent, #f57f20); font-weight: 600; margin-top: 8px; }
.bio-more[open] summary { margin-bottom: 12px; }

.agent-awards { max-width: 720px; margin-bottom: 32px; }
.agent-awards ul { padding-left: 20px; }
.agent-awards li { margin-bottom: 6px; }

.agent-fun-facts { max-width: 720px; margin-bottom: 32px; }
.fun-fact {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 12px 16px;
	margin-bottom: 8px;
}
.fun-fact summary { cursor: pointer; font-weight: 600; }
.fun-fact[open] summary { margin-bottom: 8px; }

.agent-video { max-width: 560px; margin-bottom: 32px; }
.agent-video video { width: 100%; border-radius: var(--radius); display: block; }

.agent-contact-form { max-width: 480px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.pagination .current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.listing-location { margin: 28px 0; }
.listing-location-map {
	width: 100%;
	height: 340px;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-bg-alt);
	margin-top: 10px;
}
.walkscore-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 16px;
}
.walkscore-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 10px 16px;
	flex: 1 1 200px;
}
.walkscore-num {
	font-size: 26px;
	font-weight: 700;
	color: var(--color-primary, #2a5db0);
	flex-shrink: 0;
}
.walkscore-label { font-size: 13px; color: var(--color-muted); line-height: 1.3; }
.walkscore-label small { color: var(--color-muted); }

/* PDF/flipbook brochure CTA (our own listings) */
.listing-brochure-cta {
	display: flex; align-items: center; gap: 16px;
	max-width: 900px; margin: 20px auto; padding: 16px 20px;
	background: var(--color-bg-alt); border: 1px solid var(--color-border);
	border-radius: var(--radius);
	text-decoration: none; color: var(--color-text);
	transition: transform .15s ease, box-shadow .15s ease;
}
.listing-brochure-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(58, 64, 70, 0.14); }
.listing-brochure-icon { font-size: 30px; line-height: 1; flex: 0 0 auto; display: inline-block; transform: rotate(-6deg); filter: drop-shadow(0 4px 6px rgba(58, 64, 70, 0.35)); transition: transform .15s ease; }
.listing-brochure-cta:hover .listing-brochure-icon { transform: rotate(-2deg); }
.listing-brochure-thumb { flex: 0 0 auto; width: 44px; height: 58px; margin: 4px 6px 4px 2px; object-fit: cover; border-radius: 3px; border: 1px solid var(--color-border); background: #fff; transform: rotate(-6deg); box-shadow: 0 6px 14px rgba(58, 64, 70, 0.28); transition: transform .15s ease; }
.listing-brochure-cta:hover .listing-brochure-thumb { transform: rotate(-2deg); }
.listing-brochure-text { display: flex; flex-direction: column; line-height: 1.35; }
.listing-brochure-text strong { color: var(--color-primary); font-size: 17px; }
.listing-brochure-text small { color: var(--color-muted); }
.listing-brochure-arrow { margin-left: auto; color: var(--color-accent); font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) {
	.listing-brochure-arrow { margin-left: 0; flex-basis: 100%; }
}

/* Floor plan expands inline on the page (needs room + zoom, not a modal) */
.listing-floorplan-panel { max-width: 1000px; margin: 12px auto 0; }
.listing-floorplan-panel[hidden] { display: none; }
.listing-floorplan-panel img { display: block; width: 100%; height: auto; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }

/* Shared media lightbox modal (brochure iframe) */
.media-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.media-modal[hidden] { display: none; }
.media-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.media-modal-dialog { position: relative; width: min(1100px, 96vw); height: min(88vh, 820px); background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); }
.media-modal-frame { width: 100%; height: 100%; border: 0; display: block; }
.media-modal-image { position: absolute; inset: 12px; margin: auto; max-width: calc(100% - 24px); max-height: calc(100% - 24px); object-fit: contain; }
.media-modal-frame[hidden], .media-modal-image[hidden] { display: none; }
.media-modal-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.media-modal-close:hover { background: rgba(0, 0, 0, 0.82); }
@media (max-width: 560px) {
	.media-modal { padding: 10px; }
	.media-modal-dialog { width: 100%; height: 92vh; }
}

.listing-video { max-width: 900px; margin: 28px auto; }

/* MLS® Reciprocity logo + note (IDX requirement on listing detail pages) */
.mls-reciprocity { display: flex; align-items: center; gap: 10px; max-width: 900px; margin: 0 auto 28px; color: var(--color-muted); font-size: 12px; }
.mls-reciprocity img { height: 30px; width: auto; flex: 0 0 auto; }
.listing-video-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-bg-alt);
	margin-top: 10px;
}
.listing-video-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.listing-floorplan { max-width: 900px; margin: 28px auto; }

.listing-share {
	max-width: 900px;
	margin: 20px auto;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.listing-share-label { font-weight: 600; color: var(--color-primary); }
.listing-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--color-border);
	background: var(--color-bg-alt);
	color: var(--color-primary);
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.share-btn:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.share-btn svg { width: 18px; height: 18px; }
.share-copied {
	position: absolute;
	top: -28px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--color-primary);
	color: #fff;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 4px;
	white-space: nowrap;
}
.listing-floorplan-img { margin-top: 14px; }
.listing-floorplan-img img { max-width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius); }

/* ── Neighbourhood pages ─────────────────────────────────────── */
.hero-neighbourhood {
	background-size: cover;
	background-position: center;
	background-color: var(--color-primary);
	position: relative;
	min-height: 420px;
	display: flex;
	align-items: flex-end;
	padding: 0;
}
.hero-neighbourhood .hero-content {
	position: relative;
	z-index: 2;
	padding: 48px 0;
}
.neighbourhood-eyebrow {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: rgba(255,255,255,.75);
	margin: 0 0 8px;
}
.hero-neighbourhood h1 { color: #fff; font-size: 42px; margin: 0 0 24px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.neighbourhood-layout { max-width: 760px; }
.neighbourhood-body h2 { margin-top: 0; }
.neighbourhood-listings-wrap { margin-top: 32px; }
.loading-msg { color: var(--color-muted); }

.neighbourhood-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
	margin-top: 24px;
}
.neighbourhood-card {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--color-border);
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s;
}
.neighbourhood-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.neighbourhood-card-img {
	height: 140px;
	background-color: var(--color-bg-alt);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.neighbourhood-card-body { padding: 14px 16px; }
.neighbourhood-card-city {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--color-muted);
	margin: 0 0 4px;
}
.neighbourhood-card h3 { margin: 0; font-size: 16px; }

/* Homepage browse-by-neighbourhood grid */
.neighbourhood-browse-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin-top: 24px;
}
.neighbourhood-browse-card {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	height: 160px;
	display: flex;
	align-items: flex-end;
	text-decoration: none;
	color: #fff;
	background-color: var(--color-primary);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.neighbourhood-browse-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.1) 60%);
}
.neighbourhood-browse-card span {
	position: relative;
	z-index: 1;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
}

/* ── Photo ribbon: For Sale / For Rent / SOLD! ───────────────── */
.listing-card .photo { position: relative; }
.listing-banner {
	position: absolute;
	top: 14px;
	left: -8px;
	background: rgba(58, 64, 70, 0.95);
	color: #fff;
	padding: 7px 16px 8px 14px;
	border-radius: 4px 6px 6px 0;
	line-height: 1.15;
	z-index: 1;
	box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
/* fold tucking behind the card's left edge */
.listing-banner::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	border-style: solid;
	border-width: 8px 0 0 8px;
	border-color: #1c2a35 transparent transparent transparent;
}
.listing-banner-rent::after { border-top-color: #1b5233; }
.listing-banner-sold::after { border-top-color: #a8570c; }
.listing-banner-label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .02em;
	opacity: .85;
}
.listing-banner-price {
	display: block;
	font-size: 16px;
	font-weight: 300;
}
.listing-banner-rent { background: rgba(42, 125, 79, 0.94); }
.listing-banner-sold { background: rgba(245, 127, 32, 0.94); }

/* ── Solds page ──────────────────────────────────────────────── */
.solds-map {
	height: 480px;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-bg-alt);
	margin: 24px 0 32px;
	border: 1px solid var(--color-border);
}
.map-price-pin-sold { background: var(--color-accent); }
.map-price-pin-sold::after { border-color: var(--color-accent) transparent transparent transparent; }

.search-query-heading {
	font-size: 20px;
	margin: 0 0 12px;
	font-weight: 500;
}
.search-query-heading em {
	font-style: normal;
	color: var(--color-accent);
}

/* ── Mosaic gallery + lightbox ───────────────────────────────── */
.gallery-mosaic {
	display: grid;
	grid-template-columns: 1fr 1fr;
	/* fixed overall shape so main + side rows always align (each cell ~4:3) */
	aspect-ratio: 8 / 3;
	gap: 8px;
	margin-bottom: 28px;
	border-radius: var(--radius);
	overflow: hidden;
	position: relative;
}
.gallery-mosaic-single { grid-template-columns: 1fr; aspect-ratio: 16 / 9; }
.gallery-mosaic-main { min-height: 0; }
.gallery-mosaic-side {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
	gap: 8px;
	min-height: 0;
}
.gallery-tile {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	background: var(--color-bg-alt);
}
.gallery-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 6s ease-out;
}
.gallery-tile:hover img { transform: scale(1.12); }
.gallery-viewall {
	position: absolute;
	bottom: 14px;
	right: 14px;
	background: #fff;
	color: var(--color-primary);
	border: none;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.3);
	z-index: 1;
}
.gallery-viewall:hover { background: var(--color-accent); color: #fff; }
.gallery-viewall-single { position: absolute; }

@media (max-width: 760px) {
	.gallery-mosaic { grid-template-columns: 1fr; }
	.gallery-mosaic-side { display: none; }
	.gallery-viewall-mobile-anchor { position: relative; }
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 14, 18, 0.96);
	z-index: 1000;
	display: none;
	grid-template-columns: minmax(0, 1fr) 200px;
	gap: 12px;
	padding: 20px;
}
.gallery-lightbox.open { display: grid; }
.lightbox-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}
.lightbox-stage img {
	max-width: 100%;
	max-height: calc(100vh - 40px);
	object-fit: contain;
	border-radius: 4px;
}
.lightbox-rail {
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-right: 4px;
	scrollbar-width: thin;
}
.lightbox-rail img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	opacity: .55;
	border: 2px solid transparent;
	transition: opacity .15s, border-color .15s;
}
.lightbox-rail img:hover { opacity: 1; }
.lightbox-rail img.active { opacity: 1; border-color: var(--color-accent); }
.lightbox-close {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: rgba(255,255,255,.12);
	color: #fff;
	border: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.lightbox-close:hover { background: var(--color-accent); }
@media (max-width: 760px) {
	.gallery-lightbox { grid-template-columns: 1fr; }
	.lightbox-rail { flex-direction: row; overflow-x: auto; overflow-y: hidden; height: 72px; }
	.lightbox-rail img { width: 96px; height: 100%; flex: 0 0 auto; }
}

/* ── Listing detail: centered header, stats bar, remarks, map ── */
.listing-header {
	text-align: center;
	max-width: 900px;
	margin: 0 auto 28px;
}
.listing-header h1 {
	font-size: 34px;
	margin-bottom: 10px;
}
.listing-header h1 small {
	font-size: 22px;
	font-weight: 400;
	color: var(--color-muted);
}
.listing-header-rule {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 14px 0;
}
.listing-statsbar {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.listing-statsbar > span:not(.badge):not(:last-child)::after {
	content: "|";
	color: var(--color-border);
	margin-left: 14px;
}
.stat-price { font-size: 24px; font-weight: 700; color: var(--color-primary); }
.stat-status { font-weight: 600; letter-spacing: .05em; }
.stat-mls { color: var(--color-muted); }

.listing-remarks {
	max-width: 900px;
	margin: 0 auto 32px;
	line-height: 1.75;
	white-space: pre-line;
}

/* Map uses the shared card style (.listing-brochure-cta on the <summary>),
   expanding the map inline like the floor plan. */
.map-collapse { max-width: 900px; margin: 0 auto 12px; }
.map-collapse summary { list-style: none; cursor: pointer; }
.map-collapse summary::-webkit-details-marker { display: none; }
.map-cta .cta-close { display: none; }
.map-collapse[open] .map-cta .cta-open { display: none; }
.map-collapse[open] .map-cta .cta-close { display: inline; }
.map-collapse .listing-location { margin: 8px 0 20px; }

.listing-details-heading { margin-top: 8px; }

/* Open-house banner across the card photo (replaces the body badge) */
.open-house-banner {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(245, 127, 32, 0.92);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: center;
	padding: 7px 10px;
	z-index: 1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Open-house corner ribbon on detail-page mosaic (mosaic clips overhang, so no fold) */
.listing-banner-openhouse {
	background: rgba(245, 127, 32, 0.95);
	left: 0;
	border-radius: 0 6px 6px 0;
}
.listing-banner-openhouse::after { display: none; }

/* ---- Mortgage calculator slide-in drawer ---- */
.mcalc-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 26, 32, 0.5);
	z-index: 1200; /* above sticky header (100) and gallery lightbox (1000) */
	opacity: 0;
	transition: opacity .25s;
}
.mcalc-backdrop.open { opacity: 1; }
.mcalc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(440px, 100%);
	background: #fff;
	z-index: 1201;
	transform: translateX(100%);
	transition: transform .3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
}
.mcalc-drawer.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
	.mcalc-drawer, .mcalc-backdrop { transition: none; }
}
body.mcalc-lock { overflow: hidden; }
.mcalc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--color-border);
}
.mcalc-head h3 { margin: 0; }
.mcalc-close {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--color-muted);
	padding: 0 4px;
}
.mcalc-close:hover { color: var(--color-text); }
.mcalc-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.mcalc-body .form-row { margin-bottom: 12px; }
.mcalc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcalc-split input { width: 100%; padding: 9px 11px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.mcalc-split-labels { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.mcalc-split-labels span { padding-left: 4px; }
.mcalc-warning { font-size: 13px; margin: 12px 0 0; }
.mcalc-result {
	background: var(--color-bg-alt);
	border-radius: var(--radius);
	padding: 16px 18px;
	margin: 18px 0 16px;
	text-align: center;
}
.mcalc-payment { font-size: 30px; font-weight: 700; color: var(--color-primary); }
.mcalc-freq-label { color: var(--color-muted); font-size: 14px; }
.mcalc-breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
.mcalc-breakdown td { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.mcalc-breakdown td:last-child { text-align: right; font-weight: 600; }
.mcalc-note { font-size: 12px; color: var(--color-muted); line-height: 1.5; margin-top: 14px; }
.listing-statsbar .mcalc-trigger { padding: 6px 14px; font-size: 13px; }
.mcalc-chart { margin-top: 18px; }
.mcalc-chart-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-primary); }
.mcalc-chart svg { display: block; width: 100%; height: auto; }
.mcalc-chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--color-muted); margin-bottom: 8px; }
.mcalc-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mcalc-swatch { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
.mcalc-swatch-balance { border-color: var(--color-accent); }
.mcalc-swatch-interest { border-color: var(--color-primary); border-top-style: dashed; }
.mcalc-chart { position: relative; }
.mcalc-chart svg { touch-action: pan-y; cursor: crosshair; }
.mcalc-tooltip {
	position: absolute;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	padding: 8px 12px;
	font-size: 12px;
	line-height: 1.5;
	pointer-events: none;
	white-space: nowrap;
	z-index: 1;
}
.mcalc-tooltip strong { display: block; margin-bottom: 2px; color: var(--color-primary); }
.mcalc-tooltip span { display: flex; align-items: center; gap: 6px; }

/* ── Stats / market reports page ─────────────────────────────── */
.stats-intro { font-size: 18px; }
.stats-hpi-explainer {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 12px 18px;
	margin: 20px 0;
	background: var(--color-bg-alt);
}
.stats-hpi-explainer summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.stats-hpi-explainer p { margin: 12px 0 4px; }

/* MarketBrief signup card on stats.cfm (area pre-selected to the current report) */
.mb-signup { margin: 28px 0; padding: 24px; border-radius: var(--radius); background: var(--color-primary); color: #fff; }
.mb-signup-copy h2 { margin: 0 0 6px; color: #fff; }
.mb-signup-copy p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.85); max-width: 640px; }
.mb-signup-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.mb-signup-form select, .mb-signup-form input[type="email"] { flex: 1 1 200px; min-width: 0; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--radius); font: inherit; background: #fff; color: var(--color-text); }
.mb-signup-form .btn { flex: 0 0 auto; }
.mb-signup-status { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius); font-weight: 600; }
.mb-signup-status.is-ok { background: rgba(255, 255, 255, 0.16); color: #fff; }
.mb-signup-status.is-error { background: #fbe9e7; color: #a5281b; }
.mb-signup .signup-disclaimer { margin: 12px 0 0; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 560px) {
	.mb-signup-form .btn { flex: 1 1 100%; }
}
.stats-picker { margin: 28px 0 8px; }
.stats-picker h3 { display: inline; margin: 0; }
.stats-picker select {
	display: block;
	margin-top: 10px;
	padding: 10px 14px;
	font-size: 16px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	min-width: 280px;
}
.stats-frame {
	width: 100%;
	height: 800px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	margin-top: 16px;
	background: var(--color-bg-alt);
}

.stats-report-pages {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 16px;
}
.stats-report-pages img {
	width: 100%;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 2px 10px rgba(58, 64, 70, 0.08);
}

/* ── Account dashboard ───────────────────────────────────────── */
.account-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 24px;
}
.account-email { color: var(--color-muted); margin: 0; }
.account-stats { display: flex; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.account-stat {
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 18px 28px;
	min-width: 180px;
}
.account-stat-num { display: block; font-size: 32px; font-weight: 700; color: var(--color-primary); }
.account-stat-label { color: var(--color-muted); font-size: 14px; }
.saved-search-list { display: flex; flex-direction: column; gap: 12px; }
.saved-search-card {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 16px 18px;
	background: #fff;
}
.saved-search-main {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.saved-search-info { display: flex; flex-direction: column; gap: 3px; }
.saved-search-info small { color: var(--color-muted); }
.saved-search-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.saved-search-actions form { display: inline; margin: 0; }
.nav-account { color: var(--color-accent) !important; font-weight: 600; }
@media (max-width: 640px) {
	.saved-search-card { flex-direction: column; align-items: flex-start; }
}


/* Heart / favourite button on card photos */
.fav-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: var(--color-muted);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	transition: transform .15s, color .15s;
}
.fav-btn:hover { transform: scale(1.15); color: var(--color-accent); }
.fav-btn.fav-on { color: var(--color-accent); }

/* Recent matches strip under a saved search */
.recent-matches {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--color-border);
	flex-wrap: wrap;
}
.recent-matches-label { font-size: 13px; color: var(--color-muted); }
.recent-match {
	position: relative;
	width: 96px;
	border-radius: 6px;
	overflow: hidden;
	display: block;
}
.recent-match img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.recent-match span {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(58, 64, 70, 0.85);
	color: #fff;
	font-size: 10px;
	text-align: center;
	padding: 2px 0;
}

/* Market trend charts on stats.cfm */
.trend-chart-block { margin: 28px 0; }
.trend-chart-block h3 { margin-bottom: 12px; }
.trend-chart-wrap {
	position: relative;
	height: 320px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 16px;
	background: #fff;
}
.trend-collecting {
	color: var(--color-muted);
	background: var(--color-bg-alt);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius);
	padding: 14px 18px;
}

/* Inline heart on the listing detail stats bar (cards use absolute positioning) */
.fav-btn-inline {
	position: static;
	width: 34px;
	height: 34px;
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	box-shadow: none;
}

/* Neighbourhood page extras */
.neighbourhood-stats { margin: 0 0 32px; }
.neighbourhood-schools {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.neighbourhood-schools li {
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 14px;
}
.neighbourhood-map {
	height: 340px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	margin-bottom: 24px;
	background: var(--color-bg-alt);
}

/* ── Auth prompt modal ───────────────────────────────────────── */
.ag-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 22, 28, 0.6);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: ag-fade .18s ease-out;
}
.ag-modal {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 420px;
	width: 100%;
	padding: 36px 32px 28px;
	text-align: center;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
	animation: ag-pop .2s ease-out;
}
.ag-modal-heart {
	width: 58px;
	height: 58px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: rgba(245, 127, 32, 0.12);
	color: var(--color-accent);
	font-size: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ag-modal h3 { margin-bottom: 10px; font-size: 22px; }
.ag-modal p { color: var(--color-muted); }
.ag-modal-cta { display: block; margin: 18px 0 10px; }
.ag-modal-later {
	background: none;
	border: none;
	color: var(--color-muted);
	cursor: pointer;
	font-size: 14px;
	text-decoration: underline;
	padding: 6px;
}
.ag-modal-later:hover { color: var(--color-text); }
.ag-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--color-muted);
	cursor: pointer;
}
.ag-modal-close:hover { color: var(--color-text); }
@keyframes ag-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ag-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.ag-modal-disclaimer,
.signup-disclaimer {
	font-size: 12px;
	color: var(--color-muted);
	margin: 10px 0 0;
	line-height: 1.5;
}
.site-footer .signup-disclaimer { color: rgba(255, 255, 255, 0.5); }

/* ── Home value page ─────────────────────────────────────────── */
.hero-value {
	background: linear-gradient(rgba(38, 41, 45, 0.75), rgba(38, 41, 45, 0.75)),
		url('/images/home-value-hero.jpg') center/cover no-repeat, var(--color-primary-dark);
	position: relative;
	padding: 90px 0;
	text-align: center;
}
.hero-value h1 { color: #fff; font-size: 40px; }
.hero-value p { color: rgba(255, 255, 255, 0.85); max-width: 640px; margin: 0 auto; }
.hero-value .hero-overlay { display: none; }

.home-value-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 48px;
	align-items: start;
}
.home-value-steps { padding-left: 20px; }
.home-value-steps li { margin-bottom: 14px; line-height: 1.6; }
.home-value-form h3 { margin-top: 0; }
@media (max-width: 900px) {
	.home-value-layout { grid-template-columns: 1fr; }
}

/* My Home portal section */
.my-home-form { max-width: 520px; }
.my-home-form-row { display: flex; gap: 12px; }
.my-home-form-row .form-row { flex: 1; }
.my-home-card {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 20px 22px;
	background: #fff;
}
.my-home-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}
.my-home-header strong { font-size: 18px; display: block; }

/* ── Listing concierge chat ──────────────────────────────────── */
.concierge { position: fixed; bottom: 22px; right: 22px; z-index: 1500; }
.concierge-fab {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: none;
	background: var(--color-accent);
	color: #fff;
	font-size: 26px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	transition: transform .15s;
}
.concierge-fab:hover { transform: scale(1.08); }
.concierge-panel[hidden] { display: none; }
.concierge-panel {
	position: absolute;
	bottom: 72px;
	right: 0;
	width: 360px;
	max-width: calc(100vw - 44px);
	height: 480px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.concierge-head {
	background: var(--color-primary);
	color: #fff;
	padding: 14px 16px;
	position: relative;
}
.concierge-head strong { display: block; }
.concierge-head span { font-size: 12px; opacity: .75; }
.concierge-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	opacity: .8;
}
.concierge-close:hover { opacity: 1; }
.concierge-msgs {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.concierge-msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.5;
}
.concierge-msg.user {
	align-self: flex-end;
	background: var(--color-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.concierge-msg.bot {
	align-self: flex-start;
	background: var(--color-bg-alt);
	border-bottom-left-radius: 4px;
}
.concierge-msg.bot a { color: var(--color-accent); font-weight: 500; }
.concierge-thinking { color: var(--color-muted); }
.concierge-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--color-border);
}
.concierge-form input {
	flex: 1;
	padding: 9px 12px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	font-size: 14px;
}
.concierge-cards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.concierge-card {
	flex: 0 0 130px;
	display: block;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	font-size: 11px;
	line-height: 1.35;
	text-decoration: none;
}
.concierge-card img { width: 100%; height: 74px; object-fit: cover; display: block; }
.concierge-card span { display: block; padding: 0 8px; }
.concierge-card-price { font-weight: 700; padding-top: 6px !important; }
.concierge-card-addr { color: var(--color-muted); }
.concierge-card-meta { color: var(--color-muted); padding-bottom: 8px !important; }

/* Price reduction indicators */
.price-drop-chip {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: #1e7a34;
	background: #eaf6ec;
	border-radius: 4px;
	padding: 3px 9px;
	margin-bottom: 8px;
}
.price-drop-inline { color: #1e7a34; font-weight: 600; }

.pulse-city { margin: 20px 0 10px; }
.pulse-row .account-stat {
	min-width: 150px;
	flex: 1;
	border-top: 3px solid var(--pulse-accent, var(--color-border));
	padding-top: 16px;
}
/* Each city row is set to that city's chart colour via inline --pulse-accent,
   so the heading, tile borders and icons all read as the same entity as the
   city's trend line below. The four metrics are told apart by their icons,
   never by colour — so it holds up for colourblind readers. */
.pulse-stat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	margin-bottom: 12px;
	background: color-mix(in srgb, var(--pulse-accent) 15%, transparent);
	color: var(--pulse-accent);
}
.pulse-stat-icon svg { width: 19px; height: 19px; display: block; }

.property-timeline th {
	text-align: left;
	padding: 8px 0;
	border-bottom: 2px solid var(--color-border);
	color: var(--color-muted);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.vow-gate-pointer {
	background: var(--color-bg-alt);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius);
	padding: 12px 16px;
	color: var(--color-muted);
}
.vow-gate-pointer a { color: var(--color-accent); font-weight: 500; }

/* Gated property-history teaser: decoy rows, blurred */
.timeline-teaser { position: relative; margin-bottom: 16px; }
.timeline-teaser-row td {
	filter: blur(5px);
	user-select: none;
	color: var(--color-muted);
}
.timeline-teaser-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.85));
}
.timeline-teaser-overlay strong {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 10px 22px;
	box-shadow: 0 4px 14px rgba(58,64,70,.15);
	color: var(--color-primary);
}

.site-footer .mb-area-select {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius);
	background: #fff;
	color: var(--color-text);
}

.mb-optin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mb-optin-select { padding: 6px 9px; border: 1px solid var(--color-border); border-radius: var(--radius); }

/* Tiny "Live" badge for live-data sections */
.live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #d21f1f;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 3px 9px;
	border-radius: 4px;
	vertical-align: middle;
	margin-left: 8px;
	line-height: 1.4;
}
.live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.neighbourhood-stats-heading { margin-bottom: 14px; }

.listing-banner-gated { font-size: 12px; font-weight: 500; }
.listing-banner-gated a { color: #fff; text-decoration: underline; }

.stat-price-gated { font-size: 15px; font-weight: 600; color: var(--color-accent); text-decoration: underline; }

/* Account deletion (privacy) */
.account-delete { margin-top: 44px; border-top: 1px solid var(--color-border); padding-top: 16px; }
.account-delete summary { cursor: pointer; color: var(--color-danger); font-weight: 600; }
.account-delete p { color: var(--color-muted); margin: 12px 0; }

/* Legal / policy pages */
.legal-page { max-width: 760px; }
.legal-page h2 { margin-top: 28px; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 8px; line-height: 1.6; }

/* Similar Listings + Recently Sold Nearby rows */
.sold-comps { margin-top: 44px; }
.sold-comps h3 { margin-bottom: 18px; }
/* Logged-out sold-comp teaser: the price shown is a decoy; blur it visually. */
.sold-teaser-price { filter: blur(5px); user-select: none; -webkit-user-select: none; }
.sold-teaser-cta { text-align: center; margin: 18px 0 0; }
.sold-teaser-cta a { color: var(--color-accent); font-weight: 600; text-decoration: underline; }

/* Neighbourhood Market Overview widget (listing detail). Caps + centres to
   match the Property Details block above it — .container is full-bleed. */
.market-overview { max-width: 1240px; margin: 44px auto 0; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-alt); }
.mo-head { margin-bottom: 18px; }
.mo-head h2 { margin: 0 0 4px; }
.mo-sub { margin: 0; color: var(--color-muted); }
.mo-table-wrap { overflow-x: auto; margin-bottom: 18px; }
/* Compact tables (like Zealty) — don't stretch across the full widget; the
   charts below use the full width instead. */
.mo-table { width: 100%; max-width: 680px; border-collapse: collapse; background: var(--color-bg); border-radius: var(--radius); overflow: hidden; }
.mo-table th, .mo-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.mo-table th:first-child, .mo-table td:first-child { text-align: left; font-weight: 500; }
.mo-table thead th { background: var(--color-primary); color: #fff; font-weight: 600; }
.mo-table tbody tr:last-child td { border-bottom: none; }
.mo-row-strong td { font-weight: 700; }
.mo-moi { font-weight: 700; color: var(--color-primary); }
.mo-yoy { font-size: 12px; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.mo-up { color: #1c7c4a; }
.mo-down { color: #c0392b; }

/* Buyer/seller balance gauge */
.mo-gauge { margin: 4px 0 22px; }
.mo-gauge-headline { margin: 0 0 12px; font-size: 15.5px; line-height: 1.5; color: var(--color-primary); }
/* overflow visible so the marker's pointer isn't clipped */
.mo-gauge-bar { position: relative; display: flex; height: 30px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.mo-gauge-seg { display: flex; align-items: center; justify-content: center; }
.mo-gauge-seg:first-child { border-radius: 6px 0 0 6px; }
.mo-gauge-seg:last-child { border-radius: 0 6px 6px 0; }
/* Warm -> neutral -> cool diverging scale: CVD-safe (orange/blue, not red/green),
   matches the widget's chart colours, and avoids implying seller's=bad/buyer's=good.
   "Hot" seller's market reads warm; "cool" buyer's market reads cool. */
.mo-seg-seller { background: #b35e18; }
.mo-seg-balanced { background: #5f6772; }
.mo-seg-buyer { background: #2f6fc1; }
.mo-gauge-marker { position: absolute; top: -5px; bottom: -5px; width: 3px; background: var(--color-primary); box-shadow: 0 0 0 2px #fff; transform: translateX(-50%); border-radius: 2px; }
/* downward triangle above the bar, pointing to the marker */
.mo-gauge-marker::after { content: ""; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--color-primary); }
.mo-gauge-plain { margin: 12px 0 0; color: var(--color-text); font-size: 14px; line-height: 1.6; }
.mo-gauge-note { margin: 8px 0 0; color: var(--color-muted); font-size: 12.5px; font-style: italic; line-height: 1.5; }
.mo-gauge-def { margin: 10px 0 0; }
.mo-gauge-def summary { display: inline-block; cursor: pointer; color: var(--color-accent); font-size: 13px; font-weight: 600; list-style: none; }
.mo-gauge-def summary::-webkit-details-marker { display: none; }
.mo-gauge-def summary::before { content: "\24D8"; margin-right: 5px; }
.mo-gauge-def[open] summary { margin-bottom: 6px; }
.mo-gauge-def p { margin: 0; color: var(--color-muted); font-size: 13px; line-height: 1.6; }

/* Trend charts */
.mo-charts { display: grid; gap: 22px; }
.mo-chart-block h3 { margin: 0 0 8px; font-size: 16px; }
.mo-chart-wrap { position: relative; height: 240px; }
.mo-fineprint { margin: 18px 0 0; font-size: 12px; color: var(--color-muted); }
.mo-fineprint a { color: var(--color-accent); text-decoration: underline; }

@media (min-width: 720px) {
	.mo-charts { grid-template-columns: 1fr 1fr; }
	.mo-chart-block:first-child { grid-column: 1 / -1; }
}
