/* Onkel Immo: Rechtsseiten (Impressum, Datenschutz, AGB, Widerruf, Datenquellen).
   Baut auf stil.css auf und nutzt dessen Farben, Schriften und Radien. Nur Lesetypografie für lange Texte,
   keine Effekte, kein JavaScript. Eigene Klassen beginnen mit .recht, damit nichts mit der Startseite kollidiert. */

.recht { padding: 40px 0 24px; }
.recht-rahmen { max-width: calc(760px + 2 * var(--rand)); }
.recht-text { font-size: 15px; line-height: 1.7; letter-spacing: -.1px; overflow-wrap: break-word; hyphens: auto; }

.recht-text h1 { margin: 0 0 16px; font-family: var(--titel); font-weight: var(--titel-gewicht); font-size: clamp(34px, 6vw, 48px); line-height: 1.06; letter-spacing: -.04em; }
.recht-text h2 { margin: 44px 0 12px; font-size: 24px; scroll-margin-top: 24px; }
html .recht-text h2 { line-height: 1.25; }
html .recht-text h3 { margin: 28px 0 8px; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -.1px; scroll-margin-top: 24px; }
.recht-text h1 + p { color: var(--neben); }

.recht-text p { margin: 0 0 14px; }
.recht-text strong { font-weight: 600; }
.recht-text a { text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .35); text-underline-offset: 3px; transition: text-decoration-color .15s var(--kurve-schnell); }
.recht-text a:hover, .recht-text a:focus-visible { text-decoration-color: var(--tinte); }
.recht-text code { padding: 1px 6px; border-radius: 6px; background: var(--flaeche); font: 400 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

.recht-text ul, .recht-text ol { margin: 0 0 16px; padding-left: 22px; list-style: disc; }
.recht-text ol { list-style: decimal; }
.recht-text li { margin: 0 0 8px; padding-left: 4px; }
.recht-text li::marker { color: var(--leise); }

/* Anschriften und mehrzeilige Angaben */
.recht-text .zeilen { padding: 16px 20px; border-radius: 16px; background: var(--flaeche); }

/* Tabellen: auf schmalen Bildschirmen innerhalb des Rahmens scrollbar, nie die ganze Seite */
.recht-tabelle { margin: 0 0 20px; overflow-x: auto; border-radius: 16px; background: var(--flaeche); }
.recht-tabelle table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.recht-tabelle th, .recht-tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.recht-tabelle thead th { font-weight: 600; }
.recht-tabelle tbody tr:last-child td { border-bottom: 0; }

/* Platzhalter, die vor dem Livegang ersetzt werden */
.recht-text mark.platzhalter { padding: 1px 6px; border-radius: 6px; background: #ffe7a8; color: #000; }

/* Weitere Rechtsseiten unter dem Text */
.recht-weiter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.recht-weiter a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--flaeche);
  font-size: 14px; line-height: 20px; letter-spacing: -.13px; transition: background-color .15s var(--kurve-schnell);
}
.recht-weiter a:hover, .recht-weiter a:focus-visible { background: var(--flaeche-tief); }
.recht-weiter a[aria-current="page"] { background: var(--tinte); color: var(--grund); }

/* Ohne mitlaufende Leiste braucht die Fußzeile unten weniger Luft. */
.rechtsseite .fuss { padding-bottom: 64px; }
.fuss-spalte a[aria-current="page"] { font-weight: 600; }

@media (max-width: 520px) {
  .recht { padding: 24px 0 16px; }
  .recht-text h2 { margin-top: 36px; font-size: 22px; }
  .recht-text .zeilen { padding: 14px 16px; }
  /* Tabellen als gestapelte Karten: jede Zeile ein Block, die Spaltenüberschrift steht vor dem Wert */
  .recht-tabelle { overflow: visible; }
  .recht-tabelle thead { display: none; }
  .recht-tabelle table, .recht-tabelle tbody, .recht-tabelle tr, .recht-tabelle td { display: block; width: 100%; }
  .recht-tabelle tr { padding: 10px 14px; border-bottom: 1px solid var(--linie); }
  .recht-tabelle tbody tr:last-child { border-bottom: 0; }
  .recht-tabelle td { padding: 2px 0; border: 0; }
  .recht-tabelle td::before { content: attr(data-label); display: block; color: var(--neben); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
}

@media print {
  .kopf, .fuss, .recht-weiter, .linie { display: none; }
  .recht { padding: 0; }
  .recht-text a { color: inherit; }
}
