:root {
    --tinte: #1c2430;
    --leise: #5a6574;
    --papier: #ffffff;
    --flaeche: #f3f5f8;
    --linie: #d6dce4;
    --blau: #1d4f86;
    --blau-hell: #e7eef7;
    --gruen: #2b6e45;
    --gruen-hell: #e6f2ea;
    --ocker: #8a5a00;
    --ocker-hell: #fbf1dc;
    --rot: #a8231b;
    --rot-hell: #fbe9e7;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-bottom: 6rem; }
body {
    margin: 0;
    font: 1rem/1.5 var(--sans);
    color: var(--tinte);
    background: var(--flaeche);
    padding-bottom: 6.5rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0; }
h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
a { color: var(--blau); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

/* Kopf */
.kopf { background: var(--blau); color: #fff; }
.kopf-innen { max-width: 52rem; margin: 0 auto; padding: 1.6rem 1.25rem 1.4rem; }
.schule { margin: 0 0 .3rem; opacity: .85; font-size: .95rem; }

.seite { max-width: 52rem; margin: 0 auto; padding: 1.5rem 1.25rem; }
.seite.schmal { max-width: 28rem; }
.einleitung { margin: 0 0 1.25rem; max-width: 42rem; }

/* Schritte */
.schritt {
    background: var(--papier);
    border: 1px solid var(--linie);
    border-radius: 6px;
    padding: 1.25rem 1.25rem 1.4rem;
    margin-bottom: 1rem;
}
.nr { color: var(--blau); margin-right: .35rem; }
.hilfe, .leer { color: var(--leise); margin: 0 0 .8rem; }
.leise { color: var(--leise); font-weight: normal; }

/* Jahrgang 11 */
.ephase { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem 1.5rem; }
.gruppe { border: 0; padding: 0; margin: 0; }
.gruppe legend { font-weight: 600; margin-bottom: .25rem; padding: 0; }
.haken { display: flex; align-items: baseline; gap: .5rem; padding: .15rem 0; }
.haken input { width: 1.05rem; height: 1.05rem; flex: none; }
.haken.eingerueckt { margin-left: 1.6rem; font-size: .92rem; color: var(--leise); }

/* Prüfungsfächer */
.pfaecher { display: grid; gap: .7rem; }
.pfach { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: .25rem 1rem; align-items: center; }
.pfach label { font-size: .95rem; }
.slot { font-weight: 700; color: var(--blau); }
select, input[type=password], input[type=text], textarea {
    font: inherit; color: inherit;
    width: 100%; padding: .5rem .6rem;
    border: 1px solid #b9c2cd; border-radius: 4px; background: #fff;
}
select.ungueltig { border-color: var(--rot); background: var(--rot-hell); }
.schwerpunkt {
    margin: 1rem 0 0; padding: .55rem .8rem;
    background: var(--blau-hell); border-left: 4px solid var(--blau);
    font-family: var(--serif); font-size: 1.1rem;
}

/* Pflichten */
.pflichten { list-style: none; margin: 0; padding: 0; }
.pf { display: grid; grid-template-columns: 1.6rem 1fr; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--linie); }
.pf:first-child { border-top: 0; padding-top: 0; }
.pf-name { font-weight: 600; }
.pf-detail { margin-top: .15rem; }
.pf .quelle { margin-top: .15rem; }
.zeichen { width: 1.35rem; height: 1.35rem; border-radius: 50%; margin-top: .1rem; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; }
.pf.erfuellt .zeichen { background: var(--gruen); }
.pf.erfuellt .zeichen::after { content: "✓"; }
.pf.offen .zeichen { background: var(--ocker); }
.pf.offen .zeichen::after { content: "!"; }
.pf.unerfuellbar .zeichen { background: var(--rot); }
.pf.unerfuellbar .zeichen::after { content: "×"; }
.pf.unerfuellbar .pf-detail { color: var(--rot); }
.aktionen { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.quelle { font-size: .8rem; color: var(--leise); }

/* Plan */
.tabelle-rahmen { overflow-x: auto; }
table.plan { width: 100%; border-collapse: collapse; font-size: .95rem; }
.plan th, .plan td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.plan thead th { font-weight: 600; color: var(--leise); font-size: .85rem; border-bottom-color: #b9c2cd; }
.plan tbody th { font-weight: 600; }
.plan .zahl { text-align: right; white-space: nowrap; }
.plan tr.auto td, .plan tr.auto th { color: var(--leise); }
.wahlfach { margin-top: 1rem; }
.wahlfach label { display: block; font-weight: 600; margin-bottom: .3rem; }
.zeile { display: flex; gap: .5rem; }
.zeile select { flex: 1; }

/* Knöpfe */
.knopf {
    font: inherit; font-weight: 600;
    background: var(--blau); color: #fff;
    border: 0; border-radius: 4px; padding: .55rem 1rem; cursor: pointer;
}
.knopf:hover { background: #163f6c; }
.knopf:disabled { background: #a9b3bf; cursor: not-allowed; }
.knopf.zweit { background: #fff; color: var(--blau); border: 1px solid var(--blau); }
.knopf.zweit:hover { background: var(--blau-hell); }
a.knopf { display: inline-block; text-decoration: none; line-height: 1.5; }
a.knopf:hover { text-decoration: none; }
.aktion-unten { margin: 1.5rem 0 0; }
.knopf.klein { padding: .3rem .65rem; font-size: .9rem; background: #fff; color: var(--blau); border: 1px solid var(--blau); }
.knopf.klein:hover { background: var(--blau-hell); }
.textknopf { font: inherit; background: none; border: 0; color: var(--blau); text-decoration: underline; cursor: pointer; padding: 0 .3rem; }

/* Meldungen */
.meldung { padding: .6rem .8rem; border-radius: 4px; margin: .5rem 0; }
.meldung.ok { background: var(--gruen-hell); color: var(--gruen); }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
ul.meldungen { margin: 0 0 1rem; padding-left: 1.2rem; }
ul.meldungen li { margin: .3rem 0; }
ul.meldungen.fehler li::marker { color: var(--rot); }
ul.meldungen.hinweis li::marker { color: var(--ocker); }
#zuruecksetzen { margin-top: .5rem; padding: 0; font-size: .9rem; }

/* Leiste */
.leiste {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--papier); border-top: 1px solid var(--linie);
    box-shadow: 0 -2px 10px rgba(28, 36, 48, .08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.leiste-innen { max-width: 52rem; margin: 0 auto; padding: .7rem 1.25rem; display: flex; gap: 1.25rem; align-items: center; }
.stunden { flex: 1; min-width: 0; }
.stunden-text { font-size: .92rem; }
.stunden-text strong { font-family: var(--serif); font-size: 1.35rem; }
.messung { position: relative; height: .45rem; background: var(--flaeche); border-radius: 3px; margin-top: .3rem; }
.balken { height: 100%; width: 0; background: var(--ocker); border-radius: 3px; transition: width .25s ease; }
.balken.genug { background: var(--gruen); }
.marke { position: absolute; top: -.2rem; bottom: -.2rem; width: 2px; background: var(--tinte); }
.status { font-size: .92rem; white-space: nowrap; text-decoration: none; font-weight: 600; }
.status.offen { color: var(--ocker); }
.status.fertig { color: var(--gruen); }

/* Anmeldung */
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: 6px; padding: 1.5rem; }
.karte label { display: block; font-weight: 600; margin: .8rem 0 .3rem; }
.karte .knopf { margin-top: 1rem; }

@media (max-width: 40rem) {
    .pfach { grid-template-columns: 1fr; }
    .leiste-innen { flex-wrap: wrap; gap: .5rem 1rem; }
    .stunden { flex-basis: 100%; }
    .status { flex: 1; }
    body { padding-bottom: 8.5rem; }
}
@media (prefers-reduced-motion: reduce) { .balken { transition: none; } }
.verwaltung { border-style: dashed; }
.verwaltung label { display: block; font-weight: 600; margin-bottom: .3rem; }
.verwaltung .haken label { display: inline; font-weight: normal; margin: 0; }
.tf-erwartung { margin: .8rem 0; }
.vorbehalt { margin: 0 0 1.25rem; max-width: 42rem; padding: .6rem .8rem; border-left: 4px solid var(--blau); background: var(--blau-hell); font-size: .95rem; }
.meldung.hinweis { background: var(--ocker-hell); color: var(--ocker); margin: .8rem 0 0; }
.fusszeile { text-align: center; margin: 1.5rem 0 0; font-size: .85rem; }
.fusszeile a { color: var(--leise); text-decoration: none; }
.fusszeile a:hover, .fusszeile a:focus-visible { text-decoration: underline; }
.kopf-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .3rem; }
.kopf-zeile .schule { margin: 0; }
.kopf-link { color: #fff; font-size: .95rem; white-space: nowrap; }
