/* AI Studio im Stil der BIA-Website (business-innovation.ai).
   Farben, Schrift und Rundungen kommen aus derselben Quelle wie die Website
   (bia-next: public/assets/css/style.css). Später bekommen Kunden ihre Farbe über --marke.

   Zwei Breiten, an denen sich etwas ändert:
     1024 px und schmaler: statt der Symbol-Leiste im Kopf der Menü-Knopf mit drei Strichen (Handy, Tablet), ADR 0112
     700 px und schmaler: Listen werden zu Karten, Kacheln stehen zu zweit (Handy) */

@font-face { font-family: 'Satoshi'; font-weight: 400; font-style: normal; font-display: swap; src: url('schrift/satoshi-400.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-weight: 500; font-style: normal; font-display: swap; src: url('schrift/satoshi-500.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-weight: 700; font-style: normal; font-display: swap; src: url('schrift/satoshi-700.woff2') format('woff2'); }

:root {
  --marke: #00CCCC;        /* BIA-Türkis */
  --marke-tief: #00A8A8;
  --marke-hell: #E6FAFA;
  --marke-schein: rgba(0, 204, 204, .28);
  --tinte: #001B14;        /* Schriftfarbe der Website */
  --leise: #5E7370;
  --linie: rgba(0, 27, 20, .10);
  --linie-stark: rgba(0, 27, 20, .18);
  --flaeche: #F8F8F8;
  --flaeche-2: #F0F0F0;
  --rund-karte: 22px;
  --rund-pille: 999px;
  --schatten: 0 1px 2px rgba(0, 27, 20, .05), 0 4px 12px rgba(0, 27, 20, .05);
  --schatten-mittel: 0 2px 4px rgba(0, 27, 20, .04), 0 12px 32px rgba(0, 27, 20, .08);
  --schatten-gross: 0 4px 8px rgba(0, 27, 20, .04), 0 24px 60px rgba(0, 27, 20, .12);
  --rund-gross: 28px;               /* große Karten wie „Leistungen“ auf der Website */
  --weich: cubic-bezier(.22, .61, .36, 1);
  --gruen: #1A7F37;  --gruen-hell: #E6F6EA;
  --gelb: #8A6100;   --gelb-hell: #FFF4D1;
  --rot: #B42318;    --rot-hell: #FDECEC;
  --rand: clamp(16px, 4vw, 40px);  /* Abstand links und rechts */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--flaeche); color: var(--tinte);   /* hellgraue Fläche, weiße Karten darauf (wie die Website) */
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .6em; }
/* Überschriften groß und leicht, wie „Was wir für Sie tatsächlich tun.“ auf der Website */
h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.08; overflow-wrap: break-word; }
h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); margin-top: 2.4rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.leise { color: var(--leise); }
/* Einleitung unter der Überschrift */
.lead, main > h1 + p.leise { font-size: 1.08rem; color: var(--leise); max-width: 60ch; }
.seitenkopf { margin-bottom: 30px; }
.seitenkopf .lead { margin: 0; }
/* Hervorgehobenes Wort auf Türkis, wie „Ihrem Prozess“ auf der Website */
.betont { background: var(--marke); color: var(--tinte); padding: .02em .26em .08em; border-radius: .22em;
          -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.symbol { display: block; flex: 0 0 auto; }

/* Kopf: Logo, Navigation als Leiste mit Symbolen, Abmelden rechts */
.kopf {
  display: flex; align-items: center; gap: 20px;
  padding: 10px var(--rand); padding-top: max(10px, env(safe-area-inset-top));
  padding-left: max(var(--rand), env(safe-area-inset-left)); padding-right: max(var(--rand), env(safe-area-inset-right));
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 40;   /* bleibt beim Scrollen stehen, halbdurchsichtig wie auf der Website */
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
}
/* Marke oben links: nur Logo und „AI Studio“ (wie auf der Website, ohne Firmennamen) */
.marke { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: 0 0 auto; }
.marke img { width: 40px; height: 40px; display: block; flex: 0 0 auto; }
.marke__text { font-size: 1.1rem; font-weight: 400; letter-spacing: .005em; white-space: nowrap; }
/* Navigation: Symbol mit Beschriftung darunter (ADR 0112). Aktiv: Symbol türkis, Schrift dunkel.
   Bei sehr vielen Seiten rollt die Leiste seitlich, statt den Kopf zu sprengen. */
.nav { display: flex; flex: 0 1 auto; min-width: 0; margin: 0 auto; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__punkt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 78px; padding: 8px 10px;
  border-radius: 14px; font-size: .8rem; font-weight: 500; color: var(--leise); text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--weich), color .25s var(--weich);
}
.nav__punkt:hover { background: var(--flaeche); color: var(--tinte); }
.nav__punkt[aria-current="page"] { color: var(--tinte); }
.nav__punkt[aria-current="page"] .symbol { color: var(--marke-tief); }
.nav__abmelden { display: none; }      /* nur im Handy-Menü; am Rechner steht „Abmelden“ rechts im Kopf */
.kopf__abmelden { flex: 0 0 auto; }

/* Menü-Knopf (drei Striche) wie auf der Website; nur am Handy und Tablet sichtbar.
   Das Häkchen-Feld davor ist unsichtbar, aber mit der Tastatur erreichbar. */
.menue-schalter { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 50%; margin: 0 0 0 auto; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1px var(--linie-stark), var(--schatten);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; -webkit-tap-highlight-color: transparent;
}
.burger i { display: block; width: 18px; height: 1.5px; background: var(--tinte); border-radius: 2px; transition: transform .35s var(--weich), opacity .25s; }
.menue-schalter:focus-visible + .burger { outline: 2px solid var(--marke); outline-offset: 2px; }
.menue-schalter:checked + .burger { box-shadow: inset 0 0 0 1.5px var(--marke), var(--schatten); }
.menue-schalter:checked + .burger i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menue-schalter:checked + .burger i:nth-child(2) { opacity: 0; }
.menue-schalter:checked + .burger i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

main {
  max-width: 1100px; margin: 0 auto;
  padding: 40px var(--rand) 72px;
  padding-left: max(var(--rand), env(safe-area-inset-left)); padding-right: max(var(--rand), env(safe-area-inset-right));
}

/* Zurück-Link oben auf Unterseiten. Wichtig am Handy: Die Web-App hat keinen Zurück-Knopf. */
.zurueck { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--leise); text-decoration: none; margin-bottom: 14px; }
.zurueck .symbol { width: 18px; height: 18px; }
.zurueck:hover { color: var(--tinte); }
/* Zeile unter dem Titel eines Vorgangs: Ampel · Stand · Links. Ein Link bricht nie in sich um. */
.vorgang__kopf a { white-space: nowrap; }

/* Vorgangsseite (ADR 0113): links Warum, Angaben, Entscheidung; rechts die Vorschau, die beim Scrollen stehen bleibt */
main:has(.vorgang--mit-datei) { max-width: 1320px; }   /* mehr Platz für die Vorschau */
.vorgang { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 28px; align-items: start; }
.vorgang--mit-datei { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "angaben vorschau" "entscheidung vorschau"; }
.vorgang--mit-datei .vorgang__angaben { grid-area: angaben; }
.vorgang--mit-datei .vorschau { grid-area: vorschau; }
.vorgang--mit-datei .entscheidung { grid-area: entscheidung; }
.vorgang__angaben > h2 { margin-top: 26px; }
.karte { background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-karte); padding: 18px 22px; }
.karte h2 { margin-top: 0; }
.gruende { margin: 0; padding-left: 20px; }
.gruende li + li { margin-top: 6px; }
.ampel--gross { font-size: .9rem; padding: 5px 14px; }

.vorschau { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vorschau__rahmen { display: block; width: 100%; height: calc(100vh - 190px); min-height: 460px; border: 1px solid var(--linie); border-radius: var(--rund-karte); background: #fff; }
.vorschau__bild { display: block; width: 100%; height: auto; border: 1px solid var(--linie); border-radius: var(--rund-karte); background: #fff; }
.vorschau__oeffnen { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: .9rem; font-weight: 500; text-decoration: none; }
.vorschau__oeffnen .symbol { width: 18px; height: 18px; color: var(--marke-tief); }
.vorschau__oeffnen .symbol:first-child { display: none; }   /* Dokument-Symbol nur im großen Knopf am Handy */
.vorschau__oeffnen:hover .symbol:last-child { transform: translateX(4px); }
.vorschau__oeffnen .symbol:last-child { transition: transform .35s var(--weich); }

/* Entscheidung: weiße Leiste mit Freigeben/Ablehnen */
.entscheidung { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0;
                background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-karte); padding: 14px 16px; }
.entscheidung--hinweis { font-size: .92rem; }

/* Kleine Überschrift über Abschnitten, wie „eyebrow“ auf der Website */
.ueber { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); margin-bottom: 10px; }
.ueber::before { content: ''; width: 22px; height: 1px; background: var(--marke); }

/* Kacheln: weiße Karten auf der grauen Fläche */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 8px 0; }
.kachel { background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-karte); padding: 20px 22px; text-decoration: none;
          display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: transform .4s var(--weich), box-shadow .4s var(--weich); }
a.kachel:hover { transform: translateY(-3px); box-shadow: var(--schatten-mittel); }
.kachel span { font-size: .85rem; color: var(--leise); }
.kachel b { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.kachel b.kachel__zahl--rot, .zahl--rot { color: var(--rot); }

/* Abschnitt mit kleiner Überschrift und großer h2 */
.abschnitt { margin-top: 56px; }
.abschnitt h2 { margin-top: 0; }

/* Übersicht: eine Karte je gekauftem Prozess, wie die Leistungs-Karten der Website */
.prozesse { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prozess {
  background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-gross);
  padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: transform .5s var(--weich), box-shadow .5s var(--weich);
}
.prozess:hover { transform: translateY(-5px); box-shadow: var(--schatten-gross); }
.prozess--gelb { background: var(--marke-hell); border-color: transparent; }   /* in Einrichtung */
.prozess__kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.prozess__symbol {
  width: 46px; height: 46px; border-radius: 13px; background: var(--marke-hell); color: var(--marke-tief);
  display: grid; place-items: center; transition: background-color .4s var(--weich), color .4s var(--weich), transform .4s var(--weich);
}
.prozess--gelb .prozess__symbol { background: #fff; }
.prozess:hover .prozess__symbol { background: var(--marke); color: var(--tinte); transform: rotate(-6deg) scale(1.06); }
.prozess h3 { font-size: 1.3rem; margin: 0; overflow-wrap: break-word; }
.prozess p { margin: 0; font-size: .95rem; color: var(--leise); }
.prozess__hinweis { color: var(--marke-tief) !important; font-weight: 500; }
.prozess__zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--linie); }
.prozess__zahlen > div { display: flex; flex-direction: column; justify-content: space-between; }   /* Zahlen auf einer Linie, auch wenn eine Beschriftung umbricht */
.prozess__zahlen dt { font-size: .75rem; color: var(--leise); line-height: 1.3; }
.prozess__zahlen dd { margin: 2px 0 0; font-size: 1.8rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.prozess__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: auto; padding-top: 8px; }

/* Link mit Pfeil, wie „Mehr erfahren →“ auf der Website */
.pfeil-link { display: inline-flex; align-items: center; gap: 7px; font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--tinte); }
.pfeil-link .symbol { width: 18px; height: 18px; color: var(--marke-tief); transition: transform .35s var(--weich); }
.pfeil-link:hover .symbol { transform: translateX(4px); }

/* Hinweis über einer gefilterten Liste („Nur … · alle anzeigen“) */
.filter { display: inline-block; background: var(--marke-hell); border-radius: var(--rund-pille); padding: 6px 14px; font-size: .88rem; }

/* Tabellen. Drei Arten (Wächter-Test: jede Tabelle hat eine davon):
   .liste    Zeilen mit mehreren Spalten; am Handy wird jede Zeile eine Karte.
             Zellen mit data-titel="…" zeigen am Handy ihren Spaltennamen davor.
   .angaben  zwei Spalten Feld – Wert; passt auch am Handy so wie sie ist.
   .raster   Raster, das nur als Tabelle Sinn ergibt (z. B. Woche × Personen); rollt am Handy seitlich. */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); padding: 14px 10px; border-bottom: 1px solid var(--linie-stark); }
td { padding: 13px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: break-word; }
/* Auf der grauen Fläche stehen Tabellen als weiße Karte */
.liste, .angaben, .raster { background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-karte); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.liste th:first-child, .liste td:first-child, .angaben td:first-child, .raster th:first-child, .raster td:first-child { padding-left: 20px; }
.liste th:last-child, .liste td:last-child, .angaben td:last-child, .raster th:last-child, .raster td:last-child { padding-right: 20px; }
.liste tbody tr:last-child td, .angaben tr:last-child td, .raster tbody tr:last-child td { border-bottom: 0; }
td a { text-decoration: underline; text-decoration-color: var(--marke); text-underline-offset: 3px; }
.angaben td:first-child { width: 34%; overflow-wrap: normal; }
/* Ganze Zeile antippbar: der Link in der Zeile spannt sich über die Zeile */
.liste--klickbar tr { position: relative; }
.liste--klickbar td a::after { content: ''; position: absolute; inset: 0; }
.liste--klickbar tbody tr:hover { background: var(--flaeche); }

/* Ampel als Pille */
.ampel { display: inline-block; padding: 3px 11px; border-radius: var(--rund-pille); font-size: .78rem; font-weight: 500; white-space: nowrap; }
.ampel.gruen { background: var(--gruen-hell); color: var(--gruen); }
.ampel.gelb { background: var(--gelb-hell); color: var(--gelb); }
.ampel.rot { background: var(--rot-hell); color: var(--rot); }
.ampel.grau { background: var(--flaeche-2); color: var(--leise); }

/* Knöpfe als Pillen wie auf der Website */
.knopf, button { font: inherit; font-size: .92rem; font-weight: 500; letter-spacing: .01em; padding: 11px 22px; border-radius: var(--rund-pille); border: 0; cursor: pointer; transition: background-color .25s, color .25s, box-shadow .25s, transform .25s; }
.knopf--haupt, .eingang__karte button { background: var(--tinte); color: #fff; }
.knopf--haupt:hover, .eingang__karte button:hover { background: var(--marke); color: var(--tinte); box-shadow: 0 8px 24px var(--marke-schein); transform: translateY(-1px); }
.knopf--leise { background: transparent; color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie-stark); }
.knopf--leise:hover { box-shadow: inset 0 0 0 1px var(--tinte); background: transparent; color: var(--tinte); transform: none; }
.knopf--klein { padding: 8px 16px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Formulare */
input[type=text], input[type=email], input[type=password], input[type=file], select, textarea {
  font: inherit; width: 100%; max-width: 420px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--linie-stark); background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }
label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
form p { margin-bottom: 16px; }
/* Häkchen (z. B. „Angemeldet bleiben“) neben statt unter der Beschriftung */
form p:has(> input[type=checkbox]) { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
form p:has(> input[type=checkbox]) label { margin: 0; font-weight: 400; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--marke-tief); }
.errorlist { color: var(--rot); padding-left: 18px; font-size: .9rem; }

.meldung { background: var(--marke-hell); border-radius: 14px; padding: 12px 16px; margin-bottom: 20px; }

/* Anmeldeseiten: eine Karte in der Mitte */
.eingang { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--flaeche); }
.eingang__karte { background: #fff; border-radius: var(--rund-karte); box-shadow: var(--schatten); padding: 36px clamp(22px, 5vw, 44px); width: 100%; max-width: 460px; }
.eingang__karte .marke { margin-bottom: 26px; }
.eingang__karte h1 { font-size: 1.6rem; }
.eingang__karte input[type=text], .eingang__karte input[type=email], .eingang__karte input[type=password] { max-width: none; }
.eingang__karte img[alt*="QR"], .eingang__karte svg { max-width: 220px; height: auto; }

/* Chat (Scheibe 4): Nachrichten als Blasen, Eingabe als weiße Leiste, die unten stehen bleibt */
.chat__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.chat { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.chat__nachricht { max-width: 75%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.chat__nachricht--user { align-self: flex-end; background: var(--tinte); color: #fff; border-bottom-right-radius: 6px; }
.chat__nachricht--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--linie); border-bottom-left-radius: 6px; }
.chat__nachricht a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--marke); text-underline-offset: 3px; }
.chat__nachricht--user a { color: #fff; }
.chat__nachricht--wartet { color: var(--leise); animation: wartet 1.4s ease-in-out infinite; }
@keyframes wartet { 50% { opacity: .45; } }
.chat__eingabe {
  position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-karte); padding: 12px; box-shadow: var(--schatten-mittel);
}
.chat__eingabe textarea { flex: 1 1 100%; max-width: none; min-height: 52px; resize: vertical; border-color: transparent; background: var(--flaeche); }
.chat__eingabe textarea:focus { background: #fff; border-color: var(--marke); }
/* Reihenfolge in der Leiste: Feld · „Sprechen“ und „Fragen“ nebeneinander · Hinweise darunter.
   Der Mikrofon-Teil (Tür Sprache) bleibt unverändert, nur seine Teile reihen sich hier ein. */
.chat__eingabe .mikrofon { display: contents; }
.chat__eingabe textarea { order: 1; }
.chat__eingabe .mikrofon__knopf { order: 2; }
.chat__eingabe .knoepfe { order: 3; margin: 0 0 0 auto; }
.chat__eingabe .mikrofon__hinweis { order: 4; flex: 1 1 100%; font-size: .78rem; }
.chat__tipp { order: 5; flex: 1 1 100%; margin: 0; font-size: .78rem; }
@media (pointer: coarse) { .chat__tipp { display: none; } }   /* am Handy gibt es kein Umschalt + Enter */

/* --- Zwischenbreite: Symbol-Leiste enger setzen --- */
@media (max-width: 1150px) {
  .kopf { gap: 12px; }
  .nav__punkt { min-width: 62px; padding: 7px 7px; font-size: .72rem; }
}

/* --- Handy und Tablet: Menü-Knopf statt Leiste; das Menü füllt die Fläche unter dem Kopf --- */
@media (max-width: 1024px) {
  .kopf__abmelden { display: none; }
  .burger { display: flex; }
  .marke img { width: 36px; height: 36px; }
  /* Ohne Unschärfe-Effekt: sonst bliebe das Menü (position: fixed) im Kopf eingesperrt */
  .kopf { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .marke, .burger { position: relative; z-index: 2; }

  .nav {
    display: none; position: fixed; inset: 0; z-index: 1; margin: 0; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; gap: 0; background: #fff;
    padding: calc(76px + env(safe-area-inset-top)) max(var(--rand), env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(var(--rand), env(safe-area-inset-left));
  }
  .menue-schalter:checked ~ .nav { display: flex; }
  body:has(.menue-schalter:checked) { overflow: hidden; }   /* Seite dahinter rollt nicht mit */
  .nav__punkt {
    flex-direction: row; gap: 16px; min-width: 0; padding: 14px 4px; border-radius: 0;
    font-size: 1.2rem; letter-spacing: -.01em; color: var(--tinte); border-bottom: 1px solid var(--linie);
  }
  .nav__punkt:hover { background: transparent; }
  .nav__punkt .symbol { width: 24px; height: 24px; color: var(--leise); }
  .nav__punkt[aria-current="page"] { font-weight: 700; }
  .nav__abmelden { display: block; margin-top: 26px; }

  /* Vorgangsseite: eine Spalte, Vorschau unter den Angaben, Entscheidung bleibt unten am Bildschirm */
  .vorgang--mit-datei { grid-template-columns: minmax(0, 1fr); grid-template-areas: "angaben" "vorschau" "entscheidung"; }
  .vorschau { position: static; }
  .vorschau__rahmen { height: 70vh; min-height: 360px; }
  .entscheidung { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; box-shadow: var(--schatten-mittel); }
  .entscheidung .knopf { flex: 1 1 0; }
  .nav__abmelden .knopf { width: 100%; padding: 15px 22px; font-size: 1rem; }
  main { padding-top: 26px; }
}

/* --- Handy: Listen als Karten, Kacheln zu zweit --- */
@media (max-width: 700px) {
  h1 { font-size: 1.85rem; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kachel { padding: 14px 16px; border-radius: 18px; }
  .kachel b { font-size: 1.7rem; }
  .prozesse { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .prozess { padding: 22px 20px 24px; border-radius: var(--rund-karte); }
  .abschnitt { margin-top: 40px; }

  /* Nur die direkten Zeilen einer Liste werden Karten; eine Tabelle in einer Zelle (z. B. „raster“) bleibt, wie sie ist.
     Die Kopfzeile verschwindet auch ohne <thead> (Zeile aus <th>). */
  .liste > thead, .liste > tbody > tr:has(> th) { display: none; }
  .liste, .liste > tbody, .liste > tbody > tr, .liste > tbody > tr > td { display: block; width: 100%; }
  .liste { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .liste > tbody > tr { background: #fff; border: 1px solid var(--linie); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
  .liste > tbody > tr > td, .liste > tbody > tr > td:first-child, .liste > tbody > tr > td:last-child { border: 0; padding: 2px 0; overflow-wrap: anywhere; }
  .liste > tbody > tr > td.leise { font-size: .85rem; }
  .liste > tbody > tr > td.liste__titel { font-weight: 500; }
  .liste > tbody > tr > td[data-titel] { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px; }
  .liste > tbody > tr > td[data-titel]::before { content: attr(data-titel); color: var(--leise); font-size: .85rem; }
  .liste--klickbar > tbody > tr:hover { background: #fff; }
  .liste--klickbar > tbody > tr:active { background: var(--flaeche); }

  .angaben td { padding: 10px 8px; }
  .angaben td:first-child { padding-left: 16px; }
  .angaben td:last-child { padding-right: 16px; }
  .raster { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .raster td, .raster th { white-space: nowrap; }
  .chat__nachricht { max-width: 88%; }

  .vorschau--pdf .vorschau__rahmen { display: none; }
  .vorschau--pdf .vorschau__oeffnen, .vorschau--datei .vorschau__oeffnen {
    align-self: stretch; justify-content: space-between; background: #fff; border: 1px solid var(--linie);
    border-radius: var(--rund-karte); padding: 16px 18px; font-size: 1rem;
  }
  .vorschau--pdf .vorschau__oeffnen .symbol:first-child, .vorschau--datei .vorschau__oeffnen .symbol:first-child { display: block; width: 24px; height: 24px; }
  .vorschau--pdf .vorschau__oeffnen span, .vorschau--datei .vorschau__oeffnen span { flex: 1; }
}
/* Seiten der Bausteine (z. B. Wochenblick der Planung) */
.wochenwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.wochenwahl label { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--leise); }
.wochenwahl input { width: 10em; max-width: none; }
.wochenwahl select { width: auto; }
.wochenblick__team { margin: 0 0 28px; overflow-x: auto; }
.wochenblick__team td.eng { white-space: nowrap; }
