:root {
  --fg: #111;
  --bg: #fff;
  --muted: #555;
  --line: #d8d8d8;
  --link: #0b5cad;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --fg: #e8e8e8; --bg: #161616; --muted: #aaa; --line: #333; --link: #7db7f0; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 52rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
a { color: var(--link); }

h1 { text-align: center; font-size: 1.4rem; margin: 0 0 2rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .4rem; counter-increment: abschnitt; }
h2::before { content: counter(abschnitt) ".\00a0"; }
main { counter-reset: abschnitt; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: .35rem .5rem; border-top: 1px solid var(--line); }
th[scope="row"] { width: 40%; font-weight: normal; }
tr.gruppe th { font-weight: 600; padding-top: 1rem; }
ul { list-style: none; margin: 0; padding: 0; }

footer { margin-top: 3rem; color: var(--muted); font-size: .875rem; text-align: right; }

/* schmale Bildschirme: Spalten untereinander */
@media (max-width: 36rem) {
  th[scope="row"] { width: auto; }
  tr { display: block; padding: .35rem 0; border-top: 1px solid var(--line); }
  th, td { display: block; border: 0; padding: .05rem .25rem; }
  td { color: var(--muted); }
}

/* Druck / PDF: kompakt wie die bisherige A4-Seite */
@media print {
  :root { --fg: #000; --bg: #fff; --muted: #000; --link: #000; }
  body { font-size: 10pt; }
  main { max-width: none; padding: 0; }
  tr { break-inside: avoid; }
  h2 { break-after: avoid; }
  ul { display: block; }
}
@page { size: A4; margin: 2cm; }
