.e7calc {
	--e7-text: #183244;
	--e7-muted: #506675;
	--e7-border: #d9e6e9;
	--e7-soft: #f3f8f9;
	--e7-accent: #087c86;
	--e7-accent-soft: #e4f5f5;
	--e7-focus: #41a6b344;
	--e7-focus-border: #238493;
	--e7-error: #9e2b2b;
	color: var(--e7-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 28px auto;
	max-width: 1080px;
}

.e7calc,
.e7calc * {
	box-sizing: border-box;
}

.e7calc__header {
	margin-bottom: 25px;
}

.e7calc__title {
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	line-height: 1.2;
	margin: 0 0 10px;
}

.e7calc__intro {
	color: var(--e7-muted);
	line-height: 1.55;
	margin: 0;
}

.e7calc__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
}

.e7calc__panel {
	background: #fff;
	border: 1px solid var(--e7-border);
	border-radius: 18px;
	box-shadow: 0 8px 26px rgba(25, 59, 69, 0.063);
	padding: 24px;
	min-width: 0;
}

.e7calc__panel h3 {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0 0 18px;
}

.e7calc__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 15px;
}

.e7calc__field {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	margin: 0;
}

.e7calc__field > span {
	display: block;
	margin-bottom: 7px;
}

.e7calc__field input,
.e7calc__field select {
	appearance: auto;
	background: #fff;
	border: 1px solid #aebfc4;
	border-radius: 9px;
	color: var(--e7-text);
	font: inherit;
	height: 44px;
	line-height: normal;
	margin: 0;
	max-width: none;
	padding: 0 12px;
	width: 100%;
}

.e7calc__field input:focus,
.e7calc__field select:focus {
	border-color: var(--e7-focus-border);
	box-shadow: none;
	outline: 3px solid var(--e7-focus);
}

.e7calc__group {
	border-top: 1px solid #e3ecee;
	font-weight: 700;
	grid-column: 1 / -1;
	margin-top: 4px;
	padding-top: 16px;
}

.e7calc__results {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}

.e7calc__metric {
	background: var(--e7-soft);
	border-radius: 12px;
	min-width: 0;
	padding: 16px;
}

.e7calc__metric small {
	color: #4c6772;
	display: block;
	font-size: 0.82rem;
	line-height: 1.4;
}

.e7calc__metric strong {
	display: block;
	font-size: 1.42rem;
	line-height: 1.25;
	margin-top: 8px;
	overflow-wrap: anywhere;
}

.e7calc__metric--primary {
	background: var(--e7-accent-soft);
	grid-column: 1 / -1;
}

.e7calc__metric--primary strong {
	color: var(--e7-accent);
	font-size: 1.9rem;
}

.e7calc__status {
	background: #f2f6f7;
	border-radius: 10px;
	line-height: 1.5;
	margin: 17px 0 0;
	padding: 12px 14px;
}

.e7calc__status:empty {
	display: none;
}

.e7calc__note {
	color: #516774;
	font-size: 0.86rem;
	line-height: 1.55;
	margin: 22px 0 0;
}

.e7calc__error {
	color: var(--e7-error);
	font-size: 0.85rem;
	line-height: 1.4;
	margin: 10px 0 0;
	min-height: 1.4em;
}

@media (max-width: 760px) {
	.e7calc__layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 450px) {
	.e7calc__fields,
	.e7calc__results {
		grid-template-columns: 1fr;
	}

	.e7calc__metric--primary {
		grid-column: auto;
	}

	.e7calc__panel {
		padding: 18px;
	}
}
