:root {
  --hintergrund: #fbfaf7;
  --flaeche: #f1eee7;
  --text: #1f2328;
  --leise: #5b6169;
  --akzent: #2f6f62;
  --linie: #e2ddd2;
  --breite: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hintergrund: #16181b;
    --flaeche: #1e2125;
    --text: #e8e6e1;
    --leise: #a3a7ad;
    --akzent: #7cc4b2;
    --linie: #2c3036;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--akzent); }

.innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 1rem;
}

.schmal { max-width: 42rem; }
.innen.schmal { max-width: var(--breite); }
.innen.schmal > * { max-width: 42rem; }

/* Kopfzeile */
.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--hintergrund);
  border-bottom: 1px solid var(--linie);
}
.kopf .innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.logo img { display: block; border-radius: 8px; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.kopf nav a { color: var(--leise); text-decoration: none; }
.kopf nav a:hover { color: var(--akzent); }

/* Abschnitte */
section { padding: 4rem 0; scroll-margin-top: 4rem; }
section.hell { background: var(--flaeche); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 1rem; }
h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }

.held { padding: 6rem 0 5rem; }
.untertitel {
  margin: 0 0 0.5rem;
  color: var(--akzent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.einleitung { font-size: 1.2rem; color: var(--leise); max-width: 40rem; }

/* Projektkarten */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.karte p { margin: 0; color: var(--leise); }

/* Galerie */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.galerie figure { margin: 0; }
.galerie img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}
.galerie figcaption { margin-top: 0.5rem; color: var(--leise); font-size: 0.95rem; }

/* Fußzeile */
.fuss { border-top: 1px solid var(--linie); padding: 2rem 0; color: var(--leise); }
.fuss .innen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.fuss p { margin: 0; }
.fuss nav { display: flex; gap: 1.25rem; }

/* Unterseiten */
.seite { padding: 4rem 0; }

/* Panorama */
.panorama { margin: 2rem 0 0; }
.panorama-fenster {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 0.75rem;
  cursor: grab;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.panorama-fenster.zieht { cursor: grabbing; }
.panorama-fenster:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
.panorama-fenster img {
  display: block;
  height: clamp(220px, 45vh, 420px);
  width: auto;
  max-width: none;
  user-select: none;
}
.panorama figcaption { margin-top: 0.5rem; color: var(--leise); font-size: 0.95rem; }

/* Daten-Dashboard */
.held-klein { padding: 4rem 0 3rem; }
.stand { margin: 1rem 0 0; color: var(--leise); font-size: 0.95rem; }
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kachel {
  background: var(--hintergrund);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--akzent);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
section:not(.hell) .kachel { background: var(--flaeche); }
.kachel.warm { border-left-color: #d1495b; }
.kachel.kalt { border-left-color: #3c7fc4; }
.kachel-titel { color: var(--leise); font-size: 0.9rem; }
.kachel-wert { font-size: 2rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kachel-hinweis { color: var(--leise); font-size: 0.85rem; }
.diagramme {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.diagramm { margin: 0; padding: 1.25rem; background: var(--hintergrund); }
section:not(.hell) .diagramm { background: var(--flaeche); }
.diagramm.breit { grid-column: span 2; }
.diagramm.voll { grid-column: 1 / -1; }
.diagramm figcaption { display: flex; flex-direction: column; margin-bottom: 0.75rem; }
.diagramm figcaption > span { color: var(--leise); font-size: 0.9rem; }
.leinwand { position: relative; height: 260px; }
.leinwand-hoch { height: 320px; }
.quelle { color: var(--leise); font-size: 0.85rem; margin: 1rem 0 0; }
.hinweis-fehler { color: var(--leise); margin: 0; }
@media (max-width: 52rem) {
  .diagramme { grid-template-columns: 1fr; }
  .diagramm.breit { grid-column: auto; }
  .leinwand-rund { height: 300px; }
}
.einleitung-klein { color: var(--leise); max-width: 46rem; margin: 0 0 0.5rem; }
.hinweis-sammeln {
  background: var(--flaeche);
  border: 1px dashed var(--linie);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.wettertage {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.wettertag {
  background: var(--hintergrund);
  border: 1px solid var(--linie);
  border-radius: 0.75rem;
  padding: 0.9rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.wettertag-name { font-weight: 600; }
.wettertag-symbol { font-size: 2rem; line-height: 1.3; }
.wettertag-text { color: var(--leise); font-size: 0.8rem; min-height: 2.1em; line-height: 1.05; }
.wettertag-temp { font-variant-numeric: tabular-nums; }
.wettertag-temp b { font-size: 1.15rem; }
.wettertag-temp span { color: var(--leise); }
.wettertag-regen { color: #3c7fc4; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
@media (max-width: 52rem) {
  .wettertage { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); }
}
.kontaktwege { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.knopf.knopf-hell { background: transparent; color: var(--akzent); border: 1.5px solid var(--akzent); }
.knopf.knopf-hell:hover { background: var(--akzent); color: var(--hintergrund); }
.li-icon { vertical-align: -3px; margin-right: 0.25rem; }
.knopf {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--akzent);
  color: var(--hintergrund);
  font-weight: 600;
  text-decoration: none;
}
.knopf:hover { filter: brightness(1.08); }
.kopf nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.seite h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
[hidden] { display: none !important; }
