/* Rechtliches und Bedingungen (pxteny_rechtlichesbedingungen)
   TEN CI: #cc0607 / black / white — Leitbild-nahe Typo, Pillen-Tabs, Auto-TOC */
.legal-docs {
  --ld-red: #cc0607;
  --ld-ink: #1a1a1a;
  --ld-muted: #5c5c5c;
  --ld-line: #e6e6e6;
  --ld-wash: #f6f6f6;
  --ld-measure: 42rem;
  --ld-shell: 72rem;
  color: var(--ld-ink);
  background: #fff;
  padding: 0 0 64px;
}

.legal-docs__shell {
  max-width: var(--ld-shell);
  margin: 0 auto;
  padding: 0 24px;
}

.legal-docs__measure {
  max-width: var(--ld-measure);
}

.legal-docs__hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--ld-line);
  position: relative;
}

.legal-docs__hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 40px;
  width: 4px;
  height: 72px;
  background: var(--ld-red);
}

.legal-docs__hero-copy {
  padding-left: 20px;
  max-width: 40rem;
}

.legal-docs__eyebrow {
  margin: 0 0 12px;
  font-family: Calibri, Carlito, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-muted);
  line-height: 1.3;
}

.legal-docs__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ld-ink);
}

.legal-docs__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ld-muted);
  max-width: 36rem;
}

/* Pills */
.legal-docs__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 8px;
  margin: 0;
}

.legal-docs__pill {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ld-line);
  background: #fff;
  color: var(--ld-ink);
  font-family: Calibri, Carlito, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.legal-docs__pill:hover,
.legal-docs__pill:focus {
  outline: none;
  border-color: var(--ld-red);
  color: var(--ld-red);
}

.legal-docs__pill.is-active {
  background: var(--ld-red);
  border-color: var(--ld-red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(204, 6, 7, 0.22);
}

.legal-docs__pill:focus-visible {
  outline: 2px solid var(--ld-red);
  outline-offset: 2px;
}

/* Panels */
.legal-docs__panels {
  padding-top: 12px;
}

.legal-docs__panel {
  display: none;
  padding: 16px 0 8px;
  animation: legal-docs-rise 0.45s ease both;
}

.legal-docs__panel.is-active {
  display: block;
}

.legal-docs__panel[hidden] {
  display: none !important;
}

.legal-docs__doc-head {
  margin: 0 0 20px;
}

.legal-docs__doc-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ld-ink);
}

/* TOC — Leitbild-ähnlich */
.legal-docs__toc {
  margin: 0 0 32px;
  padding: 20px 22px;
  background: var(--ld-wash);
  border-left: 4px solid var(--ld-red);
  border-radius: 0 8px 8px 0;
  max-width: 36rem;
}

.legal-docs__toc-label {
  margin: 0 0 12px;
  font-family: Calibri, Carlito, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.legal-docs__toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.legal-docs__toc-item--h3 {
  padding-left: 1.25rem;
}

.legal-docs__toc-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ld-ink);
  font-size: 0.98rem;
  line-height: 1.35;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.legal-docs__toc-link:hover,
.legal-docs__toc-link:focus,
.legal-docs__toc-link.is-active {
  background: #fff;
  color: var(--ld-red);
  outline: none;
}

.legal-docs__toc-num {
  flex: 0 0 auto;
  min-width: 1.4em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ld-red);
  font-variant-numeric: tabular-nums;
}

.legal-docs__toc-text {
  flex: 1 1 auto;
}

/* Prose */
.legal-docs__prose {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ld-ink);
}

.legal-docs__prose p {
  margin: 0 0 1em;
}

.legal-docs__prose p:last-child {
  margin-bottom: 0;
}

.legal-docs__prose ul,
.legal-docs__prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal-docs__prose li {
  margin: 0 0 0.35em;
}

.legal-docs__prose strong {
  font-weight: 700;
}

.legal-docs__prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: 96px;
}

.legal-docs__prose h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.legal-docs__prose a {
  color: var(--ld-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-docs__prose a:hover {
  text-decoration-thickness: 2px;
}

@media (max-width: 767px) {
  .legal-docs {
    padding-bottom: 48px;
  }

  .legal-docs__shell {
    padding: 0 16px;
  }

  .legal-docs__hero {
    padding: 28px 0 24px;
  }

  .legal-docs__pill {
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .legal-docs__toc {
    padding: 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-docs__panel {
    animation: none;
  }

  .legal-docs__pill {
    transition: none;
  }
}

@keyframes legal-docs-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
