/**
 * Home Affordability Calculator — front-end styles.
 *
 * Everything is scoped under .happs-haff and resets inherited theme styles for
 * the web components it uses (inputs, selects, buttons, links, tables) so the
 * host theme (Astra, etc.) cannot override the calculator's look, and the
 * calculator cannot leak styles into the theme.
 */

.happs-haff {
	--happs-haff-primary: #2f43ff;
	--happs-haff-accent: #1e2a5a;
	--happs-haff-text: #1f2933;
	--happs-haff-bg: #ffffff;
	--happs-haff-btn-text: #ffffff;
	--happs-haff-radius: 16px;
	--happs-haff-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--happs-haff-muted: #6b7280;
	--happs-haff-line: #e8eaf0;
	--happs-haff-soft: #eef1fb;

	all: initial;
	display: block;
	box-sizing: border-box;
	font-family: var(--happs-haff-font);
	color: var(--happs-haff-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	overflow-wrap: break-word;
}
.happs-haff *, .happs-haff *::before, .happs-haff *::after { box-sizing: border-box; min-width: 0; max-width: 100%; }
.happs-haff h2, .happs-haff h3, .happs-haff p, .happs-haff table, .happs-haff td, .happs-haff th, .happs-haff label, .happs-haff ul, .happs-haff ol {
	margin: 0; padding: 0; font-family: inherit; color: inherit; background: none; border: 0;
}

/* ---- layout (container-query driven) ---- */
.happs-haff-mount { container-type: inline-size; container-name: happshaff; }
.happs-haff-results { container-type: inline-size; container-name: happshaffr; }

.happs-haff-grid-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}
@container happshaff (min-width: 760px) {
	.happs-haff-grid-main { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
}
.happs-haff-card-ui {
	background: var(--happs-haff-bg);
	border: 1px solid var(--happs-haff-line);
	border-radius: var(--happs-haff-radius);
	padding: 22px;
	box-shadow: 0 6px 24px rgba(20, 28, 60, .06);
}
.happs-haff[data-layout="flat"] .happs-haff-card-ui { box-shadow: none; }

.happs-haff-panel-title {
	font-size: 16px; font-weight: 700; margin-bottom: 16px !important;
	display: inline-flex; align-items: center; gap: 8px;
}
.happs-haff-results { display: flex; flex-direction: column; gap: 16px; }
.happs-haff-results .happs-haff-card-ui { padding: 18px 20px; }

/* ---- input rows ---- */
.happs-haff-row { margin-bottom: 22px; }
.happs-haff-row.happs-haff-hidden { display: none; }
.happs-haff-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.happs-haff-row-label { font-size: 13.5px; font-weight: 600; color: var(--happs-haff-text); display: inline-flex; align-items: center; gap: 6px; }
.happs-haff-info {
	display: inline-flex; align-items: center; justify-content: center;
	width: 15px; height: 15px; border-radius: 50%; background: var(--happs-haff-soft);
	color: var(--happs-haff-muted); font-size: 10px; font-weight: 700; cursor: help;
}
.happs-haff-row-value { display: inline-flex; align-items: center; gap: 6px;
	border: 1px solid var(--happs-haff-line); border-radius: 10px; padding: 6px 10px; background: var(--happs-haff-bg); }
.happs-haff-unit { font-size: 12px; font-weight: 700; color: var(--happs-haff-muted); }
.happs-haff-val-input {
	border: 0 !important; outline: 0 !important; background: transparent !important;
	font: 600 15px/1.2 var(--happs-haff-font) !important; color: var(--happs-haff-text) !important;
	width: 92px; text-align: right; padding: 0 !important; box-shadow: none !important; margin: 0 !important;
}
.happs-haff-val-input-sm { width: 46px; }
.happs-haff-mini-select {
	border: 0 !important; background: transparent !important; font: 600 13px/1 var(--happs-haff-font) !important;
	color: var(--happs-haff-text) !important; cursor: pointer; padding: 0 2px !important; outline: 0 !important;
	-webkit-appearance: menulist; appearance: menulist;
}

/* ---- range slider ---- */
.happs-haff-slider {
	-webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px;
	background: var(--happs-haff-soft); outline: none; margin: 4px 0 8px; cursor: pointer; padding: 0;
}
.happs-haff-slider::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
	background: var(--happs-haff-primary); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.happs-haff-slider::-moz-range-thumb {
	width: 16px; height: 16px; border-radius: 50%; background: var(--happs-haff-primary);
	border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.happs-haff-slider:disabled { opacity: .55; cursor: not-allowed; }
.happs-haff-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--happs-haff-muted); }

.happs-haff-row.is-locked .happs-haff-row-value { background: var(--happs-haff-soft); opacity: .85; }

/* ---- advanced (collapsible) ---- */
.happs-haff-advance { margin: 6px 0 14px; border-top: 1px solid var(--happs-haff-line); padding-top: 12px; }
.happs-haff-advance-toggle {
	display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
	font: 700 13.5px/1 var(--happs-haff-font); color: var(--happs-haff-primary); padding: 4px 0;
}
.happs-haff-adv-caret {
	width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .18s ease; margin-top: -3px;
}
.happs-haff-advance.is-open .happs-haff-adv-caret { transform: rotate(-135deg); margin-top: 2px; }
.happs-haff-advance-body { display: none; margin-top: 14px; }
.happs-haff-advance.is-open .happs-haff-advance-body { display: block; }
.happs-haff-check-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; cursor: pointer; }
.happs-haff-check { width: 16px; height: 16px; accent-color: var(--happs-haff-primary); cursor: pointer; flex: none; }
.happs-haff-check-label { font-size: 13px; font-weight: 600; color: var(--happs-haff-text); }
.happs-haff-adv-group { padding-left: 6px; border-left: 2px solid var(--happs-haff-soft); }
.happs-haff-adv-group.is-off { display: none; }

/* ---- buttons ---- */
.happs-haff-btn-calc {
	display: block; width: 100%; margin-top: 8px;
	background: var(--happs-haff-primary);
	background: linear-gradient(135deg, var(--happs-haff-primary), color-mix(in srgb, var(--happs-haff-primary) 78%, #6a5cff));
	color: var(--happs-haff-btn-text); border: 0; border-radius: 12px; padding: 14px 18px;
	font: 700 15px/1 var(--happs-haff-font); cursor: pointer; transition: transform .08s ease, box-shadow .2s ease;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--happs-haff-primary) 35%, transparent);
}
.happs-haff-btn-calc:hover { transform: translateY(-1px); }
.happs-haff-btn-calc:active { transform: translateY(0); }

.happs-haff-fineprint { margin-top: 16px !important; font-size: 11px; color: var(--happs-haff-muted); line-height: 1.5; }

/* ---- hero / house price ---- */
.happs-haff-hero {
	background: var(--happs-haff-accent);
	background: linear-gradient(135deg, var(--happs-haff-accent), color-mix(in srgb, var(--happs-haff-accent) 75%, #3b4ea0));
	color: #fff; border-radius: var(--happs-haff-radius); padding: 26px;
	display: flex; align-items: center; justify-content: center; text-align: center; gap: 20px; flex-wrap: wrap;
}
@container happshaffr (min-width: 460px) {
	.happs-haff-hero { justify-content: space-between; text-align: left; }
}
.happs-haff-hero-main { min-width: 0; }
.happs-haff-hero-label { font-size: 13px; opacity: .82; margin-bottom: 6px; }
.happs-haff-hero-amount { font-size: 42px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.02; }
.happs-haff-hero-sub { font-size: 12.5px; opacity: .82; margin-top: 8px; max-width: 320px; }
.happs-haff-comfort { font-weight: 700; }
.happs-haff-comfort.is-comfortable { color: #5ef2a8; }
.happs-haff-comfort.is-moderate { color: #ffd36a; }
.happs-haff-comfort.is-tight { color: #ff9a9a; }

.happs-haff-hero-donut { position: relative; text-align: center; min-width: 190px; width: 200px; height: 200px; }
.happs-haff-gauge-chart { width: 200px; height: 200px; margin: 0 auto; }
.happs-haff-donut-label {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	text-align: center; color: #fff; pointer-events: none; width: 130px;
}
.happs-haff-donut-cap { font-size: 11px; opacity: .82; }
.happs-haff-donut-amt { font-size: 22px; font-weight: 800; margin-top: 1px; }
.happs-haff-donut-per { font-size: 11px; opacity: .82; margin-top: 1px; }

/* ---- summary / breakdown ---- */
.happs-haff-summary-body { display: grid; grid-template-columns: 1fr; gap: 0 30px; }
@container happshaffr (min-width: 470px) {
	.happs-haff-summary-body { grid-template-columns: 1fr 1fr; }
}
.happs-haff-kv { width: 100%; border-collapse: collapse; }
.happs-haff-kv td { padding: 9px 2px; border-bottom: 1px solid var(--happs-haff-line); font-size: 13px; }
.happs-haff-kv tr:last-child td { border-bottom: 0; }
.happs-haff-kv td:first-child { color: var(--happs-haff-muted); white-space: nowrap; }
.happs-haff-kv td:last-child { text-align: right; font-weight: 700; padding-left: 10px; }
.happs-haff-kv td.is-accent { color: var(--happs-haff-primary); }
.happs-haff-swatch {
	display: inline-block; width: 10px; height: 10px; border-radius: 3px;
	margin-right: 8px; vertical-align: middle; flex: none;
}

/* ---- amortization ---- */
.happs-haff-amort-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.happs-haff-amort-head .happs-haff-panel-title { margin-bottom: 0 !important; }
.happs-haff-amort-intro { font-size: 12.5px; color: var(--happs-haff-muted); line-height: 1.55; margin-bottom: 14px !important; }
.happs-haff-seg { display: inline-flex; background: var(--happs-haff-soft); border-radius: 999px; padding: 3px; flex: none; }
.happs-haff-seg-btn {
	border: 0; background: transparent; cursor: pointer; padding: 6px 14px; border-radius: 999px;
	font: 600 12.5px/1 var(--happs-haff-font); color: var(--happs-haff-muted); transition: background .15s ease, color .15s ease;
}
.happs-haff-seg-btn.is-on { background: var(--happs-haff-bg); color: var(--happs-haff-primary); box-shadow: 0 1px 3px rgba(20,28,60,.12); }
.happs-haff-line-chart { width: 100%; height: 260px; margin-bottom: 12px; }
.happs-haff-scroll { max-height: 320px; overflow: auto; border-radius: 10px; border: 1px solid var(--happs-haff-line); -webkit-overflow-scrolling: touch; }
.happs-haff-amort-tb { max-width: none; min-width: 100%; }
.happs-haff-amort-tb { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: right; }
.happs-haff-amort-tb th {
	position: sticky; top: 0; background: var(--happs-haff-primary); color: #fff; padding: 10px 8px;
	font-weight: 600; text-align: right; white-space: nowrap;
}
.happs-haff-amort-tb th:first-child, .happs-haff-amort-tb td:first-child { text-align: center; }
.happs-haff-amort-tb td { padding: 9px 8px; border-bottom: 1px solid var(--happs-haff-line); white-space: nowrap; }
.happs-haff-amort-tb tbody tr:nth-child(even) { background: var(--happs-haff-soft); }

/* ---- actions ---- */
.happs-haff-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.happs-haff-btn-action {
	flex: 1 1 auto; min-width: 120px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--happs-haff-bg); color: var(--happs-haff-text);
	border: 1px solid var(--happs-haff-line); border-radius: 10px; padding: 11px 14px;
	font: 600 13.5px/1 var(--happs-haff-font); cursor: pointer; transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.happs-haff-btn-action:hover { border-color: var(--happs-haff-primary); color: var(--happs-haff-primary); box-shadow: 0 4px 12px rgba(20,28,60,.08); }
.happs-haff-btn-action:disabled { cursor: default; opacity: .75; }
.happs-haff-ic { width: 17px; height: 17px; flex: none; }

/* ---- spinner ---- */
.happs-haff-spin {
	display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor;
	border-top-color: transparent; border-radius: 50%; vertical-align: middle;
	animation: happs-haff-rot .6s linear infinite;
}
.happs-haff-btn-calc.is-loading, .happs-haff-btn-action.is-loading { pointer-events: none; }
@keyframes happs-haff-rot { to { transform: rotate(360deg); } }

/* ---- lead modal ---- */
.happs-haff-overlay {
	position: fixed; inset: 0; background: rgba(17, 24, 39, .55); z-index: 99999;
	display: flex; align-items: center; justify-content: center; padding: 18px;
}
.happs-haff-modal {
	background: #fff; color: var(--happs-haff-text); border-radius: 16px; width: 100%; max-width: 420px;
	padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.happs-haff-modal-title { font-size: 19px; font-weight: 800; margin-bottom: 6px !important; }
.happs-haff-modal-intro { color: var(--happs-haff-muted); font-size: 13.5px; margin-bottom: 16px !important; }
.happs-haff-lead-form { display: flex; flex-direction: column; gap: 12px; }
.happs-haff-lead-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.happs-haff-lead-field input {
	border: 1px solid var(--happs-haff-line); border-radius: 10px; padding: 11px 12px;
	font: 400 14px/1.2 var(--happs-haff-font); color: var(--happs-haff-text); background: #fff; outline: none;
}
.happs-haff-lead-field input:focus { border-color: var(--happs-haff-primary); }
.happs-haff-lead-msg { color: #dc2626; font-size: 12.5px; min-height: 16px; margin: 0 !important; font-weight: 600; }
.happs-haff-link-skip {
	background: none; border: 0; color: var(--happs-haff-muted); font: 600 13px var(--happs-haff-font);
	cursor: pointer; text-decoration: underline; padding: 4px;
}

/* ---- dark tooltips (? help icons) ---- */
.happs-haff .happs-haff-tip {
	position: fixed; z-index: 100001; max-width: 240px; width: max-content;
	background: #111827 !important; color: #ffffff !important;
	font: 500 12px/1.45 var(--happs-haff-font) !important;
	padding: 7px 10px !important; border-radius: 8px !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .28); text-align: left !important;
	pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(3px);
	transition: opacity .12s ease, transform .12s ease;
}
.happs-haff .happs-haff-tip.is-in { opacity: 1; visibility: visible; transform: translateY(0); }
.happs-haff .happs-haff-tip::after {
	content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
	border: 5px solid transparent; border-top-color: #111827;
}
.happs-haff .happs-haff-tip.is-below::after {
	top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #111827;
}
.happs-haff .happs-haff-info { cursor: help; }

/* ---- toast ---- */
.happs-haff-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
	background: #111827; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
	z-index: 100000; opacity: 0; transition: opacity .25s ease, transform .25s ease; box-shadow: 0 12px 30px rgba(0,0,0,.3);
}
.happs-haff-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* ---- branding + tamper ---- */
.happs-haff-branding { text-align: center; font-size: 12px; color: var(--happs-haff-muted); margin-top: 16px !important; }
.happs-haff-branding a { color: var(--happs-haff-primary); text-decoration: none; }
.happs-haff-tamper {
	padding: 40px 24px; text-align: center; color: #b91c1c; font-weight: 700; font-size: 15px;
	background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--happs-haff-radius);
}

/* ---- loading ---- */
.happs-haff.is-loading .happs-haff-hero-amount { opacity: .45; }

/* Compact cosmetics when the calculator itself is narrow (container-based). */
@container happshaff (max-width: 480px) {
	.happs-haff-card-ui { padding: 16px; }
	.happs-haff-hero { padding: 20px; }
	.happs-haff-hero-amount { font-size: 34px; }
}
@container happshaffr (max-width: 360px) {
	.happs-haff-actions .happs-haff-btn-action { min-width: calc(50% - 5px); }
}

/* Fallback for browsers without container-query support: use the viewport. */
@supports not (container-type: inline-size) {
	@media (min-width: 900px) {
		.happs-haff-grid-main { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
		.happs-haff-summary-body { grid-template-columns: 1fr 1fr; }
		.happs-haff-hero { justify-content: space-between; text-align: left; }
	}
	@media (max-width: 460px) {
		.happs-haff-card-ui { padding: 16px; }
		.happs-haff-hero-amount { font-size: 34px; }
	}
}

/* On phones / small screens, keep ~5% breathing room on each side so the
 * cards never sit flush against the viewport edges. */
@media (max-width: 782px) {
	.happs-haff { padding-left: 5%; padding-right: 5%; }
}

/* =====================================================================
 * THEME ISOLATION
 * Aggressive themes (Astra, etc.) style `.entry-content input/select/button`
 * (specificity 0,1,1), which overrides our single-class rules. Every rule
 * below is prefixed with the `.happs-haff` root (0,2,x) and forces the key
 * properties so the calculator keeps its own look inside any theme.
 * ===================================================================== */
.happs-haff input,
.happs-haff select,
.happs-haff textarea,
.happs-haff button {
	font-family: var(--happs-haff-font) !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	line-height: normal !important;
	margin: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: none;
	background-image: none;
}

.happs-haff .happs-haff-val-input {
	width: 92px !important;
	max-width: 92px !important;
	min-width: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: right !important;
	color: var(--happs-haff-text) !important;
}
.happs-haff .happs-haff-val-input-sm { width: 46px !important; max-width: 46px !important; }
.happs-haff .happs-haff-unit { white-space: nowrap !important; }
.happs-haff .happs-haff-row-label { flex: 1 1 auto; min-width: 0; }
.happs-haff .happs-haff-row-value { flex: 0 0 auto; }

/* Selects — appearance reset + our own caret so theme arrows can't double up */
.happs-haff .happs-haff-mini-select {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	color: var(--happs-haff-text) !important;
	font-weight: 600 !important;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	width: auto !important;
	border: 0 !important;
	background-color: transparent !important;
	padding: 0 18px 0 2px !important;
	background-position: right 2px center !important;
	background-size: 13px 13px !important;
	font-size: 13px !important;
}

/* Range slider — keep our flat track + round thumb (JS paints the fill inline) */
.happs-haff input[type="range"].happs-haff-slider {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 6px !important;
	border: 0 !important;
	border-radius: 6px !important;
	padding: 0 !important;
	margin: 4px 0 8px !important;
	background: var(--happs-haff-soft);
	accent-color: var(--happs-haff-primary);
	box-shadow: none !important;
	outline: 0 !important;
	filter: none !important;
}
/* Some themes draw a border / inset shadow on the range track — force it flat. */
.happs-haff input[type="range"].happs-haff-slider::-webkit-slider-runnable-track {
	background: transparent !important; height: 6px !important; border: 0 !important;
	border-radius: 6px !important; box-shadow: none !important;
}
.happs-haff input[type="range"].happs-haff-slider::-webkit-slider-thumb {
	-webkit-appearance: none !important; appearance: none !important;
	width: 18px !important; height: 18px !important; margin-top: -6px;
	border-radius: 50% !important; background: var(--happs-haff-primary) !important;
	border: 3px solid #fff !important; box-shadow: 0 1px 4px rgba(0,0,0,.25) !important; cursor: pointer;
}
.happs-haff input[type="range"].happs-haff-slider::-moz-range-track {
	background: transparent !important; height: 6px !important; border: 0 !important;
	border-radius: 6px !important; box-shadow: none !important;
}
.happs-haff input[type="range"].happs-haff-slider::-moz-range-progress { background: transparent !important; border: 0 !important; }
.happs-haff input[type="range"].happs-haff-slider::-moz-range-thumb {
	width: 16px !important; height: 16px !important; border-radius: 50% !important;
	background: var(--happs-haff-primary) !important; border: 3px solid #fff !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.25) !important; cursor: pointer;
}
/* Firefox draws a dotted focus ring around range inputs — remove it. */
.happs-haff input[type="range"].happs-haff-slider::-moz-focus-outer { border: 0 !important; }
.happs-haff input[type="range"].happs-haff-slider:focus { outline: 0 !important; box-shadow: none !important; }

/* Buttons — re-assert our gradients / borders / hover so theme can't restyle */
.happs-haff .happs-haff-btn-calc {
	width: 100% !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 14px 18px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	color: var(--happs-haff-btn-text) !important;
	cursor: pointer;
	background: var(--happs-haff-primary) !important;
	background: linear-gradient(135deg, var(--happs-haff-primary), color-mix(in srgb, var(--happs-haff-primary) 78%, #6a5cff)) !important;
}
.happs-haff .happs-haff-btn-calc:hover { color: var(--happs-haff-btn-text) !important; transform: translateY(-1px); }
.happs-haff .happs-haff-btn-action {
	border: 1px solid var(--happs-haff-line) !important;
	border-radius: 10px !important;
	padding: 11px 14px !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	background: var(--happs-haff-bg) !important;
	color: var(--happs-haff-text) !important;
	cursor: pointer;
}
.happs-haff .happs-haff-btn-action:hover {
	background: var(--happs-haff-bg) !important;
	color: var(--happs-haff-primary) !important;
	border-color: var(--happs-haff-primary) !important;
}
.happs-haff .happs-haff-advance-toggle { background: none !important; border: 0 !important; padding: 4px 0 !important; color: var(--happs-haff-primary) !important; width: auto !important; }
.happs-haff .happs-haff-seg-btn { border: 0 !important; cursor: pointer; }
.happs-haff .happs-haff-seg-btn.is-on { background: var(--happs-haff-bg) !important; color: var(--happs-haff-primary) !important; }

/* Lead-form fields + skip link */
.happs-haff .happs-haff-lead-field input {
	width: 100% !important;
	border: 1px solid var(--happs-haff-line) !important;
	border-radius: 10px !important;
	padding: 11px 12px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	background: #fff !important;
	color: var(--happs-haff-text) !important;
}
.happs-haff .happs-haff-link-skip { border: 0 !important; background: none !important; cursor: pointer; }

/* Tables — themes love to restyle td/th/tr. Force ours. */
.happs-haff .happs-haff-kv,
.happs-haff .happs-haff-amort-tb {
	width: 100% !important; border-collapse: collapse !important; background: transparent !important; margin: 0 !important;
}
.happs-haff .happs-haff-kv td {
	padding: 9px 2px !important; border: 0 !important; border-bottom: 1px solid var(--happs-haff-line) !important;
	background: transparent !important; font-size: 13px !important; vertical-align: middle; color: var(--happs-haff-text);
}
.happs-haff .happs-haff-kv td:first-child { color: var(--happs-haff-muted) !important; text-align: left !important; font-weight: 400 !important; }
.happs-haff .happs-haff-kv td:last-child { text-align: right !important; font-weight: 700 !important; }
.happs-haff .happs-haff-kv td.is-accent { color: var(--happs-haff-primary) !important; }
.happs-haff .happs-haff-swatch {
	display: inline-block !important; width: 10px !important; height: 10px !important;
	border-radius: 3px !important; margin-right: 8px !important; vertical-align: middle !important;
	border: 0 !important; padding: 0 !important;
}
.happs-haff .happs-haff-amort-tb th {
	background: var(--happs-haff-primary) !important; color: #fff !important; padding: 10px 8px !important;
	border: 0 !important; text-align: right !important; font-weight: 600 !important; white-space: nowrap;
}
.happs-haff .happs-haff-amort-tb td {
	padding: 9px 8px !important; border: 0 !important; border-bottom: 1px solid var(--happs-haff-line) !important;
	text-align: right !important; background: transparent !important; color: var(--happs-haff-text) !important; white-space: nowrap;
}
.happs-haff .happs-haff-amort-tb th:first-child,
.happs-haff .happs-haff-amort-tb td:first-child { text-align: center !important; }
.happs-haff .happs-haff-amort-tb tbody tr { background: transparent !important; }
.happs-haff .happs-haff-amort-tb tbody tr:nth-child(even) td { background: var(--happs-haff-soft) !important; }

/* Links inside the widget shouldn't inherit theme underlines/colours */
.happs-haff .happs-haff-branding a { text-decoration: none !important; color: var(--happs-haff-primary) !important; }
.happs-haff .happs-haff-check { accent-color: var(--happs-haff-primary) !important; }
