/* Project page (#vorhaben) and the project form. Tokens come from leitstand.css.
   A board: one column per area. What runs is a white tile, what is planned is only a name on the ground.
   The five places and the stage track are the only drawings; every action lives in the sheet on the right. */

.pj { display: grid; gap: 16px; }
.pj h3, .pj h4, .pj h5, .pj dl, .pj dd, .pj p { margin: 0; }

/* ---------- bar: the five places, and the way to a new project ---------- */
.pj-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pj-plaetze { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.pj-platz-reihe { display: inline-flex; gap: 4px; }
.pj-platz { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--steel-deep); background: transparent; }
.pj-platz.is-belegt { border-color: var(--ink); background: var(--ink); }
.pj-plaetze.is-zuviel { color: var(--fault-t); font-weight: 600; }
.pj-plaetze.is-zuviel .pj-platz.is-belegt { border-color: var(--fault-t); background: var(--fault-t); }

.pj-note { padding: 9px 12px; border-radius: 8px; font-size: 14.5px; line-height: 1.45; border: 1px solid var(--line); background: var(--surface); }
.pj-note.is-ok { border-color: var(--free); background: #E9F7F1; color: var(--free-t); }
.pj-note.is-warn { border-color: var(--wait-line); background: var(--wait-tint); color: var(--wait-t); }
.pj-note.is-fehler { border-color: var(--fault); background: var(--fault-tint); color: var(--fault-t); font-weight: 600; }

/* ---------- board ---------- */
.pj-liste { display: grid; gap: 22px; }
.pj-brett { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px 24px; align-items: start; }
.pj-brett[data-spalten="1"] { grid-template-columns: minmax(0, 560px); }
.pj.hat-blatt { padding-right: min(600px, 44vw); }

.pj-spalte-b { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pj-spalte-kopf { padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.pj-spalte-kopf h3 { font-size: 19px; font-weight: 700; font-stretch: 92%; line-height: 1.2; }
.pj-spalte-kopf p { font-size: 13.5px; color: var(--ink-2); margin-top: 1px; }
.pj-nichts { font-size: 14px; color: var(--ink-2); padding: 2px 0 4px; }

/* tile: a running project */
.pj-kacheln { display: grid; gap: 10px; }
.pj-kachel {
  display: grid; gap: 8px;
  padding: 14px 16px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; min-width: 0;
}
.pj-kachel:hover { border-color: var(--ink-2); }
.pj-kachel.is-gewaehlt { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pj-kachel.is-fertig { border-color: var(--wait-line); background: var(--wait-tint); }
.pj-kachel.is-busy, .pj-zeile.is-busy { opacity: .55; }
.pj-titel { font-size: inherit; font-weight: inherit; min-width: 0; }
.pj-name {
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; color: var(--ink); overflow-wrap: anywhere;
}
.pj-kachel .pj-name { font-size: 17.5px; line-height: 1.25; }
.pj-kachel:hover .pj-name, .pj-zeile:hover .pj-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.pj-stand { display: flex; align-items: center; gap: 10px; }
.pj-spur { display: flex; gap: 3px; flex: 1 1 auto; min-width: 0; }
.pj-seg { flex: 1 1 0; max-width: 40px; height: 8px; border-radius: 2px; background: var(--steel); }
.pj-seg.is-fertig { background: var(--ink); }
.pj-seg.is-naechste { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pj-seg.is-spaet { background: var(--fault-tint); box-shadow: inset 0 0 0 1.5px var(--fault-t); }
.pj-stand-text { font-size: 13.5px; font-weight: 650; color: var(--ink); white-space: nowrap; }

.pj-schritt { font-size: 14.5px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.pj-schritt-label { color: var(--ink-2); }
.pj-schritt-datum { color: var(--ink-2); white-space: nowrap; }
.pj-schritt.is-spaet, .pj-schritt.is-spaet .pj-schritt-label, .pj-schritt.is-spaet .pj-schritt-datum { color: var(--fault-t); }
.pj-schritt.is-spaet { font-weight: 600; }
.pj-schritt.is-leer { color: var(--ink-2); }
.pj-schritt.is-abnahme { color: var(--wait-t); font-weight: 650; }

.pj-k-fuss { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--ink-2); }
.pj-kachel.is-fertig .pj-k-fuss { border-top-color: var(--wait-line); }
.pj-k-zahl b { font-weight: 700; color: var(--ink); }
.pj-k-zahl.is-spaet, .pj-k-zahl.is-spaet b { color: var(--fault-t); }
.pj-k-zahl.is-wartet, .pj-k-zahl.is-wartet b { color: var(--wait-t); }
.pj-k-termin { margin-left: auto; white-space: nowrap; }
.pj-k-termin.is-spaet { color: var(--fault-t); font-weight: 650; }

/* names: planned, paused, closed */
.pj-block { display: grid; gap: 2px; }
.pj-block > h4 { font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 4px 0 2px; }
.pj-namen { display: grid; }
.pj-namen > li + li { border-top: 1px solid var(--line); }
.pj-zeile {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 8px 8px 0; min-height: 38px; cursor: pointer; border-radius: 6px;
}
.pj-zeile .pj-name { flex: 1 1 auto; font-size: 15px; font-weight: 550; line-height: 1.3; }
.pj-zeile.is-pausiert .pj-name, .pj-zeile.is-abgeschlossen .pj-name { color: var(--ink-2); }
.pj-zeile.is-gewaehlt { background: var(--surface); box-shadow: 0 0 0 1px var(--ink); padding-left: 8px; }
.pj-zeile-n { font-size: 13.5px; font-weight: 650; color: var(--ink); white-space: nowrap; }
.pj-zeile-n.is-null { color: var(--off); font-weight: 500; }
.pj-zeile-n.is-spaet { color: var(--fault-t); font-weight: 600; }
.pj-zeile-zusatz { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pj-fertige { display: grid; gap: 6px; justify-items: start; }
.pj-fertige .pj-namen { width: min(560px, 100%); }

.pj-leer {
  display: grid; gap: 8px; justify-items: start;
  padding: 20px; font-size: 15px; line-height: 1.5; color: var(--ink-2);
  background: var(--surface); border: 1px dashed var(--steel-deep); border-radius: 12px;
}
.pj-leer-titel { font-size: 17px; font-weight: 650; color: var(--ink); }

/* ---------- sheet of one project ---------- */
.drawer.pj-blatt {
  width: min(580px, 100vw); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -14px 0 36px rgba(21, 33, 44, .14);
}
.pj-blatt-kopf h2 { overflow-wrap: anywhere; outline-offset: 4px; }
.pj-blatt-bereich { font-size: 13.5px; color: var(--ink-2); }
.pj-blatt .pj-ziel { font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.pj-blatt .pj-ziel.is-leer { color: var(--ink-2); }
.pj-abnahme { margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-size: 14.5px; line-height: 1.45; background: var(--hover); color: var(--ink-2); }
.pj-abnahme.is-wartet { background: var(--wait-tint); color: var(--wait-t); font-weight: 600; }
.pj-hinweis { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.drawer-sec .actions.pj-blatt-knoepfe { margin-top: 14px; }

.pj-zahlen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.pj-zahl {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 0; border: 0; background: none;
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
.pj-zahl .pj-n { font-size: 20px; font-weight: 700; color: var(--ink); }
button.pj-zahl { cursor: pointer; }
button.pj-zahl:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pj-zahl.is-spaet .pj-n { color: var(--fault-t); }
.pj-zahl.is-wartet .pj-n { color: var(--wait-t); }

.pj-fakten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 14px; }
.pj-fakten > div { display: grid; gap: 1px; min-width: 0; }
.pj-fakten dt { font-size: 12.5px; color: var(--ink-2); }
.pj-fakten dd { font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.pj-fakten dd.is-spaet { color: var(--fault-t); font-weight: 650; }
.pj-leerzeile { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-bottom: 8px; }

.pj-etappen { display: grid; gap: 5px; margin-bottom: 12px; }
.pj-etappe {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: baseline;
  font-size: 15px; line-height: 1.4; color: var(--ink);
}
.pj-haken { width: 14px; height: 14px; align-self: center; border-radius: 3px; border: 1.5px solid var(--steel-deep); font-size: 11px; line-height: 11px; font-weight: 700; text-align: center; color: #fff; }
.pj-etappe.is-fertig .pj-haken { border-color: var(--ink); background: var(--ink); }
.pj-etappe.is-fertig { color: var(--ink-2); }
.pj-etappe.is-abnahme { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.pj-etappe-datum { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pj-etappe.is-spaet .pj-etappe-datum { color: var(--fault-t); font-weight: 650; }
.pj-etappe-ticket { padding: 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--run-t); }
.pj-etappe-ticket:hover { text-decoration: underline; }

.pj-tickets { display: grid; margin-bottom: 12px; }
.pj-ticket { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 5px 0; font-size: 15px; line-height: 1.4; }
.pj-ticket + .pj-ticket { border-top: 1px solid var(--line-soft); }
.pj-ticket-status { width: 9px; height: 9px; border-radius: 50%; align-self: center; border: 1.5px solid var(--steel-deep); }
.pj-ticket-status.is-wartet { border-color: var(--wait); background: var(--wait); }
.pj-ticket-status.is-arbeit { border-color: var(--run); background: var(--run); }
.pj-ticket-status.is-erledigt { border-color: var(--steel-deep); background: var(--steel-deep); }
.pj-ticket-titel { padding: 0; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.pj-ticket.is-erledigt .pj-ticket-titel { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--steel-deep); }
.pj-ticket-titel:hover { text-decoration: underline; text-underline-offset: 3px; }
.pj-ticket-meta { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pj-ticket.is-wartet .pj-ticket-meta { color: var(--wait-t); font-weight: 600; }

/* ---------- form ---------- */
.confirm.pf { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; }
.pf-form { display: grid; gap: 14px; }
.pf-form h2 { font-size: 19px; }
.pf-zeile-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pf-zeile-2 > .field:only-child { grid-column: 1; }
.pf .input, .pf .select { min-height: 40px; }
.pf-hilfe { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.pf [aria-invalid="true"] { border-color: var(--fault-t); box-shadow: 0 0 0 1px var(--fault-t); }
.pf-wahl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pf-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.pf-option:hover { border-color: var(--ink-2); }
.pf-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pf-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pf-option input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--ink); }
.pf-option-titel { display: block; font-size: 15px; font-weight: 650; }
.pf-option-text { display: block; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.pf-option-text.is-warn { color: var(--wait-t); }
.pf-fehler { font-size: 14px; line-height: 1.45; }
.confirm.pf .pf-knoepfe { margin-top: 2px; }

/* ---------- narrow ---------- */
@media (max-width: 1100px) {
  .pj.hat-blatt { padding-right: 0; }
}
@media (max-width: 760px) {
  .pj-brett { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pj-zeile { min-height: 44px; align-items: center; }
  .pj-k-termin { margin-left: 0; }
  .pj-fakten { grid-template-columns: minmax(0, 1fr); }
  .pj-ticket { grid-template-columns: 10px minmax(0, 1fr); }
  .pj-ticket-meta { grid-column: 2; white-space: normal; }
  .pj-etappe { grid-template-columns: 18px minmax(0, 1fr); }
  .pj-etappe-datum, .pj-etappe-ticket { grid-column: 2; }
  .pf-zeile-2, .pf-wahl { grid-template-columns: minmax(0, 1fr); }
  .confirm.pf { padding: 16px; }
  .pj-leiste .btn { width: 100%; justify-content: center; }
  .drawer.pj-blatt { width: 100vw; border-left: 0; }
}

/* ---------- tab row ---------- */
/* Five tabs do not fit into 390 px. This rule lived in news.css until the News page was removed (29.09.2026). */
@media (max-width: 760px) {
  .bar .tabs { margin-left: 0; flex-wrap: wrap; gap: 4px 14px; }
}
