/* Dünne Schicht über Pico.
   Drei Spalten: links Einstellungen und Status, in der Mitte der Verlauf,
   rechts die Dokumentenübersicht. Nur die Mitte scrollt. */

:root {
  /* Feste Pixel: Pico skaliert die Wurzelschriftgröße mit der Fensterbreite,
     in rem würden die Spalten auf großen Schirmen unnötig breit. */
  --side-left: 250px;
  --side-right: 260px;
  --chat-max: 44rem;

  /* Fläche der Nutzernachrichten: neutral abgesetzt, nicht eingefärbt.
     Das Primärblau ist für den Absendeknopf reserviert - zwei blaue Flächen
     im selben Blickfeld konkurrieren. Als Überlagerung statt fester Farbe,
     damit es in hellem wie dunklem Erscheinungsbild passt.
     Zum Anpassen genügt es, diese zwei Werte zu ändern. */
  --msg-user-bg: rgba(255, 255, 255, 0.09);
  --msg-user-border: rgba(255, 255, 255, 0.14);
}

@media (prefers-color-scheme: light) {
  :root {
    --msg-user-bg: rgba(0, 0, 0, 0.06);
    --msg-user-border: rgba(0, 0, 0, 0.11);
  }
}

/* Pico erlaubt das Umschalten per data-theme - beide Richtungen abdecken. */
[data-theme="light"] {
  --msg-user-bg: rgba(0, 0, 0, 0.06);
  --msg-user-border: rgba(0, 0, 0, 0.11);
}

[data-theme="dark"] {
  --msg-user-bg: rgba(255, 255, 255, 0.09);
  --msg-user-border: rgba(255, 255, 255, 0.14);
}

/* Pico skaliert die Wurzelschriftgröße mit der Fensterbreite (bis 20px).
   Für eine Arbeitsoberfläche mit drei Spalten ist das zu groß - hier fest. */
html { font-size: 15px; }

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  font-size: 0.95rem;
}

.layout {
  display: grid;
  grid-template-columns: var(--side-left) minmax(0, 1fr) var(--side-right);
  height: 100dvh;
}

/* --- Seitenspalten --- */
.side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  background: var(--pico-background-color);
}

.side-left {
  border-right: 1px solid var(--pico-muted-border-color);
  position: relative;
}
.side-right {
  border-left: 1px solid var(--pico-muted-border-color);
  position: relative;
  padding-left: 1rem; /* Platz fuer den Ziehgriff, damit Text nicht darunter liegt */
}

.side-body { display: contents; }

/* --- Linke Spalte einklappen --- */
.side-toggle {
  position: absolute;
  top: 0.6rem;
  right: 0.5rem;
  width: auto;
  margin: 0;
  padding: 0.1rem 0.4rem;
  background: none;
  border: none;
  color: var(--pico-muted-color);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.side-toggle:hover { color: var(--pico-contrast); background: none; }
.side-toggle .chev { display: inline-block; transition: transform 0.15s ease; }

body.links-zu { --side-left: 40px; }
body.links-zu .side-left { padding: 1.25rem 0.25rem; overflow: hidden; }
body.links-zu .side-body { display: none; }
body.links-zu .side-toggle { right: 50%; transform: translateX(50%); }
body.links-zu .side-toggle .chev { transform: rotate(180deg); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --- Rechte Spalte in der Breite ziehen --- */
/* Innerhalb der Spalte, nicht ueberlappend: .side hat overflow-y: auto, damit
   rechnet der Browser auch overflow-x auf auto - alles links ausserhalb der
   Box wuerde abgeschnitten und waere nicht greifbar. */
.resizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  background: transparent;
}
.resizer:hover,
.resizer:focus-visible,
body.zieht .resizer { background: var(--pico-primary); opacity: 0.35; outline: none; }

/* Waehrend des Ziehens nichts markieren - sonst wird der Text blau. */
body.zieht { user-select: none; cursor: col-resize; }

.brand { line-height: 1.3; }
.brand strong { display: block; font-size: 1.05rem; }
.brand small { color: var(--pico-muted-color); font-size: 0.8rem; }

.panel h2,
.panel > summary {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pico-muted-color);
  margin-bottom: 0.75rem;
}

/* Einklappbare Einstellungen */
details.settings { margin-bottom: 0; }
details.settings > summary { cursor: pointer; }
details.settings[open] > summary { margin-bottom: 0.9rem; }

.panel label {
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.panel select {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.75rem;
  --pico-form-element-spacing-vertical: 0.4rem;
}

.hint, .idle {
  display: block;
  color: var(--pico-muted-color);
  font-size: 0.78rem;
  line-height: 1.45;
  margin-bottom: 0;
}

/* --- Quellen (rechte Spalte) --- */
.doc-sum {
  font-size: 0.78rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.75rem;
}

.doc-search {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  padding-bottom: 0.5rem;
}

.doc-search > summary {
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 0;
  word-break: break-word;
}

.doc-meta {
  font-size: 0.72rem;
  color: var(--pico-muted-color);
  margin: 0.4rem 0 0.5rem;
}

.doc-hits {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.doc-hits li {
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.doc-hits a {
  display: block;
  word-break: break-word;
}

.doc-hits .host {
  display: block;
  color: var(--pico-muted-color);
  font-size: 0.7rem;
}

/* Oben: von den Agenten verwendete Quellen */
.verwendet { margin-bottom: 1rem; }
.verwendet h3, .documents h3.alle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pico-muted-color);
  margin: 0 0 0.5rem;
}
.verwendet .zahl {
  font-weight: 400;
  margin-left: 0.3rem;
  padding: 0 0.4rem;
  border-radius: 0.6rem;
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
}
.verwendet ul { list-style: none; margin: 0; padding: 0; }
.verwendet li {
  padding: 0.3rem 0 0.35rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  font-size: 0.78rem;
  line-height: 1.35;
}
/* Titel klappt den Volltext auf, der Pfeil oeffnet die Quelle.
   Pico gibt details/summary Abstaende, Rahmen und einen Chevron - hier weg damit. */
.verwendet details.eintrag { margin: 0; padding: 0; border: 0; }
.verwendet details.eintrag > summary::after { display: none; }
.verwendet details.eintrag[open] > summary { margin-bottom: 0; }
.verwendet details.eintrag > summary {
  padding: 0;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  column-gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  margin: 0;
}
.verwendet details.eintrag > summary::-webkit-details-marker { display: none; }
.verwendet details.eintrag > summary > .titel { grid-column: 2; }
.verwendet details.eintrag > summary > .meta,
.verwendet details.eintrag > summary > .kurz { grid-column: 2 / span 2; }
.verwendet .quelle {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.3rem;
  color: var(--pico-primary);
}
.verwendet .quelle:hover { background: var(--pico-muted-border-color); }
.verwendet .volltext {
  margin: 0.35rem 0 0.2rem 2.4rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--pico-muted-border-color);
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.verwendet .art {
  grid-row: 1 / span 3;
  align-self: start;
  margin-top: 0.15rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  border-radius: 0.3rem;
  padding: 0.1rem 0;
  color: #fff;
}
.verwendet li.art-dokument .art { background: var(--pico-primary); }
.verwendet li.art-literatur .art { background: #8e6ad8; }
.verwendet li.art-web .art { background: #4c9a6a; }
.verwendet li.art-patent .art { background: #c47a1f; }
.verwendet li.art-archiv .art { background: #6b7280; }
.verwendet .titel { font-weight: 600; word-break: break-word; }
.verwendet .meta { font-size: 0.7rem; color: var(--pico-muted-color); word-break: break-word; }
.verwendet .kurz { grid-column: 2; font-size: 0.74rem; word-break: break-word; }
.verwendet .tag {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  border-radius: 0.3rem;
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
  white-space: nowrap;
}
/* Dokument: Titel klappt die gelesenen Abschnitte auf */
.verwendet .abschnitte { list-style: none; margin: 0.35rem 0 0.2rem 2.4rem; padding: 0 0 0 0.6rem; border-left: 2px solid var(--pico-muted-border-color); }
.verwendet .abschnitte li { padding: 0.15rem 0; border: 0; }
.verwendet .abschnitte details.eintrag > summary { grid-template-columns: 1fr; }
.verwendet .abschnitte details.eintrag > summary > .titel,
.verwendet .abschnitte details.eintrag > summary > .meta { grid-column: 1; }
.verwendet .abschnitte .volltext { margin-left: 0; }
.documents h3.alle { margin-top: 0.5rem; }

/* Plattformgruppen unten, eingeklappt */
details.gruppe { margin-bottom: 0.4rem; }
details.gruppe > summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}
details.gruppe > summary .zahl { font-weight: 400; color: var(--pico-muted-color); margin-left: 0.3rem; }
details.gruppe[open] > summary { margin-bottom: 0.5rem; }
details.gruppe > .doc-search { margin-left: 0.4rem; }

/* Verwendete Treffer in den Listen hervorheben */
.doc-hits li.used > a, .doc-hits li.used > details > summary { font-weight: 600; }
.doc-hits li.used > a { display: inline; }
.doc-hits .kurz { display: block; font-size: 0.74rem; margin-top: 0.1rem; word-break: break-word; }
.doc-hits li.used::before { content: "\2713\00a0"; color: var(--pico-primary); font-size: 0.75rem; }

/* Abschnitte eines Dokuments und Auszuege der Treffer, aufklappbar */
.doc-file > summary strong { font-weight: 600; }
.doc-file > summary a { display: inline; text-decoration: underline dotted; }
.abschnitt > summary, .snippet > summary {
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 0;
}
.abschnitt .ref { color: var(--pico-muted-color); margin-right: 0.3rem; }
.abschnitt-text, .snippet p {
  font-size: 0.74rem;
  line-height: 1.45;
  margin: 0.35rem 0 0.5rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--pico-muted-border-color);
  white-space: pre-wrap;
  word-break: break-word;
}
.snippet > summary { font-size: 0.7rem; color: var(--pico-muted-color); }

/* --- Status --- */
.status .what {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.status progress { margin-bottom: 0.35rem; height: 0.4rem; }
.status .round { color: var(--pico-muted-color); font-size: 0.75rem; }

.status .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--pico-primary);
  animation: pulse 1.4s ease-in-out infinite;
  flex: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* --- Mitte --- */
.center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.5rem 0.5rem;
  scroll-behavior: smooth;
}

.chat > *, #composer > * {
  max-width: var(--chat-max);
  margin-left: auto;
  margin-right: auto;
}

.msg {
  display: flex;
  margin: 0 auto 1.15rem;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
}

.msg .bubble {
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  max-width: 88%;
  line-height: 1.55;
  background: transparent;
  border: none;
}

.msg .bubble > :first-child { margin-top: 0; }
.msg .bubble > :last-child { margin-bottom: 0; }
.msg p { margin-bottom: 0.55rem; }

/* Der Assistent spricht ohne Rahmen - wie im Fließtext. */
.msg-assistant .bubble { padding-left: 0; padding-right: 0; }

/* Der Nutzer bekommt eine eigene Fläche, damit sich die eigenen Eingaben beim
   Überfliegen sofort vom Fließtext des Assistenten abheben. Bewusst nicht das
   Primärblau des Absendeknopfes - sonst konkurrieren beide um Aufmerksamkeit. */
.msg-user { justify-content: flex-end; }
.msg-user .bubble {
  background: var(--msg-user-bg);
  border: 1px solid var(--msg-user-border);
  border-radius: 0.9rem 0.9rem 0.2rem 0.9rem;
  max-width: 80%;
}

.msg .example { font-size: 0.9rem; color: var(--pico-muted-color); }

.msg-system .bubble,
.msg-error .bubble { font-size: 0.9rem; color: var(--pico-muted-color); }
.msg-error .bubble { border-color: var(--pico-del-color, #c92a2a); }

/* --- Freigabefeld über dem Eingabefeld --- */
.approval { flex: none; }
.approval:empty { display: none; }

.approval-card {
  width: 100%;
  max-width: var(--chat-max);
  margin: 0 auto 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--pico-muted-border-color);
  border-left: 3px solid #d99100;
  border-radius: 0.7rem;
  background: var(--pico-card-background-color);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.28);
}

.approval-card .head { margin-bottom: 0.35rem; }
.approval-card .lead { font-size: 0.88rem; margin-bottom: 0.5rem; }
.approval-card form { margin-bottom: 0; }
.approval-card .actions { display: flex; gap: 0.5rem; }
.approval-card .actions button { width: auto; margin-bottom: 0; }
.approval-card small {
  display: block;
  margin-top: 0.5rem;
  color: var(--pico-muted-color);
}

.query {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.85rem;
  word-break: break-word;
  margin: 0 0 0.75rem;
}

/* --- Eingeklappter Nachweis im Verlauf (ohne Knöpfe) --- */
.msg-record .bubble { max-width: 100%; padding-left: 0; padding-right: 0; }

.record {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.6rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0;
  font-size: 0.85rem;
  background: var(--pico-card-background-color);
}

.record > summary {
  cursor: pointer;
  color: var(--pico-muted-color);
  margin-bottom: 0;
}

.record[open] > summary { margin-bottom: 0.6rem; }
.record .note { color: var(--pico-muted-color); margin-bottom: 0; font-size: 0.82rem; }

.record .mark {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.4rem;
}
.record .mark.ok { background: #2f9e44; }
.record .mark.no { background: var(--pico-muted-color); }

/* Report */
.msg-report .bubble {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}
.report-section + .report-section { margin-top: 1.25rem; }
.report-section h3 { margin-bottom: 0.35rem; font-size: 1.02rem; }
.report-section table { font-size: 0.88rem; }

/* --- Eingabe --- */
#composer { flex: none; padding: 0.5rem 1.5rem 1.25rem; }

/* Textfeld und Knopf nebeneinander in einem gemeinsamen Rahmen; der Knopf
   rechts und über die volle Höhe.

   Bewusst eine Flex-ZEILE: Firefox behandelt ein textarea in einer Flex-SPALTE
   anders als Chromium (Eigenhöhe aus rows statt aus dem Kasten), dort brach
   das Layout auf. Eine Zeile mit stretch verhält sich in beiden gleich. */
.composer {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  margin-bottom: 0;
  padding: 0.4rem;
  gap: 0.4rem;
  /* Nur Variablen verwenden, die Pico auf :root definiert. Die
     --pico-form-element-* gelten nur im Kontext von Eingabeelementen; auf
     einem <form> loesen sie sich nicht auf, der Rahmen blieb dann unsichtbar. */
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 1rem;
  background: var(--pico-card-background-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.composer:focus-within {
  border-color: var(--pico-primary);
  /* Kein rgb(from ...) - relative Farbsyntax ist zu neu fuer aeltere Firefox. */
  box-shadow: 0 0 0 3px var(--pico-primary-focus, rgba(1, 114, 173, 0.28));
}

/* Pico stylt Eingabefelder ueber eigene Variablen und setzt bei :valid ein
   Haekchen als background-image. Beides hier neutralisieren, statt gegen die
   Spezifitaet anzukaempfen - der aeussere Kasten liefert die Optik. */
.composer textarea {
  --pico-form-element-background-color: transparent;
  --pico-form-element-border-color: transparent;
  --pico-form-element-active-background-color: transparent;
  --pico-form-element-active-border-color: transparent;
  --pico-form-element-focus-color: transparent;
  --pico-box-shadow: none;

  flex: 1 1 auto;
  min-width: 0;          /* damit das Feld in der Zeile schrumpfen darf */
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: none;
  background-color: transparent;
  background-image: none; /* Pico-Haekchen bei :valid */
  box-shadow: none;
  resize: none;
  /* Keine feste Hoehe: die Eigenhoehe aus rows="2" ist der Startwert, app.js
     passt sie an den Inhalt an. Eine feste Hoehe wuerde beim ersten Tippen
     sichtbar springen, weil sie nicht zur Eigenhoehe passt. */
  min-height: 0;
  max-height: 12rem;
  overflow-y: auto;
  line-height: 1.45;
  font-size: 0.95rem;
}

.composer textarea:focus,
.composer textarea:active,
.composer textarea:valid,
.composer textarea:invalid {
  border: none;
  box-shadow: none;
  outline: none;
  background-color: transparent;
  background-image: none;
}

.composer textarea[disabled] { opacity: 0.6; }

.composer button {
  /* stretch statt fester Hoehe: der Knopf ist immer so hoch wie das Feld,
     auch wenn dieses mitwaechst. */
  align-self: stretch;
  flex: none;
  width: auto;
  height: auto;
  margin-bottom: 0;
  padding: 0 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
  border-radius: 0.7rem;
}

/* Hinweis unter dem Kasten, nicht darin - sonst konkurriert er mit dem Knopf. */
.composer-tip {
  max-width: var(--chat-max);
  margin: 0.35rem auto 0;
  font-size: 0.72rem;
  color: var(--pico-muted-color);
}

/* --- Schmalere Fenster --- */
@media (max-width: 980px) {
  .layout { grid-template-columns: var(--side-left) minmax(0, 1fr); }
  .side-right { display: none; }
}

@media (max-width: 720px) {
  body, .layout { height: auto; overflow: auto; }
  .layout { grid-template-columns: 1fr; }
  .side-left { border-right: none; border-bottom: 1px solid var(--pico-muted-border-color); }
  .center { height: auto; }
  .chat { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .status .dot { animation: none; }
  .chat { scroll-behavior: auto; }
}


/* --- Dateianhang: Büroklammer-Label bedient das unsichtbare Dateifeld --- */
.anhang {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.5rem;
  align-self: stretch;
  margin: 0;
  border-radius: 0.7rem;
  color: var(--pico-muted-color);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.anhang:hover { color: var(--pico-primary); background: var(--pico-muted-border-color); }
.anhang svg { width: 1.15rem; height: 1.15rem; }
.anhang:focus-within {
  color: var(--pico-primary);
  box-shadow: 0 0 0 3px var(--pico-primary-focus, rgba(1, 114, 173, 0.28));
}

.anhaenge {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: var(--chat-max);
  margin: 0.4rem auto 0;
}
.anhaenge:empty { display: none; }
.anhang-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.15rem 0.3rem 0.15rem 0.6rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 999px;
  background: var(--pico-card-background-color);
  font-size: 0.72rem;
  line-height: 1.6;
}
.anhang-chip .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}
.anhang-chip .groesse { color: var(--pico-muted-color); }
.anhang-chip button {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pico-muted-color);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.anhang-chip button:hover { background: var(--pico-muted-border-color); color: var(--pico-color); }

/* --- Verlauf früherer Analysen ------------------------------------------ */
.anwesend ul { margin: 0; padding: 0; list-style: none; }
.anwesend li {
  margin: 0 0 0.15rem;
  font-size: 0.85rem;
  color: var(--pico-color);
}
.anwesend li.selbst { color: var(--pico-muted-color); }
.anwesend .punkt {
  display: inline-block;
  width: 0.45rem; height: 0.45rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #2e9e5b;
}
.anwesend li.selbst .punkt { background: var(--pico-muted-color); }

.verlauf ul { margin: 0; padding: 0; list-style: none; }
.verlauf li { margin: 0 0 0.25rem; }
.verlauf .lauf {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.verlauf .lauf:hover:not(:disabled) {
  border-color: var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
}
.verlauf .lauf:disabled { cursor: default; opacity: 0.55; }
.verlauf .titel {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.verlauf .meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--pico-muted-color);
  font-size: 0.68rem;
}
.verlauf .punkt {
  display: inline-block;
  width: 0.45rem; height: 0.45rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: var(--pico-muted-color);
}
.verlauf .lauf-completed .punkt { background: #2e9e5b; }
.verlauf .lauf-failed .punkt,
.verlauf .lauf-interrupted .punkt { background: #c0392b; }
.verlauf .lauf-cancelled .punkt { background: #b8860b; }

/* --- Zwischenstand ohne Bericht --- */
.recherche-kopf { color: var(--pico-muted-color); font-size: 0.85rem; margin-bottom: 0.6rem; }
.recherche { margin: 0.4rem 0; border: 1px solid var(--pico-muted-border-color); border-radius: 0.6rem; padding: 0.3rem 0.7rem; }
.recherche summary { cursor: pointer; font-weight: 600; }
.recherche-antwort { margin-top: 0.4rem; }
.recherche-kritik { font-size: 0.8rem; margin: 0.4rem 0 0.2rem; color: var(--pico-muted-color); }
.recherche-kritik.ok   { border-left: 3px solid #2a9d4b; padding-left: 0.5rem; }
.recherche-kritik.nein { border-left: 3px solid #c0392b; padding-left: 0.5rem; }

/* --- Fortsetzen-Knopf unter dem Zwischenstand --- */
.fortsetzen { margin: 0; }
.fortsetzen button { width: auto; margin-bottom: 0.4rem; }
.fortsetzen small { display: block; color: var(--pico-muted-color); font-size: 0.75rem; line-height: 1.4; }

/* --- Vorbehalt des Bewerters ueber dem Bericht --- */
.vorbehalt {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid #d9a400;
  background: rgba(217, 164, 0, 0.08);
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.88rem;
}
.vorbehalt p { margin: 0.3rem 0; }

/* Admin: online-Punkt und Hinweis auf das einmalig sichtbare Passwort */
.punkt-online {
  display: inline-block;
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #2e9e5b;
}
.neues-passwort { border-left: 3px solid #2e9e5b; }
.neues-passwort pre { user-select: all; }
.feld { margin-bottom: 0.9rem; }
.feld .vorgabe { display: block; opacity: 0.7; }
