/**
 * Huntsville Home Buying Power
 * All selectors are scoped under .hhbp. Typography is inherited from the site.
 */

.hhbp {
	--hhbp-navy: #102b4e;
	--hhbp-navy-2: #16395f;
	--hhbp-green: #285c32;
	--hhbp-ink: #1b2633;
	--hhbp-muted: #4a5868;
	--hhbp-line: #d6dee8;
	--hhbp-field-border: #6b7b8e;
	--hhbp-surface: #ffffff;
	--hhbp-tint: #f3f6f9;
	--hhbp-green-tint: #edf4ee;
	--hhbp-error: #a3261b;
	--hhbp-radius: 16px;
	--hhbp-radius-sm: 10px;
	--hhbp-shadow: 0 1px 2px rgba(16, 43, 78, 0.06), 0 8px 24px rgba(16, 43, 78, 0.08);

	box-sizing: border-box;
	max-width: 1080px;
	margin: 0 auto;
	color: var(--hhbp-ink);
	font-family: inherit;
	line-height: 1.6;
	overflow-wrap: break-word;
}

.hhbp *,
.hhbp *::before,
.hhbp *::after {
	box-sizing: border-box;
}

.hhbp [hidden] {
	display: none !important;
}

.hhbp h1,
.hhbp h2,
.hhbp h3,
.hhbp h4,
.hhbp h5,
.hhbp p,
.hhbp ol,
.hhbp ul {
	margin: 0;
	padding: 0;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.hhbp ol,
.hhbp ul {
	list-style: none;
}

.hhbp svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hhbp .hhbp-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
	margin-top: 0.15em;
}

.hhbp-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.hhbp a:focus-visible,
.hhbp button:focus-visible,
.hhbp input:focus-visible {
	outline: 3px solid var(--hhbp-navy-2);
	outline-offset: 3px;
}

/* Hero */

.hhbp-hero {
	display: grid;
	gap: 2rem;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: var(--hhbp-tint);
	border: 1px solid var(--hhbp-line);
	border-radius: var(--hhbp-radius);
}

.hhbp-hero__text {
	display: grid;
	gap: 0.9rem;
	max-width: 44rem;
}

.hhbp .hhbp-hero__title {
	color: var(--hhbp-navy);
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	line-height: 1.1;
}

.hhbp .hhbp-hero__subtitle {
	color: var(--hhbp-green);
	font-size: clamp(1.25rem, 2.6vw, 1.6rem);
	font-weight: 700;
	line-height: 1.25;
}

.hhbp .hhbp-hero__lead {
	color: var(--hhbp-navy);
	font-size: 1.15rem;
	font-weight: 700;
}

.hhbp .hhbp-hero__note {
	display: flex;
	gap: 0.6rem;
	padding: 0.9rem 1rem;
	color: var(--hhbp-muted);
	font-size: 0.95rem;
	background: var(--hhbp-surface);
	border: 1px solid var(--hhbp-line);
	border-radius: var(--hhbp-radius-sm);
}

.hhbp-hero__note .hhbp-icon {
	color: var(--hhbp-navy-2);
}

/* Journey graphic: payment, price range, commute, homes */

.hhbp-journey {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	align-self: center;
	counter-reset: none;
}

.hhbp-journey::before {
	content: "";
	position: absolute;
	top: 1.75rem;
	left: 12.5%;
	right: 12.5%;
	border-top: 2px dashed #9aabbf;
}

.hhbp-journey__item {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	text-align: center;
}

.hhbp-journey__icon {
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	color: var(--hhbp-navy);
	background: var(--hhbp-surface);
	border: 2px solid var(--hhbp-navy);
	border-radius: 50%;
	box-shadow: var(--hhbp-shadow);
}

.hhbp-journey__item:nth-child(3) .hhbp-journey__icon,
.hhbp-journey__item:nth-child(4) .hhbp-journey__icon {
	color: var(--hhbp-green);
	border-color: var(--hhbp-green);
}

.hhbp-journey__icon svg {
	width: 1.6rem;
	height: 1.6rem;
}

.hhbp-journey__label {
	color: var(--hhbp-navy);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.3;
}

@media (min-width: 900px) {
	.hhbp-hero {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		align-items: center;
	}

	.hhbp-journey {
		grid-template-columns: 1fr;
		gap: 1.25rem;
		justify-self: center;
	}

	.hhbp-journey::before {
		top: 1.75rem;
		bottom: 1.75rem;
		left: 1.75rem;
		right: auto;
		border-top: 0;
		border-left: 2px dashed #9aabbf;
	}

	.hhbp-journey__item {
		grid-template-columns: 3.5rem auto;
		justify-items: start;
		align-items: center;
		gap: 1rem;
		text-align: left;
	}

	.hhbp-journey__label {
		font-size: 1rem;
	}
}

/* Calculator */

.hhbp-calculator {
	margin-top: 2rem;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	background: var(--hhbp-surface);
	border: 1px solid var(--hhbp-line);
	border-radius: var(--hhbp-radius);
	box-shadow: var(--hhbp-shadow);
}

.hhbp .hhbp-noscript {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	color: var(--hhbp-navy);
	font-weight: 700;
	background: var(--hhbp-tint);
	border: 1px solid var(--hhbp-line);
	border-left: 5px solid var(--hhbp-navy);
	border-radius: var(--hhbp-radius-sm);
}

.hhbp-steps {
	display: grid;
	gap: 0;
}

.hhbp-step {
	position: relative;
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 1rem;
	padding-bottom: 2rem;
}

.hhbp-step:last-child {
	padding-bottom: 0;
}

.hhbp-step:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 3.25rem;
	bottom: 0.25rem;
	left: 1.5rem;
	border-left: 2px solid var(--hhbp-line);
}

.hhbp-step__marker {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	color: #ffffff;
	background: var(--hhbp-navy);
	border-radius: 50%;
}

.hhbp-step--result .hhbp-step__marker {
	background: var(--hhbp-green);
}

.hhbp-step__marker svg {
	width: 1.5rem;
	height: 1.5rem;
}

.hhbp-step__body {
	display: grid;
	gap: 0.75rem;
	min-width: 0;
	padding-top: 0.55rem;
}

.hhbp .hhbp-step__title {
	color: var(--hhbp-navy);
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1.3;
}

.hhbp-field {
	display: grid;
	gap: 0.5rem;
	max-width: 36rem;
}

.hhbp .hhbp-label,
.hhbp .hhbp-question {
	display: block;
	color: var(--hhbp-ink);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.4;
}

.hhbp .hhbp-help {
	color: var(--hhbp-muted);
	font-size: 0.95rem;
	max-width: 36rem;
}

.hhbp .hhbp-note {
	padding: 0.75rem 0.9rem;
	color: var(--hhbp-muted);
	font-size: 0.9rem;
	background: var(--hhbp-tint);
	border-radius: var(--hhbp-radius-sm);
}

.hhbp .hhbp-input {
	display: block;
	width: 100%;
	max-width: 22rem;
	min-height: 3.25rem;
	margin: 0;
	padding: 0.65rem 0.9rem;
	color: var(--hhbp-ink);
	font-family: inherit;
	font-size: max(16px, 1.2rem);
	font-weight: 600;
	line-height: 1.3;
	background: var(--hhbp-surface);
	border: 1.5px solid var(--hhbp-field-border);
	border-radius: var(--hhbp-radius-sm);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.hhbp .hhbp-input:focus {
	border-color: var(--hhbp-navy);
}

.hhbp .hhbp-input[aria-invalid="true"] {
	border-color: var(--hhbp-error);
	border-width: 2px;
}

.hhbp-input-group {
	display: flex;
	align-items: stretch;
	max-width: 14rem;
}

.hhbp .hhbp-input--rate {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.hhbp-input-suffix {
	display: grid;
	place-items: center;
	min-width: 3rem;
	padding: 0 0.75rem;
	color: var(--hhbp-navy);
	font-size: 1.2rem;
	font-weight: 700;
	background: var(--hhbp-tint);
	border: 1.5px solid var(--hhbp-field-border);
	border-left: 0;
	border-radius: 0 var(--hhbp-radius-sm) var(--hhbp-radius-sm) 0;
}

.hhbp .hhbp-error {
	display: flex;
	gap: 0.45rem;
	color: var(--hhbp-error);
	font-size: 0.95rem;
	font-weight: 700;
}

.hhbp .hhbp-error::before {
	content: "!";
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 1.3em;
	height: 1.3em;
	margin-top: 0.1em;
	color: #ffffff;
	font-size: 0.8em;
	font-weight: 800;
	line-height: 1;
	background: var(--hhbp-error);
	border-radius: 50%;
}

.hhbp .hhbp-rate-status {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--hhbp-muted);
	font-size: 0.95rem;
}

.hhbp--nojs .hhbp-rate-status {
	display: none;
}

.hhbp .hhbp-rate-status--fallback {
	color: var(--hhbp-navy);
	font-weight: 700;
}

.hhbp-spinner {
	flex: none;
	width: 1rem;
	height: 1rem;
	border: 2px solid var(--hhbp-line);
	border-top-color: var(--hhbp-navy);
	border-radius: 50%;
	animation: hhbp-spin 0.9s linear infinite;
}

@keyframes hhbp-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hhbp-spinner {
		animation: none;
		border-top-color: var(--hhbp-line);
		border-right-color: var(--hhbp-navy);
	}
}

.hhbp .hhbp-rate-source {
	color: var(--hhbp-muted);
	font-size: 0.95rem;
}

.hhbp .hhbp-rate-source a {
	color: var(--hhbp-green);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hhbp .hhbp-rate-source a:hover {
	color: var(--hhbp-navy);
}

/* Calculate button */

.hhbp .hhbp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	min-height: 3.25rem;
	margin: 0.25rem 0 0;
	padding: 0.8rem 1.75rem;
	color: #ffffff;
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	background: var(--hhbp-green);
	border: 2px solid var(--hhbp-green);
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(40, 92, 50, 0.25);
	cursor: pointer;
}

.hhbp .hhbp-button:hover:not(:disabled) {
	background: var(--hhbp-navy);
	border-color: var(--hhbp-navy);
}

.hhbp .hhbp-button:disabled {
	color: #ffffff;
	background: #6f7f8f;
	border-color: #6f7f8f;
	box-shadow: none;
	cursor: not-allowed;
}

.hhbp .hhbp-changed {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	color: var(--hhbp-navy);
	font-weight: 700;
	background: var(--hhbp-tint);
	border: 1px dashed var(--hhbp-navy-2);
	border-radius: var(--hhbp-radius-sm);
}

/* Result */

.hhbp-result {
	overflow: hidden;
	border: 1px solid var(--hhbp-line);
	border-radius: var(--hhbp-radius);
	box-shadow: var(--hhbp-shadow);
}

.hhbp-result__summary {
	display: grid;
	gap: 0.75rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	color: #ffffff;
	background: var(--hhbp-navy);
}

.hhbp .hhbp-result__heading {
	color: #ffffff;
	font-size: 1.1rem;
	font-weight: 700;
}

.hhbp .hhbp-result__range {
	color: #ffffff;
	font-size: clamp(2rem, 7vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.hhbp-result__bar {
	position: relative;
	height: 0.6rem;
	max-width: 28rem;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 999px;
}

.hhbp-result__bar span {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 20%;
	right: 20%;
	background: #ffffff;
	border-radius: 999px;
}

.hhbp-result__bar span::before,
.hhbp-result__bar span::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 1rem;
	height: 1rem;
	background: #ffffff;
	border: 3px solid var(--hhbp-navy);
	border-radius: 50%;
	transform: translateY(-50%);
}

.hhbp-result__bar span::before {
	left: -0.5rem;
}

.hhbp-result__bar span::after {
	right: -0.5rem;
}

.hhbp .hhbp-result__copy {
	color: rgba(255, 255, 255, 0.92);
	max-width: 40rem;
}

.hhbp .hhbp-result__planning {
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 700;
}

.hhbp-result__details {
	display: grid;
	gap: 1rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	background: var(--hhbp-surface);
}

.hhbp .hhbp-callout {
	display: flex;
	gap: 0.65rem;
	padding: 1rem 1.1rem;
	border-radius: var(--hhbp-radius-sm);
}

.hhbp .hhbp-callout--cash {
	color: var(--hhbp-ink);
	background: var(--hhbp-green-tint);
	border-left: 5px solid var(--hhbp-green);
}

.hhbp-callout--cash .hhbp-icon {
	color: var(--hhbp-green);
}

.hhbp .hhbp-callout--warning {
	color: var(--hhbp-ink);
	background: var(--hhbp-tint);
	border: 1px solid var(--hhbp-line);
	border-left: 5px solid var(--hhbp-navy);
}

.hhbp-callout--warning .hhbp-icon {
	color: var(--hhbp-navy);
}

.hhbp .hhbp-assumptions__heading {
	color: var(--hhbp-navy);
	font-size: 1rem;
	font-weight: 800;
}

.hhbp-assumptions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 0.5rem 1.5rem;
}

.hhbp-assumptions li {
	position: relative;
	padding-left: 1.4rem;
	color: var(--hhbp-ink);
	font-size: 0.95rem;
}

.hhbp-assumptions li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 0.2rem;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--hhbp-green);
	border-radius: 50%;
}

.hhbp-assumption-notes {
	display: grid;
	gap: 0.5rem;
	padding-top: 1rem;
	color: var(--hhbp-muted);
	font-size: 0.9rem;
	border-top: 1px solid var(--hhbp-line);
}

/* Huntsville Commute Home Finder CTA */

.hhbp-cta {
	position: relative;
	margin-top: 2.5rem;
	overflow: hidden;
	color: #ffffff;
	background: var(--hhbp-navy);
	border-radius: var(--hhbp-radius);
	box-shadow: 0 12px 36px rgba(16, 43, 78, 0.28);
}

.hhbp-cta__map {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	opacity: 0.55;
	pointer-events: none;
}

.hhbp-cta__grid path {
	stroke: rgba(255, 255, 255, 0.07);
	stroke-width: 1;
}

.hhbp-cta__road {
	stroke: var(--hhbp-navy-2);
	stroke-width: 26;
}

.hhbp-cta__route {
	stroke: #ffffff;
	stroke-width: 4;
	stroke-dasharray: 2 12;
}

.hhbp-cta__start {
	fill: var(--hhbp-navy);
	stroke: #ffffff;
	stroke-width: 4;
}

.hhbp-cta__pin path {
	fill: #ffffff;
	stroke: none;
}

.hhbp-cta__pin circle {
	fill: var(--hhbp-green);
	stroke: none;
}

.hhbp-cta__inner {
	position: relative;
	display: grid;
	gap: 0.9rem;
	max-width: 40rem;
	padding: clamp(1.75rem, 5vw, 3.25rem);
}

.hhbp .hhbp-cta__heading {
	color: #ffffff;
	font-size: clamp(1.6rem, 4vw, 2.35rem);
	font-weight: 800;
	line-height: 1.15;
}

.hhbp .hhbp-cta__support {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.1rem;
}

.hhbp .hhbp-cta__subheading {
	margin-top: 0.5rem;
	color: #ffffff;
	font-size: clamp(1.15rem, 2.6vw, 1.4rem);
	font-weight: 700;
	line-height: 1.3;
}

.hhbp .hhbp-cta__copy {
	color: rgba(255, 255, 255, 0.92);
}

.hhbp-cta__benefits {
	display: grid;
	gap: 0.55rem;
	margin: 0.25rem 0 0.5rem;
}

.hhbp .hhbp-cta__benefits li {
	position: relative;
	padding-left: 2rem;
	color: #ffffff;
	font-weight: 600;
}

.hhbp-cta__benefits li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.3rem;
	height: 1.3rem;
	background: var(--hhbp-navy-2);
	border: 2px solid #ffffff;
	border-radius: 50%;
}

.hhbp-cta__benefits li::after {
	content: "";
	position: absolute;
	top: 0.52em;
	left: 0.42rem;
	width: 0.45rem;
	height: 0.25rem;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: rotate(-45deg);
}

.hhbp .hhbp-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	justify-self: start;
	min-height: 3.5rem;
	padding: 0.9rem 1.9rem;
	color: var(--hhbp-navy);
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	background: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.hhbp .hhbp-cta__button:hover {
	color: #ffffff;
	background: var(--hhbp-green);
	border-color: #ffffff;
}

.hhbp .hhbp-cta__button:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 4px;
}

.hhbp-cta__arrow {
	font-size: 1.25em;
	line-height: 1;
}

@media (min-width: 900px) {
	.hhbp-cta__map {
		width: 60%;
		opacity: 1;
	}

	.hhbp-cta__inner {
		max-width: 58%;
	}
}

/* Disclaimer */

.hhbp .hhbp-disclaimer {
	margin-top: 1.75rem;
	padding: 0 0.25rem;
	color: var(--hhbp-muted);
	font-size: 0.85rem;
}

/* Small screens */

@media (max-width: 599px) {
	.hhbp-step {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.6rem;
	}

	.hhbp-step:not(:last-child)::before {
		display: none;
	}

	.hhbp-step__marker {
		width: 2.5rem;
		height: 2.5rem;
	}

	.hhbp-step__body {
		padding-top: 0;
	}

	.hhbp .hhbp-input {
		max-width: none;
	}

	.hhbp .hhbp-button,
	.hhbp .hhbp-cta__button {
		justify-self: stretch;
		width: 100%;
	}

	.hhbp-journey {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.6rem;
	}

	.hhbp-journey::before {
		display: none;
	}

	.hhbp-journey__item {
		grid-template-columns: 2.75rem minmax(0, 1fr);
		justify-items: start;
		align-items: center;
		gap: 0.6rem;
		text-align: left;
	}

	.hhbp-journey__icon {
		width: 2.75rem;
		height: 2.75rem;
	}

	.hhbp-journey__icon svg {
		width: 1.35rem;
		height: 1.35rem;
	}
}
