/* Rechnung erstellen -- "Papier & Tinte" (Neubau 2026-09-26).
   Links das Formular in Papierkarten, rechts das Blatt. Die Vorschau setzt
   dieselben Schriftdateien wie das PDF (@font-face unten): die Laufweiten
   stimmen, rechtsbuendige Betraege stehen in beiden an derselben Stelle. */

@font-face { font-family: "KukRe Sans"; src: url("fonts/OpenSansHebrew-Regular.ttf?v=1") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "KukRe Sans"; src: url("fonts/OpenSansHebrew-Bold.ttf?v=1") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "KukRe Serif"; src: url("fonts/RobotoSlab-Regular.ttf?v=1") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "KukRe Serif"; src: url("fonts/RobotoSlab-Bold.ttf?v=1") format("truetype"); font-weight: 700; font-display: swap; }

.re-seite-app {
  --papier: #fffdf8;
  --tisch: #eef1f4;
  --tinte: #14213d;
  --schatten-papier: 0 1px 1px rgba(20, 33, 61, .04), 0 6px 18px -8px rgba(20, 33, 61, .18);
  background: var(--tisch);
  color: var(--ink);
}

/* WCAG 2.2 SC 2.4.11: fokussierte oder angesprungene Elemente liegen nie
   unter dem Kopf oder der Exportleiste. --leiste-h misst app.mjs (ResizeObserver);
   die Leiste bricht auf schmalen Geraeten in zwei Zeilen um. */
html:has(.re-seite-app) { --leiste-h: 0px; scroll-padding-top: 76px; scroll-padding-bottom: 16px; }

/* Kopf */
.re-kopf {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px; padding: 10px clamp(12px, 3vw, 28px);
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.re-marke { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.re-marke span { display: flex; flex-direction: column; line-height: 1.1; }
.re-marke strong { font-size: 15px; }
.re-marke small { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); }
.re-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.re-nav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }
.re-nav a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-2); font-weight: 700; }
.re-nav a:hover { background: var(--paper); }
.re-kopf-aktionen { display: flex; gap: 6px; }
.re-katalog { gap: 6px; text-decoration: none; }
.re-katalog-symbol { font-size: 15px; line-height: 1; }

/* Arbeitsflaeche: zwei Spalten ab 1024 px */
.re-app {
  display: grid; gap: 24px; align-items: start;
  max-width: 1480px; margin: 0 auto; padding: 20px clamp(12px, 3vw, 28px) 24px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1024px) {
  .re-app { grid-template-columns: minmax(0, 1fr) minmax(420px, 46%); }
  .re-vorschau { position: sticky; top: 72px; max-height: calc(100dvh - 72px - var(--leiste-h) - 8px); overflow: auto; }
  .re-ansicht { display: none !important; }
}
@media (max-width: 1023.98px) {
  [data-re-ansicht="formular"] .re-vorschau { display: none; }
  [data-re-ansicht="vorschau"] .re-editor { display: none; }
  /* Der Kopf scrollt mit: auf dem Telefon traegt die untere Leiste die
     Bedienung, ein zweiter fester Streifen oben kostete nur Hoehe. */
  html:has(.re-seite-app) { scroll-padding-top: 12px; }
  .re-kopf { position: static; flex-wrap: wrap; row-gap: 6px; }
  /* Die Vorgangs-Werkzeuge als wischbare Zeile unter Marke und Knoepfen,
     mit weichem Rand als Zeichen, dass es seitlich weitergeht. */
  .re-nav {
    /* position: relative haelt auch absolut gesetzte Kinder (sr-only-Zusatz im
       XRechnung-Link) im Scrollbereich -- sonst verbreiterten sie die Seite und
       das Telefon zoomte heraus (gemessen: Layoutbreite 633 statt 375 px). */
    position: relative;
    order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
    padding: 2px 14px 4px; margin-inline: calc(-1 * clamp(12px, 3vw, 28px));
  }
  .re-nav::-webkit-scrollbar { display: none; }
  .re-nav a { flex: none; min-height: 44px; scroll-snap-align: start; white-space: nowrap; }
}

/* Papierkarten */
.re-karte {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--schatten-papier); padding: 18px clamp(14px, 2.4vw, 22px); margin-bottom: 16px;
}
.re-karte h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.re-karte h2 small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.re-titelzeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.re-titelzeile h1 { font-size: clamp(22px, 3vw, 28px); margin: 0; }
.re-gespeichert { font-size: 12.5px; color: var(--ink-3); }
.re-lede { margin: 6px 0 14px; color: var(--ink-3); font-size: 14.5px; line-height: 1.5; }
.re-klein { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin: 8px 0 0; }
.re-hinweis { font-size: 13px; color: var(--ink-2); background: var(--blue-tint); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; line-height: 1.5; }
.re-hinweis:empty { display: none; }

.re-raster { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.re-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; border: 0; padding: 0; }
.re-feld > span, .re-feld > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.re-breit { grid-column: 1 / -1; }
.re-feld input, .re-feld select, .re-feld textarea, .re-kundenwahl {
  font: inherit; font-size: 15px; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink); width: 100%;
}
.re-feld textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.re-feld input:focus-visible, .re-feld select:focus-visible, .re-feld textarea:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 1px; border-color: var(--blue); }
.re-feld [aria-invalid="true"] { border-color: var(--red-ink); }
.re-pruef { font-size: 12.5px; min-height: 0; }
.re-pruef[data-stand="ok"] { color: var(--green); }
.re-pruef[data-stand="fehler"] { color: var(--red-ink); }
.re-mit-knopf { display: flex; gap: 6px; }
.re-mit-knopf input { flex: 1; }
.re-kundenwahl { margin-bottom: 12px; }
.re-schalter { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }
.re-schalter input { width: 20px; height: 20px; accent-color: var(--blue); }
.re-zeile { display: flex; flex-wrap: wrap; gap: 8px; }

/* Auswahl: Dokumenttyp und Steuerfall */
.re-wahl { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.re-wahl legend { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 6px; padding: 0; }
.re-segment { display: flex; flex-wrap: wrap; gap: 6px; }
.re-segment input, .re-fall input, .re-farben input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.re-segment label { min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 14px; background: var(--white); display: inline-flex; align-items: center; }
.re-segment input:checked + label { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 600; }
.re-segment input:focus-visible + label, .re-fall input:focus-visible + label, .re-farben input:focus-visible + label { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.re-segment-klein label { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.re-fall { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); }
.re-fall label { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 56px; border: 1.5px solid var(--line-2); border-radius: 10px; cursor: pointer; background: var(--white); }
.re-fall label b { font-size: 14px; }
.re-fall label small { font-size: 12px; color: var(--ink-3); }
.re-fall input:checked + label { border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue); }
.re-leistung { gap: 8px; }

/* Positionen */
.re-positionen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: pos; }
.rp { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--papier); }
.rp-zieht { opacity: .55; }
.rp-griff { cursor: grab; color: var(--ink-4); user-select: none; padding-top: 12px; font-size: 14px; text-align: center; touch-action: none; }
.rp-felder { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-kopf { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px; }
.rp input, .rp select, .rp textarea { font: inherit; font-size: 15px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); color: var(--ink); width: 100%; min-width: 0; }
.rp textarea.rp-besch { min-height: 38px; font-size: 13.5px; resize: vertical; }
.rp-zahlen { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); align-items: end; }
.rp-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-f > span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.rp-summe { font-weight: 700; text-align: right; align-self: center; padding: 10px 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ohne-steuer .rp-f-satz { display: none; }
.rp-aktionen { display: flex; flex-direction: column; gap: 4px; }
.rp-knopf { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; font-size: 15px; color: var(--ink-2); }
.rp-knopf:disabled { opacity: .35; cursor: default; }
.rp-knopf:focus-visible, .rp input:focus-visible, .rp select:focus-visible, .rp textarea:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 1px; }
.rp-weg:hover { color: var(--red-ink); border-color: var(--red-ink); }
.rp-typ-zwischensumme { background: var(--blue-tint); }
.rp-zs { display: flex; align-items: center; gap: 10px; }
.rp-zs .rp-summe { padding: 0; }
.re-plus { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.re-plus .btn { min-height: 44px; }
.re-summen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.re-rabatt { max-width: 180px; }
.re-summen dl { margin: 0; min-width: 240px; }
.re-summen dl div { display: flex; justify-content: space-between; gap: 24px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.re-summen dt { color: var(--ink-3); }
.re-summen dd { margin: 0; }
.re-summe-gesamt { border-top: 2px solid var(--blue); margin-top: 4px; padding-top: 6px !important; font-weight: 800; font-size: 17px; }
.re-summe-gesamt dt { color: var(--ink); }

/* Pflichtangaben */
.re-pflicht { border-color: var(--warn-ink); background: #fffaf3; }
.re-pflicht h2 { color: var(--warn-ink); }
.re-pflicht ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.re-pflicht a { color: var(--ink); }
.re-pflicht-hinweis { color: var(--ink-3); list-style: circle; }

/* Klappkarten */
.re-klapp > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; min-height: 36px; }
.re-klapp > summary::-webkit-details-marker { display: none; }
.re-klapp > summary h2 { margin: 0; }
.re-klapp > summary small { color: var(--ink-3); font-size: 12.5px; }
.re-klapp > summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); }
.re-klapp[open] > summary { margin-bottom: 12px; }
.re-klapp[open] > summary::after { content: "▴"; }
.re-klapp > summary:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }
.re-farben { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.re-farben label { width: 36px; height: 36px; border-radius: 50%; background: var(--f); cursor: pointer; box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line-2); }
.re-farben input:checked + label { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.re-logo { display: flex; gap: 8px; margin-top: 12px; }
.re-logo .btn { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.re-lokal { background: var(--paper); box-shadow: none; }
.re-lokal p { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); margin: 0 0 10px; }

/* Vorschau: das Blatt auf dem Tisch */
.re-vorschau-kopf { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 2px 4px 10px; }
.re-blaetter { display: flex; flex-direction: column; gap: 18px; }
.re-seite { margin: 0; position: relative; }
.re-seite figcaption { font-size: 11px; color: var(--ink-4); margin: 0 0 4px 2px; }
.re-blatt { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 2px rgba(20,33,61,.08), 0 12px 32px -12px rgba(20,33,61,.28); border-radius: 2px; }
.re-laedt { color: var(--ink-3); padding: 40px 0; text-align: center; }

/* Exportleiste */
/* Abschlusskarte statt Leiste (Betreiberwunsch 2026-09-26): die Export-
   aktionen stehen am Ende des Formulars im Fluss der Seite -- nichts ueberlagert
   Inhalt oder Seitenfuss, man arbeitet von oben nach unten und kommt hier an.
   Vorher sticky am unteren Rand (davor fixed, siehe git log). */
.re-leiste {
  position: static; max-width: 1480px; margin: 0 auto 24px;
  padding: 0 clamp(12px, 3vw, 28px);
}
.re-leiste-karte {
  background: var(--white); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 16px clamp(14px, 2.4vw, 22px);
}
.re-leiste-karte h2 { font-size: 16px; margin: 0 0 10px; }
.re-leiste-innen { max-width: 1480px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.re-leiste .btn { min-height: 46px; }
.re-haupt { font-weight: 700; padding-inline: 20px; }
.re-ansicht { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; margin-right: auto; }
.re-ansicht button { min-height: 40px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.re-ansicht button[aria-pressed="true"] { background: var(--blue); color: #fff; font-weight: 600; }
.re-ansicht button:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media (min-width: 1024px) { .re-haupt { margin-left: auto; } }
.re-mehr { position: relative; }
.re-mehr > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.re-mehr > summary::-webkit-details-marker { display: none; }
.re-mehr-liste { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 250px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--white); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); }
.re-mehr-liste .btn { justify-content: flex-start; width: 100%; min-height: 44px; }
.re-mehr-liste small { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.re-erechnung, .re-status { max-width: 1480px; margin: 6px auto 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.re-erechnung[data-stand="bereit"] { color: var(--green); }
.re-erechnung[data-stand="fehlt"] { color: var(--warn-ink); }
.re-status:empty { display: none; }
.re-status[data-stand="ok"] { color: var(--green); }
.re-status[data-stand="fehler"] { color: var(--red-ink); }
.re-naechste { max-width: 1480px; margin: 6px auto 0; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .re-leiste-innen { flex-wrap: wrap; }
  .re-ansicht { order: -1; width: 100%; justify-content: stretch; margin: 0 0 4px; }
  .re-ansicht button { flex: 1; }
  .re-haupt { flex: 1; }
  .re-erechnung { font-size: 12px; }
  .rp { grid-template-columns: minmax(0, 1fr) auto; }
  .rp-griff { display: none; }
  .rp-kopf { grid-template-columns: 1fr; }
  .re-kopf-aktionen .btn { padding-inline: 10px; }
}

/* Journal */
.re-journal { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(15,23,42,.35); }
.re-journal::backdrop { background: rgba(15, 23, 42, .5); }
.re-journal-innen { padding: 18px 20px 20px; }
.re-journal-kopf { display: flex; justify-content: space-between; align-items: center; }
.re-journal-kopf h2 { margin: 0; font-size: 19px; }
.re-zu { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 26px; cursor: pointer; color: var(--ink-3); }
.re-zu:focus-visible { outline: 3px solid var(--blue-2); }
.re-journal-liste { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rj { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rj-kopf { display: flex; justify-content: space-between; gap: 8px; }
.rj-zeile { font-size: 13px; color: var(--ink-3); margin: 2px 0 8px; }
.rj-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.rj-aktionen .btn { min-height: 40px; }
.rj-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper); }
.rj-status-exportiert { background: var(--green-soft); color: var(--green); }
.rj-status-storniert { background: var(--red-soft); color: var(--red-ink); }
.rj-leer { color: var(--ink-3); }

/* Wissen unter der App */
.re-mehrwissen { padding-bottom: 20px; }
.re-mehrwissen h2 { font-size: 20px; }
.re-wissen-raster { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.re-wissen-raster h3 { font-size: 15px; margin: 0 0 4px; }
.re-wissen-raster p { font-size: 14px; line-height: 1.6; color: var(--ink-3); margin: 0; }
.re-weitere { font-size: 14px; margin-top: 16px; }

/* Bildschirm: die Ratgeberseite steht nur im Druck (und in jeder Datei). */
@media screen { .re-seite-anhang { display: none !important; } }
/* Druck (Strg+P): jede Seite ein A4-Blatt, die Ratgeberseite am Ende, die
   Herkunftsmarken mit den Werten der Datei (Slate, 25 %, im SVG selbst). */
@page { size: A4; margin: 0; }
@media print {
  .re-kopf, .re-editor, .re-leiste, .re-mehrwissen, .site-footer, .re-vorschau-kopf, .re-seite figcaption, .skip-link, dialog { display: none !important; }
  html, body, .re-seite-app { background: #fff !important; }
  .re-app { display: block; padding: 0; }
  .re-vorschau { display: block !important; position: static; overflow: visible; max-height: none; padding: 0; border: 0; }
  .re-blaetter { display: block; gap: 0; }
  .re-seite { page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid; }
  .re-seite:last-child { page-break-after: auto; break-after: auto; }
  .re-blatt { width: 210mm; height: 297mm; box-shadow: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .re-seite-app * { transition: none !important; } }

.re-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
.re-fuss-hinweis { font-size: 12.5px; color: var(--ink-3); margin: 0; line-height: 1.5; }
@media (max-width: 400px) { .re-badge { display: none; } }

/* Telefon: Kurzfassung in der Leiste, Umschalter und Kopf kompakt, Zielgroessen 44 px.
   Die Grundregeln stehen VOR dem Media Query -- er erhoeht keine Spezifitaet. */
.re-erechnung .re-kurz { display: none; }
#reNeuOben .re-neu-kurz { display: none; }
@media (max-width: 560px) {
  .re-erechnung .re-lang { display: none; }
  .re-erechnung .re-kurz { display: inline; }
  .re-ansicht button { min-height: 44px; }
  .re-kopf { gap: 8px; padding-block: 8px; }
  .re-marke small { display: none; }
  /* Die Werkzeugnamen sind unterschiedlich lang ("Auftragsbestaetigung
     erstellen"): der Name darf umbrechen, der Neu-Knopf wird kurz. Bei 320 px
     ragte sonst der Kopf 40 bis 140 px ueber den Rand. */
  .re-marke { min-width: 0; flex: 1 1 0; }
  .re-marke strong { font-size: 14px; }
  .re-kopf-aktionen { flex: none; }
  .re-katalog-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .re-katalog { min-width: 44px; justify-content: center; }
  .re-kopf-aktionen .btn { min-height: 44px; font-size: 13px; padding-inline: 10px; }
  /* Der lange Name bleibt der zugaengliche Name -- nur visuell verborgen. */
  #reNeuOben .re-neu-lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #reNeuOben .re-neu-kurz { display: inline; }
}

/* --- Dokumentgruppen (2026-09-26): eine Seite je Gruppe, dieselbe Oberflaeche.
   Was nur zu einer Gruppe gehoert, traegt data-nur="…"; ausgeblendet wird schon
   beim ersten Zeichnen, ohne auf das Skript zu warten. */
html[data-re-gruppe="rechnung"] [data-nur]:not([data-nur~="rechnung"]),
html[data-re-gruppe="ab"] [data-nur]:not([data-nur~="ab"]),
html[data-re-gruppe="lieferschein"] [data-nur]:not([data-nur~="lieferschein"]),
html[data-re-gruppe="abnahme"] [data-nur]:not([data-nur~="abnahme"]) { display: none !important; }
html[data-re-gruppe="angebot"] [data-nur]:not([data-nur~="angebot"]) { display: none !important; }
html[data-re-gruppe="mahnung"] [data-nur]:not([data-nur~="mahnung"]) { display: none !important; }
.re-mahn-zahlen { display: grid; gap: 4px; margin: 12px 0 6px; }
.re-mahn-zahlen div { display: flex; justify-content: space-between; gap: 12px; }
.re-mahn-zahlen dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.re-mahn-hinweise { padding-left: 18px; color: var(--warn-ink); }
.re-mahn-hinweise:empty { display: none; }
.re-feld-titel { font-size: 13.5px; font-weight: 600; margin: 14px 0 6px; color: var(--ink-2); }
.re-unterschrift-flaeche { display: block; width: 100%; max-width: 420px; height: 120px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: #fff no-repeat center / contain; touch-action: none; }
.re-unterklapp { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.re-unterklapp > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.re-unterklapp > summary small { font-weight: 400; color: var(--ink-3); }
.re-unterklapp > summary:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }
.re-unterklapp[open] > summary { margin-bottom: 8px; }
.re-fall-drei { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.re-weiter { border: 1.5px solid var(--blue-tint); }
.re-weiter .btn { min-height: 44px; }
.rp-f-artnr input, .rp-f-charge input { font-variant-numeric: tabular-nums; }
.re-mail-hinweis { flex-basis: 100%; margin: 4px 0 0; }
#reBausteine h3 { font-size: 15px; margin: 18px 0 4px; }
#reBausteine .rj { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Hoher Kontrast (prefers-contrast: more, z. B. E-Ink oder Kontrastmodus des
   Systems): schwarze Schrift auf Weiss, keine Schatten, deutliche Raender. Das
   Blatt bleibt, wie es gedruckt wird. */
@media (prefers-contrast: more) {
  .re-seite-app { --ink: #000; --ink-2: #000; --ink-3: #1a1a1a; --ink-4: #1a1a1a; --line: #000; --line-2: #000; --tisch: #fff; }
  .re-karte, .re-leiste, .re-kopf, .re-feld input, .re-feld select, .re-feld textarea, .btn { box-shadow: none !important; border-width: 2px !important; border-color: #000 !important; }
  .re-leiste, .re-kopf { background: #fff !important; backdrop-filter: none; }
  .re-nav { -webkit-mask-image: none; mask-image: none; }
}
@media (prefers-reduced-motion: reduce) { .re-seite-app *, .re-seite-app *::before, .re-seite-app *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Werkstatt-Abnahme: Verweis auf das eigenstaendige Werkzeug fuer die Bauabnahme
   (abnahmeprotokoll.kukanilea.de) -- Betreiberentscheid 2026-09-26. */
.re-hinweis-spezial { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--thm, var(--blue)); background: var(--blue-tint); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.5; max-width: 70ch; }

/* Linien statt Schatten, eine Rundung (Betreiberwunsch 2026-09-26, "knackig"):
   Karten, Felder und Knoepfe tragen 1 px #cbd5e1 und 8 px Radius -- keine
   weichen Schlagschatten, keine Mischung aus Pillen und Ecken. Das Blatt der
   Vorschau behaelt eine klare Kante statt Schwebeschatten. */
.re-seite-app { --schatten-papier: none; }
.re-seite-app .re-karte { border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: none; }
.re-seite-app .btn, .re-seite-app .re-feld input, .re-seite-app .re-feld select,
.re-seite-app .re-feld textarea, .re-seite-app .re-kundenwahl,
.re-seite-app .re-ansicht, .re-seite-app .re-ansicht button, .re-seite-app .re-mehr-liste { border-radius: 8px; }
.re-seite-app .re-feld input, .re-seite-app .re-feld select, .re-seite-app .re-feld textarea { border-color: #94a3b8; }
.re-seite-app .re-mehr-liste { box-shadow: none; border-color: #94a3b8; }
.re-seite-app .re-seite svg, .re-seite-app .re-seite > img { box-shadow: none; outline: 1px solid #94a3b8; }

/* Symbole vor den Kartenueberschriften: einfarbige Vektoren als Maske, die
   Farbe kommt aus dem Thema. Keine Schriftdatei, kein Fremdabruf -- data:-URIs
   deckt img-src bereits ab. */
.re-karte h2[data-ico]::before, .re-karte summary h2[data-ico]::before, .re-leiste-karte h2[data-ico]::before {
  content: ""; flex: none; width: 18px; height: 18px; align-self: center;
  background: var(--blue); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
[data-ico="von"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V8l9-5 9 5v13'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E"); }
[data-ico="an"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
[data-ico="daten"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M3 9h18M8 2v4M16 2v4'/%3E%3C/svg%3E"); }
[data-ico="liste"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12'/%3E%3Ccircle cx='4' cy='6' r='1'/%3E%3Ccircle cx='4' cy='12' r='1'/%3E%3Ccircle cx='4' cy='18' r='1'/%3E%3C/svg%3E"); }
[data-ico="geld"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='13' rx='2'/%3E%3Cpath d='M2 10h20M6 15h4'/%3E%3C/svg%3E"); }
[data-ico="text"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 11h16M4 16h10'/%3E%3C/svg%3E"); }
[data-ico="stift"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4z'/%3E%3C/svg%3E"); }
[data-ico="pruef"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E"); }
[data-ico="pfeil"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
[data-ico="schloss"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
[data-ico="export"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E"); }
.re-ansicht-zeile { display: none; }
@media (max-width: 1023.98px) {
  .re-ansicht-zeile { display: block; max-width: 1480px; margin: 12px auto 0; padding: 0 clamp(12px, 3vw, 28px); }
  .re-ansicht-zeile .re-ansicht { display: flex; margin: 0; }
  .re-ansicht-zeile .re-ansicht button { flex: 1; }
}
/* In der Abschlusskarte ist Platz: immer die ganze Erklaerung. */
.re-seite-app .re-erechnung .re-kurz { display: none !important; }
.re-seite-app .re-erechnung .re-lang { display: inline !important; }
.re-vorlagen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 0 12px; }
.re-vorlagen .re-feld { flex: 1 1 240px; margin: 0; }
.re-vorlage-neu { margin-top: 12px; }
.re-vorlage-neu > summary { list-style: none; display: inline-flex; min-height: 44px; }
.re-vorlage-neu > summary::-webkit-details-marker { display: none; }
.re-vorlage-neu .re-zeile { align-items: flex-end; margin-top: 8px; }
.re-vorlage-neu .re-feld { flex: 1 1 260px; margin: 0; }
.re-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.re-logo-vorschau { max-height: 44px; max-width: 160px; object-fit: contain; border: 1px solid #cbd5e1; border-radius: 8px; padding: 4px; background: #fff; }
#reGegenKarte .re-unterschrift-flaeche { margin-top: 8px; }
/* Ergebnis direkt unter den Exportknoepfen -- dort, wo man gerade geklickt hat. */
.re-ergebnis-unten { margin-top: 12px; padding-top: 12px; border-top: 1px solid #cbd5e1; }
.re-ergebnis-unten h2 { font-size: 15px; margin: 0 0 6px; }
/* Kontrast (axe, 2026-09-26): auf der grauen Tischflaeche traegt die hellere
   Kennfarbe keine Schrift -- Links dort in der dunklen Stufe; das Etikett im
   Hauptknopf dunkelt ab statt aufzuhellen. */
.re-seite-app .re-mehrwissen a { color: var(--blue-2); }
.re-seite-app .re-badge { background: rgba(0, 0, 0, .22); }

/* Empfehlungen vor dem Seitenfuss: wischbare Kartenreihe ohne Skript. */
.re-empfehlungen { padding: 8px 0 28px; }
.re-empf-kopf h2 { font-size: 18px; margin: 0 0 4px; }
.re-empf-kopf p { margin: 0 0 12px; font-size: 14px; color: var(--ink-3); }
.re-empf-reihe {
  list-style: none; margin: 0 auto; padding: 4px clamp(12px, 3vw, 28px) 10px; max-width: 1080px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 240px); gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(12px, 3vw, 28px);
  -webkit-overflow-scrolling: touch;
}
.re-empf-reihe li { scroll-snap-align: start; }
.re-empf-karte {
  display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 88px; padding: 14px 16px;
  background: var(--white); border: 1px solid #cbd5e1; border-radius: 8px; color: var(--ink); text-decoration: none;
}
.re-empf-karte strong { font-size: 15px; }
.re-empf-karte span { font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.re-empf-karte:hover { border-color: var(--blue); }
.re-empf-karte:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media print { .re-empfehlungen { display: none !important; } }
/* Die Reihe scrollt in sich; sie darf die Seite nie verbreitern (gemessen
   ohne diese Zeilen: 1805 px Seitenbreite bei 320 px Bildschirm). */
.re-empfehlungen { width: 100%; min-width: 0; max-width: 100vw; overflow: hidden; }
.re-empf-reihe { width: 100%; box-sizing: border-box; }
/* sr-only-Zusaetze sind absolut gesetzt: ohne eigenen Bezugsrahmen lagen sie
   am rechten Ende der Reihe im Seitenraum und verbreiterten das Dokument
   (dieselbe Falle wie bei .re-nav). */
.re-empf-karte { position: relative; }

/* Kopf: Symbol und Kennfarbe je Dokument (website/vorgang-symbole.json)
   statt des Farbpunkts -- dieselben Symbole wie im Katalog. */
.re-nav a[data-thema]::before { display: none; }
.re-nav-symbol { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-right: 7px; border-radius: 6px; color: #fff; background: linear-gradient(145deg, var(--k1), var(--k2)); }
.re-nav-symbol svg { width: 15px; height: 15px; }

/* Kontrast (Betreiberwunsch 2026-09-27): Feld- und Knopfkanten und
   Hilfstexte auf AAA-Niveau. #334155 auf Weiss 10,4:1, #475569 7,6:1.
   (WCAG verlangt fuer Kanten nur 3:1 -- #94a3b8 lag mit 2,6:1 darunter.) */
.re-seite-app { --ink-3: #475569; --ink-4: #475569; }
.re-seite-app .re-feld input, .re-seite-app .re-feld select, .re-seite-app .re-feld textarea,
.re-seite-app .re-kundenwahl, .re-seite-app .btn-ghost, .re-seite-app .re-ansicht { border-color: #334155; }
.re-seite-app .re-karte, .re-seite-app .re-leiste-karte, .re-seite-app .re-empf-karte { border-color: #64748b; }
/* Kartentitel mit Akzentstreifen in der Kennfarbe des Dokuments. */
.re-seite-app .re-karte > h2, .re-seite-app .re-karte > summary h2, .re-seite-app .re-leiste-karte > h2 {
  border-left: 4px solid var(--thm, var(--blue)); padding-left: 10px; margin-left: -2px;
}
/* Fokus: kraeftig und nie verdeckt. */
.re-seite-app :focus-visible { outline: 3px solid #1D4ED8; outline-offset: 2px; }
/* Stand je Abschnitt */
.re-stand ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.re-stand-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid #334155; background: #fff; color: #0f172a; font: inherit; font-size: 13.5px; cursor: pointer; }
.re-stand-ok { border-color: #166534; background: #f0fdf4; color: #14532d; }
.re-stand-offen { border-color: #92400e; background: #fffbeb; color: #78350f; font-weight: 600; }
.re-stand-info { border-color: #475569; background: #f8fafc; color: #334155; }
@media (pointer: coarse) { .re-stand-chip { min-height: 44px; } }
.re-regler { width: 100%; margin: 8px 0 0; accent-color: var(--blue); min-height: 28px; }
@media (pointer: coarse) { .re-regler { min-height: 44px; } }
.re-wieder { border: 1px solid #1D4ED8; background: #EFF6FF; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.re-wieder p { margin: 0 0 6px; color: #0f172a; font-size: 14px; }
/* Befehlspalette */
.re-befehle { width: min(560px, calc(100vw - 24px)); padding: 12px; border: 1px solid #334155; border-radius: 8px; }
.re-befehle::backdrop { background: rgba(15, 23, 42, .45); }
.re-befehle input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px; border: 1px solid #334155; border-radius: 8px; font: inherit; font-size: 16px; }
.re-befehle ul { list-style: none; margin: 8px 0; padding: 0; max-height: min(60vh, 420px); overflow: auto; }
.re-befehle li[role="option"] { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 40px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: #0f172a; }
.re-befehle li[aria-selected="true"] { background: var(--blue); color: #fff; }
.re-befehle kbd { font: 12px var(--font-mono); opacity: .8; }
.re-befehl-leer { padding: 8px 10px; color: #475569; }
@media (pointer: coarse) { .re-befehle-knopf { display: none; } }
.rj-status-bezahlt { background: #dcfce7; color: #14532d; }
.rj-status-ueberfaellig { background: #fee2e2; color: #7f1d1d; font-weight: 700; }
.rj-status-exportiert { background: #dbeafe; color: #1e3a8a; }

/* Rechtsraum (2026-09-27): Sitz des Unternehmens im Kopf, Hinweis beim Umstellen. */
.re-land-wahl select {
  min-height: 36px; padding: 4px 26px 4px 10px; border: 1px solid #334155; border-radius: 8px;
  background: #fff; color: #0f172a; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.re-land-wahl select:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media (pointer: coarse) { .re-land-wahl select { min-height: 44px; } }
.re-land-hinweis { border: 1px solid #92400e; background: #fffbeb; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.re-land-hinweis p { margin: 0 0 6px; color: #0f172a; font-size: 14px; }
.re-fall [hidden] { display: none !important; }
.re-land-wahl { display: inline-flex; align-items: center; gap: 6px; }
.re-land-text { font-size: 12px; color: var(--ink-3); }

/* Stand je Abschnitt als dezente, mitlaufende Leiste (2026-09-27). Sie ist
   Orientierung, keine Warnung: kleine Chips, 1px-Rahmen, halbtransparenter
   Grund. Auf dem Desktop liegt sie unter dem festen Kopf (--kopf-h misst
   app.mjs); fokussierte Felder bleiben darunter sichtbar (WCAG 2.2 SC 2.4.11). */
html:has(.re-seite-app) { scroll-padding-top: calc(var(--kopf-h, 57px) + var(--stand-h, 40px) + 12px); }
.re-stand {
  position: sticky; top: 0; z-index: 20; margin: 0 0 12px; padding: 6px 0;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) { .re-stand { top: var(--kopf-h, 57px); } }
@media (max-width: 1023.98px) { html:has(.re-seite-app) { scroll-padding-top: calc(var(--stand-h, 40px) + 12px); } }
.re-stand ol { gap: 4px; margin: 0; }
.re-stand-chip { min-height: 28px; gap: 4px; padding: 2px 9px; border-width: 1px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.2; }
.re-stand-offen { font-weight: 600; }
.re-stand-neu { border-color: #64748b; background: #fff; color: #475569; }
.re-stand-chip:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
/* Schmal oder mit dem Finger: eine wischbare Zeile statt drei umbrechender. */
@media (max-width: 1023.98px), (pointer: coarse) {
  /* position: relative haelt die sr-only-Zusaetze der Chips im Scrollbereich. */
  .re-stand ol { position: relative; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .re-stand ol::-webkit-scrollbar { display: none; }
  .re-stand-chip { white-space: nowrap; flex: none; }
}
@media (pointer: coarse) { .re-stand-chip { min-height: 44px; } }
@media print { .re-stand { display: none; } }

/* Erklärknopf je Steuerfall (Popover-API: Esc schließt, Klick daneben auch). */
.re-fall-opt { position: relative; display: flex; }
.re-fall-opt label { flex: 1; padding-right: 34px; }
.re-hilfe-trigger {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid #64748b; border-radius: 50%; background: #fff; color: #334155;
  font: italic 700 13px/1 Georgia, "Times New Roman", serif; cursor: pointer;
}
.re-hilfe-trigger:hover { background: var(--blue-tint); border-color: var(--blue-2); color: var(--blue-2); }
.re-hilfe-trigger:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media (pointer: coarse) { .re-hilfe-trigger { width: 32px; height: 32px; top: 2px; right: 2px; } }
.re-hilfe {
  max-width: min(420px, calc(100vw - 32px)); margin: auto; padding: 16px 18px; border: 1px solid #334155; border-radius: 8px;
  background: #fff; color: #0f172a; box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.re-hilfe::backdrop { background: rgba(15, 23, 42, .12); }
.re-hilfe h3 { margin: 0 0 6px; font-size: 15px; }
.re-hilfe p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #1e293b; }

/* Nachtext-Baukasten */
.re-bausteine { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
.re-bausteine legend { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.re-baustein-liste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.re-baustein { border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; background: #fff; }
.re-baustein-an { border-color: #334155; }
.re-baustein-kopf { display: flex; align-items: center; gap: 8px; }
.re-baustein-kopf label { flex: 1; font-size: 14px; cursor: pointer; }
.re-baustein-kopf input { width: 18px; height: 18px; accent-color: var(--blue-2); }
.re-baustein-kopf .btn { min-width: 32px; padding-inline: 8px; }
.re-baustein textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid #334155; border-radius: 8px; resize: vertical; }
.re-baustein .re-klein { margin: 4px 0 0; }
@media (pointer: coarse) { .re-baustein-kopf .btn { min-height: 44px; min-width: 44px; } .re-baustein-kopf input { width: 24px; height: 24px; } }

/* E-Mail-Dialog */
.re-mail { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 16px 18px; border: 1px solid #334155; border-radius: 8px; color: #0f172a; }
.re-mail::backdrop { background: rgba(15, 23, 42, .35); }
.re-mail fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.re-mail legend { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.re-mail .re-schalter { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.re-mail .re-zeile { flex-wrap: wrap; gap: 6px; }
.re-mail-vorschau { margin-top: 12px; font-size: 14px; }
.re-mail-vorschau pre { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
/* Schmale Kopfzeile: die Befehlspalette braucht eine Tastatur, "Sitz" steht im Titel des Feldes. */
@media (max-width: 600px) { .re-befehle-knopf { display: none; } }
@media (max-width: 480px) { .re-land-text { display: none; } }

/* Stille Helfer: klein, grau, am Feld -- kein Popup. */
.re-helfer { margin: 4px 0 0; font-size: 12.5px; color: #475569; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 24px; }
.re-helfer[hidden] { display: none; }
.re-helfer-knopf {
  border: 1px solid transparent; background: none; color: #475569; font: inherit; font-size: 12.5px;
  padding: 2px 6px; border-radius: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-align: left;
}
.re-helfer-knopf:hover { background: #f1f5f9; color: #0f172a; }
.re-helfer-knopf:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 1px; }
.re-helfer-knopf[hidden] { display: none; }
@media (pointer: coarse) { .re-helfer-knopf { min-height: 44px; } }
.re-vorschlag-huelle { position: relative; }
.re-vorschlag {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid #334155; border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
.re-vorschlag li { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.re-vorschlag li span { font-size: 12.5px; color: #475569; }
.re-vorschlag li[aria-selected="true"], .re-vorschlag li:hover { background: var(--blue-tint); }
.re-toast {
  position: fixed; left: 50%; bottom: calc(var(--leiste-h, 0px) + 16px); z-index: 60; transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 8px; background: #0f172a; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}
.re-toast[hidden] { display: none; }
@media print { .re-toast, .re-helfer { display: none !important; } }

/* --- Unter der Exportkarte (2026-09-27) -------------------------------------
   Bewegung nur über transform/opacity und nur ohne prefers-reduced-motion. */
.re-wissen-raster > div {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--thm, var(--blue)); border-radius: 8px; padding: 14px 16px;
}
.re-wissen-raster h3 { color: var(--ink); }

/* Häufige Fragen: sichtbar, als Akkordeon (details/summary, ohne Skript). */
.re-fragen { margin-top: 22px; }
.re-fragen h3 { font-size: 17px; margin: 0 0 10px; }
.re-fragen details { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.re-fragen summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; font-weight: 600; font-size: 15px; }
.re-fragen summary::-webkit-details-marker { display: none; }
.re-fragen summary::before { content: "›"; flex: none; width: 18px; font-size: 20px; line-height: 1; color: var(--thm, var(--blue)); }
.re-fragen details[open] summary::before { transform: rotate(90deg); }
.re-fragen summary:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; border-radius: 8px; }
.re-fragen details p { margin: 0; padding: 0 16px 14px 42px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* Der Vorgang als Ablauf: sechs Schritte, der eigene in seiner Kennfarbe. */
.re-prozess { margin-top: 26px; }
.re-prozess-titel { font-size: 15px; margin: 0 0 10px; color: var(--ink-2); font-weight: 600; }
.re-prozess-pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); counter-reset: schritt; }
.re-prozess-pipeline li { position: relative; }
.re-prozess-pipeline a {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; height: 100%;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none;
}
.re-prozess-symbol { grid-row: span 2; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--k1), var(--k2)); }
.re-prozess-symbol svg { width: 18px; height: 18px; }
.re-prozess-name { font-weight: 700; font-size: 14.5px; }
.re-prozess-nutzen { font-size: 12.5px; color: #475569; line-height: 1.35; }
.re-prozess-pipeline a:hover { border-color: #334155; background: #f8fafc; }
.re-prozess-pipeline a:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.re-prozess-pipeline a[aria-current="page"] { border: 2px solid var(--thm, var(--blue)); background: var(--blue-tint); }
.re-prozess-pipeline a[aria-current="page"] .re-prozess-nutzen { color: var(--blue-2); font-weight: 700; }

/* Empfehlungen: Kategorie, Pfeil, weiche Kanten, Knöpfe (karussell.js). */
.re-empf-buehne { position: relative; }
.re-empf-karte { position: relative; }
.re-empf-kat { align-self: flex-start; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: #334155; background: #f1f5f9; border-radius: 999px; padding: 2px 8px; margin-bottom: 4px; }
.re-empf-karte .re-empf-text { font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.re-empf-pfeil { margin-top: auto; padding-top: 6px; color: var(--blue-2); font-weight: 700; }
.re-empf-karte:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.re-empf-buehne[data-links="1"] .re-empf-reihe { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px); mask-image: linear-gradient(90deg, transparent 0, #000 40px); }
.re-empf-buehne[data-rechts="1"] .re-empf-reihe { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%); }
.re-empf-buehne[data-links="1"][data-rechts="1"] .re-empf-reihe { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%); }
.re-empf-knopf {
  position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
  border: 1px solid #334155; background: #fff; color: #0f172a; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
}
.re-empf-knopf-zurueck { left: 8px; }
.re-empf-knopf-vor { right: 8px; }
.re-empf-knopf[hidden] { display: none; }
.re-empf-knopf:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media (pointer: coarse) { .re-empf-knopf { display: none; } }

/* Das Versprechen vor dem Seitenfuß. */
.re-schild { background: #0f172a; color: #f8fafc; padding: 32px 0; margin-top: 8px; }
.re-schild h2 { font-size: 20px; margin: 0 0 16px; color: #fff; }
.re-schild-saeulen { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.re-schild-saeulen li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #334155; border-radius: 8px; background: #111c33; }
.re-schild-saeulen strong { font-size: 15px; color: #fff; }
.re-schild-saeulen span { font-size: 13.5px; line-height: 1.5; color: #cbd5e1; }
.re-schild-knopf { background: #fff; color: #0f172a; border-color: #fff; }
.re-schild-knopf:hover { background: #e2e8f0; color: #0f172a; }
.re-schild-knopf:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
@media print { .re-schild, .re-prozess, .re-fragen { display: none !important; } }

@media (prefers-reduced-motion: no-preference) {
  .re-fragen summary::before { transition: transform .18s ease; }
  .re-prozess-pipeline a { transition: transform .18s ease; }
  .re-prozess-pipeline a:hover { transform: translateY(-2px); }
  .re-prozess-pipeline a[aria-current="page"] { transform: scale(1.03); }
  .re-empf-karte { transition: transform .18s ease, box-shadow .18s ease; }
  .re-empf-karte:hover { transform: translateY(-4px); }
  .re-empf-pfeil { transition: transform .18s ease; }
  .re-empf-karte:hover .re-empf-pfeil, .re-empf-karte:focus-visible .re-empf-pfeil { transform: translateX(4px); }
}

/* Datei prüfen (Journal) */
.re-pruefen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.re-pruefen .re-klein { flex: 1 1 260px; margin: 0; }
.re-pruefen:focus-within label { outline: 3px solid var(--blue-2); outline-offset: 2px; }
#reDateiPruefenText[data-stand="ok"] { color: #166534; font-weight: 600; }
#reDateiPruefenText[data-stand="fehler"] { color: #991b1b; font-weight: 600; }
.rj-datei { font-size: 12px; color: #475569; margin-top: 2px; word-break: break-all; }

/* Vorschau-Kopf: ein leiser Hinweis, keine Ansage (2026-09-27). */
.re-vorschau-kopf { font-size: 12px; letter-spacing: 0; text-transform: none; color: #475569; }
.re-vorschau-kopf > span { display: inline-flex; align-items: center; gap: 6px; }

/* Stand als Fortschrittsbalken über dem Formular (0–100 %), zwei Spalten
   bleiben zwei Spalten. Die Checkliste ist ein Extra: aufklappbar über
   „Checkliste“, sonst unsichtbar. */
.re-stand-kopf { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.re-stand-wert { flex: none; font-size: 12.5px; font-weight: 600; color: #334155; min-width: 108px; }
.re-stand-balken { flex: 1; height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.re-stand-fuellung { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--thm, var(--blue)); }
.re-stand-balken[data-stand="fertig"] .re-stand-fuellung { background: #15803d; }
.re-stand-knopf {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 8px;
  border: 1px solid transparent; border-radius: 8px; background: none; color: #475569; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.re-stand-knopf:hover { background: #f1f5f9; }
.re-stand-knopf:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
@media (pointer: coarse) { .re-stand-knopf { min-height: 44px; } }
.re-stand ol { margin-top: 6px; }
html:not([data-re-stand-offen="1"]) .re-stand ol { display: none; }
@media (prefers-reduced-motion: no-preference) { .re-stand-fuellung { transition: width .3s ease; } }

/* Kopf zwischen Telefon und breitem Desktop: Knöpfe kompakt, damit die
   Vorgangs-Navigation nicht in eine senkrechte Liste gedrückt wird
   (gemessen bei 1100 px: ein Link je Zeile, Kopf 310 px hoch). */
@media (min-width: 561px) and (max-width: 1439.98px) {
  .re-katalog-text, .re-land-text, #reNeuOben .re-neu-lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #reNeuOben .re-neu-kurz { display: inline; }
  .re-nav { min-width: 280px; }
}
/* Steuerfall-Karten: kein Wort mehr mitten im Wort umbrechen („Umsatzst|euer“). */
.re-fall { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.re-fall label b, .re-fall label small { overflow-wrap: normal; word-break: normal; hyphens: auto; }
.re-schild-lede { max-width: 860px; margin: -6px 0 18px; font-size: 15px; line-height: 1.6; color: #e2e8f0; }
.re-schild-lede a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.re-schild-lede a:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }

/* Zielgrößen bei grobem Zeiger (2026-09-27): 44 px für alles, was man
   antippt -- gemessen waren Erklärknöpfe 32, Positionsknöpfe 36, Felder 42,
   Bausteine und Schalter 22 px. Der Erklärknopf bleibt optisch ein kleiner
   Kreis; die Trefferfläche ist der ganze 44er-Knopf. Nach Zeigerart, nicht
   nach Breite: das iPad im Querformat ist breit und trotzdem ein Finger. */
@media (pointer: coarse) {
  .re-hilfe-trigger { top: 0; right: 0; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; isolation: isolate; }
  .re-hilfe-trigger::before { content: ""; position: absolute; inset: 6px; z-index: -1; border: 1px solid #64748b; border-radius: 50%; background: #fff; }
  .re-segment label, .re-segment-klein label { min-height: 44px; }
  .re-schalter label, .re-baustein-kopf label { min-height: 44px; display: flex; align-items: center; }
  .rp input, .rp select, .rp textarea, .rp textarea.rp-besch { min-height: 44px; }
  .rp-knopf { width: 44px; height: 44px; }
}
.re-leiste-lokal { margin: -4px 0 10px; font-size: 13px; color: #475569; }
.re-unterklapp > summary { flex-wrap: wrap; row-gap: 0; }
.re-unterklapp > summary::before { content: "▸"; font-size: 12px; color: var(--ink-3); }
.re-unterklapp[open] > summary::before { content: "▾"; }
.re-unterklapp > summary small { flex-basis: 100%; padding-left: 20px; }
.re-unterklapp > summary { list-style: none; }
.re-unterklapp > summary::-webkit-details-marker { display: none; }
