.tfcp-calculator {
	--tfcp-navy: #0b1526;
	--tfcp-panel: #142238;
	--tfcp-panel-hover: #1b2c47;
	--tfcp-border: #223452;
	--tfcp-text-soft: #7c8aa6;
	--tfcp-teal: #2dd4bf;
	--tfcp-teal-deep: #26b3a1;

	max-width: 460px;
	margin: 24px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

.tfcp-calculator *,
.tfcp-calculator *::before,
.tfcp-calculator *::after {
	box-sizing: inherit;
}

.tfcp-panel {
	background: var(--tfcp-navy);
	border: 1px solid var(--tfcp-border);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tfcp-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--tfcp-border);
}

.tfcp-header-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--tfcp-teal);
	color: var(--tfcp-teal);
	font-size: 14px;
	font-weight: 700;
	flex-shrink: 0;
}

.tfcp-heading {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.tfcp-body {
	padding: 20px 22px 22px;
}

.tfcp-label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tfcp-text-soft);
	margin-bottom: 8px;
}

.tfcp-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border-radius: 10px;
	padding-right: 14px;
}

.tfcp-input {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	font-size: 15px;
	font-family: inherit;
	font-variant-numeric: tabular-nums;
	border: none;
	background: transparent;
	color: var(--tfcp-navy);
}

.tfcp-input:focus {
	outline: none;
}

.tfcp-input-row:focus-within {
	box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.45);
}

.tfcp-pi-suffix {
	font-size: 15px;
	font-weight: 700;
	color: var(--tfcp-navy);
	white-space: nowrap;
}

.tfcp-field-hint {
	margin: 8px 0 0;
	font-size: 11.5px;
	color: var(--tfcp-text-soft);
}

.tfcp-example-note {
	margin: 6px 0 0;
	font-size: 11.5px;
	font-style: italic;
	color: var(--tfcp-teal);
}

.tfcp-button-row {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.tfcp-btn {
	flex: 1;
	padding: 12px 18px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
}

.tfcp-btn-primary {
	background: var(--tfcp-teal);
	color: #06231f;
}

.tfcp-btn-primary:hover {
	background: var(--tfcp-teal-deep);
}

.tfcp-btn-ghost {
	background: var(--tfcp-panel);
	color: #ffffff;
	border: 1px solid var(--tfcp-border);
}

.tfcp-btn-ghost:hover {
	background: var(--tfcp-panel-hover);
}

.tfcp-btn:active {
	transform: translateY(1px);
}

.tfcp-btn:focus-visible {
	outline: 2px solid var(--tfcp-teal);
	outline-offset: 2px;
}

.tfcp-error {
	min-height: 16px;
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #ff9d8a;
}

/* Results */
.tfcp-results:not(.has-result) {
	display: none;
}

.tfcp-angle-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 22px;
	padding: 10px 14px;
	background: var(--tfcp-panel);
	border: 1px solid var(--tfcp-border);
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tfcp-text-soft);
}

.tfcp-angle-box strong {
	font-size: 13px;
	text-transform: none;
	letter-spacing: normal;
	color: var(--tfcp-teal);
	font-variant-numeric: tabular-nums;
}

.tfcp-result-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-top: 10px;
}

.tfcp-result-box {
	background: var(--tfcp-panel);
	border: 1px solid var(--tfcp-border);
	border-radius: 10px;
	padding: 12px 8px;
	text-align: center;
}

.tfcp-result-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--tfcp-text-soft);
	margin-bottom: 6px;
	font-style: italic;
}

.tfcp-result-value {
	display: block;
	font-size: 13px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--tfcp-teal);
	word-break: break-word;
}

/* Solution */
.tfcp-solution {
	margin-top: 20px;
}

.tfcp-section-title {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tfcp-text-soft);
}

.tfcp-step {
	margin-bottom: 12px;
}

.tfcp-step:last-child {
	margin-bottom: 0;
}

.tfcp-step p {
	margin: 0 0 6px;
	font-size: 13px;
	color: var(--tfcp-text-soft);
	line-height: 1.5;
}

.tfcp-formula {
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #ffffff !important;
	background: var(--tfcp-panel);
	border: 1px solid var(--tfcp-border);
	padding: 8px 12px;
	border-radius: 8px;
	display: inline-block;
	line-height: 1.7;
}

@media (max-width: 420px) {
	.tfcp-result-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tfcp-btn {
		transition: none;
	}
}
