/**
 * Stepfox Car Dealer — finance & lead components (handle `stepfox-cd-finance`).
 *
 * finance-calculator · lease-calculator · affordability-calculator · contact-dealer ·
 * prequal-form · trade-in-form. Markup: includes/components-finance.php; behaviour:
 * assets/js/calculator.js + enquiry.js.
 *
 * Every colour is a palette preset (var(--wp--preset--color--<slug>)) so dark mode flips with the
 * palette; text on a filled brand colour uses the `base` preset. Layout follows the width of the
 * block itself (container queries), not the viewport, so the same block works in a 370px sticky
 * rail, a two-column page and the editor canvas.
 *
 *   0. Local tokens
 *   1. Atoms: fields, inputs, chips, tiers, range, switch, buttons, notices, success, aside
 *   2. Calculators: layout, result panel, donut / bar, totals, schedule
 *   3. contact-dealer
 *   4. prequal-form
 *   5. trade-in-form
 *   6. No-JS, editor, motion, forced colours, print
 */

/* ------------------------------------------------------------------ */
/* 0. Local tokens                                                      */
/* ------------------------------------------------------------------ */

.sfcd-finance-calculator,
.sfcd-lease-calculator,
.sfcd-affordability-calculator,
.sfcd-contact-dealer,
.sfcd-prequal-form,
.sfcd-trade-in-form {
	container-type: inline-size;
	container-name: sfcd-fin;
}

.sfcd-fin {
	--f-base: var(--wp--preset--color--base, #f2f3f5);
	--f-panel: var(--wp--preset--color--panel, #ffffff);
	--f-panel-2: var(--wp--preset--color--panel-2, #e6e8ec);
	--f-line: var(--wp--preset--color--line, rgba(14, 17, 22, 0.1));
	--f-edge: var(--wp--preset--color--edge, rgba(14, 17, 22, 0.08));
	--f-ink: var(--wp--preset--color--ink, #0e1116);
	--f-muted: var(--wp--preset--color--muted, #596372);
	--f-accent: var(--wp--preset--color--accent, #c2410c);
	--f-accent-2: var(--wp--preset--color--accent-2, #1d4ed8);
	--f-neon: var(--wp--preset--color--neon, #0b8a5f);
	--f-navy: var(--wp--preset--color--violet, #1b2a4a);
	--f-turf: var(--wp--preset--color--turf, #dfe8f7);
	--f-gold: var(--wp--preset--color--gold, #8a6400);
	--f-f-display: var(--wp--preset--font-family--display, "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif);
	--f-f-ui: var(--wp--preset--font-family--ui, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
	--f-f-num: var(--wp--preset--font-family--num, "Space Grotesk", var(--wp--preset--font-family--ui, system-ui), sans-serif);
	--f-shadow-1: var(--wp--preset--shadow--depth-1, 0 1px 2px rgba(14, 17, 22, 0.06), 0 2px 6px rgba(14, 17, 22, 0.04));
	--f-shadow-2: var(--wp--preset--shadow--depth-2, 0 2px 4px rgba(14, 17, 22, 0.05), 0 10px 28px rgba(14, 17, 22, 0.08));
	--f-ring: 0 0 0 3px color-mix(in srgb, var(--f-accent-2) 30%, transparent);
	--f-r-card: var(--sfcd-radius-card, 16px);
	--f-r-ctl: var(--sfcd-radius-input, 12px);
	--f-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	box-sizing: border-box;
	color: var(--f-ink);
	font-family: var(--f-f-ui);
	text-align: left;
}

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

.sfcd-fin [hidden] {
	display: none !important;
}

.sfcd-fin__ico {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
}

.sfcd-fin__ico svg {
	display: block;
}

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

.sfcd-fin__hp {
	position: absolute !important;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Jump targets (#finance #contact #test-drive #prequal #trade-in): an empty block sitting at the
   top of the section, lifted by the sticky header so a hash jump never lands under it. */
.sfcd-anchor {
	display: block;
	position: relative;
	top: calc(-1 * (var(--sfcd-header-h, 72px) + var(--wp-admin--admin-bar--height, 0px) + 24px));
	visibility: hidden;
	height: 0;
	width: 0;
}

/* ------------------------------------------------------------------ */
/* 1. Atoms                                                             */
/* ------------------------------------------------------------------ */

.sfcd-fin__field {
	display: grid;
	align-content: start;
	gap: 7px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sfcd-fin__field--full {
	grid-column: 1 / -1;
}

.sfcd-fin__label,
fieldset.sfcd-fin__field > legend {
	display: block;
	padding: 0;
	font: 700 13px/1.25 var(--f-f-ui);
	color: var(--f-muted);
}

fieldset.sfcd-fin__field > legend {
	margin-bottom: 7px;
	float: none;
	width: 100%;
}

.sfcd-fin__opt {
	font-weight: 600;
	color: var(--wp--preset--color--muted, #596372);
}

.sfcd-fin__req {
	color: var(--f-accent);
}

.sfcd-fin__hint {
	font: 500 12px/1.4 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-fin__link {
	margin-left: 6px;
	font: 700 12px/1 var(--f-f-ui);
	color: var(--f-accent-2);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sfcd-fin__link:hover {
	text-decoration-thickness: 2px;
}

/* Money / percent input box with an affix */
.sfcd-fin__input {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-base);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sfcd-fin__input:hover {
	border-color: color-mix(in srgb, var(--f-ink) 24%, transparent);
}

.sfcd-fin__input:focus-within {
	border-color: var(--f-accent-2);
	background: var(--f-panel);
	box-shadow: var(--f-ring);
}

.sfcd-fin__affix {
	flex: 0 0 auto;
	font: 700 15px/1 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-fin__affix--unit {
	font-size: 13px;
}

.sfcd-fin__input input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--f-ink);
	font: 700 16px/1 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	box-shadow: none;
	outline: none;
	-moz-appearance: textfield;
}

.sfcd-fin__input input::-webkit-outer-spin-button,
.sfcd-fin__input input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sfcd-fin__input--pair {
	padding: 0;
	overflow: hidden;
}

.sfcd-fin__input--pair > span {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 100%;
	padding: 0 14px;
}

.sfcd-fin__input--pair > span:first-child {
	flex: 1 1 62%;
	border-right: 1px solid var(--f-line);
}

.sfcd-fin__input--pair > span:last-child {
	flex: 1 1 38%;
}

/* Plain controls (lead forms) */
.sfcd-fin__control {
	display: block;
	width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-base);
	color: var(--f-ink);
	font: 500 16px/1.2 var(--f-f-ui);
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sfcd-fin__control::placeholder {
	color: color-mix(in srgb, var(--f-muted) 78%, transparent);
	opacity: 1;
}

.sfcd-fin__control:hover {
	border-color: color-mix(in srgb, var(--f-ink) 24%, transparent);
}

.sfcd-fin__control:focus {
	outline: none;
	border-color: var(--f-accent-2);
	background: var(--f-panel);
	box-shadow: var(--f-ring);
}

.sfcd-fin__textarea {
	height: auto;
	min-height: 96px;
	padding: 12px 14px;
	line-height: 1.5;
	resize: vertical;
}

.sfcd-fin__select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596372' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
	cursor: pointer;
}

.sfcd-fin__control[aria-invalid="true"],
.sfcd-fin__input:has(input[aria-invalid="true"]) {
	border-color: var(--f-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-accent) 22%, transparent);
}

.sfcd-fin__field-error {
	font: 600 12px/1.35 var(--f-f-ui);
	color: var(--f-accent);
}

/* Slider */
.sfcd-fin__range {
	--sfcd-range-pct: 50%;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 24px;
	margin: 4px 0 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

.sfcd-fin__range::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--f-accent-2) var(--sfcd-range-pct), var(--f-panel-2) var(--sfcd-range-pct));
}

.sfcd-fin__range::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: var(--f-panel-2);
}

.sfcd-fin__range::-moz-range-progress {
	height: 6px;
	border-radius: 999px;
	background: var(--f-accent-2);
}

.sfcd-fin__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	margin-top: -8px;
	border: 2px solid var(--f-accent-2);
	border-radius: 50%;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
	transition: transform 0.15s var(--f-ease), box-shadow 0.15s ease;
}

.sfcd-fin__range::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 2px solid var(--f-accent-2);
	border-radius: 50%;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
}

.sfcd-fin__range:hover::-webkit-slider-thumb {
	transform: scale(1.08);
}

.sfcd-fin__range:focus-visible {
	outline: none;
}

.sfcd-fin__range:focus-visible::-webkit-slider-thumb {
	box-shadow: var(--f-ring);
}

.sfcd-fin__range:focus-visible::-moz-range-thumb {
	box-shadow: var(--f-ring);
}

/* Segmented radios (term, miles, schedule view) */
.sfcd-fin__seg {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border-radius: 14px;
	background: var(--f-panel-2);
}

.sfcd-fin__seg label {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.sfcd-fin__seg input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.sfcd-fin__seg span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 10px;
	border-radius: 10px;
	font: 700 14px/1 var(--f-f-ui);
	font-variant-numeric: tabular-nums;
	color: var(--f-muted);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sfcd-fin__seg label:hover span {
	color: var(--f-ink);
}

.sfcd-fin__seg input:checked + span {
	background: var(--f-accent-2);
	color: var(--f-base);
	box-shadow: var(--f-shadow-1);
}

.sfcd-fin__seg input:focus-visible + span {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-fin__seg--sm span {
	min-height: 34px;
	font-size: 13px;
}

.sfcd-fin__seg--sm label {
	flex: 0 0 auto;
}

/* Credit tiers */
.sfcd-fin__tiers {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.sfcd-fin__tier {
	position: relative;
	display: block;
	margin: 0;
	min-width: 0;
}

.sfcd-fin__tier input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.sfcd-fin__tier-card {
	display: grid;
	gap: 2px;
	height: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-base);
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--f-ease);
}

.sfcd-fin__tier-card strong {
	font: 800 14px/1.15 var(--f-f-ui);
	color: var(--f-ink);
}

.sfcd-fin__tier-card small {
	font: 600 11px/1.2 var(--f-f-ui);
	color: var(--f-muted);
	font-variant-numeric: tabular-nums;
}

.sfcd-fin__tier-card em {
	margin-top: 4px;
	font: 800 13px/1 var(--f-f-num);
	font-style: normal;
	font-variant-numeric: tabular-nums;
	color: var(--f-accent-2);
}

.sfcd-fin__tier:hover .sfcd-fin__tier-card {
	border-color: color-mix(in srgb, var(--f-ink) 28%, transparent);
	transform: translateY(-1px);
}

.sfcd-fin__tier input:checked + .sfcd-fin__tier-card {
	border-color: var(--f-accent-2);
	background: var(--f-turf);
	box-shadow: inset 0 0 0 1px var(--f-accent-2);
}

.sfcd-fin__tier input:focus-visible + .sfcd-fin__tier-card {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

/* Row of two money inputs inside a group */
.sfcd-fin__group {
	padding: 14px;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-card);
	background: color-mix(in srgb, var(--f-panel-2) 45%, transparent);
}

fieldset.sfcd-fin__group > legend {
	width: auto;
	padding: 0 6px;
}

.sfcd-fin__row2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

/* Switch */
.sfcd-fin__field--switch {
	align-content: end;
}

.sfcd-fin__switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	margin: 0;
	font: 700 14px/1.2 var(--f-f-ui);
	color: var(--f-ink);
	cursor: pointer;
}

.sfcd-fin__switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sfcd-fin__switch-ui {
	position: relative;
	flex: 0 0 auto;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: var(--f-panel-2);
	box-shadow: inset 0 0 0 1px var(--f-line);
	transition: background-color 0.2s ease;
}

.sfcd-fin__switch-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
	transition: transform 0.2s var(--f-ease);
}

.sfcd-fin__switch input:checked + .sfcd-fin__switch-ui {
	background: var(--f-accent-2);
}

.sfcd-fin__switch input:checked + .sfcd-fin__switch-ui::after {
	transform: translateX(18px);
}

.sfcd-fin__switch input:focus-visible + .sfcd-fin__switch-ui {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

/* The vehicle's special */
.sfcd-fin__offer {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	border: 1.5px dashed color-mix(in srgb, var(--f-neon) 70%, transparent);
	border-radius: var(--f-r-ctl);
	background: color-mix(in srgb, var(--f-neon) 9%, transparent);
	color: var(--f-ink);
	font: 600 14px/1.3 var(--f-f-ui);
	text-align: left;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sfcd-fin__offer .sfcd-fin__ico {
	color: var(--f-neon);
}

.sfcd-fin__offer:hover,
.sfcd-fin__offer.is-applied {
	border-style: solid;
	background: color-mix(in srgb, var(--f-neon) 16%, transparent);
}

.sfcd-fin__offer:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

/* Buttons */
.sfcd-fin__btn {
	--_bg: var(--f-panel);
	--_fg: var(--f-ink);
	--_bd: var(--f-line);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--_bd);
	border-radius: var(--f-r-ctl);
	background: var(--_bg);
	color: var(--_fg);
	font: 700 15px/1 var(--f-f-ui);
	letter-spacing: 0.005em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--f-ease), box-shadow 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.sfcd-fin__btn:hover {
	--_bd: color-mix(in srgb, var(--f-ink) 28%, transparent);
	--_bg: var(--f-panel-2);
	color: var(--_fg);
	text-decoration: none;
}

.sfcd-fin__btn:active {
	transform: translateY(1px);
}

.sfcd-fin__btn:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
	box-shadow: var(--f-ring);
}

.sfcd-fin__btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.sfcd-fin__btn--primary {
	--_bg: var(--f-accent);
	--_fg: var(--f-base);
	--_bd: var(--f-accent);
	box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--f-accent) 70%, transparent);
}

.sfcd-fin__btn--primary:hover {
	--_bg: color-mix(in srgb, var(--f-accent) 88%, var(--f-ink));
	--_bd: var(--_bg);
	--_fg: var(--f-base);
	box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--f-accent) 80%, transparent);
}

.sfcd-fin__btn--dark {
	--_bg: var(--f-ink);
	--_fg: var(--f-base);
	--_bd: var(--f-ink);
}

.sfcd-fin__btn--dark:hover {
	--_bg: color-mix(in srgb, var(--f-ink) 86%, var(--f-accent-2));
	--_bd: var(--_bg);
	--_fg: var(--f-base);
}

.sfcd-fin__btn--ghost {
	--_bg: transparent;
}

.sfcd-fin__btn--block {
	display: flex;
	width: 100%;
}

.sfcd-fin__btn--lg {
	min-height: 52px;
	font-size: 16px;
}

/* Links drawn as controls keep their own colour and decoration against theme
   and page-builder link rules (`.elementor a` is 0,1,1 and may load later). */
:is(.sfcd-finance-calculator, .sfcd-lease-calculator, .sfcd-affordability-calculator, .sfcd-contact-dealer, .sfcd-prequal-form, .sfcd-trade-in-form) a.sfcd-fin__btn {
	color: var(--_fg);
	text-decoration: none;
}

:is(.sfcd-finance-calculator, .sfcd-lease-calculator, .sfcd-affordability-calculator, .sfcd-trade-in-form) a.sfcd-fin__link {
	color: var(--f-accent-2);
	text-decoration: underline;
}

.sfcd-fin__btn.is-copied {
	--_bd: var(--f-neon);
	--_fg: var(--f-neon);
}

/* Errors, consent, fine print */
.sfcd-fin__error {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--f-r-ctl);
	background: color-mix(in srgb, var(--f-accent) 12%, transparent);
	color: var(--f-accent);
	font: 700 14px/1.4 var(--f-f-ui);
}

.sfcd-fin__error.is-success {
	background: color-mix(in srgb, var(--f-neon) 14%, transparent);
	color: var(--f-neon);
}

.sfcd-fin__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font: 500 13px/1.45 var(--f-f-ui);
	color: var(--f-muted);
	cursor: pointer;
}

.sfcd-fin__consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--f-accent-2);
}

.sfcd-fin__consent a {
	color: var(--f-accent-2);
	text-decoration: underline;
}

.sfcd-fin__fine {
	margin: 0;
	font: 500 12px/1.5 var(--f-f-ui);
	color: var(--f-muted);
	text-align: center;
}

/* Success panel */
.sfcd-fin__success {
	display: grid;
	justify-items: center;
	gap: 10px;
	padding: clamp(22px, 4cqi, 40px) clamp(16px, 4cqi, 32px);
	text-align: center;
}

.sfcd-fin__success-icon {
	display: inline-grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--f-neon) 16%, transparent);
	color: var(--f-neon);
}

.sfcd-fin__success h3 {
	margin: 4px 0 0;
	font: 800 clamp(20px, 3cqi, 26px)/1.2 var(--f-f-display);
	letter-spacing: -0.01em;
	color: var(--f-ink);
}

.sfcd-fin__success h3:focus {
	outline: none;
}

.sfcd-fin__success p {
	max-width: 46ch;
	margin: 0;
	font: 500 15px/1.55 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-fin__success [data-sfcd-enquiry-success-extra]:empty {
	display: none;
}

.sfcd-fin__reset {
	margin-top: 6px;
	font: 700 14px/1 var(--f-f-ui);
	color: var(--f-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

:is(.sfcd-contact-dealer, .sfcd-prequal-form, .sfcd-trade-in-form) a.sfcd-fin__reset {
	color: var(--f-ink);
	text-decoration: underline;
}

/* Benefits panel (prequal-form, trade-in-form) */
.sfcd-fin__aside {
	display: grid;
	align-content: start;
	gap: 16px;
	padding: clamp(22px, 3.4cqi, 36px);
	border-radius: 20px;
	background: var(--f-turf);
	color: var(--f-ink);
}

.sfcd-fin__eyebrow {
	margin: 0;
	font: 800 12px/1.2 var(--f-f-ui);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--f-accent-2);
}

.sfcd-fin__title {
	margin: 0;
	font: 800 clamp(26px, 3.6cqi, 38px)/1.08 var(--f-f-display);
	font-stretch: 108%;
	letter-spacing: -0.02em;
	color: var(--f-ink);
}

.sfcd-fin__intro {
	margin: 0;
	font: 500 16px/1.55 var(--f-f-ui);
	color: color-mix(in srgb, var(--f-ink) 78%, transparent);
}

.sfcd-fin__points {
	display: grid;
	gap: 16px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.sfcd-fin__points li {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 14px;
	margin: 0;
	align-items: start;
}

.sfcd-fin__aside-ico {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--f-panel);
	color: var(--f-accent-2);
	box-shadow: var(--f-shadow-1);
}

.sfcd-fin__points strong {
	display: block;
	font: 800 15px/1.3 var(--f-f-ui);
	color: var(--f-ink);
}

.sfcd-fin__points li > span:last-child > span {
	display: block;
	margin-top: 2px;
	font: 500 14px/1.5 var(--f-f-ui);
	color: color-mix(in srgb, var(--f-ink) 72%, transparent);
}

/* ------------------------------------------------------------------ */
/* 2. Calculators                                                       */
/* ------------------------------------------------------------------ */

.sfcd-calc {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	gap: clamp(20px, 3cqi, 36px);
	padding: clamp(18px, 3cqi, 32px);
	border: 1px solid var(--f-line);
	border-radius: 20px;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
}

.sfcd-calc__in {
	min-width: 0;
}

.sfcd-calc__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	align-content: start;
}

.sfcd-calc__out {
	display: grid;
	align-content: start;
	gap: 18px;
	min-width: 0;
	padding: clamp(18px, 2.6cqi, 28px);
	border-radius: var(--f-r-card);
	background: var(--f-panel-2);
	container-type: inline-size;
	container-name: sfcd-calc-out;
}

.sfcd-calc__kicker {
	margin: 0;
	font: 800 12px/1.2 var(--f-f-ui);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--f-muted);
}

.sfcd-calc__monthly {
	margin: 6px 0 0;
	font: 800 clamp(38px, 11cqi, 56px)/1 var(--f-f-num);
	letter-spacing: -0.035em;
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-calc__monthly small {
	margin-left: 2px;
	font-size: 0.36em;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--f-muted);
}

.sfcd-calc__sub {
	margin: 8px 0 0;
	font: 600 14px/1.4 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-calc__chart {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	align-items: center;
	gap: 20px;
}

.sfcd-calc__chart.is-flat {
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
}

.sfcd-donut {
	position: relative;
	width: 150px;
	height: 150px;
}

.sfcd-donut svg {
	display: block;
	width: 100%;
	height: 100%;
}

.sfcd-donut__track {
	stroke: var(--f-line);
}

.sfcd-donut__seg {
	transition: stroke-dasharray 0.45s var(--f-ease), stroke-dashoffset 0.45s var(--f-ease), opacity 0.2s ease;
}

.sfcd-donut__seg--price,
.sfcd-calc__dot--price,
.sfcd-calc__bar-seg--dep,
.sfcd-calc__dot--dep {
	stroke: var(--f-accent-2);
	background: var(--f-accent-2);
}

.sfcd-donut__seg--taxfees,
.sfcd-calc__dot--taxfees,
.sfcd-calc__bar-seg--tax,
.sfcd-calc__dot--tax {
	stroke: var(--f-gold);
	background: var(--f-gold);
}

.sfcd-donut__seg--interest,
.sfcd-calc__dot--interest,
.sfcd-calc__bar-seg--rent,
.sfcd-calc__dot--rent {
	stroke: var(--f-accent);
	background: var(--f-accent);
}

/* The hole is a real disc in the panel colour: the label then has a defined background. */
.sfcd-donut__center {
	position: absolute;
	inset: 19%;
	display: grid;
	place-content: center;
	text-align: center;
	border-radius: 50%;
	background: var(--f-panel-2);
}

.sfcd-donut__center strong {
	font: 800 18px/1.1 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-donut__center span {
	font: 700 11px/1.2 var(--f-f-ui);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--f-muted);
}

.sfcd-calc__bar {
	display: flex;
	gap: 3px;
	height: 14px;
	border-radius: 999px;
	overflow: hidden;
}

.sfcd-calc__bar-seg {
	flex: 0 1 0%;
	min-width: 0;
	transition: flex-basis 0.45s var(--f-ease);
}

.sfcd-calc__bar-seg:first-child {
	border-radius: 999px 0 0 999px;
}

.sfcd-calc__bar-seg:last-child {
	border-radius: 0 999px 999px 0;
}

.sfcd-calc__legend {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfcd-calc__legend li {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	margin: 0;
	font: 600 14px/1.25 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-calc__dot {
	width: 10px;
	height: 10px;
	border-radius: 3px;
}

.sfcd-calc__legend strong {
	font: 800 14px/1 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-calc__legend em {
	margin-left: 6px;
	font-style: normal;
	font-weight: 600;
	font-size: 12px;
	color: var(--f-muted);
}

.sfcd-calc__totals {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
	margin: 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--f-line);
}

.sfcd-calc__totals > div {
	min-width: 0;
}

.sfcd-calc__totals dt {
	margin: 0;
	font: 600 12px/1.3 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-calc__totals dd {
	margin: 3px 0 0;
	font: 800 17px/1.15 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
	overflow-wrap: anywhere;
}

.sfcd-calc__note {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--f-r-ctl);
	background: color-mix(in srgb, var(--f-accent-2) 10%, transparent);
	color: var(--f-ink);
	font: 600 13px/1.45 var(--f-f-ui);
}

.sfcd-calc__note.is-negative {
	background: color-mix(in srgb, var(--f-gold) 14%, transparent);
}

.sfcd-calc__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sfcd-calc__cta > .sfcd-fin__btn--primary {
	flex: 1 1 220px;
}

.sfcd-calc__cta > .sfcd-calc__share {
	flex: 0 1 auto;
}

/* Amortization schedule */
.sfcd-calc__sched {
	grid-column: 1 / -1;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-card);
	background: var(--f-base);
}

.sfcd-calc__sched > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	list-style: none;
	font: 800 15px/1.2 var(--f-f-ui);
	color: var(--f-ink);
	cursor: pointer;
	border-radius: var(--f-r-card);
}

.sfcd-calc__sched > summary::-webkit-details-marker {
	display: none;
}

.sfcd-calc__sched > summary::after {
	content: "";
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-right: 2.5px solid var(--f-muted);
	border-bottom: 2.5px solid var(--f-muted);
	transform: rotate(45deg) translateY(-3px);
	transition: transform 0.25s var(--f-ease);
}

.sfcd-calc__sched[open] > summary::after {
	transform: rotate(-135deg) translateY(-3px);
}

.sfcd-calc__sched > summary:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: -2px;
}

.sfcd-calc__sched-hint {
	margin-left: auto;
	font: 600 13px/1.2 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-calc__sched-body {
	display: grid;
	gap: 12px;
	padding: 0 18px 18px;
}

.sfcd-calc__scroll {
	max-height: 360px;
	overflow: auto;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-panel);
}

.sfcd-calc__scroll:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-calc__table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font: 600 14px/1.3 var(--f-f-num);
	font-variant-numeric: tabular-nums;
}

.sfcd-calc__table th,
.sfcd-calc__table td {
	padding: 10px 14px;
	text-align: right;
	border-bottom: 1px solid var(--f-line);
	color: var(--f-ink);
}

.sfcd-calc__table th:first-child {
	text-align: left;
	font-family: var(--f-f-ui);
	font-weight: 700;
}

.sfcd-calc__table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--f-panel-2);
	font: 800 12px/1.2 var(--f-f-ui);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--f-muted);
}

.sfcd-calc__table tbody tr:nth-child(even) {
	background: color-mix(in srgb, var(--f-panel-2) 40%, transparent);
}

.sfcd-calc__table tbody tr:last-child th,
.sfcd-calc__table tbody tr:last-child td {
	border-bottom: 0;
}

.sfcd-calc__disclaimer {
	grid-column: 1 / -1;
	margin: 0;
	font: 500 12px/1.55 var(--f-f-ui);
	color: var(--f-muted);
}

/* Container: stack when the block is narrow (sidebars, phones, the editor canvas). */
@container sfcd-fin (max-width: 820px) {
	.sfcd-calc {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container sfcd-fin (max-width: 520px) {
	.sfcd-calc {
		padding: 16px;
		border-radius: 16px;
	}

	.sfcd-calc__grid {
		gap: 14px;
	}

	.sfcd-calc__chart {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}

	.sfcd-calc__chart .sfcd-calc__legend {
		width: 100%;
	}

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

	.sfcd-calc__totals {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfcd-fin__row2 {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container sfcd-fin (max-width: 380px) {
	.sfcd-calc__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfcd-fin__seg span {
		padding: 0 6px;
		font-size: 13px;
	}
}

/* ------------------------------------------------------------------ */
/* 3. contact-dealer                                                    */
/* ------------------------------------------------------------------ */

.sfcd-contact-dealer {
	display: block;
}

@media (min-width: 1024px) {
	.sfcd-contact-dealer.is-sticky {
		position: sticky;
		top: calc(var(--sfcd-header-h, 72px) + var(--wp-admin--admin-bar--height, 0px) + 24px);
		align-self: start;
	}
}

.sfcd-cd {
	display: grid;
	gap: 14px;
	padding: clamp(16px, 5cqi, 24px);
	border: 1px solid var(--f-line);
	border-radius: 20px;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-2);
}

.sfcd-cd__title {
	margin: 0;
	font: 800 clamp(20px, 6cqi, 24px)/1.15 var(--f-f-display);
	letter-spacing: -0.015em;
	color: var(--f-ink);
}

/* Vehicle strip */
.sfcd-cd__veh {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 10px;
	border: 1px solid var(--f-line);
	border-radius: var(--f-r-card);
	background: var(--f-base);
	color: var(--f-ink);
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.sfcd-cd__veh:hover {
	border-color: color-mix(in srgb, var(--f-ink) 24%, transparent);
	box-shadow: var(--f-shadow-1);
}

:is(.sfcd-contact-dealer, .sfcd-prequal-form) a.sfcd-cd__veh {
	color: var(--f-ink);
	text-decoration: none;
}

.sfcd-cd__veh:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-cd__veh-img {
	display: block;
	width: 96px;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: var(--f-panel-2);
}

.sfcd-cd__veh-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sfcd-cd__veh-ph {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--f-muted);
}

.sfcd-cd__veh-body {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.sfcd-cd__veh-title {
	font: 800 15px/1.2 var(--f-f-display);
	letter-spacing: -0.005em;
	color: var(--f-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sfcd-cd__veh-trim {
	font: 500 13px/1.3 var(--f-f-ui);
	color: var(--f-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfcd-cd__veh-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin-top: 2px;
	font: 600 13px/1.3 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-cd__veh-price b {
	font: 800 18px/1.1 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-cd__veh-price s {
	font-size: 13px;
	font-weight: 500;
	color: var(--f-muted);
}

.sfcd-cd__veh-price i {
	font-style: normal;
	font-weight: 700;
	color: var(--f-accent-2);
}

.sfcd-cd__chip {
	justify-self: start;
	padding: 3px 9px;
	border-radius: 999px;
	font: 800 11px/1.3 var(--f-f-ui);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--f-gold);
	color: var(--f-base);
}

.sfcd-cd__chip--sold {
	background: var(--f-ink);
}

/* Dealer */
.sfcd-cd__dealer {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
}

:is(.sfcd-contact-dealer) a.sfcd-cd__logo,
.sfcd-cd__logo {
	text-decoration: none;
	color: inherit;
}

.sfcd-cd__logo {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--f-panel-2);
}

.sfcd-cd__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sfcd-cd__mono {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--f-navy);
	color: var(--f-base);
	font: 800 16px/1 var(--f-f-display);
}

.sfcd-cd__who {
	min-width: 0;
}

.sfcd-cd__name {
	margin: 0;
	font: 800 15px/1.25 var(--f-f-ui);
	color: var(--f-ink);
}

.sfcd-cd__name a {
	color: var(--f-ink);
	text-decoration: none;
}

.sfcd-cd__name a:hover {
	text-decoration: underline;
}

.sfcd-cd__city {
	margin: 1px 0 0;
	font: 500 13px/1.3 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-cd__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 4px 0 0;
	font: 600 12px/1.3 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-cd__rate {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--f-ink);
}

.sfcd-cd__rate .sfcd-fin__ico {
	color: var(--f-gold);
}

.sfcd-cd__open {
	color: var(--f-muted);
}

.sfcd-cd__open.is-open {
	color: var(--f-neon);
}

.sfcd-cd__acts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 8px;
}

.sfcd-cd__acts .sfcd-fin__btn {
	min-width: 0;
	/* 8px/6px: the dealer's phone number must fit its half-width button at 390px (it was ellipsised). */
	padding: 0 8px;
	gap: 6px;
	font-size: 14px;
}

.sfcd-cd__acts .sfcd-fin__btn span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfcd-cd__divider {
	width: 100%;
	height: 1px;
	margin: 2px 0;
	border: 0;
	background: var(--f-line);
}

.sfcd-contact-dealer .sfcd-print-only {
	display: none;
}

/* Form */
.sfcd-cd__body {
	min-width: 0;
}

.sfcd-cd__form {
	display: grid;
	gap: 14px;
}

.sfcd-cd__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	padding: 4px;
	border-radius: 14px;
	background: var(--f-panel-2);
}

.sfcd-cd__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 44px;
	padding: 0 8px;
	border-radius: 10px;
	font: 700 13.5px/1.15 var(--f-f-ui);
	text-align: center;
	color: var(--f-muted);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sfcd-cd__tab:hover {
	color: var(--f-ink);
}

.sfcd-cd__kind--contact:checked ~ .sfcd-cd__tabs .sfcd-cd__tab--contact,
.sfcd-cd__kind--drive:checked ~ .sfcd-cd__tabs .sfcd-cd__tab--drive {
	background: var(--f-panel);
	color: var(--f-ink);
	box-shadow: var(--f-shadow-1);
}

.sfcd-cd__kind--contact:checked ~ .sfcd-cd__tabs .sfcd-cd__tab--contact .sfcd-fin__ico,
.sfcd-cd__kind--drive:checked ~ .sfcd-cd__tabs .sfcd-cd__tab--drive .sfcd-fin__ico {
	color: var(--f-accent-2);
}

.sfcd-cd__kind--contact:focus-visible ~ .sfcd-cd__tabs .sfcd-cd__tab--contact,
.sfcd-cd__kind--drive:focus-visible ~ .sfcd-cd__tabs .sfcd-cd__tab--drive {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-cd__kind--contact:checked ~ .sfcd-cd__drive {
	display: none;
}

.sfcd-cd__drive {
	display: grid;
	gap: 14px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sfcd-cd__days-wrap,
.sfcd-cd__times-wrap {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sfcd-cd__group {
	padding: 0;
	margin-bottom: 8px;
	font: 700 13px/1.2 var(--f-f-ui);
	color: var(--f-muted);
	float: none;
}

.sfcd-cd__days-nav {
	position: absolute;
	top: -4px;
	right: 0;
	display: flex;
	gap: 6px;
}

.sfcd-cd__days-prev,
.sfcd-cd__days-next {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--f-line);
	border-radius: 50%;
	background: var(--f-panel);
	color: var(--f-ink);
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sfcd-cd__days-prev svg,
.sfcd-cd__days-next svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sfcd-cd__days-prev:hover,
.sfcd-cd__days-next:hover {
	background: var(--f-panel-2);
}

.sfcd-cd__days-prev:disabled,
.sfcd-cd__days-next:disabled {
	opacity: 0.35;
	cursor: default;
}

.sfcd-cd__days-prev:focus-visible,
.sfcd-cd__days-next:focus-visible {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-cd__days {
	display: flex;
	gap: 8px;
	margin: 0 -2px;
	padding: 2px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.sfcd-cd__days::-webkit-scrollbar {
	display: none;
}

.sfcd-cd__day {
	position: relative;
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}

.sfcd-cd__day input,
.sfcd-cd__time input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.sfcd-cd__day > span {
	display: grid;
	justify-items: center;
	gap: 1px;
	width: 62px;
	padding: 8px 0 9px;
	border: 1.5px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-base);
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--f-ease);
}

.sfcd-cd__day small {
	font: 700 11px/1.2 var(--f-f-ui);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--f-muted);
}

.sfcd-cd__day strong {
	font: 800 20px/1.1 var(--f-f-num);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-cd__day:hover > span {
	border-color: color-mix(in srgb, var(--f-ink) 28%, transparent);
}

.sfcd-cd__day input:checked + span {
	border-color: var(--f-accent-2);
	background: var(--f-accent-2);
}

.sfcd-cd__day input:checked + span small,
.sfcd-cd__day input:checked + span strong {
	color: var(--f-base);
}

.sfcd-cd__day input:focus-visible + span {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-cd__day.is-off {
	opacity: 0.4;
	pointer-events: none;
}

.sfcd-cd__times {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
	gap: 8px;
}

.sfcd-cd__time {
	position: relative;
	margin: 0;
}

.sfcd-cd__time > span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	border: 1.5px solid var(--f-line);
	border-radius: 999px;
	background: var(--f-base);
	font: 700 13.5px/1 var(--f-f-ui);
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
	white-space: nowrap;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sfcd-cd__time:hover > span {
	border-color: color-mix(in srgb, var(--f-ink) 28%, transparent);
}

.sfcd-cd__time input:checked + span {
	border-color: var(--f-accent-2);
	background: var(--f-accent-2);
	color: var(--f-base);
}

.sfcd-cd__time input:focus-visible + span {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

.sfcd-cd__no-times {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--f-r-ctl);
	background: color-mix(in srgb, var(--f-gold) 12%, transparent);
	font: 600 13px/1.4 var(--f-f-ui);
	color: var(--f-ink);
}

.sfcd-cd__drive-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font: 500 12.5px/1.45 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-cd__drive-note .sfcd-fin__ico {
	margin-top: 1px;
	color: var(--f-accent-2);
}

.sfcd-cd__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@container sfcd-fin (max-width: 400px) {
	.sfcd-cd__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfcd-cd__tab {
		flex-direction: column;
		gap: 3px;
		min-height: 52px;
		font-size: 12.5px;
	}
}

@container sfcd-fin (min-width: 720px) {
	.sfcd-contact-dealer:not(.is-plain) .sfcd-cd {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
		column-gap: clamp(20px, 3cqi, 36px);
		align-items: start;
	}

	.sfcd-cd > .sfcd-cd__title {
		grid-column: 1 / -1;
	}

	.sfcd-cd > .sfcd-cd__veh,
	.sfcd-cd > .sfcd-cd__dealer,
	.sfcd-cd > .sfcd-cd__acts {
		grid-column: 1;
	}

	.sfcd-cd > .sfcd-cd__divider {
		display: none;
	}

	.sfcd-cd > .sfcd-cd__body {
		grid-column: 2;
		grid-row: 2 / span 4;
	}
}

/* ------------------------------------------------------------------ */
/* 4. prequal-form                                                      */
/* ------------------------------------------------------------------ */

.sfcd-pq {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(16px, 3cqi, 28px);
}

.sfcd-prequal-form.has-aside .sfcd-pq {
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	align-items: start;
}

.sfcd-pq__main {
	min-width: 0;
}

.sfcd-pq__card,
.sfcd-pq__main > .sfcd-fin__success {
	container-type: inline-size;
	container-name: sfcd-form;
	display: grid;
	gap: 22px;
	padding: clamp(18px, 3.4cqi, 32px);
	border: 1px solid var(--f-line);
	border-radius: 20px;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
}

.sfcd-pq__main > .sfcd-fin__success {
	gap: 10px;
}

.sfcd-pq__sec,
.sfcd-tin__step {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sfcd-pq__legend,
.sfcd-tin__legend {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	padding: 0;
	float: none;
	font: 800 clamp(17px, 2.4cqi, 20px)/1.2 var(--f-f-display);
	letter-spacing: -0.01em;
	color: var(--f-ink);
}

.sfcd-tin__legend--sm {
	font-size: 16px;
}

.sfcd-pq__n,
.sfcd-tin__n {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--f-accent-2);
	color: var(--f-base);
	font: 800 14px/1 var(--f-f-num);
}

.sfcd-pq__grid,
.sfcd-tin__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.sfcd-pq__vehicle {
	display: grid;
	gap: 8px;
	margin-bottom: 14px;
}

.sfcd-pq__vehicle-label {
	margin: 0;
	font: 700 13px/1.2 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-pq__privacy {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--f-r-card);
	background: var(--f-turf);
	color: var(--f-ink);
}

.sfcd-pq__privacy .sfcd-fin__ico {
	margin-top: 1px;
	color: var(--f-accent-2);
}

.sfcd-pq__privacy p {
	margin: 0;
	font: 500 13px/1.55 var(--f-f-ui);
	color: color-mix(in srgb, var(--f-ink) 82%, transparent);
}

.sfcd-pq__privacy strong {
	color: var(--f-ink);
}

.sfcd-pq__submit {
	justify-self: start;
	min-width: 220px;
}

@container sfcd-fin (max-width: 880px) {
	.sfcd-prequal-form.has-aside .sfcd-pq {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container sfcd-form (max-width: 520px) {
	.sfcd-pq__grid,
	.sfcd-tin__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfcd-pq__submit {
		justify-self: stretch;
	}
}

/* ------------------------------------------------------------------ */
/* 5. trade-in-form                                                     */
/* ------------------------------------------------------------------ */

.sfcd-tin {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(16px, 3cqi, 28px);
}

.sfcd-trade-in-form.has-aside .sfcd-tin {
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	align-items: start;
}

.sfcd-tin__main {
	min-width: 0;
}

.sfcd-tin__card,
.sfcd-tin__main > .sfcd-fin__success {
	container-type: inline-size;
	container-name: sfcd-form;
	display: grid;
	gap: 20px;
	padding: clamp(18px, 3.4cqi, 32px);
	border: 1px solid var(--f-line);
	border-radius: 20px;
	background: var(--f-panel);
	box-shadow: var(--f-shadow-1);
}

.sfcd-tin__main > .sfcd-fin__success {
	gap: 10px;
}

.sfcd-tin__card > .sfcd-fin__title {
	font-size: clamp(22px, 3.2cqi, 30px);
}

.sfcd-tin__progress {
	height: 6px;
	border-radius: 999px;
	background: var(--f-panel-2);
	overflow: hidden;
}

.sfcd-tin__progress span {
	display: block;
	width: 50%;
	height: 100%;
	border-radius: inherit;
	background: var(--f-accent-2);
	transition: width 0.35s var(--f-ease);
}

.sfcd-tin__step {
	display: grid;
	gap: 18px;
	align-content: start;
}

.sfcd-tin__card.is-stepped-live .sfcd-tin__step:not(.is-current) {
	display: none;
}

.sfcd-tin__step.is-flat + .sfcd-tin__step.is-flat {
	padding-top: 4px;
	border-top: 1px solid var(--f-line);
}

.sfcd-tin__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.sfcd-tin__card:not(.is-stepped) .sfcd-tin__nav {
	justify-content: flex-start;
}

.sfcd-tin__recap {
	margin: -4px 0 0;
	padding: 10px 14px;
	border-radius: var(--f-r-ctl);
	background: var(--f-panel-2);
	font: 600 13.5px/1.45 var(--f-f-ui);
	color: var(--f-ink);
}

/* Condition cards */
.sfcd-tin__conds {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.sfcd-tin__cond {
	position: relative;
	display: block;
	margin: 0;
	min-width: 0;
}

.sfcd-tin__cond input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.sfcd-tin__cond-card {
	display: grid;
	gap: 3px;
	height: 100%;
	padding: 11px 12px;
	border: 1.5px solid var(--f-line);
	border-radius: var(--f-r-ctl);
	background: var(--f-base);
	transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--f-ease);
}

.sfcd-tin__cond-card strong {
	font: 800 14px/1.2 var(--f-f-ui);
	color: var(--f-ink);
}

.sfcd-tin__cond-card small {
	font: 500 12px/1.35 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-tin__cond:hover .sfcd-tin__cond-card {
	border-color: color-mix(in srgb, var(--f-ink) 28%, transparent);
	transform: translateY(-1px);
}

.sfcd-tin__cond input:checked + .sfcd-tin__cond-card {
	border-color: var(--f-accent-2);
	background: var(--f-turf);
	box-shadow: inset 0 0 0 1px var(--f-accent-2);
}

.sfcd-tin__cond input:focus-visible + .sfcd-tin__cond-card {
	outline: 2px solid var(--f-accent-2);
	outline-offset: 2px;
}

/* Instant estimate */
.sfcd-tin__est {
	display: grid;
	gap: 8px;
	padding: 18px 20px;
	border: 1px solid color-mix(in srgb, var(--f-accent-2) 35%, transparent);
	border-radius: var(--f-r-card);
	background: linear-gradient(135deg, var(--f-turf), color-mix(in srgb, var(--f-turf) 40%, var(--f-panel)));
	animation: sfcd-fin-rise 0.35s var(--f-ease);
}

@keyframes sfcd-fin-rise {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.sfcd-tin__est-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}

.sfcd-tin__badge {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--f-accent-2);
	color: var(--f-base);
	font: 800 11px/1.3 var(--f-f-ui);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sfcd-tin__conf {
	font: 700 12px/1.3 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-tin__est-range {
	margin: 0;
	font: 800 clamp(28px, 5cqi, 38px)/1.05 var(--f-f-num);
	letter-spacing: -0.025em;
	font-variant-numeric: tabular-nums;
	color: var(--f-ink);
}

.sfcd-tin__est[data-state="loading"] .sfcd-tin__est-range {
	color: var(--f-muted);
}

.sfcd-tin__est-basis {
	margin: 0;
	font: 500 13.5px/1.5 var(--f-f-ui);
	color: color-mix(in srgb, var(--f-ink) 78%, transparent);
}

.sfcd-tin__est-equity {
	margin: 0;
	font: 800 14px/1.3 var(--f-f-ui);
	color: var(--f-neon);
}

.sfcd-tin__est-note {
	margin: 2px 0 0;
	font: 500 12px/1.5 var(--f-f-ui);
	color: var(--f-muted);
}

.sfcd-tin__est[data-state="none"],
.sfcd-tin__est[data-state="error"] {
	border-style: dashed;
	background: var(--f-panel-2);
}

.sfcd-tin__est[data-state="none"] .sfcd-tin__badge,
.sfcd-tin__est[data-state="error"] .sfcd-tin__badge {
	background: var(--f-muted);
}

.sfcd-tin__est[data-state="none"] .sfcd-tin__est-note,
.sfcd-tin__est[data-state="error"] .sfcd-tin__est-note {
	display: none;
}

.sfcd-tin__recap-est {
	padding: 10px 16px;
	border-radius: var(--f-r-ctl);
	background: var(--f-turf);
	font: 800 15px/1.3 var(--f-f-num);
	color: var(--f-ink);
}

/* Compact variant: a tighter card for sidebars and teasers. */
.sfcd-trade-in-form.is-compact .sfcd-tin__card,
.sfcd-trade-in-form.is-compact .sfcd-tin__main > .sfcd-fin__success {
	gap: 16px;
	padding: clamp(16px, 5cqi, 22px);
	border-radius: 18px;
}

.sfcd-trade-in-form.is-compact .sfcd-tin__conds {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sfcd-trade-in-form.is-compact .sfcd-tin__cond-card small {
	display: none;
}

.sfcd-trade-in-form.is-compact .sfcd-tin__grid {
	gap: 12px;
}

.sfcd-trade-in-form.is-compact .sfcd-tin__submit {
	width: 100%;
}

.sfcd-trade-in-form.is-compact .sfcd-tin__est {
	padding: 14px 16px;
}

.sfcd-trade-in-form.is-compact .sfcd-tin__est-range {
	font-size: clamp(24px, 8cqi, 30px);
}

@container sfcd-fin (max-width: 880px) {
	.sfcd-trade-in-form.has-aside .sfcd-tin {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container sfcd-form (max-width: 600px) {
	.sfcd-tin__conds {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container sfcd-form (max-width: 420px) {
	.sfcd-tin__nav .sfcd-fin__btn--primary,
	.sfcd-tin__nav .sfcd-fin__btn--ghost {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------------ */
/* 6. No-JS, editor, motion, forced colours, print                      */
/* ------------------------------------------------------------------ */

/* Without JS the schedule table is still readable (yearly rows, server-rendered). */
.sfcd-calc:not(.is-live) .sfcd-calc__share,
.sfcd-calc:not(.is-live) .sfcd-fin__seg--sm {
	display: none;
}

/* Block editor canvas: nothing sticks. */
.editor-styles-wrapper .sfcd-contact-dealer.is-sticky,
.block-editor-block-list__layout .sfcd-contact-dealer.is-sticky {
	position: static;
}

@media (prefers-reduced-motion: reduce) {
	.sfcd-fin *,
	.sfcd-fin *::before,
	.sfcd-fin *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

@media (forced-colors: active) {
	.sfcd-fin__seg input:checked + span,
	.sfcd-fin__tier input:checked + .sfcd-fin__tier-card,
	.sfcd-tin__cond input:checked + .sfcd-tin__cond-card,
	.sfcd-cd__day input:checked + span,
	.sfcd-cd__time input:checked + span {
		outline: 3px solid Highlight;
		outline-offset: -3px;
	}

	.sfcd-donut__seg {
		stroke: CanvasText;
	}

	.sfcd-calc__bar-seg {
		background: CanvasText;
	}
}

@media print {
	.sfcd-calc__share,
	.sfcd-calc__cta,
	.sfcd-cd__form,
	.sfcd-cd__tabs,
	.sfcd-tin__card,
	.sfcd-pq__card {
		display: none !important;
	}

	.sfcd-contact-dealer .sfcd-print-only {
		display: block;
		margin: 0;
		font: 600 13px/1.4 var(--f-f-ui);
	}

	.sfcd-calc,
	.sfcd-cd {
		box-shadow: none;
		break-inside: avoid;
	}

	.sfcd-calc__sched {
		display: block;
	}

	.sfcd-calc__sched > summary::after {
		display: none;
	}
}

/* ---- Touch: segmented options and consent rows reach a 44 px target ----- */
@media (pointer: coarse), (max-width: 767.98px) {
	.sfcd-fin__seg span {
		min-height: 44px;
	}

	.sfcd-fin__consent {
		align-items: center;
		min-height: 44px;
	}
}
