/* ============================================================
   legal.css — shared, deliberately neutral styling for the
   Impressum and Datenschutz pages. No external requests:
   system font stack only, no webfonts, no images.
   ============================================================ */

:root {
  --paper: #fbfaf8;
  --ink: #1f1e1b;
  --ink-soft: #4a4843;
  --line: #d9d5cd;
  --line-soft: #e7e3db;
  --note-bg: #f2eee5;
  --note-edge: #b9a97e;
  --focus: #1d4ed8;

  --measure: 34rem;
  --pad: 1.25rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.page-header {
  border-bottom: 1px solid var(--line-soft);
  padding-block: 1rem 0;
}

.page-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 3.5rem;
  padding-block: 0.5rem 2.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

main { padding-block: 1.5rem 0; }

/* ---------- Back link ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.back-link:hover,
.back-link:focus-visible { color: var(--ink); }

/* ---------- Preview notice ---------- */

.preview-note {
  margin: 0 0 2.25rem;
  border-left: 3px solid var(--note-edge);
  background: var(--note-bg);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.preview-note strong { color: var(--ink); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 650;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1.25rem;
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.0625rem;
}

h4 {
  margin: 1.5rem 0 0.375rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

p { margin: 0 0 1rem; }

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li { margin-bottom: 0.375rem; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--focus); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

address {
  font-style: normal;
  margin: 0 0 1rem;
}

/* Body links sit inside running text, so they cannot be padded to
   44px without wrecking the line rhythm. Standalone links (contact
   details, back link, footer) get the full target. */
.tap {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Cookie table ----------
   The table is the only wide element on the page. It scrolls inside
   its own container so the page body never scrolls horizontally. */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

table {
  border-collapse: collapse;
  min-width: 46rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

caption {
  padding: 0.75rem 0.875rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

th, td {
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }

thead th {
  background: #f1ede5;
  font-weight: 650;
  white-space: nowrap;
}

/* ---------- Tablet & up ---------- */

@media (min-width: 48rem) {
  :root { --pad: 2rem; }

  body { font-size: 1.0625rem; }

  h1 { font-size: 2.125rem; }
  h2 { font-size: 1.375rem; }

  main { padding-block: 2.5rem 0; }
}
