.area-calculator,
.area-calculator *,
.area-calculator *::before,
.area-calculator *::after {
	box-sizing: border-box;
}

.area-calculator {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	overflow: hidden;
}

.area-layout {
	display: grid;
	grid-template-columns: minmax(0, 560px) minmax(340px, 460px);
	gap: 24px;
	align-items: start;
	justify-content: center;
}

.area-layout > * {
	min-width: 0;
}

.area-card {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	padding: 22px;
	border: 1px solid #e1e5ee;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.area-card-title {
	margin: 0 0 18px;
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	text-transform: none;
}

.area-field {
	min-width: 0;
}

.area-field label {
	display: block;
	margin-bottom: 7px;
	color: #374151;
	font-weight: 700;
}

.area-field input,
.area-field select {
	width: 100%;
	max-width: 100%;
	height: 44px;
	box-sizing: border-box;
	border-radius: 8px;
}

.area-hint {
	margin-top: 6px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.45;
}

.area-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
	margin-bottom: 18px;
}

.area-mode {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid #e2e5e8;
	border-radius: 999px;
	background: #f9fafb;
	color: #404549;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, transform .08s;
}

.area-mode:hover {
	border-color: #ff485b;
	color: #ff485b;
}

.area-mode:active {
	transform: translateY(1px);
}

.area-mode.is-active {
	border-color: #ff485b;
	background: #ff485b;
	color: #ffffff;
}

.area-panels {
	margin-top: 4px;
}

.area-panel {
	display: none;
}

.area-panel.is-active {
	display: block;
}

.area-fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

.area-fields-two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.area-fields-three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.area-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}


/* =========================================================
   RESULT CARD
   ========================================================= */

.area-main-result {
	margin-bottom: 16px;
	padding: 16px;
	border-radius: 12px;
	background: #f8fafc;
	color: #111827;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.55;
	word-break: break-word;
}

.area-result {
	min-height: 70px;
}

.area-result div + div {
	margin-top: 7px;
}

.area-result span {
	color: #4b5563;
	font-weight: 600;
}

.area-result strong {
	color: #111827;
	font-weight: 800;
}

.area-result.is-success {
	color: #166534;
}

.area-result.is-success strong {
	color: #14532d;
}

.area-result.is-warning {
	color: #92400e;
}

.area-result.is-warning strong {
	color: #78350f;
}

.area-result.is-error {
	color: #dc2626;
}

.area-result.is-error strong {
	color: #991b1b;
}

.area-formula {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #f8fafc;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.5;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media only screen and (max-width: 991px) {
	.area-calculator {
		max-width: 720px;
	}

	.area-layout {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.area-fields-three {
		grid-template-columns: 1fr;
	}
}

@media only screen and (max-width: 575px) {
	.area-card {
		padding: 15px;
		border-radius: 12px;
	}

	.area-card-title {
		margin-bottom: 14px;
		font-size: 16px;
	}

	.area-fields-two,
	.area-fields-three {
		grid-template-columns: 1fr;
	}

	.area-modes {
		display: grid;
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.area-mode {
		width: 100%;
	}

	.area-actions {
		flex-direction: column;
	}

	.area-actions .btn {
		width: 100%;
	}

	.area-main-result {
		padding: 12px;
		font-size: 15px;
	}
}

@media only screen and (max-width: 420px) {
	.area-card {
		padding: 13px;
	}
}

/* =========================================================
   AREA METHODS
   ========================================================= */

.area-methods {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.area-methods[hidden],
.area-method-panel[hidden],
.area-panel[hidden] {
	display: none !important;
}

.area-method {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 0 12px;
	border: 1px solid #e2e5e8;
	border-radius: 999px;
	background: #ffffff;
	color: #4b5563;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, transform .08s;
}

.area-method:hover {
	border-color: #ff485b;
	color: #ff485b;
}

.area-method:active {
	transform: translateY(1px);
}

.area-method.is-active {
	border-color: #ff485b;
	background: #ff485b;
	color: #ffffff;
}

.area-method-panels {
	margin-top: 10px;
}

.area-method-panel {
	display: none;
}

.area-method-panel.is-active {
	display: block;
}

.area-note {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #f8fafc;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.5;
}

.area-note strong {
	color: #111827;
	font-weight: 800;
}


/* =========================================================
   AREA METHODS RESPONSIVE
   ========================================================= */

@media only screen and (max-width: 575px) {
	.area-methods {
		display: grid;
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.area-method {
		width: 100%;
	}
}