/**
 * Enviro Stock Profit Calculator
 *
 * Deliberately neutral and theme-friendly. Recolour by overriding the CSS
 * custom properties on .epc-calculator, for example in your theme:
 *
 *   .epc-calculator { --epc-accent: #1f6f43; }
 */

.epc-calculator {
	--epc-accent: #1f6f43;
	--epc-accent-soft: #e8f1ec;
	--epc-border: #d9dcd6;
	--epc-bg: #ffffff;
	--epc-bg-muted: #f6f7f4;
	--epc-text: #1d2520;
	--epc-muted: #5c655d;
	--epc-poor: #b3261e;
	--epc-poor-bg: #fbe9e7;
	--epc-ok: #8a6100;
	--epc-ok-bg: #fcf3e0;
	--epc-good: #1f6f43;
	--epc-good-bg: #e6f3ec;
	--epc-radius: 8px;

	color: var( --epc-text );
	font-size: 16px;
	line-height: 1.45;
	max-width: 920px;
	box-sizing: border-box;
}

.epc-calculator *,
.epc-calculator *::before,
.epc-calculator *::after {
	box-sizing: border-box;
}

.epc-form {
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
}

.epc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

.epc-section {
	border: 1px solid var( --epc-border );
	border-radius: var( --epc-radius );
	padding: 1rem 1.1rem 1.1rem;
	margin: 0;
	background: var( --epc-bg );
}

.epc-section legend {
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0 0.4rem;
	color: var( --epc-accent );
	text-transform: none;
}

.epc-field {
	margin-top: 0.85rem;
}

.epc-field:first-of-type {
	margin-top: 0.35rem;
}

.epc-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.2rem;
}

.epc-hint {
	display: block;
	color: var( --epc-muted );
	font-size: 0.78rem;
	margin-bottom: 0.35rem;
}

.epc-input-wrap {
	display: flex;
	align-items: stretch;
	border: 1px solid var( --epc-border );
	border-radius: 6px;
	overflow: hidden;
	background: var( --epc-bg );
}

.epc-input-wrap:focus-within {
	border-color: var( --epc-accent );
	box-shadow: 0 0 0 2px var( --epc-accent-soft );
}

.epc-input-wrap input {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
	padding: 0.55rem 0.65rem;
	font-size: 1rem;
	color: var( --epc-text );
	background: transparent;
	min-width: 0;
}

.epc-input-wrap input:focus {
	outline: none;
}

.epc-affix {
	display: flex;
	align-items: center;
	padding: 0 0.6rem;
	background: var( --epc-bg-muted );
	color: var( --epc-muted );
	font-size: 0.85rem;
	white-space: nowrap;
}

/* Scenarios */
.epc-scenarios {
	margin-top: 1.25rem;
}

.epc-scenarios-hint {
	margin: 0.2rem 0 0.9rem;
}

.epc-scenario-grid {
	display: block;
}

.epc-scenario-head,
.epc-scenario-row {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 0.75rem;
	align-items: center;
}

.epc-scenario-head {
	font-size: 0.78rem;
	font-weight: 600;
	color: var( --epc-muted );
	margin-bottom: 0.4rem;
}

.epc-scenario-row {
	margin-bottom: 0.55rem;
}

.epc-scenario-label {
	font-weight: 600;
	font-size: 0.9rem;
}

.epc-input-wrap--sm input {
	padding: 0.45rem 0.55rem;
}

/* Actions */
.epc-actions {
	margin-top: 1rem;
}

.epc-reset {
	background: none;
	border: 1px solid var( --epc-border );
	color: var( --epc-muted );
	border-radius: 6px;
	padding: 0.45rem 0.9rem;
	font-size: 0.85rem;
	cursor: pointer;
}

.epc-reset:hover {
	border-color: var( --epc-accent );
	color: var( --epc-accent );
}

/* Results */
.epc-results {
	border-top: 2px solid var( --epc-accent-soft );
	padding-top: 1.25rem;
}

.epc-acquisition {
	font-size: 0.95rem;
	margin-bottom: 1rem;
	color: var( --epc-muted );
}

.epc-acquisition strong {
	color: var( --epc-text );
	font-size: 1.05rem;
}

.epc-breakeven {
	display: block;
	margin-top: 0.25rem;
}

.epc-table-wrap {
	overflow-x: auto;
}

.epc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.epc-table th,
.epc-table td {
	text-align: right;
	padding: 0.6rem 0.7rem;
	border-bottom: 1px solid var( --epc-border );
	white-space: nowrap;
}

.epc-table thead th {
	font-size: 0.78rem;
	color: var( --epc-muted );
	font-weight: 600;
	border-bottom: 2px solid var( --epc-border );
}

.epc-table thead th:first-child,
.epc-table tbody th {
	text-align: left;
}

.epc-table tbody th {
	font-weight: 700;
}

.epc-sub {
	color: var( --epc-muted );
	font-size: 0.78rem;
}

.epc-pos {
	color: var( --epc-good );
	font-weight: 700;
}

.epc-neg {
	color: var( --epc-poor );
	font-weight: 700;
}

.epc-roi {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.85rem;
}

.epc-band-poor {
	background: var( --epc-poor-bg );
	color: var( --epc-poor );
}

.epc-band-ok {
	background: var( --epc-ok-bg );
	color: var( --epc-ok );
}

.epc-band-good {
	background: var( --epc-good-bg );
	color: var( --epc-good );
}

/* Verdict */
.epc-verdict {
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
	border-radius: var( --epc-radius );
	background: var( --epc-bg-muted );
	border: 1px solid var( --epc-border );
}

.epc-verdict p {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
}

.epc-verdict-tag {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.epc-disclaimer {
	margin-top: 1rem;
	font-size: 0.8rem;
	color: var( --epc-muted );
	line-height: 1.5;
}

@media ( max-width: 640px ) {
	.epc-grid {
		grid-template-columns: 1fr;
	}

	.epc-calculator {
		font-size: 15px;
	}
}
