/* Farben und Grundwerte – hier zentral anpassen */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1f2b;
  --muted: #5b6475;
  --border: #dde1e8;
  --accent: #0b6e4f;
  --accent-hover: #095a41;
  --accent-soft: #e3f2ec;
  --radius: 12px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --surface: #1b2029;
    --text: #e8ebf0;
    --muted: #a2abbb;
    --border: #2c3340;
    --accent: #3fbf8f;
    --accent-hover: #5fd3a6;
    --accent-soft: #1d3a30;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Kopfzeile */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
}
nav a:hover { color: var(--text); }

/* Einleitung */
.hero { padding-top: 56px; padding-bottom: 32px; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0;
}

/* Programm-Kacheln */
main { flex: 1; }
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding-bottom: 64px;
}
.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.tool .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.tool h2 { font-size: 1.15rem; margin: 0 0 8px; }
.tool p { color: var(--muted); margin: 0 0 20px; flex: 1; }

.btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
}
.btn:hover { background: var(--accent-hover); }
@media (prefers-color-scheme: dark) {
  .btn { color: #0d1a14; }
}

.tool.soon { border-style: dashed; background: transparent; }
.tool.soon .icon { background: var(--border); color: var(--muted); }
.badge {
  align-self: flex-start;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Fusszeile */
footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
footer a { color: var(--muted); }

/* Einfache Unterseiten */
.page { padding-top: 48px; padding-bottom: 64px; max-width: 720px; }
.page h1 { margin-top: 0; }
.back { display: inline-block; margin-bottom: 24px; text-decoration: none; }

@media (max-width: 520px) {
  nav a { margin-left: 14px; }
  .hero { padding-top: 40px; padding-bottom: 24px; }
}

/* ---------- Formulare (Anmelden, Registrieren, Projekte) ---------- */
.karte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.formularseite { padding-top: 48px; padding-bottom: 64px; }
.formularseite .karte { max-width: 420px; margin: 0 auto; }
.karte h1 { font-size: 1.5rem; margin: 0 0 12px; }
.karte h2 { font-size: 1.1rem; margin: 0 0 12px; }
.karte p { color: var(--muted); margin: 0 0 16px; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 14px; }
input[type=email], input[type=password], input[type=text], input:not([type]), select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
label.check input { margin-top: 4px; flex: none; }

button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
button.btn:disabled { opacity: 0.6; cursor: wait; }
.karte .btn { margin-bottom: 4px; }
.btn.leise { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.leise:hover { background: var(--bg); }
.btn.gefahr { background: #b42318; color: #fff; }
.btn.gefahr:hover { background: #912018; }
.btn.leise.gefahr { background: transparent; color: #b42318; border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  .btn.leise.gefahr { color: #f97066; }
}
.karte p.klein { font-size: 0.9rem; margin: 12px 0 0; }

.meldung { padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; margin: 0 0 14px; }
.meldung.fehler { background: #fde8e7; color: #8a1c13; }
.meldung.ok { background: var(--accent-soft); color: var(--text); }
@media (prefers-color-scheme: dark) {
  .meldung.fehler { background: #43201d; color: #ffd2cc; }
}
[hidden] { display: none !important; }

/* ---------- Meine Projekte ---------- */
.seite-breit { padding-top: 40px; padding-bottom: 64px; }
.kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.kopf h1 { margin: 0; font-size: 1.8rem; }
.leise { color: var(--muted); margin: 4px 0 0; font-size: 0.92rem; }
.speicher { min-width: 220px; }
.speicher-text { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; }
.balken { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.balken div { height: 100%; width: 0; background: var(--accent); border-radius: 999px; }
.balken div.voll { background: #d92d20; }

.neu { margin-bottom: 24px; }
.reihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.reihe label { flex: 1 1 220px; margin-bottom: 0; }
.reihe .btn { margin-bottom: 0; }
.neu .meldung { margin: 14px 0 0; }

.projektliste { display: grid; gap: 12px; margin-bottom: 32px; }
.projekt {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px;
}
.projekt h3 { margin: 0; font-size: 1.05rem; }
.projekt h3 a { color: var(--text); text-decoration: none; }
.projekt h3 a:hover { color: var(--accent); }
.projekt-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.projekt-knoepfe .btn { padding: 8px 14px; font-size: 0.92rem; }
.leer { color: var(--muted); text-align: center; padding: 32px 0; }

details.konto summary { cursor: pointer; font-weight: 600; }
details.konto[open] summary { margin-bottom: 16px; }
details.konto form .meldung { margin-top: 14px; }

/* Hinweis auf der Hauptseite */
.hero .aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Textseiten (Impressum, Datenschutz) */
.page h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: 6px; }
