/**
 * Compound Interest Calculator — reference form UI with ShoutingNow theme colors/fonts.
 */

.sn-ci-calc {
	--sn-ci-accent: var(--color-brand-yellow-dark, #feb005);
	--sn-ci-accent-strong: #e0a800;
	--sn-ci-success: #16a34a;
	--sn-ci-info: #2b7ddb;
	--sn-ci-info-light: var(--color-brand-blue-light, #3f9eff);
	--sn-ci-panel-bg: #e9ecef;
	--sn-ci-panel-border: #ced4da;
	--sn-ci-input-border: #ccc;
	--sn-ci-nav-bg: #6b7280;
	--sn-ci-nav-hover: #5a6268;
	font-family: var(--font-sans, Inter, system-ui, sans-serif);
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.375rem 1rem 1.5rem;
}

@media (min-width: 640px) {
	.sn-ci-calc {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
		padding-bottom: 1.75rem;
	}
}

@media (min-width: 1024px) {
	.sn-ci-calc {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
		padding-bottom: 2rem;
	}
}

.sn-ci-calc__form {
	margin: 0;
}

/* Nav tabs */
.sn-ci-calc__nav-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 0;
	margin-bottom: 1rem;
}

.sn-ci-calc__nav-tab {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.125rem;
	border-radius: 6px;
	border: 1px solid var(--sn-ci-nav-hover);
	background-color: var(--sn-ci-nav-bg);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 500;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sn-ci-calc__nav-tab:hover:not(.is-active) {
	background-color: var(--sn-ci-nav-hover);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	color: #fff;
}

.sn-ci-calc__nav-tab.is-active {
	background-color: var(--sn-ci-accent-strong);
	border-color: #c99700;
	color: #1a1a1a;
}

/* Layout */
.sn-ci-calc__layout {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	.sn-ci-calc__layout {
		flex-direction: row;
		align-items: flex-start;
		gap: 2rem;
	}
}

.sn-ci-calc__inputs {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: 100%;
	flex-shrink: 0;
}

@media (min-width: 1024px) {
	.sn-ci-calc__inputs {
		width: 380px;
		max-width: 380px;
	}
}

.sn-ci-calc__inputs {
	container-type: inline-size;
	container-name: ci-inputs;
}

/* Gray panels */
.sn-ci-calc__panel {
	padding: 1.25rem;
	border: 1px solid var(--sn-ci-panel-border);
	border-radius: 8px;
	background-color: var(--sn-ci-panel-bg);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.3s ease;
}

.sn-ci-calc__panel:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sn-ci-calc__panel-heading {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-text);
}

.sn-ci-calc__optional {
	font-weight: 400;
	font-size: 0.75rem;
	color: var(--color-text-muted);
}

/* Form rows */
.sn-ci-calc__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.sn-ci-calc__row:last-child {
	margin-bottom: 0;
}

.sn-ci-calc__row--duration {
	align-items: flex-start;
}

.sn-ci-calc__compound-custom-row[hidden] {
	display: none !important;
}

.sn-ci-calc__label {
	flex-shrink: 0;
	width: 100px;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--color-text);
}

.sn-ci-calc__label--multiline {
	line-height: 1.25;
}

.sn-ci-calc__control {
	flex-grow: 1;
	min-width: 0;
}

.sn-ci-calc__control--split {
	display: flex;
	gap: 0.5rem;
}

.sn-ci-calc__control--inline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sn-ci-calc__control--duration {
	display: flex;
	gap: 0.75rem;
}

.sn-ci-calc__control--duration-4 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

/* 4 columns only when the inputs column is wide enough (not the 380px sidebar). */
@container ci-inputs (min-width: 400px) {
	.sn-ci-calc__control--duration-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.sn-ci-calc__control--duration .sn-ci-calc__form-control,
.sn-ci-calc__control--duration-4 .sn-ci-calc__form-control {
	padding-inline: 0.5rem;
}

.sn-ci-calc__control--duration .sn-ci-calc__form-control::-webkit-outer-spin-button,
.sn-ci-calc__control--duration .sn-ci-calc__form-control::-webkit-inner-spin-button,
.sn-ci-calc__control--duration-4 .sn-ci-calc__form-control::-webkit-outer-spin-button,
.sn-ci-calc__control--duration-4 .sn-ci-calc__form-control::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sn-ci-calc__control--duration .sn-ci-calc__form-control[type='number'],
.sn-ci-calc__control--duration-4 .sn-ci-calc__form-control[type='number'] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.sn-ci-calc__subfield {
	flex: 1 1 50%;
	min-width: 0;
}

.sn-ci-calc__subfield-label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--color-text-muted);
}

/* Input groups */
.sn-ci-calc__input-group {
	display: flex;
	align-items: stretch;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--sn-ci-input-border);
	background-color: #fff;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sn-ci-calc__input-group:focus-within {
	border-color: #a0aec0;
	outline: 2px solid #e2e8f0;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sn-ci-calc__input-group--half {
	flex: 1 1 50%;
	min-width: 0;
}

.sn-ci-calc__input-group--deposit {
	flex: 1 1 55%;
	min-width: 0;
}

.sn-ci-calc__input-group--grow {
	flex-grow: 1;
}

.sn-ci-calc__input-addon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.375rem 0.75rem;
	background-color: #e9ecef;
	color: #495057;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	border-right: 1px solid var(--sn-ci-input-border);
}

.sn-ci-calc__input-addon--right {
	border-right: none;
	border-left: 1px solid var(--sn-ci-input-border);
}

.sn-ci-calc__currency-symbol {
	font-weight: 700;
}

.sn-ci-calc__form-control {
	display: block;
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--color-text);
	background-color: transparent;
	border: none;
	outline: none;
	appearance: none;
	font-family: inherit;
}

.sn-ci-calc__form-control:hover {
	background-color: #fdfdfd;
}

.sn-ci-calc__form-control--lg {
	font-size: 1.125rem;
	font-weight: 500;
}

.sn-ci-calc__form-control--center {
	text-align: center;
}

.sn-ci-calc__form-select {
	display: block;
	width: 100%;
	padding: 0.375rem 2.25rem 0.375rem 0.75rem;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--color-text);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 16px 12px;
	border: 1px solid var(--sn-ci-input-border);
	border-radius: 6px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	font-family: inherit;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sn-ci-calc__form-select:hover {
	border-color: #b0b0b0;
}

.sn-ci-calc__form-select:focus {
	border-color: #a0aec0;
	outline: 2px solid #e2e8f0;
}

.sn-ci-calc__form-select--half {
	flex: 1 1 50%;
	min-width: 0;
}

.sn-ci-calc__form-select--deposit {
	flex: 1 1 45%;
	min-width: 0;
}

/* Toggle groups */
.sn-ci-calc__toggle-group {
	display: inline-flex;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--sn-ci-input-border);
	background-color: #fff;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sn-ci-calc__toggle-group--full {
	display: flex;
	width: 100%;
}

.sn-ci-calc__toggle-group--sm .sn-ci-calc__toggle-btn {
	font-size: calc(0.75rem - 1px);
}

.sn-ci-calc__toggle-group--full .sn-ci-calc__toggle-btn {
	flex: 1 1 0;
	min-width: 0;
	padding: 0.5rem 0.35rem;
	font-size: calc(0.8125rem - 1px);
}

.sn-ci-calc__toggle-group--full.sn-ci-calc__toggle-group--sm .sn-ci-calc__toggle-btn {
	font-size: calc(0.72rem - 1px);
	padding: 0.4375rem 0.28rem;
	letter-spacing: -0.01em;
}

.sn-ci-calc__toggle-btn {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-width: 0;
	padding: 0.375rem 0.75rem;
	background-color: #fff;
	color: #495057;
	border: none;
	border-right: 1px solid var(--sn-ci-input-border);
	font-size: calc(0.9rem - 1px);
	font-weight: 500;
	font-family: inherit;
	line-height: 1.25;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	user-select: none;
}

.sn-ci-calc__toggle-btn:last-child {
	border-right: none;
}

.sn-ci-calc__toggle-btn:hover:not(.is-active) {
	background-color: #f1f5f9;
	color: #1e293b;
}

.sn-ci-calc__toggle-btn.is-active {
	background-color: var(--sn-ci-accent);
	color: #1a1a1a;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
	position: relative;
	z-index: 2;
}

/* Deposit section */
.sn-ci-calc__field-label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text);
}

.sn-ci-calc__deposit-row,
.sn-ci-calc__increase-row,
.sn-ci-calc__toggle-row {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
	align-items: stretch;
}

.sn-ci-calc__toggle-row .sn-ci-calc__toggle-group {
	flex: 1 1 auto;
	width: 100%;
}

.sn-ci-calc__deposit-section {
	transition: opacity 0.3s ease;
}

.sn-ci-calc__deposit-section.is-hidden {
	opacity: 0;
	display: none;
}

.sn-contrib-panel[hidden],
[data-contrib-deposit-fields][hidden],
[data-contrib-withdrawal-fields][hidden] {
	display: none !important;
}

/* Calculate button */
.sn-ci-calc__calc-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.25rem;
}

.sn-ci-calc__btn-calc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.75rem 1.5rem;
	border: 1px solid #c99700;
	border-radius: 6px;
	background: linear-gradient(to bottom, var(--color-brand-yellow, #fed700), var(--sn-ci-accent));
	color: #1a1a1a;
	font-size: 1.05rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
	.sn-ci-calc__btn-calc {
		width: auto;
	}
}

.sn-ci-calc__btn-calc:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.18);
}

.sn-ci-calc__btn-calc:active {
	transform: translateY(1px);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Results panel */
.sn-ci-calc__results {
	flex-grow: 1;
	min-width: 0;
	padding: 1.5rem;
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
	position: relative;
	overflow: hidden;
	container-type: inline-size;
	container-name: ci-results;
}

@media (min-width: 1024px) {
	.sn-ci-calc__results {
		padding: 2rem;
		align-self: stretch;
		overflow: visible;
	}

	.sn-ci-calc__inputs {
		align-self: flex-start;
	}
}

.sn-ci-calc__result-title {
	margin: 0 0 2rem;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: clamp(1.5rem, 3vw, 1.875rem);
	font-weight: 700;
	color: var(--sn-ci-accent);
	letter-spacing: -0.02em;
	line-height: 1.2;
	overflow-wrap: break-word;
	word-break: normal;
}

.sn-ci-calc__metrics {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #f3f4f6;
	min-width: 0;
}

@media (min-width: 768px) {
	.sn-ci-calc__metrics {
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem;
	}
}

@container ci-results (max-width: 36rem) {
	.sn-ci-calc__metrics {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

.sn-ci-calc__metrics-col {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

.sn-ci-calc__metric-label {
	margin: 0 0 0.25rem;
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-text-muted);
}

.sn-ci-calc__metric-label-sm {
	margin: 0 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text-muted);
}

.sn-ci-calc__metric {
	min-width: 0;
}

.sn-ci-calc__metric-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.35rem 0.5rem;
	min-width: 0;
}

.sn-ci-calc__metric-value {
	margin: 0;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	white-space: nowrap;
	min-width: 0;
	flex: 1 1 0;
	max-width: 100%;
}

.sn-ci-calc__metric-value--green {
	font-size: clamp(1.375rem, 1.5vw + 1rem, 3rem);
	color: var(--sn-ci-success);
}

.sn-ci-calc__metric-value--accent {
	font-size: clamp(1.25rem, 1.2vw + 0.85rem, 2.25rem);
	color: var(--sn-ci-accent);
}

.sn-ci-calc__metric-value--blue {
	font-size: clamp(1rem, 1vw + 0.65rem, 1.5rem);
	color: var(--sn-ci-info);
}

@container ci-results (max-width: 28rem) {
	.sn-ci-calc__metric-value--green {
		font-size: clamp(1.125rem, 7cqw, 1.875rem);
	}

	.sn-ci-calc__metric-value--accent {
		font-size: clamp(1rem, 6.5cqw, 1.625rem);
	}

	.sn-ci-calc__metric-value--blue {
		font-size: clamp(0.9375rem, 5.5cqw, 1.25rem);
	}
}

.sn-ci-calc__text-accent {
	color: var(--sn-ci-accent);
}

.sn-ci-calc__rate-line {
	margin: 0;
	font-size: clamp(0.9375rem, 1.2vw + 0.5rem, 1.5rem);
	font-weight: 700;
	color: #9ca3af;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: normal;
}

@container ci-results (max-width: 28rem) {
	.sn-ci-calc__rate-line {
		font-size: clamp(0.875rem, 5.5cqw, 1.25rem);
	}
}

.sn-ci-calc__double-time {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #4b5563;
}

.sn-ci-calc__icon-up {
	color: var(--sn-ci-success);
	flex-shrink: 0;
}

.sn-ci-calc__copy-btn {
	flex-shrink: 0;
	margin-top: 0.125rem;
	padding: 0.35rem;
	border: none;
	background: transparent;
	color: #cbd5e1;
	cursor: pointer;
	transition: color 0.2s ease, transform 0.1s ease;
}

.sn-ci-calc__copy-btn:hover {
	color: #64748b;
	transform: scale(1.08);
}

/* Tooltips */
.sn-ci-calc__tooltip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: help;
}

.sn-ci-calc__tooltip-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1px solid #ccc;
	border-radius: 50%;
	font-size: 0.75rem;
	color: #888;
	background: #fff;
}

.sn-ci-calc__tooltip:hover .sn-ci-calc__tooltip-icon,
.sn-ci-calc__tooltip:focus-visible .sn-ci-calc__tooltip-icon {
	background: #e2e8f0;
	color: #333;
	border-color: #94a3b8;
}

.sn-ci-calc__tooltip-text {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	z-index: 10;
	bottom: 125%;
	left: 50%;
	width: 200px;
	margin-left: -100px;
	padding: 0.5rem;
	border-radius: 6px;
	background-color: #334155;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 400;
	text-align: center;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.sn-ci-calc__tooltip-text::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: #334155;
}

.sn-ci-calc__tooltip:hover .sn-ci-calc__tooltip-text,
.sn-ci-calc__tooltip:focus-visible .sn-ci-calc__tooltip-text {
	visibility: visible;
	opacity: 1;
}

/* View controls */
.sn-ci-calc__view-controls {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
	.sn-ci-calc__view-controls {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
	}
}

.sn-ci-calc__control-label {
	margin: 0 0 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
}

.sn-ci-calc__control-label--center {
	text-align: center;
}

.sn-ci-calc__view-toggle {
	display: flex;
	gap: 0.25rem;
	padding: 0.25rem;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	background: #f9fafb;
}

.sn-ci-calc__view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0.5rem;
	border: none;
	border-radius: 0.375rem;
	background: transparent;
	color: #9ca3af;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sn-ci-calc__view-btn.is-active {
	background-color: #eff6ff;
	color: var(--sn-ci-info);
	border: 1px solid #bfdbfe;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sn-ci-calc__breakdown-title {
	margin: 0 0 0.75rem;
	font-family: var(--font-heading, Sora, sans-serif);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--sn-ci-accent);
}

/* Table */
.sn-ci-calc__table-wrap {
	overflow-x: auto;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sn-ci-calc__table-wrap::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.sn-ci-calc__table-wrap::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.sn-ci-calc__table-wrap::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.sn-ci-calc__results-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	table-layout: fixed;
}

.sn-ci-calc__results-table [hidden] {
	display: none;
}

.sn-ci-calc__results-table th,
.sn-ci-calc__results-table td {
	border: 1px solid #ddd;
	padding: 0.375rem 0.625rem;
	text-align: left;
	transition: background-color 0.2s ease;
	vertical-align: middle;
}

.sn-ci-calc__results-table th.is-num,
.sn-ci-calc__results-table td.is-num {
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.sn-ci-calc__results-table th {
	color: #fff;
	font-weight: 500;
	padding: 0.5rem 0.625rem;
	background-color: #64748b;
}

.sn-ci-calc__results-table th.is-center,
.sn-ci-calc__results-table td.is-center {
	text-align: center;
	width: 4.25rem;
}

.sn-ci-calc__results-table th.is-accent {
	background-color: var(--sn-ci-accent-strong);
}

.sn-ci-calc__results-table th.is-success {
	background-color: var(--sn-ci-success);
}

.sn-ci-calc__results-table tbody tr:nth-child(even) {
	background-color: #f9f9f9;
}

.sn-ci-calc__results-table tbody tr:hover td {
	background-color: #f1f5f9;
}

.sn-ci-calc__results-table tbody tr.is-last-row td.is-accent-cell {
	background-color: var(--sn-ci-accent-strong);
	border-color: #ddd;
	color: #fff;
	font-weight: 600;
}

.sn-ci-calc__results-table tbody tr.is-last-row td:not(.is-center):not(.is-accent-cell):not(.is-success-cell) {
	background-color: #64748b;
	border-color: #ddd;
	color: #fff;
	font-weight: 600;
}

.sn-ci-calc__results-table tbody tr.is-last-row td.is-center {
	background-color: #64748b;
	border-color: #ddd;
	color: #fff;
	font-weight: 600;
}

.sn-ci-calc__results-table tbody tr.is-last-row td.is-success-cell {
	background-color: var(--sn-ci-success);
	border-color: #ddd;
	color: #fff;
	font-weight: 700;
}

.sn-ci-calc__results-table tbody tr.is-last-row:hover td.is-accent-cell {
	background-color: var(--sn-ci-accent-strong);
}

.sn-ci-calc__results-table tbody tr.is-last-row:hover td.is-center,
.sn-ci-calc__results-table tbody tr.is-last-row:hover td:not(.is-center):not(.is-accent-cell):not(.is-success-cell) {
	background-color: #64748b;
}

.sn-ci-calc__results-table tbody tr.is-last-row:hover td.is-success-cell {
	background-color: var(--sn-ci-success);
}

.sn-ci-calc__results-table tr.is-muted td {
	background-color: #f9fafb;
}

.sn-ci-calc__results-table tbody th[scope='row'] {
	font-weight: 600;
	text-align: center;
	width: 4.25rem;
}

.sn-ci-calc__results-table tbody tr:not(.is-muted) th[scope='row'] {
	color: #fff;
	background-color: #64748b;
}

.sn-ci-calc__results-table tbody tr.is-muted th[scope='row'] {
	color: var(--color-text);
	background-color: #f9fafb;
}

.sn-ci-calc__results-table tbody tr.is-muted:hover th[scope='row'] {
	background-color: #f1f5f9;
}

.sn-ci-calc__results-table tbody tr.is-muted.is-strong td {
	font-weight: 600;
}

/* Chart */
.sn-ci-calc__chart-wrap {
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sn-ci-calc__chart-wrap[hidden] {
	display: none !important;
}

.sn-ci-calc__chart-canvas {
	position: relative;
	height: 18rem;
	width: 100%;
}

.sn-ci-calc__chart-canvas canvas {
	width: 100% !important;
	height: 100% !important;
}

/* Disclaimer & footer */
.sn-ci-calc__disclaimer {
	margin: 0 0 1.5rem;
	padding: 0.75rem;
	border: 1px solid #f3f4f6;
	border-radius: 0.375rem;
	background: #f9fafb;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--color-text-muted);
}

.sn-ci-calc__footer-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

@media (min-width: 640px) {
	.sn-ci-calc__footer-actions {
		flex-direction: row;
		justify-content: space-between;
	}
}

.sn-ci-calc__action-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	width: 100%;
}

@media (min-width: 640px) {
	.sn-ci-calc__action-group {
		width: auto;
	}
}

.sn-ci-calc__btn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	flex: 1 1 auto;
	padding: 0.5rem 1rem;
	border: 1px solid #15803d;
	border-radius: 6px;
	background-color: var(--sn-ci-success);
	color: #fff;
	font-size: 0.9rem;
	font-family: inherit;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 640px) {
	.sn-ci-calc__btn-action {
		flex: 0 0 auto;
	}
}

.sn-ci-calc__btn-action:hover {
	background-color: #15803d;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.sn-ci-calc__btn-action--blue {
	background-color: var(--sn-ci-info);
	border-color: #1f6bc4;
}

.sn-ci-calc__btn-action--blue:hover {
	background-color: #1f6bc4;
}

.sn-ci-calc__scroll-top {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: 1px solid var(--color-border);
	border-radius: 0.375rem;
	background: #fff;
	color: #9ca3af;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.sn-ci-calc__scroll-top:hover {
	color: var(--color-text);
	background: #f9fafb;
}

.sn-ci-calc .sn-calc-error {
	margin-top: 0.5rem;
}

.sn-ci-calc__checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	cursor: pointer;
}

.sn-ci-calc__checkbox-row input {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.sn-savings-calc__inflation-row {
	margin-top: 0.75rem;
}

.sn-savings-calc__contrib-fields,
.sn-investment-calc__contrib-panel {
	margin-top: 0.75rem;
}

.sn-savings-calc__summary-text,
.sn-investment-calc__summary-text {
	margin: 0;
	padding: 1rem;
	background: #f8fafc;
	border: 1px solid var(--sn-ci-panel-border);
	border-radius: 0.375rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.8125rem;
	line-height: 1.5;
	white-space: pre-wrap;
}

.sn-ir-calc__intro {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-text-muted, #6b7280);
}

.sn-ir-calc__mode-tab {
	border: none;
	cursor: pointer;
	font: inherit;
}

.sn-ir-calc__result-subtitle {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.sn-ir-calc__breakdown-heading {
	margin: 1.25rem 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}
