.stdc-calculator,
.stdc-calculator * {
	box-sizing: border-box;
}

.stdc-calculator {
	--stdc-bg: #f5f7fa;
	--stdc-surface: #ffffff;
	--stdc-soft: #f8fafc;
	--stdc-text: #111827;
	--stdc-muted: #657184;
	--stdc-border: #d9e0e8;
	--stdc-strong-border: #182231;
	--stdc-primary: #2f4052;
	--stdc-primary-hover: #1d2937;
	--stdc-focus: #2563eb;
	--stdc-success: #167244;
	--stdc-warning: #9a5b00;
	--stdc-danger: #b42318;
	--stdc-shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: clamp(14px, 3vw, 28px);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--stdc-text);
	background: transparent;
	overflow-x: hidden;
}

.stdc-calculator.stdc-dark {
	--stdc-bg: #0f1720;
	--stdc-surface: #121c27;
	--stdc-soft: #0f1822;
	--stdc-text: #f3f6fb;
	--stdc-muted: #b8c3d3;
	--stdc-border: #304053;
	--stdc-strong-border: #eef4fb;
	--stdc-primary: #e7edf5;
	--stdc-primary-hover: #ffffff;
	--stdc-focus: #93c5fd;
	--stdc-success: #86efac;
	--stdc-warning: #facc15;
	--stdc-danger: #fca5a5;
	--stdc-shadow: 0 22px 55px rgba(0, 0, 0, 0.30);
}

.stdc-shell {
	width: min(100%, 920px);
	max-width: 100%;
	margin: 0 auto;
	padding: clamp(18px, 4vw, 34px);
	background: var(--stdc-surface);
	border: 1px solid var(--stdc-border);
	border-radius: 22px;
	box-shadow: var(--stdc-shadow);
	min-width: 0;
	overflow: hidden;
}

.stdc-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

.stdc-eyebrow {
	margin: 0 0 6px;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--stdc-muted);
}

.stdc-header h2 {
	margin: 0;
	font-size: clamp(1.65rem, 5vw, 2.45rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--stdc-text);
	overflow-wrap: anywhere;
}

.stdc-intro {
	margin: 10px 0 0;
	max-width: 720px;
	font-size: clamp(0.98rem, 2.5vw, 1.06rem);
	line-height: 1.58;
	color: var(--stdc-muted);
	overflow-wrap: anywhere;
}

.stdc-theme-toggle,
.stdc-actions button,
.stdc-output-actions button {
	appearance: none;
	border: 0;
	border-radius: 16px;
	cursor: pointer;
	font: inherit;
	font-weight: 900;
	transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stdc-theme-toggle {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	color: var(--stdc-text);
	background: var(--stdc-soft);
	border: 1px solid var(--stdc-border);
}

.stdc-theme-toggle:hover,
.stdc-actions button:hover,
.stdc-output-actions button:hover {
	transform: translateY(-1px);
}

.stdc-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	min-width: 0;
}

.stdc-field {
	display: grid;
	grid-template-columns: 1fr;
	gap: 7px;
	min-width: 0;
}

.stdc-field label,
.stdc-check-row label {
	font-weight: 850;
	font-size: 0.96rem;
	color: var(--stdc-text);
}

.stdc-field input[type="date"],
.stdc-field input[type="number"] {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 14px 14px;
	border: 1px solid var(--stdc-border);
	border-radius: 14px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--stdc-text);
	background: var(--stdc-soft);
	outline: none;
}

.stdc-field input:focus,
.stdc-check-row input:focus,
.stdc-theme-toggle:focus-visible,
.stdc-actions button:focus-visible,
.stdc-output-actions button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--stdc-focus) 34%, transparent);
	outline-offset: 2px;
	border-color: var(--stdc-focus);
}

.stdc-help {
	font-size: 0.88rem;
	line-height: 1.45;
	color: var(--stdc-muted);
	overflow-wrap: anywhere;
}

.stdc-check-row {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 10px;
	align-items: start;
	padding: 14px;
	border: 1px solid var(--stdc-border);
	border-radius: 16px;
	background: var(--stdc-soft);
	min-width: 0;
}

.stdc-check-row input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--stdc-primary);
}

.stdc-errors {
	min-height: 0;
	color: var(--stdc-danger);
	font-weight: 800;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.stdc-errors:empty {
	display: none;
}

.stdc-actions,
.stdc-output-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.stdc-actions button,
.stdc-output-actions button {
	width: 100%;
	min-height: 52px;
	padding: 14px 18px;
}

.stdc-primary,
.stdc-output-actions button {
	color: #ffffff;
	background: var(--stdc-primary);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.stdc-primary:hover,
.stdc-output-actions button:hover {
	background: var(--stdc-primary-hover);
}

.stdc-calculator.stdc-dark .stdc-primary,
.stdc-calculator.stdc-dark .stdc-output-actions button {
	color: #101923;
}

.stdc-secondary {
	color: var(--stdc-text);
	background: var(--stdc-soft);
	border: 1px solid var(--stdc-border) !important;
}

.stdc-output-actions {
	margin-top: 22px;
}

.stdc-output-actions[hidden] {
	display: none !important;
}

.stdc-result {
	width: 100%;
	max-width: 100%;
	margin-top: 30px;
	padding: 0;
	background: transparent;
	clear: both;
	min-width: 0;
}

.stdc-result-heading {
	margin: 0 0 16px;
	padding-top: 14px;
	border-top: 4px solid var(--stdc-strong-border);
	font-size: clamp(1.55rem, 5vw, 2.05rem);
	line-height: 1.18;
	letter-spacing: -0.03em;
	color: var(--stdc-text);
}

.stdc-empty-result {
	padding: 18px 0;
	border-top: 1px solid var(--stdc-border);
	border-bottom: 1px solid var(--stdc-border);
	color: var(--stdc-muted);
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.stdc-main-result {
	width: 100%;
	max-width: 100%;
	margin: 0 0 20px;
	padding: 18px clamp(14px, 3vw, 24px);
	border-left: 5px solid var(--stdc-primary);
	border-radius: 18px;
	background: var(--stdc-soft);
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
	min-width: 0;
}

.stdc-main-result span {
	display: block;
	margin: 0 0 8px;
	font-size: 0.9rem;
	font-weight: 850;
	color: var(--stdc-muted);
}

.stdc-main-result strong {
	display: block;
	font-size: clamp(1.7rem, 7vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.04em;
	font-weight: 950;
	color: var(--stdc-text);
	overflow-wrap: anywhere;
}

.stdc-report-section {
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
	border-top: 1px solid var(--stdc-border);
	min-width: 0;
}

.stdc-report-section h4 {
	margin: 0;
	padding: 22px 0 8px;
	font-size: clamp(1.15rem, 4vw, 1.55rem);
	line-height: 1.2;
	color: var(--stdc-text);
}

.stdc-report-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
	padding: 14px 0;
	border-bottom: 1px solid var(--stdc-border);
	min-width: 0;
}

.stdc-report-row span {
	font-size: clamp(1rem, 3.7vw, 1.15rem);
	font-weight: 850;
	line-height: 1.28;
	color: var(--stdc-muted);
	overflow-wrap: anywhere;
}

.stdc-report-row strong {
	font-size: clamp(1.18rem, 5vw, 1.6rem);
	font-weight: 950;
	line-height: 1.16;
	color: var(--stdc-text);
	overflow-wrap: anywhere;
}

.stdc-status-ok,
.stdc-report-row strong.stdc-status-ok {
	color: var(--stdc-success) !important;
}

.stdc-status-warn,
.stdc-report-row strong.stdc-status-warn {
	color: var(--stdc-warning) !important;
}

.stdc-note {
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--stdc-border);
	font-size: 0.96rem;
	line-height: 1.6;
	color: var(--stdc-muted);
	overflow-wrap: anywhere;
}

.stdc-disclaimer {
	margin: 22px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--stdc-border);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--stdc-muted);
	overflow-wrap: anywhere;
}

@media (min-width: 640px) {
	.stdc-header {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
	}

	.stdc-actions button,
	.stdc-output-actions button {
		width: auto;
		flex: 1 1 160px;
	}

	.stdc-report-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
		align-items: center;
		gap: 18px;
	}

	.stdc-report-row strong {
		text-align: right;
	}
}

@media print {
	.stdc-theme-toggle,
	.stdc-form,
	.stdc-output-actions {
		display: none !important;
	}

	.stdc-calculator,
	.stdc-shell {
		padding: 0 !important;
		box-shadow: none !important;
		border: 0 !important;
		background: #ffffff !important;
		color: #000000 !important;
	}
}
