/* ADHS-KVT-Selbsthilfe — minimale, responsive Basisgestaltung.
   Warm-sachlich, geringe kognitive Last, klare Struktur. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2b2620;
  --muted: #6b625a;
  --accent: #8a5a2b;
  --accent-strong: #6e451f;
  --danger-bg: #fdeaea;
  --danger-border: #c0392b;
  --line: #e4ddd3;
}

* { 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.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.krise-link {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-border) !important;
  font-weight: 600;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
}

.card-narrow { max-width: 420px; margin: 0 auto; }

h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.25rem; margin-top: 1.5rem; }

.hinweis {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #fdf6e7;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.notruf {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
}

.notruf h2 { margin-top: 0; }

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

label { font-weight: 600; }

input[type="password"] {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: var(--accent-strong); }

.error {
  color: var(--danger-border);
  font-weight: 600;
}

.krise-zurueck { margin-top: 1.5rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.75rem 1rem;
}

.site-footer p { margin: 0; }

/* --- Onboarding (M2) --- */

.steps ol {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.9rem;
}

.steps .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #eee8df;
  color: var(--muted);
  font-weight: 700;
}

.steps .step-active {
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

.steps .step-active .step-num { background: var(--accent); color: #fff; }

.steps .step-done {
  color: var(--text);
}

.steps .step-done .step-num {
  background: #3f7d4e;
  color: #fff;
}

.hinweis-redflag {
  background: var(--danger-bg);
  border-left: 4px solid var(--danger-border);
}

.frage {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  background: #fdfbf7;
}

.frage legend {
  font-weight: 600;
  padding: 0 0.4rem;
}

.frage-hilfe {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
}

.skala {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.skala-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  min-width: 3.4rem;
  font-weight: 400;
}

.skala-option:hover { border-color: var(--accent); }

.skala-option input { margin: 0; accent-color: var(--accent); }

.skala-wert { font-weight: 700; }

.skala-text { font-size: 0.78rem; color: var(--muted); text-align: center; }

.form-feld { display: flex; flex-direction: column; gap: 0.3rem; }

input[type="text"], input[type="password"] {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover { background: var(--accent-strong); color: #fff; }

.card-cta { border-left: 4px solid var(--accent); }

.datenschutz-liste li { margin: 0.4rem 0; }

/* --- Screening & Verlauf (M3) --- */

.frage-redflag {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.muted { color: var(--muted); }

.verlauf-tabelle {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.verlauf-tabelle th, .verlauf-tabelle td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.bar {
  width: 100%;
  max-width: 220px;
  height: 0.85rem;
  background: #eee8df;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

/* --- Bausteine (M4, geführte Sequenz) --- */

.baustein-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.baustein-nav-titel { font-weight: 600; color: var(--text); }

.baustein-inhalt h1 { font-size: 1.6rem; }
.baustein-inhalt h2 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}
.baustein-inhalt h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.baustein-inhalt ul, .baustein-inhalt ol { padding-left: 1.25rem; }
.baustein-inhalt li { margin: 0.35rem 0; }
.baustein-inhalt blockquote {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  background: #fdf6e7;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
}
.baustein-inhalt table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}
.baustein-inhalt th, .baustein-inhalt td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: top;
}

.baustein-abschluss {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.erledigt {
  color: #3f7d4e;
  font-weight: 700;
}

.baustein-weiter {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button-link-ghost {
  background: var(--surface);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.button-link-ghost:hover {
  background: #f5efe7;
  color: var(--accent-strong);
}

.baustein-liste {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.baustein-liste li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0.6rem 0;
  background: #fdfbf7;
}

.baustein-liste li.abgeschlossen { border-left: 4px solid #3f7d4e; }
.baustein-liste li.offen { border-left: 4px solid var(--accent); }
.baustein-liste li.gesperrt { border-left: 4px solid var(--muted); opacity: 0.8; }

.baustein-liste-kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.baustein-liste-kopf a { font-weight: 700; }

.gesperrt-titel { font-weight: 700; color: var(--muted); }

.baustein-liste-kurz { margin: 0.3rem 0 0; font-size: 0.9rem; }

/* --- Release-Härtung (M5): Wiedereinstieg, Erinnerung, Datenrechte --- */

.reminder {
  border-left: 4px solid #6b9c7d;
  background: #f3f8f4;
}

.reminder p { margin: 0; }

.resume-button {
  background: #3f7d4e;
}

.resume-button:hover { background: #33683f; color: #fff; }

/* --- V2: Symptomgeleitete Empfehlung + Deeskalation --- */

.empfehlung {
  border-left: 4px solid #6b9c7d;
  background: #f3f8f4;
}

.deeskalation {
  background: #f3f8f4;
  border-left: 4px solid #3f7d4e;
}

.reminder-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(43, 38, 32, 0.14);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  z-index: 50;
}

.reminder-banner span { flex: 1; min-width: 12rem; }

.reminder-banner button {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.reminder-banner .reminder-dismiss {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.reminder-banner .reminder-dismiss:hover { background: #f5efe7; }

.card-gefahr { border-left: 4px solid var(--danger-border); }

.button-link-gefahr,
button.button-gefahr {
  background: var(--danger-border);
}

.button-link-gefahr:hover,
button.button-gefahr:hover {
  background: #a93226;
  color: #fff;
}

.checkbox-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 600;
  margin-top: 0.5rem;
}

.checkbox-label input { margin-top: 0.2rem; accent-color: var(--danger-border); }
