/*!
 * Calculator kit v1.5 - shared styles for every kit calculator (contract:
 * .agents/skills/build-finance-calculator/references/components.md, sections 8-10).
 *
 * Cascade strategy. Production loads this file after style.css and before tokens.css, base.css
 * and site-chrome.css, so every rule is scoped `.roc-calc .roc-calc-x` (0,2,0) and outranks the
 * `.roc-kit h1/h2/a/button` rules (0,1,1); source order never decides a conflict. Buttons and
 * links that `.roc-kit button:hover/:focus` and `.roc-kit a:hover` (0,2,1) would repaint take
 * their colours in an `:is(*, :hover, :focus)` rule (0,3,0) and change state only through
 * --roc-calc-* custom properties. `!important` appears only against style.css globals, each
 * with a comment: centered text inputs, the #e6e6e6 input border and 8px radius,
 * `outline:none`, `box-shadow:none` and `text-decoration:none` on a/button/input, and the
 * `.calculators-template-default` h2-h5/p/li size ladder (plus its phone `h2 {35px}` rule).
 * Small text uses div/span kit classes where the ladder would force 18px. Colours come from
 * --roc-* tokens; the only literals are the chart and direction values below.
 */

.roc-calc {
	--roc-calc-ink: var(--roc-slate-900);
	--roc-calc-text: var(--roc-slate-800);
	--roc-calc-muted: var(--roc-slate-600);
	--roc-calc-subtle: var(--roc-slate-500);
	--roc-calc-rule: var(--roc-slate-200);
	--roc-calc-control: var(--roc-slate-500);
	--roc-calc-link: var(--roc-blue-700);
	--roc-calc-answer: var(--roc-blue-800);
	--roc-calc-tint: var(--roc-blue-50);
	--roc-calc-up: #15803d;
	--roc-calc-down: #b91c1c;
	--roc-calc-error-text: color-mix(in srgb, var(--roc-error) 86%, var(--roc-slate-900));
	--roc-calc-chart-1: var(--roc-blue-600);
	--roc-calc-chart-2: var(--roc-slate-900);
	--roc-calc-chart-3: #60a5fa;
	--roc-calc-chart-4: var(--roc-slate-500);
	/* Fill marks (bars, stacks, histogram bars, bands): large ink fills overpower the page, so slot 2
	   fills slate-500 and slot 4 steps down to slate-400 to stay distinct from it. */
	--roc-calc-chart-2-fill: var(--roc-slate-500);
	--roc-calc-chart-4-fill: var(--roc-slate-400);
	--roc-calc-chart-grid: #e6ecf4;
	--roc-calc-chart-zero: var(--roc-slate-700);
	--roc-calc-chart-text: var(--roc-slate-600);
	--roc-calc-chart-body: var(--roc-slate-700);
	--roc-calc-chart-ink: var(--roc-slate-900);
	--roc-calc-chart-rule: var(--roc-slate-300);
	--roc-calc-chart-surface: var(--roc-white);
	--roc-calc-on-dark-muted: color-mix(in srgb, var(--roc-white) 92%, transparent);
	--roc-calc-pill: color-mix(in srgb, var(--roc-slate-900) 28%, transparent);
	--roc-calc-pattern: color-mix(in srgb, var(--roc-white) 5%, transparent);
	--roc-calc-bar-shadow: 0 -8px 24px color-mix(in srgb, var(--roc-slate-900) 12%, transparent);
	--roc-calc-pad: clamp(20px, 2.5vw, 32px);
	--roc-calc-lift: clamp(48px, 6vw, 72px);
	--roc-calc-top: calc(var(--roc-sticky-top, 0px) + 16px);
	color: var(--roc-calc-ink);
	font-family: var(--roc-font-body);
	line-height: 1.5;
}

/* ---------- Base ---------- */
/* The embed document loads no Bootstrap, so the kit carries Bootstrap's own [hidden] rule. */
.roc-calc [hidden],
.roc-calc[hidden] {
	display: none !important; /* Bootstrap [hidden] rule, absent from the embed document */
}

.roc-calc .roc-calc-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.roc-calc .roc-icon {
	flex: none;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: middle;
}

.roc-calc .roc-calc-container {
	width: min(var(--roc-container), 100% - 2 * var(--roc-gutter));
	margin-inline: auto;
}

.roc-calc .roc-calc-num {
	white-space: nowrap;
	font-variant-numeric: tabular-nums lining-nums;
}

/* Visible keyboard focus; beats style.css `a, button, input, textarea, select { outline: none !important }` */
.roc-calc :is(a, .roc-calc-btn, .roc-calc-field__input, .roc-calc-field__select, .roc-calc-field__range, summary, [tabindex]):focus-visible {
	outline: var(--roc-focus) !important; /* style.css outline: none */
	outline-offset: var(--roc-focus-offset) !important; /* style.css outline: none */
}

/* ---------- Masthead ---------- */
.roc-calc .roc-calc-masthead {
	padding: clamp(28px, 4vw, 48px) 0 clamp(80px, 9vw, 120px);
	background-color: var(--roc-blue-700);
	background-image: linear-gradient(var(--roc-calc-pattern) 1px, transparent 1px), linear-gradient(90deg, var(--roc-calc-pattern) 1px, transparent 1px), var(--roc-gradient);
	background-size: 32px 32px, 32px 32px, auto;
	background-position: -1px -1px, -1px -1px, 0 0;
	color: var(--roc-white);
}

.roc-calc .roc-calc-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	margin: 0 0 clamp(16px, 2vw, 24px);
	padding: 0;
	list-style: none;
}

/* li: defeats the .calculators-template-default li ladder (18px/29px, 8px margin) */
.roc-calc .roc-calc-crumbs li {
	display: inline-flex;
	gap: 8px;
	margin: 0 !important; /* li ladder margin */
	color: var(--roc-white);
	font: 400 14px/1.45 var(--roc-font-body) !important; /* li ladder */
}

.roc-calc .roc-calc-crumbs li + li::before {
	content: "/";
	color: var(--roc-blue-200);
}

.roc-calc .roc-calc-crumbs [aria-current] {
	font-weight: 600 !important; /* li ladder sets 400 */
}

.roc-calc .roc-calc-crumbs a:is(*, :hover, :focus) {
	display: inline-block;
	margin: -12px -4px;
	padding: 12px 4px;
	color: var(--roc-white);
	text-decoration-line: underline !important; /* style.css a { text-decoration: none !important } */
	text-decoration-color: var(--roc-calc-crumb-line, var(--roc-blue-300));
	text-underline-offset: 3px;
}

.roc-calc .roc-calc-crumbs a:hover {
	--roc-calc-crumb-line: var(--roc-white);
}

/* p: defeats the .calculators-template-default p ladder (18px/29px Roboto 400) */
.roc-calc .roc-calc-masthead__eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	color: var(--roc-blue-50);
	font: 700 12px/1.3 var(--roc-font-body) !important; /* p ladder */
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.roc-calc .roc-calc-masthead__eyebrow .roc-icon {
	width: 16px;
	height: 16px;
}

.roc-calc .roc-calc-masthead__title {
	max-width: 24ch;
	margin: 0;
	color: var(--roc-white);
	font: 800 clamp(2rem, 1.4rem + 2.6vw, 3.25rem) / 1.1 var(--roc-font-display);
	font-variant-numeric: lining-nums;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.roc-calc .roc-calc-masthead__lead {
	max-width: 62ch;
	margin: 14px 0 0;
	color: var(--roc-calc-on-dark-muted);
	font: 400 1.125rem/1.6 var(--roc-font-body) !important; /* p ladder */
	text-wrap: pretty;
}

.roc-calc .roc-calc-masthead__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.roc-calc .roc-calc-masthead__pills li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 !important; /* li ladder */
	padding: 5px 12px 5px 10px;
	border-radius: var(--roc-radius-pill);
	background: var(--roc-calc-pill);
	color: var(--roc-white);
	font: 500 13px/1.3 var(--roc-font-body) !important; /* li ladder */
}

.roc-calc .roc-calc-masthead__pills .roc-icon {
	width: 14px;
	height: 14px;
	color: var(--roc-blue-100);
}

/* ---------- Page body and workbench ---------- */
.roc-calc .roc-calc-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	padding-bottom: clamp(48px, 6vw, 88px);
}

.roc-calc .roc-calc-bench {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin-top: calc(-1 * var(--roc-calc-lift));
	border: 1px solid var(--roc-border);
	border-radius: var(--roc-radius-lg);
	background: var(--roc-white);
	box-shadow: var(--roc-shadow-pop);
}

.roc-calc .roc-calc-bench__inputs,
.roc-calc .roc-calc-bench__answer {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	margin: 0;
	padding: var(--roc-calc-pad);
}

.roc-calc .roc-calc-bench__inputs {
	border-bottom: 1px solid var(--roc-border);
	border-radius: 15px 15px 0 0;
	background: var(--roc-calc-tint);
}

.roc-calc .roc-calc-bench__answer {
	border-radius: 0 0 15px 15px;
	scroll-margin-top: var(--roc-calc-top);
}

/* h2: defeats the .calculators-template-default h2 ladder (36px/46px) and the phone h2 35px rule */
.roc-calc .roc-calc-pane-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 -4px;
	color: var(--roc-calc-ink);
	font: 700 15px/1.3 var(--roc-font-display) !important; /* h2 ladder and phone h2 rule */
	letter-spacing: 0;
}

.roc-calc .roc-calc-bench__example {
	margin-top: -10px;
	color: var(--roc-calc-muted);
	font-size: 14px;
	line-height: 1.4;
}

.roc-calc .roc-calc-pane-title .roc-icon {
	width: 18px;
	height: 18px;
	color: var(--roc-blue-600);
}

/* ---------- Fields ---------- */
.roc-calc .roc-calc-field,
.roc-calc .roc-calc-choice,
.roc-calc .roc-calc-pair,
.roc-calc .roc-calc-fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.roc-calc .roc-calc-field__label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 4px;
	padding: 0;
	color: var(--roc-calc-ink);
	font: 600 15px/1.4 var(--roc-font-body);
}

.roc-calc .roc-calc-field__optional {
	color: var(--roc-calc-muted);
	font-weight: 400;
}

.roc-calc .roc-calc-field__hint {
	margin: 0 0 8px;
	color: var(--roc-calc-muted);
	font-size: 14px;
	line-height: 1.45;
}

/* The control's type matches the input's, so the em and ch sums below measure the same text. */
.roc-calc .roc-calc-field__control {
	--roc-calc-pl: 12px;
	--roc-calc-pr: 12px;
	position: relative;
	max-width: 100%;
	font-size: 17px;
}

.roc-calc .roc-calc-field__control--prefix {
	--roc-calc-pl: calc(20px + var(--roc-calc-pre, 1) * 0.6em);
}

.roc-calc .roc-calc-field__control--suffix {
	--roc-calc-pr: calc(20px + var(--roc-calc-suf, 1) * 0.7em);
}

/* Width variants size the value area (xs: three digits, sm: about seven characters); the affixes'
   room is added on top, so "120 days" and "12 months" never clip. For a select the variant is
   only a minimum (see below). */
.roc-calc .roc-calc-field--xs {
	--roc-calc-value: 4ch;
	--roc-calc-select: 6.5rem;
}

.roc-calc .roc-calc-field--sm {
	--roc-calc-value: 8ch;
	--roc-calc-select: 9rem;
}

.roc-calc .roc-calc-field--md {
	--roc-calc-value: 15ch;
	--roc-calc-select: 14rem;
}

.roc-calc :is(.roc-calc-field--xs, .roc-calc-field--sm, .roc-calc-field--md) .roc-calc-field__control {
	width: calc(var(--roc-calc-value) + var(--roc-calc-pl) + var(--roc-calc-pr) + 2px);
}

/* A select is as wide as its longest option (a native select's own width), never narrower than
   its variant, so short selects line up with fields, and never wider than its column. */
.roc-calc :is(.roc-calc-field--xs, .roc-calc-field--sm, .roc-calc-field--md) .roc-calc-field__control.roc-calc-field__control--select {
	width: max-content;
	min-width: min(var(--roc-calc-select), 100%);
}

.roc-calc .roc-calc-field__input,
.roc-calc .roc-calc-field__select {
	--roc-calc-input-line: var(--roc-calc-control);
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid;
	border-color: var(--roc-calc-input-line) !important; /* style.css input { border-color: #e6e6e6 !important } */
	border-radius: 10px !important; /* style.css input { border-radius: 8px !important } */
	background-color: var(--roc-white);
	color: var(--roc-calc-ink);
	font: 500 17px/1.2 var(--roc-font-body);
	font-variant-numeric: tabular-nums lining-nums;
	text-align: left !important; /* style.css input[type="text"] { text-align: center !important } */
	appearance: none;
}

.roc-calc .roc-calc-field__input:hover,
.roc-calc .roc-calc-field__select:hover {
	--roc-calc-input-line: var(--roc-slate-600);
}

.roc-calc .roc-calc-field__input:focus,
.roc-calc .roc-calc-field__select:focus {
	--roc-calc-input-line: var(--roc-blue-600);
}

.roc-calc .roc-calc-field__input {
	padding: 0 var(--roc-calc-pr) 0 var(--roc-calc-pl);
}

.roc-calc .roc-calc-field__affix {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	color: var(--roc-calc-muted);
	font: 400 16px/1 var(--roc-font-body);
	pointer-events: none;
}

.roc-calc .roc-calc-field__affix--prefix {
	left: 12px;
}

.roc-calc .roc-calc-field__affix--suffix {
	right: 12px;
}

/* The text stops 4px before the chevron (18px, 12px from the edge). Only an option wider than the
   whole column (a long one at 320px) is cut, and then visibly, with an ellipsis. */
.roc-calc .roc-calc-field__select {
	padding-right: 34px;
	text-overflow: ellipsis;
	cursor: pointer;
}

.roc-calc .roc-calc-field__chevron {
	position: absolute;
	top: 15px;
	right: 12px;
	width: 18px;
	height: 18px;
	color: var(--roc-calc-muted);
	pointer-events: none;
}

.roc-calc .roc-calc-field__range {
	display: block;
	width: 100%;
	max-width: 28rem;
	height: 44px;
	margin: 0 0 -6px;
	padding: 0;
	background: transparent;
	accent-color: var(--roc-blue-600);
	cursor: pointer;
}

.roc-calc .roc-calc-field__error {
	display: flex;
	gap: 6px;
	margin: 6px 0 0;
	color: var(--roc-calc-error-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.roc-calc .roc-calc-field__error::before,
.roc-calc .roc-calc-answer__stale::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 15.5H3z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.roc-calc .is-invalid :is(.roc-calc-field__input, .roc-calc-field__select) {
	--roc-calc-input-line: var(--roc-error);
	box-shadow: inset 0 0 0 1px var(--roc-error) !important; /* style.css input { box-shadow: none !important } */
}

.roc-calc .is-invalid .roc-calc-seg {
	border-color: var(--roc-error);
	box-shadow: inset 0 0 0 1px var(--roc-error);
}

/* ---------- Choices: segmented control and select ---------- */
.roc-calc .roc-calc-seg {
	position: relative;
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 3px;
	padding: 3px;
	border: 1px solid var(--roc-calc-control);
	border-radius: 10px;
	background: var(--roc-white);
}

.roc-calc .roc-calc-seg__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.roc-calc .roc-calc-seg__option {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--roc-slate-700);
	font: 500 15px/1.25 var(--roc-font-body);
	text-align: center;
	cursor: pointer;
	user-select: none;
}

.roc-calc .roc-calc-seg__option:hover {
	background: var(--roc-blue-50);
	color: var(--roc-calc-ink);
}

.roc-calc .roc-calc-seg__input:checked + .roc-calc-seg__option {
	background: var(--roc-blue-600);
	color: var(--roc-white);
	font-weight: 600;
}

.roc-calc .roc-calc-seg__input:focus-visible + .roc-calc-seg__option {
	outline: var(--roc-focus);
	outline-offset: var(--roc-focus-offset);
}

/* ---------- Pairs, groups, fieldsets, advanced inputs ---------- */
.roc-calc .roc-calc-pair__row {
	display: grid;
	grid-template-columns: minmax(0, 11rem) minmax(0, 7.5rem);
	gap: 10px;
}

.roc-calc .roc-calc-group,
.roc-calc .roc-calc-fieldset__body,
.roc-calc .roc-calc-advanced__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 20px;
}

.roc-calc .roc-calc-fieldset {
	padding-top: 16px;
	border-top: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-fieldset__legend {
	float: none;
	width: auto;
	margin: 0 0 12px;
	padding: 0;
	color: var(--roc-calc-muted);
	font: 700 12px/1.3 var(--roc-font-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.roc-calc .roc-calc-fieldset__legend + .roc-calc-field__hint {
	margin-top: -8px;
}

.roc-calc .roc-calc-advanced {
	border-top: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-advanced__summary,
.roc-calc .roc-calc-faq__question,
.roc-calc .roc-calc-chart__data > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	list-style: none;
	cursor: pointer;
}

.roc-calc .roc-calc-advanced__summary::-webkit-details-marker,
.roc-calc .roc-calc-faq__question::-webkit-details-marker,
.roc-calc .roc-calc-chart__data > summary::-webkit-details-marker {
	display: none;
}

.roc-calc .roc-calc-advanced__summary,
.roc-calc .roc-calc-chart__data > summary {
	color: var(--roc-calc-link);
	font: 600 15px/1.3 var(--roc-font-body);
}

.roc-calc .roc-calc-advanced__chevron {
	width: 18px;
	height: 18px;
	rotate: -90deg;
}

.roc-calc .roc-calc-advanced[open] > summary .roc-calc-advanced__chevron,
.roc-calc .roc-calc-faq__item[open] .roc-calc-faq__chevron,
.roc-calc .roc-calc-table.is-open .roc-calc-table__more .roc-icon {
	rotate: 180deg;
}

.roc-calc .roc-calc-advanced[open] > summary .roc-calc-advanced__chevron {
	rotate: 0deg;
}

.roc-calc .roc-calc-advanced__body {
	padding: 8px 0 4px;
}

/* ---------- Buttons and actions ---------- */
.roc-calc .roc-calc-btn {
	--roc-calc-btn-bg: var(--roc-white);
	--roc-calc-btn-line: var(--roc-slate-300);
	--roc-calc-btn-text: var(--roc-blue-700);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid;
	border-radius: 10px;
	font: 600 15px/1.2 var(--roc-font-body);
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
}

/* Colours for every state at (0,3,0), so `.roc-kit button:hover/:focus` (black fill) never wins */
.roc-calc .roc-calc-btn:is(*, :hover, :focus, :active) {
	border-color: var(--roc-calc-btn-line);
	background-color: var(--roc-calc-btn-bg);
	color: var(--roc-calc-btn-text);
}

.roc-calc .roc-calc-btn:hover,
.roc-calc .roc-calc-btn.is-copied {
	--roc-calc-btn-bg: var(--roc-blue-50);
	--roc-calc-btn-line: var(--roc-blue-300);
	--roc-calc-btn-text: var(--roc-blue-800);
}

.roc-calc .roc-calc-btn.roc-calc-btn--primary {
	--roc-calc-btn-bg: var(--roc-blue-600);
	--roc-calc-btn-line: var(--roc-blue-600);
	--roc-calc-btn-text: var(--roc-white);
	min-height: 48px;
	padding-inline: 20px;
}

.roc-calc .roc-calc-btn.roc-calc-btn--primary:hover {
	--roc-calc-btn-bg: var(--roc-blue-700);
	--roc-calc-btn-line: var(--roc-blue-700);
}

.roc-calc .roc-calc-btn.is-busy {
	cursor: progress;
}

.roc-calc .roc-calc-btn.is-busy .roc-icon {
	border-radius: 50%;
	stroke: none;
	box-shadow: inset 0 0 0 2px;
	clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 50%);
}

.roc-calc .roc-calc-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-actions__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.roc-calc .roc-calc-actions__errors {
	padding: 14px 16px;
	border: 2px solid var(--roc-error);
	border-radius: 12px;
	background: var(--roc-white);
}

.roc-calc .roc-calc-actions__errors-title {
	margin-bottom: 6px;
	font-weight: 700;
}

.roc-calc .roc-calc-actions__errors-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.roc-calc .roc-calc-actions__errors-list li {
	margin: 0 !important; /* li ladder */
	font: 500 15px/1.45 var(--roc-font-body) !important; /* li ladder */
}

/* ---------- Answer ---------- */
.roc-calc .roc-calc-answer__label {
	margin: 0 0 8px;
	color: var(--roc-calc-muted);
	font: 700 13px/1.35 var(--roc-font-body) !important; /* p ladder */
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.roc-calc .roc-calc-answer__value {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0;
	color: var(--roc-calc-answer);
	font: 700 clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem) / 1.05 var(--roc-font-body) !important; /* p ladder */
	letter-spacing: -0.02em;
}

.roc-calc .roc-calc-answer__number {
	font-variant-numeric: tabular-nums lining-nums;
	overflow-wrap: anywhere;
}

.roc-calc .roc-calc-answer__context {
	color: var(--roc-calc-muted);
	font: 500 15px/1.4 var(--roc-font-body);
	letter-spacing: 0;
}

.roc-calc .roc-calc-answer__sentence {
	max-width: 52ch;
	margin: 12px 0 0;
	color: var(--roc-calc-text);
	font: 400 17px/1.55 var(--roc-font-body) !important; /* p ladder */
	text-wrap: pretty;
}

.roc-calc .roc-calc-answer__stale {
	display: flex;
	gap: 8px;
	margin: 12px 0 0;
	color: var(--roc-calc-ink);
	font: 600 14px/1.45 var(--roc-font-body) !important; /* p ladder */
}

/* Stale: the root and the answer pane both carry .is-stale, so strips below the workbench follow. */
.roc-calc.is-stale :is(.roc-calc-answer__number, .roc-calc-metric__value),
.roc-calc .is-stale :is(.roc-calc-answer__number, .roc-calc-metric__value) {
	--roc-calc-metric-color: var(--roc-calc-subtle);
	color: var(--roc-calc-subtle);
	text-decoration-line: underline;
	text-decoration-style: dashed;
	text-decoration-color: var(--roc-slate-400);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.14em;
}

/* ---------- Metrics, status chips, notes ---------- */
/* Tiles auto-fit at 150px or more, capped at the column count that keeps rows full (2 for 2 or 4). */
.roc-calc .roc-calc-metrics {
	--roc-calc-cols: 3;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(max(var(--roc-calc-tile, 150px), (100% - (var(--roc-calc-cols) - 1) * 12px) / var(--roc-calc-cols)), 1fr));
	gap: 12px;
	margin: 0;
}

.roc-calc .roc-calc-metrics--n1 {
	--roc-calc-cols: 1;
}

.roc-calc .roc-calc-metrics--n2,
.roc-calc .roc-calc-metrics--n4 {
	--roc-calc-cols: 2;
}

.roc-calc .roc-calc-metrics.roc-calc-metrics--strip {
	grid-template-columns: minmax(0, 1fr);
}

.roc-calc .roc-calc-metric {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--roc-slate-50);
}

.roc-calc .roc-calc-metric__label {
	color: var(--roc-calc-muted);
	font: 600 13px/1.35 var(--roc-font-body);
}

.roc-calc .roc-calc-metric__value {
	margin: 0;
	color: var(--roc-calc-metric-color, var(--roc-calc-ink));
	font: 700 22px/1.25 var(--roc-font-body);
	font-variant-numeric: tabular-nums lining-nums;
	white-space: nowrap;
}

.roc-calc .roc-calc-metric__basis {
	margin: 0;
	color: var(--roc-calc-subtle);
	font: 400 13px/1.4 var(--roc-font-body);
}

.roc-calc .roc-calc-metric.is-up {
	--roc-calc-metric-color: var(--roc-calc-up);
}

.roc-calc .roc-calc-metric.is-down {
	--roc-calc-metric-color: var(--roc-calc-down);
}

.roc-calc .roc-calc-metric__dir {
	margin-right: 4px;
	font-size: 0.62em;
	vertical-align: 0.18em;
}

.roc-calc .roc-calc-metrics--strip .roc-calc-metric {
	border: 1px solid var(--roc-calc-rule);
	background: var(--roc-white);
	box-shadow: var(--roc-shadow-sm);
}

.roc-calc .roc-calc-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.roc-calc .roc-calc-status__label {
	color: var(--roc-calc-muted);
	font: 600 13px/1.4 var(--roc-font-body);
}

.roc-calc .roc-calc-status__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 14px 4px 10px;
	border: 1px solid;
	border-radius: var(--roc-radius-pill);
	font: 500 14px/1.2 var(--roc-font-body);
}

.roc-calc .roc-calc-status__chip:is(*, :hover, :focus) {
	border-color: var(--roc-calc-chip-line, var(--roc-slate-300));
	background: var(--roc-calc-chip-bg, var(--roc-white));
	color: var(--roc-calc-chip-text, var(--roc-slate-700));
}

.roc-calc a.roc-calc-status__chip.roc-calc-status__chip {
	min-height: 44px;
}

.roc-calc a.roc-calc-status__chip:hover {
	--roc-calc-chip-line: var(--roc-blue-300);
	text-decoration-line: underline !important; /* style.css a { text-decoration: none !important } */
	text-underline-offset: 3px;
}

.roc-calc .roc-calc-status__icon {
	display: inline-flex;
}

.roc-calc .roc-calc-status__icon .roc-icon {
	display: none;
	color: var(--roc-calc-muted);
}

.roc-calc [data-rc-level="good"] .roc-calc-status__good,
.roc-calc [data-rc-level="neutral"] .roc-calc-status__neutral,
.roc-calc [data-rc-level="watch"] .roc-calc-status__watch {
	display: block;
}

.roc-calc .roc-calc-status[data-rc-level="good"] {
	--roc-calc-chip-text: var(--roc-blue-800);
	--roc-calc-chip-bg: var(--roc-blue-50);
	--roc-calc-chip-line: var(--roc-blue-200);
}

.roc-calc .roc-calc-status[data-rc-level="watch"] {
	--roc-calc-chip-text: var(--roc-calc-ink);
	--roc-calc-chip-line: var(--roc-slate-700);
}

.roc-calc .roc-calc-status[data-rc-level="good"] .roc-icon {
	color: var(--roc-blue-700);
}

.roc-calc .roc-calc-status[data-rc-level="watch"] .roc-calc-status__chip {
	font-weight: 700;
}

.roc-calc .roc-calc-status[data-rc-level="watch"] .roc-icon {
	color: var(--roc-calc-ink);
}

.roc-calc .roc-calc-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--roc-slate-50);
	color: var(--roc-slate-700);
	font-size: 14px;
	line-height: 1.5;
}

.roc-calc .roc-calc-note > .roc-icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--roc-calc-subtle);
}

.roc-calc .roc-calc-note--info {
	background: var(--roc-calc-tint);
}

.roc-calc .roc-calc-note--info > .roc-icon {
	color: var(--roc-blue-700);
}

.roc-calc .roc-calc-note--caution {
	border: 1px solid var(--roc-calc-rule);
	border-left: 3px solid var(--roc-blue-800);
	background: var(--roc-white);
}

.roc-calc .roc-calc-note--caution > .roc-icon {
	color: var(--roc-blue-800);
}

.roc-calc .roc-calc-note__title {
	color: var(--roc-calc-ink);
	font-weight: 700;
}

/* p and li inside authored notes, FAQ answers and math notes: the p/li ladder forces 18px */
.roc-calc :is(.roc-calc-note__text, .roc-calc-math__note) :is(p, li) {
	margin: 0 0 6px !important; /* p/li ladder margin */
	font: inherit !important; /* p/li ladder */
}

/* ---------- Panels ---------- */
/* Panels (charts above all: a canvas starts 300px wide) and every other kit grid use an explicit
   minmax(0, 1fr) column, so no child's min-content can widen the page below 320px. */
.roc-calc .roc-calc-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	min-width: 0;
	padding: var(--roc-calc-pad);
	border: 1px solid var(--roc-calc-rule);
	border-radius: var(--roc-radius-lg);
	background: var(--roc-white);
	box-shadow: var(--roc-shadow-sm);
}

.roc-calc .roc-calc-panel__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 !important; /* h2 ladder margins */
	color: var(--roc-calc-ink);
	font-family: var(--roc-font-display) !important; /* h2 ladder (Roboto) */
	font-size: 1.25rem !important; /* h2 ladder (36px) and phone h2 rule (35px) */
	font-weight: 700 !important; /* h2 ladder (600) */
	line-height: 1.3 !important; /* h2 ladder (46px) and phone h2 rule */
	font-variant-numeric: lining-nums;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.roc-calc .roc-calc-panel__title .roc-icon {
	width: 22px;
	height: 22px;
	color: var(--roc-blue-600);
}

.roc-calc .roc-calc-panel__lead {
	max-width: 70ch;
	margin: -10px 0 0;
	color: var(--roc-calc-muted);
	font: 400 15px/1.5 var(--roc-font-body) !important; /* p ladder */
}

/* ---------- Charts ---------- */
.roc-calc .roc-calc-chart__frame {
	position: relative;
	height: 340px;
}

.roc-calc .roc-calc-chart__frame--sm {
	height: 260px;
}

.roc-calc .roc-calc-chart__note,
.roc-calc .roc-calc-chart__fallback {
	margin: 0;
	color: var(--roc-calc-subtle);
	font: 400 13px/1.5 var(--roc-font-body) !important; /* p ladder */
}

.roc-calc .roc-calc-chart__fallback {
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--roc-slate-50);
	color: var(--roc-slate-700);
}

.roc-calc .roc-calc-chart__data {
	border-top: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-chart__data > summary {
	font-size: 14px;
}

.roc-calc .roc-calc-chart__data[open] > summary {
	margin-bottom: 8px;
}

/* ---------- Tables ---------- */
.roc-calc .roc-calc-table__wrap {
	max-height: min(70vh, 640px);
	overflow: auto;
	border: 1px solid var(--roc-calc-rule);
	border-radius: 12px;
}

.roc-calc .roc-calc-table__table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	color: var(--roc-calc-text);
	font-size: 15px;
	font-variant-numeric: tabular-nums lining-nums;
}

/* Text cells wrap between words (a word longer than the cell breaks); numeric cells stay on one line. */
.roc-calc .roc-calc-table__table :is(th, td) {
	padding: 10px 12px;
	border-bottom: 1px solid var(--roc-calc-rule);
	text-align: left;
	overflow-wrap: break-word;
}

.roc-calc .roc-calc-table__table td.is-num {
	white-space: nowrap;
}

.roc-calc .roc-calc-table__table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	vertical-align: bottom;
	border-bottom-color: var(--roc-slate-300);
	background: var(--roc-slate-50);
	color: var(--roc-calc-muted);
	font: 700 13px/1.3 var(--roc-font-body);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* The row labels stay in view while a wide table scrolls sideways. */
.roc-calc .roc-calc-table__table tbody th,
.roc-calc .roc-calc-table__table thead th:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--roc-white);
}

.roc-calc .roc-calc-table__table thead th:first-child {
	z-index: 2;
	background: var(--roc-slate-50);
}

.roc-calc .roc-calc-table__table tbody th {
	color: var(--roc-calc-ink);
	font-weight: 600;
}

.roc-calc .roc-calc-table__table tbody tr:last-child > * {
	border-bottom: 0;
}

.roc-calc .roc-calc-table__table .is-num {
	text-align: right;
}

.roc-calc .roc-calc-table__more {
	justify-self: start;
}

/* ---------- Show the math ---------- */
.roc-calc .roc-calc-math__formula {
	padding: 16px 18px;
	overflow-x: auto;
	border-radius: 12px;
	background: var(--roc-calc-tint);
	color: var(--roc-calc-ink);
	font: 400 17px/1.6 var(--roc-font-body);
}

.roc-calc .roc-calc-math__formula var {
	font-family: var(--roc-font-body);
	font-style: italic;
}

.roc-calc .roc-calc-math__steps {
	margin: 0;
}

.roc-calc .roc-calc-math__step {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 4px 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-math__step dt {
	color: var(--roc-calc-muted);
	font: 500 15px/1.5 var(--roc-font-body);
}

.roc-calc .roc-calc-math__step dd {
	margin: 0;
	color: var(--roc-calc-ink);
	font: 500 15px/1.5 var(--roc-font-body);
	font-variant-numeric: tabular-nums lining-nums;
}

.roc-calc .roc-calc-math__note {
	color: var(--roc-calc-muted);
	font-size: 14px;
}

/* ---------- Learn ---------- */
.roc-calc .roc-calc-learn .roc-calc-panel__title {
	font-size: 1.75rem !important; /* h2 ladder */
	line-height: 1.2 !important; /* h2 ladder */
}

.roc-calc .roc-calc-learn__body {
	max-width: 72ch;
	color: var(--roc-calc-text);
	font-size: 17px;
	line-height: 1.7;
}

.roc-calc .roc-calc-learn__body :is(p, li) {
	font: 400 17px/1.7 var(--roc-font-body) !important; /* p/li ladder */
}

.roc-calc .roc-calc-learn__body p {
	margin: 0 0 1em;
}

.roc-calc .roc-calc-learn__body li {
	margin: 0 0 0.4em !important; /* li ladder margin */
}

.roc-calc .roc-calc-learn__body :is(ul, ol) {
	margin: 0 0 1em;
	padding-left: 1.4em;
}

.roc-calc .roc-calc-learn__body h3 {
	margin: 1.6em 0 0.5em !important; /* h3 ladder margins */
	color: var(--roc-calc-ink);
	font-family: var(--roc-font-display) !important; /* h3 ladder (Roboto) */
	font-size: 1.25rem !important; /* h3 ladder (28px) */
	font-weight: 700 !important; /* h3 ladder (600) */
	line-height: 1.3 !important; /* h3 ladder (36px) */
	font-variant-numeric: lining-nums;
}

.roc-calc .roc-calc-learn__body h4 {
	margin: 1.4em 0 0.4em !important; /* h4 ladder margins */
	color: var(--roc-calc-ink);
	font: 700 1.0625rem/1.4 var(--roc-font-body) !important; /* h4 ladder */
}

.roc-calc .roc-calc-learn__body > :first-child {
	margin-top: 0 !important; /* h3 ladder margin-top */
}

.roc-calc .roc-calc-learn__body iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 12px;
}

.roc-calc .roc-calc-example {
	margin: 1.25em 0;
	padding: 16px 20px;
	border-left: 3px solid var(--roc-blue-600);
	border-radius: 0 12px 12px 0;
	background: var(--roc-slate-50);
}

.roc-calc .roc-calc-example > :first-child {
	margin-top: 0 !important; /* h3 ladder margin-top */
}

.roc-calc .roc-calc-example > :last-child {
	margin-bottom: 0 !important; /* p/li ladder margins */
}

/* Links inside authored text: blue-700, underlined (style.css removes every underline with !important) */
.roc-calc :is(.roc-calc-learn__body, .roc-calc-faq__answer, .roc-calc-sources__list, .roc-calc-note__text, .roc-calc-math__note, .roc-calc-actions__errors-list, .roc-calc-explore p) a:is(*, :hover, :focus) {
	color: var(--roc-calc-link-color, var(--roc-calc-link));
	text-decoration-line: underline !important; /* style.css a { text-decoration: none !important } */
	text-decoration-thickness: var(--roc-calc-link-weight, 1px);
	text-underline-offset: 0.18em;
}

.roc-calc :is(.roc-calc-learn__body, .roc-calc-faq__answer, .roc-calc-sources__list, .roc-calc-note__text, .roc-calc-math__note, .roc-calc-explore p) a:hover {
	--roc-calc-link-color: var(--roc-blue-900);
	--roc-calc-link-weight: 2px;
}

.roc-calc .roc-calc-actions__errors-list a {
	--roc-calc-link-color: var(--roc-calc-error-text);
	font-weight: 600;
}

/* ---------- Excel CTA, FAQ, sources, disclaimer ---------- */
.roc-calc .roc-calc-excel:has(> .mt-4) {
	margin-top: -1.5rem; /* cancels Bootstrap .mt-4 on the Excel helper's own section */
}

.roc-calc .roc-calc-excel > .row {
	margin-inline: 0;
}

.roc-calc .roc-calc-excel > .row > * {
	padding-inline: 0;
}

.roc-calc .roc-calc-excel .roc-calc-excel-cta {
	gap: 16px;
	padding: 18px 20px;
	border-color: var(--roc-blue-200);
	border-radius: var(--roc-radius-lg);
}

.roc-calc .roc-calc-excel .roc-calc-excel-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 10px;
	font: 600 15px/1.2 var(--roc-font-body);
}

.roc-calc .roc-calc-faq__list {
	border-top: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-faq__item {
	border-bottom: 1px solid var(--roc-calc-rule);
}

.roc-calc .roc-calc-faq__question {
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	color: var(--roc-calc-ink);
	font: 600 17px/1.45 var(--roc-font-body);
}

.roc-calc .roc-calc-faq__chevron {
	width: 20px;
	height: 20px;
	color: var(--roc-blue-600);
}

.roc-calc .roc-calc-faq__answer {
	max-width: 72ch;
	padding: 0 0 18px;
	color: var(--roc-slate-700);
	font-size: 16px;
	line-height: 1.7;
}

.roc-calc .roc-calc-faq__answer :is(p, li) {
	margin: 0 0 0.75em !important; /* p/li ladder */
	font: 400 16px/1.7 var(--roc-font-body) !important; /* p/li ladder */
}

.roc-calc .roc-calc-faq__answer > :last-child {
	margin-bottom: 0 !important; /* p/li ladder */
}

.roc-calc .roc-calc-sources__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 0;
	padding-left: 1.4em;
	color: var(--roc-slate-700);
}

.roc-calc .roc-calc-sources__item {
	margin: 0 !important; /* li ladder */
	padding-left: 4px;
	font: 400 15px/1.5 var(--roc-font-body) !important; /* li ladder */
}

.roc-calc .roc-calc-sources__item::marker {
	color: var(--roc-calc-subtle);
}

.roc-calc .roc-calc-sources__checked {
	display: block;
	color: var(--roc-calc-subtle);
	font-size: 13px;
}

.roc-calc .roc-calc-disclaimer {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-width: 100ch;
	margin-top: -8px;
	padding: 0 4px;
	color: var(--roc-calc-muted);
	font-size: 14px;
	line-height: 1.55;
}

.roc-calc .roc-calc-disclaimer > .roc-icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: var(--roc-calc-subtle);
}

/* ---------- Related calculators (roc_render_related_calculators markup) ---------- */
.roc-calc .roc-calc-explore:has(> .mt-4.mb-5) {
	margin-block: calc(16px - 1.5rem) -3rem; /* cancels Bootstrap .mt-4/.mb-5 on the helper's section */
}

.roc-calc .roc-calc-explore > .row {
	margin-inline: 0;
}

.roc-calc .roc-calc-explore > .row > *,
.roc-calc .roc-calc-explore .card-body {
	padding: 0;
}

/* h2: the h2 ladder, the phone h2 rule and Bootstrap .h3 */
.roc-calc .roc-calc-explore h2 {
	color: var(--roc-calc-ink);
	font-family: var(--roc-font-display) !important; /* h2 ladder (Roboto) */
	font-size: 1.25rem !important; /* h2 ladder, phone h2 rule, Bootstrap .h3 */
	font-weight: 700 !important; /* h2 ladder (600) */
	line-height: 1.3 !important; /* h2 ladder and phone h2 rule */
	font-variant-numeric: lining-nums;
}

.roc-calc .roc-calc-explore__inner .row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 16px;
	margin: 0;
}

.roc-calc .roc-calc-explore__item {
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
}

.roc-calc .roc-calc-explore .related-calc-card:is(*, :hover, :focus) {
	gap: 8px;
	padding: 18px;
	overflow: hidden;
	border: 1px solid var(--roc-calc-card-line, var(--roc-calc-rule));
	border-radius: 14px;
	background: var(--roc-white);
	box-shadow: var(--roc-calc-card-shadow, var(--roc-shadow-sm));
	color: var(--roc-calc-ink);
}

.roc-calc .roc-calc-explore .related-calc-card:hover {
	--roc-calc-card-line: var(--roc-blue-300);
	--roc-calc-card-shadow: var(--roc-shadow-card);
}

.roc-calc .roc-calc-explore .related-calc-image {
	margin: -18px -18px 4px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--roc-slate-100);
}

.roc-calc .roc-calc-explore .related-calc-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.roc-calc .roc-calc-explore .related-calc-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--roc-calc-tint);
	color: var(--roc-blue-700);
	font-size: 20px;
}

/* h3 and p inside the card: the h3/p ladder and calculator-theme.css .related-calc-title */
.roc-calc .roc-calc-explore .related-calc-title {
	margin: 0 !important; /* h3 ladder margins, calculator-theme.css */
	color: var(--roc-calc-ink);
	font: 700 1.0625rem/1.35 var(--roc-font-body) !important; /* h3 ladder, calculator-theme.css .related-calc-title */
}

.roc-calc .roc-calc-explore .related-calc-desc {
	margin: 0;
	color: var(--roc-calc-muted);
	font: 400 15px/1.5 var(--roc-font-body) !important; /* p ladder */
}

.roc-calc .roc-calc-explore .related-calc-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-top: 4px;
	color: var(--roc-calc-link);
	font: 600 14px/1.3 var(--roc-font-body);
}

.roc-calc .roc-calc-explore .related-calc-services-note {
	font: 400 15px/1.5 var(--roc-font-body) !important; /* p ladder */
}

/* ---------- Trust strip ---------- */
.roc-calc .roc-calc-trust {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	padding: 20px 24px;
	border: 1px solid var(--roc-blue-100);
	border-radius: var(--roc-radius-lg);
	background: var(--roc-calc-tint);
}

.roc-calc .roc-calc-trust__avatar {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--roc-white);
	object-fit: cover;
}

.roc-calc .roc-calc-trust__text {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	flex: 1 1 200px;
	gap: 2px;
	min-width: 0;
}

.roc-calc .roc-calc-trust__name {
	color: var(--roc-calc-ink);
	font: 700 17px/1.35 var(--roc-font-display);
	font-variant-numeric: lining-nums;
}

.roc-calc .roc-calc-trust__bio {
	color: var(--roc-slate-700);
	font-size: 15px;
	line-height: 1.5;
}

.roc-calc .roc-calc-trust__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	color: var(--roc-calc-muted);
	font-size: 13px;
}

.roc-calc .roc-calc-trust__meta .roc-icon {
	color: var(--roc-blue-600);
}

.roc-calc .roc-calc-trust__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* ---------- Phone answer bar (fixed; shown below 992px only, see the breakpoints) ---------- */
.roc-calc .roc-calc-sticky {
	position: fixed;
	inset: auto 0 0;
	z-index: calc(var(--roc-z-header, 1000) - 1);
	align-items: center;
	gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--roc-calc-rule);
	background: var(--roc-white);
	box-shadow: var(--roc-calc-bar-shadow);
	transform: translateY(calc(100% + 16px));
	visibility: hidden;
}

.roc-calc .roc-calc-sticky.is-visible {
	transform: none;
	visibility: visible;
}

.roc-calc .roc-calc-sticky__text {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	flex: 1 1 auto;
	min-width: 0;
}

/* The context follows the value and drops under it when the line is full (320px phones). */
.roc-calc .roc-calc-sticky__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 6px;
	min-width: 0;
}

/* Nothing is cut: a long label, context or metric wraps and the bar grows a line. */
.roc-calc .roc-calc-sticky__label,
.roc-calc .roc-calc-sticky__context,
.roc-calc .roc-calc-sticky__metric {
	min-width: 0;
	overflow-wrap: break-word;
}

.roc-calc .roc-calc-sticky__label {
	color: var(--roc-calc-muted);
	font: 700 12px/1.3 var(--roc-font-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.roc-calc .roc-calc-sticky__value {
	flex: none;
	white-space: nowrap;
	color: var(--roc-calc-answer);
	font: 700 20px/1.2 var(--roc-font-body);
	font-variant-numeric: tabular-nums lining-nums;
}

.roc-calc .roc-calc-sticky__context {
	color: var(--roc-calc-muted);
	font-size: 14px;
}

.roc-calc .roc-calc-sticky__metric {
	color: var(--roc-slate-700);
	font-size: 14px;
	line-height: 1.3;
}

.roc-calc .roc-calc-sticky.is-stale .roc-calc-sticky__value {
	color: var(--roc-calc-subtle);
}

/* A stale bar says so in words (the runtime swaps the metric line), not by color alone. */
.roc-calc .roc-calc-sticky.is-stale .roc-calc-sticky__metric {
	color: var(--roc-calc-ink);
	font-weight: 600;
}

/* ---------- Embed document ---------- */
.roc-calc-embed {
	margin: 0;
	background: var(--roc-white);
}

.roc-calc-embed .roc-calc {
	padding: 16px;
}

.roc-calc-embed .roc-calc .roc-calc-embed__title {
	margin: 0;
	color: var(--roc-calc-ink);
	font: 700 20px/1.3 var(--roc-font-display);
}

.roc-calc-embed .roc-calc .roc-calc-main {
	gap: 16px;
	padding-bottom: 0;
}

.roc-calc-embed .roc-calc .roc-calc-bench {
	margin-top: 0;
	box-shadow: none;
}

.roc-calc .roc-calc-embed__attribution {
	margin: 16px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--roc-calc-rule);
	color: var(--roc-calc-muted);
	font-size: 13px;
	text-align: center;
}

.roc-calc .roc-calc-embed__attribution a {
	color: var(--roc-calc-link);
	font-weight: 600;
}

/* ---------- Breakpoints ---------- */
@media (min-width: 576px) {
	.roc-calc .roc-calc-group--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.roc-calc .roc-calc-group--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.roc-calc .roc-calc-group--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	/* Side-by-side fields share label, hint, control, slider and error rows, so the controls line
	   up however long a label or hint is, and each error stays under its own control. */
	.roc-calc .roc-calc-group {
		row-gap: 0;
	}

	.roc-calc .roc-calc-group > * {
		grid-row: span 5;
	}

	/* The explicit column keeps a select (as wide as its longest option) inside its half. */
	.roc-calc .roc-calc-group > .roc-calc-field {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: subgrid;
	}

	.roc-calc .roc-calc-group > .roc-calc-field > .roc-calc-field__hint {
		grid-row: 2;
	}

	.roc-calc .roc-calc-group > .roc-calc-field > .roc-calc-field__control {
		grid-row: 3;
	}

	.roc-calc .roc-calc-group > .roc-calc-field > :is(.roc-calc-field__range, .roc-calc-field__error) {
		grid-row: 4;
	}

	.roc-calc .roc-calc-group > .roc-calc-field > .roc-calc-field__range ~ .roc-calc-field__error {
		grid-row: 5;
	}

	.roc-calc .roc-calc-group--2 > :nth-child(n + 3),
	.roc-calc .roc-calc-group--3 > :nth-child(n + 4),
	.roc-calc .roc-calc-group--4 > :nth-child(n + 5) {
		margin-top: 20px;
	}

	.roc-calc .roc-calc-metrics.roc-calc-metrics--strip {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 992px) {
	.roc-calc .roc-calc-bench {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}

	.roc-calc .roc-calc-bench__inputs {
		border-right: 1px solid var(--roc-calc-rule);
		border-bottom: 0;
		border-radius: 15px 0 0 15px;
	}

	.roc-calc .roc-calc-bench__answer {
		align-self: start;
		border-radius: 0 15px 15px 0;
	}

	.roc-calc .roc-calc-bench__answer.is-sticky {
		position: sticky;
		top: var(--roc-calc-top);
	}

	.roc-calc .roc-calc-metrics.roc-calc-metrics--strip {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.roc-calc .roc-calc-metrics.roc-calc-metrics--strip.roc-calc-metrics--n3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.roc-calc .roc-calc-sticky {
		display: none;
	}
}

@media (max-width: 991.98px) {
	.roc-calc .roc-calc-sticky {
		display: flex;
	}

	.roc-calc .roc-calc-chart__frame {
		height: 300px;
	}

	.roc-calc .roc-calc-chart__frame--sm {
		height: 240px;
	}
}

/* Short viewports (including high zoom): header + wrapped summary can leave less than a
   control's height. Suppress only the duplicate summary; the inline answer stays available.
   The extra class outranks the phone display rule, even while JS keeps .is-visible set. */
@media (max-height: 320px) {
	.roc-calc .roc-calc-sticky.roc-calc-sticky {
		display: none;
	}
}

@media (max-width: 767.98px) {
	.roc-calc .roc-calc-chart__frame {
		height: 260px;
	}

	.roc-calc .roc-calc-chart__frame--sm {
		height: 220px;
	}
}

/* 320px screens (or 1280px at 400% zoom) get 8px more room a side for the controls, so a 320px
   desktop window keeps it after its 15px classic scrollbar, and a select's text 8px more: 8px inner
   padding and the chevron 8px from the edge, at least 4px clear of it. */
@media (max-width: 359.98px) {
	.roc-calc {
		--roc-calc-pad: 12px;
	}

	.roc-calc .roc-calc-field__select {
		padding-inline: 8px 30px;
	}

	.roc-calc .roc-calc-field__chevron {
		right: 8px;
	}
}

@media (max-width: 575.98px) {
	.roc-calc .roc-calc-masthead {
		padding: 20px 0 64px;
	}

	/* Phones: the H1 names the page, so the trail keeps its links only; the pills become one quiet line. */
	.roc-calc .roc-calc-crumbs [aria-current] {
		display: none;
	}

	.roc-calc .roc-calc-masthead__pills {
		gap: 4px 16px;
		margin-top: 16px;
	}

	.roc-calc .roc-calc-masthead__pills li {
		padding: 0;
		background: none;
	}

	/* Two tiles a row on phones (a lone third tile spans the row). */
	.roc-calc .roc-calc-metrics {
		--roc-calc-tile: 136px;
	}

	.roc-calc .roc-calc-metrics--n3 .roc-calc-metric:last-child,
	.roc-calc .roc-calc-metrics--n5 .roc-calc-metric:last-child {
		grid-column: 1 / -1;
	}

	.roc-calc .roc-calc-explore .related-calc-image {
		display: none;
	}

	/* A four-column schedule fits 375px without hiding columns behind a scroll. */
	.roc-calc .roc-calc-table__table {
		font-size: 14px;
	}

	.roc-calc .roc-calc-table__table :is(th, td) {
		padding: 8px 6px;
	}

	.roc-calc .roc-calc-table__table thead th {
		font-size: 12px;
		letter-spacing: 0.02em;
	}

	.roc-calc .roc-calc-masthead__lead {
		font-size: 1rem !important; /* p ladder */
	}

	.roc-calc .roc-calc-bench {
		--roc-calc-lift: 40px;
	}

	.roc-calc .roc-calc-chart__frame {
		height: 220px;
	}

	.roc-calc .roc-calc-chart__frame--sm {
		height: 200px;
	}

	.roc-calc .roc-calc-math__step {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Every action stays (300 and 400% zoom land here too): two buttons a row in Tab order, a lone
	   last one across the row. Only "version" drops; the Excel link keeps its accessible name. */
	.roc-calc .roc-calc-btn__more {
		display: none;
	}

	.roc-calc .roc-calc-actions__row > .roc-calc-btn:not(:only-child) {
		flex: 1 1 calc(50% - 4px);
		padding-inline: 10px;
	}
}

@media screen {
	.roc-calc .roc-calc-table:not(.is-open) .is-extra {
		display: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.roc-calc :is(.roc-calc-btn, .roc-calc-seg__option, .roc-calc-field__input, .roc-calc-field__select) {
		transition: background-color var(--roc-fast) var(--roc-ease), border-color var(--roc-fast) var(--roc-ease), color var(--roc-fast) var(--roc-ease);
	}

	.roc-calc :is(.roc-calc-advanced__chevron, .roc-calc-faq__chevron, .roc-calc-table__more .roc-icon) {
		transition: rotate var(--roc-base) var(--roc-ease);
	}

	.roc-calc .roc-calc-explore .related-calc-card {
		transition: border-color var(--roc-base) var(--roc-ease), box-shadow var(--roc-base) var(--roc-ease);
	}

	.roc-calc .roc-calc-btn.is-busy .roc-icon {
		animation: roc-calc-spin 0.8s linear infinite;
	}

	.roc-calc .roc-calc-sticky {
		transition: transform var(--roc-base) var(--roc-ease-out), visibility 0s linear var(--roc-base);
	}

	.roc-calc .roc-calc-sticky.is-visible {
		transition: transform var(--roc-base) var(--roc-ease-out);
	}
}

@keyframes roc-calc-spin {
	to {
		rotate: 360deg;
	}
}

@media print {
	.roc-calc .roc-calc-masthead {
		padding: 0 0 16px;
		background: none;
		color: var(--roc-calc-ink);
	}

	.roc-calc :is(.roc-calc-masthead__title, .roc-calc-masthead__lead, .roc-calc-crumbs li, .roc-calc-masthead__eyebrow) {
		color: var(--roc-calc-ink);
	}

	.roc-calc :is(.roc-calc-actions, .roc-calc-table__more, .roc-calc-field__range, .roc-calc-explore),
	.roc-calc .roc-calc-sticky.roc-calc-sticky {
		display: none;
	}

	.roc-calc .roc-calc-bench {
		margin-top: 0;
	}

	.roc-calc :is(.roc-calc-bench, .roc-calc-panel, .roc-calc-metric, .roc-calc-trust) {
		box-shadow: none;
		break-inside: avoid;
	}

	.roc-calc .roc-calc-table__wrap {
		max-height: none;
		overflow: visible;
	}

	.roc-calc :is(.roc-calc-advanced, .roc-calc-faq__item, .roc-calc-chart__data)::details-content {
		content-visibility: visible;
		display: block;
	}
}

@media (forced-colors: active) {
	.roc-calc .roc-calc-seg__input:checked + .roc-calc-seg__option {
		forced-color-adjust: none;
		background: Highlight;
		color: HighlightText;
	}

	.roc-calc :is(.roc-calc-metric, .roc-calc-note, .roc-calc-math__formula) {
		border: 1px solid CanvasText;
	}

	.roc-calc .roc-calc-field__error::before,
	.roc-calc .roc-calc-answer__stale::before {
		background: CanvasText;
	}
}
