/*
 * IDA public-forms -- Stylesheet "Apple-Look fuer Teilnehmende" (Kette 16, Entwurf Sven auf der Design-Canvas
 * "IDA Teilnehmer-Konto - Apple-Look Entwurf", abgenommen 14.11.2026). Gilt NUR fuer die Seiten im Umfang:
 * oeffentliche Programmseite (/p/...), Rahmen des Anmeldeformulars, alle Seiten des Teilnehmer-Kontos (/konto/...)
 * samt Anmeldeseite. Diese Seiten laden apfel.css STATT forms.css (pageHtml(..., { stil: "apfel" })). Seit Kette 17
 * gilt das auch fuer die Formularseiten /f/ /d/ /a/, die Startseite und die Fehlerseiten (Block "Kette 17" unten);
 * forms.css wird von keiner Seite mehr geladen und bleibt nur fuer den Rueckweg liegen.
 *
 * Die Werte unten stammen woertlich aus dem Auftrag (Farben, Groessen, Radien). Nicht im Entwurf genannte Werte sind
 * mit "nicht im Entwurf" markiert und stehen im Bericht der Kette 16.
 *
 * Mandant: /marke/<mandant>/stil.css setzt --akzent (Flaeche des Hauptknopfs, Weiss darauf >= 4,5:1, sonst automatisch
 * abgedunkelt), --akzent-schrift-hell (Akzent als Schrift auf hellem Grund) und --akzent-schrift-dunkel (aufgehellt,
 * >= 4,5:1 auf #1C1C1E). Berechnung und Pruefung: src/lib/marke.ts.
 *
 * CSP: keine Inline-Stile, keine Schriftdateien, keine externen Verweise.
 */

:root {
  color-scheme: light dark;
  --grund: #f2f2f7;
  --karte: #ffffff;
  --text: #000000;
  --sek: #6c6c70;
  --trenner: #c6c6c8;
  --flaeche: #e3e3e8;
  --pfeil: #b5b5ba;
  --akzent: #0076bd;                 /* Standard ohne Mandantenfarbe (IDA-Blau, Weiss darauf 4,9:1) -- nicht im Entwurf */
  --akzent-schrift-hell: #006aaa;    /* aus marke.ts apfelWerte: >= 4,5:1 auf Grund, Karte und Flaeche */
  --akzent-schrift-dunkel: #459bcf;  /* >= 4,5:1 auf #000, #1c1c1e und #2c2c2e */
  --akzent-schrift: var(--akzent-schrift-hell);
  --akzent-text: #ffffff;
  --frei-punkt: #248a3d;
  --frei-wort: #1e6b30;
  --wenige-punkt: #c76a00;
  --wenige-wort: #8a4b00;
  --grau-punkt: #8e8e93;             /* Warteliste, ausgebucht: grau -- Ton nicht im Entwurf */
  --zaehler: #d70015;
  --info-grund: #fff4e0;
  --info-text: #6b3a00;
  --fehler: #b3261e;                 /* nicht im Entwurf */
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-karte: 12px;
  --tab-hoehe: 0px;
  --dauer: 120ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #000000;
    --karte: #1c1c1e;
    --text: #ffffff;
    --sek: #aeaeb2;
    --trenner: #38383a;
    --flaeche: #2c2c2e;
    --pfeil: #636366;                /* nicht im Entwurf */
    --akzent-schrift: var(--akzent-schrift-dunkel);
    --frei-wort: #ffffff;            /* Wort in Textfarbe, der Punkt traegt die Farbe -- nicht im Entwurf */
    --wenige-wort: #ffffff;
    --fehler: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 22px;
}

/* ------------------------------------------------------------------------------------------------ Grundelemente */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + var(--tab-hoehe) + var(--aktion-hoehe, 0px) + env(safe-area-inset-bottom, 0px));
}

h1 {
  margin: 8px 0 8px;
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: 0;
}

h1.detail {
  font-size: 28px;
  line-height: 34px;
}

h2 {
  margin: 24px 16px 8px;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--akzent-schrift);
  text-decoration: none;
  transition: color var(--dauer) ease-out;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--akzent-schrift);
  outline-offset: 2px;
}

small,
.fussnote {
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
}

.unter {
  color: var(--sek);
  font-size: 15px;
  line-height: 20px;
}

.bild {
  color: var(--sek);
  font-size: 12px;
  line-height: 16px;
}

.nur-leser {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.symbol {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------------------------------- Gruppierte Listen */
/* Abschnittstitel: 13 px, Grossbuchstaben, sekundaer (h2 traegt dieselben Werte) */
.abschnitt {
  margin: 24px 16px 8px;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

.gruppe {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  background: var(--karte);
  border-radius: var(--radius-karte);
  overflow: hidden;
}

.gruppe > li,
.gruppe > .zeile {
  position: relative;
  margin: 0;
}

/* Trenner 0,5 px, 16 px eingerueckt */
.gruppe > li + li::before,
.gruppe > .zeile + .zeile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  background: var(--trenner);
}

.zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--text);
}

a.zeile:hover {
  text-decoration: none;
  background: var(--flaeche);
}

.zeile.hoch {
  min-height: 64px;
}

.zeile-text {
  flex: 1 1 auto;
  min-width: 0;
}

.zeile-titel {
  display: block;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

.zeile-titel.normal {
  font-weight: 400;
}

.zeile-unter {
  display: block;
  color: var(--sek);
  font-size: 15px;
  line-height: 20px;
}

.zeile-wert {
  flex: none;
  max-width: 55%;
  color: var(--sek);
  text-align: right;
  overflow-wrap: anywhere;
}

.zeile .pfeil {
  flex: none;
  width: 8px;
  height: 14px;
  fill: none;
  stroke: var(--pfeil);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zeile > .symbol {
  color: var(--akzent-schrift);
}

/* Karte mit freiem Inhalt (Text, Formular) */
.karte {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--karte);
  border-radius: var(--radius-karte);
}

.karte > :last-child {
  margin-bottom: 0;
}

.karte h2,
.karte .abschnitt {
  margin: 0 0 8px;
}

/* Angaben (Bezeichnung links, Wert rechts) als gruppierte Liste */
dl.gruppe {
  display: block;
}

dl.gruppe > div {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin: 0;
  padding: 11px 16px;
}

dl.gruppe > div + div::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  background: var(--trenner);
}

dl.gruppe dt {
  flex: none;
  max-width: 45%;
}

dl.gruppe dd {
  margin: 0;
  color: var(--sek);
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------------------------------- Umschalter */
.umschalter {
  display: flex;
  margin: 0 0 16px;
  padding: 2px;
  list-style: none;
  background: var(--flaeche);
  border-radius: 9px;
}

.umschalter li {
  flex: 1 1 0;
  margin: 0;
}

.umschalter a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  text-align: center;
  border-radius: 7px;
}

.umschalter a:hover {
  text-decoration: none;
}

.umschalter a[aria-current="true"] {
  background: var(--karte);
  font-weight: 600;
}

/* ------------------------------------------------------------------------------------------------------ Suchfeld */
.suche {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.suche input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
  background: var(--flaeche);
  border: 0;
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
}

.suche input::placeholder {
  color: var(--sek);
}

.suche button {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  color: var(--akzent-schrift);
  font: inherit;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

/* -------------------------------------------------------------------------------------- Status: Punkt plus Wort */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sek);
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
}

.punkt {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grau-punkt);
}

.status-frei {
  color: var(--frei-wort);
}

.status-frei .punkt {
  background: var(--frei-punkt);
}

.status-wenige {
  color: var(--wenige-wort);
}

.status-wenige .punkt {
  background: var(--wenige-punkt);
}

/* Warteliste und ausgebucht: grau (Punkt und Wort) */

/* -------------------------------------------------------------------------------------------------------- Zaehler */
.zahl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  color: #ffffff;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  background: var(--zaehler);
  border-radius: 10px;
}

/* ----------------------------------------------------------------------------------- Info-Zeile (Muster-Hinweis) */
.info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  color: var(--info-text);
  font-size: 15px;
  line-height: 20px;
  background: var(--info-grund);
  border-radius: var(--radius-karte);
}

.info .symbol {
  width: 20px;
  height: 20px;
}

.info p {
  margin: 0;
}

.info a {
  color: inherit;
  text-decoration: underline;
}

/* Rueckmeldungen (Erfolg, Hinweis, Fehler) als Karte */
.meldung,
.hinweis {
  margin: 0 0 16px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 20px;
  background: var(--karte);
  border-radius: var(--radius-karte);
}

.meldung.fehler,
.fehler {
  color: var(--fehler);
}

.leer {
  margin: 0 0 16px;
  padding: 24px 16px;
  color: var(--sek);
  text-align: center;
  background: var(--karte);
  border-radius: var(--radius-karte);
}

/* -------------------------------------------------------------------------------------------------------- Knoepfe */
button {
  font-family: inherit;
}

.knopf,
button[type="submit"]:not([class]) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  color: var(--akzent-text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  background: var(--akzent);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: filter var(--dauer) ease-out;
}

/* Hover dunkelt ab (Kontrast steigt). Eine Aufhellung/Transparenz druckte Weiss auf Akzent unter 4,5:1 (Befund der Probe). */
.knopf:hover,
button[type="submit"]:not([class]):hover {
  text-decoration: none;
  filter: brightness(0.92);
}

/* Nebenaktion: Text in Akzentfarbe, Tippflaeche 44 px */
.knopf-zweit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--akzent-schrift);
  font: inherit;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.knopf-zweit:hover {
  text-decoration: none;
  background: var(--flaeche);
}

.knopf-zweit.gefahr {
  color: var(--fehler);
}

.knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

/* Feste Aktionsleiste unten mit Hauptknopf (Detailseiten). Auf dem Telefon ueber der Tab-Leiste. */
.aktionsleiste {
  position: fixed;
  right: 0;
  bottom: calc(var(--tab-hoehe) + env(safe-area-inset-bottom, 0px));
  left: 0;
  z-index: 5;
  padding: 12px 16px;
  background: var(--karte);
  border-top: 0.5px solid var(--trenner);
}

.aktionsleiste > * {
  max-width: 728px;
  margin: 0 auto;
}

.aktionsleiste form,
.aktionsleiste p {
  margin: 0 auto;
}

body.mit-aktion {
  --aktion-hoehe: 74px;
}

/* --------------------------------------------------------------------------------- Zurueck-Link (Detailseiten) */
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: 0 0 0 -4px;
  color: var(--akzent-schrift);
}

.zurueck .pfeil {
  width: 10px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------------- Termine mit Datumsblock */
.datum {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
}

.datum-monat {
  color: var(--akzent-schrift);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.datum-tag {
  font-size: 22px;
  line-height: 26px;
  font-weight: 600;
}

/* ------------------------------------------------------------------------------------------------------ Formulare */
/* Gruppiertes Feld: Beschriftung und Eingabe in einer Karte */
.feld {
  margin: 0 0 16px;
  padding: 8px 16px 6px;
  background: var(--karte);
  border-radius: var(--radius-karte);
}

.feld label {
  display: block;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
}

.feld input,
.feld select,
.feld textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  color: var(--text);
  font: inherit;
  background: none;
  border: 0;
  border-radius: 6px;
}

.feld + .fussnote,
.gruppe + .fussnote {
  margin: -8px 16px 16px;
}

/* Elementbasierte Formulare (Rahmen des Anmeldeformulars: die Felder erzeugt der Bestand ohne Klassen) */
fieldset {
  min-width: 0;
  margin: 0 0 16px;
  padding: 16px;
  background: var(--karte);
  border: 0;
  border-radius: var(--radius-karte);
}

legend {
  float: left;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}

legend + * {
  clear: both;
}

label {
  font-size: 15px;
  line-height: 20px;
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--text);
  font: inherit;
  background: var(--grund);
  border: 0.5px solid var(--trenner);
  border-radius: 10px;
}

.feld input,
.feld select,
.feld textarea {
  padding: 0;
  background: none;
  border: 0;
}

input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0 8px 0 0;
  vertical-align: middle;
  accent-color: var(--akzent);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* --------------------------------------------------------------------------------------------- Tabellen im Bestand */
table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  background: var(--karte);
  border-radius: var(--radius-karte);
  overflow: hidden;
}

caption {
  padding: 0 16px 8px;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  text-transform: uppercase;
  background: var(--grund);
}

th,
td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 0.5px solid var(--trenner);
}

thead th {
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  border-top: 0;
}

tbody tr:first-child td,
tbody tr:first-child th {
  border-top: 0;
}

thead + tbody tr:first-child td,
thead + tbody tr:first-child th {
  border-top: 0.5px solid var(--trenner);
}

/* Aufklappbare Zeilen ohne Skript */
details {
  margin: 0 0 16px;
  background: var(--karte);
  border-radius: var(--radius-karte);
  overflow: hidden;
}

summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

details > :not(summary) {
  margin-right: 16px;
  margin-left: 16px;
}

details[open] > summary {
  border-bottom: 0.5px solid var(--trenner);
  margin-bottom: 12px;
}

/* ------------------------------------------------------------------------------------------ Rahmen: Kopf, Fusszeile */
.fuss {
  margin: 24px 16px 0;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.fuss a {
  display: inline-block;
  min-height: 44px;
  padding: 13px 4px;
  color: var(--sek);
  text-decoration: underline;
}

.provider {
  margin: 0 16px 16px;
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
}

/* Kopf oeffentlicher Seiten (Programm): Logo-Kachel und Name des Mandanten */
.seitenkopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
}

.logo-kachel {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--karte);
  border-radius: 10px;
  overflow: hidden;
}

.logo-kachel img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-kachel.gross {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.seitenkopf .name {
  color: var(--sek);
  font-size: 15px;
  line-height: 20px;
}

/* ------------------------------------------------------------------------------------------------- Anmeldeseite */
main.anmeldung {
  max-width: 440px;
  padding-top: 48px;
}

main.anmeldung .logo-kachel {
  margin: 0 auto 16px;
}

main.anmeldung h1 {
  text-align: center;
}

main.anmeldung .einleitung {
  margin: 0 0 24px;
  color: var(--sek);
  text-align: center;
}

main.anmeldung .neu {
  margin: 16px 0;
  text-align: center;
}

main.anmeldung .neu a,
main.anmeldung .weg a {
  display: inline-block;
  min-height: 44px;
  padding: 11px 4px;
}

main.anmeldung .weg {
  margin: 8px 0 0;
  text-align: center;
}

/* ------------------------------------------------------------------------------------- Konto: Leiste und Tab-Leiste */
/* Telefon (unter 1024 px): Kopfzeile oben, Tab-Leiste unten. Desktop: Seitenleiste 272 px, Inhalt max. 760 px mittig. */
body.konto {
  --tab-hoehe: 56px;
}

.leiste {
  display: none;
}

.tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  background: var(--karte);
  border-top: 0.5px solid var(--trenner);
}

.tabs ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs li {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.tabs a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 4px 0;
  color: var(--sek);
  font-size: 10px;
  line-height: 12px;
  text-align: center;
}

.tabs a span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs a:hover {
  text-decoration: none;
}

.tabs a[aria-current] {
  color: var(--akzent-schrift);
}

.tabs .zahl {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
}

.kontokopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
}

.kontokopf .bereich {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--sek);
  font-size: 15px;
  line-height: 20px;
}

.kontokopf .bereich a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sek);
}

.kontokopf form {
  margin: 0;
}

/* === Agent A: Programm- und Seminarseiten (Kette 16 Scheibe 02) === */
/* Aktionen je Eintrag unter der Zeile (Anmelden, Warteliste, Storno, Austragen, Bescheinigung): echte Knoepfe und Links
   mit 44 px Tippflaeche (.knopf-zweit) -- nicht im Entwurf (dort fuehrt die Zeile nur zur Detailseite) */
.zeile-aktion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0 4px;
  padding: 0 4px 4px 16px;
}
.zeile-aktion form {
  margin: 0;
}
.zeile-aktion .unter {
  padding: 4px 12px;
}
/* Abschnittstitel mit Nebenaktion rechts (Sortierung der Liste) */
.abschnitt-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 0 0;
}
.abschnitt-kopf .abschnitt {
  flex: 1 1 auto;
}
.abschnitt-kopf .knopf-zweit {
  flex: none;
  font-size: 15px;
  line-height: 20px;
}
/* Gruppierte Liste in einer aufklappbaren Zeile (Mein Team): buendig mit der Zeile darueber */
details > .gruppe {
  margin-right: 0;
  margin-left: 0;
}
details > :last-child {
  margin-bottom: 12px;
}
/* Auswahl und Knoepfe in einer Karte (Zu bestaetigen, fruehere Anmeldungen) */
.karte fieldset {
  margin: 0 0 12px;
  padding: 0;
}
.karte fieldset label {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.karte .knoepfe {
  margin: 0 -12px;
}
/* Warteliste und ausgebucht: grau wie der Grundwert von .status (eigene Regel, damit die Klassen im Stylesheet stehen) */
.status-warteliste,
.status-ausgebucht {
  color: var(--sek);
}
/* === Ende Agent A === */

/* === Agent B: uebrige Konto-Seiten (Kette 16 Scheibe 03) === */
/* Zeile mit Nebenaktion: Textteil (Link oder Flaeche) fuellt, der Knopf steht rechts daneben */
.gruppe > li.zeile-knopf {
  display: flex;
  align-items: center;
}

.zeile-knopf > .zeile {
  flex: 1 1 auto;
  min-width: 0;
}

.zeile-knopf > .knopf-zweit {
  flex: none;
  margin-right: 4px;
}

/* Fussnoten unter einer Karte und unter der Anbieterzeile: eingerueckt wie unter einer gruppierten Liste */
.karte + .fussnote,
.karte + .fussnote + .fussnote {
  margin: -8px 16px 16px;
}

/* … ebenso unter einem Formular, das eine gruppierte Liste umschliesst, und unter einem Leertext */
form + .fussnote,
.leer + .fussnote {
  margin: -8px 16px 16px;
}

.provider + .fussnote,
.info + .fussnote {
  margin: 0 16px 16px;
}

.abschnitt + .fussnote {
  margin: 0 16px 8px;
}

/* Formular als Karte: Abstand zwischen Beschriftung und Eingabe */
.karte label + br + input,
.karte label + br + select,
.karte label + br + textarea {
  margin-top: 4px;
}

/* QR-Code des zweiten Faktors: Karte, Bild mittig auf Weiss (lesbar auch im Dunkelmodus), Schluessel als Fussnote */
.qr {
  margin: 0 0 16px;
  padding: 16px;
  text-align: center;
  background: var(--karte);
  border-radius: var(--radius-karte);
}

/* Kette 18 (Befund 15.11.2026): Der QR-Code braucht rundum Weiss (Ruhezone, mindestens vier Module) -- auch im Dunkelmodus --
   und darf nicht zu klein werden. bot-core liefert zwei Module Rand im Bild; 16 px weisser Innenabstand ergaenzen ihn auf
   mehr als vier. content-box: die 264 px gelten dem Code selbst (Modul rund 4 px bei 65 Modulen). Skaliert wird ueber das
   viewBox, das konto-daten.ts ergaenzt. */
.qr svg {
  display: block;
  box-sizing: content-box;
  width: calc(100% - 32px);
  max-width: 264px;
  height: auto;
  margin: 0 auto 12px;
  padding: 16px;
  background: #ffffff;
}

.qr figcaption {
  color: var(--sek);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.qr code {
  font: inherit;
}
/* === Ende Agent B === */

@media (min-width: 1024px) {
  body.konto {
    --tab-hoehe: 0px;
    padding-left: 272px;
  }

  .tabs,
  .kontokopf {
    display: none;
  }

  .leiste {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 272px;
    padding: 20px 12px 12px;
    background: var(--karte);
    border-right: 0.5px solid var(--trenner);
    overflow-y: auto;
  }

  .leiste-kopf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
    color: var(--text);
    font-weight: 600;
  }

  .leiste-kopf:hover {
    text-decoration: none;
  }

  .leiste .suche {
    margin: 0;
  }

  .leiste nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .leiste nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--text);
    border-radius: 10px;
  }

  .leiste nav a .symbol {
    color: var(--akzent-schrift);
  }

  .leiste nav a:hover {
    text-decoration: none;
    background: var(--flaeche);
  }

  .leiste nav a[aria-current="page"] {
    color: var(--akzent-schrift);
    font-weight: 600;
    background: var(--flaeche);
  }

  .leiste nav a .zahl {
    margin-left: auto;
  }

  .leiste .abschnitt {
    margin: 0 12px 4px;
  }

  .nutzerkarte {
    margin-top: auto;
    padding: 12px;
    background: var(--grund);
    border-radius: var(--radius-karte);
  }

  .nutzerkarte .name {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .nutzerkarte .adresse {
    display: block;
    color: var(--sek);
    font-size: 13px;
    line-height: 18px;
    overflow-wrap: anywhere;
  }

  .nutzerkarte form {
    margin: 8px 0 0;
  }

  .nutzerkarte .knopf-zweit {
    width: 100%;
    justify-content: flex-start;
    padding: 0;
  }

  /* Kette 17: nur mit Seitenleiste (Konto) einruecken; /p/…/e/… und /a/ haben keine Leiste -- sonst sitzt der Knopf neben dem Inhalt */
  body.konto .aktionsleiste {
    left: 272px;
  }

  main {
    padding-top: 32px;
  }
}

/* === Kette 17: Formularseiten /f/, /d/, /a/ (Scheibe 01) === */
/* Nur Bausteine und Werte des Entwurfs (Karte, Fussnote 13/18, Tippflaeche 44 px); keine neuen Farben, Groessen, Radien. */
/* Rahmen der Felder (form oder, ohne Absenden, div): Fehler, Hilfetext und Pflichtfeld-Legende stehen als Fussnoten
   eingerueckt unter ihrer Karte */
.formular > .fussnote {
  margin: -8px 16px 16px;
}

/* Wahlzeile (Checkbox mit Beschriftung): die ganze Zeile ist Tippflaeche, mindestens 44 px; mehrzeilige Texte laufen
   neben dem Kaestchen weiter */
.wahl {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  padding: 11px 0;
}

.wahl input {
  flex: none;
  margin-top: -1px;
}

/* Karte mit einer Wahlzeile bzw. Gruppe von Wahlzeilen (fieldset): der Innenabstand oben und unten kommt aus der Zeile */
.karte.wahlen {
  padding-top: 5px;
  padding-bottom: 5px;
}

fieldset.wahlen {
  padding-bottom: 5px;
}

fieldset.wahlen > .fussnote {
  margin: 0 0 4px;
}

/* Mehrzeilige Eingabe im gruppierten Feld */
.feld textarea {
  min-height: 120px;
  padding: 4px 0;
  resize: vertical;
}

/* Formular als Karte (fieldset: Signatur, Ablehnen): Abstand zwischen Beschriftung und Eingabe, Nebenknopf buendig,
   kein Abstand unter dem letzten Element -- wie in .karte */
.formular fieldset label + br + input,
.formular fieldset label + br + textarea {
  margin-top: 4px;
}

.formular fieldset .knoepfe {
  margin: 0 -12px;
}

.formular fieldset > :last-child {
  margin-bottom: 0;
}

/* Hauptknopf am Ende des Formulars: Abstand zur Ablehnen-Karte bzw. zum Seitenende */
.formular > .knopf {
  margin: 0 0 16px;
}
/* === Ende Kette 17 Scheibe 01 === */

/* === Kette 17: Aktionen je Kurs nur auf der Detailseite (Scheibe 02) === */
/* Nebenaktionen des eigenen Kontos zu einem Kurs im Inhalt der Detailseite (Stornieren, Rücktritt anfragen, Austragen,
   Bescheinigung): Reihe wie .knoepfe, Knoepfe (.knopf-zweit, 44 px) und Hinweistext auf einer Linie */
.aktionen {
  align-items: center;
}

.aktionen form {
  margin: 0;
}

.aktionen .unter {
  padding: 0 12px;
}
/* === Ende Kette 17 Scheibe 02 === */

/* === Tab 1 (Befunde der Browser-Probe, Kette 16) === */
/* Lange Woerter in Titeln brechen nur, wenn sie allein nicht in die Zeile passen (vorher mitten im Wort). */
.zeile-titel,
.zeile-unter,
h1 {
  overflow-wrap: break-word;
}

/* Telefon: Der Status steht unter dem Untertitel statt rechts neben dem Titel -- rechts bliebe dem Titel zu wenig Platz
   (Befund bei 375 px: "Kraeuterwanderun g"). Reihenfolge im Markup und fuer Screenreader unveraendert. */
@media (max-width: 599px) {
  .zeile:has(> .status) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0;
    row-gap: 2px;
  }

  .zeile:has(> .status) > .datum,
  .zeile:has(> .status) > .symbol {
    grid-row: 1 / span 2;
    grid-column: 1;
    margin-right: 12px;
  }

  .zeile:has(> .status) > .zeile-text {
    grid-row: 1;
    grid-column: 2;
  }

  .zeile:has(> .status) > .status {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
  }

  .zeile:has(> .status) > .pfeil {
    grid-row: 1 / span 2;
    grid-column: 3;
    margin-left: 12px;
  }

  .zeile:has(> .status) > .zeile-wert {
    grid-row: 2;
    grid-column: 2;
    max-width: none;
    text-align: left;
  }
}
/* Verweise im Fliesstext sind unterstrichen (nicht nur durch Farbe erkennbar, WCAG 1.4.1) -- Befund der Probe. */
p > a:not([class]),
.leer a,
.hinweis a,
.meldung a,
.karte p a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
/* === Ende Tab 1 === */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
