/* ---------------------------------------------------------------------------
   Rechtsseiten (Impressum, Datenschutz)

   Eigene Datei, weil index.html sein CSS inline traegt und die Rechtsseiten
   davon nichts brauchen ausser den Farben und den beiden Schriften. Wer die
   Marke aendert, aendert :root in index.html UND diese Datei.
   --------------------------------------------------------------------------- */

:root {
  --linen:       #EAE0D0;
  --linen-2:     #D8CCBA;
  --linen-soft:  #F4EEE4;
  --ink:         #1C1209;
  --ink-2:       #5C4A38;
  --ink-3:       #826D58;
  --sienna:      #7A3E24;
  --sienna-soft: #C4835A;
  --sage-soft:   #DCE4CC;
  --graphite:    #171513;
  --rule:        #C4B49E;

  --fd: 'Young Serif', Georgia, serif;
  --fb: 'Figtree', system-ui, -apple-system, sans-serif;

  --r-sm: 0.25rem;
  --r-md: 0.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--linen-soft);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 47rem; margin: 0 auto; padding: 0 1.5rem; }

/* --- Kopf ---------------------------------------------------------------- */

.legal-head {
  background: var(--linen);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
}
.legal-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-head img { display: block; width: 9.5rem; height: auto; }
.legal-back {
  font-size: .8125rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
  white-space: nowrap;
}
.legal-back:hover { color: var(--sienna); border-bottom-color: var(--sienna-soft); }

/* --- Titel --------------------------------------------------------------- */

.legal-hero { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.legal-kicker {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sienna);
  margin: 0 0 .75rem;
}
.legal-hero h1 {
  font-family: var(--fd);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--ink);
  overflow-wrap: break-word;
  hyphens: auto;
}
.legal-lead { font-size: 1.0625rem; color: var(--ink-2); margin: 0; max-width: 38rem; }

/* --- Inhaltsverzeichnis --------------------------------------------------- */

.toc {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.5rem 1.75rem;
  margin: 0 0 3rem;
}
.toc h2 {
  font-family: var(--fb);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .875rem;
  font-weight: 600;
}
.toc ol { margin: 0; padding: 0 0 0 1.25rem; columns: 2; column-gap: 2rem; }
.toc li { margin: 0 0 .375rem; font-size: .9375rem; break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--sienna); border-bottom-color: var(--sienna-soft); }
@media (max-width: 40rem) { .toc ol { columns: 1; } }

/* --- Abschnitte ---------------------------------------------------------- */

.legal-body { padding-bottom: 4rem; }

section.abschnitt { margin: 0 0 3rem; scroll-margin-top: 5rem; }
section.abschnitt > h2 {
  overflow-wrap: break-word;
  font-family: var(--fd);
  font-weight: 400;
  font-size: clamp(1.375rem, 3.2vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
}
section.abschnitt > h2 .nr {
  display: block;
  font-family: var(--fb);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sienna);
  margin-bottom: .5rem;
}

h3 {
  font-family: var(--fb);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 1.75rem 0 .5rem;
  color: var(--ink);
}

p { margin: 0 0 1rem; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .375rem; }

strong { font-weight: 600; color: var(--ink); }

a { color: var(--sienna); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

/* Adressblock, Aufzaehlung von Stammdaten */
.adresse {
  background: #fff;
  border-left: 3px solid var(--sienna-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1.125rem 1.25rem;
  margin: 0 0 1.25rem;
  line-height: 1.65;
}
.adresse p { margin: 0; }

/* Offene Angabe – bewusst sichtbar, damit sie niemand uebersieht */
.offen {
  display: inline-block;
  background: #FBEDD7;
  border: 1px dashed var(--sienna-soft);
  border-radius: var(--r-sm);
  padding: .0625rem .4375rem;
  font-size: .875rem;
  color: #6A3A17;
  font-style: normal;
}

/* Hinweiskasten */
.hinweis {
  background: var(--sage-soft);
  border-radius: var(--r-md);
  padding: 1.125rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .9375rem;
}
.hinweis p:last-child { margin-bottom: 0; }

/* Tabellen (Empfaenger, Speicherdauer) */
.tab-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: .9375rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
th, td { text-align: left; padding: .75rem .875rem; border-bottom: 1px solid var(--linen-2); vertical-align: top; }
th { font-weight: 600; background: var(--linen); font-size: .8125rem; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }

/* --- Fuss ---------------------------------------------------------------- */

.legal-stand {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: .875rem;
  color: var(--ink-3);
}

.legal-foot {
  background: var(--graphite);
  color: var(--linen);
  padding: 2.5rem 0;
  font-size: .875rem;
}
.legal-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-foot a { color: var(--linen); text-decoration: none; opacity: .85; }
.legal-foot a:hover { opacity: 1; text-decoration: underline; }
.legal-foot ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.legal-foot p { margin: 0; opacity: .6; }

@media print {
  .legal-head, .legal-foot, .toc { display: none; }
  body { background: #fff; }
  section.abschnitt { page-break-inside: avoid; }
}
