/* Aivis Audit · eigene Stile über dem Gerüst (werkbank/stil.css bleibt unverändert).
   App-Fassung des Corporate Design: nur dunkel, nur Manrope in der Bedienung, Gelb nur als Signal (Hauptknopf, nächster Schritt),
   Violett nur für Erledigtes und Ausgewähltes. Stufen Muss, Soll, Kann tragen Bedeutung, nicht Marke: rot, orange, neutral. */
:root { --schrift-gross: var(--schrift); --muss: var(--schlecht); --soll: var(--warn); --kann: var(--text-2); }
h1 { font-weight: 650; letter-spacing: -.02em; font-size: var(--t-gross); }
.symbole { display: none; }
.kopf-luft { flex: 1; }
#benutzer { display: inline-flex; align-items: center; gap: var(--s3); font-size: var(--t-fuss); color: var(--text-2); }
.anmelde-platz { display: grid; place-items: center; min-height: 60vh; }
.anmelde-platz .karte { width: min(100%, 400px); }
.anmelde-platz h1 { font-size: 26px; margin-bottom: var(--s2); }
.anmelde-platz input, .anmelde-platz button { width: 100%; min-height: 44px; }

/* Liste der Läufe */
.laeufe { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border-radius: var(--r-gross); box-shadow: var(--schatten); overflow: hidden; }
.laeufe li + li { border-top: 1px solid var(--linie-fein); }
.lauf-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); color: var(--text); min-height: 64px; }
a.lauf-zeile:hover { background: var(--fuell); text-decoration: none; }
.lauf-zeile.ohne { color: var(--text-2); }
.lauf-zeile .haupt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lauf-zeile .haupt b { font-weight: 600; overflow-wrap: anywhere; }
.lauf-zeile .haupt span { font-size: var(--t-fuss); color: var(--text-2); }
.lauf-zeile svg.i { color: var(--text-3); }
.zaehler { display: inline-flex; gap: var(--s2); font-variant-numeric: tabular-nums; }
.zahl { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px var(--s2); border-radius: 6px; background: var(--fuell); font-size: var(--t-fuss); color: var(--text-2); }
.zahl b { font-weight: 650; color: var(--text); }
.zahl.muss b { color: var(--muss); } .zahl.soll b { color: var(--soll); }
.zahl.null b { color: var(--text-3); }

/* Ergebnis: Urteil zuerst */
.urteil { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0 0 var(--s4); }
.kachel { background: var(--flaeche); border-radius: var(--r-gross); padding: var(--s5); box-shadow: var(--schatten); border-top: 3px solid var(--linie); display: block; color: var(--text); }
a.kachel:hover { text-decoration: none; background: var(--flaeche-2); }
.kachel .wert { display: block; font-size: 44px; line-height: 1; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kachel .name { display: block; margin-top: var(--s2); font-weight: 600; }
.kachel .sinn { display: block; font-size: var(--t-fuss); color: var(--text-2); }
.kachel.muss { border-top-color: var(--muss); } .kachel.muss .wert { color: var(--muss); }
.kachel.soll { border-top-color: var(--soll); } .kachel.soll .wert { color: var(--soll); }
.kachel.kann .wert { color: var(--text); }
.kachel.null .wert { color: var(--text-3); }
.fakten-zeile { color: var(--text-2); font-size: var(--t-fuss); margin: 0 0 var(--s6); }
.stufen-kopf { display: flex; align-items: baseline; gap: var(--s3); }
.stufen-kopf .anzahl { color: var(--text-2); font-size: var(--t-fuss); font-weight: 500; }

/* Ein Befund */
details.befund > summary { align-items: flex-start; }
details.befund > summary::after { margin-top: 7px; flex: none; }
.befund .kennung { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); flex: none; min-width: 44px; padding-top: 2px; }
.befund .titel { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; font-weight: 600; }
.befund .titel .orte { font-weight: 400; font-size: var(--t-fuss); color: var(--text-2); overflow-wrap: anywhere; }
.befund.muss { border-left: 3px solid var(--muss); } .befund.soll { border-left: 3px solid var(--soll); } .befund.kann, .befund.aus { border-left: 3px solid var(--linie); }
.befund .inhalt > h3 { font-size: var(--t-fuss); font-weight: 600; color: var(--text-2); margin: var(--s4) 0 var(--s1); letter-spacing: 0; }
.befund .inhalt > p { max-width: 760px; }
.belege { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.belege li { background: var(--flaeche-2); border-radius: var(--r-klein); padding: var(--s3) var(--s4); }
.belege .ort { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); margin-bottom: 2px; overflow-wrap: anywhere; }
.belege .ort a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.belege q { quotes: "«" "»"; }
.gegenprobe { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--linie-fein); font-size: var(--t-fuss); color: var(--text-2); max-width: 760px; }
.gegenprobe b { color: var(--text); font-weight: 600; }
.nur-team { display: inline-block; font-size: var(--t-klein); font-weight: 600; color: var(--zweit); background: var(--zweit-tint); border-radius: 6px; padding: 1px var(--s2); margin-left: var(--s2); }
.angaben { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s1) var(--s4); margin: 0; }
.angaben dt { color: var(--text-2); } .angaben dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .urteil { grid-template-columns: 1fr; }
  .lauf-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .lauf-zeile .zaehler { grid-column: 1 / -1; grid-row: 2; }
}

/* Live-Ansicht (Etappe 2): geführter Weg der 14 Schritte, der laufende Schritt als einziges gelbes Signal, Erledigtes violett */
[hidden] { display: none !important; }
.abschnitt.erster { margin-top: 0; margin-bottom: var(--s6); }
.badge.erledigt { background: var(--zweit-tint); color: var(--zweit); }
.live-jetzt { border-top: 3px solid var(--linie); }
.live-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3) var(--s4); flex-wrap: wrap; }
.live-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-text b { font-size: var(--t-titel); font-weight: 650; letter-spacing: -.015em; }
.live-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.schritte { list-style: none; margin: 0; padding: var(--s2) 0; background: var(--flaeche); border-radius: var(--r-gross); box-shadow: var(--schatten); }
.schritte li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s2) var(--s5); min-height: 48px; color: var(--text-3); }
.schritte .nr { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--t-klein); font-weight: 650; background: var(--fuell); color: var(--text-2); font-variant-numeric: tabular-nums; }
.schritte .nr svg.i { width: 14px; height: 14px; }
.schritte .was { display: flex; flex-direction: column; min-width: 0; }
.schritte .was b { font-weight: 550; }
.schritte .zahlen { font-size: var(--t-fuss); color: var(--text-2); min-height: 0; }
.schritte .zeit { font-size: var(--t-fuss); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.schritte li.fertig { color: var(--text); }
.schritte li.fertig .nr { background: var(--zweit-fuell); color: #fff; }
.schritte li.laeuft { color: var(--text); background: var(--akzent-tint); }
.schritte li.laeuft .nr { background: var(--akzent-fuell); color: var(--auf-akzent); }
.schritte li.laeuft .zeit { color: var(--akzent); }
.schritte li.fehler .nr, .schritte li.offen .nr { background: var(--warn-tint); color: var(--warn); }
.schritte li.fehler .zeit { color: var(--schlecht); }
.protokoll h2 { font-size: var(--t-kopf); }
.protokoll ol { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.protokoll li { padding: 2px 0; overflow-wrap: anywhere; }
.protokoll li:last-child { color: var(--text); }
.abspiel select { min-height: var(--ziel); }
@media (max-width: 860px) { .live-raster { grid-template-columns: 1fr; } }

/* Neuer Lauf (Etappe 3) */
.neu-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: start; }
.neu-raster select, .neu-raster input { width: 100%; }
.knoepfe.start { margin-top: var(--s4); }
#vorab .karte h2 { font-size: var(--t-kopf); }
@media (max-width: 860px) { .neu-raster { grid-template-columns: 1fr; } }

/* Etappe 4: Sprungleiste, Verlauf, Freigabe */
.werkzeug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin: 0 0 var(--s2); }
.spruenge { display: flex; flex-wrap: wrap; gap: 2px; margin-left: calc(-1 * var(--s2)); }
.spruenge button { color: var(--text-2); }
.spruenge button:hover { color: var(--text); }
.stufen-kopf { flex-wrap: wrap; }
.stufen-kopf .knopf { margin-left: auto; }
table.verlauf { width: 100%; border-collapse: collapse; font-size: var(--t-fuss); }
table.verlauf th, table.verlauf td { text-align: left; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--linie-fein); }
table.verlauf th { color: var(--text-2); font-weight: 600; }
table.verlauf tr:last-child td { border-bottom: 0; }
table.verlauf .zahlspalte { text-align: right; font-variant-numeric: tabular-nums; }
table.verlauf tr.dieser td { background: var(--zweit-tint); }
table.verlauf a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.schlicht-liste { margin: 0; padding-left: var(--s5); }
.schlicht-liste li { margin: 2px 0; }
#freigabe-inhalt h3, #verlauf h3 { font-size: var(--t-fuss); font-weight: 600; color: var(--text-2); margin: var(--s4) 0 var(--s2); letter-spacing: 0; }
pre.blatt { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--flaeche-2); border-radius: var(--r-klein); padding: var(--s4); max-height: 480px; overflow: auto; margin: var(--s2) 0 0; color: var(--text-2); }
#aufgaben .inhalt h3 { color: var(--text); }

/* Etappe 4b: Schlüsselseiten, ausgelassene Schritte */
.angaben b.fehlt { color: var(--warn); font-weight: 600; }
.schritte li.ausgelassen .was b { font-weight: 400; }
