/* Staffel · Komponenten. Tokens in tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--font-titel); font-weight: 600; line-height: var(--lh-titel); margin: 0; color: var(--ink); }
h1 { font-size: clamp(2rem, 6vw, var(--fs-h1)); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.625rem, 4.5vw, var(--fs-h2)); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s4); max-width: 38em; }
a { color: var(--salbei); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--salbei-dunkel); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--s4); top: -4rem; z-index: 20;
  background: var(--ink); color: var(--white); padding: var(--s3) var(--s4); border-radius: var(--radius);
}
.skip:focus { top: var(--s4); color: var(--white); }

/* Kopf */
.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s3) var(--rand); border-bottom: 1px solid var(--line); background: var(--paper);
}
.marke { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); }
.marke svg { flex: none; }
.marke b { font-family: var(--font-titel); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.01em; }
.marke small { display: block; font-size: var(--fs-klein); color: var(--ink-2); line-height: 1.2; }
.proto {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
  font-size: var(--fs-klein); color: var(--ink);
  background: var(--ocker-hell); border-bottom: 1px solid var(--line); padding: var(--s2) var(--rand);
}
.proto strong { color: var(--ocker); }

/* Rahmen und Navigation: mobil unten, ab 900 px links */
.rahmen { display: block; padding-bottom: 5.5rem; }
.reiter {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--karton); border-top: 1px solid var(--rahmen);
  padding-bottom: env(safe-area-inset-bottom);
}
.reiter a {
  display: flex; align-items: center; justify-content: center; min-height: 3.5rem;
  padding: var(--s2) var(--s1); text-align: center; text-decoration: none;
  color: var(--ink); font-size: 1rem; font-weight: 600;
  border-top: 4px solid transparent;
}
.reiter a[aria-current="page"] { border-top-color: var(--salbei); color: var(--salbei-dunkel); background: var(--paper); }
.reiter a:focus-visible { outline-offset: -4px; }

main { padding: var(--s5) var(--rand) var(--s7); max-width: var(--inhalt-max); }
main:focus { outline: none; }
.kontext { display: none; }

@media (min-width: 900px) {
  .rahmen {
    display: grid; padding-bottom: 0;
    grid-template-columns: var(--nav-breite) minmax(0, 1fr);
    min-height: calc(100vh - 7rem);
  }
  .reiter {
    position: sticky; top: 0; align-self: start; inset: auto;
    display: flex; flex-direction: column; gap: var(--s1);
    border-top: 0; border-right: 1px solid var(--line); padding: var(--s5) 0; min-height: calc(100vh - 7rem);
  }
  .reiter a {
    justify-content: flex-start; text-align: left; padding: var(--s3) var(--s5);
    border-top: 0; border-left: 4px solid transparent; font-size: var(--fs-text);
  }
  .reiter a[aria-current="page"] { border-left-color: var(--salbei); }
  main { padding: var(--s6) var(--s6) var(--s7); }
}
@media (min-width: 1240px) {
  .rahmen { grid-template-columns: var(--nav-breite) minmax(0, var(--inhalt-max)) var(--kontext-breite); column-gap: var(--s6); }
  .kontext {
    display: block; padding: var(--s6) var(--s5) var(--s6) 0;
    position: sticky; top: 0; align-self: start;
  }
}

/* Typo-Bausteine */
.kicker { font-size: var(--fs-klein); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 var(--s2); }
.lead { font-size: var(--fs-gross); color: var(--ink); margin-top: var(--s3); }
.neben { color: var(--ink-2); }
.quelle { font-size: var(--fs-klein); color: var(--ink-2); }
.abschnitt { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.abschnitt > h2 { margin-bottom: var(--s3); font-size: var(--fs-h3); }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--ziel); padding: var(--s2) var(--s5);
  border-radius: var(--radius); border: 2px solid var(--salbei);
  background: var(--salbei); color: var(--white); font-weight: 700; cursor: pointer; text-decoration: none;
}
.knopf:hover { background: var(--salbei-dunkel); border-color: var(--salbei-dunkel); color: var(--white); }
.knopf.zweit { background: transparent; color: var(--salbei-dunkel); }
.knopf.zweit:hover { background: var(--salbei-hell); color: var(--salbei-dunkel); }
.knopf.warn { background: var(--ziegel); border-color: var(--ziegel); }
.knopf.klein { min-height: 2.75rem; padding: var(--s1) var(--s4); font-size: 1rem; }
.knopf.text {
  background: none; border-color: transparent; color: var(--salbei-dunkel);
  padding-inline: var(--s3); text-decoration: underline; text-underline-offset: 0.18em;
}
.knopf.text:hover { background: var(--salbei-hell); }
.knopf[disabled] { opacity: 0.55; cursor: not-allowed; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s4); }

/* Personenmarke: Farbe + Initialen + Name */
.pm { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; }
.pm i {
  font-style: normal; display: inline-grid; place-items: center;
  min-width: 2rem; height: 2rem; padding: 0 0.3rem; border-radius: 1rem;
  background: var(--pc, var(--ink-2)); color: var(--white); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em;
}
.p0 { --pc: var(--p0); } .p1 { --pc: var(--p1); } .p2 { --pc: var(--p2); }
.p3 { --pc: var(--p3); } .p4 { --pc: var(--p4); } .p5 { --pc: var(--p5); }
.offen-marke {
  display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; color: var(--ziegel);
}
.offen-marke::before {
  content: ""; width: 2rem; height: 2rem; border-radius: 1rem; flex: none;
  border: 2px solid var(--ziegel); background: var(--schraffur), var(--ziegel-hell);
}

/* Staffelband */
.band { list-style: none; margin: var(--s5) 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.band > li { display: flex; flex-direction: column; min-width: 0; }
.band .tag { font-size: 0.9375rem; font-weight: 700; text-align: center; padding-bottom: var(--s1); color: var(--ink-2); }
.band .tag b { display: block; font-size: 1.125rem; color: var(--ink); }
.band .heute .tag b { color: var(--salbei-dunkel); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
.band ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.band ul:empty::after { content: "–"; display: grid; place-items: center; min-height: 2.75rem; color: var(--ink-2); border-top: 2px dotted var(--line); }
.seg {
  display: flex; align-items: center; justify-content: center; min-height: 2.75rem;
  background: var(--pc); color: var(--white); font-weight: 700; font-size: 0.9375rem;
  text-decoration: none; border-radius: 2px;
}
.seg:hover { color: var(--white); filter: brightness(0.92); }
.seg.offen { background: var(--schraffur), var(--ziegel-hell); color: var(--ziegel); border: 2px solid var(--ziegel); }
.seg.offen span { background: var(--ziegel-hell); padding: 0 0.2em; }
.legende { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); list-style: none; padding: 0; margin: var(--s3) 0 0; font-size: 1rem; }

/* Zusammenfassung */
.satz { font-size: var(--fs-gross); margin: var(--s4) 0 0; }
.satz strong.rot { color: var(--ziegel); }

/* Listen von Aufgaben */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li {
  display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: var(--s1) var(--s3);
  padding: var(--s3) 0; border-bottom: 1px solid var(--line); align-items: start;
}
.liste .zeit { font-weight: 700; color: var(--ink-2); padding-top: 0.15rem; }
.liste .was { font-weight: 600; }
.liste .wer { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }
.liste li.ist-offen { background: linear-gradient(90deg, var(--ziegel-hell), transparent 70%); }
.leer { color: var(--ink-2); padding: var(--s3) 0; border-bottom: 1px solid var(--line); margin: 0; }

.tagblock { scroll-margin-top: var(--s5); }
.tagblock + .tagblock { margin-top: var(--s5); }
.tagkopf { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); border-bottom: 2px solid var(--ink); padding-bottom: var(--s1); }
.tagkopf h2 { font-size: var(--fs-h3); }
.tagkopf .heute-tag { font-family: var(--font-text); font-size: var(--fs-klein); font-weight: 700; color: var(--salbei-dunkel); margin-left: var(--s2); text-transform: uppercase; letter-spacing: 0.06em; }

/* Hinweisblöcke */
.hinweis { display: grid; gap: var(--s2); padding: var(--s4) 0 var(--s4) var(--s4); border-left: 4px solid var(--salbei); margin-top: var(--s5); }
.hinweis.recht { border-left-color: var(--ocker); }
.hinweis h3 { font-size: var(--fs-gross); font-family: var(--font-text); font-weight: 700; }
.hinweis p { margin: 0; }

/* Stempel Rechtsstand */
.stempel {
  display: inline-block; margin: var(--s4) 0; padding: var(--s2) var(--s4);
  border: 2px solid var(--ocker); color: var(--ocker); background: var(--ocker-hell);
  font-weight: 700; font-size: 1rem; transform: rotate(-0.6deg);
}

/* Ausfallkette */
.kette { list-style: none; margin: var(--s5) 0 0; padding: 0; position: relative; }
.kette > li { position: relative; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--s3); padding-bottom: var(--s5); }
.kette > li::before {
  content: ""; position: absolute; left: 1.625rem; top: 3.25rem; bottom: 0; width: 4px; background: var(--rahmen);
}
.kette > li:last-child::before { display: none; }
.kette .stufe {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-titel); font-size: 1.625rem; font-weight: 600;
  background: var(--pc, var(--karton)); color: var(--white); border: 3px solid var(--pc, var(--rahmen));
}
.kette .dienst .stufe { background: var(--karton); color: var(--ink); border-style: dashed; }
.kette h3 { font-size: var(--fs-gross); font-family: var(--font-text); font-weight: 700; padding-top: 0.6rem; }
.kette p { margin: var(--s1) 0 0; }
.kette .knopfreihe { margin-top: var(--s2); gap: var(--s2); }
.kettenkopf { background: var(--karton); padding: var(--s4); margin-top: var(--s5); border-left: 4px solid var(--p0); }
.kettenkopf p { margin: 0; }

/* Probealarm */
.alarm { margin-top: var(--s5); padding: var(--s5); background: var(--white); border: 2px solid var(--ink); }
.alarm h3 { font-family: var(--font-text); font-weight: 700; font-size: var(--fs-gross); }
.alarm h3:focus { outline: none; }
.alarm fieldset { border: 0; padding: 0; margin: var(--s4) 0 0; }
.alarm legend { font-weight: 700; padding: 0; margin-bottom: var(--s2); }
.fortschritt { list-style: none; display: flex; gap: var(--s2); padding: 0; margin: 0 0 var(--s4); flex-wrap: wrap; }
.fortschritt li { padding: 0 var(--s3); border: 2px solid var(--rahmen); font-size: 1rem; font-weight: 600; min-height: 2rem; display: flex; align-items: center; }
.fortschritt li[aria-current="step"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.fortschritt li.abgesagt { text-decoration: line-through; color: var(--ink-2); }

/* Formulare */
.feld { display: grid; gap: var(--s1); margin-top: var(--s4); }
.feld label, .feld .label { font-weight: 700; }
.feld .hilfe { font-size: 1rem; color: var(--ink-2); }
input[type="text"], input[type="time"], select, textarea {
  min-height: var(--ziel); padding: var(--s2) var(--s3); width: 100%;
  border: 2px solid var(--rahmen); border-radius: var(--radius); background: var(--white);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--fokus); outline-offset: 1px; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--ziegel) !important; }
.fehler { color: var(--ziegel); font-weight: 700; font-size: 1rem; margin: 0; }
.wahl { display: grid; gap: var(--s2); }
.wahl label {
  display: flex; align-items: center; gap: var(--s3); min-height: var(--ziel);
  padding: var(--s1) var(--s3); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--white);
}
.wahl label:has(input:checked) { border-color: var(--salbei); background: var(--salbei-hell); }
.wahl input { width: 1.375rem; height: 1.375rem; accent-color: var(--salbei); flex: none; }
.zeile { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.zeile .feld { margin-top: var(--s4); }

/* Dialog */
dialog {
  width: min(34rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto;
  border: 2px solid var(--ink); border-radius: var(--radius); padding: var(--s5); background: var(--paper); color: var(--ink);
}
dialog::backdrop { background: rgb(37 33 27 / 0.55); }
dialog h2 { font-size: var(--fs-h3); }

/* 2027 */
.vergleich { width: 100%; border-collapse: collapse; margin-top: var(--s4); }
.vergleich th, .vergleich td { text-align: left; vertical-align: top; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); }
.vergleich thead th { font-size: var(--fs-klein); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.vergleich tbody th { font-weight: 700; width: 26%; }
.vergleich td.neu { font-weight: 600; }
.vergleich .quelle { display: block; margin-top: var(--s1); font-weight: 400; }
@media (max-width: 640px) {
  .vergleich thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .vergleich, .vergleich tbody, .vergleich tr, .vergleich th, .vergleich td { display: block; width: 100%; }
  .vergleich tr { border-bottom: 1px solid var(--line); padding: var(--s3) 0; }
  .vergleich th, .vergleich td { border: 0; padding: var(--s1) 0; }
  .vergleich td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--ink-2); font-size: var(--fs-klein); text-transform: uppercase; letter-spacing: 0.04em; display: block; }
}
.abgrenzung { margin-top: var(--s5); padding: var(--s4); background: var(--karton); }
.abgrenzung p:last-child { margin-bottom: 0; }
.checks { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.checks li { border-bottom: 1px solid var(--line); }
.checks label { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; cursor: pointer; }
.checks input { width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; accent-color: var(--salbei); }
.checks .erledigt span:first-child { color: var(--ink-2); text-decoration: line-through; }

/* Familie */
.personen { list-style: none; padding: 0; margin: var(--s4) 0 0; }
.personen li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s3); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.personen .rolle { display: block; font-size: 1rem; color: var(--ink-2); font-weight: 400; margin-left: 2.5rem; }
.fakten { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.fakten li { display: flex; justify-content: space-between; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }

/* Kontextspalte */
.kontext h2 { font-size: var(--fs-gross); font-family: var(--font-text); font-weight: 700; }
.kontext ul { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.kontext li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.kontext .proto-info { margin-top: var(--s6); font-size: 1rem; color: var(--ink-2); }

/* Meldungen */
.meldung { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-left: 4px solid var(--salbei); background: var(--salbei-hell); font-weight: 600; }
.meldung.fehlerhaft { border-left-color: var(--ziegel); background: var(--ziegel-hell); color: var(--ink); }

footer.fuss { padding: var(--s5) var(--rand) 7rem; border-top: 1px solid var(--line); font-size: 1rem; color: var(--ink-2); }
footer.fuss p { margin-bottom: var(--s2); }
@media (min-width: 900px) { footer.fuss { padding-bottom: var(--s6); padding-left: calc(var(--nav-breite) + var(--s6)); } }

@media (prefers-reduced-motion: no-preference) {
  .seg, .knopf, .wahl label { transition: background-color 120ms ease, filter 120ms ease; }
  html { scroll-behavior: smooth; }
}
@media (forced-colors: active) {
  .seg, .pm i, .kette .stufe { border: 2px solid CanvasText; forced-color-adjust: none; }
  .seg.offen { border-style: dashed; }
  .reiter a[aria-current="page"] { border-color: Highlight; }
}
@media print {
  .reiter, .proto, .kontext, .knopf { display: none !important; }
}

/* Korrekturen nach Sichtprüfung 03.10.2026 */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
.tagkopf .knopf { flex: none; white-space: nowrap; }
.alarm .fortschritt { margin-top: var(--s3); }
@media (max-width: 640px) {
  .vergleich tbody th { width: 100%; }
}
@media (max-width: 480px) {
  .zeile { grid-template-columns: 1fr; gap: 0; }
}
.feld label .hilfe { font-weight: 400; }
@media (max-width: 560px) {
  .personen li { grid-template-columns: 1fr; }
  .personen li .knopfreihe { margin-left: 2rem; }
}
