/* Rechtsseiten im Website-Design: AGB für Gäste, Datenschutz, Impressum, 404 und die aktuelle Seite der AGB für
   Restaurants (public/partner-agb.html, Vertragstext Wort für Wort die geltende Fassung, Test in partner-terms.test.ts).
   Die Fassungen unter fester Adresse (public/partner-agb/<Datum>.html) bleiben Byte für Byte so, wie sie angenommen
   wurden (SHA-256 in apps/web/src/lib/legal/partner-terms.ts) – dort nie nachträglich Kopf, Fuß oder Stil umhängen.
   Baustein vom 15.10.2026, am 23.10.2026 auf DESIGN.md (Richtung vom 19.10.) umgestellt und an die Rechtsseiten
   gehängt (die Rechtsseiten standen noch in einem alten Design). Farben wie die Website: Grund Weiß, App-Grau als Fläche,
   Schrift Anthrazit, Gelb nur für Knöpfe. Kopf schlicht (Lockup + „Zur Startseite“), Fuß wie `Footer` in
   src/site/Layout.tsx – ändert sich der Fuß dort, hier und in den Rechtsseiten nachziehen.
   Der Rechtstext selbst bleibt unverändert; der Baustein liest nur die vorhandene Gliederung:
     <main> → <div class="legal"> → <section> mit <h2 class="legal-h">Nr · Titel</h2>, <section class="anlage">,
     <p class="legal-note"> (diese Struktur braucht auch der PDF-Baustein des Capo-Chats – nicht ändern).

   Aufbau einer Rechtsseite (Kopf, Verzeichnis und Fuß wörtlich aus impressum.html übernehmen, <main> bleibt Wort für Wort):

     <link rel="stylesheet" href="/recht/recht.css" />
     <script src="/recht/recht.js" defer></script>
     …
     <body class="recht">
     <header class="recht-kopf">…</header>
     <div class="recht-raster">
       <nav class="recht-inhalt" aria-label="Inhalt"><details open><summary>Inhalt</summary><div data-recht-inhalt></div></details></nav>
       <main>…unverändert…</main>
     </div>
     <footer class="recht-fuss">…</footer>

   Partner-AGB mit PDF: direkt unter der <h1> <a class="recht-pdf" href="2026-10-15.pdf">Als PDF (zum Ausdrucken)</a>
   – erst einsetzen, wenn die PDF-Datei daneben liegt. */

@font-face { font-family: "Switzer"; src: url("/fonts/switzer-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/fonts/switzer-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/fonts/switzer-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

.recht {
  --weiss: #FFFFFF; --grau: #F5F4F1; --ink: #161311; --ink-2: #5E5853; --linie: rgba(22, 19, 17, .12);
  --linie-stark: rgba(22, 19, 17, .22); --gelb: #FFCC00; --gelb-hover: #F2C000;
  margin: 0; background: var(--weiss); color: var(--ink);
  font: 16px/1.7 "Switzer", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased;
}
.recht *, .recht *::before, .recht *::after { box-sizing: border-box; }
.recht a { color: inherit; text-underline-offset: 3px; }
.recht :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* Kopf wie die Website: weiß, Logo-Lockup links, Weg zurück rechts */
.recht-kopf {
  position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--linie);
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.recht-kopf-in {
  max-width: 76rem; height: 72px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.recht-marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
/* Logo wie der Kopf der Website (seit 3.11.2026): Haube ohne Kreis aus den Logo-Teilen + Wortmarke auf roter Plakette.
   Maße seit 4.11.2026 wie dort (marke.css): Haube 64 × 48, Plakette 38 hoch und mittig zur Haube (Unterkante auf
   dem Kuppelfuß). Hier bleiben es Bilder: der Prüfwert lässt die HTML-Dateien nicht ändern.
   Nur hier im CSS – die Rechtstexte (HTML) bleiben unberührt, partner-agb.html ist per Prüfwert festgeschrieben. */
.recht-haube { display: block; flex: none; width: 64px; height: 48px; overflow: visible; }
.recht-haube + img { display: block; width: auto; height: 38px; }
.recht-zurueck {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: var(--weiss); box-shadow: inset 0 0 0 1.5px var(--linie-stark); font-size: 15px; font-weight: 600; text-decoration: none;
}
.recht-zurueck:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Leiste unter dem Kopf (seit 24.10.2026, Vorbild Stripe-Rechtsbereich): Reiter zu allen Rechtstexten wie in der App
   (weiß mit Linie, aktiv gelb), rechts der Stand des Textes und „Drucken“ – beides setzt recht.js aus „Stand: …“ am
   Ende des Textes ein; der Platz ist vorher schon reserviert, damit nichts springt. */
.recht-leiste { border-bottom: 1px solid var(--linie); }
.recht-leiste-in {
  max-width: 76rem; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}
.recht-dokumente { display: flex; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.recht-dokumente::-webkit-scrollbar { display: none; }
.recht-dokumente a {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--weiss); box-shadow: inset 0 0 0 1px var(--linie-stark);
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.recht-dokumente a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.recht-dokumente a[aria-current="page"] { background: var(--gelb); box-shadow: none; font-weight: 600; }
@media (pointer: coarse) { .recht-dokumente a { min-height: 44px; } }
.recht-stand { margin: 0; min-height: 36px; display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.recht-drucken {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px var(--linie-stark); color: var(--ink);
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1;
}
.recht-drucken:hover { box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 640px) { .recht-drucken { display: none; } } /* Drucken nur am Rechner */

/* Raster: Inhaltsverzeichnis links, Text rechts; am Handy das Verzeichnis zum Aufklappen über dem Text.
   Ohne Verzeichnis (404) steht der Text allein in der Mitte. */
.recht-raster {
  max-width: 76rem; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 40px) clamp(64px, 9vw, 112px);
  display: grid; gap: 24px;
}
.recht-raster > main { width: 100%; max-width: 46rem; margin: 0 auto; min-width: 0; }
@media (min-width: 1100px) {
  .recht-raster:has(> .recht-inhalt) { grid-template-columns: 16rem minmax(0, 46rem); gap: 56px; justify-content: center; align-items: start; }
  .recht-raster:has(> .recht-inhalt) > main { margin: 0; }
  .recht-inhalt { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
}
.recht-inhalt details { background: var(--grau); border-radius: 20px; padding: 14px 18px; }
.recht-inhalt summary { cursor: pointer; font-size: 15px; font-weight: 600; padding: 4px 0; }
.recht-inhalt ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.recht-inhalt a { display: block; padding: 6px 8px; border-radius: 10px; font-size: 14px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.recht-inhalt a:hover { background: var(--weiss); color: var(--ink); }
/* Abschnitt, der gerade oben steht (recht.js) – Fläche statt Strich, wie der aktive Reiter in der App */
.recht-inhalt a[aria-current="true"] { background: var(--weiss); color: var(--ink); font-weight: 600; }

/* Der Rechtstext (vorhandene Klassen) */
.recht main .wrap { max-width: none; margin: 0; padding: 0; }
.recht .eyebrow { display: block; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
/* Klein genug, dass „Geschäftsbedingungen“ und „Datenschutzerklärung“ ab 320 px in eine Zeile passen: Silbentrennung
   fehlt in manchen Browsern, dann bräche das Wort sonst irgendwo („…bedingunge / n“, gesehen 23.10.2026). */
.recht h1 {
  font-size: clamp(1.6rem, .6rem + 4.2vw, 3.25rem); font-weight: 600; line-height: 1.04; letter-spacing: -.035em;
  margin: 10px 0 0; text-wrap: balance; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
}
/* Nur auf der aktuellen Seite /partner-agb: welche Fassung sie zeigt und wo die unveränderlichen Fassungen liegen */
.recht-fassung { margin: 14px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.recht-fassung a { color: var(--ink); font-weight: 500; }
.recht-pdf {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 18px; padding: 0 20px; border-radius: 999px;
  background: var(--gelb); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.recht-pdf:hover { background: var(--gelb-hover); }
.recht .legal { margin-top: 36px; display: flex; flex-direction: column; gap: 40px; color: var(--ink-2); }
.recht .legal strong, .recht .legal b { color: var(--ink); font-weight: 600; }
.recht .legal-h {
  font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; color: var(--ink);
  margin: 0 0 10px; scroll-margin-top: 96px; text-wrap: balance;
}
.recht .legal p { margin: 0; max-width: 70ch; }
.recht .legal p + p { margin-top: 12px; }
.recht .legal ol, .recht .legal ul { margin: 10px 0 0; padding-left: 1.3rem; max-width: 70ch; }
.recht .legal li + li { margin-top: 4px; }
.recht .legal a { color: var(--ink); text-decoration-thickness: 1px; }
.recht .legal a:hover { text-decoration-thickness: 2px; }
.recht .legal-a { font-weight: 600; }
.recht .anlage { border-top: 2px solid var(--ink); padding-top: 28px; }
.recht table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.5; margin-top: 10px; font-variant-numeric: tabular-nums; }
.recht th, .recht td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.recht th { font-weight: 600; color: var(--ink); background: var(--grau); }
@media (max-width: 640px) { .recht table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }
.recht .legal-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--linie); }

/* Fuß wie die Website (Layout.tsx `Footer`, kopf-fuss.css): seit 3.11.2026 hell, Logo mit roter Plakette */
.recht-fuss { background: var(--weiss); color: var(--ink); padding: 56px 0 32px; border-top: 1px solid var(--linie); }
.recht-fuss-in { max-width: 76rem; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.recht-fuss-spalten { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.recht-fuss-logo { display: inline-flex; align-items: center; gap: 10px; }
.recht-fuss-spalten p { margin: 14px 0 0; max-width: 34ch; font-size: 15px; color: var(--ink-2); }
.recht-fuss h2 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.recht-fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.recht-fuss a { font-size: 15px; color: var(--ink); text-decoration: none; }
.recht-fuss a:hover { text-decoration: underline; }
.recht-fuss-unten {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--linie);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2);
}
@media (max-width: 820px) {
  .recht-fuss-spalten { grid-template-columns: 1fr 1fr; }
  .recht-fuss-spalten > :first-child { grid-column: 1 / -1; }
}

/* Druck: nur der Text, schwarz auf weiß */
@media print {
  @page { margin: 18mm 16mm; }
  .recht { background: #FFFFFF; font-size: 10.5pt; line-height: 1.5; }
  .recht-kopf, .recht-leiste, .recht-fuss, .recht-inhalt, .recht-pdf { display: none !important; }
  .recht-raster { display: block; padding: 0; max-width: none; }
  .recht-raster > main { max-width: none; }
  .recht .legal { color: #000; gap: 14pt; }
  .recht .legal-h { break-after: avoid; page-break-after: avoid; }
  .recht table, .recht tr { break-inside: avoid; }
  .recht .anlage { break-before: page; }
}
