/* KA Core calculators. 1.60.12: the editorial redesign (CALC-4).
   Literal light colours so it stands alone; the theme's --hd-* tokens take over when present, and
   its dark toggle (:root[data-hd-theme="dark"]) repaints it at the bottom of this file. */
.hdc {
	--hdc-ink: var(--hd-ink, #131c2e);
	--hdc-body: var(--hd-body, #1a2332);
	--hdc-muted: var(--hd-muted, #5b6473);
	--hdc-faint: var(--hd-faint, #94a3b8);
	--hdc-line: var(--hd-line, #e2e8f0);
	--hdc-line-soft: #eef2f6;
	--hdc-surface: var(--hd-surface, #ffffff);
	--hdc-alt: var(--hd-alt, #f8fafc);
	--hdc-band: #f3f6fa;
	--hdc-navy: var(--hd-navy, #111c2e);
	--hdc-accent: var(--hd-accent, #c8102e);
	--hdc-focus: #2563eb;
	--hdc-c1: #1e4e8c;
	--hdc-c2: #0f766e;
	--hdc-c3: #b45309;
	--hdc-c4: #6d28d9;
	--hdc-warn: #b45309;
	--hdc-warn-bg: #fff7ed;
	--hdc-notice-bg: #fffbeb;
	--hdc-notice-line: #f59e0b;
	--hdc-bad: #b91c1c;
	--hdc-good: #15803d;
	--hdc-radius: 16px;
	--hdc-sans: var(--hd-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
	--hdc-serif: var(--hd-serif, Georgia, "Times New Roman", serif);
	position: relative;
	margin: 2.25rem 0;
	padding: 0;
	background: var(--hdc-surface);
	color: var(--hdc-body);
	border: 1px solid var(--hdc-line);
	border-radius: var(--hdc-radius);
	box-shadow: 0 1px 2px rgba(17, 28, 46, 0.05), 0 12px 32px -12px rgba(17, 28, 46, 0.18);
	font-family: var(--hdc-sans);
	font-size: 0.95rem;
	line-height: 1.5;
	overflow: hidden;
	text-align: left;
}
.hdc *, .hdc *::before, .hdc *::after { box-sizing: border-box; }
.hdc-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- head: a navy band ---------- */
.hdc-head {
	padding: 1.35rem 1.6rem 1.25rem;
	background: linear-gradient(135deg, var(--hdc-navy) 0%, #1c2c48 100%);
	color: #e6ecf5;
	border-bottom: 3px solid var(--hdc-accent);
}
.hdc-head--slim { padding-top: 1rem; padding-bottom: 1rem; }
.hdc-kicker {
	display: inline-flex; align-items: center; gap: 0.45rem;
	font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #ffb4bf;
}
.hdc-kicker-icon {
	width: 0.95rem; height: 0.95rem; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm1 2.5v3h8v-3H4zM4 8v1.6h1.6V8H4zm3.2 0v1.6h1.6V8H7.2zm3.2 0v4.8H12V8h-1.6zM4 11.2v1.6h1.6v-1.6H4zm3.2 0v1.6h1.6v-1.6H7.2z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm1 2.5v3h8v-3H4zM4 8v1.6h1.6V8H4zm3.2 0v1.6h1.6V8H7.2zm3.2 0v4.8H12V8h-1.6zM4 11.2v1.6h1.6v-1.6H4zm3.2 0v1.6h1.6v-1.6H7.2z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hdc .hdc-title {
	margin: 0.35rem 0 0; font-family: var(--hdc-serif); font-size: 1.5rem; line-height: 1.22;
	color: #fff; font-weight: 700; letter-spacing: -0.01em; border: 0; padding: 0;
}
.hdc-intro { margin: 0.5rem 0 0; color: #c9d4e3; font-size: 0.93rem; max-width: 60ch; }

/* ---------- the notice: seen before typing ---------- */
.hdc-notice {
	display: flex; gap: 0.75rem; align-items: flex-start;
	margin: 1.25rem 1.6rem 0; padding: 0.85rem 1rem;
	background: var(--hdc-notice-bg); border: 1px solid #fde68a; border-left: 4px solid var(--hdc-notice-line);
	border-radius: 10px; color: #3f2d06; font-size: 0.92rem; line-height: 1.45;
}
.hdc-notice-icon {
	flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.05rem; border-radius: 50%;
	background: var(--hdc-notice-line) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v5.2M8 11.3v.4' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.hdc-notice-h { font-weight: 800; color: #3f2d06; }

/* ---------- the worksheet ---------- */
.hdc-tablewrap { padding: 0.5rem 1.6rem 0; }
.hdc-table {
	width: 100%; border-collapse: separate; border-spacing: 0; margin: 0;
	font-variant-numeric: tabular-nums; table-layout: fixed; border: 0;
}
.hdc-table th, .hdc-table td {
	padding: 1rem 0.75rem; text-align: left; vertical-align: top;
	border: 0; border-bottom: 1px solid var(--hdc-line-soft); background: none; color: inherit; font-weight: inherit;
}
.hdc-table th:first-child { padding-left: 0; }
.hdc-table td:last-child { padding-right: 0; }
.hdc-table thead th {
	padding-top: 0.9rem; padding-bottom: 0.7rem; vertical-align: bottom;
	border-bottom: 1px solid var(--hdc-line);
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hdc-muted);
}
.hdc-th-line { width: 40%; }
.hdc--cols-1 .hdc-th-line { width: 55%; }
.hdc--cols-3 .hdc-th-line, .hdc--cols-4 .hdc-th-line { width: 30%; }
.hdc-table thead .hdc-th-col { text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: var(--hdc-ink); line-height: 1.3; }
.hdc-th-text { display: block; padding-top: 0.55rem; border-top: 4px solid var(--hdc-col); }
.hdc-c1 { --hdc-col: var(--hdc-c1); }
.hdc-c2 { --hdc-col: var(--hdc-c2); }
.hdc-c3 { --hdc-col: var(--hdc-c3); }
.hdc-c4 { --hdc-col: var(--hdc-c4); }

.hdc-label { color: var(--hdc-ink); }
.hdc-label-main { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 700; font-size: 0.97rem; line-height: 1.35; }
.hdc-badge {
	flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-top: -0.08rem;
	border-radius: 50%; background: var(--hdc-navy); color: #fff; font-size: 0.78rem; font-weight: 800;
}
.hdc-hint, .hdc-where {
	display: block; margin: 0.3rem 0 0 2.2rem; font-size: 0.8rem; font-weight: 400; line-height: 1.4; color: var(--hdc-muted);
}
.hdc-row--total .hdc-hint, .hdc-row--total .hdc-where { margin-left: 0; }
.hdc-where-h { font-weight: 700; color: var(--hdc-ink); }
.hdc-where a { color: inherit; text-decoration: underline; text-decoration-color: var(--hdc-faint); text-underline-offset: 2px; }
.hdc-text { display: inline-block; padding-top: 0.6rem; color: var(--hdc-muted); font-size: 0.86rem; font-style: italic; }
.hdc-none { display: inline-block; padding-top: 0.6rem; color: var(--hdc-faint); }
.hdc-cell-note, .hdc-formula-hint { display: block; margin-top: 0.35rem; font-size: 0.78rem; line-height: 1.4; color: var(--hdc-muted); }
.hdc-row--section th {
	padding: 1.4rem 0 0.4rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--hdc-accent); border-bottom-color: transparent;
}

/* number boxes */
.hdc-field { position: relative; display: flex; align-items: center; width: 100%; }
.hdc-cur, .hdc-pct { position: absolute; color: var(--hdc-muted); font-weight: 600; pointer-events: none; font-size: 1rem; }
.hdc-cur { left: 0.8rem; }
.hdc-pct { right: 0.8rem; }
.hdc .hdc-in {
	width: 100%; height: 2.9rem; margin: 0; padding: 0 0.85rem; font: inherit; font-size: 1.05rem; line-height: 1;
	font-variant-numeric: tabular-nums; font-weight: 650; color: var(--hdc-ink); text-align: right;
	background: var(--hdc-surface); border: 1.5px solid #cfd8e3; border-radius: 10px; box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none; appearance: none;
}
.hdc-field--money .hdc-in { padding-left: 1.75rem; }
.hdc-field--percent .hdc-in { padding-right: 1.9rem; }
.hdc .hdc-in::placeholder { color: #b6c0cd; font-weight: 500; opacity: 1; }
.hdc .hdc-in:hover { border-color: #aebbcb; }
.hdc .hdc-in:focus { outline: none; border-color: var(--hdc-col, var(--hdc-focus)); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16); }
.hdc .hdc-in--copy::placeholder { color: var(--hdc-muted); font-weight: 650; font-style: italic; }
.hdc .hdc-in--warn { border-color: var(--hdc-warn); background: var(--hdc-warn-bg); }
.hdc .hdc-in--bad { border-color: var(--hdc-bad); }
.hdc .hdc-in--used { border-style: dashed; }
.hdc-msg { display: block; margin-top: 0.35rem; font-size: 0.79rem; font-weight: 650; line-height: 1.35; color: var(--hdc-warn); }
.hdc-msg:empty { display: none; }
.hdc-msg--stop { color: var(--hdc-bad); }
.hdc-msg--warn { color: var(--hdc-warn); }
.hdc-msg--use_limit { color: var(--hdc-muted); }

/* pick one: a segmented control; only the picked plan's note shows */
.hdc-choice { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.hdc-opt { position: relative; cursor: pointer; flex: 1 1 auto; min-width: 4.6rem; }
.hdc-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hdc-opt-body {
	display: block; height: 100%; padding: 0.5rem 0.65rem; border: 1.5px solid #cfd8e3; border-radius: 10px;
	background: var(--hdc-surface); transition: border-color 0.15s, box-shadow 0.15s; text-align: center;
}
.hdc-opt:hover .hdc-opt-body { border-color: #aebbcb; }
.hdc-opt-label { display: block; font-weight: 750; color: var(--hdc-ink); font-size: 0.9rem; line-height: 1.2; }
.hdc-opt-val { display: block; font-weight: 600; color: var(--hdc-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.hdc-opt-note { display: block; margin-top: 0.3rem; font-size: 0.74rem; color: var(--hdc-muted); line-height: 1.3; text-align: left; }
.hdc-opt input:checked + .hdc-opt-body {
	border-color: var(--hdc-col, var(--hdc-c1)); background: color-mix(in srgb, var(--hdc-col, var(--hdc-c1)) 10%, var(--hdc-surface));
	box-shadow: inset 0 0 0 1px var(--hdc-col, var(--hdc-c1));
}
.hdc-opt input:checked + .hdc-opt-body .hdc-opt-val { color: var(--hdc-col, var(--hdc-c1)); }
.hdc-opt input:focus-visible + .hdc-opt-body { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22); }
/* with the script: notes only for the picked option, shown under the row of buttons */
.hdc--live .hdc-opt-note { display: none; }
.hdc--live .hdc-choice:has(input:checked) { padding-bottom: 0; }
.hdc--live .hdc-opt input:checked + .hdc-opt-body .hdc-opt-note { display: block; }

/* product: visits x copay */
.hdc-product { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.4rem; }
.hdc-factor { display: inline-flex; flex-direction: column; flex: 1 1 4.5rem; min-width: 4.5rem; }
.hdc-factor .hdc-in { padding: 0 0.6rem; }
.hdc-factor .hdc-field--money .hdc-in { padding-left: 1.5rem; }
.hdc-factor .hdc-cur { left: 0.6rem; }
.hdc-factor-label { font-size: 0.7rem; color: var(--hdc-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }
.hdc-times { color: var(--hdc-faint); font-weight: 700; line-height: 2.9rem; }
.hdc-out--sub { flex-basis: 100%; font-weight: 750; color: var(--hdc-ink); font-size: 0.95rem; }
.hdc--live .hdc-out--sub::before { content: "= "; color: var(--hdc-faint); }

/* totals */
.hdc-out { font-variant-numeric: tabular-nums; }
.hdc-formula { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; color: var(--hdc-muted); font-weight: 400; }
.hdc-row--total th, .hdc-row--total td { background: var(--hdc-band); border-bottom-color: var(--hdc-line); padding-top: 1.05rem; padding-bottom: 1.05rem; }
.hdc-row--total th:first-child { padding-left: 0.9rem; border-radius: 12px 0 0 12px; }
.hdc-row--total td:last-child { padding-right: 0.9rem; border-radius: 0 12px 12px 0; }
.hdc-row--total .hdc-label-main { font-family: var(--hdc-serif); font-size: 1.08rem; }
.hdc-row--total .hdc-out { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--hdc-col, var(--hdc-ink)); letter-spacing: -0.01em; }
.hdc-out--partial { opacity: 0.55; }

.hdc-js { display: none !important; }
.hdc--live .hdc-js { display: revert !important; }
.hdc--live .hdc-formula-hint.hdc-js { display: block !important; }

/* ---------- alerts ---------- */
.hdc-alerts { display: grid; gap: 0.45rem; margin: 1rem 1.6rem 0; }
.hdc-alerts:empty { display: none !important; }
.hdc-alert {
	position: relative; padding: 0.6rem 0.85rem 0.6rem 2.3rem; border-radius: 10px; font-size: 0.86rem; font-weight: 650; line-height: 1.4;
	border: 1px solid var(--hdc-line); background: var(--hdc-alt); color: var(--hdc-ink);
}
.hdc-alert::before {
	content: "!"; position: absolute; left: 0.75rem; top: 0.62rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
	font-size: 0.72rem; font-weight: 800; line-height: 1.05rem; text-align: center; color: #fff; background: var(--hdc-muted);
}
.hdc-alert--stop { border-color: #fecaca; background: #fef2f2; }
.hdc-alert--stop::before { background: var(--hdc-bad); }
.hdc-alert--warn { border-color: #fed7aa; background: var(--hdc-warn-bg); }
.hdc-alert--warn::before { background: var(--hdc-warn); }
.hdc-alert--use_limit::before { content: "i"; }

/* ---------- results ---------- */
.hdc--live .hdc-results.hdc-js { display: block !important; }
.hdc-results { margin: 1.4rem 1.6rem 0; }
.hdc .hdc-results-title {
	margin: 0 0 0.75rem; font-family: var(--hdc-sans); font-size: 0.74rem; font-weight: 800;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--hdc-muted); border: 0; padding: 0;
}
.hdc-sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 0.9rem; }
.hdc-sum { padding: 1rem 1.1rem 1.05rem; border: 1px solid var(--hdc-line); border-radius: 14px; background: var(--hdc-surface); box-shadow: 0 1px 2px rgba(17, 28, 46, 0.04); }
.hdc-sum-label { margin: 0 0 0.75rem; font-family: var(--hdc-serif); font-weight: 700; font-size: 1.1rem; color: var(--hdc-ink); }
.hdc-bars { display: grid; gap: 0.7rem; }
.hdc-bar { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.25rem 0.75rem; }
.hdc-bar-name { font-size: 0.82rem; color: var(--hdc-muted); line-height: 1.25; }
.hdc-bar-val { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--hdc-ink); }
.hdc-bar-track { grid-column: 1 / -1; position: relative; height: 0.55rem; border-radius: 99px; background: var(--hdc-line-soft); overflow: hidden; }
.hdc-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: var(--hdc-col); transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hdc-bar--best .hdc-bar-name { color: var(--hdc-ink); font-weight: 700; }
.hdc-bar--best .hdc-bar-val { color: var(--hdc-col); }
.hdc-bar--best .hdc-bar-name::after {
	content: "Lower"; display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 99px;
	font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 0.08em;
	background: var(--hdc-col); color: #fff;
}
.hdc-sentence {
	margin: 0.9rem 0 0; padding: 0.7rem 0.85rem; border-radius: 10px; background: var(--hdc-band);
	color: var(--hdc-ink); font-weight: 650; line-height: 1.4; font-size: 0.93rem;
}
.hdc-sum--partial .hdc-sentence { background: transparent; padding: 0.2rem 0 0; color: var(--hdc-muted); font-weight: 500; }
.hdc-sum--held .hdc-sentence { background: #fef2f2; color: var(--hdc-bad); }
.hdc-sum--partial .hdc-bar-val, .hdc-sum--held .hdc-bar-val { color: var(--hdc-faint); }
.hdc-big { font-family: var(--hdc-serif); font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--hdc-c1); font-variant-numeric: tabular-nums; }
.hdc-sum--partial .hdc-big, .hdc-sum--held .hdc-big { color: var(--hdc-faint); }

/* ---------- foot ---------- */
.hdc-foot { margin-top: 1.3rem; padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--hdc-line); background: var(--hdc-alt); font-size: 0.82rem; color: var(--hdc-muted); }
.hdc--live .hdc-actions.hdc-js { display: flex !important; }
.hdc-actions { flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-bottom: 1rem; }
.hdc .hdc-btn {
	font: inherit; font-size: 0.85rem; font-weight: 700; padding: 0.55rem 1rem; border-radius: 99px; cursor: pointer;
	border: 1px solid var(--hdc-navy); background: var(--hdc-navy); color: #fff; line-height: 1.1;
}
.hdc .hdc-btn:hover { filter: brightness(1.2); }
.hdc .hdc-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }
.hdc .hdc-btn--quiet { background: transparent; color: var(--hdc-ink); border-color: #cfd8e3; }
.hdc-privacy { display: inline-flex; gap: 0.4rem; align-items: center; margin-left: 0.3rem; font-size: 0.78rem; }
.hdc-lock {
	flex: none; width: 0.8rem; height: 0.8rem; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h.5A1.5 1.5 0 0 1 14 8.5v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 14.5v-6A1.5 1.5 0 0 1 3.5 7H4zm2 0h4V5a2 2 0 1 0-4 0v2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h.5A1.5 1.5 0 0 1 14 8.5v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 14.5v-6A1.5 1.5 0 0 1 3.5 7H4zm2 0h4V5a2 2 0 1 0-4 0v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hdc-consts-h { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hdc-ink); margin-bottom: 0.35rem; }
.hdc .hdc-consts-list { margin: 0 0 0.9rem; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.hdc .hdc-consts-list li { margin: 0; padding: 0 0 0 0.85rem; position: relative; line-height: 1.45; }
.hdc .hdc-consts-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--hdc-faint); }
.hdc-const-label { color: var(--hdc-body); }
.hdc-const-val { color: var(--hdc-ink); font-variant-numeric: tabular-nums; }
.hdc-src { color: var(--hdc-muted); }
.hdc-note { margin: 0 0 0.9rem; line-height: 1.45; }
.hdc-terms { padding: 0.75rem 0.9rem; border: 1px solid var(--hdc-line); border-radius: 10px; background: var(--hdc-surface); font-size: 0.76rem; line-height: 1.5; color: var(--hdc-muted); }
.hdc-terms-p + .hdc-terms-p { margin-top: 0.5rem; }
.hdc-missing { padding: 0.75rem 1rem; border: 1px dashed #cbd5e1; border-radius: 8px; color: #5b6473; }

/* ---------- phones: each line becomes a card ---------- */
@media (max-width: 700px) {
	.hdc { border-radius: 14px; margin-left: -0.25rem; margin-right: -0.25rem; }
	.hdc-head { padding: 1.1rem 1.05rem 1rem; }
	.hdc .hdc-title { font-size: 1.25rem; }
	.hdc-notice { margin: 1rem 1.05rem 0; }
	.hdc-tablewrap { padding: 0.75rem 1.05rem 0; }
	.hdc-table, .hdc-table tbody, .hdc-table tr, .hdc-table th, .hdc-table td { display: block; width: auto !important; }
	.hdc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
	.hdc-row { margin: 0 0 0.75rem; padding: 0.9rem 0.9rem 0.3rem; border: 1px solid var(--hdc-line); border-radius: 14px; background: var(--hdc-surface); }
	.hdc-row--section { border: 0; padding: 0.5rem 0 0; margin: 0; background: none; }
	.hdc-table th, .hdc-table td { padding: 0 0 0.75rem !important; border-bottom: 0; background: none !important; border-radius: 0 !important; }
	.hdc-label { padding-bottom: 0.8rem !important; }
	.hdc-hint, .hdc-where { margin-left: 2.2rem; }
	.hdc-cell::before {
		content: attr(data-label); display: block; margin-bottom: 0.35rem; padding-left: 0.5rem; border-left: 3px solid var(--hdc-col, var(--hdc-line));
		font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--hdc-ink);
	}
	.hdc-cell--empty { display: none !important; }
	.hdc-cell--text { display: flex !important; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; }
	.hdc-cell--text::before { margin-bottom: 0; }
	.hdc-text, .hdc-none { padding-top: 0; }
	.hdc-row--total { background: var(--hdc-band); border-color: var(--hdc-line); }
	.hdc-alerts, .hdc-results { margin-left: 1.05rem; margin-right: 1.05rem; }
	.hdc-foot { padding: 1rem 1.05rem 1.2rem; }
	.hdc-privacy { margin-left: 0; flex-basis: 100%; }
}

/* ---------- dark (KA Press Studio's toggle) ---------- */
:root[data-hd-theme="dark"] .hdc {
	/* literal, not the theme's tokens: the theme loads its dark sheet after the switch, and its
	   contrast guard measures in between; with literals the calculator is dark at once */
	--hdc-ink: #eef2f8;
	--hdc-body: #cdd6e2;
	--hdc-muted: #b4bece;
	--hdc-faint: #8b98ab;
	--hdc-line: #2b3546;
	--hdc-line-soft: #243042;
	--hdc-surface: #182231;
	--hdc-alt: #1b2636;
	--hdc-band: #1e2938;
	--hdc-navy: #0b1220;
	--hdc-c1: #7fb0ec;
	--hdc-c2: #4fd1c5;
	--hdc-c3: #f6ad55;
	--hdc-c4: #b794f4;
	--hdc-focus: #8fb6ea;
	--hdc-warn: #f6ad55;
	--hdc-warn-bg: #2a1d14;
	--hdc-notice-bg: #2a2212;
	--hdc-bad: #fc8181;
	--hdc-accent: #f2667a;
	box-shadow: none;
}
:root[data-hd-theme="dark"] .hdc-notice { border-color: #5c4a1a; color: #f5e6c4; }
:root[data-hd-theme="dark"] .hdc-notice-h { color: #fde9b8; }
:root[data-hd-theme="dark"] .hdc .hdc-in,
:root[data-hd-theme="dark"] .hdc-opt-body { border-color: #3b475a; background: #141d2a; }
:root[data-hd-theme="dark"] .hdc .hdc-in::placeholder { color: #5f6d82; }
:root[data-hd-theme="dark"] .hdc-badge { background: #e6ecf5; color: #0f1621; }
:root[data-hd-theme="dark"] .hdc .hdc-btn { background: #e6ecf5; color: #0f1621; border-color: #e6ecf5; }
:root[data-hd-theme="dark"] .hdc .hdc-btn--quiet { background: transparent; color: var(--hdc-ink); border-color: var(--hdc-line); }
:root[data-hd-theme="dark"] .hdc-alert--stop { background: #2a1416; border-color: #5b2226; }
:root[data-hd-theme="dark"] .hdc-alert--warn { border-color: #5c3a14; }
:root[data-hd-theme="dark"] .hdc-sum--held .hdc-sentence { background: #2a1416; }
:root[data-hd-theme="dark"] .hdc-bar--best .hdc-bar-name::after { color: #0f1621; }

/* ---------- print ("Print my numbers" prints just the calculator) ---------- */
@media print {
	html.hdc-printing body * { visibility: hidden !important; }
	html.hdc-printing .hdc-print-me, html.hdc-printing .hdc-print-me * { visibility: visible !important; }
	html.hdc-printing .hdc-print-me { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
	.hdc { box-shadow: none; border-color: #999; }
	.hdc-head { background: none !important; color: #000; border-bottom: 2px solid #000; }
	.hdc .hdc-title, .hdc-kicker, .hdc-intro { color: #000 !important; }
	.hdc-notice { border: 1.5px solid #000 !important; background: none !important; color: #000 !important; break-inside: avoid; }
	.hdc-row { break-inside: avoid; }
	.hdc-actions { display: none !important; }
	.hdc .hdc-in, .hdc-opt-body { border-color: #888; box-shadow: none; }
	.hdc-opt input:not(:checked) + .hdc-opt-body { opacity: 0.45; }
	.hdc-bar-fill, .hdc-badge, .hdc-th-text { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.hdc-foot { background: none; }
}
@media (prefers-reduced-motion: reduce) {
	.hdc-bar-fill, .hdc .hdc-in, .hdc-opt-body { transition: none; }
}
