/* Tax Burden Calculator (scoped) */
.fp-taxcalc-scope {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.fp-taxcalc-scope .fpp-section-wrapper {
	max-width: 100%;
	margin: 0;
	padding: 0;
	font-family: 'IBM Plex Sans', sans-serif;
	width: 100%;
	min-width: 0;
}

.fp-taxcalc-scope .fpp-sheet-auditor {
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
	overflow-x: hidden;
	overflow-y: visible;
	border: 1px solid var(--border-light, #e6e6e3);
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

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

.fp-taxcalc-scope .fpp-sheet-merged-header {
	grid-column: span 2;
	background: var(--fp-navy, #0c0c30);
	color: #fff;
	padding: 25px 35px;
	border-bottom: 4px solid var(--fp-gold, #b87f0d);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.fp-taxcalc-scope .fpp-title-with-info {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 5px;
}

.fp-taxcalc-scope .fpp-sheet-merged-header h1 {
	font-family: 'Vollkorn', serif;
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0;
	line-height: 1.1;
	color: #fff;
}

.fp-taxcalc-scope .fpp-info-trigger {
	position: relative;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fp-taxcalc-scope .fpp-info-trigger svg {
	width: 22px;
	height: 22px;
	fill: var(--fp-gold, #b87f0d);
	transition: 0.2s ease;
}

.fp-taxcalc-scope .fpp-info-trigger:hover svg,
.fp-taxcalc-scope .fpp-info-trigger:focus svg {
	fill: #fff;
}

.fp-taxcalc-scope .fpp-info-tooltip {
	position: absolute;
	top: 35px;
	left: 0;
	width: min(450px, 90vw);
	background: #fff;
	color: #333;
	padding: 25px;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	border-left: 4px solid var(--fp-gold, #b87f0d);
	font-size: 0.85rem;
	line-height: 1.6;
	opacity: 0;
	visibility: hidden;
	transition: 0.2s ease;
	z-index: 100;
	pointer-events: none;
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
}

.fp-taxcalc-scope .fpp-info-trigger:hover .fpp-info-tooltip,
.fp-taxcalc-scope .fpp-info-trigger:focus .fpp-info-tooltip {
	opacity: 1;
	visibility: visible;
}

.fp-taxcalc-scope .fpp-info-tooltip strong {
	color: var(--fp-navy, #0c0c30);
	font-weight: 700;
}

.fp-taxcalc-scope .fpp-sheet-merged-header > div > span {
	font-size: 0.8rem;
	color: var(--fp-gold, #b87f0d);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-weight: 700;
}

.fp-taxcalc-scope .fpp-panel-left {
	padding: 35px;
	border-right: 1px solid var(--border-light, #e6e6e3);
	background: #fff;
	min-width: 0;
}

.fp-taxcalc-scope .fpp-section-title {
	font-family: 'Vollkorn', serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--fp-navy, #0c0c30);
	margin: 0 0 1.25rem;
	border-bottom: 1px solid var(--border-light, #e6e6e3);
	padding-bottom: 8px;
}

.fp-taxcalc-scope .fpp-section-title--spaced {
	margin-top: 30px;
}

.fp-taxcalc-scope .fpp-input-group {
	margin-bottom: 1.25rem;
}

.fp-taxcalc-scope .fpp-input-group label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 6px;
	display: block;
	letter-spacing: 0.5px;
}

.fp-taxcalc-scope .fpp-sheet-input-wrap {
	display: flex;
	align-items: center;
	border: 1px solid var(--border-light, #e6e6e3);
	border-radius: 4px;
	background: #fcfcfc;
	padding: 10px 14px;
	transition: 0.2s;
	width: 100%;
}

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

.fp-taxcalc-scope .fpp-sheet-input-wrap span.prefix {
	color: #888;
	font-weight: 700;
	font-size: 0.95rem;
	margin-right: 8px;
	flex-shrink: 0;
}

.fp-taxcalc-scope .fpp-sheet-in,
.fp-taxcalc-scope .fpp-sheet-select {
	border: none;
	background: transparent;
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: var(--fp-navy, #0c0c30);
	width: 100%;
	outline: none;
}

.fp-taxcalc-scope .fpp-sheet-select {
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%230C0C30' d='M0 0l5 5 5-5z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 5px center;
	padding-right: 20px;
}

.fp-taxcalc-scope .fpp-panel-right {
	padding: 35px;
	background: #fdfdfd;
	display: flex;
	flex-direction: column;
	gap: 25px;
	min-width: 0;
}

.fp-taxcalc-scope .fpp-top-macro-rate {
	font-size: clamp(0.95rem, 2.8vw, 1.1rem);
	color: var(--fp-navy, #0c0c30);
	line-height: 1.5;
	margin-bottom: 5px;
	padding-bottom: 25px;
	border-bottom: 1px solid var(--border-light, #e6e6e3);
}

.fp-taxcalc-scope .fpp-ledger-box {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.fp-taxcalc-scope .fpp-gold-text {
	color: var(--fp-gold, #b87f0d);
	font-weight: 700;
}

.fp-taxcalc-scope .fpp-ledger-table {
	width: 100%;
	min-width: 0;
	border-collapse: collapse;
	font-size: 0.9rem;
	table-layout: fixed;
}

.fp-taxcalc-scope .fpp-ledger-table th {
	background: #f4f4f2;
	color: var(--fp-navy, #0c0c30);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.8rem;
	padding: 12px 10px;
	text-align: right;
	border-bottom: 2px solid var(--border-light, #e6e6e3);
	vertical-align: bottom;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.fp-taxcalc-scope .fpp-ledger-table th:first-child {
	text-align: left;
	width: 38%;
}

.fp-taxcalc-scope .fpp-ledger-table th:nth-child(2),
.fp-taxcalc-scope .fpp-ledger-table th:nth-child(3) {
	width: 31%;
}

.fp-taxcalc-scope .fpp-ledger-table td {
	padding: 12px 10px;
	text-align: right;
	border-bottom: 1px solid #f0f0f0;
	color: #333;
	font-weight: 500;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.fp-taxcalc-scope .fpp-ledger-table td:first-child {
	text-align: left;
	font-weight: 600;
	color: var(--fp-navy, #0c0c30);
}

.fp-taxcalc-scope .fpp-ledger-table tr.total-row td {
	background: #fdfaf4;
	font-weight: 700;
	font-size: 1rem;
	border-top: 1px solid var(--fp-gold, #b87f0d);
	border-bottom: 2px solid var(--fp-gold, #b87f0d);
	color: var(--fp-navy, #0c0c30);
}

.fp-taxcalc-scope .fpp-ledger-caption {
	font-size: 0.85rem;
	text-align: right;
	margin-top: 12px;
	font-weight: 700;
	letter-spacing: 0.2px;
	line-height: 1.45;
}

.fp-taxcalc-scope .fpp-chart-container {
	width: 100%;
	background: #fff;
	border: 1px solid var(--border-light, #e6e6e3);
	padding: 25px;
	border-radius: 4px;
}

.fp-taxcalc-scope .fpp-chart-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--fp-navy, #0c0c30);
	margin: 0 0 20px;
	letter-spacing: 0.5px;
	text-align: center;
}

.fp-taxcalc-scope .fpp-canvas-wrapper {
	position: relative;
	height: 280px;
	width: 100%;
}

.fp-taxcalc-scope .fpp-action-footer {
	grid-column: span 2;
	padding: 30px;
	background: var(--fp-navy, #0c0c30);
	display: flex;
	flex-direction: column;
	align-items: center;
	border-top: 4px solid var(--fp-gold, #b87f0d);
	color: #fff;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.fp-taxcalc-scope .fpp-action-footer h3 {
	font-family: 'Vollkorn', serif;
	font-size: 1.35rem;
	font-weight: 400;
	text-transform: none;
	color: #fff;
	margin: 0 0 10px;
	letter-spacing: 0;
	text-align: center;
	width: 100%;
}

.fp-taxcalc-scope .fpp-action-footer__desc {
	margin: 0 0 20px;
	opacity: 0.85;
	font-size: 0.9rem;
	line-height: 1.45;
	text-align: center;
	max-width: 520px;
}

.fp-taxcalc-scope .fpp-action-buttons-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	max-width: 640px;
	min-width: 0;
}

.fp-taxcalc-scope .fpp-btn-vault {
	padding: 12px 20px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 700;
	text-transform: uppercase;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: 0.3s;
	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;
	white-space: nowrap;
	flex: 1 1 180px;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
}

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

.fp-taxcalc-scope .fpp-btn-vault.primary:hover {
	background: #fff;
	color: var(--fp-navy, #0c0c30);
	border-color: #fff;
}

.fp-taxcalc-scope .fpp-btn-vault:not(.primary):hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--fp-gold, #b87f0d);
	color: var(--fp-gold, #b87f0d);
}

.fp-taxcalc-scope .fpp-btn-vault svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

@media (max-width: 950px) {
	.fp-taxcalc-scope .fpp-sheet-auditor {
		grid-template-columns: minmax(0, 1fr);
	}

	.fp-taxcalc-scope .fpp-sheet-merged-header,
	.fp-taxcalc-scope .fpp-action-footer {
		grid-column: span 1;
	}

	.fp-taxcalc-scope .fpp-sheet-merged-header {
		padding: 1.25rem 1rem;
	}

	.fp-taxcalc-scope .fpp-sheet-merged-header > div > span {
		letter-spacing: 1px;
		line-height: 1.4;
	}

	.fp-taxcalc-scope .fpp-info-tooltip {
		width: min(300px, calc(100vw - 2.5rem));
		left: 50%;
		transform: translateX(-50%);
	}

	.fp-taxcalc-scope .fpp-panel-left,
	.fp-taxcalc-scope .fpp-panel-right {
		padding: 1.25rem 1rem;
	}

	.fp-taxcalc-scope .fpp-panel-left {
		border-right: none;
		border-bottom: 1px solid var(--border-light, #e6e6e3);
	}

	.fp-taxcalc-scope .fpp-section-title--spaced {
		margin-top: 1.5rem;
	}

	.fp-taxcalc-scope .fpp-top-macro-rate {
		padding-bottom: 1rem;
	}

	.fp-taxcalc-scope .fpp-chart-container {
		padding: 1rem;
	}

	.fp-taxcalc-scope .fpp-canvas-wrapper {
		height: 240px;
	}

	.fp-taxcalc-scope .fpp-ledger-caption {
		text-align: center;
	}

	.fp-taxcalc-scope .fpp-action-footer {
		padding: 1.25rem 1rem;
	}

	.fp-taxcalc-scope .fpp-action-footer h3 {
		font-size: 1.15rem;
	}

	.fp-taxcalc-scope .fpp-action-buttons-wrap {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		max-width: 100%;
	}

	.fp-taxcalc-scope .fpp-btn-vault {
		width: 100%;
		max-width: 100%;
		flex: none;
		min-height: 44px;
		padding: 10px 8px;
		font-size: 0.68rem;
	}
}

@media (max-width: 520px) {
	.fp-taxcalc-scope .fpp-ledger-table {
		font-size: 0.78rem;
	}

	.fp-taxcalc-scope .fpp-ledger-table th {
		font-size: 0.65rem;
		padding: 8px 6px;
		letter-spacing: 0.2px;
	}

	.fp-taxcalc-scope .fpp-ledger-table td {
		padding: 10px 6px;
	}

	.fp-taxcalc-scope .fpp-ledger-table tr.total-row td {
		font-size: 0.85rem;
	}

	.fp-taxcalc-scope .fpp-sheet-in,
	.fp-taxcalc-scope .fpp-sheet-select {
		font-size: 0.9rem;
	}

	.fp-taxcalc-scope .fpp-action-buttons-wrap {
		grid-template-columns: 1fr;
	}

	.fp-taxcalc-scope .fpp-btn-vault {
		white-space: normal;
	}
}

/* Relocate / fin-toolkit panel containment */
.fp-fin-toolkit-wrap,
.fp-fin-toolkit-panel,
.fp-phase1-calc-mount .fp-taxcalc-scope {
	min-width: 0;
	max-width: 100%;
}
