/* Lernziel-Werkstatt: Schrittnavigation, Karten, Felder, Befunde, Ergebnis und Druck. Basis: basis.css */
/* Schrittnavigation */
/* Schritte: .ds-stepper (Paket); hier nur die Zähler */
.zaehler { display: inline-flex; align-items: center; font-size: var(--type-app-caption-size); font-weight: 700; padding: 0 6px; border: 1px solid currentColor; font-variant-numeric: tabular-nums; }
.zaehler.fehler { color: var(--schlecht); background: var(--schlecht-bg); }
.zaehler.hinweis { color: var(--warn); background: var(--warn-bg); }
.zaehler.ok { color: var(--gut); background: var(--gut-bg); }

/* min-height: Der Inhalt entsteht per JavaScript; ohne reservierte Höhe springen Erklärabschnitt und Fuß beim Laden (CLS) */
main { padding: var(--space-md) var(--ds-edge) var(--space-xl); outline: none; min-height: calc(100vh - 12rem); }
.intro { color: var(--text-2); max-width: 760px; margin: 0 0 20px; }

/* Karten und Felder */
.karte { background: var(--flaeche); border: 1px solid var(--rand); padding: 16px; margin: 0 0 14px; }
.karte.rlz { border-left: 4px solid var(--marke); }
.karte.glz { border-left: 4px solid var(--rand-bedien); background: var(--bg); }
.karte.flz { background: var(--flaeche); }
.karte-kopf { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.id { font-family: var(--font-titel); font-weight: 700; color: var(--marke-text); font-size: 0.85rem; white-space: nowrap; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px 16px; }
.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.feld > span, .feld legend { font-size: 0.875rem; font-weight: 650; color: var(--text-2); }
fieldset.feld { border: 0; padding: 0; margin: 0 0 10px; }
/* Fragezeichen mit Erläuterung: Designpaket (.ds-help, .ds-help-panel, .ds-field__head); hier nur die Größe der Beschriftung */
.ds-field__head label, .feld legend { font-size: 0.875rem; font-weight: 650; color: var(--text-2); }
input[type="text"], textarea, select {
  font: inherit; color: var(--text); background: var(--eingabe); border: var(--size-border-control) solid var(--rand-bedien); border-radius: var(--radius-base);
  min-height: var(--size-control-height); padding: 6px 9px; width: 100%;
}
input[type="text"]:hover, textarea:hover, select:hover { border-color: var(--color-border-strong); }
textarea { min-height: 3.2em; resize: vertical; }
.optionen { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.optionen label { display: flex; gap: 8px; align-items: center; min-height: var(--size-target-min); font-size: 0.88rem; cursor: pointer; }
.optionen input[type="checkbox"], .optionen input[type="radio"] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--color-action-primary); }
.lesetext { margin: 0 0 10px; padding: 8px 10px; background: var(--flaeche-2); font-size: 0.92rem; }
.verben { font-size: 0.78rem; color: var(--text-2); margin: -4px 0 10px; }

.aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.navigation-unten { display: flex; justify-content: space-between; margin-top: 24px; }

/* Befunde */
.befunde { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.befunde:empty { display: none; }
.befunde li { font-size: var(--type-body-sm-size); padding: 4px 8px; border-left: 3px solid; }
.befunde li.fehler { border-color: var(--schlecht); background: var(--schlecht-bg); }
.befunde li.hinweis { border-color: var(--warn); background: var(--warn-bg); }
.befunde .regel-id { font-weight: 700; margin-right: 6px; font-size: var(--type-app-caption-size); }

/* Tabellen (Ergebnis) */
.tabelle-huelle { overflow-x: auto; margin-bottom: 20px; }
table { border-collapse: collapse; width: 100%; font-size: var(--type-body-sm-size); background: var(--flaeche); }
th, td { border: 1px solid var(--rand); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--flaeche-2); font-weight: 650; }
td.kennung { white-space: nowrap; font-weight: 600; }
.grenze { font-size: var(--type-body-sm-size); color: var(--text-2); border-left: 3px solid var(--rand-bedien); padding-left: 10px; }

#status { min-height: 1.2em; }

/* Druck: nur das Schulungskonzept */
#druck { display: none; }
@media print {
  @page { margin: 16mm 14mm; }
  body { background: white; color: black; font-size: 10.5pt; }
  .ds-header, .hinweisleiste, .ds-stepper, main, .seiten-info, .fuss, .skip { display: none !important; }
  #druck { display: block; }
  #druck h1 { font-size: 16pt; margin-bottom: 4pt; border-top: 3pt solid var(--color-accent); padding-top: 6pt; }
  #druck h2 { font-size: 12.5pt; margin: 14pt 0 6pt; }
  #druck table { font-size: 8.5pt; }
  #druck th, #druck td { border-color: gray; }
  #druck tr { break-inside: avoid; }
  .befunde li { background: none !important; }
}

/* Übung „Lernziele sortieren“ */
.uebung-liste { list-style: none; margin: 0; padding: 0; }
.aufgabe { margin: 0 0 10px; font-size: 0.98rem; }
.ebenen { display: flex; flex-wrap: wrap; gap: 8px; }
.ebene-knopf { min-width: 72px; min-height: var(--size-target-touch); font-weight: 700; }
.ebene-knopf:disabled { cursor: default; opacity: 0.55; }
.ebene-knopf.ist-richtig { opacity: 1; border: 2px solid var(--gut); background: var(--gut-bg); color: var(--gut); }
.ebene-knopf.ist-falsch { opacity: 1; border: 2px solid var(--schlecht); background: var(--schlecht-bg); color: var(--schlecht); }
.rueckmeldung { margin: 10px 0 0; font-size: 0.88rem; }
.rueckmeldung:empty { display: none; }
.rueckmeldung.gut { border-left: 3px solid var(--gut); padding-left: 8px; }
.rueckmeldung.falsch { border-left: 3px solid var(--schlecht); padding-left: 8px; }
.uebung-stand { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; margin: 0 0 12px; font-weight: 650; border-bottom: 1px solid var(--rand); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Beispielauswahl im Kopf */
select.beispiel-wahl { width: auto; max-width: 13rem; font-size: var(--type-app-control-size); }

/* Einstieg und Statuszeile */
.statuszeile { margin: 0; padding: 6px var(--ds-edge); font-size: var(--type-app-small-size); color: var(--text-2); background: var(--bg); }
.statuszeile:empty { display: none; }
.einstieg-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-bottom: 8px; }
.einstieg-karte { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.einstieg-karte p { margin: 0; color: var(--text-2); font-size: 0.9rem; flex: 1; }
.einstieg-karte .ds-btn { align-self: flex-start; }
/* Einstieg wie auf der Startseite: Akzentlinie, Leitsatz, Akzentbalken an den beiden Hauptwegen, Kennzeile „Beispiele“ */
.einstieg-linie { margin-top: var(--space-2xs); }
.einstieg-lead { font-size: var(--type-app-subheading-size); line-height: 1.5; max-width: 62ch; }
.einstieg-weg { border-top: var(--size-accent-bar) solid var(--color-accent); }
.einstieg-karte h3 { margin-bottom: 2px; }
h3.einstieg-zwischentitel {
  margin: var(--space-lg) 0 var(--space-xs); padding-top: var(--space-sm); border-top: 1px solid var(--rand);
  font-family: var(--font-text); font-size: var(--type-label-caps-size); font-weight: var(--type-label-caps-weight);
  letter-spacing: var(--type-label-caps-tracking); line-height: var(--type-label-caps-leading); text-transform: uppercase; color: var(--color-text-muted);
}
.einstieg-ueben { margin-top: var(--space-md); }

.hinweis-klein { font-size: var(--type-body-sm-size); border-left: 3px solid var(--marke); padding-left: 10px; }
@media (max-width: 600px) {
  .ds-toolbar__actions select.beispiel-wahl { flex: 1 1 auto; min-width: 0; max-width: none; }
}

/* Zuklappbare Feinlernziel-Karten */
details.flz { padding: 0; }
details.flz > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.flz > :last-child { margin-bottom: 16px; }
.flz-kopf { display: flex; gap: 10px; align-items: center; min-height: var(--size-target-touch); padding: 8px 16px; cursor: pointer; list-style: none; }
.flz-kopf::-webkit-details-marker { display: none; }
.flz-pfeil { color: var(--text-2); transition: transform var(--motion-duration-fast) var(--motion-easing-transition); }
details[open] > .flz-kopf .flz-pfeil { transform: rotate(90deg); }
details[open] > .flz-kopf { border-bottom: 1px solid var(--rand); margin-bottom: 12px; }
.flz-kurz { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
details[open] .flz-kurz { white-space: normal; color: var(--text-2); }
.flz-status { flex: none; display: inline-flex; align-items: center; font-size: var(--type-app-caption-size); font-weight: 700; padding: 1px 7px; border: 1px solid currentColor; }
.flz-status.fehler { color: var(--schlecht); background: var(--schlecht-bg); }
.flz-status.hinweis { color: var(--warn); background: var(--warn-bg); }
.flz-status.ok { color: var(--gut); background: var(--gut-bg); }
@media (max-width: 600px) { .flz-kopf { flex-wrap: wrap; } .flz-kurz { flex-basis: 100%; order: 3; } }

/* Befunde direkt am Feld: Rahmen in Zustandsfarbe, Meldung darunter (Symbol + Text, nie nur Farbe) */
.feldmeldung { display: flex; gap: 4px; align-items: flex-start; font-size: var(--type-body-sm-size); line-height: 1.35; }
.feldmeldung .ds-icon { margin-top: 0.1em; }
.feldmeldung:empty { display: none; }
.feld-fehler > input, .feld-fehler > textarea, .feld-fehler > select { border: 2px solid var(--schlecht); }
.feld-hinweis > input, .feld-hinweis > textarea, .feld-hinweis > select { border: 2px solid var(--warn); }
fieldset.feld-fehler, fieldset.feld-hinweis, div.feld-fehler:not(.feld--hilfe), div.feld-hinweis:not(.feld--hilfe) { border-left: 3px solid; padding-left: 8px; }
fieldset.feld-fehler, div.feld-fehler { border-left-color: var(--schlecht); }
fieldset.feld-hinweis, div.feld-hinweis { border-left-color: var(--warn); }
.feld-fehler .feldmeldung { color: var(--schlecht); }
.feld-hinweis .feldmeldung { color: var(--warn); }

/* Cockpit (Schritt „Ergebnis“) */
.cockpit { margin: 0 0 28px; }
.cockpit h3 { margin-bottom: 12px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kachel { display: flex; flex-direction: column; gap: 2px; background: var(--flaeche); border: 1px solid var(--rand); border-top: 3px solid var(--marke); padding: 12px 14px; }
.kachel-label { font-size: 0.8rem; color: var(--text-2); }
.kachel-wert { font-family: var(--font-text); font-size: 1.9rem; font-weight: 650; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.kachel-unter { font-size: 0.76rem; color: var(--text-2); }
.cockpit-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 12px; margin-bottom: 12px; }
.cockpit-feld { background: var(--flaeche); border: 1px solid var(--rand); padding: 14px 16px; }
.cockpit-feld h4 { margin-bottom: 10px; color: var(--text); }
.cockpit-hinweis { margin: 10px 0 0; font-size: var(--type-body-sm-size); color: var(--text-2); }
.zeilen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zeile { display: grid; grid-template-columns: minmax(0, 11rem) 1fr auto; gap: 10px; align-items: center; font-size: var(--type-body-sm-size); }
.zeile-regel { grid-template-columns: minmax(0, 15rem) 1fr auto; }
.zeile-label { color: var(--text); overflow-wrap: anywhere; }
a.zeile-label { text-decoration: none; }
a.zeile-label:hover { text-decoration: underline; }
.zeile-wert { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 2.2em; text-align: right; }
/* Balken: ein Farbton, max. 14px, abgerundetes Datenende, gerade an der Grundlinie; Spur = hellere Stufe desselben Tons */
.balken { display: block; height: 12px; background: transparent; }
.balken-fuellung { display: block; height: 100%; background: var(--daten); border-radius: 0 4px 4px 0; min-width: 0; }
.balken.meter { background: var(--daten-spur); }
.status-marke { display: inline-flex; align-items: center; gap: 4px; font-size: var(--type-app-caption-size); font-weight: 700; white-space: nowrap; }
.status-marke.fehler, .status-marke.unbegruendet { color: var(--schlecht); }
.status-marke.hinweis, .status-marke.offen { color: var(--warn); }
.status-marke.abgedeckt { color: var(--gut); }
.status-marke.zurueckgestellt { color: var(--text-2); }
.abdeckung { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.abdeckung li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: baseline; font-size: var(--type-body-sm-size); padding-bottom: 6px; border-bottom: 1px solid var(--rand); }
.abdeckung li:last-child { border-bottom: 0; }
.abdeckung .kennung { font-weight: 700; color: var(--marke-text); }
.abdeckung-ziele { grid-column: 2 / -1; font-size: 0.76rem; color: var(--text-2); }
.abdeckung-ziele:empty { display: none; }
@media (max-width: 600px) {
  .zeile, .zeile-regel { grid-template-columns: 1fr auto; }
  .zeile .balken { grid-column: 1 / -1; grid-row: 2; }
}
@media print { .cockpit { break-inside: avoid; } }



/* KI-Brücke (AA-AEVO-001 §4.1): Dialog, Marke „KI-Entwurf“, Bestätigung */
.ki-dialog { width: min(52rem, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px; background: var(--flaeche); color: var(--text); border: 1px solid var(--rand-bedien); }
.ki-dialog::backdrop { background: var(--elevation-scrim); }
.ki-dialog h2 { margin: 0; }
.ki-dialog textarea { width: 100%; }
.ki-prompt { font-family: ui-monospace, Consolas, monospace; font-size: var(--type-body-sm-size); }
.ki-fehler { color: var(--schlecht); font-weight: 600; min-height: 1.2em; margin: 4px 0; }
.optionen-spalte { flex-direction: column; align-items: flex-start; }
.ki-marke { flex: none; font-size: var(--type-app-caption-size); font-weight: 700; padding: 1px 7px; border: 1px dashed currentColor; color: var(--warn); background: var(--warn-bg); }
.ki-marke.ki-geprueft { color: var(--text-2); background: transparent; border-style: solid; }
.ki-bestaetigen { margin-top: 8px; }
@media (max-width: 600px) { .ki-dialog { padding: 14px; } }
