/* Briefing Studio: seiteneigenes Layout, nur Tokens. Lädt nach agentical-app.css.
   Bauweise wie die Komponenten des Standards: Fläche --bg, 1 px --line, eckig, aktiv mit Türkis. */

/* Anmeldung: Formular, Rückmeldung und Hinweis in einer schmalen Spalte mit gleichem Abstand. */
.anmelden { max-width: 480px; }
.anmelden > * { margin-top: 0; margin-bottom: 0; }
.anmelden > * + * { margin-top: 16px; }
.anmelden .row { margin-top: 16px; }

/* Kopfzeile einer Seite: Titel links, Hauptknopf rechts. */
.kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.kopfzeile > div { min-width: 0; flex: 1 1 24rem; }
.kopfzeile .lead { margin-bottom: 0; }
.kopfzeile .btn { margin-bottom: 6px; }

/* Sprachumschalter in der Kopfzeile. */
.sprache { min-width: 44px; padding: 0 10px; }

/* Formular Vorhaben anlegen. */
.card.neu { max-width: 860px; }
.card.neu fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.card.neu legend { padding: 0; margin-bottom: 8px; }

/* Reiter für Teilbriefings eines Vorhabens. */
.briefing-reiter { margin: 20px 0 0; }

/* Prozessleiste: sieben Meilensteine als Zellen wie .steps, mit Zustand als Text und Zahlen. */
.prozess { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.prozess__schritt > a, .prozess__schritt > div { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px; background: var(--bg); color: var(--dim); text-decoration: none; min-width: 0; transition: background .25s ease; }
.prozess__schritt > a:hover { background: var(--card); }
.prozess__kopf { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prozess__n { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 12px; font-weight: 700; }
.prozess__name { color: var(--ink); font-weight: 700; font-size: 14px; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.prozess__zustand { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.prozess__zustand.ok { color: var(--lime-text); }
.prozess__zustand.warn { color: var(--warn); font-weight: 600; }
.prozess__zahl { font-size: 12.5px; color: var(--dim); }
.prozess__hinweis { font-size: 12.5px; color: var(--warn); }
.prozess__schritt.erreicht .prozess__n { background: var(--lime); }
.prozess__schritt.in_arbeit > a, .prozess__schritt.in_arbeit > div { box-shadow: inset 0 -2px 0 var(--tq); }
.prozess__schritt.in_arbeit .prozess__n { background: var(--tq); }
.prozess__schritt.wieder_offen > a, .prozess__schritt.wieder_offen > div { box-shadow: inset 0 -2px 0 var(--warn); }
.prozess__schritt.wieder_offen .prozess__n { background: var(--warn-bg); color: var(--warn); }

/* Dreiteilung: Arbeitsfläche links, Kontext rechts; schmal untereinander (Handlungsbedarf, Inhalt, Kontext). */
.arbeitsflaeche { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 28px; align-items: start; }
.arbeitsflaeche__haupt { min-width: 0; }
.arbeitsflaeche__kontext { min-width: 0; position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.arbeitsflaeche__haupt > section > .sec { margin-top: 44px; }
.arbeitsflaeche__haupt > section:first-of-type > .sec { margin-top: 32px; }

/* Abschnitte des Briefings. */
.abschnitte { display: flex; flex-direction: column; gap: 12px; }
.abschnitt { padding: 18px 20px; }
.abschnitt__kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.abschnitt__kopf h3 { margin: 0; font-size: 17px; }
.abschnitt__hilfe { margin: 4px 0 10px; }
.abschnitt__editor textarea { min-height: 9rem; margin-bottom: 10px; }
.abschnitt__editor .notice { margin-bottom: 12px; }
.text-erhalten { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Leistungstabelle. */
.leistungen { margin-top: 8px; }
.leistungen__kopf { margin-bottom: 10px; }
.leistungen__kopf h3 { margin: 0; font-size: 17px; }
.leistungen td.aktionen { white-space: nowrap; text-align: right; }
.leistungen ul.list { margin: 0; padding-left: 18px; }

/* Entscheidungskarte (Callout, höchstens einer je Ansicht). */
.entscheidungskarte { margin-top: 24px; }
.entscheidungskarte h3 { margin: 6px 0 10px; }
.entscheidungskarte fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.entscheidungskarte__aktionen { margin-top: 16px; }
.entscheidungskarte .field { margin-top: 14px; }
.choice__eingabe { display: block; width: 100%; margin-top: 8px; }

/* Kontextbereich. */
.kontext__idee h3 { font-size: 15px; margin-bottom: 6px; }
.kontext__inhalt { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.entscheidungen, .verlauf { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.entscheidungen > li, .verlauf > li { padding: 12px 14px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.entscheidungen > li + li, .verlauf > li + li { border-top: 1px solid var(--line); }
.entscheidung__frage { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.verlauf__eintrag.aktuell { background: var(--card); box-shadow: inset 2px 0 0 var(--tq); }
.verlauf .row { gap: 8px; }

/* Versionsvergleich. */
.vergleich__wahl { max-width: 320px; }
.diff { display: flex; flex-direction: column; gap: 12px; }
.diff h3 { margin: 0; font-size: 17px; }
.diff__abschnitt header { margin-bottom: 10px; }
.diff__spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.diff__alt { padding: 10px 12px; background: var(--red-bg); border-left: 2px solid var(--red-line); }
.diff__neu { padding: 10px 12px; background: var(--lime-bg); border-left: 2px solid var(--lime-line); }

@media (max-width: 1180px) {
  .prozess { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .arbeitsflaeche { grid-template-columns: minmax(0, 1fr); }
  .arbeitsflaeche__kontext { position: static; }
}
@media (max-width: 640px) {
  .prozess { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff__spalten { grid-template-columns: minmax(0, 1fr); }
  .kopfzeile .btn { width: 100%; }
}
