/* Bereich „Recht, Kontakt, Newsletter“ (designsystem-C.md 8.8): Impressum, Datenschutz, AGB, Bildnachweis, Kontakt, Newsletter.
   Hell und gut lesbar: Fließtext in Tinte, Infos auf Stein, Aktionen auf Weiß. Nur Tokens und Bausteine aus site.css;
   keine Punkteraster, kein Leuchten, kleine Quadrate nur als Aufzählungszeichen. */

/* ---------- Allgemein ---------- */
/* Überschriften nie automatisch trennen („LEDdays“ bleibt ganz, Abschnitt 3); sehr lange Wörter brechen notfalls um statt seitlich zu scrollen */
.page-hero h1, .prose h2, .prose h3, .h3 { hyphens: manual; overflow-wrap: break-word; }
.prose code, .legal-table code { font-size: .88em; background: var(--stone); border: 1px solid var(--line); border-radius: var(--r-xs); padding: .08em .4em; color: var(--ink); overflow-wrap: anywhere; }
/* Platzhalter, der vor der Veröffentlichung ersetzt wird: Warn-Tönung, gestrichelt (Warn auf Tönung 4,6:1) */
mark.ph { background: var(--warn-tint); color: var(--warn); border: 1px dashed var(--warn); border-radius: var(--r-xs); padding: .05em .35em; font-weight: 600;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- Rechtsseiten: Seitenleiste + Text ---------- */
.legal { display: grid; gap: clamp(20px, 4vw, 56px); }
.legal-aside { display: grid; gap: 18px; align-content: start; min-width: 0; }
.legal-nav-title { margin: 0 0 10px; font-size: .72rem; font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
/* Handy und Tablet: Pillen wie Chips (4.10), aktuelle Seite im Lila-Verlauf */
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.legal-nav a { display: inline-flex; align-items: center; padding: .5em 1.05em; font-size: var(--fs-label); font-weight: 600; line-height: 1.2; letter-spacing: var(--tr-body);
  color: var(--ink); text-decoration: none; background: var(--stone-2); border: 1px solid var(--hairline); border-radius: var(--r-pill);
  transition: border-color .15s, background .15s, color .15s; }
.legal-nav a:hover { border-color: var(--lila); color: var(--ink); }
.legal-nav a[aria-current="page"] { background: var(--grad-lila); border-color: transparent; color: #fff; }
/* Inhaltsverzeichnis */
.legal-toc { display: none; }
.legal-toc ol, .legal-toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.legal-toc ol ol, .legal-toc-mobile ol ol { margin: 4px 0 8px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.legal-toc a, .legal-toc-mobile a { display: block; padding: 5px 8px; border-radius: var(--r-s); font-size: .86rem; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover, .legal-toc-mobile a:hover { background: var(--stone); color: var(--lila-deep); }
/* Handy: Inhaltsverzeichnis als Akkordeon (details.acc aus site.css) */
.legal-toc-mobile { margin: 0 0 1.5em; }
.legal-toc-mobile > nav { padding: 0 10px 14px; }

@media (min-width: 1000px) {
  .legal { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .legal-aside { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
  .legal-aside a:focus-visible { outline-offset: -3px; }   /* sonst schneidet overflow den Fokusrahmen ab */
  /* Desktop: Liste, aktuelle Seite mit Lila-Innenkante auf Lila-Tönung */
  .legal-nav ul { display: grid; gap: 2px; }
  .legal-nav a { display: block; padding: 8px 12px; font-size: .9rem; line-height: 1.35; color: var(--ink-2); background: none; border: 0; border-radius: 0 var(--r-s) var(--r-s) 0; }
  .legal-nav a:hover { background: var(--stone); color: var(--ink); }
  .legal-nav a[aria-current="page"] { background: var(--lila-tint); color: var(--lila-deep); box-shadow: inset 3px 0 0 var(--lila); }
  .legal-toc { display: block; padding-top: 16px; border-top: 1px solid var(--line); }
  .legal-toc-mobile { display: none; }
}

/* Fließtext: Tinte, nur Absätze mit Silbentrennung */
.legal-body { min-width: 0; color: var(--ink); overflow-wrap: break-word; }
.legal-body p { hyphens: auto; }
.legal-meta { margin: 0 0 1.2em; font-size: .72rem; font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
.legal-lang { font-size: var(--fs-sm); color: var(--ink-2); }
.prose .draft { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.draft-sub { font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.legal-sec, .part-head, #formular, #anmelden { scroll-margin-top: 88px; }
.legal-sec > h2 { margin-top: 1.8em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.legal-sec > h3 { margin-top: 1.8em; font-size: 1.15rem; }
.legal-no { margin-right: .15em; color: var(--lila); font-variant-numeric: tabular-nums; }
.legal-address { line-height: 1.55; }
.legal-top { margin-top: 3em; font-size: var(--fs-sm); }
.legal-top a { font-weight: 600; }
.legal-toc-mobile + .legal-sec > h2 { margin-top: .5em; padding-top: 0; border-top: 0; }
/* Tabellen (4.12): erste Spalte Tinte, Rest Nebentext */
.legal-table { margin: 1.2em 0 1.4em; }
.legal-table table { font-size: .9rem; }
.legal-table td { color: var(--ink-2); }
.legal-table td:first-child { font-weight: 600; color: var(--ink); }
.legal-table caption { border-top: 1px solid var(--line); }

/* Kurzfassung (Datenschutz) und Widerspruchsrecht: Hinweis „info“ (4.13), Titel in Tinte */
.legal-summary, .legal-callout { border-left: 4px solid var(--lila); background: var(--lila-tint); border-radius: var(--r-s); color: var(--ink); }
.legal-summary { margin: 0 0 1em; padding: clamp(18px, 2.6vw, 28px); }
.legal-summary .legal-summary-title { margin: 0 0 .8em; font-size: var(--fs-h3); line-height: 1.25; color: var(--ink); }
.legal-callout { margin: 1.4em 0; padding: 14px 18px; }
.legal-callout h3 { margin-top: 0; }
.legal-callout p:last-child { margin-bottom: 0; }

/* Aufzählungen mit kleinem Quadrat (wie .sq-list), ohne Schein */
ul.checks, ul.crosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.checks li, ul.crosses li { position: relative; padding-left: 22px; }
ul.checks li + li, ul.crosses li + li { margin-top: 0; }
ul.checks li::before, ul.crosses li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 2px; }
ul.checks li::before { background: var(--lila); }
ul.crosses li::before { border: 1.5px solid var(--field); background: transparent; }

/* Impressum: Faktenkacheln auf Stein */
.legal-facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin: 0 0 1em; }
.fact { padding: clamp(18px, 2.2vw, 24px); background: var(--stone); border-radius: var(--r-l); }
.prose .fact h2 { margin: 0 0 .9em; font-size: .72rem; font-weight: 600; line-height: 1.35; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
.fact p { margin: 0 0 .4em; }
.fact p:last-child { margin-bottom: 0; }

/* AGB: zwei Teile – Sprungkarten wie .link-card, Teil-Kopf mit 2-px-Regel in Lila */
.part-switch { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 0 0 1em; }
.part-link { display: grid; gap: 4px; align-content: start; padding: 16px 18px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-m);
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.part-link strong { font-size: 1.1rem; }
.part-link small { font-size: .85rem; line-height: 1.45; color: var(--ink-2); }
.part-link .badge { justify-self: start; margin-bottom: 4px; }
.part-link:hover { border-color: var(--lila); box-shadow: var(--sh-1); color: var(--ink); }
.legal-part { margin-top: clamp(40px, 6vw, 72px); }
.part-head { padding-top: 22px; border-top: 2px solid var(--lila); }
.prose .part-head h2 { margin: .5em 0 .4em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.part-head p { color: var(--ink-2); }
.legal-part .legal-sec > h3 { padding-top: 1em; border-top: 1px solid var(--line); }

/* Bildnachweis: Kacheln auf Stein */
.credit-list { list-style: none; margin: 1em 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.prose .credit-list { padding-left: 0; }
.prose .credit-list li + li { margin-top: 0; }
.credit-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; background: var(--stone); border-radius: var(--r-m); }
.credit-item strong { display: block; font-size: .92rem; line-height: 1.35; }
.credit-item .credit { display: block; margin-top: 3px; }
.credit-thumb { display: block; width: 96px; aspect-ratio: 4 / 3; border-radius: var(--r-s); overflow: hidden; background: var(--stone-2); }
.credit-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* ohne Vorschaubild (Fotos ohne Freigabe der GWG: kein Platzhalter mehr, die Seiten zeigen Renderings des 3D-Modells) */
.credit-item.no-thumb { grid-template-columns: minmax(0, 1fr); }
/* Ohne Freigabe der GWG: Vorschaubild ist ein Platzhalter, der Hinweis steht als Text daneben (Warnfarbe, 4,6:1 auf Stein) */
.credit-item .credit-ph { display: block; margin-top: 4px; font-size: .8rem; font-weight: 600; line-height: 1.35; color: var(--warn); }

/* ---------- Formulare (Kontakt, Newsletter) – Felder aus site.css (4.11) ---------- */
.form-card h2 { margin-top: 0; }
.contact-card > .h3, .form-card > .h3, .nl-card > .h3 { margin-bottom: 18px; }
.form-errors { margin-bottom: 18px; }
.form-errors p { margin: 0 0 .3em; }
.form-errors ul { margin: 0; padding-left: 1.2em; }
.form-errors a { color: var(--ink); text-decoration: underline; }
.form-errors a:hover { color: var(--bad); }
.field .error-text, .field .help { margin: 0; }
label .opt { font-size: .85em; font-weight: 500; letter-spacing: 0; color: var(--muted); }
fieldset.field { min-width: 0; margin: 4px 0 14px; padding: 0; border: 0; }
.check span { font-size: .92rem; line-height: 1.5; }
.privacy-hint { margin: 4px 0 6px; }
.form-card .btn[type=submit], .nl-card .btn[type=submit] { margin-top: 10px; }
.note h2.h3 { margin-bottom: .4em; }

/* Kontakt: Infos und Kurzwege auf Stein, Formular als weiße Karte mit Schatten */
.contact-grid { display: grid; gap: clamp(18px, 2.6vw, 28px); grid-template-areas: "info" "form" "quick"; }
.area-info { grid-area: info; } .area-form { grid-area: form; } .area-quick { grid-area: quick; }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "info form" "quick form"; align-items: start; }
}
.card.contact-card { background: var(--stone); border-color: transparent; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; overflow-wrap: anywhere; }
.contact-list .icon { width: 40px; height: 40px; padding: 9px; border-radius: var(--r-m); background: var(--paper); color: var(--lila); }
.contact-list .label { display: block; margin-bottom: 2px; font-size: .72rem; font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
.contact-list a { font-weight: 600; }
.quick-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quick-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-m);
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.quick-links a span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.quick-links small { font-size: .84rem; line-height: 1.4; color: var(--ink-2); }
.quick-links .arrow { width: 18px; height: 18px; flex: none; color: var(--lila); transition: transform .15s; }
.quick-links a:hover { border-color: var(--lila); box-shadow: var(--sh-1); color: var(--ink); }
.quick-links a:hover .arrow { transform: translateX(3px); }

/* Newsletter: Anmeldekarte wie das Newsletter-Band der Startseite (4.17) – Lila-Tönung, Radius 20, ohne Schatten */
.nl-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) { .nl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.nl-info { padding-top: 6px; }
.nl-info .checks li { font-weight: 500; }
.card.nl-card { padding: clamp(22px, 3.4vw, 40px); background: var(--lila-tint); border-color: transparent; border-radius: var(--r-xl); box-shadow: none; }

/* Ergebnisseiten (Newsletter bestätigt/abgemeldet): Statuskante links */
.result-card { border-left: 4px solid var(--line-2); }
.result-card.is-ok { border-left-color: var(--ok); }
.result-card.is-bad { border-left-color: var(--bad); }
.result-card .lead { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .quick-links a, .quick-links .arrow, .part-link, .legal-nav a { transition: none; }
  .quick-links a:hover .arrow { transform: none; }
}

/* Druck: Rechtstexte schwarz auf weiß, ohne Seitenleiste */
@media print {
  .legal-aside, .legal-toc-mobile, .legal-top, .part-switch { display: none !important; }
  .legal { display: block; }
  .page-hero { padding: 0 0 12px; }
  .page-hero > .wrap { background: none; }
  .legal-body, .legal-body *, .fact, .fact *, .page-hero * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  .fact, .legal-summary, .legal-callout, .table-wrap { border: 1px solid #999 !important; }
  mark.ph { background: #ffe9a8 !important; }
}

/* Tabellen in Rechtstexten: auf schmalen Bildschirmen als gestapelte Zeilen (kein seitliches Scrollen) */
@media (max-width: 600px) {
  .legal-table { overflow: visible; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table td { display: block; padding: 3px 14px; border: 0; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
  .legal-table caption { display: block; }
}
