/* ==========================================================================
   Bremen SysCom · Rechtstexte (impressum.html, datenschutz.html)
   Normale, gut lesbare Textseiten im Stil der Website: gleiche Kopfzeile, gleicher Fuß,
   keine 3D-Szene, keine Stationsführung, normales Scrollen.
   Nutzt tokens.css, base.css und site.css (Kopfzeile, Menü, Fuß, Schnellzugriff).
   ========================================================================== */

/* Kopfzeile über laufendem Text: deckend statt Verlauf, damit nichts durchscheint */
.page-legal .site-header::before { inset: 0; background: rgba(7, 9, 19, .985); border-bottom: 1px solid var(--line); }
/* Sprungziele (Inhaltsübersicht) nicht unter der fixierten Kopfzeile */
.page-legal [id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

.legal {
  padding: calc(var(--header-h) + clamp(1.75rem, 5vh, 3.5rem)) max(var(--margin), env(safe-area-inset-right)) clamp(3rem, 8vh, 5rem) max(var(--margin), env(safe-area-inset-left));
  background: radial-gradient(120% 60% at 85% 0%, rgba(0, 125, 159, .12), rgba(7, 9, 19, 0) 60%);
}
.legal__doc, .legal__more { max-width: 44rem; margin-inline: auto; }

.legal__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.6rem; font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: .08em; text-transform: uppercase; color: var(--mist-dim); }
.legal__crumbs a { display: inline-flex; align-items: center; gap: .45rem; color: var(--signal-soft); }
.legal__crumbs a:hover { color: var(--bone); }
.legal__crumbs .icon { width: 1.1em; height: 1.1em; }

.legal__title { position: relative; font-size: clamp(2.3rem, 1.5rem + 3vw, 3.6rem); line-height: 1.02; padding-bottom: 1.2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); overflow-wrap: break-word; hyphens: auto; }
.legal__title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--signal); }

/* Fließtext: angenehme Zeilenlänge (≈ 70 Zeichen), großzügiger Zeilenabstand */
.legal__body { font-size: 1.02rem; line-height: 1.7; color: #dfe3f2; overflow-wrap: break-word; hyphens: auto; }
.legal__body > * + * { margin-top: 1rem; }
.legal__body h2 { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.75rem); line-height: 1.15; color: var(--bone); margin-top: 2.6rem; }
.legal__body h3 { font-family: var(--font-sans); font-weight: 680; font-size: 1.08rem; line-height: 1.3; letter-spacing: 0; color: var(--bone); margin-top: 1.9rem; }
.legal__body h2 + *, .legal__body h3 + * { margin-top: .7rem; }
.legal__body > h2:first-child { margin-top: 0; }
.legal__body strong { font-weight: 640; color: var(--bone); }
.legal__body a { color: var(--signal-soft); text-decoration: underline; text-decoration-color: rgba(95, 228, 200, .45); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal__body a:hover { color: var(--bone); text-decoration-color: currentColor; }
.legal__body ul { list-style: disc; padding-left: 1.3rem; }
.legal__body li + li { margin-top: .45rem; }
.legal__body li::marker { color: var(--signal); }

/* Inhaltsübersicht */
.legal__toc { margin: 1.8rem 0 .6rem; padding: 1.2rem 1.4rem 1.3rem; background: linear-gradient(180deg, rgba(10, 13, 27, .8), rgba(10, 13, 27, .6)); border: 1px solid var(--line); border-radius: var(--radius); }
.legal__body .legal__toc h2 { margin: 0 0 .7rem; font-family: var(--font-mono); font-weight: 600; font-size: var(--text-label); letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.legal__body .legal__toc ul { list-style: none; padding: 0; columns: 2 15rem; column-gap: 2rem; }
.legal__body .legal__toc li { margin: 0; break-inside: avoid; }
.legal__body .legal__toc a { display: inline-block; padding: .22rem 0; font-size: .95rem; text-decoration: none; }
.legal__body .legal__toc a:hover { text-decoration: underline; }

/* Weiter zur Startseite bzw. zum anderen Rechtstext */
.legal__more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.legal__more a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; font-weight: 640; color: var(--bone); }
.legal__more a:hover { color: var(--signal-soft); }
.legal__more .icon { color: var(--signal); }

@media (max-width: 899px) {
  /* Ohne JavaScript steht die Kopfzeile im Fluss (mehrzeiliges Menü), der Text beginnt darunter */
  html:not(.nav-ready) .page-legal .site-header { position: relative; }
  html:not(.nav-ready) .page-legal .legal { padding-top: 1.5rem; }
  .legal__title { font-size: clamp(1.75rem, 8vw, 2.6rem); hyphens: manual; }
  .legal__body { font-size: 1rem; line-height: 1.65; }
  .legal__toc { padding: 1rem 1.1rem 1.1rem; }
}

/* Druck: nur der Text */
@media print {
  .site-header, .site-footer, .dock, .skip-link, .legal__crumbs, .legal__more { display: none !important; }
  body { background: #fff; color: #000; }
  .legal { padding: 0; background: none; }
  .legal__body, .legal__body h2, .legal__body h3, .legal__body strong, .legal__title { color: #000; }
  .legal__body a { color: #000; }
  .legal__toc { border-color: #999; background: none; }
}
