.cfcfe-calculator {
	--cfcfe-accent: #1d4ed8;
	--cfcfe-track: #d1d5db;
	--cfcfe-credit-off-bg: #f3f4f6;
	--cfcfe-credit-off-text: #6b7280;
	--cfcfe-credit-off-border: #d1d5db;
	--cfcfe-credit-selected-bg: #1d4ed8;
	--cfcfe-credit-selected-text: #fff;
	--cfcfe-credit-selected-border: #1d4ed8;
	box-sizing: border-box;
	width: 100%;
	background: #fff;
	border-radius: 18px;
	padding: 36px;
	color: #111827;
}

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

.cfcfe-title,
.cfcfe-step-title,
.cfcfe-results-title,
.cfcfe-question,
.cfcfe-results-prompt,
.cfcfe-results-note {
	margin-top: 0;
}

.cfcfe-title {
	margin-bottom: 32px;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.15;
}

.cfcfe-section + .cfcfe-section,
.cfcfe-results {
	margin-top: 36px;
	padding-top: 36px;
	border-top: 1px solid #e5e7eb;
}

.cfcfe-step-title,
.cfcfe-results-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	font-size: 1.35rem;
	line-height: 1.25;
}

.cfcfe-step-number {
	display: inline-grid;
	place-items: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--cfcfe-accent);
	color: #fff;
	font-size: 0.9rem;
}

.cfcfe-fieldset {
	min-width: 0;
	margin: 0 0 32px;
	padding: 0;
	border: 0;
}

.cfcfe-question {
	display: block;
	margin-bottom: 14px;
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
}

.cfcfe-toggle-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-width: 420px;
}

.cfcfe-choice {
	display: block;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cfcfe-choice input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.cfcfe-choice-label {
	display: block;
	padding: 13px 20px;
	border: 2px solid transparent;
	border-radius: 9px;
	background: #f3f4f6;
	color: #374151;
	font-weight: 600;
	text-align: center;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.cfcfe-choice input:checked + .cfcfe-choice-label {
	background: var(--cfcfe-accent);
	color: #fff;
}

.cfcfe-choice input:focus-visible + .cfcfe-choice-label,
.cfcfe-range:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--cfcfe-accent), transparent 55%);
	outline-offset: 3px;
}

.cfcfe-credit-group {
	padding-bottom: 8px;
}

.cfcfe-range {
	--cfcfe-fill: 0%;
	display: block;
	width: 100%;
	height: 28px;
	margin: 8px 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cfcfe-range::-webkit-slider-runnable-track {
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--cfcfe-accent) 0 var(--cfcfe-fill), var(--cfcfe-track) var(--cfcfe-fill) 100%);
}

.cfcfe-range::-moz-range-track {
	height: 8px;
	border-radius: 999px;
	background: var(--cfcfe-track);
}

.cfcfe-range::-moz-range-progress {
	height: 8px;
	border-radius: 999px;
	background: var(--cfcfe-accent);
}

.cfcfe-range::-webkit-slider-thumb {
	width: 24px;
	height: 24px;
	margin-top: -8px;
	border: 4px solid #fff;
	border-radius: 50%;
	background: var(--cfcfe-accent);
	box-shadow: 0 1px 5px rgb(0 0 0 / 28%);
	appearance: none;
	-webkit-appearance: none;
}

.cfcfe-range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 4px solid #fff;
	border-radius: 50%;
	background: var(--cfcfe-accent);
	box-shadow: 0 1px 5px rgb(0 0 0 / 28%);
}

.cfcfe-credit-labels {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.cfcfe-calculator .cfcfe-credit-option,
.cfcfe-calculator .cfcfe-credit-option:hover,
.cfcfe-calculator .cfcfe-credit-option:focus {
	min-width: 0;
	width: 100%;
	padding: 8px 4px;
	border-width: 1px !important;
	border-style: solid !important;
	border-color: var(--cfcfe-credit-off-border) !important;
	border-radius: 8px;
	background: var(--cfcfe-credit-off-bg) !important;
	background-image: none !important;
	box-shadow: none;
	color: var(--cfcfe-credit-off-text) !important;
	font: inherit;
	text-align: center;
	text-decoration: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cfcfe-calculator .cfcfe-credit-option span {
	color: inherit;
}

.cfcfe-credit-name,
.cfcfe-credit-score {
	display: block;
}

.cfcfe-credit-name {
	font-weight: 650;
}

.cfcfe-credit-score {
	margin-top: 2px;
	font-size: 0.82em;
}

.cfcfe-calculator .cfcfe-credit-option.is-selected,
.cfcfe-calculator .cfcfe-credit-option.is-selected:hover,
.cfcfe-calculator .cfcfe-credit-option.is-selected:focus {
	border-color: var(--cfcfe-credit-selected-border) !important;
	background: var(--cfcfe-credit-selected-bg) !important;
	background-image: none !important;
	color: var(--cfcfe-credit-selected-text) !important;
}

.cfcfe-amount-value {
	display: block;
	margin: 4px 0 12px;
	color: var(--cfcfe-accent);
	font-size: clamp(2rem, 6vw, 3.4rem);
	font-weight: 750;
	line-height: 1.1;
}

.cfcfe-range-ends {
	display: flex;
	justify-content: space-between;
	color: #6b7280;
	font-size: 0.82rem;
	font-weight: 600;
}

.cfcfe-results-prompt {
	margin-bottom: 18px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #eff6ff;
	color: #1e40af;
}

.cfcfe-result-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.cfcfe-result-card {
	min-width: 0;
	padding: 20px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f8fafc;
	text-align: center;
}

.cfcfe-result-term,
.cfcfe-result-payment,
.cfcfe-result-period {
	display: block;
}

.cfcfe-result-term {
	margin-bottom: 9px;
	color: #6b7280;
	font-size: 0.88rem;
	font-weight: 650;
}

.cfcfe-result-payment {
	overflow-wrap: anywhere;
	color: #111827;
	font-size: clamp(1.25rem, 2.3vw, 1.75rem);
	line-height: 1.15;
}

.cfcfe-result-period {
	margin-top: 5px;
	color: #6b7280;
	font-size: 0.75rem;
}

.cfcfe-results-note {
	margin-bottom: 0;
	margin-top: 16px;
	color: #6b7280;
	font-size: 0.78rem;
	text-align: center;
}

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

@media (min-width: 900px) {
	.cfcfe-calculator.cfcfe-layout-condensed {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
		column-gap: 32px;
		row-gap: 0;
	}

	.cfcfe-layout-condensed .cfcfe-title {
		grid-column: 1 / -1;
		margin-bottom: 20px;
	}

	.cfcfe-layout-condensed .cfcfe-profile-section {
		grid-column: 1;
		min-width: 0;
	}

	.cfcfe-layout-condensed .cfcfe-amount-section {
		grid-column: 2;
		min-width: 0;
		margin-top: 0;
		padding-top: 0;
		padding-left: 32px;
		border-top: 0;
		border-left: 1px solid #e5e7eb;
	}

	.cfcfe-layout-condensed .cfcfe-results {
		grid-column: 1 / -1;
		margin-top: 24px;
		padding-top: 24px;
	}

	.cfcfe-layout-condensed .cfcfe-step-title,
	.cfcfe-layout-condensed .cfcfe-results-title {
		margin-bottom: 16px;
	}

	.cfcfe-layout-condensed .cfcfe-fieldset {
		margin-bottom: 20px;
	}

	.cfcfe-layout-condensed .cfcfe-credit-labels {
		gap: 5px;
	}

	.cfcfe-layout-condensed .cfcfe-credit-option {
		padding: 7px 3px;
	}

	.cfcfe-layout-condensed .cfcfe-amount-value {
		margin-bottom: 8px;
		font-size: clamp(2rem, 4vw, 3rem);
	}

	.cfcfe-layout-condensed .cfcfe-result-grid {
		gap: 10px;
	}

	.cfcfe-layout-condensed .cfcfe-result-card {
		padding: 14px 10px;
	}

	.cfcfe-layout-condensed .cfcfe-results-note {
		margin-top: 10px;
	}
}
@media (min-width: 900px) {
	.cfcfe-calculator.cfcfe-layout-ultra-compact {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto auto auto;
		column-gap: 0;
		row-gap: 0;
		align-items: start;
	}

	.cfcfe-layout-ultra-compact .cfcfe-title {
		grid-column: 1 / -1;
		grid-row: 1;
		margin-bottom: 20px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-profile-section {
		grid-column: 1;
		grid-row: 2 / span 2;
		min-width: 0;
		padding-right: 24px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-amount-section {
		grid-column: 2;
		grid-row: 2;
		min-width: 0;
		margin-top: 0;
		padding: 0 0 18px 24px;
		border-top: 0;
		border-left: 1px solid #e5e7eb;
	}

	.cfcfe-layout-ultra-compact .cfcfe-results {
		grid-column: 2;
		grid-row: 3;
		min-width: 0;
		margin-top: 0;
		padding: 18px 0 0 24px;
		border-top: 1px solid #e5e7eb;
		border-left: 1px solid #e5e7eb;
	}

	.cfcfe-layout-ultra-compact .cfcfe-step-title,
	.cfcfe-layout-ultra-compact .cfcfe-results-title {
		margin-bottom: 12px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-results-title {
		font-size: 1.1rem;
	}

	.cfcfe-layout-ultra-compact .cfcfe-fieldset {
		margin-bottom: 16px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-question {
		margin-bottom: 10px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-credit-labels {
		gap: 4px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-credit-option {
		padding: 6px 3px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-amount-value {
		margin-bottom: 6px;
		font-size: clamp(1.6rem, 2.4vw, 2.1rem);
	}

	.cfcfe-layout-ultra-compact .cfcfe-result-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 6px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-result-card {
		padding: 8px 4px;
	}

	.cfcfe-layout-ultra-compact .cfcfe-result-term {
		margin-bottom: 4px;
		font-size: 0.72rem;
	}

	.cfcfe-layout-ultra-compact .cfcfe-result-payment {
		font-size: clamp(0.9rem, 1.2vw, 1.15rem);
	}

	.cfcfe-layout-ultra-compact .cfcfe-result-period {
		margin-top: 2px;
		font-size: 0.65rem;
	}

	.cfcfe-layout-ultra-compact .cfcfe-results-prompt {
		margin-bottom: 10px;
		padding: 8px 10px;
		font-size: 0.85rem;
	}

	.cfcfe-layout-ultra-compact .cfcfe-results-note {
		margin-top: 8px;
		font-size: 0.7rem;
	}
}
@media (max-width: 767px) {
	.cfcfe-calculator {
		padding: 24px;
	}

	.cfcfe-credit-labels {
		gap: 2px;
	}

	.cfcfe-credit-name {
		font-size: 0.78rem;
	}

	.cfcfe-credit-score {
		font-size: 0.7rem;
	}

	.cfcfe-result-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	.cfcfe-calculator {
		padding: 20px 16px;
	}

	.cfcfe-toggle-group {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cfcfe-choice-label {
		transition: none;
	}
}
