/* Rechtstexte Eneron – bewusst ohne externe Schriften (keine IP-Übertragung an Dritte).
   Systemschrift: San Francisco auf iPhone/Mac, Roboto auf Android, Segoe auf Windows. */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e3e3e0;
  --accent: #0b5cad;
  --mark: #fff1a8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1a1a1d;
    --text: #ececef;
    --muted: #9a9aa2;
    --line: #2e2e33;
    --accent: #6aaeff;
    --mark: #5c4f00;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;          /* 17px – angenehm auf dem Handy */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  max-width: 44rem;              /* ca. 70 Zeichen pro Zeile */
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

/* Überschriften */
h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
  hyphens: manual;
}
h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  hyphens: manual;
}
h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  hyphens: manual;
}

p { margin: 0 0 1rem; }

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Listen */
ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}
li { margin: 0.35rem 0; padding-left: 0.15rem; }
li::marker { color: var(--muted); }

/* Links: E-Mail-Adressen und URLs nicht trennen, aber umbrechen dürfen */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  hyphens: none;
  word-break: break-word;
}
a:hover { text-decoration-thickness: 2px; }

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.25rem;
  font-size: 0.975rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { font-weight: 600; }
/* Kopfzeile (z. B. «Daten | Dauer») */
tr:first-child:has(th + th) th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody > tr > th:first-child:not(:only-child) { width: 40%; }

/* Offene Stellen aus der Freigabe (vor Veröffentlichung ersetzen) */
mark.offen {
  background: var(--mark);
  color: inherit;
  padding: 0.05em 0.25em;
  border-radius: 3px;
}

/* Navigation am Seitenende */
.legal-nav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Handy: Tabellenzeilen untereinander statt nebeneinander */
@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  h2 { margin-top: 2rem; padding-top: 1.25rem; }

  table, tbody, tr, th, td { display: block; width: 100% !important; }
  tr { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  th, td { padding: 0; border: 0; }
  tr > :first-child { font-weight: 600; margin-bottom: 0.15rem; }
  tr > :not(:first-child) { color: var(--text); }
  /* Kopfzeile «Daten | Dauer» auf dem Handy ausblenden */
  tr:first-child:has(th + th) { display: none; }
}

@media (min-width: 768px) {
  body { padding-top: 56px; }
  h1 { font-size: 2.1rem; }
}

/* Hinweis auf maschinelle Übersetzung (FR) */
.notice {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1.5rem;
}
