/* =====================================================================================================
   Design des Prüfungsplaners (Skill „apple-design“): ruhig, klar, viel Weißraum – Lesbarkeit vor Effekt.
   Zentrale Datei für alle Farben, Abstände, Radien, Zeiten (Tokens) und die gemeinsamen Bausteine.
   Reihenfolge im <head>: style.css (seitenspezifische Regeln, wird schrittweise hierher umgezogen) →
   design.css → /theme.css (Kundendesign überschreibt --primaer/--akzent …, siehe webapp/design.py).
   Entscheidungen vom 13.11.2026: Systemschrift überall (Ziffern gleich breit), kleinste Schrift 14 px,
   Nebentext #55555A (Kontrast ≈ 7:1), nur helles Erscheinungsbild (data-theme="light").
   ===================================================================================================== */

:root {
  /* Kundendesign: Standardwerte (= /theme.css ohne Kundenvariablen). /theme.css überschreibt sie. */
  --primaer: #1F3A5F;               /* Navy (Standard ohne Kundenfarben) */
  --primaer-dunkel: #2A4D7A;
  --primaer-hell: #E9EBEF;
  --akzent: #1F3A5F;
  --akzent-lesbar: #1F3A5F;
  --akzentlinie: 1px;
  --akzentlinie-anmeldung: 0px;
  --kopf-linie: var(--line-stark);
  --nav-aktiv: #1F3A5F;
  --nav-unterstrich: transparent;
  --info-balken: 0px;
  /* Logo a³vero: Produktmarke, fest – /theme.css überschreibt diese Werte nicht */
  --logo-navy: #1F3A5F; --logo-haken: #4A90D9; --logo-drei: #4A90D9; --logo-hell: #8FC1F2; --logo-blass: #C9D6E6;
  --logo-auf-navy: #FFFFFF; --logo-haken-auf-navy: #8FC1F2; --logo-drei-auf-navy: #8FC1F2;
}

:root {
  color-scheme: light;

  /* Schrift */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 14px;            /* kleinste Schrift (Entscheidung: nie unter 14 px) */
  --fs-s: 14px;
  --fs-tabelle: 15px;       /* Mandatsübersicht und Tabellen (Entscheidung 04.11.2026) */
  --fs-m: 16px;
  --fs-l: 20px;
  --fs-xl: 28px;
  --fs-xxl: 40px;
  --lh: 1.5;
  --lh-text: 1.6;
  --tracking-title: -0.02em;

  /* Farben (hell) */
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #55555A;
  --platzhalter: #5E5E63;   /* Platzhaltertext: ≥ 4.8:1 auf allen Feldhintergründen (Kanzlei-Abschluss 19.11.) */
  --line: rgba(0, 0, 0, 0.08);
  --line-stark: rgba(0, 0, 0, 0.14);
  --fill: rgba(118, 118, 128, 0.12);          /* Felder, Segmented Control, Chips */
  --fill-hover: rgba(118, 118, 128, 0.18);
  --accent: var(--primaer);
  --accent-hover: var(--primaer-dunkel);
  --accent-fill: color-mix(in srgb, var(--primaer) 10%, transparent);
  --accent-fill-hover: color-mix(in srgb, var(--primaer) 16%, transparent);
  --auf-accent: #FFFFFF;
  --focus: #0071E3;
  --focus-ring: 0 0 0 4px rgba(0, 113, 227, 0.25);
  --testmodus-bg: #FFE9A8;
  --testmodus-text: #3D2B00;
  --abdunkeln: rgba(29, 29, 31, 0.32);
  --kopf-bg: rgba(255, 255, 255, 0.82);          /* Kopfzeile: Glas über dem Inhalt */
  --shadow-pille: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.06);

  /* Ampel – Punkt in kräftiger Farbe, Fläche gedämpft, Text dunkel (Kontrast ≥ 4,5:1) */
  --gruen: #34C759;  --gruen-bg: #E8F8EC;  --gruen-text: #1D6B38;
  --blau:  #0A84FF;  --blau-bg:  #E6F1FF;  --blau-text:  #0B4F9C;
  --gelb:  #FF9F0A;  --gelb-bg:  #FFF4E0;  --gelb-text:  #6B4600;
  --rot:   #FF3B30;  --rot-bg:   #FFE9E7;  --rot-text:   #B3261E;
  --grau:  #8E8E93;  --grau-bg:  #EFEFF1;  --grau-text:  #48484D;

  /* Form */
  --r-xs: 4px; --r-s: 8px; --r-m: 12px; --r-l: 18px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 16px 48px rgba(0, 0, 0, 0.16);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --hoehe: 40px;            /* Knöpfe, Felder, Klickflächen */
  --inhalt-breit: 1180px;
  /* Cockpit und Startseite (18./19.11.2026) */
  --fs-kennzahl: 32px;      /* Kennzahlen-Kacheln, Cockpit-Titel */
  --fs-karte-titel: 18px;   /* Mandatsname auf der Karte, Kacheltitel */
  --fs-zahl-karte: 22px;    /* Zahlen im Kartenfuß */
  --avatar: 36px;
  --punkt: 8px;             /* Punkt vor einer Aktivität */
  --kachel-min: 260px; --karte-min: 320px; --spalte-haupt: 560px; --spalte-neben: 300px;
  --opl-tabelle-min: 640px; --opl-punkt-min: 240px; --feld-min: 160px;
  /* KI-Kontingent (23.11.2026) */
  --zeile-min: 44px;        /* Listen- und Tabellenzeilen, Link-Klickflächen */
  --balken-dick: 10px;      /* Fortschrittsbalken Kontingent */
  --zahl-spalte: 56px;      /* Prozent rechts neben einem Balken */
  --ki-fakt-min: 140px; --ki-fakt-max: 220px; --ki-name-min: 120px; --ki-name-max: 200px;
  --ki-tabelle-min: 640px; --ki-preise-min: 760px; --ki-eingabe-min: 72px;

  /* Bewegung */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);     /* Intro a³vero: die drei „a“ wandern zusammen */
  --ease-federnd: cubic-bezier(0.34, 1.7, 0.5, 1); /* Intro a³vero: die „3“ springt leicht über das Ziel */
  --t-fast: 150ms; --t: 250ms; --t-slow: 400ms;
  --toast-dauer: 4s;

  /* Logo a³vero: Größen und Intro (Farben im ersten :root-Block) */
  --logo-klein: 22px; --logo-mittel: 36px; --logo-gross: clamp(44px, 12vw, 64px);
  --intro-dauer: 2.9s;
  --intro-haken-gross: 1.5;    /* Haken beim Zeichnen: so viel größer als das fertige „v“ (Entwurf a³vero) */
  --intro-weg: 0.25em;         /* „ero“ gleitet so weit heran */
  --intro-slogan-weg: 8px;     /* Slogan steigt so weit auf */
  --intro-wort: 0.36em;        /* Schriftgröße von „audit / assessment / automatic“ (bezogen auf das Logo) */
  --intro-a-gross: 2.778;      /* 1 / 0.36: so wächst das kleine „a“ auf die Größe des großen */
  --intro-zeile: 1.25em;       /* Zeilenabstand der drei Wörter (in ihrer eigenen Schriftgröße) */
  /* Abstände um „3“ und Haken (Entwurf a³vero, 23.11.2026): die „3“ dicht am „a“, der Haken schließt an „ero“ an */
  --logo-drei-links: 0.01em; --logo-drei-rechts: 0.05em;
  --logo-haken-links: 0.02em; --logo-haken-rechts: -0.01em;

}

/* =================================================================== Grundlagen */
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-m);
       line-height: var(--lh); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
       display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font); color: var(--text); }
h1 { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--tracking-title); line-height: 1.2; }
h2 { margin: 0; font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h3 { margin: 0; font-size: var(--fs-m); font-weight: 600; }
.zahl { font-family: var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--accent-fill-hover); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-s); }
.leise { color: var(--text-2); }
.klein { font-size: var(--fs-s); }
.fett { font-weight: 600; }
.normal { font-weight: 400; }
.inhalt p, .inhalt li { line-height: var(--lh-text); }
.icon-primaer { stroke: var(--accent); }

/* =================================================================== Testmodus-Banner */
.testmodus { background: var(--testmodus-bg); color: var(--testmodus-text); padding: var(--space-2) var(--space-6);
             font-size: var(--fs-s); text-align: center; }
/* Testkanzlei (26.11.2026): dezent, grau statt gelb – kein Alarm, nur Einordnung */
.testkanzlei { background: var(--grau-bg); color: var(--grau-text); padding: var(--space-1) var(--space-6);
               font-size: var(--fs-s); font-weight: 500; text-align: center; }

/* =================================================================== Kopfzeile und Navigation */
.kopf { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center;
        justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-6);
        background: var(--kopf-bg); -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px); border-bottom: var(--akzentlinie) solid var(--kopf-linie); }
.marke { display: flex; align-items: center; gap: var(--space-3); min-height: var(--hoehe); text-decoration: none; color: var(--text); }
.marke:hover { color: var(--text); }
.marke-logo { display: block; height: 40px; width: auto; }
.marke-trenner { width: 1px; height: 28px; background: var(--line-stark); }
/* Kanzleiname statt Logo (Kanzlei ohne eigenes Logo): ruhig, eine Zeile; auf dem Handy nur unser Logo */
.marke-kanzlei { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-s);
                 font-weight: 600; color: var(--text); }
@media (max-width: 600px) { .marke-kanzlei, .marke-kanzlei + .marke-trenner { display: none; } }
/* Kopfzeile rechts (23.11.2026): Pillen-Leiste wie ein Segmented Control (graue Fläche, aktive Seite als weiße Pille
   mit Schatten, gleitet beim Seitenwechsel per View Transition) – daneben Name als Text und „Abmelden“ als Nebenknopf.
   Pillen 40 px hoch, Klickfläche 44 px (Leiste mit 2 px Innenrand); auf dem Handy bricht die Zeile um. */
.kopf-rechts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-4); }
.nav { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 2px; border-radius: var(--r-pill);
       background: var(--fill); font-size: var(--fs-s); }
.nav-pille { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hoehe); padding: 0 var(--space-4);
             border-radius: var(--r-pill); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap;
             transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.nav-pille:hover { color: var(--text); background: var(--fill); }
.nav-pille:active { transform: scale(0.97); }
.nav-pille[aria-current="page"], .nav-pille[aria-current="page"]:hover { background: var(--surface); box-shadow: var(--shadow-pille);
                                       color: var(--nav-aktiv); font-weight: 600; view-transition-name: nav-pille; }
::view-transition-group(nav-pille) { animation-duration: var(--t); animation-timing-function: var(--ease-out); }
.konto { display: flex; align-items: center; gap: var(--space-2); }
.konto form { margin: 0; }
.konto-name { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-2); max-width: 22ch;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: var(--fs-s);
              text-decoration: none; border-radius: var(--r-s); }
.konto-name:hover, .konto-name[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.konto .nav-abmelden { min-height: 44px; padding: 0 var(--space-4); font-size: var(--fs-s); }

/* =================================================================== Inhalt und Seitenkopf */
.inhalt { flex: 1 0 auto; width: 100%; max-width: var(--inhalt-breit); margin: 0 auto;
          padding: var(--space-6) var(--space-5) var(--space-7); display: flex; flex-direction: column; gap: var(--space-5); }
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.titelblock { display: flex; flex-direction: column; gap: var(--space-1); }
.untertitel { margin: 0; color: var(--text-2); }
.abschnitt { display: flex; flex-direction: column; gap: var(--space-3); }
.abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.knopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.knopfgruppe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.knopfgruppe form { margin: 0; }

/* =================================================================== Seitenfuß */
.seitenfuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5);
              padding: var(--space-5) var(--space-6); background: transparent; font-size: var(--fs-s); color: var(--text-2); }
.seitenfuss-marke { margin: 0; color: var(--text-2); }
.seitenfuss-links { display: flex; flex-wrap: wrap; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.seitenfuss-links a, .anmelde-fuss a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }
.seitenfuss-links a:hover, .anmelde-fuss a:hover { color: var(--text); text-decoration: underline; }
.seitenfuss-links a[aria-current="page"] { font-weight: 600; color: var(--text); }

/* =================================================================== Knöpfe – eine Hauptaktion je Ansicht */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--hoehe);
         padding: 0 20px; border: none; border-radius: var(--r-pill); background: var(--accent); color: var(--auf-accent);
         font: inherit; font-size: var(--fs-m); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
         cursor: pointer; transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.knopf:hover { background: var(--accent-hover); color: var(--auf-accent); }
.knopf:active { transform: scale(0.97); }
/* deaktiviert: nicht verblassen (opacity 0.4 ergab 3.2:1), sondern neutrale Füllung mit --text-2 (≥ 4.5:1);
   ladende Knöpfe (.laedt-knopf) behalten ihr Aussehen, siehe unten */
.knopf:disabled:not(.laedt-knopf), .knopf[aria-disabled="true"] { background: var(--fill); color: var(--text-2);
                                                                  box-shadow: none; cursor: not-allowed; transform: none; }
.knopf svg { stroke: currentColor; }
.knopf-zweit { background: var(--accent-fill); color: var(--accent); }
.knopf-zweit:hover { background: var(--accent-fill-hover); color: var(--accent-hover); }
.knopf-klein { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); min-height: var(--hoehe);
               padding: 0 var(--space-4); border: none; border-radius: var(--r-pill); background: var(--fill); color: var(--text);
               font: inherit; font-size: var(--fs-s); font-weight: 500; text-decoration: none; cursor: pointer;
               transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.knopf-klein:hover { background: var(--fill-hover); color: var(--text); }
.knopf-klein:active { transform: scale(0.97); }
.knopf.knopf-klein { background: var(--accent); color: var(--auf-accent); font-weight: 600; }
.knopf-gefahr, .knopf-gefahr-rand { background: transparent; color: var(--rot-text); }
.knopf-gefahr:hover, .knopf-gefahr-rand:hover { background: var(--rot-bg); color: var(--rot-text); }
.knopf-gefahr-voll { background: var(--rot-text); color: var(--auf-accent); }
.knopf-gefahr-voll:hover { background: var(--rot-text); filter: brightness(0.9); color: var(--auf-accent); }
.knopf-gross { min-height: 48px; padding: 0 28px; }

/* =================================================================== Formularfelder */
.formular { display: flex; flex-direction: column; gap: var(--space-4); }
.feld { display: flex; flex-direction: column; gap: var(--space-1); }
.feld label, .feld > .fett { font-size: var(--fs-s); font-weight: 600; }
.feld .hilfe, .hilfe { font-size: var(--fs-s); color: var(--text-2); }
.feld input, .feld select, .feld textarea, .suchfeld, .auswahl {
  font: inherit; font-size: var(--fs-m); min-height: var(--hoehe); padding: 0 var(--space-3); border: none;
  border-radius: var(--r-m); background: var(--fill); color: var(--text);
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.feld textarea { padding: var(--space-2) var(--space-3); resize: vertical; }
.feld input:hover, .feld select:hover, .suchfeld:hover, .auswahl:hover { background: var(--fill-hover); }
.feld input:focus, .feld select:focus, .feld textarea:focus, .suchfeld:focus, .auswahl:focus {
  outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.feld input[type="checkbox"], .feld input[type="radio"] { min-height: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* =================================================================== Karten */
.karte { background: var(--surface); border: none; border-radius: var(--r-l); box-shadow: var(--shadow-1); padding: var(--space-5); }
/* Anheben beim Überfahren nur bei Karten, die als Ganzes anklickbar sind */
.karte-link { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.karte-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* =================================================================== Tabellen */
.tabellen-rahmen { position: relative; background: var(--surface); border: none; border-radius: var(--r-l); box-shadow: var(--shadow-1); overflow-x: auto; }
.karte .tabellen-rahmen { box-shadow: none; border-radius: var(--r-m); background: transparent; }
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--fs-tabelle); min-width: 900px; }
.tabelle th { text-align: left; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; padding: var(--space-3) var(--space-4);
              border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabelle td { height: 44px; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.tabelle tbody tr:last-child td { border-bottom: none; }
.tabelle tbody tr { transition: background-color var(--t-fast) var(--ease); }
.tabelle tbody tr:hover { background: var(--bg); }
.tabelle .rechts, .tabelle td.zahl, .tabelle th.zahl { text-align: right; }
.tabelle td.zahl { font-weight: 500; }
.tabelle .leer { text-align: center; color: var(--text-2); padding: var(--space-6) var(--space-4); }
.tabelle-schmal { min-width: 0; }
.oeffnen { display: inline-flex; align-items: center; min-height: var(--hoehe); }
.link-stark { font-weight: 600; text-decoration: none; }

/* =================================================================== Ampel-Badges: Punkt + Wort */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill);
         font-size: var(--fs-s); font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--grau-bg); color: var(--grau-text);
         transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--grau); }
.badge-ok { background: var(--gruen-bg); color: var(--gruen-text); }
.badge-ok::before { background: var(--gruen); }
.badge-blau { background: var(--blau-bg); color: var(--blau-text); }
.badge-blau::before { background: var(--blau); }
.badge-gelb { background: var(--gelb-bg); color: var(--gelb-text); }
.badge-gelb::before { background: var(--gelb); }
.badge-fehler { background: var(--rot-bg); color: var(--rot-text); }
.badge-fehler::before { background: var(--rot); }
.badge-grau { background: var(--grau-bg); color: var(--grau-text); }
.badge-kompakt { display: flex; width: max-content; margin-top: var(--space-1); padding: 1px 8px 1px 6px; }
@keyframes bestaetigt { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.badge.gerade-entschieden { animation: bestaetigt var(--t) var(--ease-out); }

/* =================================================================== Hinweise */
.hinweis { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--r-m);
           font-size: 16px; line-height: 1.6; background: var(--grau-bg); color: var(--text); }
.hinweis svg { flex: none; margin-top: 3px; stroke: currentColor; }
.hinweis-info, .freigabe-banner { background: var(--primaer-hell); color: var(--primaer-dunkel); border-left: var(--info-balken) solid var(--primaer-dunkel); }
.hinweis-warn { background: var(--gelb-bg); color: var(--gelb-text); }
.hinweis-fehler { background: var(--rot-bg); color: var(--rot-text); }
.hinweis-ok { background: var(--gruen-bg); color: var(--gruen-text); }
.hinweis-grau { background: var(--grau-bg); color: var(--grau-text); }

/* =================================================================== Meldungen als Toast (static/meldung.js) */
@keyframes toast-auf { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: var(--space-5); transform: translateX(-50%);
         width: max-content; max-width: min(560px, calc(100% - 32px)); align-items: center; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
         border-radius: var(--r-m); box-shadow: var(--shadow-2); animation: toast-auf var(--t) var(--ease-out) both;
         transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.toast.hinweis-ok, .toast.hinweis-info { background: var(--surface); color: var(--text); border-left: none; }
.toast.hinweis-ok::before, .toast.hinweis-info::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--gruen); }
.toast.hinweis-info::before { background: var(--blau); }
.toast-text { flex: 1 1 auto; }
.toast-zu { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--hoehe); height: var(--hoehe);
            margin: calc(var(--space-2) * -1) 0; border: none; border-radius: var(--r-pill); background: transparent; color: inherit;
            font: inherit; font-size: var(--fs-l); line-height: 1; cursor: pointer; }
.toast-zu:hover { background: var(--fill); }
.toast.toast-weg { opacity: 0; transform: translate(-50%, 12px); }

/* =================================================================== Chips (Filter) und Geschäftsjahre */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; min-height: var(--hoehe); padding: 0 var(--space-4); border: none; border-radius: var(--r-pill);
        background: var(--fill); color: var(--text); font-size: var(--fs-s); text-decoration: none;
        transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.chip:hover { background: var(--fill-hover); color: var(--text); }
.chip[aria-current="true"], .chip[aria-current="true"]:hover { background: var(--text); color: var(--surface); font-weight: 600; }
.filterleiste { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin: 0; }
.suchfeld { flex: 1 1 260px; max-width: 360px; }
.gj-auswahl { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gj-chip { display: inline-flex; align-items: center; min-height: var(--hoehe); padding: 0 var(--space-4); border: none; border-radius: var(--r-pill);
           background: var(--fill); color: var(--text); font-size: var(--fs-m); font-weight: 500; font-variant-numeric: tabular-nums;
           text-decoration: none; white-space: nowrap; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.gj-chip:hover { background: var(--fill-hover); color: var(--text); }
.gj-chip[aria-current="true"], .gj-chip[aria-current="true"]:hover { background: var(--accent); color: var(--auf-accent); font-weight: 600; }
.gj-chip-offen { font-size: var(--fs-s); }
/* Etappe 2: Die aktive Pille gleitet zur neuen Auswahl (View Transitions, je Gruppe ein eigener Name) */
[data-pille="liste"] .chip[aria-current="true"] { view-transition-name: pille-liste; }
[data-pille="rechnung"] .chip[aria-current="true"] { view-transition-name: pille-rechnung; }
[data-pille="status"] .chip[aria-current="true"] { view-transition-name: pille-status; }
.gj-auswahl .gj-chip[aria-current="true"] { view-transition-name: pille-gj; }
[data-pille="team"] .chip[aria-current="true"] { view-transition-name: pille-team; }
::view-transition-group(pille-liste), ::view-transition-group(pille-rechnung), ::view-transition-group(pille-status),
::view-transition-group(pille-gj), ::view-transition-group(pille-team) { animation-duration: var(--t); animation-timing-function: var(--ease-out); }

/* =================================================================== Reiter: Segmented Control mit gleitender Pille */
.reiter { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--fill);
          max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.reiter-link { display: inline-flex; align-items: center; gap: var(--space-2); flex: none; min-height: 36px; padding: 0 var(--space-5);
               border-radius: var(--r-pill); color: var(--text); font-size: var(--fs-s); font-weight: 500; text-decoration: none; white-space: nowrap;
               transition: background-color var(--t-fast) var(--ease); }
.reiter-link:hover { color: var(--text); background: var(--fill); }
.reiter-link[aria-current="page"], .reiter-link[aria-current="page"]:hover { background: var(--surface); box-shadow: var(--shadow-pille);
                                    font-weight: 600; view-transition-name: reiter-pille; }
/* Ein view-transition-name darf je Seite nur einmal vorkommen: Das Cockpit hat zwei Reiter-Leisten (GJ und Status),
   die Status-Leiste bekommt deshalb einen eigenen Namen (sonst JS-Fehler „duplicate view-transition-name“). */
.opl-reiter .reiter-link[aria-current="page"] { view-transition-name: reiter-opl; }
.reiter-bald { display: inline-flex; align-items: center; padding: 0 var(--space-2); border-radius: var(--r-pill); font-size: var(--fs-xs);
               font-weight: 500; line-height: 1.5; background: var(--grau-bg); color: var(--grau-text); }
.reiter-inhalt { display: flex; flex-direction: column; gap: var(--space-4); }
/* Wechsel zwischen den Reitern (eigene Seitenaufrufe): die Pille gleitet – View Transitions, ohne JavaScript */
@view-transition { navigation: auto; }
::view-transition-group(reiter-pille), ::view-transition-group(reiter-opl) { animation-duration: var(--t); animation-timing-function: var(--ease-out); }
/* Die Seite selbst wird nicht überblendet (Etappe 1 „Ruckeln weg“): neue Seiten blenden ihre Abschnitte ein, dieselbe
   Seite (Speichern, Filtern) steht sofort da – keine doppelte Bewegung. Benannte Elemente (Pille) gleiten weiter. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }

/* =================================================================== Kennzahlen, Werkzeuge */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4) var(--space-5);
              padding: var(--space-5); background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.karte .kennzahlen { padding: var(--space-4); background: var(--bg); box-shadow: none; border-radius: var(--r-m); }
.kennzahl { display: flex; flex-direction: column; gap: 2px; }
.kennzahl > .fett { font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.01em; }
.werkzeug { display: flex; flex-direction: column; gap: var(--space-3); }
.werkzeug h2 { font-size: var(--fs-l); }
.werkzeug-ergebnis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
                     padding: var(--space-4); background: var(--bg); border-radius: var(--r-m); }
.werkzeug-knoepfe { align-items: stretch; }
.werkzeug-knoepfe .knopf { min-width: 150px; }
.klein-titel { font-size: var(--fs-m); margin: var(--space-1) 0 0; }
.mandat-aktionen { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.rechtsform-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.rechtsform-link { font-weight: 600; }

/* =================================================================== Schritte eines Assistenten */
.schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.schritt { flex: 1 1 180px; display: flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); padding: var(--space-2) var(--space-3);
           border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 500; background: var(--fill); color: var(--text-2); }
.schritt-fertig { background: var(--gruen-bg); color: var(--gruen-text); }
.schritt-aktiv { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1), 0 0 0 1.5px var(--akzent-lesbar); }
.schritt-nr { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
              font-size: var(--fs-xs); background: var(--surface); color: var(--text-2); }
.schritt-fertig .schritt-nr { background: var(--gruen-text); color: var(--auf-accent); }
.schritt-aktiv .schritt-nr { background: var(--akzent-lesbar); color: var(--auf-accent); }
/* Auftrag „Schritte anklickbar“ (static/schritte.js): erledigte Schritte sind Links, spätere gesperrt */
.schritt-klickbar { padding: 0; }
.schritt-link { flex: 1; display: flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); padding: var(--space-2) var(--space-3);
                border-radius: inherit; color: inherit; text-decoration: none;
                transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.schritt-link:hover { background: color-mix(in srgb, var(--gruen-text) 10%, var(--gruen-bg)); text-decoration: underline; text-underline-offset: 3px; }
.schritt-link:active { transform: scale(0.97); }
.schritt-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* gesperrt: nicht verblassen (Kontrast), sondern ohne Füllung mit feinem Rahmen; Text bleibt --text-2 (≥ 4.5:1) */
.schritt-gesperrt { cursor: not-allowed; background: transparent; color: var(--text-2);
                    box-shadow: inset 0 0 0 1px var(--line-stark); }
.schritt-gesperrt .schritt-nr { background: var(--fill); color: var(--text-2); }
/* Ziel eines Sprungs: kurz weich einblenden (nur transform/opacity) */
@keyframes schritt-ziel { from { opacity: 0.35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.schritt-ziel-auf { animation: schritt-ziel var(--t-slow) var(--ease-out) both; }
[data-schritt-anker] { scroll-margin-top: var(--space-6); }
/* Rücksprung-Dialog: Folgen, Pflicht-Begründung, Warnung „Anforderung schon erstellt“ */
.dialog-breit { width: min(520px, calc(100% - 32px)); }
.dialog .feld { margin-bottom: var(--space-4); }
.dialog .feld textarea { width: 100%; }
.anforderung-stand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0 0; }
/* „Neuen Lauf mit diesen Angaben“ (templates/_neuer_lauf.html) */
.neuer-lauf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-4); }
.neuer-lauf .leise { flex: 1 1 280px; }

/* =================================================================== Listen */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.listen-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
                padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.liste .listen-zeile:last-child { border-bottom: none; }

/* =================================================================== Dialog */
@keyframes dialog-auf { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.dialog { width: min(420px, calc(100% - 32px)); padding: var(--space-5); border: none; border-radius: var(--r-l); background: var(--surface);
          color: var(--text); box-shadow: var(--shadow-3); }
.dialog[open] { animation: dialog-auf var(--t) var(--ease-out); }
.dialog::backdrop { background: var(--abdunkeln); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-titel { margin: 0 0 var(--space-2); font-size: var(--fs-l); }
.dialog-text { margin: 0 0 var(--space-4); color: var(--text-2); }
.dialog .hinweis { margin-bottom: var(--space-4); }
.dialog .hinweis[hidden] { display: none; }
.dialog-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }

/* =================================================================== Aufklapper */
details > summary { cursor: pointer; }
details > summary::marker { content: ""; }
details > summary::before { content: "›"; display: inline-block; margin-right: var(--space-2); color: var(--text-2);
                            transition: transform var(--t) var(--ease); }
details[open] > summary::before { transform: rotate(90deg); }
/* Etappe 2: Inhalt eines Aufklappers gleitet weich herein */
@keyframes aufklappen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
details[open] > :not(summary) { animation: aufklappen var(--t) var(--ease-out) both; }
.freigabe-formular > summary::before { content: none; }

/* =================================================================== Seitenaufbau: weich einblenden */
@keyframes einblenden { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.inhalt > * { animation: einblenden var(--t-slow) var(--ease-out) both; }
.inhalt > *:nth-child(2) { animation-delay: 40ms; }
.inhalt > *:nth-child(3) { animation-delay: 80ms; }
.inhalt > *:nth-child(n+4) { animation-delay: 120ms; }
/* Der Toast hat seine eigene Animation (sonst überschreibt „einblenden“ die Zentrierung) */
.inhalt > .toast { animation: toast-auf var(--t) var(--ease-out) both; }

/* =================================================================== Etappe 2: Formulare der Prüfungen */
.zwei-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.datei-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
fieldset.kachel-gruppe, .ohne-rahmen { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.kachel-gruppe > legend { font-size: var(--fs-s); font-weight: 600; padding: 0; margin-bottom: var(--space-2); }
/* Dateiauswahl als ruhige Ablagefläche */
.feld input.datei-feld { min-height: 76px; padding: var(--space-4); border: 1.5px dashed var(--line-stark); border-radius: var(--r-m);
                         background: var(--bg); cursor: pointer; font-size: var(--fs-s); }
.feld input.datei-feld:hover { border-color: var(--accent); background: var(--accent-fill); }
.feld input.datei-feld::file-selector-button { margin-right: var(--space-3); min-height: 36px; padding: 0 var(--space-4); border: none;
                                                border-radius: var(--r-pill); background: var(--accent); color: var(--auf-accent);
                                                font: inherit; font-size: var(--fs-s); font-weight: 600; cursor: pointer; }
.hochgeladen { font-size: var(--fs-s); color: var(--gruen-text); }

/* Auswahl (Radio/Checkbox) als Pillen: der native Kreis bleibt für Tastatur und Screenreader, ist aber unsichtbar */
.optionen { border: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.optionen legend { font-size: var(--fs-s); font-weight: 600; padding: 0; margin-bottom: var(--space-2); width: 100%; }
.optionen label { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe);
                  padding: 0 var(--space-4); border-radius: var(--r-pill); background: var(--fill); color: var(--text); cursor: pointer;
                  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.optionen label:hover { background: var(--fill-hover); }
.optionen label:has(input[type="radio"]) input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.optionen label:has(input:checked) { background: var(--accent); color: var(--auf-accent); font-weight: 600; }
.optionen label:has(input[type="checkbox"]:checked) { background: var(--accent-fill-hover); color: var(--text); }
.optionen label:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.optionen label.leise:not(:has(input:checked)) { background: transparent; color: var(--text-2); }
.optionen-liste { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
/* Etappe 3: Auswahl als Pillen statt Dropdown (templates/_pillen.html) */
.pillen { margin-bottom: var(--space-2); }
.pille-vorschlag { display: inline-flex; align-items: center; padding: 0 var(--space-2); border-radius: var(--r-pill);
                   font-size: var(--fs-xs); font-weight: 500; line-height: 1.6; background: var(--surface); color: var(--text-2); }
.optionen label:has(input:checked) .pille-vorschlag { background: var(--accent-hover); color: var(--auf-accent); }
.optionen label:has(input:checked) .leise { color: var(--auf-accent); opacity: .8; }
.pillen-gruppe-titel { width: 100%; margin-top: var(--space-2); font-size: var(--fs-s); color: var(--text-2); }
.pillen-gruppe-titel:first-of-type { margin-top: 0; }
.pillen-hilfe { width: 100%; margin: 0; }
.optionen label.gerade-entschieden { animation: bestaetigt var(--t) var(--ease-out); }
/* Lange Listen bleiben ein Dropdown – in Pillenform, Pfeil per CSS in der Token-Farbe */
.auswahl-pfeil { position: relative; display: inline-flex; }
.auswahl-pfeil::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
                        border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg);
                        pointer-events: none; }
.auswahl.auswahl-pille { -webkit-appearance: none; appearance: none; border-radius: var(--r-pill); padding: 0 44px 0 var(--space-4);
                         cursor: pointer; }
/* Pflicht-Häkchen vor dem Start (Schwärzung geprüft) */
.pflicht-haekchen { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: none;
                    border-radius: var(--r-m); background: var(--gelb-bg); color: var(--gelb-text); font-weight: 500; cursor: pointer; }
.pflicht-haekchen input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
.pflicht-haekchen:has(input:checked) { background: var(--gruen-bg); color: var(--gruen-text); }
.pflicht-haekchen:has(input:focus-visible) { box-shadow: var(--focus-ring); }
/* Optionale Vorbelegung (z. B. Vorgaben → Saldenbestätigungen): neutral statt gelb/grün – keine Warnung */
.pflicht-haekchen.haekchen-neutral, .pflicht-haekchen.haekchen-neutral:has(input:checked) { background: var(--fill);
                    color: var(--text); font-weight: 400; }

/* Vorschau: was an die KI geht */
.vorschau-dokument { display: flex; flex-direction: column; gap: var(--space-2); }
.vorschau-dokument h3 { margin: var(--space-2) 0 0; font-size: var(--fs-m); font-weight: 600; }
mark.geschwaerzt { background: var(--gelb-bg); color: var(--gelb-text); box-shadow: inset 0 0 0 1px var(--gelb); border-radius: var(--r-xs); font-weight: 500; }

/* =================================================================== Etappe 2: Kontrollen, Hinweise, Aufklapper */
.kontroll-liste, .hinweis-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.kontrolle { display: flex; align-items: flex-start; gap: var(--space-3); }
.kontrolle svg, .hinweis-kasten svg { flex: none; margin-top: 3px; }
.kontrolle > .status-gut, .kontrolle > .status-schlecht, .kontrolle > .leise { flex: none; width: 22px; height: 22px; margin-top: 1px; display: inline-flex;
                                    align-items: center; justify-content: center; border-radius: 50%; font-size: var(--fs-s); font-weight: 700; }
.kontrolle > .status-gut { background: var(--gruen-bg); color: var(--gruen-text); }
.kontrolle > .status-schlecht { background: var(--rot-bg); color: var(--rot-text); }
.kontrolle > .leise { background: var(--grau-bg); }
.kontrolle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.kontrolle-titel { font-weight: 600; }
.kontrolle-detail { font-size: 16px; }
.hinweis-kasten { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--gelb-bg);
                  border-radius: var(--r-m); color: var(--gelb-text); line-height: var(--lh-text); overflow-wrap: anywhere; }
.aufklapper > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); min-height: var(--hoehe); font-weight: 600; }
.aufklapper[open] > summary { margin-bottom: var(--space-3); }
.herleitung { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: var(--space-1); }
.text-rot { color: var(--rot-text); }
.text-blau { color: var(--blau-text); }
.download-liste:not(.liste) { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* =================================================================== Etappe 2: Prüfliste */
.fortschritt-balken { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: none; border-radius: var(--r-pill);
                      background: var(--fill); overflow: hidden; accent-color: var(--accent); }
.fortschritt-balken::-webkit-progress-bar { background: var(--fill); border-radius: var(--r-pill); }
.fortschritt-balken::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
.fortschritt-balken::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }
.prueflisten-filter { margin: var(--space-2) 0 var(--space-4); }
/* Beim ersten Öffnen der Prüfliste: Zeilen gleiten nacheinander ein, die KI-Ergebnis-Chips springen auf.
   Nur mit JavaScript (oberflaeche.js setzt .einfliegen und --i je Zeile, höchstens 12 Stufen) und nur ohne
   „Bewegung reduzieren“ – sonst steht alles sofort da. Beim Filtern und nach dem Speichern keine Wiederholung. */
@keyframes aufspringen { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .pruefliste.einfliegen tbody tr { animation: einblenden var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
  .pruefliste.einfliegen tbody .badge { animation: aufspringen var(--t-slow) var(--ease-out) both;
                                        animation-delay: calc(var(--i, 0) * 40ms + 180ms); }
}
.pruefliste td { vertical-align: top; }
.pruefliste .zitat { display: inline-block; margin-top: var(--space-1); padding-left: var(--space-2); border-left: 2px solid var(--line-stark);
                     font-style: italic; color: var(--text); }
/* Rechnerische Prüfung: Rechenweg in Tabellenziffern, Beträge nicht umbrechen, geklärte Zeilen zurückgenommen */
.rechenliste .rechenweg { display: inline-block; margin-top: var(--space-1); font-variant-numeric: tabular-nums; font-weight: 500; }
.rechenliste td.zahl { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rechenliste tr.geklaert td { color: var(--text-2); }
.rechenliste tr[id^="r-"] { scroll-margin-top: 96px; }   /* Sprungziel aus der OPL (wie .abgleich-zeile) */
.rechenliste tr.geklaert .badge { opacity: 0.6; }
.klaeren-wahl { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); }
.rechenliste td:nth-child(2) { min-width: 22rem; }
.anmerkung-feld { width: 100%; min-width: 14rem; font: inherit; font-size: var(--fs-s); min-height: var(--hoehe); padding: 0 var(--space-3);
                  border: none; border-radius: var(--r-m); background: var(--fill); color: var(--text); }
.anmerkung-feld:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
/* Entscheidung Ja / Nein / n/a / offen als Segmented Control */
.entscheidung-wahl { border: 0; margin: 0; padding: 2px; display: inline-flex; flex-wrap: nowrap; gap: 2px; border-radius: var(--r-pill); background: var(--fill); }
.entscheidung-wahl label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px;
                           padding: 0 var(--space-2); border-radius: var(--r-pill); font-size: var(--fs-s); white-space: nowrap; cursor: pointer;
                           transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.entscheidung-wahl label:hover { background: var(--fill); }
.entscheidung-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.entscheidung-wahl label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow-pille); color: var(--text); font-weight: 600; }
.entscheidung-wahl label:has(input[value="Ja"]:checked) { color: var(--gruen-text); }
.entscheidung-wahl label:has(input[value="Nein"]:checked) { color: var(--rot-text); }
.entscheidung-wahl label:has(input[value="n/a"]:checked) { color: var(--blau-text); }
.entscheidung-wahl label:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.entscheidung-wahl label.gerade-entschieden { animation: bestaetigt var(--t) var(--ease-out); }
.klaeren-wahl.gerade-entschieden { animation: bestaetigt var(--t) var(--ease-out); }

/* =================================================================== Etappe 2: KI-Prüfung läuft */
.status-zeile { display: flex; align-items: center; gap: var(--space-3); }
@keyframes drehen { to { transform: rotate(360deg); } }
.kreisel { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--accent);
           animation: drehen 0.9s linear infinite; }
/* Fortschritt: Balken wächst per transform (den Anteil setzt static/oberflaeche.js aus den Meldungen) */
.fortschritt { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--fill); overflow: hidden; }
.fortschritt > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); transform-origin: left;
                      transform: scaleX(var(--anteil, 0)); transition: transform var(--t-slow) var(--ease-out); }
.fortschritt-text { margin: 0; font-size: var(--fs-s); color: var(--text-2); }
.fortschritt-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.fortschritt-liste li { font-size: var(--fs-s); color: var(--text-2); }
.fortschritt-liste li.fertig { color: var(--gruen-text); }

/* Ladeseite (static/laden.js): erscheint sofort nach „Weiter“, „Prüfung starten“, „Dokumente erstellen“ –
   ganzseitig, ruhig eingeblendet, mit Kreisel und (beim Hochladen) Fortschrittsbalken. */
@keyframes ladeseite-auf { from { opacity: 0; } to { opacity: 1; } }
.ladeseite { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--space-4);
             background: var(--bg); animation: ladeseite-auf var(--t) var(--ease-out) both; }
.ladeseite-karte { width: min(480px, 100%); display: flex; flex-direction: column; gap: var(--space-4);
                   animation: dialog-auf var(--t) var(--ease-out) both; }
.ladeseite-titel { margin: 0; font-size: var(--fs-l); letter-spacing: var(--tracking-title); }
.ladeseite-text { margin: 0; font-size: var(--fs-s); color: var(--text-2); }
.ladeseite [hidden] { display: none !important; }
.ladeseite .knopf { align-self: flex-end; }
.ladeseite-offen body { overflow: hidden; }
/* Download-Knopf während ZIP/Excel erstellt werden */
.kreisel-klein { width: 14px; height: 14px; border-width: 2px; border-color: currentColor; border-top-color: transparent; }
.laedt { display: inline-flex; align-items: center; gap: var(--space-2); cursor: progress; opacity: 0.7; }
/* Absende-Knopf während der Anfrage: Kreisel im Knopf, nicht so blass wie ein gesperrter Knopf */
.knopf.laedt-knopf:disabled { opacity: 0.8; cursor: progress; }
/* Ladelinie bei jedem Seitenwechsel (erst nach 150 ms, static/laden.js): wächst langsam gegen 90 % */
.ladelinie { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; height: 3px; pointer-events: none; }
.ladelinie > span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0);
                    border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.ladelinie.ladelinie-kopf { position: absolute; top: auto; bottom: -2px; }
.ladelinie.aktiv > span { transform: scaleX(0.9); transition: transform 8s cubic-bezier(0.1, 0.7, 0.2, 1); }
/* Statusseite: neue Fortschrittszeilen blenden einzeln ein (static/status.js) */
.fortschritt-liste li.neue-zeile { animation: einblenden var(--t-slow) var(--ease-out) both; }

/* Etappe 2: Planungs-Statusseite als Schrittfolge. Die Verbindungslinie füllt sich (transform), ein Schritt, der
   gerade fertig oder aktiv wird, ploppt kurz auf (static/status.js setzt .plan-schritt-neu). */
.plan-schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plan-schritt { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-3);
                padding-bottom: var(--space-5); }
.plan-schritt:last-child { padding-bottom: 0; }
.plan-schritt:not(:last-child)::before, .plan-schritt:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; border-radius: var(--r-pill); }
.plan-schritt:not(:last-child)::before { background: var(--fill); }
.plan-schritt:not(:last-child)::after { background: var(--gruen); transform-origin: top; transform: scaleY(0);
                                        transition: transform var(--t-slow) var(--ease-out); }
.plan-schritt-fertig:not(:last-child)::after { transform: scaleY(1); }
.plan-schritt-marke { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
                      border-radius: 50%; background: var(--fill); color: var(--text-2); font-size: var(--fs-s); font-weight: 600;
                      font-variant-numeric: tabular-nums; }
.plan-schritt-fertig .plan-schritt-marke { background: var(--gruen-bg); color: var(--gruen-text); }
.plan-schritt-laeuft .plan-schritt-marke { background: var(--surface); color: var(--accent); box-shadow: 0 0 0 1.5px var(--akzent-lesbar); }
.plan-schritt-text { display: flex; flex-direction: column; justify-content: center; min-height: 32px; }
.plan-schritt-name { font-weight: 500; }
.plan-schritt-laeuft .plan-schritt-name { font-weight: 600; }
.plan-schritt-wartet .plan-schritt-name { color: var(--text-2); }
.plan-schritt-detail { font-size: var(--fs-s); color: var(--text-2); overflow-wrap: anywhere; }
@keyframes schritt-auf { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.1); } 100% { transform: scale(1); } }
.plan-schritt-neu .plan-schritt-marke { animation: schritt-auf var(--t-slow) var(--ease-out) both; }
.plan-schritt-neu .plan-schritt-text { animation: einblenden var(--t) var(--ease-out) both; }

/* Etappe 2: weitere ruhige Bewegung */
.tabelle tbody tr { transition: background-color var(--t-fast) var(--ease); }
.kennzahlen > .kennzahl { animation: einblenden var(--t-slow) var(--ease-out) both; }
.kennzahlen > .kennzahl:nth-child(2) { animation-delay: 40ms; }
.kennzahlen > .kennzahl:nth-child(3) { animation-delay: 80ms; }
.kennzahlen > .kennzahl:nth-child(n+4) { animation-delay: 120ms; }
.rechenliste td { transition: color var(--t) var(--ease); }
.rechenliste tr:has(.klaeren-wahl input:checked) td { color: var(--text-2); }
.rechenliste tr .badge { transition: opacity var(--t) var(--ease); }
.rechenliste tr:has(.klaeren-wahl input:checked) .badge { opacity: 0.6; }
.fortschritt-liste li.fehler { color: var(--rot-text); }

/* =================================================================== Etappe 3a: Prüfungsplanung */
/* Ergebnis-Kopf: ruhig wie ein Seitentitel, Status als runder Punkt mit Zeichen (nie nur Farbe) */
.status-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }
.status-kopf .status-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.status-kopf .status-text p { margin: 0; }
.status-kopf h1 { font-size: var(--fs-xl); }
.status-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.status-kopf.status-gut .status-icon { background: var(--gruen-bg); color: var(--gruen-text); }
.status-kopf.status-schlecht .status-icon { background: var(--rot-bg); color: var(--rot-text); }
.status-kopf.status-schlecht h1 { color: var(--rot-text); }
.zwei-spalten-gross { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-5); align-items: start; }

/* Drei Kennzahl-Karten: Wesentlichkeit, TE (hervorgehoben), NAG */
.lese-folge { display: flex; flex-direction: column; gap: var(--space-5); }
.kennzahl-karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.kennzahl-karte { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-5); }
.kennzahl-name { font-size: var(--fs-s); font-weight: 600; color: var(--text-2); }
.kennzahl-wert { font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--tracking-title); line-height: 1.2; }
.kennzahl-fuss { font-size: var(--fs-s); color: var(--text-2); }
.kennzahl-karte-te { background: var(--accent); color: var(--auf-accent); box-shadow: var(--shadow-2); }
.kennzahl-karte-te .kennzahl-name, .kennzahl-karte-te .kennzahl-fuss,
.kennzahl-karte-te .leise { color: var(--auf-accent); }
.kennzahl-karte-te .kennzahl-wert { font-size: clamp(32px, 3.4vw, var(--fs-xxl)); font-weight: 700; }

/* Herleitung: Bilanz → GuV → Wesentlichkeit, verbunden durch eine Linie */
.lese-schritte { position: relative; list-style: none; margin: 0; padding: 0; display: grid;
                 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-5); }
.lese-schritte::before { content: ""; position: absolute; left: 16px; right: calc(50% - 40px); top: 15px; height: 2px;
                         background: var(--line-stark); transform-origin: left center; }
.lese-schritt { position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.lese-punkt { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
              background: var(--accent); color: var(--auf-accent); font-size: var(--fs-s); font-weight: 700;
              box-shadow: 0 0 0 4px var(--surface); }
.lese-inhalt { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.lese-titel { margin: 0; font-size: var(--fs-m); font-weight: 600; }
.lese-werte { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.lese-wert { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: var(--r-m); background: var(--bg); }
.lese-wert dt { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--fs-s); color: var(--text-2); }
.lese-wert dd { margin: 0; font-size: var(--fs-l); font-weight: 600; }
.lese-wert.gewaehlt { background: var(--accent-fill); }
.rechenweg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rechenweg li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4);
                padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.rechenweg li:last-child { border-bottom: none; }
.rechenweg li > span:first-child { color: var(--text-2); }

/* Lese-Animation: nur beim ersten Öffnen (oberflaeche.js setzt .einlesen) und nur ohne „Bewegung reduzieren“ */
@keyframes linie-quer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes linie-hoch { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes karte-auf { 0% { opacity: 0; transform: translateY(8px) scale(0.96); } 70% { opacity: 1; transform: scale(1.02); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .einlesen .lese-schritte::before { animation: linie-quer 900ms var(--ease-out) both; }
  .einlesen .lese-schritt { animation: einblenden var(--t-slow) var(--ease-out) both; }
  .einlesen .lese-schritt:nth-child(2) { animation-delay: 300ms; }
  .einlesen .lese-schritt:nth-child(3) { animation-delay: 600ms; }
  .einlesen .lese-wert.gewaehlt .badge { animation: aufspringen var(--t-slow) var(--ease-out) both; animation-delay: 750ms; }
  .einlesen .kennzahl-karte { animation: karte-auf var(--t-slow) var(--ease-out) both; animation-delay: 850ms; }
  .einlesen .kennzahl-karte:nth-child(3) { animation-delay: 950ms; }
  .einlesen .kennzahl-karte-te { animation-delay: 1050ms; }
}

/* Schritt 1: Risikoeinschätzung als Auswahlkarten */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); }
.kachel { position: relative; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-4) var(--space-4) 52px;
          min-height: 72px; border-radius: var(--r-l); background: var(--bg); cursor: pointer;
          transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.kachel input { position: absolute; left: var(--space-4); top: 19px; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.kachel-titel { font-size: var(--fs-m); font-weight: 600; }
.kachel-text { font-size: var(--fs-s); color: var(--text-2); }
.kachel:hover { background: var(--fill); }
.kachel:has(input:checked) { background: var(--accent-fill); box-shadow: inset 0 0 0 2px var(--accent); }
.kachel:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent), var(--focus-ring); }

/* Schritt 2: Wesentlichkeit festlegen */
.wes-tabelle td { vertical-align: top; }
.wes-tabelle .wahl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 10px; min-height: 28px; cursor: pointer; }
.wes-tabelle .wahl input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.wes-tabelle tr:has(input:checked) td { background: var(--accent-fill); }
.wes-tabelle tr.ausgegraut { color: var(--text-2); }
.wes-tabelle tr.ausgegraut .wahl { cursor: not-allowed; }
.hilfe-zeile { display: block; font-size: var(--fs-s); color: var(--text-2); margin-top: var(--space-1); }
.vorschlag-grund { margin: 0; }
.aufklapper-klein summary { cursor: pointer; min-height: var(--hoehe); display: flex; align-items: center; font-weight: 600; color: var(--accent); }
.aufklapper-klein[open] summary { margin-bottom: var(--space-2); }

/* =================================================================== Etappe 3b: Anmeldung */
/* Anmeldeseiten (Login, Passwort zurücksetzen, Einladung): Akzentlinie ganz oben nur mit Kundendesign,
   Logo groß auf weißer Fläche, die Karte schwebt ruhig auf dem grauen Grund */
.akzentlinie-anmeldung { height: var(--akzentlinie-anmeldung); background: var(--akzent); flex: none; }
.anmelde-huelle { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
                  gap: var(--space-5); padding: var(--space-6) var(--space-4); }
.anmelde-marke { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.anmelde-logo { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-decoration: none; color: var(--text-2); }
.anmelde-logo:hover { color: var(--text-2); }
.anmelde-logo-flaeche { display: block; padding: 14px 22px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.anmelde-logo img { display: block; height: 72px; width: auto; max-width: min(320px, 80vw); object-fit: contain; }
.anmelde-karte { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-2);
                 padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-5);
                 animation: einblenden var(--t-slow) var(--ease-out) both; }
.anmelde-karte h1 { font-size: var(--fs-xl); }
.anmelde-karte .knopf { width: 100%; }
.anmelde-fuss { margin: calc(var(--space-2) * -1) 0 0; font-size: var(--fs-s); text-align: center; }
.fusszeile { margin: 0; font-size: var(--fs-s); color: var(--text-2); }
.fusszeile a.link-klickflaeche { display: inline-flex; align-items: center; min-height: 44px; }   /* Klickfläche (25.11.2026) */

/* =================================================================== Logo a³vero (_logo.html) */
/* Wortmarke „a“ + hochgestellte „3“ + Haken als „v“ + „ero“ (Entwurf a³vero, Johannes 23.11.2026). Der Haken (0,54 ×
   0,55 der Schriftgröße, also x-Höhe) steht mit seiner Unterkante auf der Grundlinie: bei align-items: baseline gilt für
   das SVG die Unterkante als Grundlinie. Die „3“ sitzt oben im Zeilenkasten (align-self: flex-start). */
.logo { display: inline-flex; align-items: baseline; font-family: var(--font); font-weight: 600; letter-spacing: -0.04em;
        line-height: 1; color: var(--logo-navy); white-space: nowrap; position: relative; }
.logo-klein { font-size: var(--logo-klein); }
.logo-mittel { font-size: var(--logo-mittel); }
.logo-gross { font-size: var(--logo-gross); }
.logo-drei { align-self: flex-start; margin: 0 var(--logo-drei-rechts) 0 var(--logo-drei-links); font-size: 0.46em;
             line-height: 1; letter-spacing: 0; color: var(--logo-drei); }
/* Im kleinen Logo (22 px: Kopfzeile, „mit …“) wäre die „3“ nur 10 px hoch – dort größer (Johannes 23.11.2026) */
.logo-klein .logo-drei { font-size: 0.55em; }
.logo-haken { width: 0.536em; height: 0.554em; margin: 0 var(--logo-haken-rechts) 0 var(--logo-haken-links); flex: none;
              overflow: visible; }
/* Lange Kanzlei-Namen: auf schmalen Bildschirmen kleiner (20–28 px), damit lange Wörter wie
   „Wirtschaftsprüfungsgesellschaft“ ganz passen; Umbruch im Wort nur als Notlösung */
.anmelde-kanzlei { margin: 0; font-size: clamp(var(--fs-l), 6vw, var(--fs-xl)); font-weight: 600;
                   letter-spacing: var(--tracking-title); line-height: 1.2; color: var(--text); text-align: center;
                   max-width: min(100%, var(--spalte-haupt)); overflow-wrap: break-word; hyphens: manual; }
.logo-mit { display: inline-flex; align-items: baseline; gap: 0.35em; font-size: var(--fs-s); color: var(--text-2); }
.logo-haken path { fill: none; stroke: var(--logo-haken); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.logo-auf-navy { color: var(--logo-auf-navy); }
.logo-auf-navy .logo-drei { color: var(--logo-drei-auf-navy); }
.logo-auf-navy .logo-haken path { stroke: var(--logo-haken-auf-navy); }
.logo-slogan { margin: 0; font-size: var(--fs-m); color: var(--text-2); }

/* „audit / assessment / automatic“ – nur im Intro; ohne Intro (JS aus, „Bewegung reduzieren“, schon gesehen) unsichtbar.
   Die Wörter (erstes Kind von .logo, absolut) stehen links bündig am großen „a“; die mittlere Zeile hat dieselbe Grundlinie. Jedes kleine „a“ wächst von
   seiner linken Unterkante aus (Faktor 1/0,36) und landet so genau auf dem großen „a“. */
.logo-woerter { display: none; }
.logo-wort { position: absolute; left: 0; bottom: 0; display: flex; font-size: var(--intro-wort); line-height: 1;
             letter-spacing: 0; font-weight: 500; }
.logo-wort-1 { bottom: var(--intro-zeile); }
.logo-wort-3 { bottom: calc(-1 * var(--intro-zeile)); }
.logo-wort-a { display: inline-block; transform-origin: left bottom; font-weight: 600; }
.logo-wort-1 .logo-wort-a { color: var(--logo-navy); }
.logo-wort-2 .logo-wort-a { color: var(--logo-hell); }
.logo-wort-3 .logo-wort-a { color: var(--logo-haken); }
.logo-wort-rest { display: inline-block; color: var(--text-2); }

/* Intro (Anmeldeseite, einmal je Browser-Sitzung): kopf.js setzt html.intro-gesehen, wenn es schon lief.
   Ohne JavaScript, bei „Bewegung reduzieren“ und beim zweiten Besuch gilt der Endzustand oben – nichts wartet.
   Eine gemeinsame Dauer (2,9 s) mit Prozent-Schritten hält die Reihenfolge streng:
   Wörter (0–0,2 s) → Wortenden blenden aus (0,5–0,8 s) → die drei „a“ wandern zu einem (0,75–1,45 s) → „3“ springt hoch
   (1,4–1,6 s) → Haken wird gezeichnet (1,6–1,9 s), erst größer, dann klein als „v“ (2,0–2,2 s) → „ero“ gleitet herein
   (2,15–2,4 s) → Slogan (2,4–2,7 s). Alle Teile starten unsichtbar (fill-mode both); das Formular ist sofort bedienbar. */
@keyframes intro-woerter { 0% { opacity: 0; } 7%, 100% { opacity: 1; } }
@keyframes intro-rest { 0%, 17% { opacity: 1; transform: none; } 27%, 100% { opacity: 0; transform: translateX(0.4em); } }
@keyframes intro-a-oben { 0%, 26% { opacity: 1; transform: none; } 46% { opacity: 1; transform: translateY(var(--intro-zeile)) scale(var(--intro-a-gross)); } 50%, 100% { opacity: 0; transform: translateY(var(--intro-zeile)) scale(var(--intro-a-gross)); } }
@keyframes intro-a-mitte { 0%, 26% { opacity: 1; transform: none; } 46% { opacity: 1; transform: scale(var(--intro-a-gross)); } 50%, 100% { opacity: 0; transform: scale(var(--intro-a-gross)); } }
@keyframes intro-a-unten { 0%, 26% { opacity: 1; transform: none; } 46% { opacity: 1; transform: translateY(calc(-1 * var(--intro-zeile))) scale(var(--intro-a-gross)); } 50%, 100% { opacity: 0; transform: translateY(calc(-1 * var(--intro-zeile))) scale(var(--intro-a-gross)); } }
@keyframes intro-a { 0%, 44% { opacity: 0; } 49%, 100% { opacity: 1; } }
@keyframes intro-drei { 0%, 48% { opacity: 0; transform: translateY(0.6em) scale(0.3); } 56%, 100% { opacity: 1; transform: none; } }
@keyframes intro-zeichnen { 0%, 56% { stroke-dashoffset: 100; } 66%, 100% { stroke-dashoffset: 0; } }
@keyframes intro-schrumpfen { 0%, 55% { opacity: 0; transform: scale(var(--intro-haken-gross)); } 56%, 69% { opacity: 1; transform: scale(var(--intro-haken-gross)); } 76%, 100% { opacity: 1; transform: scale(1); } }
@keyframes intro-ero { 0%, 74% { opacity: 0; transform: translateX(calc(-1 * var(--intro-weg))); } 83%, 100% { opacity: 1; transform: none; } }
@keyframes intro-slogan { 0%, 83% { opacity: 0; transform: translateY(var(--intro-slogan-weg)); } 93%, 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.intro-gesehen) .logo-intro .logo-woerter { display: block; animation: intro-woerter var(--intro-dauer) var(--ease) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-wort-rest { animation: intro-rest var(--intro-dauer) var(--ease) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-wort-1 .logo-wort-a { animation: intro-a-oben var(--intro-dauer) var(--ease-inout) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-wort-2 .logo-wort-a { animation: intro-a-mitte var(--intro-dauer) var(--ease-inout) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-wort-3 .logo-wort-a { animation: intro-a-unten var(--intro-dauer) var(--ease-inout) both; }
  .js:not(.intro-gesehen) .logo-intro > .logo-a { animation: intro-a var(--intro-dauer) var(--ease) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-drei { animation: intro-drei var(--intro-dauer) var(--ease-federnd) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-haken { transform-origin: 50% 60%;
    animation: intro-schrumpfen var(--intro-dauer) var(--ease-out) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-haken path { stroke-dasharray: 100;
    animation: intro-zeichnen var(--intro-dauer) var(--ease) both; }
  .js:not(.intro-gesehen) .logo-intro .logo-ero { animation: intro-ero var(--intro-dauer) var(--ease-out) both; }
  .js:not(.intro-gesehen) .logo-slogan.logo-intro { animation: intro-slogan var(--intro-dauer) var(--ease-out) both; }
}

/* =================================================================== Etappe 3b: Team und Verwaltung */
.schmal { max-width: 480px; }
h3.zwischentitel { margin: var(--space-2) 0 0; font-size: var(--fs-m); font-weight: 600; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.aktionen form { margin: 0; }
.mandat-loeschen { display: flex; justify-content: flex-end; }
.formular-zeile { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin: 0; }
.formular-zeile .feld { flex: 1 1 160px; }
.formular-zeile .feld-breit { flex: 2 1 240px; }
.grau-feld { padding: var(--space-4); background: var(--bg); border-radius: var(--r-m); }
.grau-feld input, .grau-feld select { background: var(--surface); }
.person { display: flex; flex-direction: column; gap: 2px; }
.person-name { font-weight: 500; display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.tabelle td .person-name { font-weight: 600; }
.protokoll-zeile { justify-content: flex-start; gap: var(--space-1) var(--space-4); }
.zeitstempel { min-width: 150px; }
/* Status „Einblick für den Gesamt-Admin“: Symbol in runder Fläche statt nackter Linie */
.status-karte { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-5); }
.status-karte > svg { flex: none; box-sizing: content-box; padding: 10px; border-radius: 50%; background: var(--fill); color: var(--text-2); }
.status-text { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 360px; min-width: 0; }
.status-text span { font-size: var(--fs-m); line-height: var(--lh-text); }
.karten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.team-karte { display: flex; flex-direction: column; gap: var(--space-3); }
.team-karte .badge { align-self: flex-start; }
.team-karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.team-name { font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.01em; }
.team-karte-fuss { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
/* Gefährliche Zone (Team löschen): Überschrift rot, Knopf nur mit roter Schrift – gefüllt rot erst in der Abfrage */
.gefahr-zone h2 { color: var(--rot-text); }
/* Einmal-Link (Einladung, Passwort zurücksetzen) */
.link-box { color: var(--text); }
.link-inhalt { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; min-width: 0; }
.link-zeile { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* Einziger Einsatz von IBM Plex Mono: im Link lassen sich l/1/I und O/0 besser unterscheiden */
.link-feld { font-family: "IBM Plex Mono", ui-monospace, monospace; flex: 1 1 320px; min-width: 0; font-size: var(--fs-s); padding: 8px 12px;
             min-height: var(--hoehe); border: none; border-radius: var(--r-m); background: var(--surface); color: var(--text);
             box-shadow: inset 0 0 0 1px var(--line-stark); }
.link-feld:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line-stark), var(--focus-ring); }
/* Freigabe erteilen (Team-Seite) */
.freigabe-formular summary { list-style: none; }
.freigabe-formular summary::-webkit-details-marker { display: none; }
.freigabe-formular[open] summary .knopf { background: var(--accent-hover); }
.auswahl-liste { flex-direction: column; gap: 0; }
.auswahl-liste label { min-height: var(--hoehe); }

/* =================================================================== Etappe 3b: Mandatsübersicht, Planung, übrige Seiten */
.inhalt.inhalt-breit { max-width: 1360px; }
.tabelle.uebersicht { min-width: 760px; }                      /* erst auf sehr schmalen Geräten scrollen */
.tabelle.uebersicht th, .tabelle.uebersicht td { padding-left: 10px; padding-right: 10px; }
.tabelle.uebersicht th:first-child, .tabelle.uebersicht td:first-child { padding-left: 18px; }
.tabelle.uebersicht th:last-child, .tabelle.uebersicht td:last-child { padding-right: 18px; }
.mandant-zelle { white-space: nowrap; font-weight: 600; }
.mandant-name { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.team-zelle { min-width: 90px; }
.person-zelle { max-width: 130px; }
.zeit-zelle, .oeffnen-zelle { white-space: nowrap; }
.tabellen-rahmen.innen { border-radius: var(--r-m); }
.download-liste .listen-zeile:last-child { border-bottom: none; }
/* Prüfungsplanung Schritt 1: Gesamt-PDF oder getrennt – nur die passenden Felder zeigen (ohne :has beide sichtbar) */
.pdf-modus { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.pdf-modus legend { font-size: var(--fs-s); font-weight: 600; padding: 0; margin-bottom: var(--space-2); }
.pdf-modus:has(input[value="gesamt"]:checked) .nur-getrennt,
.pdf-modus:has(input[value="getrennt"]:checked) .nur-gesamt { display: none; }
/* Vorjahresvergleich (Wesentlichkeit festlegen) */
.vorjahr-inhalt { display: flex; flex-direction: column; gap: var(--space-1); }
.vorjahr-inhalt p { margin: 0; }
.vorjahr .klein-titel { margin: 0; color: inherit; }
/* Vorschau des PDF-Texts (Plex Mono, damit Platzhalter und Ziffern gut lesbar sind) */
.vorschau-text { margin: 0; max-height: 480px; overflow: auto; padding: var(--space-3) var(--space-4); background: var(--bg); border-radius: var(--r-m);
                 font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--fs-s); line-height: 1.45; white-space: pre; }
/* Datenschutz */
.datenschutz { max-width: 820px; }
.datenschutz p, .datenschutz ul { margin: 0; }
.datenschutz ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.anschrift { font-style: normal; }
.platzhalter { background: var(--gelb-bg); color: var(--gelb-text); padding: 0 var(--space-1); border-radius: var(--r-xs); }
.sprung-link { margin: 0; font-size: var(--fs-m); }
.zurueck-link { margin: 0 0 -12px; font-weight: 600; }
.zurueck-link a { display: inline-flex; align-items: center; min-height: 44px; }
#ds-unterlagen { scroll-margin-top: 80px; }
/* Sicherheitsabfrage (Löschen, Entfernen) */
.bestaetigung { max-width: 680px; }
.bestaetigung h1 { font-size: var(--fs-xl); }
/* Automatische Abmeldung: Warnung 2 Minuten vorher (static/sitzung.js) – schwebt unten wie ein Toast */
.sitzung-warnung { position: fixed; z-index: 10; left: 50%; bottom: var(--space-5); transform: translateX(-50%); width: min(560px, calc(100% - 32px));
                   flex-wrap: wrap; align-items: center; box-shadow: var(--shadow-2); }
.sitzung-warnung[hidden] { display: none; }
.sitzung-warnung-text { flex: 1 1 260px; font-weight: 600; }
.sitzung-warnung-rest { font-size: var(--fs-s); }
.sitzung-warnung .knopf[hidden] { display: none; }

/* =================================================================== Schmale Bildschirme */
@media (max-width: 640px) {
  .testmodus { padding: var(--space-2) var(--space-4); }
  .testkanzlei { padding: var(--space-1) var(--space-4); }
  .kopf { padding: var(--space-2) var(--space-4); }
  .kopf-rechts { width: 100%; justify-content: space-between; }
  .nav-pille { padding: 0 var(--space-3); }
  .inhalt { padding: var(--space-5) var(--space-4) var(--space-6); }
  h1 { font-size: 24px; }
  .seitenfuss { flex-direction: column; align-items: flex-start; padding: var(--space-4); }
  /* Alle drei Reiter sichtbar: gleich breit, „bald“ unter dem Namen */
  .reiter { display: flex; align-self: stretch; border-radius: var(--r-m); }
  .reiter-link { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 0;
                 min-height: 48px; padding: var(--space-1); border-radius: calc(var(--r-m) - 3px); text-align: center; }
  .reiter-bald { padding: 0 6px; line-height: 1.3; }
  .dialog-knoepfe .knopf { flex: 1 1 0; }
  .werkzeug-knoepfe { width: 100%; }
  .werkzeug-knoepfe .knopf { flex: 1 1 0; min-width: 0; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Prüfliste: jede Zeile als Block – Nr. und Anforderung oben, darunter Vorschlag, Entscheidung, Anmerkung */
  .tabelle.pruefliste { min-width: 0; }
  .pruefliste thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pruefliste tbody tr { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3);
                         padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
  .pruefliste tbody tr:hover { background: transparent; }
  .pruefliste td { display: block; height: auto; padding: 0; border: none; }
  .pruefliste td:nth-child(2) { font-weight: 600; }
  .pruefliste td:nth-child(n+3) { grid-column: 1 / -1; }
  .anmerkung-feld { min-width: 0; }
  /* Rechnerische Prüfung: Aussage normal gesetzt, Soll/Ist/Differenz linksbündig mit Beschriftung */
  .rechenliste td:nth-child(2) { min-width: 0; font-weight: 400; }
  .rechenliste td.zahl { text-align: left; white-space: normal; }
  .rechenliste td[data-label]::before { content: attr(data-label) " "; color: var(--text-2); font-weight: 400; }
  /* Planung: Kennzahl-Karten untereinander, Herleitung als senkrechte Folge */
  .kennzahl-karten { grid-template-columns: minmax(0, 1fr); }
  .lese-schritte { grid-template-columns: minmax(0, 1fr); padding-left: 48px; }
  .lese-schritte::before { left: 15px; right: auto; top: 16px; bottom: 16px; width: 2px; height: auto; transform-origin: center top; }
  .lese-punkt { position: absolute; left: -48px; top: 0; }
  .lese-titel { min-height: 32px; display: flex; align-items: center; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 640px) {
  .einlesen .lese-schritte::before { animation-name: linie-hoch; }
}

/* =================================================================== Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
                           transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
  .kreisel { animation: none; }
}
.ohne-einblenden .inhalt > * { animation: none; }
.ohne-einblenden .kennzahlen > .kennzahl { animation: none; }

/* =================================================================== Rücklink und Mandatsübersicht */
/* Rücklink oben auf der Seite („← Alle Mandate“): ruhig, ohne Unterstreichung, große Klickfläche */
.inhalt > p:first-of-type > a:only-child { display: inline-flex; align-items: center; min-height: var(--hoehe);
                                         font-weight: 500; text-decoration: none; }
.inhalt > p:first-of-type { margin: 0 0 calc(var(--space-3) * -1); }
.mandant-name { color: var(--text); text-decoration: none; }
.mandant-name:hover { color: var(--accent); }

/* =================================================================== Belegprüfung */
.knopfzeile-links { justify-content: flex-start; }
.beleg-tabelle { min-width: 720px; }
.beleg-tabelle th[scope="row"] { color: var(--text); font-size: var(--fs-tabelle); font-weight: 600; padding: var(--space-3) var(--space-4);
                                 border-bottom: 1px solid var(--line); }
.beleg-tabelle .zeile-gesamt th, .beleg-tabelle .zeile-gesamt td { background: var(--bg); font-weight: 600; }
.beleg-tabelle .zeile-offen > :first-child { box-shadow: inset 3px 0 0 var(--gelb); }
.beleg-tabelle select.auswahl-klein { font: inherit; font-size: var(--fs-s); min-height: 36px; padding: 0 var(--space-2); border: none;
                                      border-radius: var(--r-s); background: var(--fill); color: var(--text); }
.beleg-tabelle select.auswahl-klein:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.bereich-quelle { display: block; margin-top: 2px; }
.gruende { display: flex; flex-direction: column; gap: 2px; }
.gruende .badge-kompakt { margin-top: 0; }
.beleg-schritte { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.beleg-schritt { display: flex; align-items: flex-start; gap: var(--space-3); line-height: var(--lh); }
.beleg-schritt .lese-punkt { flex: 0 0 auto; }
.beleg-schritt > span:last-child { padding-top: 4px; }
.streichen > summary { list-style: none; }
.streichen > summary::-webkit-details-marker { display: none; }
.streichen-formular { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-2); }
.streichen-formular input { font: inherit; font-size: var(--fs-s); min-height: 40px; min-width: 200px; padding: 0 var(--space-3); border: none;
                            border-radius: var(--r-s); background: var(--fill); color: var(--text); }
.streichen-formular input:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.ergaenzen { margin-top: var(--space-5); }
.beleg-bereiche > summary { cursor: pointer; }

/* Prüfschwelle je Bereich (Schritt 2; static/beleg_schwelle.js rechnet live mit) */
.schwellen { margin-top: var(--space-6); }
.schwellen-titel { margin: 0 0 var(--space-1); font-size: var(--fs-m); font-weight: 600; }
.schwellen .hinweis { margin: var(--space-3) 0; }
.schwellen-tabelle { min-width: 760px; }
.beleg-tabelle .eingabe-klein { font: inherit; font-size: var(--fs-s); min-height: 36px; padding: 0 var(--space-3); border: none;
                                border-radius: var(--r-s); background: var(--fill); color: var(--text); }
.beleg-tabelle .eingabe-klein:hover { background: var(--fill-hover); }
.beleg-tabelle .eingabe-klein:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.beleg-tabelle .eingabe-klein[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--rot); }
.eingabe-prozent { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.eingabe-begruendung { width: 100%; min-width: 240px; }
::placeholder { color: var(--platzhalter); opacity: 1; }      /* opacity: Firefox dimmt sonst ab */
.eingabe-begruendung:required::placeholder { color: var(--gelb-text); }
.schwellen-sperre { margin-right: var(--space-3); }
@keyframes wert-neu { from { opacity: 0.35; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .wert-neu { animation: wert-neu var(--t) var(--ease-out); }
  .eingabe-begruendung.neu-einblenden { animation: einblenden var(--t) var(--ease-out) both; }
}

/* Lese-Folge der Belegprüfung: Kennzahlen zuerst, dann die Rechenschritte nacheinander (oberflaeche.js, .einlesen) */
@media (prefers-reduced-motion: no-preference) {
  .einlesen .beleg-karten .kennzahl-karte { animation-delay: 0ms; }
  .einlesen .beleg-karten .kennzahl-karte:nth-child(2) { animation-delay: 80ms; }
  .einlesen .beleg-karten .kennzahl-karte-te { animation-delay: 160ms; }
  .einlesen .beleg-schritt { animation: einblenden var(--t-slow) var(--ease-out) both; animation-delay: 200ms; }
  .einlesen .beleg-schritt:nth-child(2) { animation-delay: 290ms; }
  .einlesen .beleg-schritt:nth-child(3) { animation-delay: 380ms; }
  .einlesen .beleg-schritt:nth-child(4) { animation-delay: 470ms; }
  .einlesen .beleg-schritt:nth-child(5) { animation-delay: 560ms; }
  .einlesen .beleg-schritt:nth-child(6) { animation-delay: 650ms; }
  .einlesen .beleg-schritt:nth-child(7) { animation-delay: 740ms; }
  .einlesen .beleg-schritt:nth-child(8) { animation-delay: 830ms; }
  .einlesen .beleg-schritt:nth-child(9) { animation-delay: 920ms; }
  .einlesen .beleg-schritt:nth-child(10) { animation-delay: 1010ms; }
  .streichen[open] .streichen-formular { animation: einblenden var(--t) var(--ease-out) both; }
}
@media (max-width: 640px) {
  .beleg-karten { grid-template-columns: minmax(0, 1fr); }
  .streichen-formular input { min-width: 0; flex: 1 1 140px; }
}
/* Belegprüfung: Tabellen kompakt, damit alle Spalten ohne Querscrollen in die Karte passen */
.bereichs-tabelle th, .bereichs-tabelle td { padding: var(--space-2) var(--space-3); }
.bereichs-tabelle td.zahl { font-size: var(--fs-s); }
.bereichs-tabelle .zeile-gesamt th, .bereichs-tabelle .zeile-gesamt td { border-bottom: none; }
.auswahl-tabelle th, .auswahl-tabelle td { padding: var(--space-3) var(--space-2); }
.auswahl-tabelle td[data-label="Text"] { min-width: 200px; }
.auswahl-tabelle td:last-child { width: 1%; white-space: nowrap; }
.streichen > summary { display: inline-flex; white-space: nowrap; color: var(--rot-text); }
.streichen > summary::before, .streichen > summary::after { content: none; }
.listen-zeile .badge-kompakt { display: inline-flex; margin: 0 var(--space-2) 0 0; }
@media (max-width: 640px) {
  .beleg-schritt .lese-punkt { position: static; left: auto; }
}
/* Downloads per fetch (laden.js): Fehlerfeld nur zeigen, wenn es etwas zu sagen gibt */
.download-fehler[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .download-fehler:not([hidden]) { animation: einblenden var(--t) var(--ease-out) both; }
}

/* =================================================================== Belegprüfung Etappe 2: Abgleich */
.status-karte-innen { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--r-m); background: var(--bg); }
.abgleich-filter { margin: var(--space-4) 0 var(--space-3); }
.abgleich-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.abgleich-zeile { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) 0 var(--space-4) var(--space-4);
                  border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--line); scroll-margin-top: 96px; }
.abgleich-zeile:last-child { border-bottom: none; }
.abgleich-rot { box-shadow: inset 3px 0 0 var(--rot); }
.abgleich-gelb { box-shadow: inset 3px 0 0 var(--gelb); }
.abgleich-gruen { box-shadow: inset 3px 0 0 var(--gruen); }
.abgleich-geklaert { box-shadow: inset 3px 0 0 var(--blau); }
.abgleich-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.abgleich-kopf .zahl { margin-left: auto; font-weight: 600; }
.abgleich-kopf .leise { flex-basis: 100%; }
.abgleich-zeile p { margin: 0; }
.pruef-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-s); }
.pruef-liste li { display: flex; align-items: baseline; gap: var(--space-2); }
.pruef-punkt { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); transform: translateY(-1px); }
.pruef-gelb .pruef-punkt { background: var(--gelb); }
.pruef-rot .pruef-punkt { background: var(--rot); }
/* TP Stufe 2 (22.11.2026): je Buchung eine Pille je Belegart – Punkt in Ampelfarbe, Wort „fehlt“ bzw. Beleg */
.tp-nachweise { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-s); }
.tp-nachweis { display: inline-flex; align-items: baseline; gap: var(--space-1); max-width: 100%; padding: var(--space-1) var(--space-3);
               border-radius: var(--r-pill); background: var(--fill); overflow-wrap: anywhere; }
.tp-nachweis::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); transform: translateY(-1px); }
.tp-nachweis-gelb::before { background: var(--gelb); }
.tp-nachweis-rot::before { background: var(--rot); }
.tp-nachforderung { margin-top: var(--space-5); }
.abgleich-aktionen { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2) var(--space-4); }
.abgleich-aktionen form { margin: 0; }
.inline-formular { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.inline-formular input[type="text"] { font: inherit; font-size: var(--fs-s); min-height: 36px; min-width: 240px; flex: 1 1 240px; padding: 0 var(--space-3);
                                     border: none; border-radius: var(--r-s); background: var(--fill); color: var(--text); }
.inline-formular input[type="text"]:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.inline-formular select.auswahl-klein { font: inherit; font-size: var(--fs-s); min-height: 36px; max-width: 100%; padding: 0 var(--space-2); border: none;
                                        border-radius: var(--r-s); background: var(--fill); color: var(--text); }
/* Nach „Geklärt“/„Zuordnung“ springt die Seite zur Zeile (#z…): die Ampel bestätigt sich mit einem kurzen Puls */
@media (prefers-reduced-motion: no-preference) {
  .abgleich-zeile:target .ampel { animation: aufspringen var(--t-slow) var(--ease-out) both; }
  .abgleich-zeile:target { animation: einblenden var(--t-slow) var(--ease-out) both; }
}
@media (max-width: 640px) {
  .abgleich-zeile { padding-left: var(--space-3); }
  .abgleich-kopf .zahl { margin-left: 0; }
  .inline-formular input[type="text"] { min-width: 0; }
}
.pruef-passend > summary { min-height: 32px; font-size: var(--fs-s); font-weight: 500; color: var(--text-2); }

/* Belegprüfung: Live-Liste während des Lesens – jede Zeile erscheint mit ihrer Ampel, sobald ihr Beleg fertig ist */
.live-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1);
              max-height: 420px; overflow-y: auto; }
.live-zeile { display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: var(--space-2) var(--space-3);
              border-radius: var(--r-s); background: var(--surface); font-size: var(--fs-s); }
.live-zeile .ampel { flex: 0 0 auto; min-width: 64px; justify-content: center; }
.live-zeile .live-text { display: block; min-height: 0; flex: 1 1 auto; min-width: 0; overflow: hidden;
                         text-overflow: ellipsis; white-space: nowrap; }   /* statt Spalten wie .plan-schritt-text */
.live-zeile .zahl { flex: 0 0 auto; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .live-zeile { animation: einblenden var(--t-slow) var(--ease-out) both; }
  .live-zeile.plan-schritt-neu .ampel { animation: aufspringen var(--t-slow) var(--ease-out) both; }
}
@media (max-width: 640px) {
  .live-zeile .live-text { white-space: normal; }
  .live-zeile { flex-wrap: wrap; }
}

/* =================================================================== Vorgaben Belegprüfung (Verwaltung, static/beleg_vorgaben.js) */
.vorgaben { display: flex; flex-direction: column; gap: var(--space-5); }
.vorgaben .karte { display: flex; flex-direction: column; gap: var(--space-3); }
.karten-titel { font-size: var(--fs-m); }
.vorgaben-tabelle th, .vorgaben-tabelle td { padding: var(--space-2) var(--space-3); }
.vorgaben-tabelle tbody tr:last-child > * { border-bottom: none; }
.eingabe-einheit { display: inline-flex; align-items: center; gap: var(--space-2); }
.einheit { font-size: var(--fs-s); color: var(--text-2); min-width: 1ch; }
.vorgabe-eingabe { font: inherit; font-size: var(--fs-m); min-height: 40px; width: 96px; padding: 0 var(--space-3); border: none;
                   border-radius: var(--r-m); background: var(--fill); color: var(--text); text-align: right;
                   font-variant-numeric: tabular-nums; transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.vorgabe-eingabe:hover { background: var(--fill-hover); }
.vorgabe-eingabe:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.vorgabe-eingabe.geaendert { background: var(--accent-fill); color: var(--accent); font-weight: 600; }
.vorgabe-eingabe[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--rot); }
.vorgaben-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }
.vorgaben-felder .feld .vorgabe-eingabe { min-height: 40px; }
.vorgaben-speichern .feld textarea { width: 100%; }
/* Kanzlei-Logo (Kanzlei-Angaben): Vorschau auf weißer Fläche wie bei der Einladung */
.logo-karte { display: flex; flex-direction: column; gap: var(--space-4); }
.logo-vorschau { align-self: flex-start; padding: 14px 22px; background: var(--surface); border-radius: var(--r-m);
                 box-shadow: var(--shadow-1); animation: einblenden var(--t-slow) var(--ease-out) both; }
.logo-vorschau img { display: block; height: 72px; width: auto; max-width: min(320px, 70vw); object-fit: contain; }
.logo-leer { margin: 0; color: var(--text-2); }
.verlauf-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.verlauf-eintrag { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); padding: var(--space-4) var(--space-5);
                   display: flex; flex-direction: column; gap: var(--space-1); }
.verlauf-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.verlauf-aenderungen { margin: 0; padding-left: var(--space-5); font-size: var(--fs-s); }
.verlauf-eintrag p { margin: 0; }
@keyframes geaendert-auf { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .vorgaben > .einblenden { animation: einblenden var(--t-slow) var(--ease-out) both; }
  .vorgaben > .einblenden:nth-child(3) { animation-delay: 60ms; }
  .vorgaben > .einblenden:nth-child(4) { animation-delay: 120ms; }
  .vorgabe-eingabe.gerade-geaendert { animation: geaendert-auf var(--t) var(--ease-out); }
  .vorgaben-speichern .knopf:not(:disabled) { transition: transform var(--t-fast) var(--ease), opacity var(--t) var(--ease); }
}
@media (max-width: 640px) {
  /* Handy: je Kontoart eine Zeile mit drei Feldern nebeneinander (niedrig · mittel · hoch), ohne Querscrollen */
  .vorgaben-tabelle thead { display: none; }
  .vorgaben-tabelle, .vorgaben-tabelle tbody { display: block; }
  .vorgaben-tabelle tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2);
                         padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .vorgaben-tabelle tbody tr:last-child { border-bottom: none; }
  .vorgaben-tabelle th[scope="row"] { grid-column: 1 / -1; padding: 0; border: none; }
  .vorgaben-tabelle td { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); height: auto; padding: 0; border: none; text-align: left; }
  .vorgaben-tabelle tbody tr:hover { background: none; }
  .vorgaben-tabelle td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--text-2); font-weight: 400; }
  .vorgaben-tabelle .vorgabe-eingabe { width: 64px; }
}

/* Belegprüfung Regelstand 4: Kontenbeurteilung, Konten → Posten, Auswahl-Code (static/beleg_konten.js) */
.kb-posten { list-style: none; margin: var(--space-3) 0; padding: 0; }
.kb-posten .badge { margin-top: 0; }
/* Lange Posten-Namen brechen um, statt die Seite am Handy zu verbreitern (Punkt bleibt oben) */
.kb-posten .badge { max-width: 100%; white-space: normal; align-items: flex-start; overflow-wrap: anywhere; }
.kb-posten .badge::before { margin-top: calc((1lh - 7px) / 2); }   /* Punkt (7px, s. .badge::before) mittig zur 1. Zeile */
.kb-hochladen { margin: var(--space-4) 0 var(--space-6); }
.konten-tabelle { min-width: 820px; }
.konten-tabelle .posten-wahl { max-width: 280px; }
.konten-tabelle .bereich-quelle .badge-kompakt { display: inline-flex; margin: 0 var(--space-2) 0 0; }
.code-zeile { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-4);
              margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5); border-radius: var(--r-m); background: var(--bg); }
.code-anzeige { display: flex; flex-direction: column; gap: var(--space-1); max-width: 560px; }
.code-wert { font-size: var(--fs-l); font-weight: 600; font-variant-numeric: tabular-nums;
             font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; color: var(--text); }
.code-eingeben > summary { list-style: none; }
.code-eingeben > summary::-webkit-details-marker { display: none; }
.code-eingeben input { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .code-eingeben[open] .streichen-formular { animation: einblenden var(--t) var(--ease-out) both; }
  .konten-tabelle [data-sig-badge] { transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
}
.posten-tabelle th[scope="row"] { min-width: 180px; max-width: 280px; white-space: normal; line-height: 1.35; }
.auswahl-tabelle .posten-zelle { min-width: 120px; max-width: 180px; line-height: 1.35; }

/* =================================================================== Startseite und Mandats-Cockpit (Entwurf 18.11.2026) */
/* Kennzahlen-Kacheln: Anzahlen stehen sofort da (kein Hochzählen) */
.kennzahl-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.kennzahl-kachel { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-5); }
.kennzahl-kachel .kennzahl-wert { font-size: var(--fs-kennzahl); }
.mandate-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.mandate-filter .filterleiste { margin: 0; flex-wrap: nowrap; flex: 0 1 460px; }
.mandate-filter .suchfeld { min-width: 0; max-width: none; }
.mandats-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--karte-min), 1fr)); gap: var(--space-5); }
.mandats-karte { display: flex; flex-direction: column; gap: var(--space-4); color: var(--text); text-decoration: none; min-width: 0; }
.mandats-karte:hover { color: var(--text); }
.mandats-karte:focus-visible { outline: none; box-shadow: var(--focus-ring), var(--shadow-2); }
.mandats-karte-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.mandats-karte-titel { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
/* Der Name ist der wichtigste Text der Karte: umbrechen statt abschneiden */
.mandats-karte .mandant-name { font-size: var(--fs-karte-titel); font-weight: 600; letter-spacing: -0.01em;
                               white-space: normal; overflow-wrap: anywhere; }
.mandats-fortschritt { display: flex; flex-direction: column; gap: var(--space-2); }
.mandats-fortschritt-text { display: flex; justify-content: space-between; font-size: var(--fs-s); color: var(--text-2); }
.mandats-karte-fuss { display: flex; gap: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.mandats-zahl { display: flex; flex-direction: column; gap: var(--space-1); }
.mandats-zahl > .zahl { font-size: var(--fs-zahl-karte); font-weight: 600; }
.mandats-letzter { margin-left: auto; text-align: right; }
.karte.leer { color: var(--text-2); }

.cockpit-kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); flex-wrap: wrap;
                padding: var(--space-5) var(--space-6); }
.cockpit-titel { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.cockpit-titel h1 { margin: 0; font-size: var(--fs-kennzahl); overflow-wrap: anywhere; }
.cockpit-merkmale { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0;
                    color: var(--text-2); font-size: var(--fs-s); }
.cockpit-kopf-rechts { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.cockpit-gj { display: flex; flex-direction: column; gap: var(--space-3); }
.cockpit-gj .leise { margin: 0; }
.team-stapel { display: flex; list-style: none; margin: 0; padding: 0; }
.avatar { display: flex; align-items: center; justify-content: center; width: var(--avatar); height: var(--avatar); border-radius: 50%;
          border: 2px solid var(--surface); color: var(--auf-accent); font-size: var(--fs-xs); font-weight: 600; background: var(--accent); }
.avatar + .avatar { margin-left: calc(var(--space-2) * -1); }
.avatar-1 { background: var(--blau-text); }
.avatar-2, .avatar-mehr { background: var(--grau-text); }
.cockpit-abschnitt { display: flex; flex-direction: column; gap: var(--space-3); }
.cockpit-abschnitt h2, .opl-karte h2, .aktivitaeten h2 { font-size: var(--fs-l); margin: 0; }
.werkzeug-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--kachel-min), 1fr)); gap: var(--space-4); }
.werkzeug-kachel { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); }
.werkzeug-kachel-kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.werkzeug-kachel h3 { margin: 0; font-size: var(--fs-karte-titel); min-width: 0; overflow-wrap: break-word; }
/* Lange Titel („Saldenbestätigungen“): das Badge rutscht unter den Titel, statt ihn abzuschneiden */
.werkzeug-kachel-kopf { flex-wrap: wrap; }
.werkzeug-kachel-kopf > .badge { flex-shrink: 0; }
.werkzeug-kachel-info { margin: 0; color: var(--text-2); font-size: var(--fs-s); }
.werkzeug-kachel-hinweis { margin: 0; }
.werkzeug-kachel-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin: 0; font-size: var(--fs-s); }
.werkzeug-kachel-fuss { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: auto;
                        font-size: var(--fs-s); }
.kachel-offen { font-weight: 600; color: var(--gelb-text); }
.alle-laeufe .klein-titel { margin-top: var(--space-4); }
/* Textlinks in Zeilen: Klickfläche mindestens 40 px hoch */
.werkzeug-kachel-links a, .opl-links a, .opl-quelle a, .rechtsform-link, .zurueck-link, .knopfzeile > a:not(.knopf) {
  display: inline-flex; align-items: center; min-height: var(--hoehe); }
/* Kacheln blenden gestaffelt ein – nur transform/opacity */
.werkzeug-kachel, .mandats-karte, .kennzahl-kachel { animation: einblenden var(--t-slow) var(--ease-out) both; }
.werkzeug-kachel:nth-child(2), .mandats-karte:nth-child(2), .kennzahl-kachel:nth-child(2) { animation-delay: 40ms; }
.werkzeug-kachel:nth-child(3), .mandats-karte:nth-child(3), .kennzahl-kachel:nth-child(3) { animation-delay: 80ms; }
.werkzeug-kachel:nth-child(n+4), .mandats-karte:nth-child(n+4), .kennzahl-kachel:nth-child(n+4) { animation-delay: 120ms; }

.cockpit-unten { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-start; }
.opl-karte { flex: 999 1 var(--spalte-haupt); min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.aktivitaeten { flex: 1 1 var(--spalte-neben); min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.opl-summe { margin: 0; }
.opl-tabelle { min-width: var(--opl-tabelle-min); }
.opl-tabelle td { vertical-align: middle; }
.opl-punkt { display: flex; flex-direction: column; gap: var(--space-1); min-width: var(--opl-punkt-min); }
.opl-text { color: var(--text); text-decoration: none; }
.opl-text:hover { color: var(--accent); text-decoration: underline; }
.opl-status { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); white-space: nowrap; }
.opl-status form { margin: 0; }
.opl-wie { display: block; white-space: normal; }
.opl-erledigt .opl-text { color: var(--text-2); }
.haken { display: inline-flex; align-items: center; justify-content: center; width: var(--hoehe); height: var(--hoehe); border: none;
         border-radius: 50%; background: var(--gruen-bg); color: var(--gruen-text); cursor: pointer;
         transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.haken:hover { background: color-mix(in srgb, var(--gruen) 22%, var(--surface)); }
.haken:active { transform: scale(0.92); }
.haken:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.opl-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); margin: 0; font-size: var(--fs-s); }
.opl-leer { margin: 0; }
.text-gelb-stark { color: var(--gelb-text); font-weight: 600; }
.aktivitaeten-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.aktivitaeten-liste li { display: flex; gap: var(--space-3); }
.aktivitaeten-liste li > div { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.aktivitaet-punkt { flex: none; width: var(--punkt); height: var(--punkt); margin-top: var(--space-2); border-radius: 50%;
                    background: var(--accent); }
.opl-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); }
.opl-filter .feld { min-width: var(--feld-min); }
.opl-haken-feld { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); cursor: pointer; }
.opl-haken-feld input { width: var(--fs-l); height: var(--fs-l); accent-color: var(--accent); }
.chip-wahl { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--hoehe); padding: 0 var(--space-4);
             border-radius: var(--r-pill); background: var(--fill); cursor: pointer; }
.chip-wahl:has(input:checked) { background: var(--text); color: var(--surface); font-weight: 600; }
.chip-wahl input { accent-color: var(--accent); }
.opl-angaben { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; }
.opl-angaben dt { color: var(--text-2); }
.opl-angaben dd { margin: 0; }

@media (max-width: 900px) {
  .kennzahl-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cockpit-kopf { padding: var(--space-5); }
  .cockpit-titel h1 { font-size: var(--fs-xl); }
  .cockpit-kopf-rechts { width: 100%; }
  .mandats-karten { grid-template-columns: minmax(0, 1fr); }
  .mandate-filter .filterleiste { width: 100%; flex-basis: auto; }
  .kennzahl-kachel .kennzahl-wert { font-size: var(--fs-xl); }
  .mandats-karte-fuss { gap: var(--space-4); }
  /* OPL-Tabelle auf dem Handy als Karten, ohne Querscrollen */
  .opl-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .opl-tabelle, .opl-tabelle tbody { display: block; width: 100%; min-width: 0; }
  .opl-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-1) var(--space-3);
                    padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .opl-tabelle td { display: block; height: auto; border: none; padding: 0; text-align: left; min-width: 0; }
  .opl-tabelle td[data-label="Ampel"] { grid-column: 1; grid-row: 1; }
  .opl-tabelle td[data-label="Status"] { grid-column: 2; grid-row: 1; }
  .opl-tabelle td:not([data-label="Ampel"]):not([data-label="Status"]) { grid-column: 1 / -1; }
  .opl-tabelle td.zahl { text-align: left; }
  .opl-tabelle td[data-label="Zuständig"]::before, .opl-tabelle td[data-label="Frist"]::before { content: attr(data-label) ": "; color: var(--text-2); }
  .opl-reiter .reiter-link { flex: 1 1 auto; padding: var(--space-1) var(--space-2); }
  .gj-reiter { flex-wrap: wrap; }
  .gj-reiter .reiter-link { flex: 1 1 auto; padding: var(--space-1) var(--space-3); }
  .cockpit-unten .knopfgruppe { width: 100%; }
  .opl-punkt { min-width: 0; }
  .opl-filter .feld { min-width: 0; flex: 1 1 var(--feld-min); }
}

/* =================================================================== Transaktionsprüfung: Account designation */
.ad-tabelle { min-width: 900px; }
.ad-tabelle .eingabe-begruendung { min-width: 180px; }
.ad-tabelle td[data-label="Posten"] { max-width: 260px; }
.ad-tabelle td[data-label="Einstufung"] { width: 300px; }
.ad-tabelle td[data-label="Einstufung"] .eingabe-begruendung { margin-top: var(--space-2); }
.ad-herleitung { white-space: nowrap; }
[data-ad-abweichung][hidden] { display: none; }        /* .badge setzt display – hidden muss gewinnen */
.ad-tabelle td { vertical-align: top; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.ad-unter { display: block; margin-top: 2px; }
.ad-abgleich { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; margin-top: var(--space-2); max-width: 46ch; }
.ad-flagge { color: var(--gelb-text); }
.ad-tabelle textarea, .ad-details textarea { font: inherit; font-size: var(--fs-s); width: 100%; min-height: 40px; padding: var(--space-2) var(--space-3);
                                            border: none; border-radius: var(--r-s); background: var(--fill); color: var(--text); resize: vertical; }
.ad-tabelle textarea:hover { background: var(--fill-hover); }
.ad-tabelle textarea:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.ad-details { margin-top: var(--space-2); }
.ad-details summary { font-size: var(--fs-s); }
.ad-feldgruppe { border: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: var(--space-2);
                 transition: opacity var(--t) var(--ease); }
.ad-feldgruppe .chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ad-teil-leise { opacity: 0.45; }
.ad-kriterium { display: flex; gap: var(--space-2); align-items: flex-start; min-height: var(--hoehe); font-size: var(--fs-s); }
.ad-kriterium input { margin-top: 4px; accent-color: var(--accent); }
.ad-zuordnung select.auswahl-klein { max-width: 340px; }
.ad-tabelle select.auswahl-klein, .ad-zuordnung select.auswahl-klein { min-height: 40px; }   /* Klickfläche ≥ 40 px */
.ad-tabelle tr:target > td { background: var(--gelb-bg); transition: background-color var(--t-slow) var(--ease); }
@media (max-width: 640px) {
  /* Einstufung auf dem Handy als Karten, ohne Querscrollen */
  .ad-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ad-tabelle, .ad-tabelle tbody { display: block; width: 100%; min-width: 0; }
  .ad-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2) var(--space-3);
                   padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
  .ad-tabelle td { display: block; height: auto; border: none; padding: 0; text-align: left; min-width: 0; }
  .ad-tabelle td[data-label="Posten"], .ad-tabelle td[data-label="Einstufung"], .ad-tabelle td[data-label="Vorschlag"] { grid-column: 1 / -1; }
  .ad-tabelle td[data-label="Einstufung"] { width: auto; }
  .ad-tabelle tr { padding-left: var(--space-3); }
  .ad-tabelle td.zahl::before, .ad-tabelle td[data-label="Einstufung"]::before { content: attr(data-label); display: block; color: var(--text-2);
                                                                                font-size: var(--fs-xs); font-weight: 600; }
  .ad-tabelle td.zahl { text-align: left; }
  .ad-zuordnung { min-width: 0; }
  .ad-zuordnung thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ad-zuordnung, .ad-zuordnung tbody, .ad-zuordnung tr, .ad-zuordnung td { display: block; width: 100%; height: auto; }
  .ad-zuordnung tr { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .ad-zuordnung td { border: none; padding: 2px 0; text-align: left; }
  .ad-zuordnung select.auswahl-klein { max-width: 100%; width: 100%; }
}

/* =================================================================== Transaktionsprüfung je Posten (TP) */
/* Methode: nur die Felder und Erklärungen der gewählten Methode zeigen (ohne :has-Unterstützung: alle sichtbar) */
.tp-methode:has(input[value="test25"]:checked) [data-nur]:not([data-nur="test25"]),
.tp-methode:has(input[value="schwelle"]:checked) [data-nur]:not([data-nur="schwelle"]),
.tp-methode:has(input[value="erweitert"]:checked) [data-nur]:not([data-nur="erweitert"]) { display: none; }
.tp-methode [data-nur] { animation: einblenden var(--t) var(--ease-out) both; }
/* Regelstand 2 (21.11.2026): Felder je Methode bzw. Ziehungsart; alte Methoden-Texte nur bei einer alten Methode */
.tp-methode:has(input[name="methode"][value="standard"]:checked) [data-nur],
.tp-methode:has(input[name="methode"][value="risiko"]:checked) [data-nur],
.tp-methode:has(input[name="methode"]:not([value="standard"]):checked) [data-nur-methode="standard"],
.tp-methode:has(input[name="methode"]:not([value="risiko"]):checked) [data-nur-methode="risiko"],
.tp-methode:has(input[name="methode"]:checked:not([value="standard"]):not([value="risiko"])) [data-nur-neu],
.tp-methode:has(input[name="methode"]:checked:not([value="standard"]):not([value="risiko"])) [data-nur-ziehung],
.tp-methode:has(input[name="ziehung"]:not([value="schwelle_te"]):checked) [data-nur-ziehung="schwelle_te"] { display: none; }
.tp-methode :is([data-nur-methode], [data-nur-ziehung], [data-nur-neu]) { animation: einblenden var(--t) var(--ease-out) both; }
.tp-methoden-text { list-style: none; margin: var(--space-3) 0; padding: 0; max-width: 70ch; }
.tp-herleitung { display: block; margin-top: var(--space-1); max-width: 60ch; }
.tp-abgleich td, .tp-stichprobe td { vertical-align: top; }
.tp-stichprobe { min-width: 900px; }
.tp-stichprobe td[data-label="Buchungstext"] { max-width: 280px; }
.tp-unterlagen td { vertical-align: top; }
.tp-unterlagen td[data-label="Buchung"] { white-space: nowrap; }
.tp-unterlagen-feld { font: inherit; font-size: var(--fs-s); width: 100%; min-width: 260px; min-height: 40px; resize: vertical;
  padding: var(--space-2) var(--space-3); border: none; border-radius: var(--r-s); background: var(--fill); color: var(--text);
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.tp-unterlagen-feld:hover { background: var(--fill-hover); }
.tp-unterlagen-feld:focus { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
.tp-unterlagen-feld.tp-geaendert { box-shadow: inset 3px 0 0 var(--gelb); }
/* Erweiterte Prüfung Personal (WP 25.11.2026): Häkchen und Bemerkung mit Klickfläche ≥ 40 px */
.tp-erw td { vertical-align: middle; }
.tp-erw-haken { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px;
  cursor: pointer; border-radius: var(--r-s); transition: background-color var(--t-fast) var(--ease); }
.tp-erw-haken:hover { background: var(--fill-hover); }
.tp-erw-haken input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.tp-erw-haken input:focus-visible { outline: none; }
.tp-erw-haken:has(input:focus-visible) { box-shadow: var(--focus-ring); background: var(--fill-hover); }   /* Tastatur */
.tp-erw-feld { font: inherit; font-size: var(--fs-s); line-height: var(--lh); width: 100%; min-width: 260px;
  min-height: 40px; padding: var(--space-2) var(--space-3); border: none; border-radius: var(--r-s);
  background: var(--fill); color: var(--text); resize: vertical;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.tp-erw-feld:hover { background: var(--fill-hover); }
.tp-erw-feld:focus { outline: none; background: var(--surface); }
.tp-erw-feld:focus-visible { box-shadow: var(--focus-ring); }
.tp-gs .badge { margin-left: var(--space-2); }
@media (max-width: 640px) {             /* Handy: je Mitarbeiter eine Karte statt Querscrollen */
  .tabelle.tp-erw { min-width: 0; width: 100%; display: block; }
  .tp-erw tbody { display: block; }
  .tp-erw thead { display: none; }
  .tp-erw tr { display: grid; grid-template-columns: 2.5em 1fr 1fr; gap: 0 var(--space-2);
    align-items: center; padding: var(--space-3) 0; }
  .tp-erw td, .tp-erw td.zahl { display: block; padding: 0; border: 0; text-align: left; }
  .tp-erw td[data-label="Nr."] { grid-column: 1; }
  .tp-erw td[data-label="Mitarbeiter"] { grid-column: 2 / -1; font-weight: 600; }
  .tp-erw td[data-label="Bruttojahresgehalt"] { grid-column: 2; }
  .tp-erw td[data-label="Grund"] { grid-column: 3; color: var(--text-2); }
  .tp-erw td[data-label="Erhalten"] { grid-column: 2; display: flex; align-items: center; }
  .tp-erw td[data-label="Geprüft"] { grid-column: 3; display: flex; align-items: center; }
  .tp-erw td[data-label="Erhalten"]::after, .tp-erw td[data-label="Geprüft"]::after {
    content: attr(data-label); font-size: var(--fs-s); color: var(--text-2); }
  .tp-erw td[data-label="Bemerkung"] { grid-column: 1 / -1; margin-top: var(--space-1); }
  .tp-erw td[data-label=""] { grid-column: 1 / -1; margin-top: var(--space-2); }
  .tp-erw-feld { min-width: 0; }
  /* Gutschriften-Liste: Nummer und Betrag oben, Rechnung darunter, Häkchen nebeneinander */
  .tp-gs td[data-label="Gutschrift"] { grid-column: 1 / 3; }
  .tp-gs td[data-label="Betrag"] { grid-column: 3; text-align: right; }
  .tp-gs td[data-label="zu Rechnung"] { grid-column: 1 / -1; color: var(--text-2); }
  .tp-gs td[data-label="zu Rechnung"]::before { content: "zu Rechnung "; }
  .tp-gs td[data-label="Beleg anfordern"] { grid-column: 1 / 3; display: flex; align-items: center; }
  .tp-gs td[data-label="Erhalten"] { grid-column: 3; }
  .tp-gs td[data-label="Beleg anfordern"]::after { content: "Beleg anfordern"; font-size: var(--fs-s); color: var(--text-2); }
}
@media (max-width: 640px) {
  .tabelle.tp-unterlagen { min-width: 0; width: 100%; display: block; }
  .tp-unterlagen tbody { display: block; }
  .tp-unterlagen thead { display: none; }
  .tp-unterlagen tr { display: grid; grid-template-columns: 2.5em 1fr; gap: var(--space-1) var(--space-2); padding: var(--space-3) 0; }
  .tp-unterlagen td { display: block; padding: 0; border: 0; }
  .tp-unterlagen td[data-label="Buchung"] { white-space: normal; }
  .tp-unterlagen td[data-label="Benötigte Unterlagen"] { grid-column: 1 / -1; }
  .tp-unterlagen-feld { min-width: 0; min-height: 96px; }
}
.werkzeug-kachel-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: var(--fs-s); }
.werkzeug-kachel-liste li + li { border-top: 1px solid var(--line); }
.werkzeug-kachel-liste a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2);
                           min-height: var(--hoehe); color: var(--text); text-decoration: none; }
.werkzeug-kachel-liste a:hover .fett { color: var(--accent); }
.tp-liste { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.tp-liste li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3);
               min-height: 52px; padding: var(--space-2) 0; }
.tp-liste li + li { border-top: 1px solid var(--line); }
.tp-liste form { margin: 0; }

/* =================================================================== KI-Kontingent (23.11.2026) */
/* Banner oben auf jeder Seite: rot bei 100 % / Pause (alle), gelb ab 80 % (Kanzlei-Admins) */
.ki-banner { font-size: var(--fs-s); }
.ki-banner-fehler { background: var(--rot-bg); color: var(--rot-text); }
.ki-banner-warn { background: var(--gelb-bg); color: var(--gelb-text); }
.ki-banner-innen { max-width: var(--inhalt-breit); margin: 0 auto; padding: var(--space-3) var(--space-6);
                   display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.ki-banner-innen p { margin: 0; font-weight: 500; }
.ki-banner a { color: inherit; font-weight: 600; }
.ki-banner-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.ki-banner-aktionen a:not(.knopf-support) { display: inline-flex; align-items: center; min-height: 44px; }
/* Knopf „Support kontaktieren“ (23.11.2026, webapp/support.py) – Nebenknopf in Fehlerkästen, Banner und auf der KI-Seite */
.hinweis-mit-knopf { flex-wrap: wrap; align-items: center; justify-content: space-between; }
.hinweis-mit-knopf > span { flex: 1 1 24ch; }
.knopf-support { flex: none; min-height: 44px; background: var(--surface); color: var(--accent); font-weight: 600; text-decoration: none; }
.knopf-support:hover { background: var(--surface); color: var(--accent-hover); box-shadow: var(--shadow-pille); }
/* auf einer weißen Karte (Seite KI-Kontingent) als normaler Nebenknopf */
.knopf-support-gross, .knopf-support-gross:hover { background: var(--accent-fill); }
.knopf-support-gross:hover { background: var(--accent-fill-hover); box-shadow: none; }
/* Kurzmeldung mit Support-Knopf (Mandatsgrenze der Abo-Stufe, 24.11.2026): bleibt stehen, Knopf als Nebenknopf */
.toast .knopf-support { margin-left: var(--space-2); background: var(--accent-fill); }
.toast .knopf-support:hover { background: var(--accent-fill-hover); box-shadow: none; }
.ki-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.ki-kopf h2, .ki-kopf p { margin: 0; }
.ki-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4); }
.ki-zahl { font-variant-numeric: tabular-nums; font-weight: 600; }
.ki-balken { height: var(--balken-dick); }
.ki-balken-warn > span { background: var(--gelb); }
.ki-balken-voll > span { background: var(--rot); }
.ki-fakten { margin: 0; display: grid; grid-template-columns: minmax(var(--ki-fakt-min), var(--ki-fakt-max)) 1fr; gap: var(--space-2) var(--space-4); }
.ki-fakten dt { color: var(--text-2); }
.ki-fakten dd { margin: 0; }
.ki-zweispaltig { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--kachel-min), 1fr)); gap: var(--space-5); }
.ki-zweispaltig h2 { margin-top: 0; }
.ki-liste { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }
.ki-anteile { display: flex; flex-direction: column; gap: var(--space-3); }
.ki-anteil { display: grid; grid-template-columns: minmax(var(--ki-name-min), var(--ki-name-max)) 1fr var(--zahl-spalte); gap: var(--space-3); align-items: center; }
.ki-anteil .ki-zahl { text-align: right; }
.ki-verlauf { list-style: none; margin: 0; padding: 0; }
.ki-verlauf li { display: flex; justify-content: space-between; min-height: var(--zeile-min); align-items: center; }
.ki-verlauf li + li { border-top: 1px solid var(--line); }
.ki-tabelle-huelle { position: relative; overflow-x: auto; max-width: 100%; }   /* relative: sr-only bleibt drin */
.inhalt > .ki-breit { min-width: 0; max-width: 100%; }
.ki-tabelle { min-width: var(--ki-tabelle-min); }
.ki-preise { min-width: var(--ki-preise-min); }
.ki-preise input { width: 100%; min-width: var(--ki-eingabe-min); height: var(--hoehe); padding: 0 var(--space-3); border: none;
                   border-radius: var(--r-m); background: var(--fill); color: var(--text); font: inherit;
                   font-variant-numeric: tabular-nums; text-align: right; }
.ki-preise input[name="neu_modell"] { text-align: left; }
.ki-preise input:hover { background: var(--fill-hover); }
.ki-preise input:focus-visible { outline: none; background: var(--surface); box-shadow: var(--focus-ring); }
/* Link mit voller Klickfläche (44 px) in Tabellen, z. B. „Bearbeiten“ */
.ki-link { display: inline-flex; align-items: center; min-height: var(--zeile-min); }
.ki-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-s); }
/* Mehrere Zahlenfelder einer Zeile am Handy untereinander, Knopf darunter. („ohne Betrag“ ist am Handy seit 24.11.2026
   in der Kartenansicht der Tabelle sichtbar, Zeile „Kontingent“ – siehe „Oberfläche klein“ unten.) */
@media (max-width: 640px) {
  .formular-zeile.ki-untereinander { flex-direction: column; align-items: stretch; }
  .formular-zeile.ki-untereinander .feld { flex: 0 0 auto; }
  .formular-zeile.ki-untereinander > .knopf { align-self: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .inhalt > .einblenden:nth-of-type(2) { animation-delay: 40ms; }
  .inhalt > .einblenden:nth-of-type(3) { animation-delay: 80ms; }
  .inhalt > .einblenden:nth-of-type(4) { animation-delay: 120ms; }
}
@media (max-width: 600px) {
  .ki-banner-innen { padding: var(--space-3) var(--space-4); }
  .ki-fakten { grid-template-columns: 1fr; gap: 0 var(--space-4); }
  .ki-fakten dd { margin-bottom: var(--space-2); }
  .ki-anteil { grid-template-columns: 1fr var(--zahl-spalte); }
  .ki-anteil .fortschritt { grid-column: 1 / -1; grid-row: 2; }
}

/* =================================================================== Upload-Grenzen (static/upload_grenzen.js, 23.11.2026) */
.upload-grenze { margin: var(--space-2) 0 0; font-size: var(--fs-s); }
@media (prefers-reduced-motion: no-preference) {
  .upload-grenze { animation: einblenden var(--t) var(--ease-out) both; }
}

/* =================================================================== Oberfläche klein (24.11.2026)
   Klickflächen mindestens 40 × 40 px: „← Zurück“, kleine Links in Verwaltung und Cockpit, Reiter.
   Personen und KI-Verbrauch auf dem Handy als Karten – ohne Querscrollen (wie die OPL-Tabelle). */
.zurueck-link a, a.link-stark.klein, .opl-text { display: inline-flex; align-items: center; min-height: var(--hoehe); }
.reiter-link { min-height: var(--hoehe); }
@media (max-width: 640px) {
  .personen-tabelle thead, .ki-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .personen-tabelle, .personen-tabelle tbody, .ki-tabelle, .ki-tabelle tbody { display: block; width: 100%; min-width: 0; }
  .personen-tabelle tr, .ki-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
                                         gap: var(--space-2) var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
  .personen-tabelle tbody tr:last-child, .ki-tabelle tbody tr:last-child { border-bottom: none; }
  .personen-tabelle tbody tr:hover, .ki-tabelle tbody tr:hover { background: transparent; }
  .personen-tabelle td, .ki-tabelle td { display: block; height: auto; border: none; padding: 0; text-align: left; min-width: 0; }
  /* Personen: Name links, Status rechts; darunter Kanzlei/Rolle, Gesamt-Admin und die Aktionen über die ganze Breite */
  .personen-tabelle td[data-label="Person"] { grid-column: 1; grid-row: 1; }
  .personen-tabelle td[data-label="Status"] { grid-column: 2; grid-row: 1; }
  .personen-tabelle td[data-label="Kanzlei und Rolle"], .personen-tabelle td[data-label="Gesamt-Admin"],
  .personen-tabelle td[data-label="Aktionen"] { grid-column: 1 / -1; }
  .personen-tabelle td[data-label="Gesamt-Admin"]::before { content: attr(data-label) ": "; color: var(--text-2); font-size: var(--fs-s); }
  .personen-tabelle .aktionen { flex-wrap: wrap; gap: var(--space-2); }
  /* KI-Verbrauch: Kanzlei links, „Bearbeiten“ rechts; die Zahlen als Zeilen „Bezeichnung … Wert“ */
  .ki-tabelle td[data-label="Kanzlei"] { grid-column: 1; grid-row: 1; font-weight: 600; }
  .ki-tabelle td[data-label="Aktion"] { grid-column: 2; grid-row: 1; }
  .ki-tabelle td:not([data-label="Kanzlei"]):not([data-label="Aktion"]) { grid-column: 1 / -1; display: flex; justify-content: space-between;
                                                                          align-items: center; gap: var(--space-3); min-height: var(--space-6); }
  .ki-tabelle td:not([data-label="Kanzlei"]):not([data-label="Aktion"])::before { content: attr(data-label); color: var(--text-2);
                                                                                  font-weight: 400; font-size: var(--fs-s); }
  .ki-tabelle-huelle { overflow-x: visible; }
}

/* =================================================================== Postausgang (Mailversand 25.11.2026)
   Am Handy als Karten wie Personen/KI-Verbrauch: Betreff fett oben, darunter An, Zeit, Kanzlei, Zustand. */
@media (max-width: 640px) {
  .post-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .post-tabelle, .post-tabelle tbody { display: block; width: 100%; min-width: 0; }
  .post-tabelle tr { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-4);
                     border-bottom: 1px solid var(--line); }
  .post-tabelle tbody tr:last-child { border-bottom: none; }
  .post-tabelle tbody tr:hover { background: transparent; }
  .post-tabelle td { display: block; height: auto; border: none; padding: 0; text-align: left; min-width: 0;
                     overflow-wrap: anywhere; }
  .post-tabelle td[data-label="Betreff"] { order: -1; font-weight: 600; }
  .post-tabelle td.zahl[data-label="Zeit"] { text-align: left; }
  .post-tabelle td[data-label="Kanzlei"]::before, .post-tabelle td[data-label="Zustand"]::before,
  .post-tabelle td[data-label="An"]::before { content: attr(data-label) ": "; color: var(--text-2); font-size: var(--fs-s); }
}
