.bgv-calculator {
	--bgv-primary: #1f4e79;
	--bgv-primary-dark: #163a5c;
	--bgv-text: #263238;
	--bgv-muted: #5f6b76;
	--bgv-soft: #f4f7fa;
	--bgv-blue-soft: #eaf3fa;
	--bgv-border: #dce3e8;
	--bgv-warn: #fff8e7;
	color: var(--bgv-text);
	max-width: 1050px;
	margin: 0 auto;
}

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

.bgv-panel {
	background: #fff;
	border: 1px solid var(--bgv-border);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(27, 48, 68, 0.06);
	padding: clamp(20px, 4vw, 42px);
}

.bgv-header h2,
.bgv-result-header h2 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: clamp(1.65rem, 3vw, 2.15rem);
	line-height: 1.2;
}

.bgv-header > p {
	font-size: 1.05rem;
	line-height: 1.65;
	margin-bottom: 24px;
}

.bgv-tax-note,
.bgv-data-note,
.bgv-assumptions,
.bgv-result-disclaimer {
	padding: 15px 18px;
	border-radius: 7px;
	line-height: 1.55;
}

.bgv-tax-note {
	background: var(--bgv-soft);
	border-left: 4px solid var(--bgv-primary);
	margin-bottom: 14px;
}

.bgv-data-note,
.bgv-result-disclaimer {
	background: var(--bgv-warn);
	border: 1px solid #efdfac;
	margin-bottom: 28px;
}

.bgv-form {
	border-top: 1px solid var(--bgv-border);
}

.bgv-field-row {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
	gap: clamp(22px, 4vw, 48px);
	align-items: center;
	padding: 24px 0;
	border-bottom: 1px solid var(--bgv-border);
}

.bgv-field label:not(.bgv-checkbox),
.bgv-label,
.bgv-fieldset legend {
	display: block;
	font-weight: 700;
	margin-bottom: 9px;
	line-height: 1.35;
}

.bgv-fieldset {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.bgv-inline-options {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.bgv-inline-options label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-weight: 500;
}

.bgv-calculator input[type="number"],
.bgv-calculator select {
	width: 100%;
	min-height: 48px;
	border: 1px solid #aebbc6;
	border-radius: 6px;
	background: #fff;
	color: var(--bgv-text);
	font: inherit;
	padding: 10px 12px;
}

.bgv-calculator input[type="number"]:focus,
.bgv-calculator select:focus,
.bgv-calculator button:focus-visible,
.bgv-calculator a:focus-visible {
	outline: 3px solid rgba(31, 78, 121, 0.25);
	outline-offset: 2px;
	border-color: var(--bgv-primary);
}

.bgv-input-suffix {
	display: flex;
	align-items: stretch;
}

.bgv-input-suffix input {
	border-radius: 6px 0 0 6px !important;
}

.bgv-input-suffix span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	border: 1px solid #aebbc6;
	border-left: 0;
	border-radius: 0 6px 6px 0;
	background: var(--bgv-soft);
	font-weight: 700;
}

.bgv-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 500;
}

.bgv-checkbox input,
.bgv-inline-options input {
	width: 18px;
	height: 18px;
	accent-color: var(--bgv-primary);
}

.bgv-help {
	color: var(--bgv-muted);
	line-height: 1.55;
	margin: 0;
	font-size: 0.95rem;
}

.bgv-conditional {
	background: var(--bgv-blue-soft);
	margin-inline: -18px;
	padding-inline: 18px;
}

.bgv-assumptions {
	background: var(--bgv-soft);
	margin-top: 26px;
}

.bgv-form-error {
	color: #8a1c1c;
	background: #fff0f0;
	border: 1px solid #efbaba;
	border-radius: 6px;
	padding: 12px 15px;
	margin-top: 18px;
}

.bgv-actions,
.bgv-result-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 28px;
}

.bgv-primary-button,
.bgv-secondary-button,
.bgv-back-button {
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	border-radius: 6px;
	padding: 13px 25px;
}

.bgv-primary-button {
	border: 1px solid var(--bgv-primary);
	background: var(--bgv-primary);
	color: #fff;
	min-width: 220px;
}

.bgv-primary-button:hover {
	background: var(--bgv-primary-dark);
	border-color: var(--bgv-primary-dark);
}

.bgv-secondary-button {
	border: 1px solid var(--bgv-primary);
	background: #fff;
	color: var(--bgv-primary);
}

.bgv-result-actions .bgv-secondary-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 175px;
	min-height: 48px;
	line-height: 1.2;
}

.bgv-back-button {
	border: 0;
	padding: 0;
	background: transparent;
	color: var(--bgv-primary);
	margin-bottom: 20px;
}

.bgv-main-result {
	background: var(--bgv-blue-soft);
	border-left: 5px solid var(--bgv-primary);
	border-radius: 7px;
	padding: clamp(26px, 4vw, 38px);
	margin: 24px 0 28px;
	text-align: center;
	display: grid;
	grid-template-rows: auto auto auto;
	align-content: center;
	justify-items: center;
	row-gap: 24px;
	min-height: 420px;
}

.bgv-calculator .bgv-main-result .bgv-main-intro {
	font-size: 1.08rem;
	line-height: 1.6;
	margin: 0 !important;
	max-width: 880px;
}

.bgv-main-amounts {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: 4px;
	width: 100%;
}

.bgv-calculator .bgv-main-result .bgv-big-number {
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 800;
	line-height: 1.1;
	color: var(--bgv-primary-dark);
	margin: 0 !important;
	padding: 0 !important;
}

.bgv-calculator .bgv-main-result .bgv-secondary-number {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 !important;
	padding: 0 !important;
}

.bgv-calculator .bgv-main-result .bgv-result-explanation {
	font-size: 0.94rem;
	line-height: 1.55;
	color: var(--bgv-muted);
	margin: 0 !important;
	max-width: 760px;
}

.bgv-result-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.bgv-result-card {
	position: relative;
	border: 1px solid var(--bgv-border);
	border-radius: 8px;
	padding: 22px;
	text-align: center;
	min-height: 185px;
}

.bgv-result-card h3 {
	position: absolute;
	top: 22px;
	left: 22px;
	right: 22px;
	font-size: 1rem;
	line-height: 1.35;
	margin: 0;
}

.bgv-card-value {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 44px);
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1;
	color: var(--bgv-primary-dark);
	margin: 0;
}

.bgv-result-card > p:last-child {
	position: absolute;
	left: 22px;
	right: 22px;
	bottom: 22px;
	color: var(--bgv-muted);
	font-size: 0.9rem;
	margin: 0;
	line-height: 1.35;
}

.bgv-calculator [hidden] {
	display: none !important;
}

@media (max-width: 720px) {
	.bgv-main-result {
		min-height: 360px;
		row-gap: 18px;
	}

	.bgv-field-row {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 21px 0;
	}

	.bgv-help {
		background: var(--bgv-soft);
		border-radius: 5px;
		padding: 10px 12px;
	}

	.bgv-conditional {
		margin-inline: -10px;
		padding-inline: 10px;
	}

	.bgv-result-grid {
		grid-template-columns: 1fr;
	}

	.bgv-actions,
	.bgv-result-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.bgv-primary-button,
	.bgv-secondary-button {
		width: 100%;
	}

	.bgv-actions a,
	.bgv-result-actions a {
		text-align: center;
	}
}


.bgv-button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	line-height: 1.2;
}

.bgv-details {
	max-width: 950px;
	margin: 0 auto;
	color: var(--bgv-text, #263238);
}

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

.bgv-details-header h1 {
	margin-top: 0;
	margin-bottom: 14px;
	font-size: clamp(2rem, 4vw, 2.7rem);
	line-height: 1.15;
}

.bgv-details-header p {
	font-size: 1.05rem;
	line-height: 1.65;
	margin-bottom: 24px;
}

.bgv-details-note {
	background: #fff8e7;
	border: 1px solid #efdfac;
	border-radius: 7px;
	padding: 16px 18px;
	line-height: 1.55;
	margin-bottom: 28px;
}

.bgv-detail-step {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 20px;
	padding: 28px 0;
	border-top: 1px solid #dce3e8;
}

.bgv-detail-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #1f4e79;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 800;
}

.bgv-detail-step h2,
.bgv-detail-conclusion h2 {
	margin: 0 0 14px;
	font-size: clamp(1.25rem, 2.5vw, 1.55rem);
	line-height: 1.3;
}

.bgv-detail-step ul {
	margin: 0 0 16px 1.15rem;
	padding: 0;
	line-height: 1.6;
}

.bgv-detail-step li + li {
	margin-top: 7px;
}

.bgv-detail-formula {
	background: #eaf3fa;
	border-left: 4px solid #1f4e79;
	border-radius: 5px;
	padding: 13px 16px;
	font-weight: 700;
	line-height: 1.45;
}

.bgv-detail-conclusion {
	background: #f4f7fa;
	border-radius: 8px;
	padding: 24px;
	margin-top: 10px;
}

.bgv-detail-formula-strong {
	margin-top: 16px;
	font-size: 1.05rem;
}

.bgv-detail-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 28px;
}

@media (max-width: 620px) {
	.bgv-detail-step {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.bgv-detail-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.bgv-detail-actions .bgv-primary-button,
	.bgv-detail-actions a {
		width: 100%;
		text-align: center;
	}
}


.bgv-data-status {
	color: var(--bgv-muted, #5f6b76);
	font-size: 0.86rem;
	line-height: 1.45;
	margin: -12px 0 0;
}

.bgv-details-empty {
	background: #fff8e7;
	border: 1px solid #efdfac;
	border-radius: 8px;
	padding: 22px;
	margin: 26px 0;
}

.bgv-detail-values dl {
	margin: 0 0 18px;
}

.bgv-detail-values dl > div {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.6fr);
	gap: 18px;
	padding: 9px 0;
	border-bottom: 1px solid #e5eaee;
}

.bgv-detail-values dt,
.bgv-detail-values dd {
	margin: 0;
}

.bgv-detail-values dd {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.bgv-detail-values .bgv-detail-emphasis {
	background: #f4f7fa;
	border-radius: 5px;
	border-bottom: 0;
	padding: 11px 12px;
	margin-top: 5px;
	font-weight: 800;
}

.bgv-detail-warnings ul {
	margin-bottom: 0;
}

@media (max-width: 620px) {
	.bgv-detail-values dl > div {
		grid-template-columns: 1fr;
		gap: 3px;
	}
	.bgv-detail-values dd {
		text-align: left;
	}
}
