@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 300;
	src: local("Lato Light"), local("Lato-Light"), url("fonts/lato/Lato-Light.ttf") format("truetype");
}

@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 400;
	src: local("Lato Regular"), local("Lato-Regular"), url("fonts/lato/Lato-Regular.ttf") format("truetype");
}

@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 700;
	src: local("Lato Bold"), local("Lato-Bold"), url("fonts/lato/Lato-Bold.ttf") format("truetype");
}

/* --- Design Tokens ---
   Primärrot #d02f27 | Panel hell #f6f6f6 | Ergebnis-Grau #e7e6e6
   Berechnet-Feld #6e6e71 | Text #1a1a1a */

:root {
	--keycolor: #d02f27;
}

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	font-family: "Lato", Helvetica, sans-serif;
}

body {
	background: #ffffff;
	color: #1a1a1a;
}

.co2 {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px 60px 20px;
}

/* --- Titel --- */
.co2-head {
	text-align: center;
	padding: 44px 0 8px 0;
}

.co2-head h1 {
	margin: 0;
	font-weight: 300;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: var(--keycolor);
	text-transform: uppercase;
}

.co2-head h2 {
	margin: 18px 0 0 0;
	font-weight: 700;
	font-size: 17px;
	letter-spacing: 0.03em;
	color: #1a1a1a;
	text-transform: uppercase;
}

.co2-head p {
	max-width: 860px;
	margin: 18px auto 0 auto;
	font-size: 15px;
	line-height: 1.6;
}

@media only screen and (min-width: 768px) {
	.co2-head h1 { font-size: 40px; }
	.co2-head h2 { font-size: 19px; }
}

/* --- Berechnet durch --- */
.co2-by {
	border-top: 1px solid #d9d9d9;
	border-bottom: 1px solid #d9d9d9;
	margin-top: 30px;
	padding: 18px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.co2-by-text {
	font-size: 15px;
}

.co2-by-logo {
	height: 66px;
	width: auto;
	margin: 0 auto;
}

/* --- Section-Headlines --- */
.co2-section {
	color: var(--keycolor);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin: 44px 0 18px 0;
}

/* --- Grid --- */
.co2-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: stretch;
}

@media only screen and (min-width: 768px) {
	.co2-grid { grid-template-columns: 1fr 1fr; }

	/* Glasfläche-Panel füllt die Resthöhe, damit rechte Spalte
	   so hoch wird wie das Aufbau-Panel links */
	.co2-col > .co2-panel:first-child {
		height: 100%;
		flex: 1;
	}
}

.co2-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* --- Panels --- */
.co2-panel {
	background: #f6f6f6;
	padding: 20px;
}

.co2-panel-title {
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

/* --- Select --- */
.co2-select {
	position: relative;
}

.co2-select select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: var(--keycolor);
	color: #ffffff;
	border: none;
	padding: 11px 36px 11px 12px;
	font: 400 14px "Lato", sans-serif;
	cursor: pointer;
}

.co2-select::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-25%);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #ffffff;
	pointer-events: none;
}

/* --- Aufbau-Grafik --- */
.co2-glasimg {
	display: flex;
	justify-content: center;
	padding: 18px 0;
}

.co2-glasimg img {
	max-width: 100%;
	height: auto;
	max-height: 190px;
}

/* --- Glasstärke-Tabelle --- */
.co2-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 14px;
}

.co2-table .row-first th {
	text-align: left;
	padding-bottom: 12px;
	text-transform: uppercase;
	font-size: 13px;
}

.co2-table .row-second {
	border-bottom: 1px solid #555555;
}

.co2-table .row-second th {
	text-align: center;
	padding-bottom: 8px;
	font-weight: normal;
	font-size: 13px;
	width: 72px;
}

.co2-table .row-second th:first-child {
	text-align: left;
	width: auto;
}

.co2-table .row-input:not(:last-child) {
	border-bottom: 1px solid #cccccc;
}

.co2-table .row-input td {
	padding: 9px 0;
}

.co2-table .row-input td:first-child {
	font-size: 14px;
}

.co2-table .row-input td input {
	width: 64px;
	height: 38px;
	padding: 8px 0;
	border: none;
	background: var(--keycolor);
	color: #ffffff;
	text-align: center;
	font: 400 14px "Lato", sans-serif;
}

/* --- Glasfläche --- */
.co2-flaeche {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.co2-flaeche > img {
	width: 150px;
	max-width: 40%;
	height: auto;
}

.co2-rows {
	flex: 1;
}

.co2-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #cccccc;
	font-size: 14px;
}

.co2-row:last-child {
	border-bottom: none;
}

.co2-input {
	width: 90px;
	flex-shrink: 0;
	box-sizing: border-box;
	background: var(--keycolor);
	color: #ffffff;
	border: none;
	padding: 9px 10px;
	font: 400 14px "Lato", sans-serif;
}

.co2-calc {
	background: #6e6e71;
}

/* --- Ergebnisse --- */
.co2-grid-results {
	margin-top: 70px;
	gap: 40px;
	align-items: start;
}

.co2-result {
	position: relative;
	background: #e7e6e6;
	padding: 22px 24px 26px 24px;
}

.co2-result--accent {
	border-left: 4px solid var(--keycolor);
	padding-left: 20px;
}

.co2-result-icon,
.co2-result-icon-svg {
	position: absolute;
	right: 24px;
	top: -62px;
	height: 138px;
	width: auto;
	pointer-events: none;
}

/* Fenster-Icon (Entstehende Emissionen) kleiner darstellen */
.co2-result-icon {
	width: 80px;
	height: 90px;
	top: -35px;
}

.co2-result-title {
	color: var(--keycolor);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	min-height: 64px;
	padding-right: 150px;
	margin-bottom: 8px;
}

.co2-result-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.co2-result-row:last-child {
	margin-bottom: 0;
}

.co2-result-row > span:first-child {
	font-size: 14px;
}

.co2-result-row--total > span:first-child {
	font-weight: 700;
}

.co2-val {
	width: 46%;
	flex-shrink: 0;
	box-sizing: border-box;
	background: #ffffff;
	color: var(--keycolor);
	font-weight: 700;
	font-size: 15px;
	padding: 9px 12px;
}

.co2-val--total {
	background: var(--keycolor);
	color: #ffffff;
}

/* --- PDF-Report --- */
.co2-pdf {
	margin-top: 40px;
}

.co2-pdf-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid #999999;
	padding: 8px 0;
}

.co2-pdf-row > span {
	font-size: 14px;
	color: #555555;
}

.download-icon {
	height: 30px;
	width: auto;
	cursor: pointer;
	flex-shrink: 0;
}

.download-icon .fill {
	fill: var(--keycolor);
}

/* --- Wie wurde berechnet? (Akkordeon) --- */
.co2-more {
	margin-top: 34px;
}

.co2-more .accordion {
	width: 100%;
	background: #f0f0f0;
	border: none;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	text-align: left;
	font: 700 14px "Lato", sans-serif;
	color: #1a1a1a;
}

.co2-more-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 1.5px solid #1a1a1a;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	line-height: 1;
}

.co2-more .accordion .co2-more-icon::before {
	content: "+";
}

.co2-more .accordion.active .co2-more-icon::before {
	content: "\2212";
}

.co2-more .panel {
	display: none;
	background: #f9f9f9;
	padding: 16px;
	font-size: 14px;
	line-height: 1.6;
}

.co2-more .accordion.active + .panel {
	display: block;
}

/* --- Mobile-Feinschliff --- */
@media only screen and (max-width: 767px) {
	.co2-by {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.co2-by-logo {
		height: 48px;
		max-width: 100%;
		margin: 0;
	}

	.co2-flaeche > img {
		width: 120px;
	}

	.co2-result-title {
		padding-right: 120px;
	}
}
