/* Werkstatt (werkstatt.js). Nur Tokens aus app.css. Eine Lesespalte: Formular, Liste, Verlauf. Die Texte der Person
   sind Objekte (Nachricht) und tragen eine Fläche; Antworten und Schritte stehen frei auf dem Grund. */

.wk-seite { display: grid; gap: 28px; max-width: 760px; }

/* Neuer Wunsch: die eine Aufforderung der Übersicht. */
.wk-neu { display: grid; gap: 12px; }
.wk-frage { font-size: var(--t-betont); font-weight: 600; letter-spacing: -.01em; }
.wk-feld {
  width: 100%; min-height: calc(var(--h-knopf) * 2); resize: vertical; padding: 12px 14px;
  border: 1px solid transparent; border-radius: var(--r-kachel); background: var(--flaeche);
  font: inherit; font-size: var(--t-lese); line-height: 1.45; color: var(--text);
}
.wk-feld:focus { outline: none; border-color: var(--studium); background: var(--glas); }
.wk-feld::placeholder { color: var(--text-3); }
.wk-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.wk-kontext { display: flex; align-items: baseline; gap: 8px; font-size: var(--t-neben); color: var(--text-2); min-width: 0; flex: 1 1 260px; }
.wk-kontext input { accent-color: var(--studium); flex: none; }

/* Liste */
.wk-gruppe { display: grid; gap: 6px; }
.wk-gruppe > .rubrik, .wk-gruppe > summary { margin: 0; cursor: default; }
details.wk-gruppe > summary { cursor: pointer; list-style: none; }
details.wk-gruppe > summary::-webkit-details-marker { display: none; }
.wk-liste { list-style: none; margin: 0; padding: 0; }
.wk-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); color: var(--text); }
.wk-liste li:first-child .wk-zeile { border-top: 0; }
.wk-zeile svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.wk-zeile-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wk-zeile-text b { font-size: var(--t-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-zeile-text small { font-size: var(--t-neben); color: var(--text-2); }
.wk-leer { margin: 0; }

/* Zustand als Punkt: Akzent nur, wo etwas auf die Person wartet. */
.wk-punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.wk-bereit { background: var(--studium); }
.wk-rueckfrage { background: var(--orange); }
.wk-fehler { background: var(--rot); }
.wk-arbeitet, .wk-uebernimmt, .wk-nimmt_zurueck { background: var(--studium); animation: wk-puls 1.6s ease-in-out infinite; }
@keyframes wk-puls { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .wk-punkt { animation: none; } }

/* Ergebnis oben auf der Wunschseite */
.wk-ergebnis { display: grid; gap: 12px; }
.wk-lage { margin: 0; font-size: var(--t-betont); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.wk-hinweis { margin: 0; font-size: var(--t-text); white-space: pre-wrap; }
.wk-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-meta { margin: 0; font-size: var(--t-neben); color: var(--text-2); }
.wk-meta b { color: var(--text); font-weight: 600; }
.wk-meta .knopf { margin-left: 8px; vertical-align: middle; }
.wk-dateien { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wk-dateien code, .wk-ergebnis code, .wk-details code { font: var(--t-klein)/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.wk-nachbessern { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--linie); }
.wk-nachbessern .wk-feld { min-height: var(--h-knopf); }

/* Verlauf */
.wk-verlauf { display: grid; gap: 18px; }
.wk-verlauf > .rubrik { margin: 0; }
.wk-runde { display: grid; gap: 8px; }
.wk-text { padding: 12px 16px; border-radius: var(--r-kachel); background: var(--flaeche); font-size: var(--t-lese); }
.wk-text p { margin: 0; }
.wk-text p + p { margin-top: .6em; }
.wk-wunsch .wk-meta, .wk-wunsch .wk-details { padding: 0 4px; }
.wk-antwort { font-size: var(--t-lese); line-height: 1.5; }
.wk-antwort p, .wk-antwort ul, .wk-antwort ol { margin: 0 0 .6em; }
.wk-antwort h4 { margin: .8em 0 .3em; font-size: var(--t-text); }
.wk-antwort > :last-child { margin-bottom: 0; }
.wk-fehlertext { margin: 0; color: var(--rot); font-size: var(--t-text); }

.wk-details { font-size: var(--t-neben); color: var(--text-2); }
.wk-details summary { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-details ul { margin: 6px 0 0; padding-left: 18px; }
.wk-schritte { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; display: grid; gap: 4px; border-left: 1px solid var(--linie); }
.wk-schritte li { overflow-wrap: anywhere; }
.wk-schritte .wk-s-aendern { color: var(--text); }
.wk-laeuft .wk-schritte li:last-child { color: var(--studium); }
.wk-pre {
  margin: 8px 0 0; padding: 10px 12px; max-height: 320px; overflow: auto; border-radius: var(--r-feld); background: var(--flaeche);
  font: var(--t-klein)/1.45 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; color: var(--text);
}

@media (max-width: 900px) {
  .wk-seite { gap: 22px; }
  .wk-fuss .knopf { width: 100%; }
}
