/*!
 * Style Calculators - frontend styles
 *
 * Every colour, font and radius below comes from a CSS custom property.
 * The values set under Style Calculators in the WordPress admin are printed
 * after this file and override the defaults declared here.
 */

/* ---------------------------------------------------------------------
 * Tokens
 * ------------------------------------------------------------------ */

.stc-calc {
	--stc-font: inherit;
	--stc-heading-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--stc-bg: #fbf5ec;
	--stc-surface: #fffdf9;
	--stc-border: #e2d3c1;
	--stc-text: #2f2622;
	--stc-muted: #6f625a;
	--stc-heading: #54142a;
	--stc-btn-bg: #7a1f33;
	--stc-btn-hover: #5c1526;
	--stc-btn-text: #ffffff;
	--stc-result-bg: #f4e6dd;
	--stc-success: #2f6b4f;
	--stc-warning: #99480f;
	--stc-radius: 20px;

	/* Derived from the radius setting. */
	--stc-radius-md: calc(var(--stc-radius) * 0.7);
	--stc-radius-sm: calc(var(--stc-radius) * 0.5);
	--stc-radius-pill: calc(var(--stc-radius) * 50);
}

/* ---------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------ */

.stc-calc {
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 2em auto;
	font-family: var(--stc-font);
	font-size: clamp(15px, 1rem, 18px);
	line-height: 1.55;
	color: var(--stc-text);
	text-align: left;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

.stc-calc *,
.stc-calc *::before,
.stc-calc *::after {
	box-sizing: border-box;
}

.stc-calc [hidden] {
	display: none !important;
}

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

.stc-calc .stc-card {
	padding: clamp(18px, 5.5%, 40px);
	background: var(--stc-bg);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius);
	color: var(--stc-text);
}

/* ---------------------------------------------------------------------
 * Header and the tape-measure rule
 * ------------------------------------------------------------------ */

.stc-calc .stc-title {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--stc-heading-font);
	font-size: 1.85em;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-transform: none;
	text-wrap: balance;
	color: var(--stc-heading);
}

.stc-calc .stc-title::before,
.stc-calc .stc-title::after {
	content: none;
}

.stc-calc .stc-intro {
	max-width: 60ch;
	margin: 0.5em 0 0;
	padding: 0;
	font-size: 1em;
	color: var(--stc-muted);
}

/* A strip of tape-measure ticks. In the step-by-step calculators the
   coloured line on top of it shows how far through you are. */
.stc-calc .stc-rule {
	position: relative;
	height: 13px;
	margin: 1.25em 0 1.6em;
	border-top: 1px solid var(--stc-border);
	background:
		repeating-linear-gradient(90deg, var(--stc-border) 0 1px, transparent 1px 40px) left top / 100% 100% no-repeat,
		repeating-linear-gradient(90deg, var(--stc-border) 0 1px, transparent 1px 8px) left top / 100% 45% no-repeat;
}

.stc-calc .stc-card > .stc-rule:first-child {
	margin-top: 0;
}

.stc-calc .stc-rule-fill {
	position: absolute;
	top: -2px;
	left: 0;
	width: var(--stc-progress, 0%);
	height: 3px;
	border-radius: 2px;
	background: var(--stc-btn-bg);
	transition: width 0.3s ease;
}

.stc-calc .stc-noscript {
	margin: 0 0 1.25em;
	padding: 0.75em 1em;
	border-left: 3px solid var(--stc-warning);
	background: var(--stc-surface);
}

/* ---------------------------------------------------------------------
 * Form scaffolding
 * ------------------------------------------------------------------ */

.stc-calc .stc-form {
	margin: 0;
	padding: 0;
}

.stc-calc fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.stc-calc legend {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	float: none;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	white-space: normal;
	color: inherit;
}

.stc-calc .stc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 1.25em 1.25em;
	align-items: start;
}

.stc-calc .stc-grid--single {
	grid-template-columns: minmax(0, 340px);
}

.stc-calc .stc-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9em 2em;
	margin: 0 0 1.5em;
}

/* ---------------------------------------------------------------------
 * Pill tabs
 * ------------------------------------------------------------------ */

.stc-calc .stc-pills {
	margin: 0 0 1.5em;
}

.stc-calc .stc-toolbar .stc-pills {
	margin: 0;
}

.stc-calc .stc-legend {
	margin: 0 0 0.45em;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--stc-text);
}

.stc-calc .stc-pill-row {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 4px;
	background: var(--stc-surface);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-pill);
}

.stc-calc .stc-pill {
	position: relative;
	display: inline-flex;
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	cursor: pointer;
}

.stc-calc .stc-pill-input,
.stc-calc .stc-choice-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	appearance: none;
	-webkit-appearance: none;
	pointer-events: none;
}

.stc-calc .stc-pill-text {
	display: inline-block;
	padding: 0.5em 1.15em;
	border-radius: var(--stc-radius-pill);
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.3;
	color: var(--stc-muted);
	transition: background-color 0.15s ease, color 0.15s ease;
	user-select: none;
}

.stc-calc .stc-pill:hover .stc-pill-text {
	color: var(--stc-text);
}

.stc-calc .stc-pill-input:checked + .stc-pill-text {
	background: var(--stc-btn-bg);
	color: var(--stc-btn-text);
}

.stc-calc .stc-pill-input:focus-visible + .stc-pill-text,
.stc-calc .stc-choice-input:focus-visible + .stc-choice-body {
	outline: 2px solid var(--stc-btn-bg);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------
 * Fields
 * ------------------------------------------------------------------ */

.stc-calc .stc-field {
	min-width: 0;
}

.stc-calc .stc-label {
	display: block;
	margin: 0 0 0.4em;
	padding: 0;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: normal;
	text-transform: none;
	color: var(--stc-text);
}

.stc-calc .stc-optional {
	margin-left: 0.5em;
	font-size: 0.85em;
	font-weight: 400;
	color: var(--stc-muted);
}

.stc-calc .stc-control {
	position: relative;
	display: block;
}

/* Deliberately specific here and on the buttons below: themes and page
   builders ship high-specificity rules for form controls. */
.stc-calc .stc-card .stc-control input.stc-input,
.stc-calc .stc-card .stc-control select.stc-select {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 52px;
	margin: 0;
	padding: 0.7em 1em;
	background-color: var(--stc-surface);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-sm);
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: normal;
	color: var(--stc-text);
	outline: 0;
	transition: border-color 0.15s ease;
}

.stc-calc .stc-card .stc-control input.stc-input {
	padding-right: 3.4em;
	appearance: none;
	-webkit-appearance: none;
}

.stc-calc .stc-card .stc-control select.stc-select {
	padding-right: 2.6em;
	appearance: none;
	-webkit-appearance: none;
	background-image: none;
	cursor: pointer;
}

/* Chevron for selects, drawn with borders so it follows the text colour. */
.stc-calc .stc-control--select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1.1em;
	width: 0.5em;
	height: 0.5em;
	margin-top: -0.38em;
	border-right: 2px solid var(--stc-muted);
	border-bottom: 2px solid var(--stc-muted);
	transform: rotate(45deg);
	pointer-events: none;
}

.stc-calc .stc-card .stc-control input.stc-input:hover,
.stc-calc .stc-card .stc-control select.stc-select:hover {
	border-color: var(--stc-muted);
}

.stc-calc .stc-card .stc-control input.stc-input:focus,
.stc-calc .stc-card .stc-control select.stc-select:focus {
	border-color: var(--stc-btn-bg);
	box-shadow: none;
	outline: 2px solid var(--stc-btn-bg);
	outline-offset: 1px;
}

.stc-calc .stc-suffix {
	position: absolute;
	top: 50%;
	right: 1em;
	transform: translateY(-50%);
	font-size: 0.9em;
	color: var(--stc-muted);
	pointer-events: none;
}

.stc-calc .stc-help,
.stc-calc .stc-step-help {
	margin: 0.45em 0 0;
	padding: 0;
	font-size: 0.875em;
	line-height: 1.45;
	color: var(--stc-muted);
}

.stc-calc .stc-error {
	margin: 0.45em 0 0;
	padding: 0;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.4;
	color: var(--stc-warning);
}

.stc-calc .stc-card .stc-field.is-invalid .stc-control input.stc-input,
.stc-calc .stc-card .stc-field.is-invalid .stc-control select.stc-select {
	border-color: var(--stc-warning);
	box-shadow: inset 0 0 0 1px var(--stc-warning);
}

.stc-calc .stc-height-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6em;
}

.stc-calc .stc-height-row--single {
	grid-template-columns: 1fr;
}

/* ---------------------------------------------------------------------
 * Step-by-step calculators
 * ------------------------------------------------------------------ */

.stc-calc .stc-step-count {
	margin: 0 0 0.3em;
	padding: 0;
	font-size: 0.875em;
	font-weight: 600;
	color: var(--stc-muted);
}

.stc-calc .stc-step-title {
	margin: 0;
	font-family: var(--stc-heading-font);
	font-size: 1.3em;
	font-weight: 600;
	line-height: 1.25;
	color: var(--stc-heading);
	outline: 0;
}

.stc-calc .stc-step-help {
	max-width: 62ch;
	margin: 0.4em 0 0;
}

.stc-calc .stc-step > .stc-choices,
.stc-calc .stc-step > .stc-grid,
.stc-calc .stc-step > .stc-subgroup,
.stc-calc .stc-step > [data-stc-panel] {
	margin-top: 1.15em;
}

.stc-calc .stc-subgroup > .stc-legend {
	font-size: 1em;
}

.stc-calc .stc-choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	gap: 0.6em;
}

.stc-calc .stc-choice {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	cursor: pointer;
}

.stc-calc .stc-choice-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.2em;
	height: 100%;
	min-height: 54px;
	padding: 0.75em 1em 0.75em 2.7em;
	background: var(--stc-surface);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Radio dot */
.stc-calc .stc-choice-body::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 1em;
	width: 1.05em;
	height: 1.05em;
	margin-top: -0.525em;
	border: 1.5px solid var(--stc-muted);
	border-radius: 50%;
	background: var(--stc-surface);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.stc-calc .stc-choice:hover .stc-choice-body {
	border-color: var(--stc-muted);
}

.stc-calc .stc-choice-input:checked + .stc-choice-body {
	border-color: var(--stc-btn-bg);
	box-shadow: inset 0 0 0 1px var(--stc-btn-bg);
}

.stc-calc .stc-choice-input:checked + .stc-choice-body::before {
	border-color: var(--stc-btn-bg);
	background: var(--stc-btn-bg);
	box-shadow: inset 0 0 0 3px var(--stc-surface);
}

.stc-calc .stc-choice-title {
	font-weight: 600;
	line-height: 1.3;
	color: var(--stc-text);
}

.stc-calc .stc-choice-hint {
	font-size: 0.85em;
	line-height: 1.4;
	color: var(--stc-muted);
}

/* ---------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------ */

.stc-calc .stc-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin: 1.75em 0 0;
}

.stc-calc .stc-card .stc-actions .stc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 48px;
	margin: 0;
	padding: 0.7em 1.6em;
	border: 1.5px solid transparent;
	border-radius: var(--stc-radius-pill);
	box-shadow: none;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	text-shadow: none;
	white-space: nowrap;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Themes often add their own focus ring to every button; keep one ring,
   and only for keyboard focus. */
.stc-calc .stc-card .stc-actions .stc-btn:focus {
	outline: 0;
	box-shadow: none;
}

.stc-calc .stc-card .stc-actions .stc-btn:focus-visible {
	outline: 2px solid var(--stc-btn-bg);
	outline-offset: 2px;
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--primary,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--primary:focus {
	background: var(--stc-btn-bg);
	border-color: var(--stc-btn-bg);
	color: var(--stc-btn-text);
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--primary:hover,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--primary:active {
	background: var(--stc-btn-hover);
	border-color: var(--stc-btn-hover);
	color: var(--stc-btn-text);
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--outline,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--outline:focus {
	background: transparent;
	border-color: var(--stc-btn-bg);
	color: var(--stc-btn-bg);
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--outline:hover,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--outline:active {
	background: var(--stc-btn-bg);
	border-color: var(--stc-btn-bg);
	color: var(--stc-btn-text);
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--ghost,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--ghost:focus {
	padding-right: 0.9em;
	padding-left: 0.9em;
	background: transparent;
	border-color: transparent;
	color: var(--stc-muted);
}

.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--ghost:hover,
.stc-calc .stc-card .stc-actions .stc-btn.stc-btn--ghost:active {
	background: transparent;
	border-color: transparent;
	color: var(--stc-text);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.stc-calc .stc-privacy {
	margin: 1.25em 0 0;
	padding: 0;
	font-size: 0.82em;
	color: var(--stc-muted);
}

/* ---------------------------------------------------------------------
 * Result panel
 * ------------------------------------------------------------------ */

.stc-calc .stc-result {
	padding: clamp(18px, 5%, 32px);
	background: var(--stc-result-bg);
	border-radius: var(--stc-radius-md);
	outline: 0;
}

.stc-calc:not(.stc-print-root) .stc-result:not([hidden]) {
	animation: stc-rise 0.28s ease-out;
}

@keyframes stc-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.stc-calc .stc-result-kicker {
	margin: 0;
	padding: 0;
	font-size: 0.95em;
	color: var(--stc-muted);
}

.stc-calc .stc-result-headline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em 0.75em;
	margin: 0.15em 0 0;
}

.stc-calc .stc-result-title {
	margin: 0;
	padding: 0;
	font-family: var(--stc-heading-font);
	font-size: 2.2em;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--stc-heading);
	outline: 0;
}

.stc-calc .stc-badge {
	display: inline-block;
	padding: 0.28em 0.85em;
	border: 1.5px solid currentColor;
	border-radius: var(--stc-radius-pill);
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.3;
	color: var(--stc-muted);
}

.stc-calc .stc-badge--success {
	color: var(--stc-success);
}

.stc-calc .stc-badge--warning {
	color: var(--stc-warning);
}

.stc-calc .stc-result-lead {
	max-width: 64ch;
	margin: 0.8em 0 0;
	padding: 0;
	font-size: 1.05em;
	line-height: 1.55;
	color: var(--stc-text);
}

.stc-calc .stc-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
	gap: 0.6em;
	margin: 1.3em 0 0;
	padding: 0;
}

.stc-calc .stc-stat {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	margin: 0;
	padding: 0.75em 0.9em;
	background: var(--stc-surface);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-sm);
}

.stc-calc .stc-stat.is-key {
	border-color: var(--stc-btn-bg);
	box-shadow: inset 0 0 0 1px var(--stc-btn-bg);
}

.stc-calc .stc-stat-label,
.stc-calc .stc-stat-value,
.stc-calc .stc-stat-sub {
	margin: 0;
	padding: 0;
	font-weight: 400;
}

.stc-calc .stc-stat-label {
	font-size: 0.8em;
	line-height: 1.3;
	color: var(--stc-muted);
}

.stc-calc .stc-stat-value {
	font-family: var(--stc-heading-font);
	font-size: 1.4em;
	font-weight: 600;
	line-height: 1.2;
	color: var(--stc-heading);
	overflow-wrap: anywhere;
}

.stc-calc .stc-stat-sub {
	font-size: 0.8em;
	line-height: 1.35;
	color: var(--stc-muted);
}

.stc-calc .stc-section {
	margin: 1.5em 0 0;
}

.stc-calc .stc-section-title {
	margin: 0 0 0.4em;
	padding: 0;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--stc-heading);
}

.stc-calc .stc-section-text {
	max-width: 64ch;
	margin: 0;
	padding: 0;
}

.stc-calc .stc-list {
	max-width: 64ch;
	margin: 0;
	padding: 0 0 0 1.2em;
	list-style: disc outside;
}

.stc-calc .stc-list > li {
	margin: 0 0 0.4em;
	padding: 0 0 0 0.15em;
	list-style: inherit;
}

.stc-calc .stc-list > li::before {
	content: none;
}

.stc-calc .stc-list > li::marker {
	color: var(--stc-btn-bg);
}

.stc-calc .stc-notes {
	display: grid;
	gap: 0.7em;
	margin: 1.4em 0 0;
}

.stc-calc .stc-note {
	max-width: 68ch;
	margin: 0;
	padding: 0.1em 0 0.1em 0.9em;
	border-left: 3px solid var(--stc-border);
	font-size: 0.95em;
	line-height: 1.5;
}

.stc-calc .stc-note--success {
	border-left-color: var(--stc-success);
}

.stc-calc .stc-note--warning {
	border-left-color: var(--stc-warning);
}

.stc-calc .stc-disclaimer {
	max-width: 68ch;
	margin: 1.4em 0 0;
	padding: 0;
	font-size: 0.85em;
	line-height: 1.5;
	color: var(--stc-muted);
}

.stc-calc .stc-actions--result {
	margin-top: 1.6em;
}

.stc-calc .stc-status {
	margin: 0;
	padding: 0;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--stc-success);
}

.stc-calc .stc-status:not(:empty) {
	margin-top: 0.7em;
}

.stc-calc .stc-status.is-error {
	color: var(--stc-warning);
}

/* Ratio scale: where a value sits between published thresholds. */
.stc-calc .stc-scale {
	margin: 1.5em 0 0;
}

.stc-calc .stc-scale-bar {
	position: relative;
	padding: 7px 0;
}

.stc-calc .stc-scale-track {
	display: flex;
	height: 10px;
	overflow: hidden;
	border-radius: var(--stc-radius-pill);
	background: var(--stc-border);
}

.stc-calc .stc-scale-zone {
	height: 100%;
	border-right: 2px solid var(--stc-result-bg);
}

.stc-calc .stc-scale-zone:last-child {
	border-right: 0;
}

.stc-calc .stc-scale-zone--success {
	background: var(--stc-success);
}

.stc-calc .stc-scale-zone--caution {
	background: var(--stc-warning);
	opacity: 0.5;
}

.stc-calc .stc-scale-zone--warning {
	background: var(--stc-warning);
}

.stc-calc .stc-scale-marker {
	position: absolute;
	top: 0;
	width: 4px;
	height: 24px;
	margin-left: -2px;
	border-radius: 2px;
	background: var(--stc-text);
	box-shadow: 0 0 0 2px var(--stc-result-bg);
}

.stc-calc .stc-scale-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 1.4em;
	margin: 0.35em 0 0;
	font-size: 0.82em;
	line-height: 1.35;
	color: var(--stc-muted);
}

.stc-calc .stc-scale-label {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
}

.stc-calc .stc-scale-label::before {
	content: "";
	flex: 0 0 auto;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: var(--stc-warning);
}

.stc-calc .stc-scale-label--success::before {
	background: var(--stc-success);
}

.stc-calc .stc-scale-label--caution::before {
	opacity: 0.5;
}

.stc-calc .stc-scale-label.is-current {
	font-weight: 700;
	color: var(--stc-text);
}

/* Shown only to logged-in editors when a shortcode is misconfigured. */
.stc-admin-notice {
	padding: 0.75em 1em;
	border-left: 4px solid #99480f;
	background: #fdf6ec;
}

/* ---------------------------------------------------------------------
 * Small screens
 * ------------------------------------------------------------------ */

@media (max-width: 560px) {
	.stc-calc {
		margin: 1.5em auto;
	}

	.stc-calc .stc-title {
		font-size: 1.55em;
	}

	.stc-calc .stc-result-title {
		font-size: 1.85em;
	}

	.stc-calc .stc-step-title {
		font-size: 1.2em;
	}

	.stc-calc .stc-grid,
	.stc-calc .stc-grid--single {
		grid-template-columns: 1fr;
	}

	.stc-calc .stc-pills,
	.stc-calc .stc-pill-row {
		display: flex;
	}

	.stc-calc .stc-toolbar {
		display: grid;
		grid-template-columns: 1fr;
	}

	.stc-calc .stc-pill {
		flex: 1 1 0;
	}

	.stc-calc .stc-pill-text {
		flex: 1 1 auto;
		padding-right: 0.6em;
		padding-left: 0.6em;
		text-align: center;
	}

	.stc-calc .stc-actions > .stc-btn {
		flex: 1 1 auto;
	}

	.stc-calc .stc-actions > .stc-btn--primary {
		flex-basis: 100%;
	}

	.stc-calc .stc-actions--result > .stc-btn--outline {
		flex-basis: 40%;
	}

	/* Step-by-step forms: Back and Continue share a row, Reset sits below. */
	.stc-calc .stc-form--wizard .stc-actions > .stc-btn--primary {
		flex: 1 1 0;
	}

	.stc-calc .stc-form--wizard .stc-actions > .stc-btn--outline {
		flex: 0 0 auto;
	}

	.stc-calc .stc-form--wizard .stc-actions > .stc-btn--ghost {
		flex-basis: 100%;
	}

	.stc-calc .stc-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.stc-calc:not(.stc-print-root) .stc-result:not([hidden]) {
		animation: none;
	}

	.stc-calc *,
	.stc-calc *::before,
	.stc-calc *::after {
		transition: none !important;
	}
}

/* ---------------------------------------------------------------------
 * Print: only the result
 *
 * The script copies the result into .stc-print-root (a direct child of
 * <body>) and adds .stc-printing to <html> while the print dialog is open.
 * ------------------------------------------------------------------ */

.stc-print-root {
	display: none;
}

@media print {
	html.stc-printing body > *:not(.stc-print-root) {
		display: none !important;
	}

	html.stc-printing body {
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
	}

	html.stc-printing .stc-print-root {
		display: block !important;
		max-width: none;
		margin: 0;
		font-size: 12pt;
		color: #000;
	}

	.stc-print-root .stc-card {
		padding: 0;
		border: 0;
		background: #fff;
	}

	.stc-print-root .stc-result {
		padding: 0;
		background: #fff;
		opacity: 1;
		transform: none;
	}

	.stc-print-root .stc-title {
		font-size: 14pt;
		color: #000;
	}

	.stc-print-root .stc-rule {
		margin: 10pt 0 14pt;
	}

	.stc-print-root .stc-stat,
	.stc-print-root .stc-note,
	.stc-print-root .stc-section {
		break-inside: avoid;
	}

	.stc-print-root .stc-stat {
		background: #fff;
	}

	.stc-print-root .stc-scale-track,
	.stc-print-root .stc-scale-zone,
	.stc-print-root .stc-scale-label::before,
	.stc-print-root .stc-scale-marker {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.stc-print-root .stc-print-source {
		margin: 18pt 0 0;
		font-size: 9pt;
		color: #555;
	}
}
