.htroi {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 24px;
	align-items: start;
	box-sizing: border-box;
}

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

.htroi [hidden] {
	display: none !important;
}

.htroi__panel,
.htroi__results {
	border: 1px solid #d9dde3;
	border-radius: 6px;
	padding: 20px;
	background: #fff;
}

.htroi__panel + .htroi__panel {
	margin-top: 16px;
}

.htroi h3 {
	margin: 0 0 14px;
	font-size: 1.15em;
}

.htroi__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
}

.htroi__field label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9em;
}

.htroi__input-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}

.htroi__input-wrap input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	margin: 0;
}

.htroi__affix {
	flex: 0 0 auto;
	opacity: 0.7;
}

/* Product Waste Savings: add control and per-type rows */
.htroi__waste-add-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.htroi .htroi__waste-add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.htroi__waste-plus {
	font-size: 1.4em;
	line-height: 1;
	opacity: 0.7;
}

.htroi .htroi__waste-select {
	width: auto;
	min-width: 200px;
	margin: 0;
}

.htroi__waste-row {
	display: grid;
	grid-template-columns: minmax(120px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto;
	gap: 14px;
	align-items: end;
	margin-top: 16px;
}

.htroi__waste-label {
	padding-bottom: 10px;
	font-weight: 600;
}

.htroi .htroi__waste-remove {
	margin: 0 0 4px;
	padding: 0 6px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
}

.htroi .htroi__waste-remove:hover,
.htroi .htroi__waste-remove:focus {
	opacity: 1;
}

.htroi__results {
	position: sticky;
	top: 20px;
}

.htroi__notice {
	margin: 0 0 14px;
	font-size: 0.9em;
	opacity: 0.8;
}

.htroi__headline {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 18px;
}

.htroi__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
	border-radius: 6px;
	background: #f3f5f8;
}

.htroi__card-label {
	font-size: 0.8em;
	opacity: 0.8;
}

.htroi__card-value {
	font-size: 1.2em;
	font-weight: 700;
	word-break: break-word;
}

.htroi__details {
	margin: 0;
}

.htroi__details > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid #e6e9ee;
	font-size: 0.92em;
}

.htroi__details dt {
	margin: 0;
}

.htroi__details dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

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

	.htroi__results {
		position: static;
	}
}

@media (max-width: 600px) {
	.htroi__waste-row {
		grid-template-columns: 1fr;
	}

	.htroi__waste-label {
		grid-column: 1 / -1;
		padding-bottom: 0;
	}

	.htroi .htroi__waste-remove {
		justify-self: start;
	}
}
