/* Todos (in index.html nach app.css geladen, die Reihenfolge der Regeln zählt): Fragen-Blöcke, Text, Kommentare, Verlauf, Text-Editor,
   Kanban mit Karten und Auswahl-Leiste, Tags, Supporttickets-Liste, Todo-Seite (Eigenschaften-Zeile, Hinweis-Leiste, Subtasks), Fortschritt. */
/* ---------- Todo: Fragen, Text, Kommentare, Verlauf ---------- */
.frage { border: 1px solid var(--linie-2); border-radius: var(--r-gross); padding: var(--s3) var(--s4) var(--s4); margin: 0 0 var(--s4); max-width: 72ch; display: grid; gap: var(--s1); }
.frage.beantwortet { border-color: var(--linie); }
.frage legend { font-weight: 700; padding: 0 var(--s2); margin-left: calc(var(--s2) * -1); }
.frage .haken { min-height: 40px; }
.frage small { color: var(--text-3); font: 400 12px var(--mono); margin-top: var(--s1); }
.frage textarea { min-height: 64px; }
.inhalt-todo { position: relative; margin-bottom: var(--s5); }
.inhalt-todo > .aktionen { margin-top: var(--s2); }
.kommentare { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.kommentare li { padding: var(--s3) var(--s4); border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); }
.kommentare li.intern { border-style: dashed; }
.kommentar-kopf { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; margin-bottom: var(--s1); }
.kommentar-kopf span { color: var(--text-3); font: 400 12px var(--mono); }
.verlauf summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--text-3); font: 400 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.verlauf ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text-2); }
.verlauf li { padding: var(--s1) 0; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; }
.verlauf li span { color: var(--text-3); font: 400 12px var(--mono); }
/* ---------- Text-Editor: ein Textblock, Markdown-Zeichen nur in aktiven Zeilen ---------- */
.editor-text { min-height: 3em; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--text); }
.editor-text.bearbeitbar { cursor: text; border-radius: 6px; }
.editor-text.leer::before { content: attr(data-platzhalter); position: absolute; color: var(--text-3); pointer-events: none; max-width: calc(100% - 2 * var(--s3)); }
/* Leeres Textfeld, das man beschreiben darf: als Feld erkennbar (Rahmen, Fläche), damit niemand stattdessen in die Kommentare schreibt */
.editor-text.bearbeitbar.leer { min-height: 7em; padding: var(--s3); border: 1px dashed var(--linie-2); border-radius: var(--r); background: var(--flaeche); position: relative; }
.editor-text.bearbeitbar.leer:focus { border-style: solid; border-color: var(--text-3); }
.editor-text.bearbeitbar:not(.leer):hover { box-shadow: 0 0 0 6px var(--flaeche); background: var(--flaeche); }
.z { min-height: 1.55em; }
.z .mk { display: none; }
.z.aktiv .mk { display: inline; color: var(--text-3); }
.z strong { font-weight: 700; }
.z code { font: 13px/1.4 var(--mono); background: var(--flaeche-2); padding: 1px 5px; border-radius: 4px; }
.z.h1 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; margin: var(--s4) 0 var(--s1); }
.z.h2 { font: 700 21px/1.2 var(--display); margin: var(--s4) 0 var(--s1); }
.z.h3 { font: 700 17px/1.3 var(--sans); margin: var(--s3) 0 2px; }
.z.h4 { font-weight: 700; margin-top: var(--s2); }
.z.hr:not(.aktiv) { min-height: 0; height: 1px; margin: var(--s3) 0; background: var(--linie-2); font-size: 0; }
.z.hr.dick:not(.aktiv) { height: 3px; }
.z.punkt:not(.aktiv) { position: relative; padding-left: 1.4em; }
.z.punkt:not(.aktiv)::before { content: attr(data-zeichen); position: absolute; left: 0; color: var(--text-3); }
.z.punkt.stufe-1:not(.aktiv) { padding-left: 2.8em; }
.z.punkt.stufe-1:not(.aktiv)::before { left: 1.4em; }
.z.punkt.stufe-2:not(.aktiv), .z.punkt.stufe-3:not(.aktiv) { padding-left: 4.2em; }
.z.punkt.stufe-2:not(.aktiv)::before, .z.punkt.stufe-3:not(.aktiv)::before { left: 2.8em; }
.z.code, .z.zaun, .z.tab.aktiv { font: 13px/1.6 var(--mono); }
.z.tab:not(.aktiv) { display: table-row; } /* Nachbarzeilen bilden zusammen eine Tabelle, Zellen brechen um statt quer zu scrollen */
.z.tab:not(.aktiv) .zelle { display: table-cell; padding: 6px var(--s4) 6px 0; border-bottom: 1px solid var(--linie); overflow-wrap: break-word; vertical-align: top; }
.z.tab.tabkopf:not(.aktiv) .zelle { font-weight: 700; border-bottom-color: var(--linie-2); }
.z.tab.trenn:not(.aktiv) { display: none; }
.z.code, .z.zaun { background: var(--flaeche); padding: 0 var(--s3); }
.z.zaun:not(.aktiv) { min-height: 8px; font-size: 0; }
.z-frage { position: relative; margin: var(--s3) 0; white-space: normal; cursor: default; }
.editor-text:not(.bearbeitbar) .z.leer:has(+ .z-frage), .editor-text:not(.bearbeitbar) .z-frage + .z.leer { display: none; } /* nur lesen: Leerzeilen um Fragen nicht doppelt */
.z-frage .frage { margin: 0; max-width: none; } /* im Textblock so breit wie der Text */
.slash { position: absolute; z-index: 30; left: 0; width: min(320px, 100%); max-height: 50dvh; overflow-y: auto;
  background: var(--flaeche); border: 1px solid var(--linie-2); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.slash .wahl.aktiv { background: var(--flaeche-2); }
.frage-bearbeiten { position: absolute; top: 6px; right: 8px; width: 36px; height: 36px; }
.z-frage:has(.frage-bearbeiten) legend { padding-right: 44px; }
.frage-form { border: 1px solid var(--text-3); border-radius: var(--r-gross); padding: var(--s3) var(--s4); margin: var(--s3) 0; display: grid; gap: var(--s2); }
.ff-kopf { display: grid; gap: var(--s2); }
@media (min-width: 640px) { .ff-kopf { grid-template-columns: 1fr auto; } }
.ff-frage { font-weight: 700; }
.ff-typ { width: auto; }
.ff-option { display: flex; align-items: center; gap: var(--s3); color: var(--text-2); }
.ff-option > span { flex: none; width: 1.2em; text-align: center; color: var(--text-3); }
.ff-option input { flex: 1; }
.ff-fuss { display: flex; justify-content: flex-end; margin-top: var(--s2); }
.ff-auto { color: var(--text-3); font-size: 14px; min-height: 32px; }
#stand { color: var(--text-3); }
/* ---------- Kanban, Filter-Knopf ---------- */
.knopf.gesetzt { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.knopf.gesetzt svg { width: 14px; height: 14px; }
/* Kanban: am Handy Spalten untereinander (einklappbar), ab 760px nebeneinander über die volle Breite, eingeklappt schmal */
.inhalt:has(.board), .inhalt:has(.reiter) { max-width: none; } /* Board und Projektseite (auch Reiter Infos) nutzen die volle Breite */
.board { display: grid; gap: var(--s2); padding-bottom: var(--s3); }
.spalte { display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: var(--s2); min-width: 0; }
.spalte.ueber { border-color: var(--text-3); background: var(--flaeche-2); }
.spalte-kopf { display: flex; align-items: baseline; gap: var(--s2); width: 100%; min-height: 36px; padding: var(--s1) var(--s2); background: none; border: 0; cursor: pointer;
  font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); text-align: left; }
.spalte-kopf::before { content: "▾"; color: var(--text-3); }
.spalte.zu .spalte-kopf::before { content: "▸"; }
.spalte-kopf .zahl { color: var(--text-3); }
.spalte.zu .karten { display: none; }
@media (min-width: 760px) {
  .board { display: flex; align-items: flex-start; overflow-x: auto; gap: var(--s3); }
  .spalte { flex: 1 1 0; min-width: 170px; } /* kein eigenes Scrollen: Seite scrollt, je Spalte „+20 weitere laden“ */
  .spalte.zu { flex: 0 0 44px; min-width: 44px; min-height: 200px; }
  .spalte.zu .spalte-kopf { writing-mode: vertical-rl; align-items: center; padding: var(--s2) 0; } /* vertikal: „row“ läuft von oben nach unten */
  .spalte.zu .spalte-kopf::before { content: ""; }
}
.karten { display: grid; gap: 6px; align-content: start; min-height: 48px; }
.karte[hidden] { display: none; }
.mehr-karten { margin-top: 6px; min-height: 36px; border: 1px dashed var(--linie-2); border-radius: var(--r); background: none; font: 500 13px var(--sans); color: var(--text-2); cursor: pointer; }
.mehr-karten:hover { background: var(--flaeche-2); color: var(--text); }
.spalte.zu .mehr-karten { display: none; }
.karte { display: grid; gap: 2px; padding: var(--s2) var(--s3); background: var(--bg); border: 1px solid var(--linie); border-radius: var(--r); text-decoration: none; cursor: grab;
  -webkit-touch-callout: none; user-select: none; }
.karte:hover { border-color: var(--linie-2); }
.karte b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.karte small { font: 400 11px/1.4 var(--mono); color: var(--text-3); }
.karte.zieht { opacity: .4; }
.karte.gewaehlt { outline: 2px solid var(--akzent); outline-offset: -1px; }
/* Leiste für gewählte Karten (auswahl.js): unten, über der Navigation */
.auswahl-leiste { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-hoehe) + env(safe-area-inset-bottom) + var(--s2));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; width: max-content; max-width: calc(100% - 24px);
  padding: var(--s2) var(--s3); background: var(--flaeche-2); border: 1px solid var(--linie-2); border-radius: var(--r-gross); box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.auswahl-leiste b { font-size: 14px; margin-right: var(--s2); }
.auswahl-leiste .aufklapp-liste { top: auto; bottom: calc(100% + 4px); } /* Leiste steht unten: Auswahl klappt nach oben auf */
.auswahl-leiste .aufklapp { min-height: 36px; padding: 0 var(--s3); border-color: var(--linie-2); border-radius: var(--rund); font-size: 13px; } /* wie die Knöpfe daneben */
/* Agenten-Icon (web/js/zeromess.js): Todo liegt bei zeromess, blinkt solange */
.agent-an { display: inline-flex; color: var(--link); animation: agent-blinken 1.4s ease-in-out infinite; }
.agent-an svg { width: 14px; height: 14px; }
@keyframes agent-blinken { 50% { opacity: .25; } }
@media (min-width: 960px) { .auswahl-leiste { bottom: var(--s5); } }
/* „Blocker erledigt“ = kann weitergehen (gestrichelter Rand) */
.karte.frei { border-style: dashed; border-color: var(--link); }
.b-liste { display: grid; gap: 2px; max-height: 40vh; overflow-y: auto; }
.b-liste .haken small { color: var(--text-3); margin-left: auto; }
/* Todo-Seite: Abschnitte (Blocker, Subtasks, Anhänge, Kommentare, Verlauf) mit Trennlinie und Luft */
.teil { border-top: 1px solid var(--linie); padding-top: var(--s5); margin-top: var(--s5); }
.teil + .inhalt-todo { margin-top: var(--s5); }
.teil > div + h2 { margin-top: var(--s5); }
.teil:has(+ .inhalt-todo) { border-bottom: 1px solid var(--linie); padding-bottom: var(--s5); }
/* Tags auf Karten ([text], Farbe), Subtask-Ziel */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 2px; font: 400 11px/1.4 var(--mono); color: var(--text-3); }
.tag { display: inline-flex; align-items: center; white-space: nowrap; }
.tag::before { content: "["; }
.tag::after { content: "]"; }
.tag svg { width: 11px; height: 11px; margin-right: 3px; }
.tag.rot { color: var(--t-rot); }
.tag.gelb { color: var(--t-gelb); }
.tag.blau { color: var(--t-blau); }
.tag.gruen { color: var(--t-gruen); }
.karte.ziel { outline: 2px dashed var(--akzent); outline-offset: -1px; }
.karte.ziel::after { content: "Loslassen: als Subtask hinzufügen"; font: 600 11px/1.4 var(--sans); color: var(--akzent); }
/* Supporttickets als Liste (Board-Seite, tickets.js) */
.anfragen { margin: 0 0 var(--s5); max-width: 860px; }
.anfragen > h2 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font: 400 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.anfragen > h2 .zahl { color: var(--text-3); }
/* Todo-Seite: Eigenschaften als schmale Zeile (Icon, Wert als Auswahl aus aufklappen.js), Hinweis-Leiste (Entwurf, abgeschlossen), Subtasks kompakt */
.eig { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: center; gap: 2px var(--s3); padding: var(--s1) 0; margin: 0 0 var(--s4); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); } /* gleich breite Spalten */
.eig-feld { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; font: 400 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.eig-fest { padding: 0 var(--s2); font: 500 14px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); }
.leiste-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s3); margin: 0 0 var(--s3);
  border: 1px dashed var(--linie-2); border-radius: var(--r); font-size: 14px; color: var(--text-2); }
.leiste-hinweis small { color: var(--text-3); font-size: 13px; }
.leiste-hinweis svg { width: 16px; height: 16px; flex: none; }
.subs-box { margin: 0 0 var(--s4); }
.subs-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font: 400 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.subs-kopf .chip { text-transform: none; letter-spacing: 0; }
.subs { list-style: none; margin: var(--s1) 0 0; padding: 0; border-top: 1px solid var(--linie); }
.subs li { display: flex; align-items: center; gap: var(--s2); border-bottom: 1px solid var(--linie); }
.subs a { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--s2); min-height: 40px; padding: var(--s1) var(--s1); text-decoration: none; align-items: center; }
.subs .sub-stand { width: auto; min-height: 30px; padding: 0 var(--s2); font: 500 13px var(--sans); background: none; border: 1px solid transparent; border-radius: 6px; }
.subs a:hover { background: var(--flaeche); }
.subs b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subs small { font: 400 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.subs a small { margin-left: auto; }
.sub-status { flex: none; display: inline-flex; align-items: center; min-width: 120px; padding-left: var(--s1); } /* Punkt + Status wie im Kopf, Titel bündig */
.subs li.aus b { color: var(--text-3); text-decoration: line-through; }
.kommentar-kopf .tag { margin-left: auto; font: 400 11px var(--mono); color: var(--text-3); }
/* Fortschritt im Projektkopf (todos/fortschritt.js): links eine Zeile über dem Balken (Text, beim Darüberfahren die Zahlen am Balken ausgerichtet),
   rechts der Knopf für den Stand; nimmt den Rest der Zeile (max. 760px) */
.fortschritt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s3); font: 400 11px var(--mono); color: var(--text-3);
  width: 100%; max-width: 760px; justify-self: end; }
.fortschritt:empty { display: none; }
.fortschritt > .chip { min-height: 22px; padding: 0 var(--s2); font: 400 11px var(--mono); white-space: nowrap; }
.fs-flaeche { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fs-zeile { position: relative; display: flex; justify-content: space-between; gap: var(--s4); min-height: 16px; align-items: baseline; }
.fs-titel { letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.fs-titel b { font-weight: 400; color: var(--text); letter-spacing: 0; margin-right: 4px; font-size: 12px; }
.fs-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.fs-zahlen > span { position: absolute; top: 0; white-space: nowrap; color: var(--text-2); }
.fs-zahlen > span:first-child { left: 0; }
.fs-zahlen > span:last-child { right: 0; }
.fs-zahlen i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; }
.fs-balken { display: block; width: 100%; height: 4px; border-radius: var(--rund); overflow: hidden; background: var(--flaeche-2); }
.fs-fertig { fill: var(--t-gruen); background: var(--t-gruen); }
.fs-arbeit { fill: var(--t-gelb); background: var(--t-gelb); }
.fs-offen { background: var(--linie-2); }
.anfragen.unten { margin: var(--s5) 0 0; }
/* Todo-Kopf und Subtasks: Status als farbiger Punkt + Schrift, Priorität farbig, Icons statt Wörter (Wort für Screenreader in .vh) */
.eig-icon { display: inline-flex; color: var(--text-3); margin-right: 2px; }
.eig-icon svg { width: 16px; height: 16px; }
.stand-punkt { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px; background: var(--text-3); }
[data-stand="offen"] { --stand: var(--text-2); } [data-stand="in_arbeit"] { --stand: var(--t-blau); } [data-stand="blockiert"] { --stand: var(--t-rot); }
[data-stand="review"] { --stand: var(--t-gelb); } [data-stand="getestet"], [data-stand="bereit"], [data-stand="erledigt"] { --stand: var(--t-gruen); }
[data-stand="entwurf"], [data-stand="verworfen"] { --stand: var(--text-3); }
.stand-punkt[data-stand] { background: var(--stand); }
:is(.aufklapp, .sub-stand)[data-stand] { color: var(--stand, var(--text)); }
:is(.aufklapp, .aufklapp-wahl)[data-prio="dringend"] { color: var(--t-rot); } :is(.aufklapp, .aufklapp-wahl)[data-prio="hoch"] { color: var(--t-gelb); }
:is(.aufklapp, .aufklapp-wahl)[data-prio="niedrig"] { color: var(--text-3); }
.eig-feld { min-width: 0; } /* in der Spalte bleiben */
/* „An zeromess geben“ im Todo-Kopf (web/js/zeromess.js): rechts, unten bündig mit der Zeile „#nr · von …“, Titel bleibt frei */
.zeromess { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); }
@media (min-width: 560px) { .kopf:has(> .zeromess) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.teil + .subs-box { margin-top: var(--s5); } /* Abstand zwischen „Blockiert durch / Hält auf“ und Subtasks */
/* Neu seit meinem letzten Öffnen (todo.js): was den roten Punkt ausgelöst hat */
.kommentare li.neu { box-shadow: inset 3px 0 var(--t-rot); }
.verlauf li.neu { color: var(--text); font-weight: 600; }
