/* ==========================================================================
   Nahweb v3 · Rechtsseiten: agb.html, datenschutz.html, impressum.html
   Ergänzt style.css (Kopf, Fuss, Leiste, Farben, Schriften kommen von dort;
   style.css bleibt unverändert). Ruhiges Lese-Layout: Papier, eine weisse
   Karte mit dem Text, daneben (Desktop) bzw. darüber (Handy) das Inhaltsverzeichnis.
   Kontraste: Tinte auf Weiss 17.6:1, Tinte weich auf Weiss 7.8:1,
   Tinte auf Orange 5.2:1, Tinte auf Orange zart 15.0:1, Tinte auf Band 14.3:1.
   ========================================================================== */

.recht { padding: 14px 0 var(--abstand); }
.recht-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* --------------------------------------------------------------------------
   Seitenkopf: Stand, Titel, Einleitung
   -------------------------------------------------------------------------- */
.recht-kopf { padding-top: 4px; min-width: 0; }
.recht-titel {
  margin-top: 10px;
  font-family: var(--titel);
  font-weight: 750;
  font-size: clamp(29px, 8.4vw, 36px);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
  hyphens: manual;
}
.recht-titel .zeile { display: block; }
.recht-titel .marker { padding: 0 .12em; margin-inline: -.12em; border-radius: 6px; font-weight: inherit; }
.recht-lead { margin-top: 12px; font-size: 18px; line-height: 1.5; max-width: 36em; text-wrap: pretty; }
.recht-lead a, .zusage a { font-weight: 650; }

/* «Für die Vorschau gelten sie nicht»: zarte orange Fläche mit Haken */
.zusage {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px;
  max-width: 36em;
  padding: 10px 13px;
  border-radius: var(--radius-klein);
  background: var(--orange-zart);
  font-size: 16px; line-height: 1.42; font-weight: 600;
}
.zusage-haken {
  flex: none;
  display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 0;
  color: var(--orange-tief);
}
.zusage-haken svg { width: 14px; height: 14px; }

/* Datenschutz: das Wichtigste in vier Sätzen, als orange Fläche wie die Faktenzeile der Startseite */
.kurz {
  margin-top: 14px;
  max-width: 40em;
  padding: 12px 14px 13px;
  border-radius: var(--radius-klein);
  background: var(--orange);
  color: var(--tinte);
}
.kurz-titel { font-family: var(--titel); font-weight: 750; font-size: 18px; line-height: 1.2; }
.kurz-liste { display: grid; gap: 6px; margin-top: 8px; font-size: 16px; line-height: 1.42; }
.kurz-liste li { position: relative; padding-left: 15px; }
.kurz-liste li::before {
  content: ""; position: absolute; left: 1px; top: .6em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--tinte);
}
.kurz-liste strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   Inhaltsverzeichnis: am Handy aufklappbar, am Desktop fest daneben
   -------------------------------------------------------------------------- */
.verzeichnis {
  min-width: 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  background: var(--papier-tief);
}
.verzeichnis summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 4px 10px 4px 14px;
  font-weight: 650; font-size: 16px;
  cursor: pointer; list-style: none;
}
.verzeichnis summary::-webkit-details-marker { display: none; }
.verzeichnis-zahl { font-weight: 400; color: var(--tinte-weich); }
.verzeichnis summary::after {
  content: "";
  flex: none;
  width: 30px; height: 30px; margin-left: auto;
  /* schlichtes Plus und Minus ohne Kreis, wie bei den Fragen der Startseite */
  background: no-repeat center / 16px 16px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%2317181B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.verzeichnis details[open] > summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h12' stroke='%2317181B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.verzeichnis-liste { padding: 0 8px 8px; }
.verzeichnis-liste a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 8px;
  min-height: 44px; padding: 4px 6px;
  border-radius: 8px;
  font-size: 15.5px; line-height: 1.3;
  text-decoration: none;
}
.verzeichnis-liste a:hover { background: var(--papier); }
.verzeichnis-nr {
  display: grid; place-items: center;
  height: 24px; border-radius: 7px;
  background: var(--karte);
  font-family: var(--titel); font-weight: 750; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Die Karte mit dem Text
   -------------------------------------------------------------------------- */
.recht-karte {
  min-width: 0;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 2px 16px 6px;
}
.abschnitt { padding: 18px 0 20px; }
.abschnitt + .abschnitt { border-top: 1px solid var(--linie); }
.abschnitt-titel {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--titel);
  font-weight: 750;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.abschnitt-titel .nr {
  flex: none;
  display: grid; place-items: center;
  min-width: 30px; height: 30px; margin-top: -2px; padding: 0 6px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--tinte);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.abschnitt-vorspann {
  margin-bottom: 4px;
  font-size: 15px; font-weight: 650; line-height: 1.3;
  color: var(--tinte-weich);
}
.abschnitt-text { display: grid; gap: 10px; margin-top: 10px; font-size: 17px; line-height: 1.55; }
.abschnitt-text a { font-weight: 600; text-decoration-thickness: 1px; }
.abschnitt-text address { font-style: normal; }
.fest { font-weight: 700; }

/* AGB-Ziffern: Nummer links, Text rechts (Markup bleibt für das Word-Skript) */
.ziffer { display: grid; grid-template-columns: 2.5em minmax(0, 1fr); column-gap: 8px; }
.ziffer-nr { font-weight: 650; color: var(--tinte-weich); font-variant-numeric: tabular-nums; }

/* Listen in der Datenschutzerklärung */
.recht-liste { display: grid; gap: 8px; }
.recht-liste li { position: relative; padding-left: 18px; }
.recht-liste li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange-tief);
}
.recht-liste .liste-kopf { font-weight: 700; }

/* Impressum: die Angaben als Tabelle */
.angaben { display: grid; gap: 12px; margin-top: 12px; }
.angaben > div { display: grid; gap: 2px; }
.angaben dt { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--tinte-weich); }
.angaben dd { margin: 0; font-size: 17px; line-height: 1.5; }
.angaben address { font-style: normal; }
.angaben a { font-weight: 600; }
.angaben .ohne-umbruch { white-space: nowrap; }

/* Schluss der AGB: «Unklar ist etwas?» */
.abschnitt-schluss {
  margin: 6px -6px 10px;
  padding: 16px 16px 18px;
  border: 0;
  border-radius: var(--radius-klein);
  background: var(--orange-zart);
}
.abschnitt + .abschnitt-schluss { border-top: 0; }

/* ==========================================================================
   Ab 600 px
   ========================================================================== */
@media (min-width: 600px) {
  .recht { padding-top: 24px; }
  .recht-karte { padding: 6px 28px 12px; }
  .abschnitt { padding: 24px 0 26px; }
  .abschnitt-titel { font-size: 23px; }
  .abschnitt-schluss { margin: 8px -12px 14px; padding: 20px 22px 22px; }
  .angaben > div { grid-template-columns: 170px minmax(0, 1fr); column-gap: 20px; align-items: baseline; }
  .verzeichnis-liste { padding: 0 10px 10px; }
}

/* ==========================================================================
   Ab 960 px: Inhaltsverzeichnis links, fest beim Scrollen; Text rechts
   ========================================================================== */
@media (min-width: 960px) {
  .recht { padding: 44px 0 120px; }
  .recht-raster {
    grid-template-columns: 230px minmax(0, 760px);
    column-gap: 44px;
    row-gap: 32px;
    align-items: start;
  }
  .recht-kopf { grid-column: 2; grid-row: 1; padding-top: 0; }
  .verzeichnis {
    grid-column: 1; grid-row: 2;
    position: sticky; top: 24px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .verzeichnis summary {
    min-height: 0; padding: 4px 8px 10px;
    font-family: var(--titel); font-weight: 750; font-size: 19px;
    cursor: default;
    pointer-events: none;
  }
  .verzeichnis summary::after { display: none; }
  .verzeichnis-zahl { display: none; }
  .verzeichnis-liste { padding: 0; border-left: 2px solid var(--linie); margin-left: 8px; }
  .verzeichnis-liste a { min-height: 38px; padding: 3px 8px 3px 12px; border-radius: 0 8px 8px 0; font-size: 15.5px; }
  .verzeichnis-liste a:hover { background: var(--papier-tief); }
  /* Fokus nach innen, damit das feste Verzeichnis (overflow: auto) den Ring nicht abschneidet */
  .verzeichnis-liste a:focus-visible { outline-offset: -3px; }
  .verzeichnis-nr { background: var(--papier-tief); }

  .recht-karte { grid-column: 2; grid-row: 2; padding: 10px 48px 22px; }
  .recht-titel { font-size: 50px; line-height: 1.03; letter-spacing: -.025em; }
  .recht-lead { margin-top: 18px; font-size: 21px; }
  .zusage { margin-top: 18px; font-size: 17px; padding: 12px 16px; }
  .kurz { margin-top: 20px; padding: 16px 20px 18px; border-radius: var(--radius); }
  .kurz-titel { font-size: 20px; }
  .kurz-liste { font-size: 17px; gap: 7px; }

  .abschnitt { padding: 30px 0 32px; }
  .abschnitt-titel { font-size: 26px; gap: 14px; }
  .abschnitt-titel .nr { min-width: 34px; height: 34px; font-size: 18px; margin-top: -3px; }
  .abschnitt-text { margin-top: 14px; gap: 12px; font-size: 18px; line-height: 1.58; }
  .ziffer { grid-template-columns: 2.7em minmax(0, 1fr); column-gap: 10px; }
  .angaben { gap: 14px; margin-top: 16px; }
  .angaben > div { grid-template-columns: 190px minmax(0, 1fr); }
  .angaben dd { font-size: 18px; }
  .abschnitt-schluss { margin: 10px -20px 18px; padding: 24px 28px 26px; }
}
@media (min-width: 1200px) {
  .recht-raster { grid-template-columns: 260px minmax(0, 800px); column-gap: 64px; }
  .recht-karte { padding: 12px 56px 26px; }
  .recht-titel { font-size: 56px; }
}

/* Drucken: nur der Text, ohne Verzeichnis */
@media print {
  .verzeichnis { display: none !important; }
  .recht-karte { border: 0; box-shadow: none; padding: 0; }
  .kurz, .zusage, .abschnitt-schluss { background: none; border: 1px solid #999; }
}
