/*
 * Rezeptblock Admin, Look v2 „Leitstand".
 *
 * Eine ruhige Betriebskonsole: feste Seitenleiste in Tann, daneben die
 * Werkfläche aus Bändern und Zeilen. Keine Karten, kein Schatten außer an dem,
 * was wirklich über der Seite liegt (Dialog, Schicht, Meldung).
 *
 * Sechs Farbrollen, mehr nicht:
 *
 *   Tinte     trägt      Schrift, Linien, jeder gewöhnliche Knopf.
 *   Tann      rahmt      Seitenleiste und Datenbalken. Löst nie etwas aus.
 *   Limette   zeigt      wo man gerade ist (Navigation, gewähltes Fach, gewählte Zeile).
 *   Grün      bringt voran   der eine Knopf, der den Fall weiterbringt.
 *   Bernstein wartet     der Betreiber ist am Zug.
 *   Rot       sperrt     abgelehnt, gesperrt, endgültig.
 *
 * Der Normalzustand trägt keine Farbe: Was läuft, steht in Tinte da.
 * Farbe ist nie der einzige Träger. Jede Marke hat eine eigene Form, daneben
 * steht das Wort.
 *
 * Handgeschrieben, ohne Build. Die Marken unter :root lassen sich als
 * @theme-Werte nach app/globals.css übertragen (--color-*, --spacing-*,
 * --radius-*, --text-*).
 *
 * Inhalt
 *    1 Schrift            8 Liste und Zeile        15 Leerzustand
 *    2 Marken (Tokens)    9 Tabelle                16 Dialog
 *    3 Grund             10 Status                 17 Akte und Prüfweg
 *    4 Rahmen            11 Kennzahl               18 Anmeldung
 *    5 Seitenkopf        12 Balken und Verlauf     19 Brief und Druck
 *    6 Filterleiste      13 Knöpfe, Formular       20 Umbrüche
 *    7 Tafel             14 Hinweis und Meldung    21 Bewegung
 */

/* ------------------------------------------------------------------ */
/* 1 Schrift                                                           */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/schrift/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/schrift/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/schrift/atkinson-hyperlegible-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/schrift/atkinson-hyperlegible-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ */
/* 2 Marken (Tokens)                                                   */
/* ------------------------------------------------------------------ */
:root {
  /* Flächen und Tinte: ein Grau mit einem Hauch Tann. */
  --blatt: #ffffff; /* was gelesen wird: Liste, Tabelle, Feld, Dialog */
  --grund: #f3f5f4; /* Bänder, Werkbank der Akte */
  --grund-tief: #e9edeb; /* Zähler, gesperrter Knopf, Spur eines Balkens */
  --linie: #d6dcd9; /* Haarlinie, trennt nur */
  --linie-fest: #7a8783; /* Rand von Feld und Knopf, 3,7:1 auf Blatt */
  --tinte: #101a17; /* Text, 17,8:1 */
  --tinte-2: #3d4b47; /* zweite Zeile, 9,2:1 */
  --tinte-3: #56635f; /* Beschriftung, unterste Textstufe: 6,3:1 auf Blatt, 5,7:1 auf Grund */

  /* Rahmen: das Dunkelgrün der Marke. */
  --tann: #1c4b42;
  --tann-tief: #143830;
  --auf-tann: #ffffff;
  --auf-tann-2: #c5d6cf; /* 6,5:1 auf Tann */

  /* Zeiger: die Limette der Marke. Nur als Fläche, nie als Schrift auf Blatt. */
  --limette: #b4e717;
  --limette-hauch: #eff8cc;

  /* Voran: der eine Knopf, der den Fall weiterbringt. Weiß darauf 5,5:1. */
  --weiter: #047857;
  --weiter-tief: #065f46;
  --weiter-hauch: #e2f3eb;

  /* Signal */
  --bernstein: #8f4a00; /* Schrift, 6,7:1 */
  --bernstein-marke: #b86e00; /* Form, 4:1 */
  --bernstein-hauch: #fdf1d8;
  --rot: #a8321f; /* Schrift und Fläche, 6,7:1 */
  --rot-tief: #8a2617;
  --rot-hauch: #fbeae6;

  --fokus: var(--tinte);

  /* Schrift */
  --schrift: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --schrift-fest: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --s-1: 0.75rem; /* 12  Zähler, Plakette, Spaltenkopf */
  --s-2: 0.8125rem; /* 13  zweite Zeile, Beschriftung */
  --s-3: 0.9375rem; /* 15  Grundgröße */
  --s-4: 1rem; /* 16  Felder */
  --s-5: 1.25rem; /* 20  Seitentitel */
  --s-6: 1.5rem; /* 24  Name in der Akte */
  --s-7: 1.75rem; /* 28  Kennzahl */
  --zeile: 1.45;
  --zeile-eng: 1.25;

  /* Abstand */
  --a-1: 0.125rem; /*  2 */
  --a-2: 0.25rem; /*  4 */
  --a-3: 0.5rem; /*  8 */
  --a-4: 0.75rem; /* 12 */
  --a-5: 1rem; /* 16 */
  --a-6: 1.25rem; /* 20 */
  --a-7: 1.5rem; /* 24 */
  --a-8: 2rem; /* 32 */
  --a-9: 3rem; /* 48 */

  /* Radius: eng. Eine Konsole ist kein Kartenstapel. */
  --r-1: 3px; /* Plakette, Zähler */
  --r-2: 6px; /* Knopf, Feld */
  --r-3: 10px; /* Dialog */

  /* Maße */
  --griff: 2.75rem; /* 44 px: Knopf, Feld, Reiter, Navigation */
  --griff-klein: 2.25rem; /* 36 px an der Maus, nur für Nebengriffe in einer Zeile */
  --leiste: 14rem;
  --balken: 3.25rem; /* Kopfbalken am Handy */
  --kopf: 6.5rem; /* Höhe des haftenden Seitenkopfs; v2.js misst nach */
  --rand: var(--a-6); /* Seitenrand der Werkfläche */
  --spalte: 44rem; /* Lesebreite: ein Formular oder ein Wert allein auf der Werkfläche */

  --schatten-schicht: 0 0 0 1px rgb(16 26 23 / 0.08), 0 24px 64px -24px rgb(16 26 23 / 0.45);
  --dauer: 120ms;
  --dauer-lang: 200ms;
  --kurve: cubic-bezier(0.2, 0, 0, 1);
}
@media (pointer: coarse) {
  :root {
    --griff-klein: 2.75rem;
  }
}

/* ------------------------------------------------------------------ */
/* 3 Grund                                                             */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--linie-fest) transparent;
}
body {
  margin: 0;
  background: var(--blatt);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: var(--s-3);
  line-height: var(--zeile);
  caret-color: var(--tinte);
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: var(--limette);
  color: var(--tinte);
}
h1,
h2,
h3,
p,
dl,
dd,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
a {
  color: var(--tinte);
  text-decoration: underline;
  text-decoration-color: var(--linie-fest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
code,
kbd {
  font-family: var(--schrift-fest);
  font-size: 0.93em;
}
code {
  padding: 0.0625rem 0.3125rem;
  border-radius: var(--r-1);
  background: var(--grund-tief);
  overflow-wrap: anywhere;
}
/* Rohdaten: was ein Gerät oder eine Schnittstelle gemeldet hat, Zeile für Zeile. Bricht um, rollt nicht. */
.rohdaten {
  max-width: 34rem;
  margin: var(--a-3) 0 var(--a-2);
  padding: var(--a-4);
  border: 1px solid var(--linie);
  border-radius: var(--r-2);
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--schrift-fest);
  font-size: var(--s-2);
  line-height: var(--zeile);
  letter-spacing: -0.035em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Notiz: die Worte eines Nutzers, mit seinen Zeilenumbrüchen. */
.notiz {
  max-width: 44ch;
  white-space: pre-wrap;
}

.nur-vorlesen {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Kennungen, Nummern, Enum-Werte: Festbreite, damit sich 0 und O nicht verwechseln. */
.fest {
  font-family: var(--schrift-fest);
  font-size: 0.93em;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.zahl {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.leise {
  color: var(--tinte-3);
}
.umbruch {
  overflow-wrap: anywhere;
}
/* Fließtext außerhalb von Tafeln: höchstens 68 Zeichen breit. */
.text {
  max-width: 68ch;
  color: var(--tinte-2);
}
.text > * + * {
  margin-top: var(--a-4);
}

.sprung {
  position: absolute;
  left: var(--a-3);
  top: var(--a-3);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--griff);
  padding: 0 var(--a-5);
  border-radius: var(--r-2);
  background: var(--tinte);
  color: var(--blatt);
  transform: translateY(-200%);
}
.sprung:focus {
  transform: none;
}

/* ------------------------------------------------------------------ */
/* 4 Rahmen und Seitenleiste (setzt v2.js ein)                         */
/* ------------------------------------------------------------------ */
.rahmen {
  display: grid;
  grid-template-columns: var(--leiste) minmax(0, 1fr);
  min-height: 100dvh;
}
.leiste {
  --fokus: var(--limette);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--tann);
  color: var(--auf-tann);
}
.leiste-kopf {
  display: flex;
  align-items: center;
  gap: var(--a-4);
  padding: var(--a-5) var(--a-5) var(--a-4);
}
.leiste-zeichen {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--r-2);
  /* Das Zeichen ist Tann auf Tann: eine feine Kante hält es sichtbar. */
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22);
}
.leiste-marke {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: var(--zeile-eng);
}
.leiste-marke strong {
  font-size: var(--s-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.leiste-marke span {
  color: var(--auf-tann-2);
  font-size: var(--s-1);
}
.leiste-menue {
  display: none;
}
.leiste-inhalt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.leiste-nav {
  display: flex;
  flex-direction: column;
  gap: var(--a-1);
  padding: var(--a-3);
}
.leiste-nav a,
.leiste-abmelden {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--a-3);
  min-height: var(--griff);
  padding: 0 var(--a-4) 0 var(--a-7);
  border-radius: var(--r-2);
  color: var(--auf-tann-2);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dauer) var(--kurve), color var(--dauer) var(--kurve);
}
.leiste-nav a:hover,
.leiste-abmelden:hover {
  background: var(--tann-tief);
  color: var(--auf-tann);
}
.leiste-nav a[aria-current="page"] {
  background: var(--tann-tief);
  color: var(--auf-tann);
  font-weight: 700;
}
/* Der Zeiger: ein Limettenquadrat vor dem gewählten Eintrag. */
.leiste-nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0.5625rem;
  top: calc(50% - 0.1875rem);
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 1px;
  background: var(--limette);
}
.leiste-zahl {
  min-width: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--r-1);
  background: var(--limette);
  color: var(--tinte);
  font-family: var(--schrift-fest);
  font-size: var(--s-1);
  font-weight: 700;
  line-height: 1.375rem;
  text-align: center;
}
.leiste-fuss {
  margin-top: auto;
  padding: var(--a-3);
  border-top: 1px solid rgb(255 255 255 / 0.14);
}

.werk {
  min-width: 0;
  background: var(--blatt);
}

/* ------------------------------------------------------------------ */
/* 5 Seitenkopf: Titel, Nebenhandlungen, darunter die Filterleiste     */
/* ------------------------------------------------------------------ */
.seitenkopf {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blatt);
  border-bottom: 1px solid var(--linie);
}
.seitenkopf-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-2) var(--a-5);
  /* Ein Griff plus Polster: Der Titel steht auf jeder Seite gleich hoch, mit oder ohne Knopf daneben. */
  min-height: calc(var(--griff) + 2 * var(--a-3));
  padding: var(--a-3) var(--rand);
}
.seitenkopf-titel {
  display: flex;
  flex: 1 1 16rem;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--a-4);
  min-width: 0;
}
.seitenkopf h1 {
  font-size: var(--s-5);
  font-weight: 700;
  letter-spacing: -0.014em;
  line-height: var(--zeile-eng);
}
.seitenkopf-titel p {
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.seitenkopf-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-3);
}

/* ------------------------------------------------------------------ */
/* 6 Filterleiste: Fächer (Reiter mit Zähler), Suche, Filterformular   */
/* ------------------------------------------------------------------ */
.filterleiste {
  display: flex;
  align-items: center;
  gap: 0 var(--a-5);
  padding: 0 var(--rand);
}
.faecher {
  display: flex;
  flex: 0 1 auto;
  gap: var(--a-2);
  min-width: 0;
  margin-left: calc(-1 * var(--a-3));
  overflow-x: auto;
  scrollbar-width: none;
}
.faecher::-webkit-scrollbar {
  display: none;
}
.faecher a {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--a-3);
  min-height: 3rem;
  padding: 0 var(--a-3);
  color: var(--tinte-2);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.faecher a:hover {
  color: var(--tinte);
}
.faecher a:focus-visible {
  outline-offset: -3px;
}
/* Gewählt heißt Tintenstrich und Limettenzähler, nicht Fläche. */
.faecher a[aria-current="page"] {
  color: var(--tinte);
  font-weight: 700;
}
.faecher a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto var(--a-3) 0;
  height: 2px;
  background: var(--tinte);
}
.zaehler {
  min-width: 1.375rem;
  padding: 0 0.3125rem;
  border-radius: var(--r-1);
  background: var(--grund-tief);
  color: var(--tinte-2);
  font-family: var(--schrift-fest);
  font-size: var(--s-1);
  font-weight: 600;
  line-height: 1.25rem;
  text-align: center;
}
/* Eine Null bleibt lesbar, verliert aber die Plakette. */
.zaehler--null {
  background: none;
  color: var(--tinte-3);
}
.faecher a[aria-current="page"] .zaehler:not(.zaehler--null) {
  background: var(--limette);
  color: var(--tinte);
}

.suche {
  position: relative;
  flex: 1 1 12rem;
  min-width: 11rem;
  max-width: 22rem;
  margin-left: auto;
}
.suche .feld {
  padding-left: 2.25rem;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2356635f' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='m10.5 10.5 3.5 3.5'/%3E%3C/svg%3E");
  background-position: 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
}
/* Tastenhinweis: „/" springt ins Suchfeld. */
.suche kbd {
  position: absolute;
  right: 0.625rem;
  top: calc(50% - 0.6875rem);
  width: 1.375rem;
  height: 1.375rem;
  border: 1px solid var(--linie);
  border-radius: var(--r-1);
  color: var(--tinte-3);
  font-size: var(--s-1);
  line-height: 1.25rem;
  text-align: center;
  pointer-events: none;
}
.suche .feld:focus + kbd,
.suche .feld:not(:placeholder-shown) + kbd {
  display: none;
}

/* Filterformular: Felder nebeneinander, der Knopf schließt auf der Feldlinie ab. */
.filterformular {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--a-3) var(--a-4);
  padding-bottom: var(--a-4);
}
.filterformular .feld-gruppe {
  flex: 1 1 9rem;
  max-width: 18rem;
}
/* Breitenstufen: schmal für Jahr und Monat, datum für ein Datumsfeld, breit für eine Kennung. */
.filterformular .feld-gruppe--schmal {
  flex: 0 1 7rem;
}
.filterformular .feld-gruppe--datum {
  flex: 0 1 11rem;
}
.filterformular .feld-gruppe--breit {
  flex: 2 1 14rem;
  max-width: 26rem;
}

/* ------------------------------------------------------------------ */
/* 7 Tafel: ein Abschnitt aus Band und Inhalt                          */
/* ------------------------------------------------------------------ */
/* Band: links der Titel, rechts eine Handlung; der erklärende Satz steht immer in eigener Zeile darunter. */
.tafel-kopf {
  position: sticky;
  top: var(--kopf);
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--a-1) var(--a-5);
  padding: var(--a-3) var(--rand);
  border-bottom: 1px solid var(--linie);
  background: var(--grund);
}
.tafel + .tafel .tafel-kopf,
.tafel-kopf--oben {
  border-top: 1px solid var(--linie);
}
.tafel + .tafel .tafel-kopf {
  margin-top: -1px;
}
.tafel-kopf h2 {
  font-size: var(--s-3);
  font-weight: 700;
  line-height: var(--zeile-eng);
}
.tafel-zahl {
  margin-left: var(--a-2);
  color: var(--tinte-3);
  font-family: var(--schrift-fest);
  font-weight: 500;
}
.tafel-text {
  grid-column: 1 / -1;
  max-width: 80ch;
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.tafel-aktionen {
  grid-column: 2;
  grid-row: 1;
}
.tafel-inhalt {
  padding: var(--a-5) var(--rand) var(--a-7);
}
.tafel-inhalt > * + * {
  margin-top: var(--a-4);
}
/* Schmal: ein Formular oder ein einzelner Wert läuft nicht über die ganze Werkfläche. */
.tafel-inhalt--schmal {
  max-width: calc(var(--spalte) + 2 * var(--rand));
}
.seitenfuss {
  padding: var(--a-5) var(--rand) var(--a-8);
  color: var(--tinte-3);
  font-size: var(--s-2);
}

/* ------------------------------------------------------------------ */
/* 8 Liste: dichte Zeilen, die eine Akte öffnen                        */
/* ------------------------------------------------------------------ */
.zeilen,
.zeile,
.tafel-kopf--spalten {
  --spalten: 1.25rem minmax(0, 1fr) minmax(10rem, 12.5rem) 6.5rem;
}
/* Band mit Spaltenköpfen über einer Zeilenliste. */
.tafel-kopf--spalten {
  display: grid;
  grid-template-columns: var(--spalten);
  gap: var(--a-1) var(--a-4);
}
.tafel-kopf--spalten h2 {
  grid-column: 1 / 3;
}
.tafel-kopf--spalten .tafel-text {
  grid-column: 1 / -1;
}
.tafel-spalte {
  color: var(--tinte-3);
  font-size: var(--s-1);
}
.tafel-spalte:last-of-type {
  text-align: right;
}
/* Lagezeile: zählt, wer am Zug ist, und erklärt dabei die Zeilenmarken. */
.lage {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a-1) var(--a-5);
}
.lage span {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
}
.lage b {
  color: var(--tinte);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zeile {
  position: relative;
  display: grid;
  grid-template-columns: var(--spalten);
  align-items: start;
  gap: 0 var(--a-4);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--a-3) var(--rand);
  border: 0;
  border-bottom: 1px solid var(--linie);
  background: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dauer) var(--kurve);
}
.zeile:hover {
  background: var(--grund);
}
.zeile:focus-visible {
  outline-offset: -2px;
}
/* Gewählt: Limettenhauch als Fläche, Tintenlinien und Keil als Form. */
.zeile[aria-current="true"] {
  border-bottom-color: var(--tinte);
  background: var(--limette-hauch);
  box-shadow: inset 0 1px 0 var(--tinte);
}
.zeile[aria-current="true"] .zeile-titel {
  font-weight: 700;
}
.zeile > span,
.zeile-oben,
.zeile-unten {
  display: block;
  min-width: 0;
}
.zeile-marke {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: calc(var(--s-3) * var(--zeile));
}
.zeile-oben {
  display: flex;
  align-items: center;
  gap: var(--a-3);
}
.zeile-titel {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zeile-unten {
  overflow: hidden;
  color: var(--tinte-3);
  font-size: var(--s-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zeile-unten b {
  margin-right: var(--a-3);
  color: var(--tinte-2);
  font-weight: 400;
}
.zeile-datum {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.wort--rot {
  color: var(--rot);
  font-weight: 600;
}
/* Prüfpunkt: ein Schritt der Freischaltung in der Zeile, Marke und Wort. */
.pruefpunkt {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  color: var(--tinte-2);
  font-size: var(--s-2);
  line-height: calc(var(--s-3) * var(--zeile));
  white-space: nowrap;
}
.pruefpunkt + .pruefpunkt {
  line-height: calc(var(--s-2) * var(--zeile));
}
.pruefpunkt .marke {
  margin-inline: 0.0625rem;
}
.pruefpunkt--entscheidung {
  color: var(--bernstein);
  font-weight: 600;
}
.pruefpunkt--wartet {
  color: var(--tinte-3);
}

/* ------------------------------------------------------------------ */
/* 9 Tabelle                                                           */
/* ------------------------------------------------------------------ */
/* Der Rahmen rollt waagrecht, wenn die Tabelle nicht passt; tabindex="0" setzen. */
.tabelle-rahmen {
  container: tabelle / inline-size;
  overflow-x: auto;
}
.tabelle-rahmen:focus-visible {
  outline-offset: -2px;
}
.tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--blatt);
  font-variant-numeric: tabular-nums;
}
.tabelle th,
.tabelle td {
  padding: var(--a-3) var(--a-4);
  border-bottom: 1px solid var(--linie);
  text-align: left;
  vertical-align: top;
}
.tabelle th:first-child,
.tabelle td:first-child {
  padding-left: var(--rand);
}
.tabelle th:last-child,
.tabelle td:last-child {
  padding-right: var(--rand);
}
.tabelle thead th {
  color: var(--tinte-3);
  font-size: var(--s-1);
  font-weight: 500;
  line-height: var(--zeile-eng);
  vertical-align: bottom;
  white-space: nowrap;
}
/* Wird der Rahmen schmal, bricht zuerst der Spaltenkopf um; erst danach rollt die Tabelle. */
@container tabelle (max-width: 68rem) {
  .tabelle thead th,
  .tabelle thead th.zahl {
    white-space: normal;
  }
}
.tabelle tbody tr:hover {
  background: var(--grund);
}
.tabelle th.zahl,
.tabelle td.zahl {
  text-align: right;
}
.tabelle td small,
.zelle-unten {
  display: block;
  color: var(--tinte-3);
  font-size: var(--s-2);
  font-weight: 400;
}
/* Name und Kennung in einer Zelle: oben der Name, darunter <span class="zelle-unten fest umbruch">ID</span>. */
.zelle-oben {
  display: block;
  font-weight: 600;
}
@media (min-width: 760px) {
  /* In den großen Tabellen bricht der Name am breiten Schirm nicht, nur die Kennung darf.
     (.tabelle--stapel trägt jede Tabelle, die eine Tafel füllt.) */
  .tabelle--stapel .zelle-oben {
    white-space: nowrap;
  }
}
/* Zellhelfer. Sie gelten am td, die Spaltenbreiten auch am th. */
.tabelle td.zeitpunkt {
  white-space: nowrap; /* Datum und Uhrzeit bleiben beisammen */
}
.tabelle td.zahl--fuehrend {
  font-weight: 600; /* die Zahl, nach der die Tabelle geordnet ist */
}
.tabelle td.ohne {
  color: var(--tinte-3); /* der Strich für „kein Wert" */
}
.tabelle td.nebenbei {
  color: var(--tinte-3); /* die ganze Zelle ist Beiwerk */
  font-size: var(--s-2);
  font-weight: 400;
}
.tabelle .spalte-schmal {
  width: 9rem; /* Zahl oder Tag: nimmt nur, was sie braucht */
}
/* Gruppentrenner: die letzte Zeile eines Tages oder einer Gruppe schließt mit der festen Linie. */
.tabelle tr.gruppe-ende > * {
  border-bottom-color: var(--linie-fest);
}
/* Summenzeile: fasst die Zeilen darunter zusammen. */
.tabelle tr.summe > * {
  background: var(--grund);
  font-weight: 700;
}
.tabelle--dicht th,
.tabelle--dicht td {
  padding-block: 0.375rem;
}
/* Sortierbar (v2.js setzt den Knopf in den Spaltenkopf). Der Knopf misst das kleine
   Griffmaß und ragt dafür in das Polster der Kopfzelle. */
.tabelle th button {
  display: inline-flex;
  align-items: flex-end;
  gap: var(--a-2);
  min-height: var(--griff-klein);
  margin: calc(-1 * var(--a-3)) -0.375rem;
  /* Unten so viel Polster wie die Kopfzelle: Köpfe mit und ohne Knopf stehen auf einer Linie. */
  padding: 0 0.375rem var(--a-3);
  border: 0;
  line-height: inherit;
  text-align: inherit;
  border-radius: var(--r-1);
  background: none;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.tabelle th button:hover {
  color: var(--tinte);
}
.tabelle th button::after {
  content: "";
  width: 0;
  height: 0;
  border: 0.25rem solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  margin-bottom: 0.3125rem;
  opacity: 0.7; /* 3,2:1 auf Blatt: als Zeichen noch lesbar, hinter dem gewählten Kopf zurück */
}
.tabelle th[aria-sort] button {
  color: var(--tinte);
  font-weight: 700;
}
.tabelle th[aria-sort] button::after {
  opacity: 1;
}
.tabelle th[aria-sort="ascending"] button::after {
  rotate: 180deg;
}
/* Eingefasst: eine kleine Tabelle innerhalb eines Abschnitts (Kontenliste). */
.tabelle-rahmen--eingefasst {
  border: 1px solid var(--linie);
  border-radius: var(--r-2);
}
.tabelle-rahmen--eingefasst .tabelle th:first-child,
.tabelle-rahmen--eingefasst .tabelle td:first-child {
  padding-left: var(--a-4);
}
.tabelle-rahmen--eingefasst .tabelle th:last-child,
.tabelle-rahmen--eingefasst .tabelle td:last-child {
  padding-right: var(--a-4);
}
.tabelle-rahmen--eingefasst .tabelle thead th {
  background: var(--grund);
}
.tabelle-rahmen--eingefasst .tabelle tbody tr:last-child > * {
  border-bottom: 0;
}
.tabelle-rahmen--eingefasst td {
  vertical-align: middle;
}
/* Kontenliste: Das Konto bekommt die Breite, Rolle und Knopf nehmen nur, was sie brauchen. */
.tabelle--konten td:first-child {
  width: 100%;
}

/* ------------------------------------------------------------------ */
/* 10 Status: Marke (Form), Status (Marke + Wort), Plakette            */
/* ------------------------------------------------------------------ */
.marke {
  position: relative;
  display: inline-block;
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
}
/* Raute: Der Betreiber ist am Zug. */
.marke--entscheidung {
  width: 0.5625rem;
  height: 0.5625rem;
  background: var(--bernstein-marke);
  transform: rotate(45deg);
}
/* Offener Ring: Jemand anderer ist am Zug, es ruht. */
.marke--wartet {
  border: 1.5px solid var(--tinte-3);
  border-radius: 50%;
}
/* Scheibe mit Balken: abgelehnt, gesperrt, widerrufen. */
.marke--gesperrt {
  border-radius: 50%;
  background: var(--rot);
}
.marke--gesperrt::after {
  content: "";
  position: absolute;
  inset: calc(50% - 1px) 2px auto;
  height: 2px;
  background: var(--blatt);
}
/* Volle Scheibe: läuft. */
.marke--aktiv {
  border-radius: 50%;
  background: var(--tinte);
}
/* Haken: bestanden, erledigt. */
.marke--erledigt::after {
  content: "";
  position: absolute;
  left: 0.1875rem;
  top: -0.0625rem;
  width: 0.3125rem;
  height: 0.5625rem;
  border: solid var(--tinte);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

/* Marke und Wort, für Tabellenzellen und Fließtext. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  white-space: nowrap;
}
.status--bernstein {
  color: var(--bernstein);
  font-weight: 600;
}
.status--rot {
  color: var(--rot);
  font-weight: 600;
}
.status--leise {
  color: var(--tinte-3);
}

.plaketten {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a-2);
}
.plakette {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.4375rem;
  border: 1px solid var(--linie-fest);
  border-radius: var(--r-1);
  background: var(--blatt);
  color: var(--tinte-2);
  font-size: var(--s-1);
  font-weight: 600;
  line-height: 1.375rem;
  white-space: nowrap;
}
.plakette .marke {
  scale: 0.8;
}
.plakette--bernstein {
  border-color: var(--bernstein-marke);
  background: var(--bernstein-hauch);
  color: var(--bernstein);
}
.plakette--rot {
  border-color: var(--rot);
  background: var(--rot-hauch);
  color: var(--rot);
}
.plakette--voll {
  border-color: var(--tinte);
  color: var(--tinte);
}

/* ------------------------------------------------------------------ */
/* 11 Kennzahl                                                         */
/* ------------------------------------------------------------------ */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-bottom: 1px solid var(--linie);
  /* Die Trennlinien liegen links an jeder Zelle; die erste Spalte schneidet der Rahmen ab. */
  overflow: hidden;
}
/* Kurz: zwei oder drei Kennzahlen füllen nicht je eine halbe Werkfläche. */
@media (min-width: 760px) {
  .kennzahlen--kurz {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 18rem));
  }
}
.kennzahl {
  display: flex;
  flex-direction: column;
  gap: var(--a-1);
  margin-left: -1px;
  padding: var(--a-4) var(--rand) var(--a-5);
  border-left: 1px solid var(--linie);
  border-top: 1px solid var(--linie);
  margin-top: -1px;
}
.kennzahl dt,
.kennzahl-name {
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.kennzahl dd,
.kennzahl-wert {
  font-size: var(--s-7);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
/* Zusatz hinter dem Wert („zzgl. 20 % USt"): bleibt beisammen und rückt als Ganzes in die nächste Zeile. */
.kennzahl-zusatz {
  display: inline-block;
  color: var(--tinte-3);
  font-size: var(--s-2);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* 12 Balken und Verlauf (reines CSS, Wert über --anteil)              */
/* ------------------------------------------------------------------ */
/* Liegende Balken: Rangliste. <li style="--anteil: 62%"> */
.balken {
  display: grid;
  grid-template-columns: minmax(8rem, 16rem) minmax(4rem, 1fr) auto;
  gap: var(--a-3) var(--a-4);
  align-items: center;
}
.balken li {
  display: contents;
}
.balken-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.balken-spur {
  height: 0.625rem;
  border-radius: 1px;
  background: var(--grund-tief);
}
.balken-spur::before {
  content: "";
  display: block;
  width: var(--anteil, 0%);
  min-width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--tann);
}
.balken-zahl {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
/* Balken hinter einer Tabellenzahl: <td class="zahl zellbalken" style="--anteil: 40%">41</td> */
/* Wie .balken-spur: Tann auf der Spur, als feine Linie unter der Zahl. Im Stapel entfällt er. */
.zellbalken {
  background-image: linear-gradient(var(--tann), var(--tann)), linear-gradient(var(--grund-tief), var(--grund-tief));
  background-origin: content-box;
  background-position: left top 1.5rem;
  background-repeat: no-repeat;
  background-size: var(--anteil, 0%) 0.1875rem, 100% 0.1875rem;
}

/* Stehende Säulen: Verlauf über Monate oder Tage. <li style="--anteil: 62%"> */
.verlauf {
  --hoehe: 9rem;
  display: grid;
  grid-auto-columns: minmax(1.75rem, 1fr);
  grid-auto-flow: column;
  gap: var(--a-3);
  align-items: end;
  max-width: 48rem;
}
.verlauf li {
  display: grid;
  grid-template-rows: auto var(--hoehe) auto;
  gap: var(--a-2);
  justify-items: center;
  min-width: 0;
}
.verlauf-zahl {
  font-size: var(--s-2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.verlauf-saeule {
  align-self: end;
  width: 100%;
  max-width: 2.5rem;
  height: var(--anteil, 0%);
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--linie-fest);
}
.verlauf-name {
  color: var(--tinte-3);
  font-size: var(--s-1);
  white-space: nowrap;
}
/* Der laufende Abschnitt: Tann und fette Beschriftung. */
.verlauf li[aria-current] .verlauf-saeule {
  background: var(--tann);
}
.verlauf li[aria-current] .verlauf-name {
  color: var(--tinte);
  font-weight: 700;
}
/* Linie als Inline-SVG: <svg class="verlaufslinie" viewBox="0 0 600 160" preserveAspectRatio="none"> */
.verlaufslinie {
  display: block;
  width: 100%;
  max-width: 48rem;
  height: 9rem;
  overflow: visible;
}
.verlaufslinie .raster {
  stroke: var(--linie);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.verlaufslinie .linie {
  fill: none;
  stroke: var(--tann);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.verlaufslinie .flaeche {
  fill: var(--tann);
  opacity: 0.08;
}
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a-2) var(--a-5);
  color: var(--tinte-2);
  font-size: var(--s-2);
}
.legende span {
  display: inline-flex;
  align-items: center;
  gap: var(--a-3);
}
.legende i {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 1px;
  background: var(--tann);
}
.legende i.grau {
  background: var(--linie-fest);
}

/* ------------------------------------------------------------------ */
/* 13 Knöpfe und Formular                                              */
/* ------------------------------------------------------------------ */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--a-3);
  min-height: var(--griff);
  padding: 0 var(--a-5);
  border: 1px solid var(--linie-fest);
  border-radius: var(--r-2);
  background: var(--blatt);
  color: var(--tinte);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dauer) var(--kurve), border-color var(--dauer) var(--kurve),
    transform var(--dauer) var(--kurve);
}
.knopf:hover {
  border-color: var(--tinte);
  background: var(--grund);
}
.knopf:active {
  transform: translateY(1px);
}
/* Haupt: bringt den Fall voran. Höchstens einer je Abschnitt. */
.knopf--haupt {
  border-color: var(--weiter);
  background: var(--weiter);
  color: #ffffff;
}
.knopf--haupt:hover {
  border-color: var(--weiter-tief);
  background: var(--weiter-tief);
}
/* Fest: führt aus, ohne etwas zu entscheiden (Anzeigen, Filtern, Schließen). */
.knopf--fest {
  border-color: var(--tinte);
  background: var(--tinte);
  color: var(--blatt);
}
.knopf--fest:hover {
  border-color: var(--tinte-2);
  background: var(--tinte-2);
}
.knopf--leise {
  border-color: transparent;
  background: none;
  color: var(--tinte-2);
}
.knopf--leise:hover {
  border-color: transparent;
  background: var(--grund-tief);
  color: var(--tinte);
}
/* Gefahr still: öffnet erst den Dialog. Gefahr voll: steht nur im Dialog. */
.knopf--gefahr-still {
  border-color: var(--rot);
  color: var(--rot);
}
.knopf--gefahr-still:hover {
  border-color: var(--rot-tief);
  background: var(--rot-hauch);
  color: var(--rot-tief);
}
.knopf--gefahr {
  border-color: var(--rot);
  background: var(--rot);
  color: #ffffff;
}
.knopf--gefahr:hover {
  border-color: var(--rot-tief);
  background: var(--rot-tief);
}
.knopf--klein {
  min-height: var(--griff-klein);
  padding: 0 var(--a-4);
  font-size: var(--s-2);
}
.knopf--breit {
  width: 100%;
}
.knopf:disabled,
.knopf[aria-disabled="true"] {
  border-color: var(--linie);
  background: var(--grund-tief);
  color: var(--tinte-3);
  cursor: not-allowed;
  transform: none;
}
/* Läuft: ein Ring dreht, der Knopf bleibt breit wie er war. */
.knopf[aria-busy="true"]::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: dreh 700ms linear infinite;
}
@keyframes dreh {
  to {
    rotate: 360deg;
  }
}
.knopfzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-3);
}
/* Aufklappen: <details class="aufklapp"><summary class="knopf knopf--klein">…</summary>…</details>.
   Der Keil zeigt den Zustand, offen bleibt der Knopf gedrückt. */
.aufklapp > summary {
  width: fit-content;
  list-style: none;
}
.aufklapp > summary::-webkit-details-marker {
  display: none;
}
.aufklapp > summary::after {
  content: "";
  width: 0;
  height: 0;
  border: 0.25rem solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
}
.aufklapp[open] > summary {
  border-color: var(--tinte);
  background: var(--grund-tief);
}
.aufklapp[open] > summary::after {
  rotate: 180deg;
}
* + .aufklapp {
  margin-top: var(--a-3);
}

.formular {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--a-3);
}
.formular > .feld-gruppe,
.formular > .hinweis {
  align-self: stretch;
}
.feld-gruppe {
  display: flex;
  flex-direction: column;
  gap: var(--a-2);
  min-width: 0;
}
.feld-titel {
  color: var(--tinte-2);
  font-size: var(--s-2);
  font-weight: 600;
}
.feld-titel strong {
  color: var(--tinte);
  font-weight: 700;
}
.feld-hilfe {
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.feld-fehler {
  color: var(--rot);
  font-size: var(--s-2);
  font-weight: 600;
}
.feld {
  display: block;
  width: 100%;
  min-height: var(--griff);
  padding: 0.5625rem 0.75rem;
  border: 1px solid var(--linie-fest);
  border-radius: var(--r-2);
  background-color: var(--blatt);
  color: var(--tinte);
  font-size: var(--s-4); /* 16 px: darunter zoomt iOS beim Antippen */
  line-height: 1.4;
  transition: border-color var(--dauer) var(--kurve);
}
textarea.feld {
  resize: vertical;
}
/* Ein langer Wert zum Kopieren (Link): bricht um und ist ganz zu sehen, statt abgeschnitten in einer Zeile. */
textarea.feld[readonly] {
  field-sizing: content;
  resize: none;
  overflow-wrap: anywhere;
}
.feld::placeholder {
  color: var(--tinte-3);
  opacity: 1;
}
.feld:hover {
  border-color: var(--tinte);
}
.feld:focus {
  border-color: var(--tinte);
  outline: 2px solid var(--fokus);
  outline-offset: 1px;
}
.feld[readonly] {
  background-color: var(--grund);
}
.feld[aria-invalid="true"] {
  border-color: var(--rot);
}
.feld--fest {
  font-family: var(--schrift-fest);
  letter-spacing: -0.02em;
}
/* Einmalcode: Festbreite, weit gesetzt. */
.feld--code {
  font-family: var(--schrift-fest);
  font-size: 1.375rem;
  letter-spacing: 0.3em;
}
input[type="search"].feld::-webkit-search-cancel-button {
  display: none;
}
/* Ankreuzen und Auswählen: die ganze Zeile ist der Griff. */
.wahl {
  display: flex;
  align-items: center;
  gap: var(--a-3);
  min-height: var(--griff);
  cursor: pointer;
}
.wahl input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--tinte);
}
.kopierzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--a-3);
}
.kopierzeile .feld {
  flex: 1 1 14rem;
  width: auto;
}

/* ------------------------------------------------------------------ */
/* 14 Hinweis (steht im Inhalt) und Meldung (erscheint nach einer Aktion) */
/* ------------------------------------------------------------------ */
.hinweis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--a-3);
  padding: var(--a-3) var(--a-4);
  border: 1px solid var(--linie-fest);
  border-radius: var(--r-2);
  background: var(--blatt);
  color: var(--tinte);
  overflow-wrap: anywhere;
}
/* Das Zeichen vor dem Text: Quadrat, Raute, Scheibe mit Balken, Haken. */
.hinweis::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin: 0.4375rem 0.125rem 0;
  background: var(--tinte);
}
.hinweis--achtung {
  border-color: var(--bernstein-marke);
  background: var(--bernstein-hauch);
  color: var(--bernstein);
}
.hinweis--achtung::before {
  background: var(--bernstein-marke);
  rotate: 45deg;
}
/* Befehle und Schalter im Hinweis: Auf den Hauchflächen trägt das Grau von <code> nicht. */
.hinweis code {
  background: var(--blatt);
}
.hinweis--fehler {
  border-color: var(--rot);
  background: var(--rot-hauch);
  color: var(--rot-tief);
}
.hinweis--fehler::before {
  width: 0.625rem;
  height: 0.625rem;
  margin: 0.375rem 0.0625rem 0;
  border-radius: 50%;
  background: linear-gradient(var(--blatt), var(--blatt)) center / 0.375rem 2px no-repeat var(--rot);
}
.hinweis--erfolg {
  border-color: var(--weiter);
  background: var(--weiter-hauch);
  color: var(--weiter-tief);
}
.hinweis--erfolg::before {
  width: 0.3125rem;
  height: 0.5625rem;
  margin: 0.25rem 0.25rem 0;
  border: solid var(--weiter);
  border-width: 0 2px 2px 0;
  background: none;
  rotate: 45deg;
}

.meldung {
  position: fixed;
  left: calc(var(--leiste) + var(--rand));
  bottom: var(--a-6);
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--a-4);
  max-width: min(30rem, calc(100vw - var(--leiste) - 2 * var(--rand)));
  padding: var(--a-4) var(--a-5);
  border-radius: var(--r-2);
  background: var(--tinte);
  color: #ffffff;
  box-shadow: var(--schatten-schicht);
  overflow-wrap: anywhere;
  animation: meldung-ein var(--dauer-lang) var(--kurve);
}
.meldung:empty {
  display: none;
}
.meldung::before {
  content: "";
  grid-row: 1 / span 2;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.4375rem;
  border-radius: 1px;
  background: var(--limette);
}
.meldung strong {
  grid-column: 2;
  font-weight: 600;
}
.meldung span {
  grid-column: 2;
  color: var(--auf-tann-2);
  font-size: var(--s-2);
}
.rahmenlos .meldung {
  left: var(--rand);
}
@keyframes meldung-ein {
  from {
    opacity: 0;
    translate: 0 0.5rem;
  }
}

/* ------------------------------------------------------------------ */
/* 15 Leerzustand                                                      */
/* ------------------------------------------------------------------ */
.leer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-3) var(--a-4);
  padding: var(--a-5) var(--rand);
  border-bottom: 1px solid var(--linie);
  color: var(--tinte-2);
}
/* Gestrichelter Ring: Hier wäre eine Zeile, es gibt aber keine. */
.leer::before {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin: 0 0.3125rem;
  border: 1.5px dashed var(--tinte-3);
  border-radius: 50%;
}
.leer p {
  flex: 1 1 12rem;
}
/* Groß: die ganze Fläche ist leer (Akte ohne Auswahl, Seite ohne Daten). */
.leer--gross {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--a-2);
  padding: var(--a-8) var(--rand);
  border-bottom: 0;
}
.leer--gross::before {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 0 var(--a-3);
}
.leer--gross p {
  flex: none;
  max-width: 44ch;
}
.leer--gross p:first-of-type {
  color: var(--tinte);
  font-weight: 700;
}
.leer--gross .knopf {
  margin-top: var(--a-3);
}

/* ------------------------------------------------------------------ */
/* 16 Dialog                                                           */
/* ------------------------------------------------------------------ */
.dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-3);
  background: var(--blatt);
  color: var(--tinte);
  box-shadow: var(--schatten-schicht);
  overflow: auto;
}
.dialog::backdrop {
  background: rgb(16 26 23 / 0.55);
}
.dialog[open] {
  animation: dialog-ein var(--dauer-lang) var(--kurve);
}
@keyframes dialog-ein {
  from {
    opacity: 0;
    translate: 0 0.5rem;
  }
}
/* Endgültiges trägt vor dem Titel die rote Scheibe mit Balken. */
.dialog--gefahr .dialog-kopf h2::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: var(--a-3);
  border-radius: 50%;
  background: linear-gradient(var(--blatt), var(--blatt)) center / 0.4375rem 2px no-repeat var(--rot);
}
.dialog-kopf {
  padding: var(--a-6) var(--a-6) 0;
}
.dialog-kopf h2 {
  font-size: var(--s-5);
  font-weight: 700;
  letter-spacing: -0.014em;
  line-height: var(--zeile-eng);
}
.dialog-kopf p {
  margin-top: var(--a-1);
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.dialog-inhalt {
  display: flex;
  flex-direction: column;
  gap: var(--a-4);
  padding: var(--a-4) var(--a-6) var(--a-6);
}
.dialog-inhalt > p {
  max-width: 68ch;
  color: var(--tinte-2);
}
.dialog-fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--a-3);
  padding: var(--a-4) var(--a-6);
  border-top: 1px solid var(--linie);
  background: var(--grund);
}

/* ------------------------------------------------------------------ */
/* 17 Akte: die gewählte Zeile mit allem, was man an ihr tun kann      */
/* ------------------------------------------------------------------ */
.zweispalter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(28rem, 40%, 36rem);
  align-items: start;
  min-height: calc(100dvh - var(--kopf));
}
.zweispalter > :first-child {
  min-width: 0;
}
.zweispalter > :first-child:focus {
  outline: none;
}
.akte {
  position: sticky;
  top: var(--kopf);
  z-index: 15;
  height: calc(100dvh - var(--kopf));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-left: 1px solid var(--linie);
  background: var(--grund);
}
.akte:focus {
  outline: none;
}
.akte-leiste {
  display: none;
}
/* Oben das Blatt: was man liest. Darunter die Werkbank: was man tut. */
.akte-kopf,
.akte-blatt {
  background: var(--blatt);
}
.akte-kopf {
  padding: var(--a-5) var(--rand) var(--a-4);
}
.akte-titelzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--a-3) var(--a-4);
}
.akte-titelzeile h2 {
  font-size: var(--s-6);
  font-weight: 700;
  letter-spacing: -0.017em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.akte-titelzeile h2:focus {
  outline: none;
}
.akte-titelzeile .plaketten {
  padding-top: 0.25rem;
}
.akte-meta {
  margin-top: var(--a-2);
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.akte-kontakt {
  margin-top: var(--a-2);
  color: var(--tinte-2);
  overflow-wrap: anywhere;
}
.akte-kennung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-2) var(--a-3);
  margin-top: var(--a-2);
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.akte-kennung code {
  padding: 0;
  background: none;
}
.akte-teil {
  padding: var(--a-5) var(--rand);
  border-top: 1px solid var(--linie);
}
.akte-teil > * + * {
  margin-top: var(--a-4);
}
.teil-titel {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--a-2) var(--a-4);
  font-size: var(--s-3);
  font-weight: 700;
  line-height: var(--zeile-eng);
}
.teil-titel .fest {
  color: var(--tinte-2);
  font-size: var(--s-2);
  font-weight: 500;
}
.teil-titel + p {
  margin-top: var(--a-2);
}
.teil-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--a-3) var(--a-5);
}
.teil-zeile > p {
  flex: 1 1 14rem;
  color: var(--tinte-2);
}
.teil-paar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--a-5);
}

/* Stammdaten: Beschriftung links, Wert rechts, eine Zeile je Angabe. */
.daten {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: var(--a-2) var(--a-4);
}
.daten dt {
  padding-top: 0.125rem;
  color: var(--tinte-3);
  font-size: var(--s-2);
}
.daten dd {
  min-width: 0;
  overflow-wrap: anywhere;
}
.daten .mehrere {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--a-4);
}
.daten .fest {
  display: block;
}
.daten .vorformatiert {
  white-space: pre-wrap;
}

/* Der Prüfweg: drei Schritte an einer Schiene. Es ist wirklich eine Reihenfolge,
   der dritte geht erst auf, wenn die ersten beiden erledigt sind. */
.weg {
  display: grid;
}
.station {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0 var(--a-4);
  padding-bottom: var(--a-6);
}
.station:last-child {
  padding-bottom: 0;
}
.station:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(0.75rem - 1px);
  top: 1.75rem;
  bottom: 0.25rem;
  width: 2px;
  background: var(--linie-fest);
  opacity: 0.55;
}
.station--erledigt:not(:last-child)::before {
  background: var(--tinte);
  opacity: 1;
}
.station-knoten {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--linie-fest);
  border-radius: 50%;
  background: var(--blatt);
  color: var(--tinte-3);
  font-family: var(--schrift-fest);
  font-size: var(--s-1);
  font-weight: 700;
  line-height: 1;
}
.station-knoten svg {
  width: 0.75rem;
  height: 0.75rem;
}
.station--erledigt .station-knoten {
  border-color: var(--tinte);
  background: var(--tinte);
  color: var(--blatt);
}
.station--am-zug .station-knoten {
  border: 2px solid var(--bernstein-marke);
  color: var(--bernstein);
}
.station--abgelehnt .station-knoten {
  border-color: var(--rot);
  background: var(--rot);
  color: var(--blatt);
}
.station-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--a-4);
  min-height: 1.5rem;
  padding-top: 0.0625rem;
}
.station-kopf h3 {
  font-size: var(--s-3);
  font-weight: 700;
  line-height: var(--zeile-eng);
}
.station-stand {
  color: var(--tinte-2);
  font-size: var(--s-2);
  overflow-wrap: anywhere;
}
.station-stand--rot {
  color: var(--rot);
  font-weight: 600;
}
.station-inhalt {
  grid-column: 2;
  margin-top: var(--a-3);
}
.station-inhalt > * + * {
  margin-top: var(--a-4);
}
.station-inhalt > .feld-hilfe {
  margin-top: var(--a-2);
}

/* ------------------------------------------------------------------ */
/* 18 Anmeldung: derselbe Rahmen wie innen, nur ohne Navigation        */
/* ------------------------------------------------------------------ */
/* Die Markenspalte ist so breit wie die Seitenleiste; Zeichen und Fußverweis stehen,
   wo innen das Zeichen und „Abmelden" stehen. */
.anmeldung {
  display: grid;
  grid-template-columns: var(--leiste) minmax(0, 1fr);
  min-height: 100dvh;
}
.anmeldung-marke {
  --fokus: var(--limette);
  display: flex;
  flex-direction: column;
  background: var(--tann);
  color: var(--auf-tann);
}
.anmeldung-marke a {
  display: flex;
  align-items: center;
  min-height: var(--griff);
  margin: auto var(--a-3) var(--a-3);
  padding: 0 var(--a-4) 0 var(--a-7);
  border-radius: var(--r-2);
  color: var(--auf-tann-2);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dauer) var(--kurve), color var(--dauer) var(--kurve);
}
.anmeldung-marke a:hover {
  background: var(--tann-tief);
  color: var(--auf-tann);
}
.anmeldung-blatt {
  display: flex;
  flex-direction: column;
  gap: var(--a-5);
  justify-self: center;
  width: 100%;
  max-width: 30rem;
  padding: clamp(var(--a-7), 16vh, 9rem) var(--a-7) var(--a-8);
}
.anmeldung-blatt h1 {
  font-size: var(--s-6);
  font-weight: 700;
  letter-spacing: -0.017em;
  line-height: 1.2;
}
.anmeldung-blatt > p {
  color: var(--tinte-2);
}
/* Der hervorgehobene Wert im Einleitungssatz, etwa die Mailadresse. */
.anmeldung-blatt > p strong {
  color: var(--tinte);
  font-weight: 600;
}
.anmeldung-blatt .formular {
  align-items: stretch;
  gap: var(--a-4);
}
.anmeldung-wege {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.anmeldung-wege a,
.anmeldung-wege button {
  display: inline-flex;
  align-items: center;
  min-height: var(--griff);
  padding: 0;
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--linie-fest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
/* Ein Nebenweg, der gerade läuft („Wird geschickt …"). */
.anmeldung-wege button[aria-disabled="true"] {
  color: var(--tinte-3);
  text-decoration: none;
  cursor: progress;
}

/* ------------------------------------------------------------------ */
/* 19 Brief und Druck                                                  */
/* ------------------------------------------------------------------ */
.brief-seite {
  min-height: 100dvh;
  background: var(--grund);
}
.brief-leiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--a-3);
  width: min(210mm, 100%);
  margin: 0 auto;
  padding: var(--a-5) var(--a-5) var(--a-4);
}
/* Das Blatt: A4 im Verhältnis, Anschrift auf Fensterhöhe. */
.brief {
  width: min(210mm, calc(100% - 2 * var(--a-5)));
  min-height: min(297mm, 141vw);
  margin: 0 auto var(--a-8);
  padding: 45mm 25mm 25mm;
  border: 1px solid var(--linie);
  background: var(--blatt);
  font-size: 11.5pt;
  line-height: 1.5;
}
.brief-anschrift {
  min-height: 40mm;
  font-style: normal;
}
.brief h1 {
  margin-bottom: 6mm;
  font-size: 16pt;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
.brief p {
  max-width: 68ch;
}
.brief p + p {
  margin-top: 4mm;
}
.brief-code {
  margin: 10mm 0 4mm;
  font-family: var(--schrift-fest);
  font-size: 22pt;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brief-fuss {
  color: var(--tinte-3);
  font-size: 9.5pt;
}
/* Leerzustand einer rahmenlosen Seite: in der Breite des Blatts, mittig auf dem Grund. */
.brief-leer {
  width: min(210mm, 100%);
  margin: 0 auto;
  padding: var(--a-8) var(--a-5);
}
.brief-leer .leer {
  padding-inline: 0;
}
@media (max-width: 759.98px) {
  .brief {
    padding: var(--a-7) var(--a-6);
  }
  .brief-anschrift {
    min-height: 0;
    margin-bottom: var(--a-7);
  }
}
@page {
  size: A4;
  margin: 0;
}
@media print {
  .kein-druck,
  .leiste,
  .sprung,
  .meldung,
  .seitenkopf-aktionen,
  .filterleiste {
    display: none !important;
  }
  html,
  body,
  .brief-seite {
    background: #ffffff;
  }
  .rahmen {
    display: block;
  }
  .seitenkopf,
  .tafel-kopf {
    position: static;
  }
  .brief {
    width: 210mm;
    min-height: 0;
    margin: 0;
    border: 0;
  }
  .tabelle tr {
    break-inside: avoid;
  }
  a {
    text-decoration: none;
  }
}

/* ------------------------------------------------------------------ */
/* 20 Umbrüche                                                         */
/* ------------------------------------------------------------------ */
/* Ab 1240 px stehen Liste und Akte nebeneinander: Ein Keil verbindet die gewählte Zeile mit ihr. */
@media (min-width: 1240px) {
  .zeile[aria-current="true"]::after {
    content: "";
    position: absolute;
    right: 0;
    top: calc(50% - 0.4375rem);
    border: 0.4375rem solid transparent;
    border-left-color: var(--tinte);
    border-right-width: 0;
  }
}

/* Schmaler als 1240 px: Die Akte legt sich als Schicht über die Liste. */
.schleier {
  display: none;
}
@media (max-width: 1239.98px) {
  .zweispalter {
    grid-template-columns: minmax(0, 1fr);
  }
  .akte {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    width: min(36rem, 100%);
    height: auto;
    border-left: 0;
    box-shadow: var(--schatten-schicht);
    visibility: hidden;
    transform: translateX(1.5rem);
    opacity: 0;
    transition: transform var(--dauer-lang) var(--kurve), opacity var(--dauer-lang) var(--kurve),
      visibility 0s linear var(--dauer-lang);
  }
  .akte-ueberlagert .akte {
    visibility: visible;
    transform: none;
    opacity: 1;
    transition-delay: 0s;
  }
  .akte-leiste {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: var(--balken);
    padding: 0 var(--a-3);
    border-bottom: 1px solid var(--linie);
    background: var(--blatt);
  }
  .akte-leiste .knopf::before {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    rotate: 45deg;
  }
  .schleier {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgb(16 26 23 / 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dauer-lang) var(--kurve);
  }
  .akte-ueberlagert .schleier {
    opacity: 1;
    pointer-events: auto;
  }
  html.akte-ueberlagert {
    overflow: hidden;
  }
}

/* Schmaler als 760 px: Die Seitenleiste wird zum Kopfbalken mit Menü. */
@media (max-width: 759.98px) {
  :root {
    --rand: var(--a-5);
  }
  .rahmen {
    display: block;
  }
  .leiste {
    height: auto;
    min-height: var(--balken);
  }
  .leiste-kopf {
    min-height: var(--balken);
    padding: 0 var(--a-3) 0 var(--a-5);
  }
  .leiste-marke {
    flex: 1;
    flex-direction: row;
    align-items: baseline;
    gap: var(--a-3);
  }
  .leiste-menue {
    display: inline-flex;
    align-items: center;
    gap: var(--a-3);
    min-height: var(--griff);
    padding: 0 var(--a-4);
    border: 0;
    border-radius: var(--r-2);
    background: none;
    color: var(--auf-tann);
    font-weight: 600;
    cursor: pointer;
  }
  .leiste-menue::before {
    content: "";
    width: 1rem;
    height: 0.625rem;
    border: solid currentColor;
    border-width: 2px 0;
  }
  .leiste-menue[aria-expanded="true"] {
    background: var(--tann-tief);
  }
  .leiste-inhalt {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - var(--balken));
    overflow-y: auto;
    background: var(--tann);
    box-shadow: 0 24px 48px -24px rgb(16 26 23 / 0.6);
  }
  .leiste-inhalt[data-offen] {
    display: flex;
  }
  .leiste-fuss {
    margin-top: 0;
  }

  /* Der Titel rollt weg, die Filterleiste bleibt unter dem Balken haften. */
  .seitenkopf {
    display: contents;
  }
  .seitenkopf-zeile {
    min-height: 0;
    padding-block: var(--a-4) var(--a-3);
  }
  .filterleiste {
    position: sticky;
    top: var(--balken);
    z-index: 20;
    flex-direction: column-reverse;
    align-items: stretch;
    background: var(--blatt);
    border-bottom: 1px solid var(--linie);
  }
  .filterleiste .suche {
    flex: none;
    max-width: none;
    margin-left: 0;
    padding-top: var(--a-2);
  }
  .suche kbd {
    display: none;
  }
  .suche .feld {
    padding-right: 0.75rem;
  }
  /* Ein Filterformular ist am Handy mehrere Zeilen hoch: Es rollt mit, statt ein Drittel des Schirms zu halten.
     Haften bleibt nur die Leiste aus Fächern und Suche. */
  .filterleiste:has(.filterformular) {
    position: static;
  }
  .filterformular {
    padding-top: var(--a-2);
  }
  .filterformular .feld-gruppe,
  .filterformular .feld-gruppe--schmal,
  .filterformular .feld-gruppe--datum {
    flex: 1 1 8rem;
    max-width: none;
  }
  .filterformular .feld-gruppe--breit {
    flex: 1 1 100%;
  }
  .filterformular .knopf {
    flex: 1 1 100%;
  }

  .tafel-kopf {
    position: static;
  }
  .zeilen,
  .zeile,
  .tafel-kopf--spalten {
    --spalten: 1.25rem minmax(0, 1fr) auto;
  }
  .tafel-kopf--spalten h2 {
    grid-column: 1 / -1;
  }
  .tafel-spalte {
    display: none;
  }
  .zeile {
    grid-template-areas: "marke name datum" ". stand stand";
    row-gap: var(--a-2);
    padding-block: var(--a-4);
  }
  .zeile-marke {
    grid-area: marke;
  }
  .zeile-name {
    grid-area: name;
  }
  .zeile-stand {
    grid-area: stand;
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 var(--a-4);
  }
  .zeile-datum {
    grid-area: datum;
  }

  .daten {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .daten dd {
    margin-bottom: var(--a-3);
  }

  /* Stapel: Die Tabelle wird zur Liste, jede Zelle nennt ihre Spalte (data-titel am td). */
  .tabelle--stapel,
  .tabelle--stapel tbody {
    display: block;
  }
  /* Der Spaltenkopf ist im Stapel nicht zu sehen. visibility nimmt auch seine Sortierknöpfe
     aus der Tab-Reihenfolge, sonst wandert der Fokus ins Leere. */
  .tabelle--stapel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    visibility: hidden;
  }
  .tabelle--stapel tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--a-2) var(--a-4);
    padding: var(--a-4) var(--rand);
    border-bottom: 1px solid var(--linie);
  }
  /* Zellen verlieren Polster, Linie und Fläche; das gilt auch für den Zellbalken. */
  .tabelle--stapel td,
  .tabelle--stapel tbody th {
    width: auto !important;
    padding: 0 !important;
    border: 0;
    text-align: left !important;
    background: none !important;
  }
  .tabelle--stapel td:first-child,
  .tabelle--stapel tbody th:first-child,
  .tabelle--stapel td.breit {
    grid-column: 1 / -1;
  }
  /* Die erste Zelle ist der Kopf des Blocks, mit oder ohne Spaltennamen darüber. */
  .tabelle--stapel td:first-child {
    color: var(--tinte);
    font-weight: 600;
  }
  /* Der Spaltenname bleibt in der Grundschrift, auch über einem Festbreite-Wert. */
  .tabelle--stapel td[data-titel]::before {
    content: attr(data-titel);
    display: block;
    color: var(--tinte-3);
    font-family: var(--schrift);
    font-size: var(--s-1);
    font-weight: 400;
    letter-spacing: 0;
  }
  /* Summe und Gruppentrenner liegen im Stapel an der Zeile, nicht mehr an den Zellen. */
  .tabelle--stapel tr.summe {
    background: var(--grund);
  }
  .tabelle--stapel tr.gruppe-ende {
    border-bottom-color: var(--linie-fest);
  }
  .rohdaten {
    max-width: none;
  }
  /* Kontenliste: Konto und Rolle links, der Knopf rechts. */
  .tabelle--konten,
  .tabelle--konten tbody {
    display: block;
  }
  .tabelle--konten thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tabelle--konten tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--a-1) var(--a-4);
    padding: var(--a-3) var(--a-4);
    border-bottom: 1px solid var(--linie);
  }
  .tabelle--konten tbody tr:last-child {
    border-bottom: 0;
  }
  .tabelle--konten td {
    padding: 0 !important;
    border: 0;
  }
  .tabelle--konten td:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .kennzahlen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .balken {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .balken-spur {
    grid-column: 1 / -1;
    grid-row: span 1;
    order: 3;
  }
  .balken li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    gap: var(--a-1) var(--a-4);
  }
  .verlauf {
    --hoehe: 7rem;
    gap: var(--a-2);
  }
  .verlauf-zahl {
    font-size: var(--s-1);
  }

  .meldung,
  .rahmenlos .meldung {
    left: var(--a-5);
    right: var(--a-5);
    bottom: var(--a-5);
    max-width: none;
  }
  .dialog-fuss .knopf {
    flex: 1 1 auto;
  }

  .anmeldung {
    display: block;
  }
  .anmeldung-marke {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: var(--balken);
  }
  .anmeldung-marke a {
    margin: 0 var(--a-3) 0 0;
    padding: 0 var(--a-4);
  }
  .anmeldung-blatt {
    max-width: none;
    padding: var(--a-7) var(--a-5) var(--a-8);
  }
}

/* ------------------------------------------------------------------ */
/* 21 Bewegung                                                         */
/* ------------------------------------------------------------------ */
/* Die Akte wechselt den Inhalt mit einem kurzen Aufblenden; v2 setzt data-frisch. */
.akte[data-frisch] > * {
  animation: akte-ein var(--dauer-lang) var(--kurve);
}
@keyframes akte-ein {
  from {
    opacity: 0.35;
    translate: 0.375rem 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
  .knopf[aria-busy="true"]::before {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.6;
  }
}
