.tfs-tool-widget {
	margin-top: 24px;
}

.tfs-tool-widget .tfs-tool-card,
.tfs-tool-widget .tfs-tool-result,
.tfs-tool-widget .tfs-calculator-shell,
.tfs-tool-widget .tfs-calculator-result {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 24px;
}

.tfs-tool-widget .tfs-tool-result,
.tfs-tool-widget .tfs-calculator-result {
	margin-top: 24px;
}

.tfs-tool-widget h2 {
	color: #0f172a;
	font-size: 24px;
	line-height: 1.25;
	margin: 0 0 20px;
}

.tfs-tool-form,
.tfs-tool-widget .tfs-calculator-form {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tfs-tool-field,
.tfs-tool-widget .tfs-field {
	display: grid;
	gap: 8px;
}

.tfs-tool-field--full,
.tfs-tool-widget .tfs-field--full,
.tfs-tool-actions,
.tfs-tool-widget .tfs-calculator-actions,
.tfs-tool-error {
	grid-column: 1 / -1;
}

.tfs-tool-field label,
.tfs-tool-widget .tfs-field label {
	color: #0f172a;
	font-weight: 700;
}

.tfs-tool-field input,
.tfs-tool-field select,
.tfs-tool-field textarea,
.tfs-tool-widget .tfs-field input,
.tfs-tool-widget .tfs-field select,
.tfs-tool-widget .tfs-field textarea {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	color: #0f172a;
	min-height: 46px;
	padding: 0 12px;
	width: 100%;
}

.tfs-tool-field textarea,
.tfs-tool-widget .tfs-field textarea {
	padding: 12px;
	resize: vertical;
}

.tfs-tool-field input:focus,
.tfs-tool-field select:focus,
.tfs-tool-field textarea:focus,
.tfs-tool-widget .tfs-field input:focus,
.tfs-tool-widget .tfs-field select:focus,
.tfs-tool-widget .tfs-field textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
	outline: none;
}

.tfs-tool-field p,
.tfs-tool-widget .tfs-field p,
.tfs-tool-note {
	color: #64748b;
	font-size: 14px;
	margin: 0;
}

.tfs-tool-field-with-unit,
.tfs-tool-widget .tfs-field-with-unit {
	align-items: center;
	display: grid;
	grid-template-columns: 1fr auto;
}

.tfs-tool-field-with-unit input,
.tfs-tool-widget .tfs-field-with-unit input {
	border-radius: 8px 0 0 8px;
}

.tfs-tool-field-with-unit span,
.tfs-tool-widget .tfs-field-with-unit span {
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-left: 0;
	border-radius: 0 8px 8px 0;
	color: #64748b;
	display: flex;
	font-size: 13px;
	font-weight: 800;
	min-height: 46px;
	padding: 0 12px;
}

.tfs-tool-actions,
.tfs-tool-widget .tfs-calculator-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tfs-tool-button {
	align-items: center;
	border: 1px solid #003b8f;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	min-height: 46px;
	padding: 0 24px;
}

.tfs-tool-button--primary {
	background: #003b8f;
	color: #fff;
}

.tfs-tool-button--secondary {
	background: #fff;
	color: #003b8f;
}

.tfs-tool-error,
.tfs-tool-widget .tfs-form-error {
	color: #b91c1c;
	font-weight: 700;
	margin: 0;
}

.tfs-tool-result-highlight,
.tfs-tool-widget .tfs-result-highlight {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tfs-tool-result-highlight div,
.tfs-tool-widget .tfs-result-highlight div {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	display: grid;
	gap: 8px;
	padding: 18px;
}

.tfs-tool-result-highlight span,
.tfs-tool-widget .tfs-result-highlight span {
	color: #64748b;
	font-size: 13px;
	font-weight: 700;
}

.tfs-tool-result-highlight strong,
.tfs-tool-widget .tfs-result-highlight strong {
	color: #003b8f;
	font-size: 24px;
	line-height: 1.15;
}

.tfs-tool-result-grid,
.tfs-tool-widget .tfs-result-grid {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 18px;
	overflow: hidden;
}

.tfs-tool-result-grid div,
.tfs-tool-widget .tfs-result-grid div {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 13px 14px;
}

.tfs-tool-result-grid div:nth-child(2n),
.tfs-tool-widget .tfs-result-grid div:nth-child(2n) {
	border-left: 1px solid #e2e8f0;
}

.tfs-tool-result-grid div:nth-child(n + 3),
.tfs-tool-widget .tfs-result-grid div:nth-child(n + 3) {
	border-top: 1px solid #e2e8f0;
}

.tfs-tool-table {
	background: #fff;
	border-collapse: collapse;
	min-width: 640px;
	width: 100%;
}

.tfs-tool-table th,
.tfs-tool-table td {
	border: 1px solid #e2e8f0;
	padding: 12px;
	text-align: left;
}

.tfs-tool-table th {
	background: #f8fafc;
	color: #0f172a;
}

.tfs-tool-table .is-final {
	background: #eff6ff;
	font-weight: 700;
}

.tfs-tool-range-label {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.tfs-tool-range-label strong {
	color: #003b8f;
}

.tfs-tool-field input[type="range"] {
	accent-color: #2563eb;
	border: 0;
	min-height: 28px;
	padding: 0;
}

.tfs-tool-segment {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	overflow: hidden;
}

.tfs-tool-segment label {
	cursor: pointer;
	display: block;
}

.tfs-tool-segment input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tfs-tool-segment span {
	align-items: center;
	background: #fff;
	color: #0f172a;
	display: flex;
	font-weight: 700;
	justify-content: center;
	min-height: 46px;
	padding: 0 12px;
}

.tfs-tool-segment input:checked + span {
	background: #003b8f;
	color: #fff;
}

.tfs-tool-radio-row {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.tfs-tool-radio-row label {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.tfs-tncn-widget .tfs-tool-radio-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.tfs-tncn-widget .tfs-tool-radio-row label {
	align-items: center;
	display: inline-flex;
	gap: 8px;
	line-height: 1.3;
	white-space: nowrap;
}

.tfs-tncn-widget .tfs-tool-radio-row input[type="radio"] {
	accent-color: #2563eb;
	border-radius: 50%;
	flex: 0 0 18px;
	height: 18px;
	margin: 0;
	min-height: 0;
	padding: 0;
	width: 18px;
}

.tfs-tncn-widget .tfs-tool-table th,
.tfs-tncn-widget .tfs-tool-table td {
	text-align: center;
	vertical-align: middle;
}

.tfs-tool-stepper {
	display: grid;
	grid-template-columns: 46px 1fr 46px;
}

.tfs-tool-stepper button,
.tfs-tool-stepper input {
	border: 1px solid #e2e8f0;
	min-height: 46px;
}

.tfs-tool-stepper button {
	background: #f8fafc;
	color: #003b8f;
	cursor: pointer;
	font-size: 20px;
	font-weight: 900;
}

.tfs-tool-stepper input {
	border-left: 0;
	border-radius: 0;
	border-right: 0;
	text-align: center;
}

.tfs-tool-range-scale {
	color: #64748b;
	display: flex;
	font-size: 12px;
	justify-content: space-between;
}

.tfs-tool-chart {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	margin-top: 24px;
	padding: 22px;
}

.tfs-tool-chart canvas {
	display: block;
	max-width: 100%;
	width: 100%;
}

.tfs-tool-ratio {
	align-items: center;
	display: grid;
	gap: 22px;
	grid-template-columns: 150px 1fr;
	margin-top: 22px;
}

.tfs-tool-donut {
	align-items: center;
	aspect-ratio: 1;
	background: conic-gradient(#003b8f 0 var(--interest-share), #16a34a var(--interest-share) 100%);
	border-radius: 50%;
	display: grid;
	justify-items: center;
	position: relative;
}

.tfs-tool-donut::after {
	background: #fff;
	border-radius: 50%;
	content: "";
	height: 58%;
	position: absolute;
	width: 58%;
}

.tfs-tool-donut span {
	color: #003b8f;
	font-size: 18px;
	font-weight: 900;
	position: relative;
	z-index: 1;
}

@media (max-width: 768px) {
	.tfs-tool-form,
	.tfs-tool-result-highlight,
	.tfs-tool-result-grid,
	.tfs-tool-ratio {
		grid-template-columns: 1fr;
	}

	.tfs-tool-result-grid div:nth-child(2n) {
		border-left: 0;
	}

	.tfs-tool-result-grid div + div {
		border-top: 1px solid #e2e8f0;
	}
}

@media (max-width: 480px) {
	.tfs-tool-actions .tfs-tool-button,
	.tfs-tool-button {
		width: 100%;
	}

	.tfs-tool-field-with-unit {
		grid-template-columns: 1fr;
	}

	.tfs-tool-field-with-unit input,
	.tfs-tool-field-with-unit span {
		border: 1px solid #e2e8f0;
		border-radius: 8px;
	}

	.tfs-tool-field-with-unit span {
		border-top: 0;
		justify-content: flex-start;
	}
}
