/* CPM Field – Seitenstile (Bauplan S1 Schritt 10; Optik im Stil des Schulungsportals, 2026-10-19).
   Tokens: tokens.css. Keine fremden Quellen; die Schrift Carlito liegt unter statisch/schrift/.
   Reihenfolge der Geraete: Desktop, iPad, Handy (375 px). */

@font-face { font-family: "Carlito"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/statisch/schrift/carlito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/statisch/schrift/carlito-latin-700-normal.woff2") format("woff2"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--schrift); color: var(--text); font-size: 17px;
  background-color: var(--grund);
}
a { color: var(--link); }
a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
[data-theme="light"] .nur-dunkel, [data-theme="dark"] .nur-hell { display: none; }

/* Sprunglink fuer Tastatur und Screenreader */
.sprung { position: absolute; left: 16px; top: -64px; z-index: 20; padding: 12px 16px;
  border-radius: 10px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600;
  display: inline-flex; align-items: center; min-height: var(--ziel); }
.sprung:focus { top: 8px; color: var(--auf-akzent); }

/* Kopf */
.kopf { display: flex; align-items: center; justify-content: space-between; padding: 24px 48px; }
.marke { display: flex; align-items: center; gap: 10px; min-height: var(--ziel); text-decoration: none;
  color: var(--text); font-size: 19px; font-weight: 700; }
.marke svg { color: var(--akzent-deko); }
.kopf-rechts { display: flex; align-items: center; gap: 12px; }
.kopf-link { display: inline-flex; align-items: center; min-height: var(--ziel); font-size: 16px;
  font-weight: 500; padding: 0 16px; border-radius: var(--radius-knopf); text-decoration: none; }
.symbol-knopf { width: var(--ziel); height: var(--ziel); display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--kachel-rand); background: var(--kachel); color: var(--text);
  cursor: pointer; transition: transform var(--dauer-kurz), box-shadow var(--dauer-kurz); }
.symbol-knopf:hover { transform: translateY(-1px); box-shadow: var(--schatten); }
/* Zurueck zum Hub (Style-Guide 4c): links neben der Marke, unter 600 px unter der Marke. Nur auf App-Seiten,
   die den Block kopf_nach_marke fuellen; Login und Hub haben ihn nicht. */
.kopf:has(> .zurueck-hub) { flex-wrap: wrap; row-gap: 8px; }
.kopf > .marke { order: 0; }
.kopf > .zurueck-hub { order: 1; margin: 0 auto 0 20px; }
.kopf > .kopf-rechts { order: 2; }
.zurueck-hub { gap: 8px; padding: 0 20px 0 14px; font-size: 16px; white-space: nowrap; }
.zurueck-hub svg { flex: none; }

/* Inhalt: zweispaltig (Login) und schmal (alle anderen Seiten) */
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 48px; }
main.zweispaltig { gap: 96px; padding: 0 48px; }
.intro { width: 520px; display: flex; flex-direction: column; gap: 20px; }
.pille { align-self: flex-start; background: var(--akzent); color: var(--auf-akzent); font-size: 14px;
  font-weight: 600; padding: 4px 14px; border-radius: 999px; }
h1 { margin: 0; font-size: 49px; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em;
  text-wrap: balance; }
.unterzeile { margin: 0; font-size: 18px; line-height: 1.55; color: var(--leise); max-width: 460px; }
.karten { display: flex; gap: 16px; margin-top: 12px; }
.karte { width: 252px; min-height: 96px; padding: 18px 20px; border-radius: 24px;
  border: 1px solid var(--kachel-rand); border-left: 4px solid var(--akzent); background: var(--kachel);
  box-shadow: var(--schatten); }
.karte-titel, .karte-unter { display: block; }
.karte-titel { font-size: 18px; font-weight: 700; }
.karte-unter { font-size: 15px; color: var(--leise); margin-top: 4px; max-width: 190px; }

/* Kachel: Anmeldung und alle schmalen Seiten */
.flaeche { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; width: 100%;
  max-width: 600px; padding: 36px; border-radius: var(--radius-flaeche); border: 1px solid var(--kachel-rand);
  background: var(--kachel); box-shadow: var(--schatten); }
.flaeche h1 { font-size: 34px; line-height: 1.15; }
.flaeche p { margin: 0; font-size: 17px; line-height: 1.55; }
.anmeldung { width: 420px; align-items: stretch; }
h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.hinweis-klein { margin: 6px 0 0; font-size: 16px; color: var(--leise); }
form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.feld { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 15px; font-weight: 600; }
input[type="text"], input[type="password"] { width: 100%; height: var(--feld-hoehe); padding: 0 14px;
  border-radius: var(--radius-feld); border: 1px solid var(--feld-rand); background: var(--feld-grund);
  color: var(--text); font: inherit; font-size: 17px; }
input:focus { outline: none; border-color: var(--akzent); box-shadow: var(--fokus-ring); }
input[aria-invalid="true"] { border: 2px solid var(--fehler); }
.passwort { position: relative; }
.passwort input { padding-right: 52px; }
.auge { position: absolute; right: 2px; top: 2px; width: var(--ziel); height: var(--ziel); display: flex;
  align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent;
  color: var(--leise); cursor: pointer; }
.auge .strich { display: none; }
.auge[aria-pressed="true"] { color: var(--akzent); }
.auge[aria-pressed="true"] .strich { display: inline; }

/* Meldungen: Farbe nie allein, der Text sagt es immer */
.fehler, .hinweis { border: 1px solid color-mix(in srgb, var(--fehler) 30%, transparent);
  border-left: 3px solid var(--fehler); border-radius: 10px; padding: 10px 12px;
  background: var(--fehler-grund); color: var(--fehler-text); font-size: 15px; line-height: 1.45; }
.hinweis { border-color: var(--kachel-rand); border-left-color: var(--akzent);
  background: var(--grund-2); color: var(--text); }
.fehler:focus, .hinweis:focus { outline: 2px solid var(--akzent); outline-offset: 2px; }
.fehler a { color: inherit; font-weight: 600; }

/* Knoepfe (auch als Link) */
.haupt-knopf, .zweit-knopf { display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--feld-hoehe); padding: 0 28px; border-radius: var(--radius-knopf); font: inherit;
  font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform var(--dauer-kurz), box-shadow var(--dauer-kurz); }
.haupt-knopf { margin-top: 4px; border: 0; background: var(--akzent); color: var(--auf-akzent);
  box-shadow: var(--schatten-knopf); }
.haupt-knopf:hover { transform: translateY(-1px); color: var(--auf-akzent); }
.haupt-knopf:active { transform: translateY(0); }
.zweit-knopf { margin-top: 4px; border: 1px solid var(--kachel-rand); background: var(--kachel); color: var(--text); }
.zweit-knopf:hover { transform: translateY(-1px); box-shadow: var(--schatten); color: var(--text); }
/* Zurueck-Knopf ganz oben auf den Textseiten (Hilfe, Impressum, Datenschutz) */
.zweit-knopf.zurueck { gap: 6px; padding: 0 22px 0 14px; margin: 0 0 4px; align-self: flex-start; }
.anmeldung .haupt-knopf { width: 100%; }
.knopf-reihe { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 0; }
.knopf-reihe .haupt-knopf, .knopf-reihe .zweit-knopf { margin-top: 0; }
.hilfe-zeile { margin: 0; font-size: 15px; color: var(--leise); text-align: center; }
.anmeldung .hilfe-zeile { line-height: 44px; }

/* Seiten mit Formular (S1b: Passwort aendern, Reset, Admin): Titelzeile, Regelhinweis, Feldzusaetze */
main.breit .flaeche { max-width: 920px; }
.formseite { align-items: stretch; }
.titelzeile { display: flex; align-items: center; gap: 16px; min-width: 0; }
.titelzeile h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.titel-text { flex: 1; min-width: 0; }
.titel-text h1 { overflow-wrap: anywhere; }
.symbol-kachel { flex: none; width: 52px; height: 52px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; border: 0;
  background: var(--akzent-hauch); color: var(--akzent); }
.flaeche .konto-zeile { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px;
  color: var(--leise); overflow-wrap: anywhere; }
.flaeche .konto-zeile svg { flex: none; }
.titel-text .konto-zeile { margin-top: 4px; }
.flaeche .regel { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0; font-size: 15px;
  line-height: 1.45; color: var(--leise); }
.regel svg { flex: none; margin-top: 1px; }
.nur-leser { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
input[readonly] { background: var(--grund-2); }
.abschluss { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 18px;
  border-top: 1px solid var(--linie); }
.abschluss .haupt-knopf, .abschluss .zweit-knopf { margin-top: 0; }

/* Admin-Bereich: gestrichelt abgesetzt (Stilregel aus dem Hub-Entwurf), Bloecke, Sperrlisten */
.verwaltung { border-style: dashed; background: color-mix(in srgb, var(--kachel) 85%, transparent);
  box-shadow: none; }
.marke-admin { flex: none; align-self: flex-start; font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--grund-3); padding: 3px 10px; border-radius: 999px; }
.admin-block { display: flex; flex-direction: column; gap: 14px; padding-top: 20px;
  border-top: 1px solid var(--linie); }
.admin-block h2 { font-size: 21px; }
.flaeche .bestaetigt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px;
  color: var(--leise); }
.bestaetigt svg { flex: none; }
.flaeche .meta { margin: 0; font-size: 15px; line-height: 1.5; color: var(--leise); }
.sperre-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 10px; }
.sperre { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-radius: 20px; border: 1px solid var(--kachel-rand); background: var(--kachel); }
.sperre-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flaeche .sperre-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0;
  font-weight: 600; overflow-wrap: anywhere; }
.sperre-name svg { flex: none; }
.marke-status { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fehler) 40%, transparent); background: var(--fehler-grund);
  color: var(--fehler-text); }
.sperre form .zweit-knopf { margin-top: 0; white-space: nowrap; }
.zeile-form { flex-direction: row; align-items: flex-end; gap: 12px; }
.zeile-form .feld { flex: 1; min-width: 0; }
.zeile-form .zweit-knopf { margin-top: 0; flex: none; }
.zweit-knopf.gefahr { border-color: var(--fehler); color: var(--fehler-text); }
.zweit-knopf.gefahr:hover { color: var(--fehler-text); }

/* Link-Anzeige: Feld und Kopieren-Knopf */
.link-zeile { display: flex; align-items: stretch; gap: 12px; }
.link-zeile input[type="text"] { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono",
  Consolas, monospace; font-size: 15px; }
.link-zeile .zweit-knopf { flex: none; margin-top: 0; gap: 8px; }
.flaeche .kopiert { min-height: 22px; margin: 0; font-size: 15px; color: var(--leise); }

/* Konto-Menue im Kopf (Hub): <details>/<summary>, ohne Skript */
.konto-menue { position: relative; }
.konto-menue summary { display: flex; align-items: center; gap: 8px; min-height: var(--ziel);
  max-width: 220px; padding: 0 16px; border-radius: var(--radius-knopf); border: 1px solid var(--kachel-rand);
  background: var(--kachel); color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer;
  list-style: none; transition: transform var(--dauer-kurz), box-shadow var(--dauer-kurz); }
.konto-menue summary::-webkit-details-marker { display: none; }
.konto-menue summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-menue summary svg { flex: none; color: var(--akzent); }
.konto-menue summary:hover { transform: translateY(-1px); box-shadow: var(--schatten); }
.konto-menue[open] summary { border-color: var(--akzent); }
.konto-menue-inhalt { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 220px;
  display: flex; flex-direction: column; padding: 8px; border-radius: var(--radius);
  border: 1px solid var(--kachel-rand); background: var(--kachel); box-shadow: var(--schatten); }
.konto-menue form { gap: 0; }
.konto-menue-eintrag { display: flex; align-items: center; width: 100%; min-height: var(--ziel);
  padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.konto-menue-eintrag:hover { background: var(--akzent-hauch); color: var(--text); }

/* Hub (Variante B): eine Spalte, je Anwendung eine flache Zeile mit Symbol, Titel, Beschreibung, Pfeil.
   Die vorhandene .karte (Login-Kacheln) bleibt davon unberuehrt. */
.hub { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 600px; margin: 0 auto; }
.hub h1 { font-size: 40px; line-height: 1.12; overflow-wrap: anywhere; }
.hub-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hub-zeile { display: flex; align-items: center; gap: 16px; min-height: var(--ziel); padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--kachel-rand); background: var(--kachel);
  box-shadow: var(--schatten); color: var(--text); text-decoration: none;
  transition: transform var(--dauer-kurz), box-shadow var(--dauer-kurz), border-color var(--dauer-kurz); }
.hub-zeile:hover { transform: translateY(-2px); color: var(--text);
  border-color: color-mix(in srgb, var(--akzent) 45%, var(--kachel-rand)); }
.hub-zeile:active { transform: scale(.98); }
.hub-zeile:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px;
  border-color: var(--akzent); box-shadow: var(--fokus-ring), var(--schatten); }
.hub-symbol { flex: none; width: 52px; height: 52px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; background: var(--akzent-hauch); color: var(--akzent); }
.hub-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-titel { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.hub-beschreibung { font-size: 16px; line-height: 1.4; color: var(--leise); }
.hub-pfeil { flex: none; display: flex; color: var(--leise);
  transition: transform var(--dauer-kurz), color var(--dauer-kurz); }
.hub-zeile:hover .hub-pfeil, .hub-zeile:focus-visible .hub-pfeil { color: var(--akzent); transform: translateX(2px); }
.hub-leer { margin: 0; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--kachel-rand);
  border-left: 3px solid var(--akzent); background: var(--kachel); font-size: 17px; line-height: 1.55; }

/* Fuss */
.fuss { display: flex; align-items: center; justify-content: space-between; padding: 20px 48px;
  font-size: 15px; color: var(--leise); }
.fuss nav { display: flex; gap: 20px; }
.fuss a { display: inline-flex; align-items: center; min-height: var(--ziel); color: var(--leise); }

/* iPad quer und schmale Laptops: Spalten enger */
@media (max-width: 1180px) {
  main.zweispaltig { gap: 48px; padding: 0 32px; }
  .intro { width: 420px; }
  .karten { flex-direction: column; }
  .karte { width: 100%; max-width: 280px; }
}

/* iPad hoch und Handy: eine Spalte */
@media (max-width: 960px) {
  .kopf { padding: 12px 16px; }
  main, main.zweispaltig { flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 20px; padding: 8px 16px 0; }
  main { padding-bottom: 8px; }
  .intro { width: auto; gap: 10px; }
  .pille, .karten { display: none; }
  .flaeche .pille { display: inline-block; }
  h1 { font-size: 32px; line-height: 1.12; }
  .flaeche h1 { font-size: 28px; }
  .hub h1 { font-size: 32px; }
  .unterzeile { font-size: 17px; }
  .flaeche { width: auto; max-width: none; padding: 24px 20px; }
  .anmeldung { width: auto; }
  main.breit .flaeche { max-width: none; }
  h2 { font-size: 23px; }
  .admin-block h2 { font-size: 20px; }
  .fuss { flex-direction: column; gap: 4px; padding: 16px 16px 24px; }
  .fuss nav { flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
}

/* iPad hoch: die Anmeldung bleibt ein ruhiges Kartenformat in der Mitte */
@media (min-width: 600px) and (max-width: 960px) {
  main, main.zweispaltig { justify-content: center; }
  main.zweispaltig .intro, main.zweispaltig .anmeldung { width: 100%; max-width: 520px; margin: 0 auto; }
  main.schmal .flaeche { max-width: 560px; margin: 0 auto; }
  main.breit .flaeche { max-width: 720px; margin: 0 auto; }
  main .formseite { width: 100%; }
}

/* Handy: Zurueck zum Hub unter der Marke */
@media (max-width: 600px) {
  .kopf > .zurueck-hub { order: 3; flex: 0 0 100%; margin: 0; }
}

/* Handy (375 px): Spalten werden Stapel, Knoepfe volle Breite, Ziele bleiben mindestens 44 px */
@media (max-width: 480px) {
  .flaeche { padding: 20px 16px; gap: 16px; }
  .formseite { gap: 16px; }
  .titelzeile { gap: 12px; flex-wrap: wrap; }
  .symbol-kachel { width: 44px; height: 44px; }
  .flaeche h1 { font-size: 26px; }
  .titel-text { flex: 1 1 calc(100% - 56px); }
  .marke-admin { order: 3; margin-left: 56px; }
  .sperre { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .sperre form .zweit-knopf { width: 100%; }
  .zeile-form { flex-direction: column; align-items: stretch; }
  .zeile-form .zweit-knopf { width: 100%; }
  .link-feld .link-zeile { flex-direction: column; }
  .link-feld .link-zeile input[type="text"] { flex: none; }
  .link-feld .zweit-knopf { width: 100%; }
  .knopf-reihe { flex-direction: column; align-items: stretch; }
  .knopf-reihe .haupt-knopf, .knopf-reihe .zweit-knopf, .knopf-reihe form { width: 100%; }
  .abschluss { flex-direction: column; align-items: stretch; }
  .abschluss form, .abschluss .zweit-knopf, .abschluss .haupt-knopf { width: 100%; }
  .hub { gap: 18px; }
  .hub h1 { font-size: 28px; }
  .hub-zeile { gap: 12px; padding: 14px 16px; }
  .hub-symbol { width: 44px; height: 44px; }
  .hub-titel { font-size: 18px; }
  .hub-beschreibung { font-size: 15px; }
  .kopf-rechts { gap: 8px; }
  .marke { font-size: 17px; white-space: nowrap; }
  .konto-menue summary { max-width: 112px; padding: 0 12px; }
}
