/* systemmap · newsstand.css
 * ════════════════════════════════════════════════════════════════════
 * Der Newsstand: der Tresen, an dem etwas hinausgeht, und das Archiv,
 * in dem alles liegen bleibt.
 *
 * DIESE DATEI HAT briefings.css ABGELOEST und deren Regeln vollstaendig
 * uebernommen. Die `.bf__`-Namen sind geblieben -- sie stehen im
 * Archiv, im Leseplatz und im Anschreiben, und sie umzubenennen haette
 * nichts verbessert und drei Dateien angefasst. Neu ist allein der
 * Tresen mit `.ns__`.
 *
 * ES DARF KEIN ZWEITES STILBLATT FUER DIESELBEN KLASSEN GEBEN. Genau
 * daran hat sich das Haus schon einmal verhoben: rahmen.css und
 * dashboard.css sind Zwillinge, und jede Regel muss seither zweimal
 * geaendert werden. Deshalb ist briefings.css geloescht und nicht
 * bloss ungenutzt liegen geblieben.
 *
 * ── DIE NUMMERN AM TRESEN SIND KEINE ZIERDE ─────────────────────────
 * Vier Schritte, und sie sind wirklich eine Reihenfolge: ohne Dokument
 * keine Gruppe, ohne Gruppe keine Empfaenger, ohne Empfaenger kein
 * Versand. Wo eine Nummer nichts ordnet, steht auch keine.
 *
 * TERRA MARKIERT WIE UEBERALL IM HAUS GENAU EINE SACHE: etwas, das
 * noch nicht beim Kunden ist. Der Entwurf traegt es, der versaeumte
 * Versand traegt es. Gruen ist veroeffentlicht. Mehr Farben gibt es
 * nicht, und eine sechste Bedeutung kommt nicht dazu.
 *
 * Radien nach Hausregel: Belege 2px, Bedienelemente 8px, Karten 18px.
 */

[hidden] { display: none !important; }

.bf__gruppen { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── Die Karten ───────────────────────────────────────────────────── */
.bf__gitter {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}

.bf__karte {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); overflow: hidden;
  display: flex; flex-direction: column;
}
/* Ein Entwurf ist gestrichelt: dieselbe Form, die im Ausfuhrdesk
   "nicht aus der Quelle" heisst -- hier "noch nicht beim Kunden". */
.bf__karte--entwurf { border-style: dashed; border-color: var(--terra); }

.bf__oeffnen {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px;
  width: 100%; text-align: left; align-items: start;
  padding: 16px 18px; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit;
}
.bf__oeffnen:hover { background: var(--hover); }
.bf__oeffnen:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

/* Das Kuerzel steht fuer die Datei, nicht fuer den Inhalt: gruen, wenn
   sie sich hier lesen laesst, still, wenn nicht. Das ist eine ehrliche
   Auskunft vor dem Klick. */
.bf__typ {
  display: grid; place-items: center;
  width: 46px; height: 54px; border-radius: 2px;
  background: var(--green); color: #FFFFFF;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.bf__typ--fremd {
  background: var(--panel); color: var(--dim);
  border: 1px dashed var(--line);
}

.bf__karte__haupt { min-width: 0; }
.bf__karte__kopf {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 5px;
}
.bf__datum {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.bf__fuer {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px; padding: 2px 6px;
  background: var(--hover); color: var(--dim);
}
.bf__byte { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: auto; }

.bf__titel {
  display: block;
  font-family: var(--serif, Merriweather, Georgia, serif);
  font-size: 15.5px; font-weight: 700; line-height: 1.35;
}
.bf__kurz {
  display: block; margin-top: 5px;
  font-size: 13px; line-height: 1.5; color: var(--dim);
}

.bf__zustaende { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.bf__zustand {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px; padding: 2px 6px;
  color: var(--dim);
}
.bf__zustand--entwurf { color: var(--terra); border-color: var(--terra); border-style: dashed; }
.bf__zustand--raus { color: var(--sttext-green, #2E6B32); border-color: #C3D6C0; }
.bf__zustand--warn { color: var(--terra); border-color: var(--terra); }
.bf__zustand--weg { color: var(--dim); border-style: dashed; }

/* Die Gattung steht auf der Karte, weil ein Monitoring etwas anderes
   ist als ein Briefing -- und weil man es dem Dateinamen nicht ansieht. */
.bf__gattung {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px; padding: 2px 6px;
  background: var(--green); color: #FFFFFF;
}
.bf__gattung--monitoring { background: var(--panel); color: var(--green); border: 1px solid var(--green); }

.bf__karte__tat {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 0 18px 16px; margin-top: -2px;
}
.bf__karte__tat .btn-primary, .bf__karte__tat .btn-quiet { font-size: 10.5px; }

.bf__sag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}

/* ── Der Leseplatz ────────────────────────────────────────────────── */
.bf__rahmen {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--hover);
}
.bf__rahmen iframe {
  display: block; width: 100%; height: 78vh; min-height: 420px; border: 0;
}
.bf__unten {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 12px 0 0;
}
.bf__hinweis { font-size: 12.5px; color: var(--dim); }

/* Eine Datei, die sich hier nicht lesen laesst, bekommt eine ehrliche
   Auskunft und keinen leeren Rahmen. */
.bf__kein {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  border: 1px dashed var(--terra); border-radius: 8px; padding: 20px;
}
.bf__kein b { font-size: 15px; }
.bf__kein span { font-size: 13.5px; line-height: 1.6; color: var(--dim); max-width: 62ch; }

/* ── Felder, gemeinsam fuer Tresen und Anschreiben ────────────────── */
.bf__row { display: flex; gap: 12px; flex-wrap: wrap; }
.bf__row .bf__field { flex: 1 1 220px; }
.bf__field { display: flex; flex-direction: column; gap: 4px; }
.bf__field .meta { font-size: 11px; }
.bf__hint { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.55; max-width: 72ch; }
.bf__tat { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* .input steht in keiner Hausvorlage -- die Regel gehoert nach
   werter-controls.css, sobald diese Datei zu einer Lieferung gehoert.
   Bis dahin hier, mit denselben Werten wie .select. */
.ns__schritt .input, .bf__brief .input {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%;
}
.ns__schritt textarea.input, .bf__brief textarea.input { resize: vertical; line-height: 1.55; }

/* ── Das Anschreiben ──────────────────────────────────────────────── */
.bf__brief {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 12px; max-width: 760px;
}
.bf__brief__kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bf__brief__name {
  font-family: var(--serif, Merriweather, Georgia, serif);
  font-size: 16px; font-weight: 700; margin: 0;
}
.bf__brief__slug { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.bf__brief__text { font-family: var(--mono); font-size: 12.5px; }

.bf__leer { color: var(--dim); font-size: 13.5px; margin: 0; }

.bf__melde { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; }
.bf__melde:empty { display: none; }
.bf__melde--gut {
  background: #E9F0E8; color: var(--sttext-green, #2E6B32);
  border-radius: 2px; padding: 8px 10px;
}
.bf__melde--schlecht {
  background: var(--st-red, #F6E6E4); color: var(--sttext-red, #9B2C22);
  border-radius: 2px; padding: 8px 10px;
}

/* ════════════════════════════════════════════════════════════════════
   DER TRESEN
   ════════════════════════════════════════════════════════════════════ */

.ns__tresen { display: flex; flex-direction: column; max-width: 860px; }

/* Eine durchgehende Linie verbindet die vier Nummern. Sie liegt hinter
   ihnen, nicht zwischen ihnen -- so bleibt sie ganz, egal wie hoch ein
   Schritt gerade ist. */
.ns__schritt {
  position: relative;
  padding: 0 0 26px 52px;
}
.ns__schritt::before {
  content: ''; position: absolute; left: 17px; top: 30px; bottom: 0;
  width: 1px; background: var(--line);
}
.ns__schritt:last-child { padding-bottom: 0; }
.ns__schritt:last-child::before { display: none; }

.ns__nummer {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 35px; height: 35px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--dim); font-variant-numeric: tabular-nums;
}
/* Erledigt ist gruen ausgefuellt, offen ist still. Kein drittes
   Zeichen: "gerade dran" erkennt man daran, dass es das erste offene
   ist. */
.ns__schritt--fertig > .ns__nummer {
  background: var(--green); border-color: var(--green); color: #FFFFFF;
}

.ns__schritt__kopf {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  min-height: 35px; margin-bottom: 10px;
}
.ns__schritt__name {
  margin: 0;
  font-family: var(--serif, Merriweather, Georgia, serif);
  font-size: 16px; font-weight: 700; line-height: 1.3;
}
.ns__schritt__wert {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.ns__schritt__sag {
  margin: 0 0 12px; font-size: 12.5px; line-height: 1.55;
  color: var(--dim); max-width: 72ch;
}

.ns__feld { display: flex; flex-direction: column; gap: 12px; }

/* ── Die Gattung ──────────────────────────────────────────────────── */
/* Ein <fieldset> bringt vom Browser Rahmen, Innen- und Aussenabstand
   mit. Ohne diese drei Nullen sitzt ein Kasten um die zwei Knoepfe, den
   niemand gezeichnet hat. */
.ns__art { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; min-width: 0; }
.ns__art label {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 13px; cursor: pointer; background: var(--panel);
}
.ns__art label:hover { background: var(--hover); }
.ns__art input { accent-color: var(--green); }
.ns__art b { font-size: 13.5px; font-weight: 700; }
.ns__art span { font-size: 12px; color: var(--dim); }
.ns__art label:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

/* ── Die Gruppen ──────────────────────────────────────────────────── */
.ns__gruppen {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.ns__gruppe {
  display: flex; align-items: flex-start; gap: 9px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 13px; cursor: pointer; background: var(--panel);
}
.ns__gruppe:hover { background: var(--hover); }
.ns__gruppe:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.ns__gruppe input { accent-color: var(--green); margin-top: 2px; }
.ns__gruppe__name { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.ns__gruppe__slug {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 10.5px; color: var(--dim);
}
/* Das eigene Haus ist keine Kundengruppe. Es steht mit dabei, weil man
   sich selbst etwas schicken koennen muss, aber es traegt ein Zeichen. */
.ns__gruppe__haus {
  display: inline-block; margin-top: 4px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px;
  color: var(--dim);
}

/* ── Die Leute ────────────────────────────────────────────────────── */
.ns__leute__tat {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px;
}
.ns__zahl {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.ns__leute {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.ns__person {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; cursor: pointer; background: var(--panel);
  border-top: 1px solid var(--line);
}
.ns__person:first-child { border-top: 0; }
/* Der Platzhalter im Kasten -- "erst die Gruppe waehlen", "wird
   geholt", "hat kein Mitglied". Er braucht denselben Innenabstand wie
   eine Zeile, sonst klebt er am Rahmen. */
.ns__leer { padding: 13px; }
.ns__person:hover { background: var(--hover); }
.ns__person input { accent-color: var(--green); }
.ns__person__mail {
  font-family: var(--mono); font-size: 12px; min-width: 0;
  overflow-wrap: anywhere;
}
.ns__person__rolle {
  margin-left: auto; flex: none;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px;
  color: var(--dim);
}

/* ── Der Zettel vor dem Absenden ──────────────────────────────────── */
.ns__pruef {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); padding: 16px 18px; margin-bottom: 14px;
}
.ns__pruef dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 16px; margin: 0; }
.ns__pruef dt {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
  padding-top: 2px;
}
.ns__pruef dd { margin: 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ns__pruef dd b { font-weight: 700; }

/* Was der Knopf ausloest, steht ueber dem Knopf und nicht nur darauf.
   Terra, weil es noch nicht beim Kunden ist -- eine Sekunde spaeter
   schon. */
.ns__warnung {
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px dashed var(--terra); border-radius: 8px;
  padding: 11px 13px; margin-bottom: 14px;
  font-size: 12.5px; line-height: 1.55; color: var(--text); max-width: 72ch;
}
.ns__warnung svg { flex: none; width: 17px; height: 17px; stroke: var(--terra); fill: none; stroke-width: 1.6; }

.ns__senden { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* werter-controls.css daempft nur den lauten Knopf im abgeschalteten
   Zustand. Der stille sah aus wie ein wacher und liess sich nicht
   druecken -- das ist die unangenehmste Sorte Knopf. */
.ns__senden button:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 560px) {
  .ns__schritt { padding-left: 44px; }
  .ns__pruef dl { grid-template-columns: 1fr; gap: 2px 0; }
  .ns__pruef dd { margin-bottom: 8px; }
}

@media (max-width: 460px) {
  .bf__gitter { grid-template-columns: 1fr; }
  .bf__rahmen iframe { height: 60vh; }
}
