/* Öffentliche Seite — Landing, Modulseiten, Rechtstexte.
   Lädt NUR tokens.css + theme.css darunter, bewusst nicht app.css: das ist
   App-Chrome (Nav, Tab-Bar, Shells, 1950 Zeilen), von dem die öffentliche
   Seite kein Stück benutzt — und sie ist die eine Fläche, auf der die erste
   Zehntelsekunde zählt. Was hier gebraucht wird, steht hier.

   Farbwelten wie überall: HELL = Volt (Kobalt-Band, heller Inhalt darunter),
   DUNKEL = Nachtschicht. Beide Zustände müssen tokenidentisch zu theme.css
   geschaltet werden — [data-theme="dark"] PLUS die System-Präferenz ohne
   Attribut. Wer nur eine der beiden Regeln schreibt, baut eine Seite, die
   für die Hälfte der Besucher in der falschen Farbwelt steht. */

/* ------------------------------------------------------------------ *
 *  Flächen-Tokens
 *  Das Band ist eine MARKEN-Fläche, keine Themen-Fläche: in HELL Kobalt
 *  (#1B2ED9, wie flaechen/cox-*-volt), in DUNKEL Nachtschicht (#0A0B0D,
 *  wie das OG-Bild). Deshalb eigene Tokens statt --bg-primary — in HELL
 *  ist --bg-primary zufällig auch Kobalt, aber aus einem anderen Grund
 *  (dort ist Kobalt der Seitengrund, auf dem weisse Karten schwimmen).
 * ------------------------------------------------------------------ */
:root {
    --pub-band:       #1B2ED9;
    --pub-band-ink:   #FFFFFF;
    --pub-band-dim:   rgba(255, 255, 255, 0.76);
    --pub-band-edge:  rgba(255, 255, 255, 0.20);
    --pub-band-fill:  rgba(255, 255, 255, 0.10);
    /* Deko-Gelb trägt auf Kobalt den dritten Schlag und die Linien — nie
       Text (Markenregel; auf Kobalt verschwände Elektroblau im Grund). */
    --pub-deco:       #FFE600;
    --pub-surface:    #F2F5FF;
    --pub-surface-2:  #FFFFFF;
    --pub-mark:       url('/static/brand/cox-header-auf-volt.svg');
    --pub-mark-solid: url('/static/brand/cox-header-auf-hell.svg');
    /* Der Kontrast auf Kobalt ist hoch genug für reines Weiss; ein CTA in
       Weiss mit Kobalt-Schrift ist das kräftigste Paar, das die Marke hat. */
    --pub-cta-bg:     #FFFFFF;
    --pub-cta-ink:    #1B2ED9;
    /* Hoehe der Leiste. Sie ueberlagert das Band (siehe body.pub > main),
       also muss der Wert bekannt sein — gemessen wird nichts, sonst haengt
       das Layout an einem Skript. `min-height` auf .pub-nav-in nagelt ihn
       fest, damit er nicht mit der Schriftgroesse wandert. */
    --pub-nav-h:      68px;
}

@media (max-width: 860px) {
    /* Mobil kommt die Linkzeile unter der Leiste dazu (absolut positioniert,
       damit sie das Band ueberlagert statt es nach unten zu schieben). */
    :root { --pub-nav-h: 96px; }
}

[data-theme="dark"] {
    --pub-band:       #0A0B0D;
    --pub-band-ink:   #E8E4DC;
    --pub-band-dim:   rgba(232, 228, 220, 0.70);
    --pub-band-edge:  rgba(232, 228, 220, 0.16);
    --pub-band-fill:  rgba(232, 228, 220, 0.07);
    /* In DUNKEL führt Bernstein — Gelb wäre hier die falsche Familie. */
    --pub-deco:       #E89830;
    --pub-surface:    #0A0B0D;
    --pub-surface-2:  #131416;
    --pub-mark:       url('/static/brand/cox-header-auf-dunkel.svg');
    --pub-mark-solid: url('/static/brand/cox-header-auf-dunkel.svg');
    --pub-cta-bg:     #E89830;
    --pub-cta-ink:    #16110A;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pub-band:       #0A0B0D;
        --pub-band-ink:   #E8E4DC;
        --pub-band-dim:   rgba(232, 228, 220, 0.70);
        --pub-band-edge:  rgba(232, 228, 220, 0.16);
        --pub-band-fill:  rgba(232, 228, 220, 0.07);
        --pub-deco:       #E89830;
        --pub-surface:    #0A0B0D;
        --pub-surface-2:  #131416;
        --pub-mark:       url('/static/brand/cox-header-auf-dunkel.svg');
        --pub-mark-solid: url('/static/brand/cox-header-auf-dunkel.svg');
        --pub-cta-bg:     #E89830;
        --pub-cta-ink:    #16110A;
    }
}

/* ------------------------------------------------------------------ *
 *  Grundgerüst
 * ------------------------------------------------------------------ */
body.pub {
    background: var(--pub-surface);
    color: var(--text-primary);
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    /* Ein Anker-Sprung darf nicht unter der festen Leiste landen. */
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--pub-nav-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
    body.pub { scroll-behavior: auto; }
}

/* Die Leiste sitzt im DOM VOR <main> und ist sticky — sie belegt damit
   eigenen Platz oben, ueber dem hellen Seitengrund. Gewollt ist aber, dass
   sie auf dem Marken-Band liegt. Also wird der Inhalt um genau die
   Leistenhoehe hochgezogen; die Leiste bleibt im Fluss (sticky) und
   rendert wegen z-index darueber. Das Band gibt sich denselben Betrag als
   Innenabstand zurueck, damit nichts unter ihr klebt. */
body.pub > main { margin-top: calc(-1 * var(--pub-nav-h)); }

.pub-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.pub-wrap--narrow { max-width: 760px; }

/* Sprungmarke für die Tastatur: sichtbar erst beim Fokus. Eine Seite mit
   einer langen Leiste braucht sie, sonst tabbt man sich durch die Nav,
   bevor man beim Inhalt ist. */
.pub-skip {
    position: absolute; left: -9999px; top: 0; z-index: 60;
    background: var(--pub-cta-bg); color: var(--pub-cta-ink);
    padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.pub-skip:focus { left: 0; }

/* ------------------------------------------------------------------ *
 *  Das Band — Marken-Fläche, oben auf jeder öffentlichen Seite
 *  Die Textur ist die Logo-Geometrie: die drei Schläge stehen 11° aus der
 *  Senkrechten (dx 16 / dy 84 aus der kanonischen Zeichnung). Ein
 *  Streifenmuster in derselben Neigung ist deshalb kein Dekor von der
 *  Stange, sondern dasselbe Zeichen sehr gross und sehr leise.
 * ------------------------------------------------------------------ */
.pub-band {
    position: relative;
    background: var(--pub-band);
    color: var(--pub-band-ink);
    overflow: hidden;
    isolation: isolate;
}

.pub-band::before {
    content: '';
    position: absolute; inset: -20% -10%;
    background: repeating-linear-gradient(
        101deg,
        transparent 0 46px,
        var(--pub-band-fill) 46px 50px);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

/* Weicher Abschluss nach unten, damit die Kante zum hellen Inhalt nicht
   als harte Linie über die ganze Breite steht. */
.pub-band::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
    background: linear-gradient(180deg, transparent,
                color-mix(in srgb, var(--pub-band) 55%, #000 12%));
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}

/* `:not([class])` ist hier keine Kosmetik, sondern der Punkt: `.pub-band a`
   waere (0,1,1) und schluege damit JEDE Knopf-Klasse (0,1,0) — der CTA
   stand als weisse Schrift auf weissem Grund da, im DOM voellig korrekt.
   Dieselbe Falle wie `.fps-main a` (25b) und `.fp-dd-card a` (25h). So
   faerbt die Regel nur Fliesstext-Links, die keine eigene Klasse haben. */
.pub-band a:not([class]) { color: var(--pub-band-ink); }

/* ------------------------------------------------------------------ *
 *  Leiste
 * ------------------------------------------------------------------ */
.pub-nav {
    position: sticky; top: 0; z-index: 40;
    transition: background var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out);
}

.pub-nav-in {
    display: flex; align-items: center; gap: 20px;
    max-width: 1120px; margin: 0 auto;
    padding: 14px 24px;
    min-height: 40px;   /* + 2×14 Innenabstand = --pub-nav-h */
}

/* Die Wortmarke ist eine Bilddatei, kein Nachbau: die Marke wird aus dem
   Generator geliefert (docs/design/brand), nicht aus Wortmarke + Zeichen
   zusammengesetzt. Getauscht wird die DATEI, nie die Farbe. */
.pub-mark {
    display: block; width: 108px; height: 27px;
    background: var(--pub-mark) left center / contain no-repeat;
    flex: 0 0 auto;
}
.pub-mark span { position: absolute; left: -9999px; }

.pub-nav-links {
    display: flex; align-items: center; gap: 4px;
    margin-left: 8px; flex: 1 1 auto;
}

.pub-nav-links a {
    padding: 7px 12px; border-radius: 9px;
    font-size: 0.92rem; font-weight: 600;
    color: var(--pub-band-dim); text-decoration: none;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}
.pub-nav-links a:hover,
.pub-nav-links a[aria-current="page"] {
    background: var(--pub-band-fill); color: var(--pub-band-ink);
}

.pub-nav-act { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.pub-nav-act .pub-plain {
    font-size: 0.92rem; font-weight: 600; text-decoration: none;
    color: var(--pub-band-dim); padding: 7px 4px;
}
.pub-nav-act .pub-plain:hover { color: var(--pub-band-ink); }

/* Fest geworden: die Leiste hat das Band verlassen und braucht eigenen
   Grund. Zwei Dinge kippen mit — Grund und Marke; die Textfarben hängen
   an denselben Variablen, deshalb genügt hier ein Neusetzen. */
.pub-nav.is-stuck {
    background: var(--pub-surface-2);
    box-shadow: 0 1px 0 var(--bg-card-border), 0 8px 24px rgba(10, 14, 60, 0.07);
    --pub-band-ink: var(--text-primary);
    --pub-band-dim: var(--text-secondary);
    --pub-band-fill: var(--accent-primary-soft);
    --pub-mark: var(--pub-mark-solid);
}
[data-theme="dark"] .pub-nav.is-stuck {
    box-shadow: 0 1px 0 var(--bg-card-border), 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Der CTA ist auf dem Band weiss auf Kobalt. Sobald die Leiste ihren
   eigenen hellen Grund bekommt, waere er weiss auf weiss — also kippt er
   dort auf die Fuehrungsfarbe. Klassen-Duo statt `!important`: die Regel
   ist spezifischer als `.pub-btn--cta` und steht spaeter. */
.pub-nav.is-stuck .pub-btn--cta {
    background: var(--accent-primary); color: #fff;
    box-shadow: 0 2px 0 color-mix(in srgb, var(--accent-primary) 55%, #000);
}
[data-theme="dark"] .pub-nav.is-stuck .pub-btn--cta { color: #16110A; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pub-nav.is-stuck .pub-btn--cta {
        color: #16110A;
    }
}

/* Mobil: die drei Modullinks passen nicht neben Marke und Knopf. Sie
   wandern unter die Leiste in eine eigene, scrollbare Zeile — das
   braucht kein Menü, keinen Zustand und nichts, was hängen bleiben kann. */
@media (max-width: 860px) {
    .pub-nav-in { gap: 12px; padding: 12px 16px; }
    .pub-nav-links {
        position: absolute; left: 0; right: 0; top: 100%;
        margin: 0; padding: 0 16px 10px;
        overflow-x: auto; scrollbar-width: none;
        background: inherit;
    }
    .pub-nav-links::-webkit-scrollbar { display: none; }
    .pub-nav-links a { white-space: nowrap; font-size: 0.86rem; }
    .pub-nav.is-stuck .pub-nav-links {
        background: var(--pub-surface-2);
        box-shadow: 0 8px 24px rgba(10, 14, 60, 0.07);
    }
    .pub-nav-act .pub-plain { display: none; }
    .pub-mark { width: 92px; height: 23px; }
}

/* ------------------------------------------------------------------ *
 *  Knöpfe
 * ------------------------------------------------------------------ */
.pub-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 12px 22px; border-radius: 12px;
    font-family: inherit; font-size: 1rem; font-weight: 700;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}
.pub-btn:active { transform: translateY(1px); }

/* Auf dem Band: weiss auf Kobalt (bzw. Bernstein auf Nachtschicht). */
.pub-btn--cta {
    background: var(--pub-cta-bg); color: var(--pub-cta-ink);
    box-shadow: 0 2px 0 rgba(10, 14, 60, 0.28);
}
.pub-btn--cta:hover { box-shadow: 0 4px 0 rgba(10, 14, 60, 0.28); transform: translateY(-1px); }

.pub-btn--ghost {
    background: transparent; color: var(--pub-band-ink);
    border-color: var(--pub-band-edge);
}
.pub-btn--ghost:hover { background: var(--pub-band-fill); }

/* Auf hellem Grund: die Führungsfarbe der Farbwelt. */
.pub-btn--solid {
    background: var(--accent-primary); color: #fff;
    box-shadow: 0 2px 0 color-mix(in srgb, var(--accent-primary) 55%, #000);
}
[data-theme="dark"] .pub-btn--solid { color: #16110A; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pub-btn--solid { color: #16110A; }
}
.pub-btn--solid:hover { transform: translateY(-1px); }

.pub-btn--sm { padding: 9px 16px; font-size: 0.9rem; border-radius: 10px; }

/* ------------------------------------------------------------------ *
 *  Hero
 * ------------------------------------------------------------------ */
/* Oben die Leistenhoehe zurueckgeben, die `main` sich geholt hat. */
.pub-hero { padding-block: calc(var(--pub-nav-h) + 34px) 104px; position: relative; }

.pub-hero h1 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.1rem);
    font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
    margin: 0; max-width: 15ch;
    text-wrap: balance;
}

.pub-hero .pub-lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55; color: var(--pub-band-dim);
    margin: 22px 0 0; max-width: 46ch;
    text-wrap: pretty;
}

/* Die Deko-Linie: der einzige Ort, an dem Gelb gross auftritt. Drei
   Segmente — dieselbe Zählung wie die drei Schläge. */
.pub-rule {
    display: flex; gap: 6px; margin: 0 0 26px;
}
.pub-rule i {
    display: block; height: 4px; border-radius: 2px;
    background: var(--pub-deco);
}
.pub-rule i:nth-child(1) { width: 34px; }
.pub-rule i:nth-child(2) { width: 18px; }
.pub-rule i:nth-child(3) { width: 8px; opacity: 0.7; }

.pub-hero-act {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    margin-top: 34px;
}

.pub-hero-note {
    margin: 18px 0 0; font-size: 0.88rem; color: var(--pub-band-dim);
}

/* Kennzahlen-Streifen am Fuss des Heros — Substanz statt Versprechen. */
.pub-facts {
    display: flex; flex-wrap: wrap; gap: 10px 40px;
    margin-top: 56px; padding-top: 26px;
    border-top: 1px solid var(--pub-band-edge);
}
.pub-fact { display: flex; flex-direction: column; gap: 2px; }
.pub-fact b {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.pub-fact span { font-size: 0.82rem; color: var(--pub-band-dim); }

@media (max-width: 860px) {
    .pub-hero { padding-block: calc(var(--pub-nav-h) + 26px) 64px; }
    .pub-facts { gap: 18px 28px; margin-top: 40px; }
    .pub-fact b { font-size: 1.25rem; }
}

/* Unterseiten: dasselbe Band, nur flacher — der Hero der Startseite ist
   ein Auftritt, der einer Unterseite eine Überschrift. */
.pub-hero--sub { padding-block: calc(var(--pub-nav-h) + 26px) 72px; }
.pub-hero--sub h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 18ch; }
.pub-hero--sub .pub-lead { margin-top: 18px; }
@media (max-width: 860px) {
    .pub-hero--sub { padding-block: calc(var(--pub-nav-h) + 18px) 52px; }
}

/* Abschluss-Band mit dem Aufruf — steht am Fuss jeder Unterseite, direkt
   über dem Fuss. Der Fuss trägt dieselbe Fläche, deshalb ohne Fuge. */
.pub-cta {
    padding-block: 64px 56px;
    border-top: 1px solid var(--pub-band-edge);
}
.pub-cta h2 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700;
    letter-spacing: -0.03em; line-height: 1.15; margin: 0;
    color: var(--pub-band-ink); max-width: 20ch;
    text-wrap: balance;
}
.pub-cta p { color: var(--pub-band-dim); margin: 14px 0 0; max-width: 52ch; line-height: 1.6; }
.pub-cta .pub-hero-act { margin-top: 26px; }

/* ------------------------------------------------------------------ *
 *  Abschnitte auf hellem Grund
 * ------------------------------------------------------------------ */
.pub-sec { padding: 76px 0; }
.pub-sec--tight { padding: 52px 0; }
.pub-sec--alt { background: var(--pub-surface-2); }

.pub-eyebrow {
    display: inline-block;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--accent-primary);
    margin: 0 0 10px;
}

.pub-h2 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.12;
    margin: 0; color: var(--text-primary);
    text-wrap: balance;
}

/* Gelbe Unterstreichung wie im App-Kopf (--headline-bg): Deko, nie Text. */
.pub-h2--marked::after {
    content: ''; display: block;
    width: 46px; height: var(--headline-h, 3px);
    background: var(--headline-bg, var(--pub-deco));
    border-radius: 2px; margin-top: 14px;
}

.pub-sub {
    font-size: 1.05rem; line-height: 1.6; color: var(--text-secondary);
    margin: 16px 0 0; max-width: 62ch;
    text-wrap: pretty;
}

.pub-sec p a, .pub-card p a, .pub-li a {
    color: var(--accent-primary); text-underline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 *  Karten
 * ------------------------------------------------------------------ */
.pub-grid { display: grid; gap: 18px; margin-top: 36px; }
.pub-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .pub-grid--3, .pub-grid--2 { grid-template-columns: minmax(0, 1fr); }
}

.pub-card {
    background: var(--pub-surface-2);
    border: 1px solid var(--card-edge, var(--bg-card-border));
    border-radius: var(--radius-lg, 14px);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}
.pub-sec--alt .pub-card { background: var(--pub-surface); }

a.pub-card {
    text-decoration: none; color: inherit;
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}
a.pub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.pub-card h3 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em;
    margin: 0 0 8px; color: var(--text-primary);
}
.pub-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; font-size: 0.96rem; }

/* Gefüllter Icon-Chip wie in der App (--iconchip-bg). */
.pub-chip {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--iconchip-bg, var(--accent-primary));
    color: var(--iconchip-ink, #fff);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.pub-chip svg { width: 20px; height: 20px; }

.pub-card-more {
    margin-top: auto; padding-top: 16px;
    font-size: 0.9rem; font-weight: 700; color: var(--accent-primary);
}
.pub-card-more::after { content: ' →'; }

/* ------------------------------------------------------------------ *
 *  Feature-Zeilen — Text und Bild abwechselnd
 * ------------------------------------------------------------------ */
.pub-row {
    display: grid; gap: 44px; align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    padding: 44px 0;
}
.pub-row + .pub-row { border-top: 1px solid var(--bg-card-border); }

/* Jede zweite Zeile spiegelt. Die Reihenfolge im DOM bleibt Text→Bild,
   damit ein Screenreader nicht mitspiegeln muss. */
.pub-row:nth-child(even) .pub-row-media { order: -1; }

@media (max-width: 900px) {
    .pub-row { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 0; }
    .pub-row:nth-child(even) .pub-row-media { order: 0; }
}

.pub-row h3 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    font-weight: 700; letter-spacing: -0.02em; line-height: 1.2;
    margin: 0 0 12px; color: var(--text-primary);
}
.pub-row p { margin: 0; color: var(--text-secondary); line-height: 1.65; }
.pub-row p + p { margin-top: 12px; }

/* Produktbild.
   Als HINTERGRUND, nicht als <img>: die Aufnahmen gibt es in beiden
   Farbwelten, und getauscht werden muss die DATEI (ein heller Screenshot
   auf dunkler Seite sieht falsch aus). Zwei <img> übereinander würden
   beide geladen; von zwei konkurrierenden Hintergrund-Regeln holt der
   Browser nur die, die wirklich gilt. Gleiches Idiom wie .fp-sso-mark.

   Die Kehrseite: ein Hintergrund trägt keine Alternative und kein
   loading="lazy" — deshalb role="img" + aria-label am Element, und
   deshalb bleiben die Bilder klein (WebP, ~35 kB).

   `aspect-ratio` reserviert den Platz vorab; ohne sie springt das Layout,
   sobald ein Bild eintrifft. Die Werte sind die echten Aufnahmemaße
   (1120×700 bzw. 780×1520) — schwankende Seitenverhältnisse wären genau
   der Grund, aus dem der Rig mit festem Fenster aufnimmt. */
.pub-shot {
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--card-edge, var(--bg-card-border));
    background-color: var(--pub-surface-2);
    background-image: var(--shot);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    aspect-ratio: 1120 / 700;
    box-shadow: 0 12px 34px rgba(10, 14, 60, 0.10);
}
[data-theme="dark"] .pub-shot {
    background-image: var(--shot-dark, var(--shot));
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pub-shot {
        background-image: var(--shot-dark, var(--shot));
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    }
}

/* Handy-Ausschnitt: schmaler, runder, mittig. */
.pub-shot--phone {
    max-width: 292px; margin: 0 auto; border-radius: 22px;
    aspect-ratio: 780 / 1520;
}

.pub-shot-cap {
    font-size: 0.8rem; color: var(--text-muted);
    margin: 10px 2px 0; line-height: 1.45;
}

/* Aufzählung mit dem Zeichen als Marke statt eines Punkts. */
.pub-li { list-style: none; padding: 0; margin: 18px 0 0; }
.pub-li li {
    position: relative; padding-left: 26px; margin-bottom: 10px;
    color: var(--text-secondary); line-height: 1.6;
}
.pub-li li::before {
    content: ''; position: absolute; left: 4px; top: 0.55em;
    width: 9px; height: 2px; border-radius: 1px;
    background: var(--accent-primary);
    transform: skewX(-11deg);
}

/* ------------------------------------------------------------------ *
 *  Für-wen-Zitate
 * ------------------------------------------------------------------ */
.pub-quote {
    background: var(--pub-surface-2);
    border: 1px solid var(--card-edge, var(--bg-card-border));
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 14px 14px 0;
    padding: 22px 24px;
}
.pub-sec--alt .pub-quote { background: var(--pub-surface); }
.pub-quote p {
    margin: 0; font-size: 1.02rem; line-height: 1.55;
    color: var(--text-primary); font-style: italic;
}
.pub-quote cite {
    display: block; margin-top: 12px; font-style: normal;
    font-size: 0.85rem; font-weight: 700; color: var(--text-muted);
}

/* ------------------------------------------------------------------ *
 *  Häufige Fragen
 * ------------------------------------------------------------------ */
.pub-faq { margin-top: 32px; border-top: 1px solid var(--bg-card-border); }

.pub-faq details {
    border-bottom: 1px solid var(--bg-card-border);
}
.pub-faq summary {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 2px; cursor: pointer; list-style: none;
    font-weight: 700; font-size: 1.02rem; color: var(--text-primary);
}
.pub-faq summary::-webkit-details-marker { display: none; }
.pub-faq summary::after {
    content: ''; margin-left: auto; flex: 0 0 auto;
    width: 10px; height: 10px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform var(--duration-fast) var(--ease-out);
}
.pub-faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.pub-faq details > div {
    padding: 0 2px 22px; color: var(--text-secondary);
    line-height: 1.65; max-width: 68ch;
}
.pub-faq details > div p { margin: 0 0 10px; }
.pub-faq details > div p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ *
 *  Verbindungen
 * ------------------------------------------------------------------ */
.pub-conn { display: grid; gap: 12px; margin-top: 30px;
            grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.pub-conn-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    background: var(--pub-surface-2);
    border: 1px solid var(--bg-card-border);
}
.pub-sec--alt .pub-conn-item { background: var(--pub-surface); }

.pub-conn-item b { display: block; font-size: 0.94rem; color: var(--text-primary); }
.pub-conn-item span { display: block; font-size: 0.78rem; color: var(--text-muted); }

.pub-conn-dot {
    width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
    background: var(--fd-positive, var(--accent-green));
}
.pub-conn-item[data-state="planned"] .pub-conn-dot { background: var(--text-faint); }
.pub-conn-item[data-state="planned"] { opacity: 0.72; }

/* ------------------------------------------------------------------ *
 *  Zugangsformular
 * ------------------------------------------------------------------ */
.pub-form-card {
    background: var(--pub-surface-2);
    border: 1px solid var(--card-edge, var(--bg-card-border));
    border-radius: 16px; padding: 32px;
    box-shadow: var(--shadow-md);
}
.pub-sec--alt .pub-form-card { background: var(--pub-surface); }

.pub-field { margin-top: 18px; }
.pub-field label {
    display: block; font-size: 0.88rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 6px;
}
.pub-field .pub-hint {
    display: block; font-weight: 400; font-size: 0.82rem;
    color: var(--text-muted); margin-top: 2px;
}

/* EIN Formular-Idiom wie in der App (Session 9): gefüllte Felder,
   Fokus-Ring in der Führungsfarbe. */
.pub-field input,
.pub-field textarea,
.pub-field select {
    width: 100%; font-family: inherit; font-size: 1rem;
    padding: 12px 14px; border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--bg-card-border);
    color: var(--text-primary);
}
.pub-field textarea { min-height: 88px; resize: vertical; }
.pub-field input:focus,
.pub-field textarea:focus,
.pub-field select:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-soft);
}

/* Honigtopf: für Menschen unsichtbar, für einen Bot ein Pflichtfeld.
   Kein display:none — manche Bots überspringen unsichtbare Felder
   genau daran; ein aus dem Bild geschobenes Feld füllen sie aus. */
.pub-hp {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}

.pub-form-act { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }

.pub-msg { margin-top: 16px; font-size: 0.92rem; line-height: 1.5; }
.pub-msg[data-kind="ok"] { color: var(--fd-positive, var(--accent-green)); }
.pub-msg[data-kind="err"] { color: var(--fd-negative, var(--accent-red)); }

.pub-form-done {
    text-align: center; padding: 12px 0;
}
.pub-form-done h3 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: 1.35rem; margin: 0 0 8px; color: var(--text-primary);
}
.pub-form-done p { margin: 0; color: var(--text-secondary); line-height: 1.6; }

/* ------------------------------------------------------------------ *
 *  Fuss
 * ------------------------------------------------------------------ */
.pub-foot {
    background: var(--pub-band); color: var(--pub-band-ink);
    padding: 56px 0 40px; margin-top: 0;
}
.pub-foot-in { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) {
    .pub-foot-in { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}

.pub-foot h4 {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--pub-band-dim);
    margin: 0 0 12px;
}
.pub-foot ul { list-style: none; padding: 0; margin: 0; }
.pub-foot li { margin-bottom: 8px; }
.pub-foot a {
    color: var(--pub-band-dim); text-decoration: none; font-size: 0.94rem;
}
.pub-foot a:hover { color: var(--pub-band-ink); text-decoration: underline; }

.pub-foot .pub-mark { width: 116px; height: 29px; margin-bottom: 14px; }

.pub-foot-note {
    margin: 0; font-size: 0.86rem; line-height: 1.6; color: var(--pub-band-dim);
    max-width: 40ch;
}

.pub-foot-base {
    margin-top: 36px; padding-top: 22px;
    border-top: 1px solid var(--pub-band-edge);
    display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
    font-size: 0.82rem; color: var(--pub-band-dim);
}
.pub-foot-base .pub-spacer { margin-left: auto; }

/* Sprachumschalter — ein LINK auf das andere Dokument, kein Schalter:
   Deutsch und Englisch sind zwei echte Seiten (siehe web/public.py), es
   gibt also nichts umzuschalten. */
.pub-lang {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--pub-band-edge); border-radius: 8px;
    padding: 5px 12px; font-size: 0.8rem; font-weight: 600;
    color: var(--pub-band-dim); text-decoration: none;
}
.pub-lang:hover { background: var(--pub-band-fill); color: var(--pub-band-ink); }
.pub-lang::before { content: '⇄'; opacity: 0.7; }

.pub-lang-note { font-size: 0.8rem; color: var(--pub-band-dim); }

/* ------------------------------------------------------------------ *
 *  Rechtstexte
 * ------------------------------------------------------------------ */
.pub-legal { padding-block: 56px 84px; }
.pub-legal h1 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700;
    letter-spacing: -0.03em; margin: 0 0 6px; color: var(--text-primary);
}
.pub-legal .pub-stand {
    color: var(--text-muted); font-size: 0.86rem; margin: 0 0 34px;
}
.pub-legal h2 {
    font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em;
    margin: 34px 0 10px; color: var(--text-primary);
}
.pub-legal h3 {
    font-size: 1rem; font-weight: 700; margin: 22px 0 6px;
    color: var(--text-primary);
}
.pub-legal p, .pub-legal li {
    color: var(--text-secondary); line-height: 1.7; font-size: 0.97rem;
}
.pub-legal ul, .pub-legal ol { padding-left: 22px; margin: 10px 0; }
.pub-legal li { margin-bottom: 7px; }
.pub-legal a { color: var(--accent-primary); text-underline-offset: 2px; }
.pub-legal table {
    width: 100%; border-collapse: collapse; margin: 14px 0;
    font-size: 0.9rem;
}
.pub-legal th, .pub-legal td {
    text-align: left; padding: 9px 12px; vertical-align: top;
    border-bottom: 1px solid var(--bg-card-border);
    color: var(--text-secondary);
}
.pub-legal th { color: var(--text-primary); font-weight: 700; }
/* Breite Tabellen scrollen in sich, nie die Seite. */
.pub-scroll { overflow-x: auto; }

.pub-legal-box {
    background: var(--pub-surface-2);
    border: 1px solid var(--card-edge, var(--bg-card-border));
    border-radius: 12px; padding: 18px 20px; margin: 18px 0;
}
.pub-legal-box p:last-child { margin-bottom: 0; }

/* Inhaltsverzeichnis der langen Texte */
.pub-toc {
    background: var(--pub-surface-2);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px; padding: 18px 22px; margin: 0 0 34px;
}
.pub-toc ol { margin: 0; padding-left: 20px; }
.pub-toc li { margin-bottom: 4px; font-size: 0.92rem; }

/* ------------------------------------------------------------------ *
 *  Einblenden beim Scrollen
 *  Die Marke sitzt auf dem Element, nicht auf einem Zähler: ein Abschnitt
 *  baut sich genau einmal auf. Ohne Skript (JS aus, Bot, Fehler beim
 *  Laden) bleibt alles sichtbar — die Klasse wird erst VON JS gesetzt.
 * ------------------------------------------------------------------ */
.pub-reveal-on .pub-reveal {
    opacity: 0; transform: translateY(14px);
}
.pub-reveal-on .pub-reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
    .pub-reveal-on .pub-reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------ *
 *  Kleinkram
 * ------------------------------------------------------------------ */
.pub-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 999px;
    background: var(--pub-band-fill); border: 1px solid var(--pub-band-edge);
    font-size: 0.82rem; font-weight: 600; color: var(--pub-band-ink);
}
.pub-badge b { color: var(--pub-deco); font-weight: 700; }

.pub-note {
    font-size: 0.86rem; color: var(--text-muted); line-height: 1.6;
    margin: 20px 0 0;
}

.pub-center { text-align: center; }
.pub-center .pub-h2, .pub-center .pub-sub { margin-left: auto; margin-right: auto; }
.pub-center .pub-h2--marked::after { margin-left: auto; margin-right: auto; }
