/* Legal document pages — shared by the Privacy Policy and the Terms of Use.
 *
 * One stylesheet and one renderer (legal.js) serve both; each page is a thin
 * entry file that loads its own content module. Static hosting is why there are
 * two HTML files at all — nothing about the design or the logic is duplicated.
 */

:root {
  --lg-page: #F8F1E3;
  --lg-card: #FFFCF5;
  --lg-panel: #F3EADA;
  --lg-ink: #0f1f47;
  --lg-body: #3f4a63;
  --lg-muted: #6b778f;
  --lg-gold: #c08b25;
  --lg-gold-soft: #f3e7c9;
  --lg-line: #E0D5BE;
  --lg-chip: #F3EADA;
  --lg-todo-bg: #fdf6e6;
  --lg-todo-line: #e3c680;
  --lg-todo-ink: #6d5312;
  --lg-shadow: 0 2px 14px rgba(10, 22, 40, .07);
}
:root[data-theme="dark"] {
  --lg-page: #0a1628;
  --lg-card: #0e1c38;
  --lg-panel: #11203f;
  --lg-ink: #e8eefc;
  --lg-body: #c3cee6;
  --lg-muted: #8fa0c0;
  --lg-gold: #e6b82e;
  --lg-gold-soft: #16284d;
  --lg-line: #243356;
  --lg-chip: #152348;
  --lg-todo-bg: #241d08;
  --lg-todo-line: #5c4a16;
  --lg-todo-ink: #e8cf92;
  --lg-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lg-page: #0a1628;
    --lg-card: #0e1c38;
    --lg-panel: #11203f;
    --lg-ink: #e8eefc;
    --lg-body: #c3cee6;
    --lg-muted: #8fa0c0;
    --lg-gold: #e6b82e;
    --lg-gold-soft: #16284d;
    --lg-line: #243356;
    --lg-chip: #152348;
    --lg-todo-bg: #241d08;
    --lg-todo-line: #5c4a16;
    --lg-todo-ink: #e8cf92;
    --lg-shadow: 0 2px 18px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body.lg {
  margin: 0;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--lg-page);
  color: var(--lg-body);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.lg-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: var(--lg-page);
  border-bottom: 1px solid var(--lg-line);
}
.lg-top .lg-brand { flex: 1; min-width: 0; display: inline-flex; text-decoration: none; }
.lg-iconbtn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--lg-line); border-radius: 10px;
  background: var(--lg-card); color: var(--lg-ink);
  cursor: pointer;
}
.lg-iconbtn:hover { border-color: var(--lg-gold); }

/* ── Breadcrumb + language ────────────────────────────────────────────── */
.lg-bar {
  max-width: 920px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px 6px;
}
.lg-crumb { flex: 1; min-width: 0; font-size: 13px; color: var(--lg-muted); }
.lg-crumb a { color: var(--lg-ink); text-decoration: none; }
.lg-crumb a:hover { text-decoration: underline; }
.lg-crumb span { margin: 0 6px; }

.lg-lang { display: inline-flex; border: 1px solid var(--lg-line); border-radius: 999px; overflow: hidden; flex: none; }
.lg-lang button {
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 6px 15px; border: 0; cursor: pointer;
  background: transparent; color: var(--lg-muted);
}
.lg-lang button[aria-pressed="true"] { background: var(--lg-gold); color: #11203f; }
.lg-lang button:focus-visible { outline: 2px solid var(--lg-gold); outline-offset: -2px; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.lg-main { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.lg-cols { display: block; }
@media (min-width: 900px) {
  .lg-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.lg-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--lg-gold-soft), var(--lg-panel));
  border: 1px solid var(--lg-line);
  margin-bottom: 18px;
}
.lg-hero-mark { flex: none; color: var(--lg-gold); }
.lg-hero { min-width: 0; }
.lg-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  /* German titles are long — "Datenschutzerklärung" is 20 characters and used
     to run past the right edge of a 375px screen. Scale with the viewport and
     let it hyphenate rather than clip. */
  font-size: clamp(20px, 6vw, 26px); font-weight: 600; line-height: 1.15;
  color: var(--lg-ink); margin: 0 0 6px;
  overflow-wrap: break-word; hyphens: auto;
}
.lg-hero > div:last-child { min-width: 0; }
.lg-hero p { margin: 0; font-size: 14.5px; }
.lg-hero .lg-updated { margin-top: 8px; font-size: 13px; color: var(--lg-muted); }

/* ── Table of contents (desktop only) ─────────────────────────────────── */
.lg-toc { display: none; }
@media (min-width: 900px) {
  .lg-toc {
    display: block;
    position: sticky; top: 72px;
    max-height: calc(100dvh - 96px); overflow-y: auto;
    padding: 4px 4px 4px 0;
  }
  .lg-toc h2 {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--lg-muted); margin: 0 0 10px; font-weight: 700;
  }
  .lg-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
  .lg-toc a {
    display: block; padding: 6px 10px; border-radius: 8px;
    font-size: 13px; color: var(--lg-body); text-decoration: none;
    border-left: 2px solid transparent;
  }
  .lg-toc a:hover { background: var(--lg-chip); color: var(--lg-ink); }
  .lg-toc a[aria-current="true"] { border-left-color: var(--lg-gold); color: var(--lg-ink); font-weight: 600; }
}

/* ── Controls ─────────────────────────────────────────────────────────── */
.lg-controls { display: flex; gap: 8px; margin: 0 0 12px; }
.lg-controls button {
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: var(--lg-card); color: var(--lg-ink);
  border: 1px solid var(--lg-line);
}
.lg-controls button:hover { border-color: var(--lg-gold); }
.lg-controls button:focus-visible { outline: 2px solid var(--lg-gold); outline-offset: 2px; }

/* ── Intro ────────────────────────────────────────────────────────────── */
.lg-intro {
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  font-size: 14.5px;
}
.lg-intro > :first-child { margin-top: 0; }
.lg-intro > :last-child { margin-bottom: 0; }

/* ── Accordion ────────────────────────────────────────────────────────── */
.lg-sections { display: flex; flex-direction: column; gap: 10px; }
.lg-sec {
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  overflow: hidden;
  scroll-margin-top: 76px;
}
.lg-sec-head {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 15px 16px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.lg-sec-head:hover { background: var(--lg-chip); }
.lg-sec-head:focus-visible { outline: 2px solid var(--lg-gold); outline-offset: -3px; }
.lg-num {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--lg-gold); color: #11203f;
  font-size: 12.5px; font-weight: 700;
}
.lg-sec-icon {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--lg-chip); color: var(--lg-ink);
}
.lg-sec-text { flex: 1; min-width: 0; }
.lg-sec-text b {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15.5px; font-weight: 600; color: var(--lg-ink); line-height: 1.25;
}
.lg-sec-text small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--lg-muted); }
.lg-chev { flex: none; color: var(--lg-muted); transition: transform .18s ease; }
.lg-sec-head[aria-expanded="true"] .lg-chev { transform: rotate(180deg); }

.lg-sec-body { padding: 0 18px 4px; border-top: 1px solid var(--lg-line); }
.lg-sec-body[hidden] { display: none; }
.lg-sec-body h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14.5px; font-weight: 600; color: var(--lg-ink);
  margin: 16px 0 6px;
}
.lg-sec-body p { margin: 0 0 11px; font-size: 14.5px; }
.lg-sec-body ul { margin: 8px 0 12px; padding-left: 20px; }
.lg-sec-body li { margin: 5px 0; font-size: 14.5px; }
.lg-sec-body a { color: var(--lg-ink); }
.lg-sec-body > :first-child { margin-top: 14px; }
.lg-sec-body > :last-child { margin-bottom: 16px; }
.lg-sec-body table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 13.5px; }
.lg-sec-body th, .lg-sec-body td { border: 1px solid var(--lg-line); padding: 8px 10px; text-align: left; }
.lg-sec-body th { background: var(--lg-chip); color: var(--lg-ink); }

/* Details the operator still has to supply. Deliberately conspicuous: these
   must never ship looking like finished text. */
.lg-todo {
  display: inline-block;
  background: var(--lg-todo-bg);
  border: 1px dashed var(--lg-todo-line);
  color: var(--lg-todo-ink);
  border-radius: 6px; padding: 1px 7px; font-size: 13.5px;
}
.lg-provider { margin: 8px 0 12px; padding-left: 14px; border-left: 3px solid var(--lg-line); }
.lg-provider p { margin: 0 0 3px; }
.lg-callout {
  background: var(--lg-chip);
  border: 1px solid var(--lg-line);
  border-left: 3px solid var(--lg-gold);
  border-radius: 10px;
  padding: 13px 15px;
  margin: 14px 0;
  font-size: 14px;
}
.lg-callout strong { color: var(--lg-ink); }
.lg-note {
  background: var(--lg-chip); border: 1px solid var(--lg-line);
  border-radius: 10px; padding: 13px 15px; margin: 14px 0; font-size: 14px;
}
.lg-closing {
  margin-top: 16px; padding: 14px 16px;
  background: var(--lg-panel); border: 1px solid var(--lg-line); border-radius: 12px;
  font-family: 'Fraunces', Georgia, serif; font-size: 15px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.lg-foot {
  max-width: 920px; margin: 30px auto 0;
  padding: 18px 16px 0;
  border-top: 1px solid var(--lg-line);
  text-align: center; font-size: 12.5px; color: var(--lg-muted);
}
.lg-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.lg-foot a { color: var(--lg-ink); text-decoration: none; font-weight: 600; }
.lg-foot a:hover { text-decoration: underline; }
.lg-foot .sep { color: var(--lg-line); }
.lg-foot p { margin: 12px 0 0; font-family: ui-monospace, 'Courier New', monospace; font-size: 10.5px; letter-spacing: .05em; }

.lg-up {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--lg-card); color: var(--lg-ink);
  border: 1px solid var(--lg-line); box-shadow: var(--lg-shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.lg-up.on { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .lg-chev, .lg-up { transition: none; }
}
@media print {
  .lg-top, .lg-bar, .lg-toc, .lg-controls, .lg-up { display: none !important; }
  .lg-sec-body[hidden] { display: block !important; }
  .lg-sec { break-inside: avoid; border: 0; }
}
