/* ============================================================
   GROW-RECHNER – gemeinsames Design für alle Seiten
   Änderst du hier etwas, ändert es sich auf der ganzen Website.
   ============================================================ */

/* ---------- Farben an einer Stelle definiert (hell + dunkel) ---------- */
:root {
  --bg: #f3f6f1;
  --card: #ffffff;
  --text: #1c2a1e;
  --muted: #5c6b5f;
  --accent: #2e8b47;
  --border: #d8e1d6;
  --low: #3b7dd8;   /* zu niedrig / Wachstum = blau  */
  --ok: #22a04b;    /* ideal                  = grün */
  --high: #d9682a;  /* zu hoch / Blüte        = orange */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101712;
    --card: #18221b;
    --text: #e4eee6;
    --muted: #9aae9e;
    --accent: #4cc46a;
    --border: #2a392e;
  }
}

* { box-sizing: border-box; }

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

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

/* ---------- Kopfbereich ---------- */
header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
header .logo { font-weight: 700; color: var(--accent); letter-spacing: .02em; text-decoration: none; }
h1 { margin: .4rem 0 .3rem; font-size: clamp(1.6rem, 5vw, 2.2rem); }
header p { margin: 0 auto; max-width: 560px; color: var(--muted); }

main { max-width: 760px; margin: 0 auto; padding: 0 1rem 3rem; }

/* ---------- Karten (weiße Boxen) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  margin-top: 1.2rem;
}
.card h2 { margin-top: 0; font-size: 1.2rem; }

/* ---------- Eingabefelder ---------- */
.eingaben {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: .65rem .75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---------- Ankreuzfelder (Checkboxen) ---------- */
.optionen { display: grid; gap: .6rem; }
.optionen label { display: flex; align-items: center; gap: .6rem; font-weight: 500; margin: 0; cursor: pointer; }
.optionen input[type="checkbox"] { width: 1.2rem; height: 1.2rem; padding: 0; accent-color: var(--accent); flex-shrink: 0; }

/* ---------- Knöpfe ---------- */
button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: .55rem .9rem;
}
button:hover { border-color: var(--accent); }
button.primaer { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ---------- Ergebnis-Box ---------- */
.ergebnis { text-align: center; }
.vpd-wert, .gross-wert { font-size: 3rem; font-weight: 800; margin: .2rem 0; line-height: 1.2; }
.vpd-wert span, .gross-wert span { font-size: 1.2rem; font-weight: 600; color: var(--muted); }
.status {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}
.status.low  { background: var(--low); }
.status.ok   { background: var(--ok); }
.status.high { background: var(--high); }
.tipp { margin: 1rem auto 0; max-width: 520px; }
.ideal { margin-top: .6rem; color: var(--muted); }

/* Kleine Kennzahlen nebeneinander */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
  margin-top: 1.2rem;
}
.kennzahl { background: var(--bg); border-radius: 10px; padding: .8rem; }
.kennzahl b { display: block; font-size: 1.3rem; }
.kennzahl small { color: var(--muted); }

/* ---------- VPD-Tabelle ---------- */
.tabelle-wrapper { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; text-align: center; }
th, td { padding: .45rem .3rem; border: 1px solid var(--card); }
th { color: var(--muted); font-weight: 600; }
td { color: #fff; font-weight: 600; }
td.low  { background: var(--low); }
td.ok   { background: var(--ok); }
td.high { background: var(--high); }
td.aktuell { outline: 3px solid var(--text); outline-offset: -3px; }
.legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; margin-top: .8rem; color: var(--muted); }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- Geräteliste (Stromkosten-Rechner) ---------- */
.geraet {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr auto;
  gap: .5rem;
  align-items: end;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.geraet label { font-size: .8rem; }
.geraet .entfernen { padding: .6rem .75rem; }
/* Auf dem Handy: Name + ✕ oben, Watt + Laufzeit darunter */
@media (max-width: 560px) {
  .geraet {
    grid-template-columns: 1fr 1fr auto;
    grid-template-areas: "name name x" "watt modus modus";
  }
  .geraet > :nth-child(1) { grid-area: name; }
  .geraet > :nth-child(2) { grid-area: watt; }
  .geraet > :nth-child(3) { grid-area: modus; }
  .geraet > :nth-child(4) { grid-area: x; }
}

/* ---------- Düngerliste (Dünger-Rechner) ---------- */
.produkt {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: .5rem;
  align-items: end;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.produkt label { font-size: .8rem; }
.produkt .entfernen { padding: .6rem .75rem; }

/* ---------- Balken für die Kostenaufteilung ---------- */
.balken-zeile { margin: .7rem 0; }
.balken-kopf { display: flex; justify-content: space-between; font-size: .9rem; gap: .5rem; }
.balken { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: .25rem; }
.balken div { height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Zeitplan (Erntezeit-Rechner) ---------- */
.schritt {
  border-left: 3px solid var(--border);
  padding: .3rem 0 .9rem 1rem;
  position: relative;
}
.schritt::before {               /* der Punkt auf der Zeitleiste */
  content: "";
  position: absolute; left: -8px; top: .55rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--border);
}
.schritt.erledigt { border-left-color: var(--accent); }
.schritt.erledigt::before { background: var(--accent); border-color: var(--accent); }
.schritt.aktuell::before { border-color: var(--accent); }
.schritt-kopf { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.schritt-kopf span { color: var(--muted); font-size: .9rem; }
.schritt-info { color: var(--muted); font-size: .9rem; }
.schritt-jetzt { color: var(--accent); font-weight: 700; font-size: .85rem; margin-top: .2rem; }

/* ---------- Produktempfehlungen (Affiliate) ---------- */
.anzeige-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.anzeige-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: .1rem .45rem;
}
.empfehlungen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .8rem;
}
.empfehlung {
  display: flex; flex-direction: column; gap: .3rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: .9rem; color: var(--text); text-decoration: none;
}
.empfehlung:hover { border-color: var(--accent); }
.empfehlung span { font-size: .88rem; color: var(--muted); flex: 1; }
.empfehlung em { font-style: normal; font-weight: 600; color: var(--accent); font-size: .9rem; }
.werbehinweis { font-size: .78rem; color: var(--muted); margin-bottom: 0; }

/* ---------- Startseite: Rechner-Kacheln ---------- */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.kachel {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.kachel:hover { border-color: var(--accent); transform: translateY(-2px); }
.kachel .symbol { font-size: 2rem; }
.kachel h2 { margin: .4rem 0 .3rem; font-size: 1.15rem; }
.kachel p { margin: 0; color: var(--muted); font-size: .92rem; }
.kachel.bald { opacity: .55; pointer-events: none; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 1rem 2rem; }

/* ---------- Passende Rechner (Kacheln innerhalb einer Karte) ---------- */
.kachel h3 { margin: .4rem 0 .3rem; font-size: 1.05rem; }
.passende .kachel { background: var(--bg); padding: 1rem; }
.passende .kachel .symbol { font-size: 1.6rem; }

/* ---------- Ergebnis teilen ---------- */
.teilen-leiste { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; }
.teilen-knopf { font-weight: 600; }
.teilen-info { color: var(--accent); font-size: .9rem; font-weight: 600; }

/* ---------- Häufige Fragen (aufklappbar) ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }

/* ---------- Sprachumschalter / language switch ---------- */
.sprache { max-width: 760px; margin: 0 auto; text-align: right; font-size: .85rem; padding: .6rem 1rem 0; }
.sprache a { text-decoration: none; font-weight: 600; }
.einheiten { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; font-size: .9rem; margin-bottom: .4rem; }
.einheiten select { width: auto; padding: .35rem .5rem; font-size: .9rem; }

/* ============================================================
   DESIGN 2.0 – frischerer Look (überschreibt Teile von oben)
   ============================================================ */
:root {
  --band1: #2f9a4f;            /* Farbverlauf im Kopfbereich */
  --band2: #1f6b37;
  --schatten: 0 1px 2px rgba(20, 50, 28, .05), 0 8px 24px rgba(20, 50, 28, .07);
  --ok-hell: #e7f6ec; --low-hell: #e8f0fb; --high-hell: #fbefe6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --band1: #1f5f34; --band2: #143f23;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --ok-hell: #17301f; --low-hell: #172434; --high-hell: #33231a;
  }
}

/* Grüner Kopfbereich */
.sprache {
  max-width: none; background: var(--band1); color: #fff;
  display: flex; justify-content: flex-end; align-items: center; gap: .6rem; padding: .6rem 1rem 0;
}
.sprache a { color: #fff; opacity: .9; }
header {
  background: linear-gradient(180deg, var(--band1), var(--band2));
  color: #fff; padding: 1.6rem 1rem 3.6rem;
}
header .logo { color: #d6f2dc; }
header h1 { color: #fff; }
header p { color: rgba(255, 255, 255, .85); }
main { margin-top: -2.4rem; position: relative; }
main > .card:first-child, main > .kacheln:first-child { margin-top: 0; }

/* Karten */
.card, .kachel { border: none; border-radius: 18px; box-shadow: var(--schatten); }
.card { padding: 1.5rem; }
.kachel:hover { box-shadow: 0 2px 4px rgba(20, 50, 28, .06), 0 14px 32px rgba(20, 50, 28, .12); }
.passende .kachel, .kennzahl { box-shadow: none; }

/* Eingaben */
input, select { border-radius: 12px; padding: .7rem .8rem; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.versteckt { display: none !important; }

/* Tipp-Knöpfe (Segmente) */
.segment { display: flex; flex-wrap: wrap; gap: .3rem; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: .25rem; }
.segment button { flex: 1 1 auto; border: none; background: transparent; border-radius: 9px; padding: .5rem .6rem; font-size: .9rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.segment button.aktiv { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segment button:hover { color: var(--text); }

/* Schieberegler */
.regler { width: 100%; padding: 0; margin: .55rem 0 0; border: none; background: none; accent-color: var(--accent); height: 1.4rem; box-shadow: none !important; }

/* Ergebnis-Karte färbt sich nach Status */
.card.ergebnis { transition: background-color .3s; }
.card.ergebnis[data-zustand="ok"]   { background: var(--ok-hell); }
.card.ergebnis[data-zustand="low"]  { background: var(--low-hell); }
.card.ergebnis[data-zustand="high"] { background: var(--high-hell); }
.card.ergebnis[data-zustand] .kennzahl { background: var(--card); }
.vpd-wert, .gross-wert { letter-spacing: -.02em; }
.status { padding: .4rem 1rem; font-size: .95rem; }

/* Knöpfe */
.teilen-knopf { background: var(--accent); color: #fff; border-color: var(--accent); padding: .6rem 1.1rem; }
.teilen-knopf:hover { filter: brightness(1.08); }
.merken-leiste { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: center; margin-top: .9rem; font-size: .85rem; color: var(--muted); }
.merken { display: flex; align-items: center; gap: .45rem; font-weight: 500; margin: 0; cursor: pointer; }
.merken input { width: 1.05rem; height: 1.05rem; padding: 0; accent-color: var(--accent); }
.zuruecksetzen { background: none; border: none; color: var(--muted); padding: .2rem .4rem; font-size: .85rem; text-decoration: underline; }
.installieren { margin-right: auto; background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid rgba(255, 255, 255, .35); padding: .3rem .7rem; font-size: .85rem; font-weight: 600; }

/* ---------- Startseite: Suche & Kategorien ---------- */
.filter-leiste { background: var(--card); border-radius: 18px; box-shadow: var(--schatten); padding: 1rem; }
.filter-suche { margin-bottom: .7rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chips button { border-radius: 999px; padding: .4rem .85rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.filter-chips button.aktiv { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-leer { margin: .8rem 0 0; color: var(--muted); }
.kachel[hidden] { display: none !important; }
/* Hervorgehobene Kacheln (Mein Grow, Diagnose) */
.kachel.highlight { background: linear-gradient(135deg, var(--ok-hell), var(--card)); border: 2px solid var(--accent); }
textarea { font: inherit; resize: vertical; }
