/* Homeowner Tax Benefit Analyzer */
.fp-interactive-wrapper.fp-tool-root--homeowner-tax-benefit-analyzer {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: clip;
}

.fp-htb-scope {
	--fp-gold: #b87f0d;
	--fp-navy: #0c0c30;
	--border-light: #e6e6e3;
	--fp-bg-light: #fcfcfc;
	--fp-safe: #10b981;
	--fp-danger: #ef4444;
}

.fp-htb-scope .fpp-section-wrapper {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.fp-htb-scope .fpp-sheet-auditor {
	background: #fff;
	border-radius: 4px;
	box-shadow: var(--shadow-card, 0 12px 40px rgba(0, 0, 0, 0.06));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	overflow-x: clip;
	border: 1px solid var(--border-light, #e6e6e3);
	font-family: 'IBM Plex Sans', sans-serif;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	container-type: inline-size;
	container-name: fp-htb-auditor;
}

.fp-htb-scope .fpp-sheet-auditor * {
	box-sizing: border-box;
}

/* Header (navy band + CTA) */
.fp-htb-scope .fpp-sheet-auditor .fpp-sheet-merged-header {
	position: relative;
	z-index: 20;
	background: var(--fp-navy, #0c0c30);
	color: #fff;
	padding: 25px 30px;
	border-bottom: 4px solid var(--fp-gold, #b87f0d);
}

.fp-htb-scope .fpp-sheet-merged-header--cta {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 15px;
}

.fp-htb-scope .fpp-header-titles {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	flex: 1 1 auto;
}

.fp-htb-scope .fpp-sheet-auditor .fpp-sheet-merged-header h1 {
	font-family: 'Vollkorn', serif;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	margin: 0;
	line-height: 1.1;
	color: #fff;
	text-transform: none !important;
	word-break: break-word;
}

.fp-htb-scope .fpp-protocol-line {
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.82);
	margin: 0;
	line-height: 1.5;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.fp-htb-scope .fpp-btn-explore {
	flex: 0 1 auto;
	align-self: center;
	max-width: 100%;
	margin: 0;
	background: var(--fp-gold, #b87f0d);
	color: var(--fp-navy, #0c0c30);
	padding: 12px 24px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 1px;
	line-height: 1.3;
	transition: 0.3s ease;
	border: 1px solid transparent;
	text-align: center;
	white-space: normal;
	overflow-wrap: break-word;
}

.fp-htb-scope .fpp-btn-explore:hover,
.fp-htb-scope .fpp-btn-explore:focus {
	background: #fff;
	color: var(--fp-navy, #0c0c30);
	box-shadow: 0 4px 15px rgba(184, 127, 13, 0.4);
}

/* Grid */
.fp-htb-scope .fpp-htb-calc-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: start;
	width: 100%;
	min-width: 0;
}

/* Inputs */
.fp-htb-scope .fpp-htb-inputs {
	padding: 40px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.fp-htb-scope .fpp-htb-subhead {
	font-family: 'Vollkorn', serif;
	font-size: 1.3rem;
	color: var(--fp-navy, #0c0c30);
	margin: 15px 0 0 0;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-light, #e6e6e3);
	display: block;
	font-weight: 600;
}

.fp-htb-scope .fpp-htb-subhead:first-of-type {
	margin-top: 0;
}

.fp-htb-scope .fpp-htb-input-split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.fp-htb-scope .fpp-htb-input-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fp-htb-scope .fpp-htb-input-group label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--fp-navy, #0c0c30);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
	line-height: 1.3;
	white-space: normal;
	flex: 1 1 auto;
}

.fp-htb-scope .fpp-htb-lbl-sub {
	text-transform: none;
	font-weight: 500;
	color: #888;
	font-size: 0.75rem;
	letter-spacing: 0;
}

.fp-htb-scope .fpp-htb-note {
	font-size: 0.78rem;
	line-height: 1.4;
	color: #888;
	margin-top: -5px;
	font-style: italic;
}

.fp-htb-scope .fpp-htb-input-row {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid var(--border-light, #e6e6e3);
	border-radius: 4px;
	overflow: hidden;
	transition: 0.3s border;
}

.fp-htb-scope .fpp-htb-input-row:focus-within {
	border-color: var(--fp-gold, #b87f0d);
	box-shadow: 0 0 0 3px rgba(184, 127, 13, 0.1);
}

.fp-htb-scope .fpp-htb-input-prefix,
.fp-htb-scope .fpp-htb-input-suffix {
	background: var(--fp-bg-light, #fcfcfc);
	color: #666;
	padding: 12px 15px;
	font-weight: 600;
	font-size: 0.95rem;
	border-right: 1px solid var(--border-light, #e6e6e3);
	white-space: nowrap;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fp-htb-scope .fpp-htb-input-suffix {
	border-right: none;
	border-left: 1px solid var(--border-light, #e6e6e3);
}

.fp-htb-scope .fpp-htb-input-row input,
.fp-htb-scope .fpp-htb-input-row select {
	flex: 1;
	border: none;
	padding: 12px 15px;
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: 1rem;
	color: var(--fp-navy, #0c0c30);
	font-weight: 600;
	width: 100%;
	outline: none;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
	min-width: 0;
	background: transparent;
	cursor: pointer;
}

.fp-htb-scope .fpp-htb-input-row select {
	appearance: auto;
	-moz-appearance: auto;
	text-align: left;
	text-align-last: center;
}

.fp-htb-scope .fpp-htb-input-row input::-webkit-outer-spin-button,
.fp-htb-scope .fpp-htb-input-row input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Results (navy panel) */
.fp-htb-scope .fpp-htb-results {
	background: var(--fp-navy, #0c0c30);
	padding: 40px;
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	position: sticky;
	top: 30px;
	margin: 40px 40px 40px 0;
	border-radius: 4px;
	min-width: 0;
}

.fp-htb-scope .fpp-htb-grand-total {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(184, 127, 13, 0.4);
	border-radius: 4px;
	padding: 25px;
	text-align: center;
	margin-bottom: 25px;
}

.fp-htb-scope .fpp-htb-grand-total span {
	display: block;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #fff;
	font-weight: 700;
	margin-bottom: 10px;
}

.fp-htb-scope .fpp-htb-big-number {
	font-family: 'Vollkorn', serif;
	font-size: clamp(1.8rem, 5vw, 2.5rem);
	color: var(--fp-gold, #b87f0d);
	margin: 0;
	line-height: 1.1;
}

.fp-htb-scope .fpp-htb-big-number.fpp-htb-badge-safe {
	color: var(--fp-safe, #10b981);
}

.fp-htb-scope .fpp-htb-result-block {
	margin-bottom: 20px;
}

.fp-htb-scope .fpp-htb-block-title {
	margin: 0 0 10px 0;
	color: var(--fp-gold, #b87f0d);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
}

.fp-htb-scope .fpp-htb-result-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
	gap: 12px;
}

.fp-htb-scope .fpp-htb-result-row:last-child {
	border-bottom: none;
}

.fp-htb-scope .fpp-htb-result-row.fpp-htb-total-row {
	border-bottom: none;
	border-top: 1px solid rgba(255, 255, 255, 0.4);
	margin-top: 5px;
	padding-top: 15px;
}

.fp-htb-scope .fpp-htb-result-label {
	font-size: 0.9rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
}

.fp-htb-scope .fpp-htb-result-label--strong {
	font-weight: 700;
	color: #fff;
}

.fp-htb-scope .fpp-htb-result-val {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	text-align: right;
}

.fp-htb-scope .fpp-htb-result-val--gold {
	color: var(--fp-gold, #b87f0d);
}

/* Chart */
.fp-htb-scope .fpp-htb-chart-container {
	margin-top: 30px;
	padding-top: 25px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	text-align: center;
}

.fp-htb-scope .fpp-htb-chart-container h4 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--fp-gold, #b87f0d);
	font-weight: 700;
	margin: 0 0 15px 0;
}

.fp-htb-scope .fpp-htb-canvas-wrapper {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	position: relative;
	height: 200px;
	min-width: 0;
}

/* Action footer (navy band) */
.fp-htb-scope .fpp-sheet-auditor .fpp-action-footer {
	padding: 30px;
	background: var(--fp-navy, #0c0c30);
	display: flex;
	flex-direction: column;
	align-items: center;
	border-top: 4px solid var(--fp-gold, #b87f0d);
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0;
	flex-shrink: 0;
	border-radius: 0 0 4px 4px;
}

.fp-htb-scope .fpp-action-footer h3,
.fp-htb-scope .fpp-action-footer__desc {
	display: none !important;
}

.fp-htb-scope .fpp-action-buttons-wrap {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	max-width: 720px;
}

.fp-htb-scope .fpp-action-footer .fpp-btn-vault {
	padding: 12px 16px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	font-size: 0.75rem;
	gap: 8px;
	cursor: pointer;
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	font-family: 'IBM Plex Sans', sans-serif;
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
}

.fp-htb-scope .fpp-action-footer .fpp-btn-vault svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.fp-htb-scope .fpp-action-footer .fpp-btn-vault.primary {
	background: var(--fp-gold, #b87f0d);
	color: var(--fp-navy, #0c0c30);
	border-color: var(--fp-gold, #b87f0d);
}

.fp-htb-scope .fpp-action-footer .fpp-btn-vault.primary:hover {
	background: #d4a017;
	border-color: #d4a017;
}

.fp-htb-scope .fpp-action-footer .fpp-btn-vault:not(.primary):hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.5);
}

/* Container query responsiveness */
@container fp-htb-auditor (max-width: 850px) {
	.fp-htb-scope .fpp-htb-calc-grid {
		grid-template-columns: 1fr;
	}

	.fp-htb-scope .fpp-htb-input-split {
		grid-template-columns: 1fr;
	}

	.fp-htb-scope .fpp-htb-inputs {
		padding: 30px 20px;
	}

	.fp-htb-scope .fpp-htb-results {
		position: relative;
		top: 0;
		margin: 0;
		border-radius: 0;
		padding: 30px 20px;
	}
}

/* Mobile */
@media (max-width: 850px) {
	.fp-htb-scope .fpp-htb-calc-grid {
		grid-template-columns: 1fr;
	}

	.fp-htb-scope .fpp-htb-input-split {
		grid-template-columns: 1fr;
	}

	.fp-htb-scope .fpp-htb-inputs {
		padding: 30px 20px;
	}

	.fp-htb-scope .fpp-sheet-auditor .fpp-sheet-merged-header {
		padding: 25px 20px;
	}

	.fp-htb-scope .fpp-sheet-merged-header--cta {
		flex-direction: column;
		align-items: stretch;
	}

	.fp-htb-scope .fpp-btn-explore {
		align-self: stretch;
		width: 100%;
	}

	.fp-htb-scope .fpp-htb-results {
		position: relative;
		top: 0;
		margin: 0;
		border-radius: 0;
		padding: 30px 20px;
	}

	.fp-htb-scope .fpp-htb-big-number {
		font-size: 1.8rem;
	}

	.fp-htb-scope .fpp-action-buttons-wrap {
		flex-wrap: wrap;
	}

	.fp-htb-scope .fpp-action-footer .fpp-btn-vault {
		flex: 1 1 100%;
	}
}
