/* Steuer-App v0.1.1 */
@font-face {
  font-family: "Atkinson";
  src: url("schrift/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("schrift/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --tinte: #172B4D;
  --tinte-2: #4A5B76;
  --blau: #0B63B6;
  --blau-dunkel: #084C8D;
  --blau-zart: #E7F0FA;
  --papier: #F4F7FA;
  --weiss: #FFFFFF;
  --linie: #D6DEE8;
  --gruen: #1E8E5A;
  --gruen-zart: #E5F4EC;
  --hinweis: #8A5A00;
  --hinweis-zart: #FFF4D6;
  --fehler: #B42318;
  --fehler-zart: #FDECEA;
  --schatten: 0 1px 2px rgba(23, 43, 77, .06), 0 4px 16px rgba(23, 43, 77, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--tinte);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.sprung { position: absolute; left: -999px; top: 8px; background: var(--weiss); padding: 8px 12px; z-index: 10; }
.sprung:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; border-radius: 6px; }
h1[tabindex="-1"]:focus { outline: none; }

/* ---------- Kopf ---------- */
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: 1040px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--tinte); text-decoration: none; font-weight: 700; font-size: 19px; }
.test {
  font-size: 13px; font-weight: 700; color: var(--blau); background: var(--blau-zart);
  padding: 1px 8px; border-radius: 99px;
}
#kopf-rechts { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--tinte-2); }
#kopf-rechts .email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inhalt { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 24px 72px; }
.inhalt:focus { outline: none; }
.fuss { max-width: 1040px; width: 100%; margin: 0 auto; padding: 0 24px 32px; font-size: 14px; color: var(--tinte-2); }
.fuss p { max-width: 60ch; margin: 0; }
.laden { color: var(--tinte-2); }

/* ---------- Typografie ---------- */
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0; }
.lead { font-size: 20px; color: var(--tinte-2); max-width: 46ch; margin-top: 16px; }
.leise { color: var(--tinte-2); font-size: 16px; }

/* ---------- Knöpfe ---------- */
button, .knopf {
  font: inherit; font-weight: 700; font-size: 17px; cursor: pointer;
  border-radius: 10px; border: 2px solid var(--blau); background: var(--blau); color: var(--weiss);
  padding: 13px 22px; min-height: 52px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); }
button:disabled { opacity: .45; cursor: default; }
.knopf-zweit { background: var(--weiss); color: var(--blau); }
.knopf-zweit:hover { background: var(--blau-zart); border-color: var(--blau); }
.knopf-text {
  background: none; border: 0; color: var(--blau); padding: 8px 4px; min-height: 0; font-size: 16px;
}
.knopf-text:hover { background: none; text-decoration: underline; }
.knopf-gefahr { background: var(--weiss); color: var(--fehler); border-color: #E7B4AE; font-size: 16px; min-height: 44px; padding: 8px 16px; }
.knopf-gefahr:hover { background: var(--fehler-zart); border-color: var(--fehler); }
.knopf-klein { min-height: 40px; padding: 6px 14px; font-size: 15px; }

/* ---------- Startseite ---------- */
.start {
  display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 56px; row-gap: 0; align-items: start;
  grid-template-areas: "held anmeldung" "details anmeldung";
}
.start-held { grid-area: held; }
.start-details { grid-area: details; }
.start .anmeldung { grid-area: anmeldung; position: sticky; top: 24px; }
.start h1 { font-size: 46px; max-width: 14ch; }
.ablauf { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 18px; counter-reset: schritt; }
.ablauf li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; counter-increment: schritt; }
.ablauf li::before {
  content: counter(schritt);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--weiss); border: 2px solid var(--blau); color: var(--blau); font-weight: 700; font-size: 18px;
}
.ablauf strong { display: block; font-size: 18px; }
.ablauf span { color: var(--tinte-2); font-size: 16px; }
.versprechen { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linie); display: grid; gap: 10px; font-size: 16px; color: var(--tinte-2); }
.versprechen div { display: flex; gap: 10px; align-items: flex-start; }
.versprechen svg { flex: 0 0 20px; margin-top: 3px; }

.anmeldung {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: 16px; padding: 28px;
  box-shadow: var(--schatten);
}
.umschalter { display: grid; grid-template-columns: 1fr 1fr; background: var(--papier); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.umschalter button {
  background: transparent; border: 0; color: var(--tinte-2); min-height: 44px; padding: 8px; font-size: 16px; border-radius: 9px;
}
.umschalter button:hover { background: rgba(255,255,255,.6); }
.umschalter button[aria-pressed="true"] { background: var(--weiss); color: var(--tinte); box-shadow: 0 1px 3px rgba(23,43,77,.12); }

/* ---------- Formular ---------- */
label { display: block; font-weight: 700; font-size: 16px; margin: 18px 0 6px; }
label:first-child { margin-top: 0; }
.hilfe { display: block; font-weight: 400; font-size: 15px; color: var(--tinte-2); margin-top: 2px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; font: inherit; font-size: 18px; color: var(--tinte);
  padding: 13px 14px; min-height: 52px; border: 2px solid var(--linie); border-radius: 10px; background: var(--weiss);
}
input:focus { border-color: var(--blau); outline: none; box-shadow: 0 0 0 3px var(--blau-zart); }
.passwort-feld { position: relative; }
.passwort-feld input { padding-right: 84px; }
.passwort-feld .zeigen {
  position: absolute; right: 6px; top: 6px; min-height: 40px; padding: 6px 10px; font-size: 15px;
  background: none; border: 0; color: var(--blau);
}
.passwort-feld .zeigen:hover { background: var(--blau-zart); }
.formular-ende { margin-top: 24px; }
.formular-ende button { width: 100%; }

/* ---------- Meldungen ---------- */
.meldung { padding: 13px 16px; border-radius: 10px; font-size: 16px; margin-top: 16px; }
.meldung.fehler { background: var(--fehler-zart); color: var(--fehler); }
.meldung.hinweis { background: var(--hinweis-zart); color: var(--hinweis); }
.meldung.ok { background: var(--gruen-zart); color: var(--gruen); }
.meldung.info { background: var(--blau-zart); color: var(--blau-dunkel); }

/* ---------- Übersicht ---------- */
.uebersicht-kopf { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.jahre { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.jahr {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: 16px; padding: 26px;
  display: flex; flex-direction: column; gap: 14px; min-height: 230px;
}
.jahr.aktiv { border: 2px solid var(--blau); }
.jahr-zahl { font-size: 54px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.jahr-zahl small { display: block; font-size: 16px; font-weight: 400; color: var(--tinte-2); letter-spacing: 0; margin-bottom: 6px; }
.jahr .stand { font-size: 16px; color: var(--tinte-2); flex: 1; }
.balken { height: 8px; background: var(--papier); border-radius: 99px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--blau); border-radius: 99px; transition: width .4s ease; }
.balken.gruen span { background: var(--gruen); }
.konto-bereich { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--linie); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Fragen ---------- */
.frage-seite { max-width: 620px; margin: 0 auto; }
.frage-oben { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 15px; color: var(--tinte-2); }
.frage-balken { height: 6px; background: var(--linie); border-radius: 99px; overflow: hidden; margin-bottom: 44px; }
.frage-balken span { display: block; height: 100%; background: var(--blau); border-radius: 99px; transition: width .35s ease; }
.frage-titel { font-size: 32px; max-width: 22ch; }
.frage-hilfe { margin-top: 12px; color: var(--tinte-2); font-size: 17px; max-width: 52ch; }
.frage-feld { margin-top: 30px; }

.antworten { display: grid; gap: 12px; margin-top: 30px; }
.antworten.zwei { grid-template-columns: 1fr 1fr; }
.antwort {
  background: var(--weiss); color: var(--tinte); border: 2px solid var(--linie); border-radius: 12px;
  min-height: 64px; padding: 14px 20px; justify-content: flex-start; text-align: left; font-size: 18px;
}
.antwort:hover { background: var(--weiss); border-color: var(--blau); }
.antwort[aria-pressed="true"] { border-color: var(--blau); background: var(--blau-zart); color: var(--blau-dunkel); }
.antwort .kreis {
  flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linie); background: var(--weiss);
  display: grid; place-items: center;
}
.antwort[aria-pressed="true"] .kreis { border-color: var(--blau); background: var(--blau); }
.antwort[aria-pressed="true"] .kreis::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--weiss); }

.zaehler { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.zaehler button { width: 64px; height: 64px; padding: 0; font-size: 30px; border-radius: 50%; }
.zaehler output { font-size: 52px; font-weight: 700; min-width: 72px; text-align: center; line-height: 1; }

.frage-unten { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; }
.warum { margin-top: 26px; font-size: 16px; color: var(--tinte-2); }
.warum summary { cursor: pointer; color: var(--blau); font-weight: 700; }
.warum p { margin-top: 8px; max-width: 52ch; }

/* ---------- Zusammenfassung / Belegmappe ---------- */
.mappe-kopf { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 32px; }
.mappe-stand { text-align: right; }
.mappe-stand strong { display: block; font-size: 44px; line-height: 1; }
.mappe-stand span { color: var(--tinte-2); font-size: 15px; }
.mappe-stand .balken { width: 200px; margin-top: 10px; margin-left: auto; background: var(--linie); }

.gruppe { margin-top: 30px; }
.gruppe h3 { font-size: 17px; color: var(--tinte-2); margin-bottom: 10px; font-weight: 700; }
.belege { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.beleg {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  background: var(--weiss); border: 1px solid var(--linie); border-left: 6px solid var(--blau);
  border-radius: 10px; padding: 16px 18px; cursor: pointer; font-weight: 400; font-size: 18px; margin: 0;
}
.beleg:hover { border-color: #B9C6D6; border-left-color: var(--blau); }
.beleg.erledigt { border-left-color: var(--gruen); background: #FBFDFC; }
.beleg input { position: absolute; opacity: 0; pointer-events: none; }
.haken {
  width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--linie); background: var(--weiss);
  display: grid; place-items: center; margin-top: 1px; transition: background .15s, border-color .15s;
}
.beleg.erledigt .haken { background: var(--gruen); border-color: var(--gruen); }
.haken svg { opacity: 0; }
.beleg.erledigt .haken svg { opacity: 1; }
.beleg:focus-within { outline: 3px solid var(--blau); outline-offset: 2px; }
.beleg-titel { font-weight: 700; font-size: 18px; }
.beleg.erledigt .beleg-titel { color: var(--tinte-2); }
.beleg-text { color: var(--tinte-2); font-size: 16px; margin-top: 2px; }

.mappe-unten { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-top: 36px; }
.mappe-unten .rechts { display: flex; gap: 12px; flex-wrap: wrap; }
.naechstes {
  margin-top: 36px; background: var(--blau-zart); border-radius: 14px; padding: 22px 24px;
  display: flex; gap: 16px; align-items: flex-start;
}
.naechstes svg { flex: 0 0 28px; }
.naechstes strong { display: block; color: var(--blau-dunkel); }
.naechstes p { color: var(--tinte-2); font-size: 16px; margin-top: 2px; }

/* ---------- Speicher-Anzeige ---------- */
.speicher-status {
  position: fixed; right: 18px; bottom: 18px; background: var(--weiss); border: 1px solid var(--linie);
  border-radius: 99px; padding: 8px 16px; font-size: 15px; color: var(--gruen); box-shadow: var(--schatten);
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.speicher-status.sichtbar { opacity: 1; transform: none; }
.speicher-status.fehler { color: var(--fehler); border-color: #E7B4AE; }

/* ---------- Bewegung bei Fragenwechsel ---------- */
.frage-inhalt { animation: rein .28s ease both; }
@keyframes rein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Mobil ---------- */
@media (max-width: 820px) {
  .start { grid-template-columns: 1fr; row-gap: 28px; grid-template-areas: "held" "anmeldung" "details"; }
  .start .anmeldung { position: static; }
  .ablauf { margin-top: 8px; }
  .start h1 { font-size: 36px; }
  .jahre { grid-template-columns: 1fr; }
  .mappe-kopf { grid-template-columns: 1fr; }
  .mappe-stand { text-align: left; }
  .mappe-stand .balken { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .inhalt { padding: 26px 18px 60px; }
  .kopf-innen { padding: 10px 18px; }
  #kopf-rechts .email { display: none; }
  h1, .start h1 { font-size: 31px; }
  .frage-titel { font-size: 26px; }
  .frage-balken { margin-bottom: 30px; }
  .anmeldung { padding: 22px; }
  .antworten.zwei { grid-template-columns: 1fr 1fr; }
  .jahr-zahl { font-size: 46px; }
  .mappe-unten, .mappe-unten .rechts { flex-direction: column; align-items: stretch; }
}

/* ---------- Druck (Belegliste) ---------- */
@media print {
  .kopf, .fuss, .mappe-unten, .naechstes, .speicher-status, .sprung { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .inhalt { padding: 0; }
  .beleg { break-inside: avoid; border-left-width: 4px; }
}

/* ---------- v0.1.2 ---------- */
.anmeldung-titel { font-size: 22px; margin-bottom: 18px; }
.einwilligung { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 16px; margin-top: 20px; cursor: pointer; }
.einwilligung input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 22px; accent-color: var(--blau); }
.vergessen { font-size: 15px; color: var(--tinte-2); margin-top: 14px; }
a { color: var(--blau); text-underline-offset: 2px; }

.uebersicht-kopf { display: block; }
.uebersicht-kopf .leise { margin-top: 8px; }

.text-seite { max-width: 640px; margin: 0 auto; }
.text-seite h1 { margin: 6px 0 8px; }
.text-seite h2 { font-size: 20px; margin: 28px 0 6px; }
.text-seite p { max-width: 62ch; }

.fall-seite { max-width: 720px; margin: 0 auto; }
.fall-seite.breit { max-width: 860px; }
.zurueck-oben { margin: -8px 0 14px -4px; }
.zurueck-oben::before { content: "‹"; font-size: 22px; line-height: 1; margin-right: 2px; }

.etappen { list-style: none; padding: 0; margin: 32px 0 0; position: relative; }
.etappe { display: grid; grid-template-columns: 44px 1fr; gap: 18px; position: relative; padding-bottom: 26px; }
.etappe:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--linie);
}
.etappe.erledigt:not(:last-child)::after { background: var(--gruen); }
.etappe-marke {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--weiss); border: 2px solid var(--linie); color: var(--tinte-2); position: relative; z-index: 1;
}
.etappe.aktuell .etappe-marke { background: var(--blau); border-color: var(--blau); color: var(--weiss); }
.etappe.erledigt .etappe-marke { background: var(--gruen); border-color: var(--gruen); color: var(--weiss); }
.etappe.gesperrt .etappe-marke { color: #9AA6B8; }
.etappe-inhalt { background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 18px 22px; }
.etappe.aktuell .etappe-inhalt { border: 2px solid var(--blau); box-shadow: var(--schatten); }
.etappe.gesperrt .etappe-inhalt, .etappe.spaeter .etappe-inhalt { background: transparent; border-style: dashed; }
.etappe-inhalt h2 { font-size: 20px; }
.etappe.gesperrt h2, .etappe.spaeter h2 { color: var(--tinte-2); }
.etappe-inhalt p { color: var(--tinte-2); font-size: 16px; margin-top: 4px; max-width: 56ch; }
.etappe-inhalt p strong { color: var(--tinte); }
.etappe-knoepfe { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.antwortliste { list-style: none; margin: 0; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.antwortliste li + li { border-top: 1px solid var(--linie); }
.antwortzeile {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
  background: var(--weiss); color: var(--tinte); border: 0; border-radius: 0; padding: 14px 18px; min-height: 56px;
  text-align: left; font-weight: 400; font-size: 17px;
}
.antwortzeile:hover { background: var(--blau-zart); border: 0; }
.az-frage { color: var(--tinte-2); }
.az-wert { font-weight: 700; text-align: right; }
.az-aendern { color: var(--blau); font-weight: 700; font-size: 15px; }
.beleg-text { display: block; }

@media (max-width: 520px) {
  .antwortzeile { grid-template-columns: 1fr auto; }
  .az-aendern { display: none; }
  .etappe { grid-template-columns: 36px 1fr; gap: 12px; }
  .etappe-marke { width: 36px; height: 36px; }
  .etappe:not(:last-child)::after { left: 17px; top: 40px; }
  .etappe-inhalt { padding: 16px; }
}
