/**
 * CheckMyRaise design system — editorial "Mastercard-inspired" aesthetic.
 * Warm cream canvas, ink-black pill CTAs, Sofia Sans (self-hosted), and the
 * signature radius scale (20px buttons / 28-40px cards / 999px pills).
 * Tokens are overridable per instance via inline CSS variables.
 */

/* Self-hosted Sofia Sans (open-source MarkForMC substitute, variable 400-700).
   No external font request: fast and privacy-preserving. */
@font-face {
	font-family: "Sofia Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/sofia-sans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Sofia Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/sofia-sans-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--cmr-bg: #f3f0ee;          /* Canvas Cream */
	--cmr-lifted: #fcfbfa;      /* Lifted Cream */
	--cmr-surface: #ffffff;     /* White cards / inputs */
	--cmr-ink: #141413;         /* Ink Black */
	--cmr-ink-soft: #262627;    /* Charcoal */
	--cmr-muted: #696969;       /* Slate Gray */
	--cmr-accent: #a83a00;      /* Signal Orange — brand accent */
	--cmr-accent-soft: #f37338; /* Light Signal Orange */
	--cmr-dark: #141413;        /* Result panel = ink */
	--cmr-mint: #f0ece8;        /* Warm tint for segmented control track */
	--cmr-border: #e2dcd5;      /* Warm hairline */
	--cmr-positive: #0b7a4b;    /* Money green */
	--cmr-positive-on-ink: #57e39b;
	--cmr-warning: #9a3a0a;     /* Clay brown */
	--cmr-negative: #c8341c;
	--cmr-focus: #3860be;       /* Link Blue focus ring */
	--cmr-radius-card: 28px;
	--cmr-radius-input: 16px;
	--cmr-radius-pill: 999px;
	--cmr-tick-ms: 160ms;
	--cmr-font: "Sofia Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

.cmr-page,
.cmr-tool,
.cmr-tool *,
.cmr-page * {
	box-sizing: border-box;
}

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

/* ---------- page frame ---------- */

.cmr-page {
	width: 100%;
	background: var(--cmr-bg);
	color: var(--cmr-ink);
	font-family: var(--cmr-font);
	font-weight: 450;
	padding: 20px 24px 72px;
}

.cmr-page__intro {
	max-width: 900px;
	margin: 8px auto 18px;
	text-align: center;
}

.cmr-page__intro h1 {
	font-size: clamp(1.9rem, 3.4vw, 3rem);
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-weight: 500;
	margin: 0 0 10px;
	color: var(--cmr-ink);
}

.cmr-page__intro p {
	margin: 0 auto;
	max-width: 660px;
	font-size: clamp(0.98rem, 1.3vw, 1.1rem);
	line-height: 1.5;
	font-weight: 450;
	color: var(--cmr-muted);
}

/* ---------- tool shell ---------- */

.cmr-tool {
	width: min(1240px, 100%);
	margin: 0 auto;
	color: var(--cmr-ink);
	font-family: var(--cmr-font);
}

.cmr-tool__shell {
	display: grid;
	grid-template-columns: minmax(320px, 43fr) minmax(380px, 57fr);
	border-radius: var(--cmr-radius-card);
	overflow: hidden;
	background: var(--cmr-surface);
	box-shadow: 0 24px 48px rgba(20, 20, 19, 0.08);
}

.cmr-panel {
	min-width: 0;
}

.cmr-panel--inputs {
	padding: clamp(20px, 2.2vw, 30px);
	background: var(--cmr-lifted);
}

/* The trust box is the last child in the DOM so that a single-column phone
   layout reads inputs -> results -> trust. On desktop it is pulled back under
   the inputs column, where it fills the space left by the taller results
   panel. Both panels are placed explicitly so the spans stay predictable. */
.cmr-tool__shell--trust {
	grid-template-rows: auto 1fr;
}

.cmr-tool__shell--trust > .cmr-panel--inputs {
	grid-column: 1;
	grid-row: 1;
}

.cmr-tool__shell--trust > .cmr-panel--results {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.cmr-tool__trust {
	grid-column: 1;
	grid-row: 2;
	min-width: 0;
	padding: 0 clamp(20px, 2.2vw, 30px) clamp(20px, 2.2vw, 30px);
	background: var(--cmr-lifted);
}

.cmr-panel--results {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: clamp(20px, 2.4vw, 32px);
	background: var(--cmr-dark);
	color: #f3f0ee;
	font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- segments (pill-track) ---------- */

.cmr-segment {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 4px;
	padding: 4px;
	border-radius: var(--cmr-radius-pill);
	background: var(--cmr-mint);
}

.cmr-segment button {
	appearance: none;
	border: 0;
	min-height: 38px;
	padding: 6px 12px;
	border-radius: var(--cmr-radius-pill);
	background: transparent;
	color: var(--cmr-ink-soft);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background var(--cmr-tick-ms) ease, color var(--cmr-tick-ms) ease, box-shadow var(--cmr-tick-ms) ease;
}

.cmr-segment button.is-active {
	background: var(--cmr-ink);
	color: var(--cmr-bg);
	box-shadow: 0 2px 10px rgba(20, 20, 19, 0.18);
}

.cmr-segment--modes {
	margin-bottom: 16px;
}

.cmr-segment--modes button {
	min-height: 46px;
}

.cmr-segment--mini button {
	min-height: 44px;
	font-size: 0.82rem;
	padding: 6px 10px;
}

/* ---------- fields ---------- */

.cmr-field {
	min-width: 0;
	margin-bottom: 13px;
}

.cmr-field--compact {
	margin-bottom: 9px;
}

.cmr-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cmr-muted);
}

.cmr-field input,
.cmr-field select,
.cmr-affix {
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--cmr-border);
	border-radius: var(--cmr-radius-input);
	background: var(--cmr-surface);
	color: var(--cmr-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	transition: border-color var(--cmr-tick-ms) ease, box-shadow var(--cmr-tick-ms) ease;
}

.cmr-field input,
.cmr-field select {
	padding: 9px 13px;
}

.cmr-field select {
	cursor: pointer;
}

.cmr-affix {
	display: flex;
	align-items: center;
	overflow: hidden;
}

.cmr-affix > span {
	flex: 0 0 auto;
	padding: 0 13px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--cmr-muted);
	background: transparent;
}

.cmr-affix input {
	min-width: 0;
	flex: 1 1 auto;
	min-height: 44px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.cmr-affix--prefix > span {
	border-right: 1px solid var(--cmr-border);
	margin-right: 2px;
}

.cmr-affix--suffix > span {
	border-left: 1px solid var(--cmr-border);
	margin-left: 2px;
}

.cmr-field input:focus,
.cmr-field select:focus {
	outline: 2px solid var(--cmr-focus);
	outline-offset: 1px;
	border-color: var(--cmr-focus);
}

.cmr-affix:focus-within {
	outline: 2px solid var(--cmr-focus);
	outline-offset: 1px;
	border-color: var(--cmr-focus);
}

.cmr-affix input:focus {
	outline: none;
}

.cmr-field-error {
	margin: 6px 0 0;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--cmr-negative);
}

.cmr-validation {
	margin-top: 10px;
	padding: 10px 13px;
	border-radius: 14px;
	background: #fbeae6;
	color: var(--cmr-negative);
	font-size: 0.83rem;
	font-weight: 500;
}

.cmr-help {
	margin: 9px 0 0;
	font-size: 0.78rem;
	line-height: 1.5;
	font-weight: 450;
	color: var(--cmr-muted);
}

.cmr-help--inverse {
	color: #b7b1a9;
	margin: 5px 2px 0;
}

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

.cmr-payrow {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: start;
}

.cmr-payrow .cmr-segment--mini {
	min-width: 124px;
}

.cmr-raiserow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

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

.cmr-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: -2px 0 14px;
}

.cmr-quick button {
	appearance: none;
	cursor: pointer;
	padding: 5px 13px;
	min-height: 30px;
	border: 1px solid var(--cmr-border);
	border-radius: var(--cmr-radius-pill);
	background: var(--cmr-surface);
	color: var(--cmr-ink-soft);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 500;
	transition: border-color var(--cmr-tick-ms) ease, color var(--cmr-tick-ms) ease;
}

.cmr-quick button:hover,
.cmr-quick button:focus-visible {
	border-color: var(--cmr-accent);
	color: var(--cmr-accent);
}

/* ---------- fine-tune disclosure ---------- */

.cmr-finetune {
	margin-top: 6px;
	border-top: 1px solid var(--cmr-border);
	padding-top: 10px;
}

.cmr-finetune summary {
	cursor: pointer;
	min-height: 34px;
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--cmr-accent);
	list-style: none;
}

.cmr-finetune summary::-webkit-details-marker {
	display: none;
}

.cmr-finetune summary::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cmr-accent);
	flex: 0 0 auto;
}

.cmr-finetune[open] summary {
	margin-bottom: 12px;
}

/* ---------- results panel ---------- */

.cmr-share-mini {
	position: absolute;
	top: 14px;
	right: 14px;
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(243, 240, 238, 0.24);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #f3f0ee;
	transition: background var(--cmr-tick-ms) ease;
}

.cmr-share-mini:hover,
.cmr-share-mini:focus-visible {
	background: rgba(255, 255, 255, 0.16);
}

.cmr-share-mini.is-copied {
	background: var(--cmr-positive);
	border-color: var(--cmr-positive);
	color: #fff;
}

.cmr-icon {
	width: 16px;
	height: 16px;
}

.cmr-hero {
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(243, 240, 238, 0.16);
}

.cmr-hero__label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cmr-accent-soft);
}

.cmr-hero__value {
	display: block;
	font-size: clamp(2.2rem, 3.8vw, 3.2rem);
	line-height: 1;
	letter-spacing: -0.04em;
	font-weight: 500;
	color: #fff;
}

.cmr-hero__sub {
	display: block;
	margin-top: 6px;
	font-size: 0.88rem;
	font-weight: 450;
	color: #cfc9c1;
}

.cmr-hero-extra {
	margin: 7px 0 0;
	font-size: 0.85rem;
	font-weight: 450;
	color: #b7b1a9;
}

.cmr-hero-extra span {
	font-weight: 700;
	color: #ede8e2;
}

.cmr-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-top: 12px;
	padding: 13px 16px;
	border-left: 3px solid var(--cmr-accent-soft);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.08);
}

.cmr-row span {
	font-size: 0.84rem;
	font-weight: 500;
	color: #ded8d0;
}

.cmr-row strong {
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	font-weight: 500;
	color: #fff;
	white-space: nowrap;
}

.cmr-row--subtle {
	margin-top: 7px;
	padding-top: 9px;
	padding-bottom: 9px;
	border-left-color: transparent;
	background: rgba(255, 255, 255, 0.045);
}

.cmr-row--subtle strong {
	font-size: 1.05rem;
	color: #ede8e2;
}

.cmr-row--target {
	border-left-color: var(--cmr-accent);
}

/* verdict */

.cmr-verdict {
	margin-top: 12px;
	padding: 13px 16px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(243, 240, 238, 0.14);
}

.cmr-verdict__label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cmr-accent-soft);
}

.cmr-verdict strong {
	display: block;
	margin-top: 2px;
	font-size: 1.55rem;
	font-weight: 500;
	color: var(--cmr-positive-on-ink);
}

.cmr-verdict strong::after {
	content: " ✓";
	font-size: 0.9em;
}

.cmr-verdict[data-state="negative"] strong {
	color: #ff9d8a;
}

.cmr-verdict[data-state="negative"] strong::after {
	content: " ▼";
	font-size: 0.72em;
}

.cmr-verdict[data-state="neutral"] strong::after {
	content: "";
}

.cmr-verdict p {
	margin: 4px 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	font-weight: 450;
	color: #cfc9c1;
}

/* ledger — the refined pay-stub table */

.cmr-ledger {
	width: 100%;
	margin-top: 14px;
	border-collapse: collapse;
	font-size: 0.84rem;
}

.cmr-ledger th,
.cmr-ledger td {
	padding: 7px 1px;
	border-bottom: 1px solid rgba(243, 240, 238, 0.1);
	text-align: left;
	font-weight: 450;
	color: #c4beb6;
}

.cmr-ledger td {
	text-align: right;
	font-weight: 700;
	color: #fff;
}

.cmr-ledger .cmr-ledger__total th,
.cmr-ledger .cmr-ledger__total td {
	padding-top: 10px;
	border-top: 1px solid rgba(243, 240, 238, 0.32);
	border-bottom: 0;
	font-weight: 700;
}

.cmr-ledger .cmr-ledger__total td {
	font-size: 0.98rem;
}

/* offer comparison table */

.cmr-compare {
	width: 100%;
	margin-top: 14px;
	border-collapse: collapse;
	font-size: 0.8rem;
}

.cmr-compare th,
.cmr-compare td {
	padding: 6px 7px;
	border-bottom: 1px solid rgba(243, 240, 238, 0.1);
	text-align: right;
	font-weight: 450;
	color: #c4beb6;
}

.cmr-compare th[scope="row"],
.cmr-compare thead th:first-child {
	text-align: left;
}

.cmr-compare thead th {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cmr-accent-soft);
	border-bottom: 1px solid rgba(243, 240, 238, 0.3);
}

.cmr-compare td {
	font-weight: 700;
	color: #fff;
}

.cmr-compare__subtotal th,
.cmr-compare__subtotal td {
	border-top: 1px solid rgba(243, 240, 238, 0.24);
}

.cmr-compare__total th,
.cmr-compare__total td {
	border-top: 1px solid rgba(243, 240, 238, 0.4);
	border-bottom: 0;
	font-size: 0.9rem;
	font-weight: 700;
}

/* reference tables in prose sections (light surface, not the dark panels) */

.cmr-reftable-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 16px 0 4px;
}

.cmr-reftable {
	width: 100%;
	min-width: 420px;
	border-collapse: collapse;
	font-size: 0.92rem;
	font-variant-numeric: tabular-nums;
}

.cmr-reftable th,
.cmr-reftable td {
	padding: 10px 12px;
	text-align: right;
	border-bottom: 1px solid #e2dcd5;
}

.cmr-reftable thead th {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a83a00;
	border-bottom: 1px solid #c9c1b8;
	white-space: nowrap;
}

.cmr-reftable th[scope="row"],
.cmr-reftable thead th:first-child {
	text-align: left;
	font-weight: 700;
	color: #141413;
}

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

/* offers form */

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

.cmr-offer {
	min-width: 0;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--cmr-border);
	border-radius: 20px;
}

.cmr-offer legend {
	padding: 0 6px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--cmr-accent);
}

/* ---------- actions ---------- */

.cmr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: auto;
	padding-top: 16px;
}

.cmr-btn {
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 22px;
	border: 1.5px solid rgba(243, 240, 238, 0.28);
	border-radius: var(--cmr-radius-pill);
	background: rgba(255, 255, 255, 0.08);
	color: #f3f0ee;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	transition: background var(--cmr-tick-ms) ease, border-color var(--cmr-tick-ms) ease;
}

.cmr-btn:hover,
.cmr-btn:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(243, 240, 238, 0.5);
}

.cmr-btn--primary {
	background: var(--cmr-bg);
	border-color: var(--cmr-bg);
	color: var(--cmr-ink);
}

.cmr-btn--primary:hover,
.cmr-btn--primary:focus-visible {
	background: #fff;
	border-color: #fff;
}

.cmr-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: #b7b1a9;
}

.cmr-share-note {
	margin: 12px 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	font-weight: 450;
	color: #b7b1a9;
}

.cmr-disclaimer {
	margin: 8px 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	font-weight: 450;
	color: #948e86;
}

/* ---------- focus + motion ---------- */

.cmr-tool button:focus-visible,
.cmr-faq summary:focus-visible,
.cmr-finetune summary:focus-visible {
	outline: 2px solid var(--cmr-focus);
	outline-offset: 2px;
}

.cmr-panel--results .cmr-btn:focus-visible,
.cmr-share-mini:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.cmr-tick {
		animation: cmr-tick var(--cmr-tick-ms) ease-out;
	}

	@keyframes cmr-tick {
		from { opacity: 0.4; }
		to { opacity: 1; }
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmr-tool *,
	.cmr-tool *::before,
	.cmr-tool *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Author styles (display:flex etc.) must not defeat the hidden attribute. */
.cmr-tool [hidden],
.cmr-page [hidden] {
	display: none !important;
}

/* ---------- supporting page content ---------- */

.cmr-method-note {
	width: min(1240px, 100%);
	margin: 14px auto 56px;
	text-align: center;
	font-size: 0.82rem;
	font-weight: 450;
	color: var(--cmr-muted);
}

.cmr-method-note a {
	color: var(--cmr-accent);
	font-weight: 500;
}

.cmr-content {
	width: min(760px, 100%);
	margin: 0 auto;
}

.cmr-content section {
	margin: 0 0 48px;
}

.cmr-content .cmr-answer {
	font-size: 1.15rem;
	line-height: 1.6;
	font-weight: 500;
	color: var(--cmr-ink);
	margin: 0 0 40px;
	padding: 18px 22px;
	background: var(--cmr-lifted);
	border-left: 3px solid var(--cmr-accent);
	border-radius: 0 16px 16px 0;
}

.cmr-content .cmr-sources ul {
	margin: 0;
	padding-left: 20px;
}

.cmr-content .cmr-sources a {
	color: var(--cmr-accent);
	font-weight: 500;
}

.cmr-content h2 {
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
	line-height: 1.14;
	letter-spacing: -0.02em;
	font-weight: 500;
	margin: 0 0 14px;
	color: var(--cmr-ink);
}

.cmr-content p,
.cmr-content li {
	font-size: 1rem;
	line-height: 1.72;
	font-weight: 450;
	color: var(--cmr-ink-soft);
}

.cmr-formula {
	margin: 16px 0;
	padding: 14px 18px;
	border-left: 3px solid var(--cmr-accent);
	border-radius: 0 16px 16px 0;
	background: var(--cmr-lifted);
	color: var(--cmr-ink);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

/* Related guides use the same raised-surface language as the hub cards, at a
   smaller scale: bordered, rounded, lifts on hover, arrow nudges. Scoped to
   --links so it cannot reach the full .cmr-toolcard grid in --cards. */
.cmr-related--links ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 12px;
}

.cmr-related--links li {
	margin: 0;
}

.cmr-related--links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 100%;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--cmr-border);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(20, 20, 19, 0.05);
	color: var(--cmr-ink, #141413);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.cmr-related--links a::after {
	content: "\2192";
	flex: 0 0 auto;
	color: var(--cmr-accent);
	transition: transform 0.18s ease;
}

.cmr-related--links a:hover,
.cmr-related--links a:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(20, 20, 19, 0.09);
	border-color: #d5ccc2;
}

.cmr-related--links a:hover::after,
.cmr-related--links a:focus-visible::after {
	transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
	.cmr-related a,
	.cmr-related a::after {
		transition: none;
	}

	.cmr-related a:hover,
	.cmr-related a:focus-visible {
		transform: none;
	}

	.cmr-related a:hover::after,
	.cmr-related a:focus-visible::after {
		transform: none;
	}
}

.cmr-faq details {
	border-top: 1px solid var(--cmr-border);
}

.cmr-faq details:last-child {
	border-bottom: 1px solid var(--cmr-border);
}

.cmr-faq summary {
	cursor: pointer;
	padding: 16px 2px;
	font-weight: 500;
	font-size: 1.02rem;
	letter-spacing: -0.01em;
	color: var(--cmr-ink);
	list-style: none;
	position: relative;
	padding-right: 28px;
}

.cmr-faq summary::-webkit-details-marker {
	display: none;
}

.cmr-faq summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.3rem;
	font-weight: 400;
	color: var(--cmr-accent);
}

.cmr-faq details[open] summary::after {
	content: "–";
}

.cmr-faq details p {
	margin: 0 0 18px;
	font-size: 0.96rem;
}

/* ---------- contact form ---------- */

.cmr-form-wrap {
	width: min(680px, 100%);
	margin: 8px 0 0;
	font-family: var(--cmr-font);
}

.cmr-form {
	padding: clamp(20px, 3vw, 32px);
	background: var(--cmr-surface);
	border: 1px solid var(--cmr-border);
	border-radius: var(--cmr-radius-card);
	box-shadow: 0 16px 40px rgba(20, 20, 19, 0.05);
}

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

.cmr-form-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cmr-form-input {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--cmr-border);
	border-radius: var(--cmr-radius-input);
	background: var(--cmr-lifted);
	color: var(--cmr-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 450;
	transition: border-color var(--cmr-tick-ms) ease, box-shadow var(--cmr-tick-ms) ease;
}

.cmr-form-textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.6;
}

.cmr-form-input:focus {
	outline: 2px solid var(--cmr-focus);
	outline-offset: 1px;
	border-color: var(--cmr-focus);
}

.cmr-form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 6px;
}

.cmr-form-submit {
	appearance: none;
	cursor: pointer;
	min-height: 48px;
	padding: 10px 32px;
	border: 1.5px solid var(--cmr-ink);
	border-radius: var(--cmr-radius-pill);
	background: var(--cmr-ink);
	color: var(--cmr-bg);
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	transition: transform var(--cmr-tick-ms) ease, background var(--cmr-tick-ms) ease;
}

.cmr-form-submit:hover,
.cmr-form-submit:focus-visible {
	background: var(--cmr-ink-soft);
}

.cmr-form-submit:active {
	transform: translateY(1px);
}

.cmr-form-submit:focus-visible {
	outline: 2px solid var(--cmr-focus);
	outline-offset: 2px;
}

.cmr-form-alt {
	font-size: 0.86rem;
	font-weight: 450;
	color: var(--cmr-muted);
}

.cmr-form-alt a {
	color: var(--cmr-accent);
	font-weight: 500;
}

.cmr-form-privacy {
	margin: 14px 0 0;
	font-size: 0.76rem;
	font-weight: 450;
	color: var(--cmr-muted);
}

.cmr-form-note {
	margin: 0 0 16px;
	padding: 14px 18px;
	border-radius: 16px;
	font-size: 0.92rem;
	font-weight: 500;
}

.cmr-form-note--ok {
	background: #e6f4ec;
	color: var(--cmr-positive);
	border: 1px solid #b9e2cb;
}

.cmr-form-note--err {
	background: #fbeae6;
	color: var(--cmr-negative);
	border: 1px solid #f2c9bf;
}

@media (max-width: 560px) {
	.cmr-form-grid {
		grid-template-columns: 1fr;
	}
}

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

@media (max-width: 960px) {
	.cmr-tool__shell {
		grid-template-columns: 1fr;
	}

	/* Single column: drop the explicit placement and let source order run,
	   which puts the trust box after the results rather than between the
	   inputs and the answer. */
	.cmr-tool__shell--trust {
		grid-template-rows: none;
	}

	.cmr-tool__shell--trust > .cmr-panel--inputs,
	.cmr-tool__shell--trust > .cmr-panel--results,
	.cmr-tool__shell--trust > .cmr-tool__trust {
		grid-column: 1;
		grid-row: auto;
	}

	.cmr-tool__trust {
		padding: clamp(18px, 4vw, 26px) clamp(20px, 2.2vw, 30px);
		border-top: 1px solid var(--cmr-border);
	}
}

@media (max-width: 560px) {
	.cmr-page {
		padding: 14px 14px 52px;
	}

	.cmr-page__intro h1 {
		font-size: 1.6rem;
	}

	.cmr-page__intro p {
		font-size: 0.92rem;
	}

	.cmr-tool__shell {
		border-radius: 22px;
	}

	.cmr-panel--inputs,
	.cmr-panel--results {
		padding: 16px 14px;
	}

	.cmr-tool__trust {
		padding: 18px 14px;
	}

	.cmr-segment--modes button {
		font-size: 0.8rem;
	}

	.cmr-raiserow,
	.cmr-grid2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cmr-offers {
		grid-template-columns: 1fr;
	}

	.cmr-hero__value {
		font-size: 2.1rem;
	}

	.cmr-content section {
		margin-bottom: 36px;
	}
}

/* ---------- print ---------- */

@media print {
	body * {
		visibility: hidden !important;
	}

	.cmr-tool,
	.cmr-tool * {
		visibility: visible !important;
	}

	.cmr-tool {
		position: absolute;
		inset: 0;
		width: 100%;
	}

	.cmr-panel--inputs,
	.cmr-actions,
	.cmr-share-mini,
	.cmr-validation {
		display: none !important;
	}

	.cmr-tool__shell {
		display: block;
		border: 0;
		box-shadow: none;
	}

	.cmr-panel--results {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* "Show the math" disclosure inside the (dark) results panel. */
.cmr-math {
	margin: 0.95rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	padding-top: 0.85rem;
}

.cmr-math__toggle {
	cursor: pointer;
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #f3f0ee;
	opacity: 0.92;
}

.cmr-math__toggle::-webkit-details-marker {
	display: none;
}

.cmr-math__toggle::before {
	content: "\203A";
	display: inline-block;
	font-size: 1.15em;
	line-height: 1;
	transition: transform 0.15s ease;
}

.cmr-math[open] .cmr-math__toggle::before {
	transform: rotate(90deg);
}

.cmr-math__toggle:hover {
	opacity: 1;
}

.cmr-math__body {
	margin-top: 0.6rem;
}

.cmr-math__step {
	margin: 0.32rem 0;
	font-size: 0.84rem;
	line-height: 1.55;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #e8f0ee;
	word-break: break-word;
}

.cmr-math__step strong {
	color: #fff;
	font-weight: 700;
}

/* =========================================================================
   Homepage Salary Increase redesign (mockup-matched). Scoped to the front
   page (body.home) and the .cmr-tool--salary-increase instance so the other
   five calculators keep the current look until we roll this out.
   ========================================================================= */

/* Editorial serif hero + "reviewed" eyebrow, front page only. */
body.home .cmr-page__intro h1 {
	font-family: Georgia, "Iowan Old Style", "Times New Roman", "Times", serif;
	font-weight: 500;
	letter-spacing: -0.01em;
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	line-height: 1.04;
}

.cmr-page__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0.85rem 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--cmr-muted);
}

.cmr-page__eyebrow svg {
	flex: 0 0 auto;
	color: var(--cmr-accent);
}

/* ---- inputs: warm peach-accent segmented controls + chips ---- */
.cmr-tool--salary-increase .cmr-segment {
	background: #f1eae2;
}

.cmr-tool--salary-increase .cmr-segment button.is-active {
	background: #fdece0;
	color: var(--cmr-accent);
	box-shadow: none;
}

.cmr-tool--salary-increase .cmr-quick button.is-active {
	background: #fdece0;
	border-color: #f0caac;
	color: var(--cmr-accent);
	font-weight: 700;
}

/* Pay row: $ | amount | currency chip. */
.cmr-payinput {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.cmr-payinput .cmr-affix {
	flex: 1 1 auto;
}

.cmr-cur {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	padding: 0 13px;
	border: 1px solid var(--cmr-border);
	border-radius: var(--cmr-radius-input);
	background: var(--cmr-surface);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--cmr-muted);
	white-space: nowrap;
}

/* ---- results: new-pay-per-period pair ---- */
.cmr-newpay {
	margin-top: 14px;
	padding: 2px 16px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.06);
}

.cmr-newpay__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
}

.cmr-newpay__row + .cmr-newpay__row {
	border-top: 1px solid rgba(243, 240, 238, 0.12);
}

.cmr-newpay__label {
	font-size: 0.86rem;
	font-weight: 500;
	color: #ded8d0;
}

.cmr-newpay__row strong {
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
}

/* ---- results: green/red delta box ---- */
.cmr-delta {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding: 13px 16px;
	border-radius: 18px;
	background: rgba(87, 227, 155, 0.08);
	border: 1px solid rgba(87, 227, 155, 0.28);
}

.cmr-delta__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 2px solid var(--cmr-positive-on-ink);
	color: var(--cmr-positive-on-ink);
}

.cmr-delta__icon svg {
	width: 20px;
	height: 20px;
	transition: transform 0.15s ease;
}

.cmr-delta__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cmr-delta__head {
	font-size: 0.82rem;
	font-weight: 500;
	color: #cfeede;
}

.cmr-delta__amount {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.1;
	color: var(--cmr-positive-on-ink);
}

.cmr-delta[data-state="negative"] {
	background: rgba(255, 157, 138, 0.08);
	border-color: rgba(255, 157, 138, 0.3);
}

.cmr-delta[data-state="negative"] .cmr-delta__icon {
	border-color: #ff9d8a;
	color: #ff9d8a;
}

.cmr-delta[data-state="negative"] .cmr-delta__icon svg {
	transform: rotate(180deg);
}

.cmr-delta[data-state="negative"] .cmr-delta__amount {
	color: #ff9d8a;
}

.cmr-delta[data-state="negative"] .cmr-delta__head {
	color: #f4d3cc;
}

.cmr-delta[data-state="neutral"] {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(243, 240, 238, 0.14);
}

.cmr-delta[data-state="neutral"] .cmr-delta__icon {
	border-color: #8b8f8c;
	color: #8b8f8c;
}

.cmr-delta[data-state="neutral"] .cmr-delta__amount {
	color: #cfc9c1;
}

/* Emphasise the "New annual pay" total row in the ledger. */
.cmr-tool--salary-increase .cmr-ledger .cmr-ledger__total td {
	color: #fff;
}

/* ---- action buttons: Copy results (white) · Share (outline) · Reset ---- */
.cmr-tool--salary-increase [data-cmr-copy-summary] {
	order: -1;
	background: var(--cmr-bg);
	border-color: var(--cmr-bg);
	color: var(--cmr-ink);
}

.cmr-tool--salary-increase [data-cmr-copy-summary]:hover,
.cmr-tool--salary-increase [data-cmr-copy-summary]:focus-visible {
	background: #fff;
	border-color: #fff;
}

.cmr-tool--salary-increase .cmr-actions [data-cmr-share].cmr-btn--primary {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(243, 240, 238, 0.28);
	color: #f3f0ee;
}

.cmr-tool--salary-increase .cmr-actions [data-cmr-share].cmr-btn--primary:hover,
.cmr-tool--salary-increase .cmr-actions [data-cmr-share].cmr-btn--primary:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(243, 240, 238, 0.5);
}
