/* static-pages.css — gemeinsames Stylesheet der statischen Seiten (CSP-Haertung,
 * QA-Welle 1 / Kapsel job_rechtstexte_en Abschnitt 7, umgesetzt 2026-07-28).
 *
 * Vorher brachte jede dieser 20 Seiten ihren Stil als <style>-Block mit; der
 * eigene Node-Server sendet style-src 'self' und blockierte das — lokal waren
 * die Seiten unformatiert. Jetzt laden alle per <link> diese eine Datei.
 *
 * Geltungsbereiche (Klasse am <html>-Element):
 *   html.p-recht        — /impressum.html, /datenschutz.html,
 *                         /en/legal-notice.html, /en/privacy.html
 *   html.p-404          — /404.html
 *   html.p-sprachstart  — die 15 Sprach-Startseiten /de/ ... /zh/
 *
 * Der Rechtsseiten-Block ist die Obermenge der vier frueheren Bloecke
 * (h3-Regel und Umbruch aus datenschutz.html, .note aus den en-Seiten);
 * Seiten ohne die betroffenen Elemente stellt das nachweislich gleich dar
 * (Screenshot-Vergleich 375/1280 px in der Task-Kapsel).
 *
 * ACHTUNG: Der Hintergrund unter html.p-sprachstart body muss dem themeColor
 * aus scripts/i18n/locales.json entsprechen; der Generator
 * scripts/i18n/generate-language-pages.mjs prueft das fail-closed.
 */

/* ===== Rechtsseiten (html.p-recht) ===== */
html.p-recht {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html.p-recht body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 22% 12%, rgba(95, 176, 154, 0.16), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(79, 143, 236, 0.14), transparent 26%),
    linear-gradient(180deg, #151617 0%, #101113 58%, #0d0e10 100%);
  color: #f6f3ee;
  line-height: 1.6;
}
html.p-recht main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
html.p-recht h1 { font-size: 1.8rem; margin-bottom: 0.2em; overflow-wrap: break-word; hyphens: auto; }
html.p-recht h2 { font-size: 1.15rem; margin-top: 2em; }
/* Lange deutsche Woerter ("Datenschutzerklaerung") sprengen bei starkem Zoom
 * die Zeile: bei 200 % auf einem 390-px-Handy bleiben 195 CSS-px, das Wort
 * braucht mehr. Ohne Umbruch entsteht Querscrollen auf der ganzen Seite
 * (gemessen live, 2026-07-28). Gilt fuer alle Seiten mit p-recht. */
html.p-recht p, html.p-recht dd, html.p-recht li { overflow-wrap: break-word; }
html.p-recht h3 { font-size: 1rem; margin-top: 1.4em; }
html.p-recht a { color: #8fc7ff; }
/* min-height: der Logo-Link mass 30x23 px und blieb damit 1 px unter der
 * WCAG-2.2-Mindestzielgroesse (Restbefund aus QA-Welle 1, F-21 — die
 * Fusszeilen-Links waren dort schon gefixt, der Logo-Link nicht). Gilt
 * zentral fuer alle Seiten mit p-recht. */
html.p-recht .legal-brand { display: inline-flex; align-items: center; min-height: 24px; width: 30px; margin-bottom: 18px; padding: 0; background: transparent; }
html.p-recht .legal-brand img { display: block; width: 100%; height: auto; aspect-ratio: 2000 / 1532.335; object-fit: contain; background: transparent; }
html.p-recht .card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 1em 0;
}
html.p-recht .note {
  border-left: 3px solid rgba(143, 199, 255, 0.5);
  padding: 2px 0 2px 14px;
  margin: 1.2em 0 0;
  color: rgba(246, 243, 238, 0.78);
  font-size: 0.92rem;
}
html.p-recht footer {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: rgba(246, 243, 238, 0.6);
}
html.p-recht footer a { margin-right: 16px; display: inline-flex; align-items: center; min-height: 24px; }

/* ===== Fehlerseite (html.p-404) ===== */
html.p-404 body { font-family: system-ui, -apple-system, sans-serif; background: #0b0d10; color: #e8eaed; display: grid; place-items: center; min-height: 100vh; margin: 0; }
html.p-404 main { text-align: center; padding: 2rem; }
html.p-404 .error-brand { display: inline-flex; width: 30px; margin-bottom: 2rem; padding: 0; background: transparent; }
html.p-404 .error-brand img { display: block; width: 100%; height: auto; aspect-ratio: 2000 / 1532.335; object-fit: contain; background: transparent; }
html.p-404 h1 { font-size: 3rem; margin: 0 0 0.5rem; }
html.p-404 p { color: #9aa0a6; margin: 0 0 1.5rem; }
html.p-404 a { color: #8ab4f8; text-decoration: none; border: 1px solid #3c4043; border-radius: 999px; padding: 0.6rem 1.4rem; display: inline-block; }

/* ===== Sprach-Startseiten (html.p-sprachstart) ===== */
html.p-sprachstart { color-scheme: light; }
html.p-sprachstart * { box-sizing: border-box; }
html.p-sprachstart body { margin: 0; background: #f7f7f4; color: #1c1c1a; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; line-height: 1.6; }
html.p-sprachstart .wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 56px; }
html.p-sprachstart header.top { display: flex; align-items: center; margin-bottom: 40px; }
html.p-sprachstart header.top a { display: inline-flex; max-width: 100%; }
html.p-sprachstart header.top img { width: clamp(26px, 4.5vw, 30px); height: auto; aspect-ratio: 2000 / 1532.335; object-fit: contain; background: transparent; }
html.p-sprachstart h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.2; margin: 0 0 12px; }
html.p-sprachstart p.tagline { font-size: 18px; color: #44443f; margin: 0 0 24px; }
html.p-sprachstart a.cta { display: inline-block; background: #1c1c1a; color: #f7f7f4; text-decoration: none; padding: 12px 26px; border-radius: 999px; font-weight: 600; }
html.p-sprachstart a.cta:hover { background: #333330; }
html.p-sprachstart h2 { font-size: 22px; margin: 48px 0 16px; }
html.p-sprachstart .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
html.p-sprachstart .card { background: #ffffff; border: 1px solid #e6e6e0; border-radius: 14px; padding: 18px; }
html.p-sprachstart .card h3 { margin: 0 0 8px; font-size: 16px; }
html.p-sprachstart .card p { margin: 0; font-size: 14.5px; color: #44443f; }
html.p-sprachstart details { background: #ffffff; border: 1px solid #e6e6e0; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
html.p-sprachstart summary { cursor: pointer; font-weight: 600; }
html.p-sprachstart details p { margin: 10px 0 4px; color: #44443f; }
html.p-sprachstart nav.langs { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
html.p-sprachstart nav.langs a { color: #1c1c1a; text-decoration: none; border-bottom: 1px solid #c9c9c2; padding-bottom: 1px; font-size: 14.5px; }
html.p-sprachstart nav.langs a:hover { border-color: #1c1c1a; }
html.p-sprachstart footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid #e6e6e0; font-size: 13.5px; color: #6b6b64; display: flex; flex-wrap: wrap; gap: 8px 18px; }
html.p-sprachstart footer a { color: #6b6b64; }

/* ===== Betriebsstatus (html.p-status, zusaetzlich zu p-recht) =====
 * Die Zustaende sind IMMER auch als Wort ausgeschrieben ("laeuft", "gestoert",
 * "nicht erreichbar"). Farbe und Symbol sind Zugabe — niemals der einzige
 * Traeger der Aussage (Barrierefreiheit, WCAG 1.4.1).
 */
html.p-status .status-gesamt {
  font-size: 1.05rem;
  margin: 0 0 1.2em;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
html.p-status .status-gesamt[data-stufe="ok"] { border-color: rgba(95, 176, 154, 0.55); }
html.p-status .status-gesamt[data-stufe="teilweise"] { border-color: rgba(230, 184, 92, 0.55); }
html.p-status .status-gesamt[data-stufe="aus"] { border-color: rgba(226, 122, 122, 0.6); }

html.p-status .status-liste { list-style: none; margin: 0; padding: 0; }
html.p-status .status-zeile { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
html.p-status .status-zeile:first-child { border-top: 0; padding-top: 0; }
html.p-status .status-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; }
html.p-status .status-punkt { font-size: 0.8rem; line-height: 1; }
html.p-status .ist-ok .status-punkt { color: #6fc9ad; }
html.p-status .ist-gestoert .status-punkt { color: #e6b85c; }
html.p-status .ist-unerreichbar .status-punkt { color: #e27a7a; }
html.p-status .status-wert { margin-left: auto; font-size: 0.9rem; color: rgba(246, 243, 238, 0.72); }
html.p-status .status-text { margin: 4px 0 0; font-size: 0.92rem; color: rgba(246, 243, 238, 0.7); }

html.p-status .status-fuss {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  margin: 1.2em 0 0; padding-top: 1em; border-top: 1px solid rgba(255, 255, 255, 0.07);
}
html.p-status .status-knopf {
  font: inherit; font-size: 0.92rem; color: #f6f3ee; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px; padding: 8px 18px; min-height: 24px;
}
html.p-status .status-knopf:hover { background: rgba(255, 255, 255, 0.12); }
html.p-status .status-stand { font-size: 0.85rem; color: rgba(246, 243, 238, 0.55); }

/* ===== Hilfeseite (html.p-hilfe, zusaetzlich zu p-recht) ===== */
html.p-hilfe .hilfe-vorspann { color: rgba(246, 243, 238, 0.78); margin: 0 0 1.4em; }
html.p-hilfe .hilfe-inhalt { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 1em; padding-bottom: 1.2em; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
html.p-hilfe .hilfe-inhalt a { font-size: 0.92rem; display: inline-flex; align-items: center; min-height: 24px; }
html.p-hilfe .hilfe-liste { margin: 0; }
html.p-hilfe .hilfe-liste dt { font-weight: 600; margin-top: 1em; }
html.p-hilfe .hilfe-liste dt:first-child { margin-top: 0; }
html.p-hilfe .hilfe-liste dd { margin: 2px 0 0; color: rgba(246, 243, 238, 0.72); font-size: 0.95rem; }
