/* ==========================================================
   Rechtstexte (Impressum, Datenschutz)
   Eigenstaendige Gestaltung im Stil der Website, damit die
   Dateien unabhaengig von site.css bleiben und auch von
   anderen Diensten aus verlinkt werden koennen.
   ========================================================== */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #e9edf3;
  --ink: #17203f;
  --muted: #4f5873;
  --line: #dde2eb;
  --line-strong: #858da6;
  --teal: #2aa6b8;
  --teal-ink: #0d6774;
  --focus: #1b6bd4;
  --logo-shield: #2e3d7a;
  --logo-dot: #2aa6b8;
  --logo-word: #17203f;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1322;
    --surface: #161c2f;
    --surface-2: #1d2440;
    --ink: #edf0f7;
    --muted: #a7afc6;
    --line: #283050;
    --line-strong: #6d7695;
    --teal: #4cc3d3;
    --teal-ink: #7dd6e2;
    --focus: #7fb2f0;
    --logo-shield: #e7eaf6;
    --logo-dot: #58c6d8;
    --logo-word: #edf0f7;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
p, ul, table { margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Kopfzeile */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.legal-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.legal-header__brand { display: flex; border-radius: 6px; }

.logo { display: block; width: 136px; height: auto; }
.logo__shield { fill: none; stroke: var(--logo-shield); }
.logo__dot { fill: var(--logo-dot); }
.logo__word { fill: var(--logo-word); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.pill:hover { border-color: var(--ink); background: var(--surface); }

/* Inhalt */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 760px);
  justify-content: space-between;
  gap: 32px 64px;
  padding-block: clamp(40px, 5vw, 80px) clamp(64px, 6vw, 112px);
}
.legal--single { grid-template-columns: minmax(0, 760px); justify-content: start; }

.legal-head { grid-column: 1 / -1; display: grid; gap: 18px; max-width: 820px; }
.eyebrow { color: var(--teal-ink); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.legal-head h1 { font-size: clamp(2.125rem, 1.25rem + 4.2vw, 4.75rem); letter-spacing: -0.045em; line-height: 1.02; hyphens: auto; overflow-wrap: break-word; }
.legal-head .lead { color: var(--muted); font-size: 1.25rem; line-height: 1.5; max-width: 52ch; }
.legal-head .stand { color: var(--muted); font-size: 0.9375rem; }

.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px; font-size: 0.9375rem; }
.toc h2 { font-size: 0.875rem; font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.toc a { padding: 6px 12px; margin-left: -12px; border-radius: 999px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); background: var(--surface-2); }

.legal-body { display: grid; gap: 16px; }

.block {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--muted);
}
.block > * + * { margin-top: 0.9em; }
.block h2 { color: var(--ink); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); hyphens: auto; }
.block h3 { color: var(--ink); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 1.6em; }
.block strong { color: var(--ink); font-weight: 600; }
.block a { color: var(--ink); text-decoration-color: var(--teal); text-underline-offset: 4px; }
.block ul { padding-left: 1.25em; }
.block li + li { margin-top: 0.45em; }
.block li::marker { color: var(--teal); }
.block code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875em; color: var(--ink); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; }
th { color: var(--ink); font-weight: 600; background: var(--surface-2); }
tr + tr td { border-top: 1px solid var(--line); }
td:first-child { color: var(--ink); }

/* Fusszeile */
.legal-footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--muted); font-size: 0.9375rem; }
.legal-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-footer a { color: var(--muted); text-underline-offset: 4px; }
.legal-footer a:hover, .legal-footer a[aria-current="page"] { color: var(--ink); }

@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 20px; border: 1px solid var(--line); border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .legal-header, .toc, .legal-footer nav, .skip { display: none; }
  body { background: #fff; color: #000; }
  .block { border: 0; padding: 0; }
  .legal { display: block; }
  .legal-body { gap: 24px; }
}
