/* SEO Text Drafts v4 (Produkttext-Manager) — sv4- prefix. Standalone, teilt nichts mit v3. */

.sv4 {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px 64px;
  font-family: var(--font-base);
  color: #1f2937;
}

/* ── Topline: Kontext links, Division-Umschalter rechts ── */
.sv4__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sv4__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

/* Kontextzeile links: Titel plus Saisonauswahl (immer genau eine, Plan §5.2). */
.sv4__context { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Markenumschalter rechts in der Topline. Segmentiert statt einzelne Pillen: die drei
   Marken schliessen sich aus, und ein zusammenhaengender Block zeigt das deutlicher als
   drei freistehende Knoepfe. */
.sv4__divisions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
}

.sv4-brand {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.sv4-brand:hover { color: #374151; background: #f1f5f9; }

.sv4-brand--active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.sv4-brand--active:hover { background: #ffffff; }

/* ── Kopfzeile ── */
.sv4__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.sv4__greeting {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #111827;
  margin: 0 0 6px;
}

.sv4__sub {
  margin: 0;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.sv4-btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.sv4-btn--primary { background: #111827; color: #fff; }
.sv4-btn--primary:hover { background: #1f2937; }

.sv4-btn--ghost { background: #fff; border-color: #e5e7eb; color: #374151; }
.sv4-btn--ghost:hover { border-color: #cbd5e1; }

/* ── KPI-Kacheln ── */
.sv4-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .sv4-kpis { grid-template-columns: minmax(0, 1fr); }
}

.sv4-kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
}

.sv4-kpi__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
}

.sv4-kpi__value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

.sv4-kpi__hint {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
}

.sv4-kpi--offen .sv4-kpi__hint       { color: #b45309; }
.sv4-kpi--uebertragen .sv4-kpi__hint { color: #15803d; }

/* ── Grundraster: Arbeitsvorrat + Seitenspalte ── */
.sv4__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1080px) {
  .sv4__grid { grid-template-columns: minmax(0, 1fr); }
}

.sv4__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sv4-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.sv4-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.sv4-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.sv4-card__meta {
  font-size: 11px;
  color: #9ca3af;
}

.sv4-card__body { padding: 0 18px 18px; }

/* ── Filter-Pills ── */
.sv4-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 18px 12px;
}

/* Saison-, Divisions- und Kategorieauswahl in derselben Zeile wie die Statusfilter.
   Fester Abstand statt `margin-left: auto`: ganz rechts angeschlagen brach die Gruppe mit drei
   Auswahlfeldern in die zweite Zeile um. */
.sv4-season-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
}

.sv4-division-picker,
.sv4-category-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sv4-season-picker__label,
.sv4-division-picker__label,
.sv4-category-picker__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.sv4-season-picker__select,
.sv4-division-picker__select,
.sv4-category-picker__select {
  padding: 4px 26px 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
                    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.sv4-season-picker__select:hover,
.sv4-division-picker__select:hover,
.sv4-category-picker__select:hover { border-color: #cbd5e1; }
.sv4-season-picker__select:focus,
.sv4-division-picker__select:focus,
.sv4-category-picker__select:focus { outline: none; border-color: var(--bam-slate); }

.sv4-filter {
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: #6b7280;
  cursor: pointer;
}

.sv4-filter:hover { background: #f3f4f6; color: #374151; }

.sv4-filter--active {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #111827;
  font-weight: 600;
}

.sv4-filter__count {
  margin-left: 5px;
  font-size: 11px;
  color: #9ca3af;
}

/* ── Arbeitsvorrat-Tabelle ── */
.sv4-queue { width: 100%; border-collapse: collapse; }

.sv4-queue th {
  padding: 8px 18px;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  white-space: nowrap;
}

.sv4-queue td {
  padding: 12px 18px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  vertical-align: middle;
}

/* Ganze Zeile ist klickbar (wie in v3) — der Link in der letzten Spalte bleibt zusätzlich. */
.sv4-queue tbody tr { position: relative; cursor: pointer; }
.sv4-queue tbody tr:hover { background: #fafbfc; }

.sv4-queue__product { min-width: 200px; }

a.sv4-queue__name {
  display: block;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

a.sv4-queue__name:hover { text-decoration: underline; }

.sv4-queue__article {
  font-size: 11px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

/* Divisionskürzel in der Tabellenzeile — Vollname im Tooltip. Steht bewusst bei den
   Tabellenregeln, damit Aufräumarbeiten im Kopfbereich sie nicht wieder mitnehmen. */
.sv4-division-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sv4-queue__category { color: #6b7280; white-space: nowrap; }
.sv4-queue__season { color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Sections, die für dieses Produkt schon im PIM stehen */
.sv4-sections { display: inline-flex; gap: 4px; }

.sv4-section-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sv4-section-chip--set { background: #dcfce7; color: #15803d; }

/* ── Statusfarben ── */
.sv4-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.sv4-status--offen       { background: #f1f5f9; color: #475569; }
.sv4-status--in_arbeit   { background: #fef3c7; color: #92400e; }
.sv4-status--uebertragen { background: #dcfce7; color: #166534; }

.sv4-queue__empty {
  padding: 28px 18px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* ── Deadlines-Card ── */
.sv4-progress + .sv4-progress { margin-top: 14px; }

.sv4-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.sv4-progress__name { font-size: 13px; font-weight: 600; color: #374151; }
.sv4-progress__due  { font-size: 11.5px; font-weight: 600; color: #6b7280; font-variant-numeric: tabular-nums; }

.sv4-progress--over .sv4-progress__due { color: #b91c1c; }
.sv4-progress--warn .sv4-progress__due { color: #b45309; }
.sv4-progress--ok   .sv4-progress__due { color: #15803d; }
.sv4-progress--muted .sv4-progress__name,
.sv4-progress--muted .sv4-progress__due { color: #cbd5e1; }

/* Natives <progress>: die Länge kommt aus value/max im Markup, das Aussehen komplett von hier.
   Farbe je Zustand über --sv4-bar, damit die Pseudo-Elemente nur einmal beschrieben werden. */
.sv4-progress__bar {
  --sv4-bar: #94a3b8;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  appearance: none;
  -webkit-appearance: none;
}

.sv4-progress__bar::-webkit-progress-bar { background: #f1f5f9; border-radius: 999px; }
.sv4-progress__bar::-webkit-progress-value { background: var(--sv4-bar); border-radius: 999px; }
.sv4-progress__bar::-moz-progress-bar { background: var(--sv4-bar); border-radius: 999px; }

.sv4-progress--over  .sv4-progress__bar { --sv4-bar: #ef4444; }
.sv4-progress--warn  .sv4-progress__bar { --sv4-bar: #f59e0b; }
.sv4-progress--ok    .sv4-progress__bar { --sv4-bar: #22c55e; }
.sv4-progress--muted .sv4-progress__bar { --sv4-bar: #e5e7eb; }

.sv4-progress__note { margin-top: 4px; font-size: 11px; color: #9ca3af; }

/* ── PIM-Abgleich (dunkle Card) ── */
.sv4-card--dark {
  background: #111827;
  border-color: #111827;
  color: #e5e7eb;
}

.sv4-card--dark .sv4-card__title { color: #fff; }
.sv4-card--dark .sv4-card__meta  { color: #9ca3af; }

.sv4-syncrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.sv4-syncrow:first-child { border-top: 0; }
.sv4-syncrow__label { color: #9ca3af; }
.sv4-syncrow__value { font-weight: 600; color: #fff; white-space: nowrap; }

/* ── Regelwerk-Card ── */
.sv4-rules { margin: 0; padding: 0; list-style: none; }

.sv4-rules li {
  padding: 6px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4b5563;
  border-top: 1px solid #f3f4f6;
}

.sv4-rules li:first-child { border-top: 0; }

.sv4-card__footer { padding: 0 18px 18px; }

.sv4-card__footer .sv4-btn { display: block; text-align: center; }

/* ── Hinweisleiste der Vorschau ── */
.sv4__notice {
  margin: 22px 0 0;
  padding: 10px 14px;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
}

/* ══ Einzeltext-Ansicht (Editor) ═══════════════════════════════════════════════════════ */

.sv4-editor__back {
  display: inline-block;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12.5px;
  text-decoration: none;
}

.sv4-editor__back:hover { color: #111827; }

.sv4-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sv4-editor__title {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: #111827;
}

.sv4-editor__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #9ca3af;
}

.sv4-editor__article { font-variant-numeric: tabular-nums; }
.sv4-editor__sep { color: #d1d5db; }

.sv4-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Die Sammelknöpfe sitzen als eigene Formulare in der Kopfzeile — ohne eigenen Abstand,
   der Flex-Gap der Actions trägt sie. */
.sv4-editor__bulk { margin: 0; }

/* Der eine Judge-Schalter der Seite, links neben den Sammelknöpfen. */
.sv4-editor__judge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.sv4-editor__judge input { margin: 0; cursor: pointer; }

.sv4-editor__saved { font-size: 12px; color: #9ca3af; white-space: nowrap; }

/* ── Das Dreispalten-Raster ── */
.sv4-editor__cols {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 328px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1240px) {
  .sv4-editor__cols { grid-template-columns: 240px minmax(0, 1fr); }
  .sv4-editor__right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
}

@media (max-width: 900px) {
  .sv4-editor__cols { grid-template-columns: minmax(0, 1fr); }
  .sv4-editor__right { grid-template-columns: minmax(0, 1fr); }
}

.sv4-editor__left,
.sv4-editor__center,
.sv4-editor__right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── Linke Spalte: Bild, Stammdaten, Vorgänger ── */
/* ── Briefing: was ist neu an diesem Produkt ──
   Steht an der Stelle des früheren Bildplatzhalters, oben in der linken Spalte. */
/* Das Briefing ist derselbe Baustein wie die Textfelder rechts und trägt deshalb
   .sv4-block__* — Zähler, Rahmen, Fokus, Platzhalter und Zustände sind dieselben. Eigen
   bleibt nur, was die schmale linke Spalte verlangt; das steht als `--compact` unten bei
   den Blockregeln, weil ein Modifier gleicher Spezifität nur nach dem Original gewinnt. */

.sv4-specs { margin: 0; }

.sv4-specs__label {
  float: left;
  clear: left;
  padding: 5px 0;
  font-size: 12px;
  color: #9ca3af;
}

.sv4-specs__value {
  margin: 0;
  padding: 5px 0;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}

.sv4-predecessor__name {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.sv4-predecessor__note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #9ca3af;
}

/* ── Mittlere Spalte: die Textbausteine ── */
.sv4-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px 12px;
}

.sv4-block__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.sv4-block__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #374151;
}

/* Zielfeld im PIM. Monospace, weil es ein Feldpfad ist und kein Fliesstext — so ist auf
   einen Blick klar, dass description.en woertlich so im PIM heisst. */
.sv4-block__target {
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 10.5px;
  white-space: nowrap;
}

.sv4-block__target--missing {
  background: transparent;
  border: 1px dashed #e5e7eb;
  color: #9ca3af;
  font-family: inherit;
}

.sv4-block__count {
  margin-left: auto;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: #9ca3af;
}

.sv4-block__count--over { color: #b91c1c; font-weight: 700; }

.sv4-block__max { margin-left: 3px; }

.sv4-block__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  color: #1f2937;
  resize: vertical;
}

.sv4-block__input:focus {
  outline: none;
  border-color: var(--bam-slate);
  box-shadow: 0 0 0 3px rgba(70, 90, 100, .12);
}

.sv4-block__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.sv4-block__buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.sv4-chip {
  padding: 5px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
}

.sv4-chip:hover { border-color: #cbd5e1; background: #f9fafb; color: #111827; }

/* Speichern ist die Aktion, die den Zustand ändert — leicht hervorgehoben. */
.sv4-chip--save { border-color: #cbd5e1; color: #111827; font-weight: 600; }
.sv4-chip--save:hover { border-color: var(--bam-slate); background: #f3f4f6; }

.sv4-block__note { font-size: 11px; color: #9ca3af; white-space: nowrap; }

/* Gespeicherter Entwurf: tritt zurück wie der Hinweis, ist aber eine Zustandsaussage. */
.sv4-block__saved {
  font-size: 11px;
  color: #15803d;
  white-space: nowrap;
}

/* Regel-Check-Badge am AI-Entwurf: gruen = letzte validate_text-Runde PASS, dezent
   warnfarben = FAIL oder nie validiert ("offen"). Nur sichtbar, wenn der Entwurf ein
   Verdict-Metadatum traegt — alte Entwuerfe haben keins. */
.sv4-block__verdict {
  font-size: 11px;
  white-space: nowrap;
  padding: 1px 7px;
  border-radius: 9px;
  border: 1px solid;
}

.sv4-block__verdict--pass { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.sv4-block__verdict--open { color: #b45309; border-color: #fde68a; background: #fffbeb; }
/* Schnellmodus: mechanisch sauber, Judge steht aus — neutral blau, kein Alarm. */
.sv4-block__verdict--mech { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }

.sv4-block__error {
  font-size: 11px;
  color: #b91c1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Laufender Modellaufruf. Nur gedaempft, nicht ausgeblendet: der bisherige Text bleibt
   lesbar, solange der neue entsteht. */
.sv4-block--busy { border-color: #d1d5db; }
.sv4-block--busy .sv4-block__input { background: #fafafa; color: #6b7280; }

/* Kompakte Fassung für die linke Spalte (das Briefing). Muss NACH .sv4-block__input und
   .sv4-block__foot stehen: gleiche Spezifität, es entscheidet die Reihenfolge. */
.sv4-block__input--compact {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
}

.sv4-block__foot--compact { gap: 10px; }

/* In der schmalen Spalte passt der Hinweis nicht in eine Zeile — hier darf er umbrechen. */
.sv4-block__foot--compact .sv4-block__note,
.sv4-block__foot--compact .sv4-block__saved,
.sv4-block__foot--compact .sv4-block__error {
  margin-left: auto;
  white-space: normal;
  text-align: right;
}

/* Laufende Punkte im „Formuliert"-Knopf. Ein echter Aufruf dauert eine bis anderthalb
   Minuten — ohne Bewegung sieht der Knopf aus, als hinge er.
   Animiert wird nur die Deckkraft, damit die Knopfbreite konstant bleibt und nichts zappelt. */
.sv4-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 3px;
}

.sv4-dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  animation: sv4-dots 1.2s infinite ease-in-out;
}

.sv4-dots span:nth-child(2) { animation-delay: .18s; }
.sv4-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes sv4-dots {
  0%, 60%, 100% { opacity: .25; }
  30%           { opacity: 1; }
}

/* Wer Bewegung abbestellt hat, bekommt sie nicht — die Punkte bleiben trotzdem sichtbar. */
@media (prefers-reduced-motion: reduce) {
  .sv4-dots span { animation: none; opacity: .6; }
}

.sv4-chip[disabled] {
  color: #9ca3af;
  cursor: default;
  background: #f9fafb;
}

.sv4-chip[disabled]:hover { border-color: #e5e7eb; background: #f9fafb; color: #9ca3af; }

/* Filterleiste je Divisionsstufe. Masse und Typografie wie die Filterleiste der
   Ticket-Analyse (.ta-filter), damit beide Werkzeuge sich gleich anfühlen. */
.sv4-stage-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sv4-stage-filters__field label {
  display: block;
  margin-bottom: 0.25rem;
  color: #6b7280;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sv4-stage-filters__select {
  max-width: 16rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  color: #374151;
}

.sv4-stage-filters__select:focus {
  outline: none;
  border-color: var(--bam-slate);
  box-shadow: 0 0 0 3px rgba(70, 90, 100, .12);
}

/* Gesetzter Filter hebt sich ab — bei sieben Stufen mit eigenen Filtern muss auf einen Blick
   erkennbar sein, welche Liste gerade eingeschränkt ist. */
.sv4-stage-filters__select--on {
  border-color: var(--bam-slate);
  background: #f1f5f9;
  color: #111827;
  font-weight: 600;
}

.sv4-stage-filters__reset {
  padding-bottom: 0.45rem;
  color: #6b7280;
  font-size: 0.8125rem;
}

/* Gefilterte Stufe: der Zähler sagt „3 von 21" und soll dabei nicht übersehen werden. */
.sv4-stage-count--on { color: var(--bam-slate); font-weight: 600; }

/* ── Prompt Rules: Gruppen der Übersicht ──
   Eine Marke je Gruppe, darin die Divisionen als pr-stage. Rahmen, Tabellen und Badges kommen
   aus prompt_rules.css, hier steht nur der Gruppenkopf. Bewusst formgleich mit
   .sv3-flow-group: wer beide Seiten benutzt, soll sich nicht umstellen müssen. */
/* Jeder Baustein als eigene Karte — die Blöcke heben sich klar voneinander ab. */
.sv4-group {
  max-width: 100%;
  margin: 0 auto 1.6rem;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  padding: 1.1rem 1.25rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Das harte Tor bekommt einen Ampel-Akzent, damit es als Kontrollstufe auffällt. */
.sv4-group--gate { border-left: 3px solid #f59e0b; }

/* Trenner vor den langen Feldregeln-Listen — setzt sie sichtbar vom oberen Teil ab. */
.sv4-fieldrules-lead {
  max-width: 100%;
  margin: 2.6rem auto 1.1rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e2e8f0;
}

.sv4-group__header {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.sv4-group__title { font-size: 1.15rem; font-weight: 800; color: #0f172a; }

.sv4-group__desc {
  max-width: 860px;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.85rem;
}

/* ── Rechte Spalte: Regel-Check ── */
.sv4-checks { margin: 0; padding: 0; list-style: none; }

.sv4-check {
  display: flex;
  gap: 9px;
  padding: 6px 0;
}

.sv4-check__mark {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 4px;
  background: #22c55e;
  position: relative;
}

.sv4-check__mark::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.sv4-check--open .sv4-check__mark { background: #f59e0b; }
.sv4-check--open .sv4-check__mark::after { content: "!"; }

.sv4-check__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sv4-check__label { font-size: 12.5px; font-weight: 600; color: #374151; }
.sv4-check__detail { font-size: 11px; color: #9ca3af; }

/* ── Rechte Spalte: Brand-Voice-Score ── */
.sv4-score { display: flex; align-items: baseline; gap: 7px; margin-bottom: 8px; }
.sv4-score__value { font-size: 34px; font-weight: 700; line-height: 1; color: #15803d; }
.sv4-score__scale { font-size: 12px; color: #9ca3af; }

.sv4-score__bar {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  appearance: none;
  -webkit-appearance: none;
}

.sv4-score__bar::-webkit-progress-bar { background: #f1f5f9; border-radius: 999px; }
.sv4-score__bar::-webkit-progress-value { background: #22c55e; border-radius: 999px; }
.sv4-score__bar::-moz-progress-bar { background: #22c55e; border-radius: 999px; }

.sv4-voice-notes { margin: 12px 0 0; padding: 0; list-style: none; }

.sv4-voice-note {
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.sv4-voice-note--warn { color: #c2410c; }

/* ── Rechte Spalte: PIM-Zielfelder ── */
.sv4-target {
  padding: 8px 0;
  border-top: 1px solid #f3f4f6;
}

.sv4-target:first-child { border-top: 0; padding-top: 0; }

/* Section-Bezeichnung über dem Zielfeld — sonst ist nicht erkennbar, welcher Text fehlt. */
.sv4-target__section {
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
  margin-bottom: 3px;
}

.sv4-target__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sv4-target__name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #4b5563;
}

/* Section ohne Zielfeld: kein Feldname zum Anzeigen, deshalb gedämpft und kursiv. */
.sv4-target__name--none { color: #cbd5e1; font-style: italic; }

.sv4-target__state { font-size: 11.5px; font-weight: 700; color: #15803d; white-space: nowrap; }

/* Regel-Check: offener Punkt statt Fehler — gelbe Markierung, kein Rot. */
.sv4-check--open .sv4-check__mark { background: #cbd5e1; }
.sv4-check--open .sv4-check__mark::after { content: "–"; }

/* Zielfeld-Zustände */
.sv4-target__state--ready   { color: #15803d; }
.sv4-target__state--open    { color: #9ca3af; }
.sv4-target__state--missing { color: #b45309; }
.sv4-target__empty        { margin: 0; font-size: 12px; color: #9ca3af; }
.sv4-target__name         { overflow-wrap: anywhere; }

/* Leeres Textfeld: Platzhalter dezent */
.sv4-block__input::placeholder { color: #cbd5e1; }

.sv4-empty__text { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: #6b7280; }
.sv4-empty__text code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #374151; }

/* ── Aktivitätslog: die Vorführung des agentischen Laufs ─────────────────────── */
/* Eingeklappt, bis der erste Broadcast kommt; der Stimulus-Controller setzt --on. */
.sv4-activity {
  display: none;
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: hidden;
}
.sv4-activity--on { display: block; }

.sv4-activity__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #1e293b;
}
.sv4-activity__title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; }
.sv4-activity__timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #94a3b8;
}
.sv4-activity__fulllog {
  margin-left: auto;
  font-size: 12px;
  color: #7dd3fc;
  text-decoration: none;
}
.sv4-activity__fulllog:hover { color: #bae6fd; text-decoration: underline; }

/* Fortschrittsbalken: vier Schritte, der aktive pulst, erledigte sind grün. */
.sv4-activity__steps {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 10px 14px;
  list-style: none;
  border-bottom: 1px solid #1e293b;
}
.sv4-activity__step {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: #64748b;
  background: #1e293b;
  border-radius: 6px;
}
.sv4-activity__step--active {
  color: #0f172a;
  background: #7dd3fc;
  animation: sv4-activity-pulse 1.2s ease-in-out infinite;
}
.sv4-activity__step--done { color: #052e16; background: #4ade80; }

@keyframes sv4-activity-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Die Zeilen: Meilensteine fett hell, Denk-Schnipsel gedimmt kursiv. */
.sv4-activity__lines {
  margin: 0;
  padding: 8px 14px 12px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.sv4-activity__line {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.sv4-activity__icon { flex: none; width: 16px; text-align: center; }
.sv4-activity__line--thought { color: #64748b; font-style: italic; }
.sv4-activity__line--thought .sv4-activity__text { overflow-wrap: anywhere; }
.sv4-activity__line--event .sv4-activity__text { color: #e2e8f0; }
