/* B-Ansicht im Palettenkonto-Markenbild (Styleguide vom 23.09.2026).
 *
 * Zwei Haelften: `:root` traegt alle Farben und Masse als Token, die
 * Komponentenregeln greifen nur darauf zu. Die Klassennamen `.huelle`,
 * `.meldung`, `.warnung`, `.leiste`, `.fuss` und `.echt` sind in Python fest
 * verdrahtet (web/statisch.py: 429, 500, 404) — wer sie umbenennt, macht diese
 * Seiten ungestylt.
 *
 * Kontraste nachgerechnet (WCAG 2.1), nicht geschaetzt:
 *   Text #414448 auf #F2F2F2 8,74 · leise #6B6F76 auf #F2F2F2 4,51, auf Weiss 5,05
 *   Weiss auf Aktionsblau #2369B1 5,63 · #2369B1 auf #F2F2F2 5,03
 *   Feldrand #858990 auf Weiss 3,51 · Fehler #A4262C auf #FDF2F1 6,62
 *   Dunkel #232933: Text #E6EAF0 12,11 · leise #A3AAB5 6,25 · Link #79B0E2 6,35
 *   Markenblau #5594CD: auf Weiss nur 3,23 -> NIE als Text auf Hell;
 *   dunkle Schrift auf Markenblau 4,53 (Bandknopf).
 */

/* Source Sans 3, selbst ausgeliefert (SIL OFL 1.1, schrift/OFL.md). Keine
 * Verbindung zu Google: Die Seite laedt nichts von fremden Servern. Variable
 * Schrift — eine Datei traegt alle Gewichte. latin-ext kommt nur, wenn ein
 * Zeichen daraus vorkommt (unicode-range). */
@font-face {
  font-family: 'Source Sans 3';
  src: url('/static/schrift/SourceSans3-latin.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/static/schrift/SourceSans3-latin-ext.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Marke */
  --marke: #5594CD;          /* Zeichen, Leisten, Bandknopf — nie Text auf Hell */
  --aktion: #2369B1;         /* Knoepfe und Links */
  --aktion-hover: #135DA4;
  --gewaehlt: #F0F6FC;       /* Flaeche der gewaehlten Option */

  /* Text und Flaechen */
  --text: #414448;
  --text-leise: #6B6F76;
  --grund: #F2F2F2;
  --flaeche: #FFFFFF;
  --linie: #E4E7EB;          /* nur Linien, nie Rand eines Bedienelements */
  --feldrand: #858990;       /* 3,5:1 — Rand von Feldern und Optionen */

  /* Dunkel: Herstellerband und Fuss */
  --dunkel: #232933;
  --dunkel-text: #E6EAF0;
  --dunkel-leise: #A3AAB5;
  --dunkel-link: #79B0E2;

  /* Fehler — immer zusammen mit Text, nie als Farbe allein */
  --fehler: #A4262C;
  --fehler-grund: #FDF2F1;

  /* Form: flach und ruhig, keine Schatten, keine Verlaeufe */
  --radius-feld: 2px;
  --radius-karte: 4px;
  --breite: 760px;
  --schrift: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system,
             'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bewegung: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------------------------------------------------------------- Grundlagen */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
/* Der Fuss sitzt immer unten: Auf kurzen Seiten („Link ungültig“) endete er
 * sonst mitten im Bild, darunter eine graue Flaeche (Station 9, 26.09.2026). */
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 17px/1.5 var(--schrift);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.rahmen { flex: 1 0 auto; }
a { color: var(--aktion); text-decoration: underline; text-underline-offset: 2px; }
/* Hover nur mit Maus oder Trackpad: Am Touchscreen bliebe der Zustand nach
 * dem Antippen stehen — der Werbeknopf etwa weiss statt blau. */
@media (hover: hover) { a:hover { color: var(--aktion-hover); } }
:focus-visible { outline: 2px solid var(--dunkel); outline-offset: 2px; }
p { margin: 0; }
h1, h2 { font-weight: 600; }

.sr-nur { position: absolute; width: 1px; height: 1px; overflow: hidden;
          clip: rect(0 0 0 0); white-space: nowrap; }
.leise { color: var(--text-leise); font-weight: 400; }
[hidden] { display: none !important; }

/* -------------------------------------------------------------------- Marke */

.zeichen { display: block; fill: currentColor; overflow: visible; }
.zeichen-bogen { fill: none; stroke: currentColor; stroke-width: 19; }

.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--marke); }
.logo .zeichen { width: 30px; height: 30px; flex: none; }
.wortmarke { color: var(--text); font-size: 21px; font-weight: 400;
             letter-spacing: -0.012em; line-height: 1; padding-bottom: 3px; }

/* ------------------------------------------------------------------- Leiste */

.leiste { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.leiste-innen { max-width: var(--breite); margin: 0 auto; padding: 14px 16px;
                display: flex; align-items: center; gap: 14px; }
.leiste-dienst { color: var(--text-leise); font-size: 15px; line-height: 1.2;
                 border-left: 1px solid var(--linie); padding-left: 14px; }
/* Der Sprachumschalter (J108) ganz rechts: ein gewoehnlicher Link, Aktionsblau
 * auf der weissen Leiste (5,63:1). Fokus und Hover wie bei allen Links (`a`,
 * `:focus-visible`), darum hier keine eigenen. */
.sprachwahl { margin-left: auto; color: var(--aktion); font-size: 15px; line-height: 1.2; }

/* --------------------------------------------------------------------- Kopf */

.huelle { max-width: var(--breite); margin: 0 auto; padding: 32px 16px 48px; }

.kopf { margin-bottom: 28px; }
.kopf .firma { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; }
.kopf-bitte { margin-top: 6px; font-size: 18px; }
.kennwerte { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 20px 0 0;
             padding-top: 14px; border-top: 1px solid var(--linie); }
.kennwerte dt { font-size: 14px; color: var(--text-leise); }
.kennwerte dd { margin: 0; font-weight: 600; }

/* ------------------------------------------------------------ Aufstellung */

.werkzeugleiste { display: flex; justify-content: flex-end; margin-bottom: 12px; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-karte);
  padding: 20px;
  margin-bottom: 16px;
}
.lt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.karte h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.unterzeile { color: var(--text-leise); font-size: 15px; }

/* Der Satz traegt die Aussage — ohne Rot und Gruen, in voller Breite, damit
 * ein langer Firmenname nicht in einer schmalen Spalte zerbricht. */
.saldo { margin-top: 12px; padding-left: 14px; border-left: 3px solid var(--marke); }
.saldo .satz { font-size: 20px; font-weight: 600; line-height: 1.3; }
.saldo-zeile { margin-top: 2px; font-size: 14px; color: var(--text-leise); }
.saldo .zahl { font-variant-numeric: tabular-nums; }

.wahl { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 18px 0 0; margin: 0; }
.option {
  flex: 1 1 150px;
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--feldrand); border-radius: var(--radius-feld);
  background: var(--flaeche); cursor: pointer;
  transition: background-color 150ms var(--bewegung), border-color 150ms var(--bewegung);
}
@media (hover: hover) { .option:hover { border-color: var(--aktion); } }
.option input { margin: 0; width: 18px; height: 18px; accent-color: var(--aktion); flex: none; }
.option:has(input:checked) { border-color: var(--aktion); background: var(--gewaehlt);
                             box-shadow: inset 0 0 0 1px var(--aktion); font-weight: 600; }
.option:has(input:focus-visible) { outline: 2px solid var(--dunkel); outline-offset: 2px; }

.zusatz { margin-top: 14px; }
.zusatz label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.zusatz input[type=text], .zusatz textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  border: 1px solid var(--feldrand); border-radius: var(--radius-feld); background: var(--flaeche);
}
.zusatz input[type=text] { max-width: 220px; font-variant-numeric: tabular-nums; }
.zusatz input[type=text]:focus, .zusatz textarea:focus { border-color: var(--aktion); }
.zusatz [aria-invalid="true"] { border-color: var(--fehler); box-shadow: inset 0 0 0 1px var(--fehler); }
.js .ohne-js { display: none; }
.eigene-zahl { border: 0; margin: 0; padding: 0; min-width: 0; }
.eigene-zahl legend { padding: 0; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
/* Untereinander: Die beiden Saetze tragen den Firmennamen und passen
   selten neben das Feld — so steht es immer an derselben Stelle. */
.eigene-zahl-reihe { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.zusatz .eigene-zahl-reihe input[type=text] { width: 120px; max-width: 120px; }
.schuldner-wahl[aria-invalid="true"] { border-color: var(--fehler); box-shadow: 0 0 0 1px var(--fehler); }

/* Ein Formularfehler steht oben UND in der Karte, die er meint. */
.karte.mit-fehler { border-color: var(--fehler); box-shadow: inset 4px 0 0 var(--fehler); }
.feld-fehler { margin-top: 10px; color: var(--fehler); font-weight: 600; font-size: 15px; }
/* Ueber dem Feld, zwischen Beschriftung und Eingabe. */
.feld-fehler.am-feld { margin: 2px 0 6px; }
.fehler-sprung { margin-top: 6px; font-weight: 400; }
.fehler-sprung a { color: var(--fehler); }
/* Nach dem Sprung steht die Meldung nicht buendig oben: Die Beschriftung des
 * Feldes darueber bleibt sichtbar. */
.karte .feld-fehler { scroll-margin-top: 4rem; }
.feldhinweis { margin-top: 6px; font-size: 14px; color: var(--text-leise); }

.buchungen { margin-top: 18px; border-top: 1px solid var(--linie); padding-top: 12px; }
.buchungen summary { cursor: pointer; color: var(--aktion); font-size: 15px; font-weight: 600;
                     min-height: 32px; display: flex; align-items: center; gap: 8px;
                     list-style: none; }
.buchungen summary::-webkit-details-marker { display: none; }
/* Eigener Pfeil: `display: flex` nimmt dem summary den eingebauten. */
.buchungen summary::before { content: ""; width: 7px; height: 7px; flex: none;
                             border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
                             transform: rotate(-45deg); transition: transform 150ms var(--bewegung); }
/* Je Ebene der eigene Zustand: Die Gruppen stecken in der Liste (15). */
.buchungen[open] > summary::before, .gruppe[open] > summary::before { transform: rotate(45deg); }
.buchungen:not([open]) .nur-offen, .buchungen[open] .nur-zu { display: none; }
@media (hover: hover) { .buchungen summary:hover { color: var(--aktion-hover); } }
.buchungen .feldhinweis { margin: 4px 0 8px; }
/* „Allen widersprechen“ / „Allen zustimmen“ — nur unter „Korrigieren“. */
.hilfsknoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.hilfsknoepfe[hidden] { display: none; }
/* Gruppen nach frueheren Antworten (Aenderung 15): Ueberschrift in Textfarbe,
 * damit sie sich vom Aufklapper der ganzen Liste abhebt. */
.gruppe { margin-top: 10px; }
.gruppe > summary { color: var(--text); }
@media (hover: hover) { .gruppe > summary:hover { color: var(--aktion-hover); } }
.gruppe > .feldhinweis { margin-top: 0; }
/* Gesperrt (frueher bestaetigt, unveraendert): keine Wahl, leiser. */
.gesperrt-wahl { display: inline-block; font-size: 14px; color: var(--text-leise); }
.buchungen tr.gesperrt td { color: var(--text-leise); }
/* Der Tag der frueheren Antwort an jeder Zeile (widersprochen / bestaetigt). */
.antwort-am { display: block; font-size: 13px; color: var(--text-leise); }
/* Die Übertragszeile (15b): alle Buchungen bis zum ersten Bestaetigungsmonat. */
.buchungen tr.uebertrag .belegnr { font-weight: 600; }
.geaendert { font-size: 13px; font-weight: 600; color: var(--text); background: var(--gewaehlt);
             border-radius: 3px; padding: 0 5px; white-space: nowrap; }
/* Die Tabelle scrollt auf dem Telefon in sich — die Seite nicht. */
.rolle { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.buchungen table { width: 100%; border-collapse: collapse; font-size: 15px; }
.buchungen th, .buchungen td { padding: 8px; border-bottom: 1px solid var(--linie);
                               text-align: left; vertical-align: top; }
.buchungen th { font-size: 14px; color: var(--text-leise); font-weight: 600; }
.buchungen td.datum { white-space: nowrap; }
.belegnr { white-space: nowrap; }
.buchungstext { display: block; font-size: 14px; color: var(--text-leise); overflow-wrap: anywhere; }
.zahl-spalte { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.buchungen th.zahl-spalte, .buchungen td.zahl-spalte { text-align: right; }
/* Je Buchung Zustimmen oder Widersprechen: zwei Knoepfe nebeneinander, die
 * native Radio-Gruppe darunter (Tastatur, Screenreader, ohne JavaScript). */
.buchungen .wahl-spalte { white-space: nowrap; width: 1%; }
.umschalter, .schuldner-wahl { display: inline-flex; border: 1px solid var(--feldrand);
              border-radius: var(--radius-feld); overflow: hidden; }
.umschalter label, .schuldner-wahl label { position: relative; display: inline-flex;
              margin: 0; font-weight: 400; }
.umschalter input, .schuldner-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.umschalter span, .schuldner-wahl span { display: inline-flex; align-items: center; min-height: 36px;
                   padding: 6px 12px; font-size: 14px; cursor: pointer;
                   color: var(--text); background: var(--flaeche);
                   transition: background-color 150ms var(--bewegung); }
.umschalter label + label span, .schuldner-wahl label + label span { border-left: 1px solid var(--feldrand); }
.umschalter input:checked + span, .schuldner-wahl input:checked + span {
                   background: var(--aktion); color: #FFFFFF; font-weight: 600; }
.umschalter input:focus-visible + span, .schuldner-wahl input:focus-visible + span {
                   outline: 2px solid var(--dunkel); outline-offset: -2px; }
/* Auf dem gewaehlten (blauen) Knopf haette der dunkle Rahmen nur 2,59:1. */
.umschalter input:checked:focus-visible + span,
.schuldner-wahl input:checked:focus-visible + span { outline: 2px solid #FFFFFF; outline-offset: -4px; }
.umschalter input:disabled + span { cursor: default; opacity: 0.55; }
/* Eine widersprochene Buchung faellt in der Liste auf. */
.buchungen tr:has(input[value="widersprechen"]:checked:not(:disabled)) { background: var(--gewaehlt); }

.abschluss { margin-top: 28px; }
/* Ihre Auswahl im Ueberblick (J42): gefasst wie eine Karte, ueber dem Satz. */
.ueberblick { margin-bottom: 16px; padding: 16px 20px; background: var(--flaeche);
              border: 1px solid var(--linie); border-radius: var(--radius-karte); }
.ueberblick-zeilen { margin: 0; padding-left: 20px; }
.ueberblick-zeilen li + li { margin-top: 4px; }
.offen-hinweis { font-size: 15px; color: var(--text-leise); margin-bottom: 12px; }
/* Der juristisch wichtigste Satz: lesbar, direkt ueber dem Knopf. */
.anerkenntnis { margin-bottom: 16px; padding: 14px 16px; font-size: 16px;
                background: var(--gewaehlt); border-left: 4px solid var(--marke);
                border-radius: 0 var(--radius-feld) var(--radius-feld) 0; }

/* ------------------------------------------------------------------- Knoepfe */

.knopf { display: inline-flex; align-items: center; justify-content: center;
         font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
         min-height: 48px; padding: 12px 22px;
         border: 1px solid transparent; border-radius: var(--radius-feld);
         transition: background-color 150ms var(--bewegung); }
.knopf.haupt { background: var(--aktion); color: #FFFFFF; }
@media (hover: hover) { .knopf.haupt:hover { background: var(--aktion-hover); color: #FFFFFF; } }
form .knopf.haupt { width: 100%; font-size: 18px; }
form .knopf.haupt[aria-disabled="true"] { cursor: progress; background: var(--aktion-hover); }
.knopf.leise { background: var(--flaeche); color: var(--aktion); border-color: var(--feldrand);
               min-height: 40px; padding: 8px 16px; font-size: 15px; }
@media (hover: hover) { .knopf.leise:hover { border-color: var(--aktion); } }

/* ------------------------------------------------------------ Meldungen */

.fehler { background: var(--fehler-grund); border-left: 4px solid var(--fehler);
          color: var(--fehler); padding: 14px 16px; margin: 0 0 20px;
          border-radius: 0 var(--radius-feld) var(--radius-feld) 0; font-weight: 600; }
.hinweis { background: var(--flaeche); border: 1px solid var(--linie);
           border-radius: var(--radius-karte); padding: 20px; color: var(--text-leise); }

.meldung { background: var(--flaeche); border: 1px solid var(--linie);
           border-radius: var(--radius-karte); padding: 24px; }
.meldung h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; }
/* Auf den zweisprachigen Seiten (statisch.py) beginnt der englische Teil
 * sichtbar neu, statt am deutschen Absatz zu kleben. */
.meldung p + h2 { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linie); }
.meldung p + p { margin-top: 8px; }
.meldung.warnung { border-left: 4px solid var(--fehler); }
.meldung.erfolg { border-left: 4px solid var(--marke); }

/* ------------------------------------------------------------ Danke-Seite */

.quittung { background: var(--flaeche); border: 1px solid var(--linie);
            border-top: 4px solid var(--marke); border-radius: var(--radius-karte);
            padding: 24px; }
.quittung-kopf { display: flex; gap: 20px; align-items: flex-start; }
.quittung-kopf h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.quittung-kopf p + p { margin-top: 6px; }
.quittung-zeichen { width: 64px; height: 64px; flex: none; color: var(--marke); }

/* Die EINE Bewegung der Strecke: Die Pfeile drehen sich einmal um 180°.
 * Danach steht wieder exakt das Logo. Wer weniger Bewegung wuenscht, sieht
 * nur das stehende Zeichen. */
@media (prefers-reduced-motion: no-preference) {
  .quittung.frisch .zeichen-pfeile {
    transform-box: view-box; transform-origin: 0 0;
    animation: pk-drehen 800ms var(--bewegung) 150ms both;
  }
}
@keyframes pk-drehen { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }

.beleg-abruf { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--linie); }
.beleg-hinweis { margin-top: 10px; font-size: 15px; color: var(--text-leise); }
.verworfen { margin: 6px 0 8px; padding: 8px 12px; border-left: 3px solid var(--dunkel);
             background: var(--gewaehlt); font-weight: 600; }
/* Waehrend danke.js den Beleg holt. Bewusst ohne Bewegung: Die eine Bewegung
   dieser Seite ist das Zeichen. */
.knopf.laedt, .knopf.laedt:hover { background: var(--aktion-hover); cursor: progress; }

.uebersicht { margin-top: 28px; }
.abschnitt { font-size: 19px; margin: 0 0 10px; }
.entscheidungen { list-style: none; margin: 0; padding: 0; background: var(--flaeche);
                  border: 1px solid var(--linie); border-radius: var(--radius-karte); }
.entscheidungen li { display: grid; grid-template-columns: 70px 1fr auto; gap: 4px 16px;
                     align-items: baseline; padding: 12px 16px; }
.entscheidungen li + li { border-top: 1px solid var(--linie); }
.e-lt { font-weight: 600; }
.e-satz .leise { display: block; font-size: 14px; }
.e-wahl { font-weight: 600; text-align: right; }

.rueckfragen { margin-top: 20px; color: var(--text-leise); font-size: 15px; }

/* ------------------------------------------------------- Datenschutzhinweis */

.dokument { background: var(--flaeche); border: 1px solid var(--linie);
            border-radius: var(--radius-karte); padding: 28px; max-width: 70ch; }
.dokument h2 { margin: 22px 0 6px; font-size: 18px; }
.dokument p + p { margin-top: 8px; }
.dokument ul { margin: 0; padding-left: 20px; }
.dokument li + li { margin-top: 4px; }
.entwurf { margin-bottom: 18px; padding: 10px 14px; font-weight: 600;
           background: var(--fehler-grund); border-left: 4px solid var(--fehler); color: var(--fehler); }
.offen { font-style: italic; color: var(--text-leise); }

/* ---------------------------------------------------------- Herstellerband */

.band { background: var(--dunkel); color: var(--dunkel-text); }
.band-innen { max-width: var(--breite); margin: 0 auto; padding: 40px 16px 44px; }
.band a, .buehne-kopf a { color: var(--dunkel-link); }
@media (hover: hover) { .band a:hover, .buehne-kopf a:hover { color: #FFFFFF; } }
.band :focus-visible, .buehne-kopf :focus-visible { outline-color: #FFFFFF; }
.band-kennung { font-size: 14px; color: var(--dunkel-leise); margin-bottom: 18px; }
.band-logo .wortmarke { color: var(--dunkel-text); font-size: 24px; }
.band-logo .zeichen { width: 36px; height: 36px; }
.band-titel { margin: 18px 0 10px; font-size: 26px; line-height: 1.25; color: #FFFFFF; max-width: 38ch; }
.band-text { max-width: 60ch; }
/* Die Striche aus dem Logo als Aufzaehlungszeichen. */
.band-punkte { list-style: none; margin: 16px 0 0; padding: 0; }
.band-punkte li { position: relative; padding-left: 26px; margin-top: 6px; }
.band-punkte li::before { content: ""; position: absolute; left: 0; top: 0.72em;
                          width: 14px; height: 3px; background: var(--marke); }
.band-aktion { margin-top: 26px; }
/* Der einzige Knopf in Versalien — wie auf palettenkonto.net. */
.knopf.band-knopf { background: var(--marke); color: var(--dunkel); text-transform: uppercase;
                    letter-spacing: 0.04em; font-size: 16px; }
@media (hover: hover) { .knopf.band-knopf:hover { background: #FFFFFF; color: var(--dunkel); } }
.band-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.band-handy { display: none; margin-top: 12px; font-size: 15px; color: var(--dunkel-leise); }
.band-klein { margin-top: 26px; font-size: 13px; color: var(--dunkel-leise); }

/* --------------------------------------------------------------------- Fuss */

.fuss { background: var(--dunkel); color: var(--dunkel-leise); font-size: 14px; }
.band + .fuss .fuss-innen { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 24px 16px 32px; }
.fuss a { color: var(--dunkel-link); }
@media (hover: hover) { .fuss a:hover { color: #FFFFFF; } }
.fuss :focus-visible { outline-color: #FFFFFF; }
.fuss-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.fuss-logo .zeichen { width: 22px; height: 22px; }
.fuss-logo .wortmarke { color: var(--dunkel-text); font-size: 16px; }
.echt { margin-top: 14px; }
.echt summary { cursor: pointer; color: var(--dunkel-text); min-height: 32px;
                display: flex; align-items: center; gap: 8px; list-style: none; }
.echt summary::-webkit-details-marker { display: none; }
.echt summary::before { content: ""; width: 6px; height: 6px; flex: none;
                        border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
                        transform: rotate(-45deg); transition: transform 150ms var(--bewegung); }
.echt[open] summary::before { transform: rotate(45deg); }
.echt p { margin-top: 6px; max-width: 64ch; }
.fuss-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ----------------------------------------------------------- Abschlussseite */

.weiter { margin-top: 14px; }
.weiter a { font-weight: 600; }

/* Nach dem Belegdownload — gebaut wie der dunkle Ladebildschirm des
 * Palettenkontos: #232933, alles mittig, Logo, darunter eine 3 px duenne
 * Leiste und eine Statuszeile. Die Statuszeile ist die Bestaetigung.
 * Seit 25.09.2026 so dicht, dass alles bis zum Knopf und den Links auf einem
 * Laptop (1280 x 690 Seitenflaeche) im ersten Bildschirm steht; auf hohen
 * Bildschirmen (unten) bekommt die Buehne wieder Luft. */
body.seite-abschluss { background: var(--dunkel); color: var(--dunkel-text);
                       min-height: 100vh; min-height: 100dvh;
                       display: flex; flex-direction: column; }
/* Logo und Status stehen in <main>, die Werbung im <aside> darunter; beide
 * zusammen sitzen mittig im Fenster. */
body.seite-abschluss .rahmen { flex: 1 0 auto; display: flex; flex-direction: column;
                               justify-content: center; padding: 24px 0 20px; }
/* width: Mit `margin: 0 auto` in der Flex-Spalte schrumpfte die Huelle auf
 * die Breite ihres Inhalts und ragte bei 200 % Zoom ueber den Rand. */
body.seite-abschluss .huelle { padding: 0; width: 100%; }
body.seite-abschluss .kopf { margin: 0; }
.buehne-kopf { display: flex; flex-direction: column; align-items: center; text-align: center;
               padding: 0 20px; }

.abschluss-buehne { flex: none; }
.buehne { margin: 0 auto; width: 100%; max-width: 760px; padding: 0 20px;
          display: flex; flex-direction: column; align-items: center; text-align: center; }

.buehne-logo { gap: 12px; }
.buehne-logo .zeichen { width: 64px; height: 64px; }
.buehne-logo .wortmarke { color: var(--dunkel-text); font-size: 34px; padding-bottom: 4px; }

.buehne-laden { margin-top: 20px; width: 420px; max-width: 100%; }
.buehne-balken { height: 3px; background: rgba(255, 255, 255, 0.12); border-radius: 2px; overflow: hidden; }
.buehne-balken > i { display: block; height: 100%; width: 100%; background: var(--marke); border-radius: 2px; }
.buehne-status { margin-top: 12px; font-size: 17px; font-weight: 600; color: var(--dunkel-text); }
.buehne-status-leise { margin-top: 2px; font-size: 14px; color: var(--dunkel-leise); }
/* „Nicht angekommen? Erneut herunterladen“ springt als Ganzes in die
 * naechste Zeile (inline-block) und bricht nur dann in sich um, wenn die
 * Zeile selbst zu schmal ist — bei 150 % Zoom schob `nowrap` die Seite
 * seitlich. Tippflaeche gut 44 px, ohne anders auszusehen. */
.buehne-status-leise a { display: inline-block; padding: 12px 8px; margin: -12px -8px; }

.buehne-inhalt { margin-top: 28px; }
/* Die Kennzeichnung steht ueber der Werbung — klein, aber vor dem Lesen. */
.abschluss-buehne .band-kennung { margin: 0 0 8px; font-size: 13px; color: var(--dunkel-leise); }
.abschluss-buehne .band-titel { margin: 0 auto 10px; font-size: 28px; line-height: 1.2; max-width: 36ch; }
.abschluss-buehne .band-text { margin: 0 auto; max-width: 62ch; color: var(--dunkel-text); }
/* Die Verkaufsargumente untereinander, mittig, ohne Aufzaehlungszeichen. */
.abschluss-buehne .band-punkte { display: flex; flex-direction: column; align-items: center;
                                 gap: 2px; margin-top: 14px; font-size: 16px;
                                 color: var(--dunkel-leise); }
.abschluss-buehne .band-punkte li { margin: 0; padding-left: 0; }
.abschluss-buehne .band-punkte li::before { content: none; }
.abschluss-buehne .band-aktion { margin-top: 20px; }
/* Was die kostenlose Version kann (J49): gesetzt wie .band-text, unter dem Knopf. */
.abschluss-buehne .band-kostenlos { margin: 14px auto 0; max-width: 62ch; color: var(--dunkel-text); }
.abschluss-buehne .band-links { justify-content: center; margin-top: 12px; }
.abschluss-buehne .band-klein { margin-top: 16px; font-size: 12px; }
/* Hohe Bildschirme: dieselbe Buehne mit der Luft des Ladebildschirms. */
@media (min-width: 900px) and (min-height: 860px) {
  body.seite-abschluss .rahmen { padding-top: 40px; }
  .buehne-logo { gap: 16px; }
  .buehne-logo .zeichen { width: 88px; height: 88px; }
  .buehne-logo .wortmarke { font-size: 46px; padding-bottom: 6px; }
  .buehne-laden { margin-top: 32px; }
  .buehne-inhalt { margin-top: 44px; }
  .abschluss-buehne .band-titel { font-size: 32px; }
  .abschluss-buehne .band-punkte { gap: 6px; margin-top: 18px; }
  .abschluss-buehne .band-aktion { margin-top: 28px; }
  .abschluss-buehne .band-klein { margin-top: 28px; }
}

/* Der Fuss: eine ruhige Zeile, wie der Absender im Ladebildschirm. */
body.seite-abschluss .fuss { background: transparent; }
body.seite-abschluss .fuss-innen { max-width: 1040px; display: flex; flex-wrap: wrap;
                                   justify-content: center; align-items: center;
                                   gap: 6px 28px; padding: 14px 16px 20px; }
body.seite-abschluss .fuss-kopf { display: none; }
body.seite-abschluss .echt, body.seite-abschluss .fuss-links { margin-top: 0; }
/* Offen ueber die ganze Breite — an ihrem Platz, ohne unter die Links zu springen. */
body.seite-abschluss .echt[open] { flex-basis: 100%; text-align: left; }

/* Der Auftakt des Ladebildschirms, einmal und in unter einer Sekunde:
 * Pfeile zeichnen sich, Spitzen und Striche wachsen, die Wortmarke blendet
 * ein, die Leiste fuellt sich. Die Statuszeile steht SOFORT da — der
 * Download laeuft schon. Der Rest blendet ab 0,45 s ein, fertig bei 0,9 s.
 * Keine Drehung, keine Schleife (25.09.2026). */
@media (prefers-reduced-motion: no-preference) {
  .buehne-logo .zeichen-bogen { stroke-dasharray: 100;
      animation: pk-zeichnen 0.6s var(--bewegung) both; }
  .buehne-logo .zeichen-spitze { transform-box: fill-box; transform-origin: center;
      animation: pk-spitze 0.25s 0.45s ease-out both; }
  .buehne-logo .zeichen-strich { transform-box: fill-box; transform-origin: center;
      animation: pk-strich-rein 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .buehne-logo .zeichen-strich-1 { animation-delay: 0.1s; }
  .buehne-logo .zeichen-strich-2 { animation-delay: 0.18s; }
  .buehne-logo .zeichen-strich-3 { animation-delay: 0.26s; }
  .buehne-logo .wortmarke { animation: pk-einblenden 0.4s 0.25s ease-out both; }
  .buehne-balken > i { animation: pk-fuellen 0.6s var(--bewegung) 0.1s both; }
  .buehne-inhalt, .abschluss-buehne .band-klein {
      animation: pk-einblenden 0.45s 0.45s ease-out both; }
}
@keyframes pk-zeichnen { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes pk-spitze { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes pk-strich-rein { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pk-einblenden { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pk-fuellen { from { width: 0; } to { width: 100%; } }

/* Helle Fassung wie „Ladebildschirm Nah am Logo“: Weiss, Zeichen Markenblau,
 * Text #414448, leise #6B6F76 (5,05:1), Spur #E4E7EB. Der Knopf traegt das
 * Aktionsblau mit weisser Schrift (5,63:1) — Weiss auf Markenblau erreichte
 * nur 3,23:1. */
body.seite-abschluss.abschluss-hell { background: var(--flaeche); color: var(--text); }
.abschluss-hell .band { background: var(--flaeche); color: var(--text); }
.abschluss-hell .band a, .abschluss-hell .buehne-kopf a, .abschluss-hell .fuss a { color: var(--aktion); }
@media (hover: hover) {
  .abschluss-hell .band a:hover, .abschluss-hell .buehne-kopf a:hover,
  .abschluss-hell .fuss a:hover { color: var(--aktion-hover); }
}
.abschluss-hell .band :focus-visible, .abschluss-hell .fuss :focus-visible,
.abschluss-hell .buehne-kopf :focus-visible { outline-color: var(--dunkel); }
.abschluss-hell .buehne-logo .wortmarke { color: var(--text); }
.abschluss-hell .buehne-balken { background: var(--linie); }
.abschluss-hell .buehne-status, .abschluss-hell .band-titel,
.abschluss-hell .abschluss-buehne .band-text { color: var(--text); }
.abschluss-hell .abschluss-buehne .band-kostenlos { color: var(--text); }
.abschluss-hell .buehne-status-leise, .abschluss-hell .abschluss-buehne .band-punkte,
.abschluss-hell .band-kennung, .abschluss-hell .band-klein,
.abschluss-hell .band-handy { color: var(--text-leise); }
.abschluss-hell .knopf.band-knopf { background: var(--aktion); color: #FFFFFF; }
@media (hover: hover) {
  .abschluss-hell .knopf.band-knopf:hover { background: var(--aktion-hover); color: #FFFFFF; }
}
body.seite-abschluss.abschluss-hell .fuss { color: var(--text-leise); border-top: 1px solid var(--linie); }
.abschluss-hell .echt summary { color: var(--text); }

@media (max-width: 480px) {
  body.seite-abschluss .rahmen { padding-top: 32px; }
  /* Bei 125–150 % Zoom bleiben nur 250–300 px — fest 280 px plus Rand
     schoben die Seite seitlich. Hier und nicht am Dateiende: sonst verloere
     das Logo auf hohen Bildschirmen seine 46 px. */
  .buehne-laden { width: 100%; max-width: 280px; }
  .buehne-logo .wortmarke { font-size: clamp(22px, 9vw, 34px); }
  .abschluss-buehne .band-titel { font-size: 25px; }
}


/* ------------------------------------------------------------------- Mobil */

@media (max-width: 560px) {
  /* Einzelbuchungen untereinander statt als breite Tabelle: Beleg und Datum
     oben, die Mengen darunter, die Wahl ganz unten — B sieht, WORUEBER er
     entscheidet, bevor er entscheidet. */
  .buchungen thead { position: absolute; width: 1px; height: 1px; overflow: hidden;
                     clip: rect(0 0 0 0); }
  .buchungen table, .buchungen tbody { display: block; }
  .buchungen tr { display: grid; grid-template-columns: 1fr auto;
                  grid-template-areas: "beleg datum" "ein aus" "wahl wahl";
                  gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
  .buchungen td { display: block; padding: 0; border: 0; }
  .buchungen td.beleg { grid-area: beleg; }
  .buchungen td.datum { grid-area: datum; text-align: right; }
  .buchungen td.ein { grid-area: ein; text-align: left; }
  .buchungen td.aus { grid-area: aus; }
  .buchungen td.ein::before, .buchungen td.aus::before {
    content: attr(data-beschriftung) " "; color: var(--text-leise); }
  .buchungen td.wahl-spalte { grid-area: wahl; width: auto; }
  .buchungen .umschalter { display: flex; }
  .buchungen .umschalter label { flex: 1 1 50%; }
  .buchungen .umschalter span { flex: 1; justify-content: center; min-height: 44px; }
  .schuldner-wahl { display: flex; flex-direction: column; width: 100%; }
  .schuldner-wahl span { width: 100%; min-height: 44px; }
  .schuldner-wahl label + label span { border-left: 0; border-top: 1px solid var(--feldrand); }
  body { font-size: 16px; }
  .huelle { padding-top: 24px; }
  .leiste-dienst { display: none; }
  /* Der Sprachumschalter bleibt, mit 44 px Tippflaeche wie die Buchungswahl;
     das Aussehen bleibt (Innenabstand, durch negativen Rand ausgeglichen). */
  .sprachwahl { display: inline-block; padding: 13px 0; margin: -13px 0 -13px auto; }
  .kopf .firma { font-size: 25px; }
  .kopf-bitte { font-size: 17px; }
  .karte { padding: 16px; }
  .saldo .satz { font-size: 18px; }
  .option { flex-basis: 100%; }
  .quittung { padding: 20px; }
  .quittung-kopf { flex-direction: column; gap: 12px; }
  .quittung-zeichen { width: 48px; height: 48px; }
  .entscheidungen li { grid-template-columns: 1fr auto; }
  .e-satz { grid-column: 1 / -1; grid-row: 2; }
  .band-titel { font-size: 23px; }
  .band-handy { display: block; }
  .knopf.band-knopf, .beleg-abruf .knopf { width: 100%; }
  /* Groessere Tippflaechen, das Aussehen bleibt (Innenabstand, durch einen
     gleich grossen negativen Rand ausgeglichen). */
  .fuss-links a, .weiter a, .fehler-sprung a { display: inline-block; padding: 10px 0; margin: -10px 0; }
  /* Zeilenabstand mindestens zweimal das Polster — sonst deckt beim Umbruch
     der untere Link den oberen (Datenschutz statt Impressum). */
  .fuss-links { row-gap: 20px; }
  body.seite-abschluss .fuss-innen { row-gap: 14px; }
  .buchungen summary, .echt summary { min-height: 44px; }
  .knopf.leise { min-height: 44px; }
  /* Zwei fremde Seiten untereinander: erst Abstand, dann Tippflaeche. */
  .band-links { gap: 16px 24px; }
  .band-links a { display: inline-block; padding: 7px 0; margin: -7px 0; }
  /* Die Verkaufsargumente bleiben als einzelne Punkte erkennbar, wenn sie umbrechen. */
  .abschluss-buehne .band-punkte { gap: 10px; }
  .dokument { padding: 16px; }
}

/* Handy quer: breit genug fuer das Desktop-Layout, aber ein Finger. */
@media (pointer: coarse) {
  .umschalter span, .schuldner-wahl span { min-height: 44px; }
}
@media (max-height: 500px) and (hover: none) and (pointer: coarse) {
  .band-handy { display: block; }
}

/* Sehr schmal (Handy mit 175–200 % Zoom): Zustimmen/Widersprechen und die
 * Angaben der Buchung untereinander, weniger Rand — sonst stand von
 * „Widersprechen“ nur noch „Wi“ da. */
@media (max-width: 300px) {
  .huelle { padding-left: 10px; padding-right: 10px; }
  .karte { padding: 12px; }
  .option { padding: 8px; gap: 8px; min-width: 0; font-size: 15px; }
  /* Reicht die Breite trotzdem nicht: mit Trennstrich („Wider-sprechen“). */
  .option span { min-width: 0; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
  .wahl { min-width: 0; }
  .buchungen tr { grid-template-columns: minmax(0, 1fr);
                  grid-template-areas: "beleg" "datum" "ein" "aus" "wahl"; }
  .buchungen td.datum, .buchungen td.aus { text-align: left; }
  /* Danke: die Wahl unter den Satz („Korrigieren (1 zugestimmt, …)“ ragte
     sonst ueber die Karte). */
  .entscheidungen li { grid-template-columns: minmax(0, 1fr); }
  .e-wahl { text-align: left; }
  /* Abschluss: Logo und Rand kleiner — 64 px Zeichen plus Wortmarke sind
     breiter als 200 % Zoom erlaubt. */
  .buehne-kopf { padding: 0 12px; }
  .buehne-logo { gap: 8px; }
  .buehne-logo .zeichen { width: 44px; height: 44px; }
  .buehne-logo .wortmarke { font-size: 20px; }
  .buchungen .umschalter { flex-direction: column; }
  .buchungen .umschalter label + label span { border-left: 0; border-top: 1px solid var(--feldrand); }
}

/* -------------------------------------------------------------------- Druck */

/* Die gedruckte Danke-Seite ist ein sauberer Zweitbeleg — ohne Werbung. */
@media print {
  body { background: #FFFFFF; display: block; min-height: 0; }
  body.seite-abschluss { background: #FFFFFF; }
  .band, .fuss-links, .echt, .werkzeugleiste, .beleg-abruf,
  .sprachwahl { display: none !important; }
  .fuss { background: none; color: var(--text); }
  .fuss-logo .wortmarke { color: var(--text); }
  .quittung.frisch .zeichen-pfeile { animation: none; }
}
