/* Legal pages (terms.html, privacy.html, withdrawal.html) after the draft "Rechtliches" (2026-10-17), like the
   landing page: header with navigation, title area on the ground colour (breadcrumb, document tabs, date), a wave into
   the white text area with a sticky table of contents, a dark footer. Light by default, dark selectable.
   No external resources. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/figtree-500.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/figtree-600.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/figtree-700.woff2') format('woff2'); }

:root {
  --ground: #ECEBF1; --paper: #FFFFFF; --ink: #1C1C22; --muted: #5C5965; --soft: #6E6B76; --text: #3E3B46; --line: #ECE8EE; --field: #F3F1F6;
  --eyebrow: #6A4CC4; --hover: #5A3FB0; --hl: #DCE49B; --glow: rgba(203, 190, 240, .7);
  --night: #1C1C22; --night-soft: #9E9AA8;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme="dark"] {
  --ground: #141319; --paper: #1D1C24; --ink: #F1EFF6; --muted: #BDB9C6; --soft: #A6A2B0; --text: #D9D6E0; --line: #2E2C37; --field: #26242E;
  --eyebrow: #BBA8F2; --hover: #CDBDF7; --glow: rgba(123, 91, 208, .28); --night: #0E0D12;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.75 var(--font); -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden; }
body::before { content: ""; position: absolute; right: -200px; top: -160px; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- header ---------- */
.legal-top { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: 1px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.top-nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.top-nav a, .top-actions a { text-decoration: none; }
.top-nav a:hover { color: var(--hover); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.download { height: 46px; padding: 0 20px; margin-left: 4px; border-radius: 999px; background: var(--ink); color: var(--ground); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.download:hover { opacity: .9; }
.download svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; background: transparent; color: var(--ink); border: 0; border-radius: 50%; cursor: pointer; }
.theme-toggle:hover { background: var(--paper); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.lang-switch { position: relative; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; background: transparent; color: var(--ink); border: 0; border-radius: 999px; font: 600 14px/1 var(--font); cursor: pointer; }
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { background: var(--paper); }
.lang-toggle svg, .lang-menu svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-toggle svg { width: 18px; height: 18px; }
.lang-toggle .chevron { width: 14px; height: 14px; transition: transform .2s; }
.lang-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.lang-menu { position: absolute; top: 50px; right: 0; z-index: 10; min-width: 170px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border-radius: 18px; box-shadow: 0 16px 40px rgba(40, 20, 80, .16); }
.lang-menu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; height: 42px; padding: 0 12px; background: transparent; color: var(--ink); border: 0; border-radius: 12px; font: 400 14px/1.4 var(--font); text-align: left; cursor: pointer; }
.lang-menu button:hover, .lang-menu button[aria-current="true"] { background: var(--field); }
.lang-menu svg { width: 16px; height: 16px; visibility: hidden; }
.lang-menu button[aria-current="true"] svg { visibility: visible; }
@media (max-width: 900px) { .top-nav { display: none; } }
@media (max-width: 480px) { .download span { display: none; } .download { width: 46px; padding: 0; justify-content: center; } }

/* ---------- title area ---------- */
.legal { position: relative; z-index: 1; display: block; }
.legal-hero { display: flex; flex-direction: column; gap: 18px; padding-block: 30px 36px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--hover); }
.crumbs b { color: var(--ink); font-weight: 600; }
.legal h1 { margin: 0; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; font-weight: 400; letter-spacing: -1.6px; }
.legal .lead { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.doc-tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); }
.doc-tabs a { height: 42px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; text-decoration: none; }
.doc-tabs a:hover { background: var(--field); }
.doc-tabs a[aria-current="page"] { background: var(--ink); color: var(--ground); }
.legal .stand { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.legal .stand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9BB33A; flex: none; }
.box { margin: 0; padding: 14px 18px; border-left: 3px solid var(--hl); background: color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 0 16px 16px 0; font-size: 15px; line-height: 1.6; }
.legal-text .box { background: var(--field); margin-bottom: 8px; }
.legal-hero .box { max-width: 760px; }
.wave { display: block; width: 100%; height: 100px; }
.wave path { fill: var(--paper); }

/* ---------- the text with its table of contents ---------- */
.sheet { background: var(--paper); padding: 20px 0 90px; }
.legal-grid { display: flex; gap: 64px; align-items: flex-start; }
.toc-side { flex: 0 0 250px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 48px); overflow-y: auto; }
.toc { margin: 0; }
.toc strong { display: block; font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 7px 10px 7px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; }
.toc a::before { content: counter(toc); min-width: 16px; color: #9C97A8; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
.print-btn { height: 44px; margin-top: 6px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); cursor: pointer; }
.print-btn:hover { background: var(--field); }
.print-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ask { font-size: 13px; color: var(--muted); text-align: center; text-decoration: none; }
.ask:hover { color: var(--hover); }
.legal-text { flex: 1 1 auto; min-width: 0; max-width: 760px; color: var(--text); }
.legal-text h2 { margin: 52px 0 12px; font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.4px; color: var(--ink); scroll-margin-top: 24px; }
.legal-text > h2:first-child { margin-top: 0; }
.legal-text > .box + h2 { margin-top: 40px; }
.legal-text h3 { margin: 28px 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
.legal-text p { margin: .8rem 0 0; font-size: 16px; line-height: 1.75; }
.legal-text ul, .legal-text ol { margin: .8rem 0 0; padding-left: 22px; font-size: 16px; line-height: 1.7; }
.legal-text li + li { margin-top: .4rem; }
.legal-text a { text-decoration: underline; text-underline-offset: 3px; }
.legal-text a:hover { color: var(--hover); }
.legal .muted { color: var(--muted); }
.data-table { width: 100%; margin-top: .8rem; border-collapse: collapse; font-size: .9375rem; }
.data-table th, .data-table td { padding: .7rem .8rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--soft); font-weight: 600; font-size: .8125rem; }
.form-sheet { margin-top: 1rem; padding: 22px 24px; border: 1.5px dashed var(--line); border-radius: 20px; }
.form-sheet p { margin-top: .5rem; }
.form-line { display: block; margin-top: 1.1rem; border-bottom: 1px solid var(--line); min-height: 1.6rem; }
.questions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 60px; padding-top: 28px; border-top: 1px dashed var(--line); }
.questions img { height: 150px; width: auto; }
.questions div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.questions b { font-size: 20px; font-weight: 500; color: var(--ink); }
.questions span { font-size: 15px; line-height: 1.55; color: var(--muted); }
.legal-text .pill { align-self: flex-start; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--ground); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.legal-text .pill:hover { color: var(--ground); opacity: .9; }
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- dark footer ---------- */
.night { background: var(--night); color: #FFFFFF; }
.night-wave { display: block; width: 100%; height: 100px; background: var(--paper); }
.night-wave path { fill: var(--night); }
.legal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-block: 10px 34px; font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-brand .brand-mark { width: 28px; height: 28px; }
.foot-brand b { font-size: 16px; font-weight: 600; }
.foot-brand span { font-size: 13px; color: var(--night-soft); }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-foot a { color: #FFFFFF; text-decoration: none; }
.legal-foot a:hover, .legal-foot a[aria-current="page"] { color: var(--hl); }
.legal-foot p { margin: 0; color: var(--night-soft); font-size: 13px; white-space: nowrap; }

@media (max-width: 860px) {
  .legal-grid { display: block; }
  .toc-side { position: static; max-height: none; margin-bottom: 36px; padding: 20px 22px; border-radius: 24px; background: var(--field); }
  .toc ol { border-left: 0; }
  .toc a { margin-left: 0; padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .doc-tabs a { padding: 0 14px; }
  .data-table, .data-table tbody, .data-table tr, .data-table td, .data-table th { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { border-top: 1px solid var(--line); padding: .5rem 0; }
  .data-table td { border: 0; padding: .2rem 0; }
  .data-table td::before { content: attr(data-label); display: block; color: var(--soft); font-size: .75rem; font-weight: 600; }
}
@media print {
  .legal-top, .toc-side, .doc-tabs, .crumbs, .questions, .night, .wave, body::before { display: none !important; }
  body, .sheet { background: #fff; color: #000; }
  .legal-text { max-width: none; color: #000; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
