/*
 * Flowbid Hilfe — gemeinsames Stylesheet der Doku-Website.
 * Design-Tokens abgeleitet aus apps/oberflaeche/app/globals.css (eine Quelle der Wahrheit).
 * Reines statisches CSS, kein Framework, kein Build-Schritt.
 */

:root {
  /* Farben (identisch zur App) */
  --gruen: #14804a;
  --gruen-dunkel: #0b5b34;
  --gruen-tint: #e7f4ec;
  --bg: #f4faf6;
  --weiss: #ffffff;
  --rahmen: #dce8e0;
  --text: #10241a;
  --text-muted: #5a6b62;
  --warnung: #b9770e;
  --warnung-flaeche: #fdf6ec;
  --fehler: #b42318;
  --fehler-flaeche: #fdecec;
  --fokus-ring: rgba(20, 128, 74, 0.35);

  /* Typografie: Inter wird in der App selbst gehostet; die Hilfe nutzt den
     System-Font-Stack mit Inter an erster Stelle (kein externer Font-Aufruf). */
  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --h1-groesse: 28px;
  --h1-zeile: 34px;
  --h2-groesse: 20px;
  --h2-zeile: 28px;
  --h3-groesse: 16px;
  --h3-zeile: 24px;
  --text-groesse: 15px;
  --text-zeile: 24px;
  --hilfstext-groesse: 13px;
  --hilfstext-zeile: 20px;

  /* Form, Abstand, Tiefe (8-px-Raster) */
  --radius: 10px;
  --radius-karte: 12px;
  --radius-pille: 999px;
  --abstand-1: 4px;
  --abstand-2: 8px;
  --abstand-3: 12px;
  --abstand-4: 16px;
  --abstand-5: 20px;
  --abstand-6: 24px;
  --abstand-8: 32px;
  --schatten: 0 1px 2px rgba(16, 36, 26, 0.06);

  --inhalt-breite: 880px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--schrift);
  font-size: var(--text-groesse);
  line-height: var(--text-zeile);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1 {
  margin: 0 0 var(--abstand-2);
  font-size: var(--h1-groesse);
  line-height: var(--h1-zeile);
  font-weight: 700;
}

h2 {
  margin: var(--abstand-8) 0 var(--abstand-3);
  font-size: var(--h2-groesse);
  line-height: var(--h2-zeile);
  font-weight: 600;
}

h3 {
  margin: var(--abstand-6) 0 var(--abstand-2);
  font-size: var(--h3-groesse);
  line-height: var(--h3-zeile);
  font-weight: 600;
}

p {
  margin: 0 0 var(--abstand-3);
}

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

a:hover {
  color: var(--gruen-dunkel);
}

::selection {
  background: var(--gruen-tint);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--fokus-ring);
  border-radius: var(--radius);
}

code,
kbd {
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 13px;
  background: var(--gruen-tint);
  color: var(--gruen-dunkel);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ── Kopfleiste ────────────────────────────────────────────────────────── */

.kopf {
  background: var(--weiss);
  border-bottom: 1px solid var(--rahmen);
  position: sticky;
  top: 0;
  z-index: 20;
}

.kopf-innen {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: var(--abstand-3) var(--abstand-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--abstand-4);
}

.kopf-marke {
  display: flex;
  align-items: center;
  gap: var(--abstand-3);
  text-decoration: none;
  color: var(--text);
}

.kopf-marke img {
  display: block;
  height: 28px;
  width: auto;
}

.kopf-marke span {
  font-size: var(--h3-groesse);
  font-weight: 600;
  color: var(--text-muted);
  border-left: 1px solid var(--rahmen);
  padding-left: var(--abstand-3);
}

.kopf-nav {
  display: flex;
  gap: var(--abstand-4);
  font-size: var(--hilfstext-groesse);
}

.kopf-nav a {
  text-decoration: none;
  font-weight: 500;
}

/* ── Inhalt ────────────────────────────────────────────────────────────── */

main {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: var(--abstand-8) var(--abstand-4) 64px;
}

.einleitung {
  color: var(--text-muted);
  font-size: var(--h3-groesse);
  line-height: 26px;
  margin-bottom: var(--abstand-6);
}

.brotkrumen {
  font-size: var(--hilfstext-groesse);
  line-height: var(--hilfstext-zeile);
  color: var(--text-muted);
  margin-bottom: var(--abstand-4);
}

.brotkrumen a {
  text-decoration: none;
}

/* Kapitel-Kacheln auf der Startseite */

.kapitel-raster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--abstand-4);
  margin-top: var(--abstand-5);
}

.kapitel-karte {
  display: block;
  background: var(--weiss);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-karte);
  box-shadow: var(--schatten);
  padding: var(--abstand-5);
  text-decoration: none;
  color: var(--text);
  transition: background 120ms ease, border-color 120ms ease;
}

.kapitel-karte:hover {
  background: var(--gruen-tint);
  border-color: var(--gruen);
  color: var(--text);
}

.kapitel-karte .nummer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pille);
  background: var(--gruen-tint);
  color: var(--gruen-dunkel);
  font-weight: 600;
  font-size: var(--hilfstext-groesse);
  margin-bottom: var(--abstand-2);
}

.kapitel-karte h2 {
  margin: 0 0 var(--abstand-1);
  font-size: var(--h3-groesse);
  line-height: var(--h3-zeile);
}

.kapitel-karte p {
  margin: 0;
  font-size: var(--hilfstext-groesse);
  line-height: var(--hilfstext-zeile);
  color: var(--text-muted);
}

/* ── Schritt-für-Schritt-Anleitung ─────────────────────────────────────── */

ol.schritte {
  list-style: none;
  counter-reset: schritt;
  margin: var(--abstand-4) 0;
  padding: 0;
}

ol.schritte > li {
  counter-increment: schritt;
  position: relative;
  padding: 0 0 var(--abstand-5) 52px;
  border-left: 2px solid var(--gruen-tint);
  margin-left: 17px;
}

ol.schritte > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

ol.schritte > li::before {
  content: counter(schritt);
  position: absolute;
  left: -19px;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pille);
  background: var(--gruen);
  color: var(--weiss);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol.schritte > li > strong:first-child {
  display: block;
  margin-bottom: var(--abstand-1);
  font-size: var(--h3-groesse);
  line-height: var(--h3-zeile);
}

/* Normale Listen im Fließtext */

main ul {
  margin: 0 0 var(--abstand-3);
  padding-left: 22px;
}

main ul li {
  margin-bottom: var(--abstand-1);
}

/* ── Screenshots ───────────────────────────────────────────────────────── */

figure.bild {
  margin: var(--abstand-3) 0 var(--abstand-4);
  background: var(--weiss);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-karte);
  box-shadow: var(--schatten);
  padding: var(--abstand-2);
}

figure.bild img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

figure.bild figcaption {
  padding: var(--abstand-2) var(--abstand-2) var(--abstand-1);
  font-size: var(--hilfstext-groesse);
  line-height: var(--hilfstext-zeile);
  color: var(--text-muted);
}

/* ── Hinweiskästen ─────────────────────────────────────────────────────── */

.tipp,
.stolperstein {
  border-radius: var(--radius);
  padding: var(--abstand-3) var(--abstand-4);
  margin: 0 0 var(--abstand-3);
}

.tipp {
  background: var(--gruen-tint);
  color: var(--gruen-dunkel);
}

.stolperstein {
  background: var(--warnung-flaeche);
  color: var(--warnung);
}

.tipp strong,
.stolperstein strong {
  display: block;
  margin-bottom: 2px;
}

/* ── Tabellen (z. B. Status-Übersicht, Platzhalter) ────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--weiss);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 var(--abstand-4);
  font-size: var(--text-groesse);
  line-height: var(--text-zeile);
}

th {
  text-align: left;
  font-size: var(--hilfstext-groesse);
  line-height: var(--hilfstext-zeile);
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--rahmen);
  background: var(--bg);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rahmen);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

/* ── FAQ (aufklappbare Fragen) ─────────────────────────────────────────── */

details.faq {
  background: var(--weiss);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  margin-bottom: var(--abstand-2);
  padding: 0;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: var(--abstand-3) var(--abstand-4);
  border-radius: var(--radius);
  list-style-position: inside;
}

details.faq summary:hover {
  background: var(--gruen-tint);
}

details.faq[open] summary {
  border-bottom: 1px solid var(--rahmen);
  border-radius: var(--radius) var(--radius) 0 0;
}

details.faq .antwort {
  padding: var(--abstand-3) var(--abstand-4);
}

details.faq .antwort p:last-child {
  margin-bottom: 0;
}

/* ── Blättern (vor/zurück) + Fußzeile ──────────────────────────────────── */

.blaettern {
  display: flex;
  justify-content: space-between;
  gap: var(--abstand-4);
  margin-top: var(--abstand-8);
  padding-top: var(--abstand-5);
  border-top: 1px solid var(--rahmen);
  font-size: var(--text-groesse);
}

.blaettern a {
  text-decoration: none;
  font-weight: 500;
}

.fuss {
  border-top: 1px solid var(--rahmen);
  background: var(--weiss);
}

.fuss-innen {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: var(--abstand-5) var(--abstand-4);
  font-size: var(--hilfstext-groesse);
  line-height: var(--hilfstext-zeile);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: var(--abstand-4);
  flex-wrap: wrap;
}

.fuss a {
  color: var(--text-muted);
}

/* Rechte Fußzeilen-Gruppe: App-Link + Impressum + Datenschutz nebeneinander. */
.fuss-links {
  display: flex;
  gap: var(--abstand-4);
  flex-wrap: wrap;
}

/* ── Responsiv ─────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .kapitel-raster {
    grid-template-columns: 1fr;
  }

  main {
    padding: var(--abstand-5) var(--abstand-4) 48px;
  }

  .kopf-innen {
    flex-wrap: wrap;
    gap: var(--abstand-2);
  }

  ol.schritte > li {
    padding-left: 44px;
  }
}
