/* Die Rechtstexte (R1, 09.11.2026): Impressum, Datenschutz, AGB und Preisbedingungen, Auftragsverarbeitung.
   Baut auf startseite.css auf, das davor geladen wird (app/templates/rechtstexte/rahmen.html): Kopf, Fuß, Schrift,
   Fläche und Farbrollen kommen von dort, damit Kopf und Fuß genau die der Startseite sind. Hier steht nur, was der
   Langtext braucht - Satzbreite um 65 Zeichen (37rem bei 18 px), Abstände, Inhaltsverzeichnis, der Hinweis „Muster“, Platzhalter und
   Vorschlag. Immer hell, auch bei dunkel gestelltem Gerät (Vorgabe 10.11.2026). */

:root {
  --luecke-grund: #FFF1C2;
  --luecke-text: #5C4300;
  --luecke-rand: #B8922E;
  --hinweis-grund: #E9EEF7;
  --hinweis-rand: #2D4372;
  --vorschlag-grund: #F4EFE3;
  --vorschlag-rand: #8C6A1F;
  --satzbreite: 37rem;
}

/* Die Seite füllt mindestens das sichtbare Fenster (svh: mit eingeblendeten Leisten), der Fuß steht unten. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.recht { flex: 1 0 auto; }
.recht-raster { padding-block: 24px 64px; }
@media (min-width: 1040px) {
  .recht-raster { padding-block: 40px 96px; }
  .recht-raster.mit-leiste { display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 64px; align-items: start; }
}

/* Inhaltsverzeichnis: am Rechner als Leiste links, die mitläuft; schmaler als 1040 px als Klappe unter dem Titel. */
.recht-leiste { display: none; }
@media (min-width: 1040px) {
  .recht-leiste {
    display: block; position: sticky; top: 24px; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px);
    overflow-y: auto; padding-right: 4px;
  }
  .recht-klappe { display: none; }
}
.recht-leiste-titel { margin-bottom: 8px; font-size: 1rem; font-weight: 800; color: var(--titel); }
.recht-leiste a {
  display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--linie);
  font-size: 1rem; line-height: 1.35; color: var(--text); text-decoration: none;
}
.recht-leiste a:hover { border-left-color: var(--titel); color: var(--titel); text-decoration: underline; text-decoration-thickness: 1px; }
/* Der Fokusring nach innen: die Leiste rollt (overflow-y), und was über ihren Rand ragt, schneidet sie ab - links
   stand der Ring sonst halb unsichtbar (Gegenlesung R1, Technik 7). */
.recht-leiste a:focus-visible { outline-offset: -3px; }

.recht-text { min-width: 0; max-width: var(--satzbreite); font-size: 1.125rem; line-height: 1.65; }
.recht-text :is(p, li, dd) { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 10 4 4; }
.recht-augenbraue { font-size: 1rem; font-weight: 700; color: var(--leise); }
.recht-text h1 {
  margin-top: 4px; font-size: clamp(1.75rem, calc((100vw - 32px) / 13), 2.5rem); line-height: 1.15;
  overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto;
}
.recht-unterzeile { margin-top: 12px; color: var(--leise); }
.recht-text h2 { margin-top: 2.25em; font-size: 1.375rem; line-height: 1.3; scroll-margin-top: 24px; }
.recht-text h3 { margin-top: 1.5em; font-size: 1.125rem; line-height: 1.35; }
/* Lange Wörter in Überschriften und Begriffen („Verbraucherstreitbeilegung“, „Unterauftragsverarbeiter“) trennen,
   statt die Spalte breiter als das Telefon zu machen: startseite.css setzt Überschriften auf hyphens: manual. Ohne
   Trennmuster bricht das Wort zuletzt irgendwo (Gegenlesung R1, Technik 2: 320 px und 150 % Schrift). */
.recht-text :is(h2, h3), .recht-liste dt { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.recht-text h2 + p, .recht-text h3 + p, .recht-text h3 + ul { margin-top: 0.5em; }
.recht-text p, .recht-text ul, .recht-text dl { margin-top: 0.75em; }
.recht-text ul { padding-left: 1.25em; list-style: disc; }
.recht-text li + li { margin-top: 0.4em; }
.recht-text strong { font-weight: 800; color: var(--titel); }
.recht-text code { font-family: inherit; font-weight: 700; overflow-wrap: anywhere; }

.recht-klappe { margin-top: 20px; border: 1px solid var(--linie); border-radius: var(--radius); padding-inline: 16px; }
.recht-klappe summary {
  display: list-item; padding-block: 10px; cursor: pointer;
  font-size: 1rem; line-height: 1.5; font-weight: 800; color: var(--titel);
}
.recht-klappe ol { padding-bottom: 12px; }
.recht-klappe a { display: block; padding-block: 6px; font-size: 1rem; line-height: 1.35; }

/* Der Hinweis „Muster“ - ruhig, aber vor allem anderen. */
.muster-hinweis {
  margin-bottom: 28px; padding: 16px 20px; border-left: 4px solid var(--hinweis-rand);
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--hinweis-grund); font-size: 1rem; line-height: 1.5;
}
.muster-hinweis p + p { margin-top: 6px; }
.muster-titel { font-weight: 800; color: var(--titel); }

/* Ein Platzhalter: was der Betreiber noch liefern muss. Auch ohne Farbe an den spitzen Zeichen ‹ › zu erkennen. */
.luecke {
  padding: 0 0.2em; border-bottom: 1px dashed var(--luecke-rand); border-radius: 3px;
  background: var(--luecke-grund); color: var(--luecke-text);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Ein Abschnitt, der erst nach Freigabe gilt (AGB, Prüfung und Verantwortung). */
.vorschlag {
  margin-top: 0.75em; padding: 4px 20px 18px; border: 2px dashed var(--vorschlag-rand); border-radius: var(--radius);
  background: var(--vorschlag-grund);
}
.vorschlag-marke { font-size: 1rem; font-weight: 800; color: var(--titel); }

/* Paare aus Name und Beschreibung (Speicher im Browser, Empfänger, Unterauftragsverarbeiter). */
.recht-liste > div { padding-block: 12px; border-top: 1px solid var(--linie); }
.recht-liste > div:last-child { border-bottom: 1px solid var(--linie); }
.recht-liste dt { font-weight: 800; color: var(--titel); }
.recht-liste dd { margin: 4px 0 0; }

.fuss-links a[aria-current="page"] { color: var(--titel); text-decoration-color: currentColor; }
