@font-face { font-family: "Ubuntu"; src: url("/static/fonts/ubuntu-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("/static/fonts/ubuntu-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("/static/fonts/ubuntu-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --lila: #502379;
  --lila-tief: #3e1b5e;
  --gelb: #fdc220;
  --gelb-tief: #eab000;
  --tinte: #26202e;
  --grau: #5d5668;
  --nebel: #f3f1f6;
  --linie: #ddd7e4;
  --rahmen: #a99fb6;
  --gruen: #156b50;
  --gruen-hell: #e3f2eb;
  --rot: #a8201a;
  --rot-hell: #fbeceb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--tinte); font: 17px/1.6 "Ubuntu", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; }

/* Kopf und Fuß */
.kopf { background: var(--lila); color: #fff; }
.kopf-innen { max-width: 680px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marke { color: #fff; font-weight: 700; font-size: 19px; text-decoration: none; }
.kopf .knopf.zweit { color: #fff; border-color: rgba(255, 255, 255, .6); min-height: 32px; font-size: 14px; padding: 0 12px; }
.fuss { background: var(--tinte); color: #d8d2e0; font-size: 14px; padding: 24px 0 32px; }
.fuss .band-innen { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.fuss a { color: #fff; }

/* Abschnitte als vollbreite Bänder */
.band { padding: 32px 0; }
.band-innen { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.band.nebel { background: var(--nebel); }
.band.lila { background: var(--lila); color: #fff; }
.band.gruen { background: var(--gruen-hell); }
.band.lila a { color: #fff; }
@media (min-width: 720px) { .band { padding: 48px 0; } }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
h3 { font-size: 18px; margin: 0 0 4px; font-weight: 700; }
@media (min-width: 720px) { h1 { font-size: 36px; } }
p { margin: 0 0 12px; max-width: 62ch; }
.klein { font-size: 15px; color: var(--grau); }
.band.lila .klein { color: #e6def0; }
a { color: var(--lila); text-underline-offset: 3px; }

/* Wahlkreis: das eine große Element */
.wk { display: flex; align-items: center; gap: 16px; margin: 4px 0 8px; }
.wk-nr { font-size: 84px; line-height: .85; font-weight: 700; color: var(--gelb); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.wk-name { font-size: 24px; line-height: 1.2; font-weight: 700; }
@media (min-width: 720px) { .wk-nr { font-size: 112px; } .wk-name { font-size: 28px; } }

/* Formulare */
label, .feldname { display: block; font-weight: 500; font-size: 16px; margin: 16px 0 6px; }
.hilfe { display: block; font-weight: 400; font-size: 14px; color: var(--grau); margin-top: 2px; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 10px 12px; min-height: 48px; border: 1px solid var(--rahmen); border-radius: 4px; background: #fff;
}
textarea { min-height: 96px; }
:focus-visible { outline: 3px solid var(--lila); outline-offset: 2px; }
.band.lila :focus-visible { outline-color: var(--gelb); }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.haken { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-weight: 400; font-size: 16px; }
.haken input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--lila); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-weight: 500; font-size: 16px; margin: 16px 0 6px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 4px;
  background: var(--gelb); color: var(--tinte); font: 500 17px/1 "Ubuntu", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.knopf:hover { background: var(--gelb-tief); }
.knopf.zweit { background: transparent; border: 1px solid var(--tinte); color: var(--tinte); }
.knopf.zweit:hover { background: var(--nebel); }
.knopf.gefahr { background: transparent; border: 1px solid var(--rot); color: var(--rot); }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.knopf-reihe.eng { margin: 0; gap: 8px; }
.knopf-reihe.kopfaktion { margin: 12px 0 16px; }
.abstand { margin-top: 12px; }
.abschnitt { margin-top: 32px; }
.unten { align-self: end; }
.textknopf { background: none; border: 0; padding: 0; font: inherit; color: var(--lila); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.adresse-zeile { display: flex; gap: 8px; }
.adresse-zeile input { flex: 1; }
@media (max-width: 479px) { .adresse-zeile { flex-direction: column; } }

/* Zeitfenster */
.tag { margin: 20px 0 8px; font-weight: 700; font-size: 17px; }
.zeiten { display: flex; flex-wrap: wrap; gap: 8px; }
.zeit { position: relative; display: inline-block; margin: 0; font-size: 17px; }
.zeit input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.zeit span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 0 12px;
  border: 1px solid var(--rahmen); border-radius: 4px; background: #fff; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.zeit input:checked + span { background: var(--lila); border-color: var(--lila); color: #fff; }
.zeit input:focus-visible + span { outline: 3px solid var(--lila); outline-offset: 2px; }

/* Vorschläge bei der Adresseingabe */
.vorschlag-feld { position: relative; flex: 1; }
.vorschlaege { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--rahmen); border-radius: 4px; background: #fff;
  position: absolute; left: 0; right: 0; z-index: 5; color: var(--tinte); }
.vorschlaege button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px; min-height: 44px; font: inherit; color: inherit; cursor: pointer; }
.vorschlaege li + li { border-top: 1px solid var(--linie); }
.vorschlaege button:hover, .vorschlaege [aria-selected="true"] { background: var(--nebel); }

.fehler { background: var(--rot-hell); color: var(--rot); padding: 12px 16px; border-radius: 4px; margin: 0 0 16px; }
.erfolg { background: var(--gruen-hell); color: var(--gruen); padding: 12px 16px; border-radius: 4px; margin: 0 0 16px; }
.liste { list-style: none; padding: 0; margin: 8px 0 0; }
.liste li { padding: 12px 0; border-bottom: 1px solid var(--linie); }
.liste li:last-child { border-bottom: 0; }

/* Arbeitsbereich für Helfende und Verwaltung: dichter */
body.arbeit { font-size: 15px; line-height: 1.5; background: #fff; }
.arbeit .kopf-innen, .arbeit .band-innen { max-width: 1000px; }
.arbeit .kopf-innen { height: 48px; }
.arbeit .marke { font-size: 16px; }
.arbeit .band { padding: 20px 0; }
.arbeit h1 { font-size: 22px; margin-bottom: 8px; }
.arbeit h2 { font-size: 17px; margin-top: 24px; }
.arbeit .knopf { min-height: 40px; font-size: 15px; padding: 0 14px; }
.arbeit label, .arbeit .feldname, .arbeit legend { font-size: 14px; margin: 12px 0 4px; }
.arbeit input[type=text], .arbeit input[type=tel], .arbeit input[type=email], .arbeit input[type=date], .arbeit input[type=time],
.arbeit input[type=number], .arbeit input[type=url], .arbeit select, .arbeit textarea { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.arbeit .reihe { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.reiter { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linie); margin: 0 0 16px; }
.reiter a { padding: 10px 12px; color: var(--grau); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 14px; }
.reiter a[aria-current="page"] { color: var(--tinte); border-bottom-color: var(--lila); font-weight: 500; }
.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th, .tabelle td { text-align: left; padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-weight: 500; color: var(--grau); white-space: nowrap; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.stopp { padding: 16px 0; border-bottom: 1px solid var(--linie); }
.stopp-kopf { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stopp-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.stopp-status { font-size: 14px; color: var(--grau); }
.stopp form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 8px; }
.stopp form label { margin: 0; }
.stopp form input[type=number] { width: 88px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 8px 0 16px; }
.kennzahl strong { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.kennzahl span { font-size: 13px; color: var(--grau); }

/* Bot-Simulator */
.chat { background: var(--nebel); border-radius: 4px; padding: 12px; min-height: 200px; max-height: 60vh; overflow: auto; }
.blase { max-width: 85%; width: fit-content; padding: 8px 12px; border-radius: 8px; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase.ich { margin-left: auto; background: var(--lila); color: #fff; }
.blase.bot { background: #fff; border: 1px solid var(--linie); }
.blase.still { background: none; color: var(--grau); font-size: 13px; padding: 0 4px; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.knoepfe button { border: 1px solid var(--lila); color: var(--lila); background: #fff; border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer; }

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