/* Cantrell Pricing Estimator — front end */

.cpe {
	--cpe-bg: #0e783d;
	--cpe-text: #f4f1e4;
	--cpe-accent: #e0972a;
	--cpe-ink: #14170f;
	--cpe-line: color-mix(in srgb, var(--cpe-text) 22%, transparent);
	--cpe-veil: color-mix(in srgb, var(--cpe-text) 7%, transparent);
	--cpe-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
	--cpe-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--cpe-radius: 12px;

	background: var(--cpe-bg);
	color: var(--cpe-text);
	padding: 92px 0;
	box-sizing: border-box;
}

/* Fallbacks for browsers without color-mix(). */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
	.cpe {
		--cpe-line: rgba(255, 255, 255, 0.22);
		--cpe-veil: rgba(255, 255, 255, 0.07);
	}
}

.cpe *,
.cpe *::before,
.cpe *::after {
	box-sizing: inherit;
}

.cpe__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- header ---------- */

.cpe__head {
	max-width: 680px;
	margin-bottom: 40px;
}

.cpe__eyebrow {
	font-family: var(--cpe-mono);
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--cpe-accent);
	margin: 0;
}

.cpe__heading {
	font-family: var(--cpe-display);
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--cpe-text);
	margin: 14px 0 12px;
}

.cpe__intro {
	font-size: 17px;
	line-height: 1.6;
	color: color-mix(in srgb, var(--cpe-text) 78%, transparent);
	margin: 0;
}

/* ---------- format tabs ---------- */

.cpe__formats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
	margin-bottom: 26px;
}

.cpe__format {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	width: 100%;
	padding: 20px 24px;
	border: 1px solid var(--cpe-line);
	border-radius: 10px;
	background: var(--cpe-veil);
	color: var(--cpe-text);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.cpe__format:hover {
	border-color: color-mix(in srgb, var(--cpe-accent) 60%, transparent);
}

.cpe__format.is-active {
	border-color: var(--cpe-accent);
	background: color-mix(in srgb, var(--cpe-accent) 14%, transparent);
	color: var(--cpe-accent);
}

.cpe__format:focus-visible,
.cpe__cta:focus-visible,
.cpe__slider:focus-visible {
	outline: 2px solid var(--cpe-accent);
	outline-offset: 3px;
}

.cpe__format-title {
	font-family: var(--cpe-display);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
}

.cpe__format-sub {
	font-size: 13px;
	opacity: 0.75;
}

/* ---------- layout ---------- */

.cpe__grid {
	display: grid;
	grid-template-columns: 1.25fr 0.75fr;
	gap: 22px;
	align-items: stretch;
}

/* ---------- calculator panel ---------- */

.cpe__calc {
	background: color-mix(in srgb, var(--cpe-text) 5%, transparent);
	border: 1px solid var(--cpe-line);
	border-radius: var(--cpe-radius);
	padding: 38px 40px;
}

.cpe__readouts {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.cpe__readout--end {
	text-align: right;
}

.cpe__micro {
	font-family: var(--cpe-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--cpe-text) 62%, transparent);
	margin: 0;
}

.cpe__micro--sm {
	font-size: 10px;
	letter-spacing: 0.16em;
}

.cpe__micro--ink {
	color: color-mix(in srgb, var(--cpe-ink) 70%, transparent);
}

.cpe__figure {
	font-family: var(--cpe-display);
	font-size: clamp(34px, 4.4vw, 52px);
	font-weight: 700;
	line-height: 1.05;
	margin: 6px 0 0;
	font-variant-numeric: tabular-nums;
}

.cpe__figure--accent {
	color: var(--cpe-accent);
}

/* slider */

.cpe__slider {
	--cpe-fill: 0%;
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 4px;
	margin: 30px 0 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(
		to right,
		var(--cpe-accent) 0%,
		var(--cpe-accent) var(--cpe-fill),
		color-mix(in srgb, var(--cpe-text) 25%, transparent) var(--cpe-fill),
		color-mix(in srgb, var(--cpe-text) 25%, transparent) 100%
	);
	cursor: pointer;
}

.cpe__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cpe-accent);
	border: 3px solid var(--cpe-bg);
	box-shadow: 0 0 0 1px var(--cpe-accent);
	cursor: pointer;
}

.cpe__slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cpe-accent);
	border: 3px solid var(--cpe-bg);
	box-shadow: 0 0 0 1px var(--cpe-accent);
	cursor: pointer;
}

.cpe__slider::-moz-range-track {
	height: 4px;
	background: transparent;
}

.cpe__range-notes {
	display: flex;
	justify-content: space-between;
	font-family: var(--cpe-mono);
	font-size: 11px;
	color: color-mix(in srgb, var(--cpe-text) 58%, transparent);
}

/* stat strip */

.cpe__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	margin-top: 34px;
	background: var(--cpe-line);
	border-radius: 8px;
	overflow: hidden;
}

.cpe__stat {
	background: var(--cpe-bg);
	padding: 20px 22px;
}

.cpe__stat-value {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	margin: 6px 0 0;
	font-variant-numeric: tabular-nums;
}

.cpe__stat-value--accent {
	color: var(--cpe-accent);
}

/* ---------- total panel ---------- */

.cpe__total {
	background: var(--cpe-accent);
	color: var(--cpe-ink);
	border-radius: var(--cpe-radius);
	padding: 38px 34px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 30px;
}

.cpe__total-figure {
	font-family: var(--cpe-display);
	font-size: clamp(40px, 5.2vw, 60px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin: 10px 0 6px;
	font-variant-numeric: tabular-nums;
}

.cpe__total-note {
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
	color: color-mix(in srgb, var(--cpe-ink) 82%, transparent);
}

.cpe__disclaimer {
	border-top: 1px solid color-mix(in srgb, var(--cpe-ink) 25%, transparent);
	padding-top: 18px;
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: color-mix(in srgb, var(--cpe-ink) 85%, transparent);
}

.cpe__cta {
	display: block;
	margin-top: 20px;
	padding: 16px 24px;
	border-radius: 6px;
	background: var(--cpe-ink);
	color: var(--cpe-bg);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.cpe__cta:hover,
.cpe__cta:focus {
	color: var(--cpe-bg);
	opacity: 0.88;
	text-decoration: none;
}

/* ---------- tier cards ---------- */

.cpe__tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin-top: 22px;
}

.cpe__tier {
	padding: 24px 26px;
	border: 1px solid var(--cpe-line);
	border-radius: 10px;
	background: color-mix(in srgb, var(--cpe-text) 3%, transparent);
	transition: border-color 0.18s ease, background 0.18s ease;
}

.cpe__tier.is-current {
	border-color: var(--cpe-accent);
	background: color-mix(in srgb, var(--cpe-accent) 10%, transparent);
}

.cpe__tier-range {
	font-family: var(--cpe-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--cpe-text) 58%, transparent);
	margin: 0;
}

.cpe__tier-price {
	font-family: var(--cpe-display);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	margin: 8px 0 4px;
}

.cpe__tier-note {
	font-size: 14px;
	line-height: 1.5;
	color: color-mix(in srgb, var(--cpe-text) 72%, transparent);
	margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.cpe__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.cpe {
		padding: 64px 0;
	}

	.cpe__inner {
		padding: 0 20px;
	}

	.cpe__calc {
		padding: 26px 22px;
	}

	.cpe__total {
		padding: 28px 24px;
	}

	.cpe__stats {
		grid-template-columns: 1fr;
	}

	.cpe__readouts {
		gap: 14px;
	}

	.cpe__readout--end {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpe *,
	.cpe *::before,
	.cpe *::after {
		transition: none !important;
	}
}

/* ------------------------------------------------------------------
   THEME ARMOUR
   A shortcode section lands inside whatever the active theme and
   Elementor already say about h2, p, a and button. Those selectors are
   often more specific than a single class, which is how a theme heading
   colour or font ends up inside this section. Nothing new is declared
   below — these repeat the rules above at a weight that survives.
   ------------------------------------------------------------------ */

.cpe .cpe__eyebrow,
.cpe .cpe__heading,
.cpe .cpe__intro,
.cpe .cpe__micro,
.cpe .cpe__figure,
.cpe .cpe__stat-value,
.cpe .cpe__total-figure,
.cpe .cpe__total-note,
.cpe .cpe__disclaimer,
.cpe .cpe__tier-range,
.cpe .cpe__tier-price,
.cpe .cpe__tier-note {
	text-transform: none;
	text-shadow: none;
}

.cpe .cpe__eyebrow {
	font-family: var(--cpe-mono) !important;
	font-size: 11px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.24em !important;
	text-transform: uppercase !important;
	color: var(--cpe-accent) !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cpe h2.cpe__heading,
.cpe .cpe__heading {
	font-family: var(--cpe-display) !important;
	font-size: clamp(30px, 4vw, 46px) !important;
	font-weight: 700 !important;
	line-height: 1.08 !important;
	letter-spacing: -0.015em !important;
	color: var(--cpe-text) !important;
	margin: 14px 0 12px !important;
	padding: 0 !important;
	text-align: left;
}

.cpe .cpe__intro {
	font-size: 17px !important;
	line-height: 1.6 !important;
	color: color-mix(in srgb, var(--cpe-text) 78%, transparent) !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cpe .cpe__micro {
	font-family: var(--cpe-mono) !important;
	font-weight: 400 !important;
	color: color-mix(in srgb, var(--cpe-text) 62%, transparent) !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cpe .cpe__micro--ink {
	color: color-mix(in srgb, var(--cpe-ink) 70%, transparent) !important;
}

.cpe .cpe__figure,
.cpe .cpe__total-figure,
.cpe .cpe__tier-price,
.cpe .cpe__format-title {
	font-family: var(--cpe-display) !important;
	font-weight: 700 !important;
}

.cpe .cpe__figure {
	color: var(--cpe-text) !important;
	margin: 6px 0 0 !important;
}

.cpe .cpe__figure--accent {
	color: var(--cpe-accent) !important;
}

.cpe .cpe__stat-value {
	color: var(--cpe-text) !important;
	margin: 6px 0 0 !important;
}

.cpe .cpe__stat-value--accent {
	color: var(--cpe-accent) !important;
}

.cpe .cpe__total-figure,
.cpe .cpe__total-note,
.cpe .cpe__disclaimer {
	color: var(--cpe-ink) !important;
}

.cpe .cpe__tier-price {
	color: var(--cpe-text) !important;
}

.cpe .cpe__tier-range,
.cpe .cpe__tier-note {
	color: color-mix(in srgb, var(--cpe-text) 68%, transparent) !important;
	margin: 0 !important;
}

/* Format selector cards — Elementor and most themes style every button. */
.cpe button.cpe__format,
.cpe .cpe__format {
	font-family: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	background: var(--cpe-veil) !important;
	border: 1px solid var(--cpe-line) !important;
	border-radius: 10px !important;
	color: var(--cpe-text) !important;
	box-shadow: none !important;
	padding: 20px 24px !important;
}

.cpe button.cpe__format.is-active,
.cpe .cpe__format.is-active {
	background: color-mix(in srgb, var(--cpe-accent) 14%, transparent) !important;
	border-color: var(--cpe-accent) !important;
	color: var(--cpe-accent) !important;
}

/* The quote button is an <a>, the most heavily themed element on any site. */
.cpe a.cpe__cta,
.cpe a.cpe__cta:link,
.cpe a.cpe__cta:visited {
	display: block !important;
	background: var(--cpe-ink) !important;
	background-image: none !important;
	color: var(--cpe-bg) !important;
	border: 0 !important;
	border-radius: 6px !important;
	padding: 16px 24px !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
}

.cpe a.cpe__cta:hover,
.cpe a.cpe__cta:focus,
.cpe a.cpe__cta:active {
	background: var(--cpe-ink) !important;
	color: var(--cpe-bg) !important;
	text-decoration: none !important;
	opacity: 0.88;
}

/* Range input — themes that blanket-style form controls break the track. */
.cpe button.cpe__format:hover,
.cpe .cpe__format:hover {
	border-color: color-mix(in srgb, var(--cpe-accent) 60%, transparent) !important;
}

.cpe input[type="range"].cpe__slider {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: linear-gradient(
		to right,
		var(--cpe-accent) 0%,
		var(--cpe-accent) var(--cpe-fill),
		color-mix(in srgb, var(--cpe-text) 25%, transparent) var(--cpe-fill),
		color-mix(in srgb, var(--cpe-text) 25%, transparent) 100%
	) !important;
	width: 100% !important;
	height: 4px !important;
	min-height: 0 !important;
	max-width: none !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 0 !important;
	margin: 30px 0 8px !important;
	box-shadow: none !important;
	outline-offset: 3px;
}

.cpe .cpe__calc,
.cpe .cpe__total,
.cpe .cpe__tier,
.cpe .cpe__stat {
	box-shadow: none !important;
}
