/* Die Unterseiten: Rechtstexte, Impressum, 404, Weiterleitung.
 *
 * Sie bauen auf `seite.css` (Token, Schriften, Kopf, Fußzeile) und ergänzen nur, was eine
 * Textseite zusätzlich braucht. Keine eigene Farbwelt, keine eigenen Radien — §1 gilt hier
 * genauso.
 *
 * **Warum sie nicht einfach `style.css` behalten:** Zwei Grundlagen nebeneinander heißt zwei
 * Wahrheiten über `body`, `.wrap` und die Schriften. Die Startseite hätte den Vertrag, die
 * Datenschutzerklärung eine ältere Version davon — und niemandem fiele es auf, weil man beide
 * selten nacheinander ansieht.
 */

.legal-main {
  max-width: 70ch;
  margin-inline: auto;
  padding-block: 56px 80px;
  position: relative;
  z-index: 1;
}

.legal-main h1 {
  font-family: var(--font-titel);
  font-size: clamp(29px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.legal-main h2 {
  font-family: var(--font-titel);
  font-size: 21px;
  font-weight: 600;
  margin: 32px 0 10px;
}

.legal-main p,
.legal-main li { color: var(--ink2); margin: 0 0 14px; }
.legal-main ul, .legal-main ol { padding-left: 22px; }
.legal-main a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-soft); }
.legal-main strong { color: var(--ink); }

/* Die Versionszeile: Sie ist Status, kein Fließtext — deshalb Mono (§2). */
.rechtstext-version {
  font-family: var(--font-status);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}

.rechtstext-version code { font-family: inherit; }

/* Der Gesetzestext selbst kommt aus einer Markdown-Datei und wird als `<pre>` eingesetzt —
   Zeilenumbrüche sind dort bedeutungstragend. `white-space: pre-wrap` behält sie und bricht
   trotzdem am Rand um. */
.legal-main pre {
  font-family: var(--font-status);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink2);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--accent);
  font-family: var(--font-titel);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

/* Kopf der Unterseiten: nur Marke und Sprachwechsel, keine Abschnittsnavigation. */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-titel); font-weight: 700; font-size: 19px; }
.brand-logo { width: 28px; height: 28px; color: var(--accent); }
.lang-switch { display: inline-flex; gap: 8px; font-family: var(--font-status); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.lang-switch a { color: var(--ink3); }
.lang-switch a.is-active { color: var(--accent); }
.lang-switch .sep { color: var(--ink3); opacity: .5; }

/* ---------- Der Kopf der Unterseiten -----------------------------------------------------
 *
 * Er stammt aus der Zeit vor dem Vertrag und trug seine Stile aus `style.css`. Beim Umstellen
 * standen die Knöpfe als Browser-Standard da — grau, eckig, mit Systemschrift. Im Bild gesehen
 * und hier nachgezogen; der Vertrag gilt auch für eine Seite, die selten jemand öffnet.
 */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.brand { color: var(--ink); }
/* Die Marke nimmt die Akzentfarbe über `currentColor` — das alte Inline-Style zeigte noch auf
   `--color-accent` aus der abgelösten Palette und fiel damit auf Weiß zurück. */
.brand-logo { color: var(--accent) !important; }

.lang-switch { margin-left: auto; align-items: center; }

/* Die Modus-Umschaltung: drei Knöpfe in einer Pille, der aktive trägt die Akzentfläche.
   §4: eine Primäraktion pro Ansicht — hier ist keiner davon primär, deshalb alle leise. */
.theme-toggle,
.theme-switch,
.mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-pill);
  background: var(--glass);
}

.theme-toggle button,
.theme-switch button,
.mode-switch button {
  appearance: none;
  border: 0;
  background: none;
  padding: 7px 13px;
  min-height: 36px;
  border-radius: var(--r-pill);
  color: var(--ink2);
  font-family: var(--font-titel);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.theme-toggle button:hover,
.theme-switch button:hover,
.mode-switch button:hover { color: var(--ink); }

.theme-toggle button[aria-pressed="true"],
.theme-switch button[aria-pressed="true"],
.mode-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ——— Häufige Fragen (05.08.2026) ——————————————————————————————————————————————————————
 *
 * `<details>` statt selbstgebautem Aufklapper: Tastaturbedienung, Vorlesbarkeit und der Zustand
 * „offen" kommen vom Browser. Alles Nachgebaute müsste die drei Dinge nachbilden und täte es
 * schlechter — und die Seite soll gerade denen helfen, die ohnehin gerade nicht weiterkommen.
 *
 * Die Kante links greift dieselbe Sprache auf wie die Stufen in der App: eine durchgezogene
 * Linie markiert, was zusammengehört. Sie ist ruhig, weil eine FAQ nichts zu betonen hat.
 */
.faq-eintrag {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  margin: 12px 0;
  background: color-mix(in oklab, var(--bg2) 55%, transparent);
}

.faq-eintrag > summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  /* Die Standardmarkierung des Browsers sitzt je nach Engine woanders; ein eigener Pfeil hält
     die Zeile ruhig. `list-style: none` allein genügt Safari nicht, daher beides. */
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-eintrag > summary::-webkit-details-marker { display: none; }

.faq-eintrag > summary::before {
  content: "›";
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
  color: var(--accent);
  transition: transform 200ms cubic-bezier(.2,.7,.2,1);
}
.faq-eintrag[open] > summary::before { transform: rotate(90deg); }

/* Ruhig-Modus stoppt alles (§6). */
@media (prefers-reduced-motion: reduce) {
  .faq-eintrag > summary::before { transition: none; }
}

.faq-antwort { padding: 0 0 6px 26px; }
.faq-antwort p { margin: 0 0 12px; }
.faq-antwort code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
}

/* Gruppen in der FAQ: ruhig, aber sichtbar. Sie sortieren siebzehn Aufklapper in fünf Blöcke —
 * ohne sie liest die Seite sich wie eine Liste, durch die man scrollen MUSS statt zu springen.
 *
 * Seit 05.08. sind sie selbst auf- und zuklappbar. Zwei Ebenen `<details>`, und deshalb muss die
 * äussere sich zurücknehmen: **keine Fläche, kein Rahmen** — sonst entsteht ein Kasten im Kasten,
 * und die Fragen darin wirken wie Unterpunkte statt wie das, worum es geht. */
.faq-gruppe-block { margin: 30px 0 0; }
.faq-gruppe-block:first-of-type { margin-top: 18px; }

.faq-gruppe {
  cursor: pointer;
  margin: 0 0 8px;
  padding: 4px 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-gruppe::-webkit-details-marker { display: none; }

/* Derselbe Pfeil wie bei den Fragen, nur kleiner: Die Mechanik ist dieselbe, also sieht sie
 * gleich aus — nur leiser, weil eine Gruppe kein Inhalt ist, sondern eine Schublade. */
.faq-gruppe::before {
  content: "›";
  font-size: 1em;
  line-height: 1;
  color: var(--ink3);
  transition: transform 200ms cubic-bezier(.2,.7,.2,1);
}
.faq-gruppe-block[open] > .faq-gruppe::before { transform: rotate(90deg); }

/* Zugeklappte Gruppe: Die Zahl dahinter sagt, was einen erwartet — sonst klappt man auf gut Glück
 * auf. Sie steht in der Schrift der Zahlen, nicht im Fliesstext. */
.faq-gruppe-block:not([open]) > .faq-gruppe::after {
  content: attr(data-anzahl);
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .faq-gruppe::before { transition: none; }
}
