/*
 * Abgeordneten-Post. The look follows vgsd.de (palette, type roles, flat
 * surfaces, 2px corners), without its logo and without its licensed fonts:
 * Helvetica/Arial stands in for the sans, Georgia for the reading serif.
 * Nothing is loaded from elsewhere.
 */

:root {
  --seite: #f7f7f5;
  --flaeche: #ffffff;
  --tinte: #1e1e1e;
  --leise: #666666;
  --linie: #d7d7d7;
  --rahmen: #8e8e8e;
  --gruen: #037e5f;
  --gruen-dunkel: #2f6054;
  --gruen-hell: #68e0a5;
  --gruen-ton: #e8f3f0;
  --warnung: #8a4b00;
  --warnung-hell: #fcf6dc;
  --fehler: #a11a1a;
  --fehler-hell: #fbeceb;
  --ohne: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mit: Georgia, "Times New Roman", serif;
  --ecke: 2px;
}

* { box-sizing: border-box; }

/* Classes below set display, which would otherwise win over the attribute. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--seite);
  color: var(--tinte);
  font-family: var(--ohne);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.breite { display: block; max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--tinte); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--gruen); }

strong { font-weight: 500; }

:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }

.sprung { position: absolute; left: -999rem; top: 0; background: var(--flaeche); padding: 0.5rem 1rem; z-index: 20; }
.sprung:focus { left: 0.5rem; top: 0.5rem; }

.nur-vorleser {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Top bar: says on every page whose site this is. */
.leiste-oben {
  margin: 0;
  padding: 0.6rem 0;
  background: linear-gradient(250deg, #fcfacd 0%, #dbf0ec 100%);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Header */
.kopf { padding: 2.5rem 0 2rem; }
.dachzeile { margin: 0 0 0.6rem; color: var(--gruen-dunkel); font-weight: 500; }
.herkunft { margin: 0 0 0.9rem; font-size: 0.9375rem; }
.herkunft a { color: var(--gruen); font-weight: 500; text-decoration: none; }
.herkunft a:hover { text-decoration: underline; }
h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4.6vw, 2.375rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.einleitung {
  margin: 0;
  max-width: 40rem;
  font-family: var(--mit);
  font-size: 1.1875rem;
  line-height: 1.6;
}

h2 { margin: 0 0 1rem; font-size: 1.6rem; line-height: 1.3; font-weight: 400; }
h2:focus { outline: none; }
h3 { margin: 2rem 0 0.5rem; font-size: 1.125rem; line-height: 1.4; font-weight: 500; }

/* Step bar */
.schritte { position: sticky; top: 0; z-index: 5; background: var(--flaeche); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.schritte ol { display: flex; gap: 0.25rem; list-style: none; margin: 0 auto; padding-top: 0; padding-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.schritte ol::-webkit-scrollbar { display: none; }
.schritte li { flex: 0 0 auto; counter-increment: schritt; }
.schritte button {
  font: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--gruen); background: transparent;
  border: 0; border-bottom: 2px solid transparent; padding: 0.85rem 0.7rem 0.75rem; cursor: pointer; white-space: nowrap;
}
.schritte button::before { content: counter(schritt) " "; font-weight: 400; }
.schritte button:hover:not(:disabled) { color: var(--tinte); }
.schritte button[aria-current="step"] { color: var(--tinte); border-bottom-color: var(--gruen); }
.schritte button:disabled { color: var(--rahmen); cursor: default; }
.schritte :focus-visible { outline-offset: -3px; }
.zahl { display: inline-block; min-width: 1.5em; padding: 0 0.4em; border-radius: var(--ecke); background: var(--gruen); color: #fff; font-size: 0.8em; text-align: center; }

main { padding-top: 2rem; padding-bottom: 3.5rem; }
.schritt { background: var(--flaeche); padding: 2rem 1.75rem; }
.schritt > p, .textseite p, .textseite li, .textseite address { font-family: var(--mit); font-size: 1.125rem; line-height: 1.6; }

/* Forms */
label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
input[type="text"], textarea {
  width: 100%; font: inherit; letter-spacing: inherit; color: var(--tinte); background: #fff;
  border: 1px solid var(--rahmen); border-radius: var(--ecke); padding: 0.75rem 0.9rem;
}
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--gruen); }
select {
  width: 100%; font: inherit; letter-spacing: inherit; color: var(--tinte); background: #fff;
  border: 1px solid var(--rahmen); border-radius: var(--ecke); padding: 0.75rem 0.9rem; min-height: 3rem;
}
.auswahl-zeile { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.auswahl-zeile .auswahl { flex: 1 1 12rem; }
details h3 { margin-top: 1.5rem; }
details > .meldung { font-size: 0.9375rem; line-height: 1.5; }
.brief-ebene { margin: 0 0 0.4rem; }
.brief-melden { margin: 0 0 1.2rem; font-size: 0.9375rem; }
textarea { line-height: 1.55; resize: vertical; }
textarea[readonly] { background: var(--seite); }
::placeholder { color: #767676; opacity: 1; }

.feld { margin: 0 0 1.2rem; }
.felder { display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; margin-top: 1.5rem; }
@media (min-width: 40rem) {
  .felder { grid-template-columns: 1fr 1fr; align-items: end; }
}

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 500; padding: 0; margin-bottom: 0.6rem; }

.eingabe-knopf { display: flex; gap: 0.5rem; max-width: 24rem; }
.eingabe-knopf input { flex: 1 1 auto; min-width: 0; font-size: 1.25rem; letter-spacing: 0.08em; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 400; letter-spacing: inherit; text-decoration: none; cursor: pointer;
  color: var(--gruen); background: #fff;
  border: 1px solid var(--gruen); border-radius: var(--ecke); padding: 0.7rem 1.4rem; min-height: 3rem;
}
.knopf:hover:not(:disabled) { background: var(--gruen-ton); color: var(--gruen-dunkel); }
.knopf.haupt { background: var(--gruen); color: #fff; }
.knopf.haupt:hover:not(:disabled) { background: var(--gruen-dunkel); border-color: var(--gruen-dunkel); color: #fff; }
.knopf:disabled { color: var(--leise); border-color: var(--linie); background: var(--seite); cursor: default; }
.knopf.klein { min-height: 2.25rem; padding: 0.25rem 0.8rem; font-size: 0.9375rem; }

.knopf-zeile { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.9rem 0; }
.weiter-zeile { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: flex-end; margin-top: 1.75rem; }
.weiter-zeile .hinweis { margin: 0 auto 0 0; }

.hinweis { color: var(--leise); font-size: 0.9375rem; line-height: 1.5; margin: 0.4rem 0 1rem; }
.hinweis.warnung { color: var(--warnung); }
.schritt > p.hinweis, .textseite p.hinweis { font-family: var(--ohne); font-size: 0.9375rem; line-height: 1.5; }

.meldung { margin: 0.7rem 0; padding: 0.6rem 0.9rem; border-radius: var(--ecke); background: var(--gruen-ton); }
.meldung.fehler { background: var(--fehler-hell); color: var(--fehler); }
.meldung.gut { background: var(--gruen-ton); color: var(--gruen-dunkel); }
.schritt > p.meldung { font-family: var(--ohne); font-size: 1rem; }

/* Choice lists (constituency, situation) and member cards */
.auswahl-liste, .karten { display: grid; gap: 0.5rem; }
.karten { margin: 0.9rem 0; }
.auswahl, .karte {
  display: flex; gap: 0.8rem; align-items: flex-start; font-weight: 400; margin: 0;
  border: 1px solid var(--linie); border-radius: var(--ecke); padding: 0.85rem 1rem; cursor: pointer;
}
.auswahl:hover, .karte:hover { border-color: var(--gruen); }
.auswahl:has(input:checked), .karte:has(input:checked) { border-color: var(--gruen); background: var(--gruen-ton); }
.auswahl input, .karte input { margin-top: 0.28rem; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; accent-color: var(--gruen); }
.auswahl-titel { display: block; font-weight: 500; }
.auswahl-hinweis { display: block; color: var(--leise); font-size: 0.9375rem; }

.karte.ohne-weg { cursor: default; color: var(--leise); background: var(--seite); }
.karte-text { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; align-items: baseline; }
.karte-name { font-weight: 500; }
.karte-zusatz, .karte-weg { flex-basis: 100%; color: var(--leise); font-size: 0.9375rem; }
.karte-ausschuss { flex-basis: 100%; font-size: 0.9375rem; font-weight: 500; color: var(--gruen-dunkel); }

.fraktion {
  display: inline-block; font-size: 0.8125rem; font-weight: 500; line-height: 1.5;
  padding: 0 0.5rem; border-radius: var(--ecke); border: 1px solid currentColor; white-space: nowrap;
}
.fraktion.cdu { color: #1e1e1e; }
.fraktion.spd { color: #b3001b; }
.fraktion.gruene { color: #1f6f2b; }
.fraktion.linke { color: #8a1a6b; }
.fraktion.afd { color: #005f9e; }
.fraktion.ohne { color: #666666; }

details { margin-top: 1.5rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
summary { font-weight: 500; color: var(--gruen); cursor: pointer; }
summary:hover { color: var(--tinte); }

.filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.filter-knopf {
  font: inherit; font-size: 0.9375rem; cursor: pointer; color: var(--tinte); background: #fff;
  border: 1px solid var(--rahmen); border-radius: var(--ecke); padding: 0.25rem 0.8rem; min-height: 2.4rem;
}
.filter-knopf[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }

.leitfragen { margin: 0 0 0.6rem; padding-left: 1.2rem; color: var(--leise); font-size: 0.9375rem; line-height: 1.5; }
.leitfragen li { margin-bottom: 0.2rem; }

.pruef-liste { list-style: none; margin: 0.25rem 0 0.9rem; padding: 0; display: grid; gap: 0.35rem; font-size: 0.9375rem; }
.pruef-liste li { padding: 0.5rem 0.9rem; border-radius: var(--ecke); background: var(--seite); }
.pruef-liste .warnung { background: var(--warnung-hell); color: var(--warnung); }

/* Letters */
.brief { border: 1px solid var(--linie); border-radius: var(--ecke); padding: 1.25rem; margin: 1.25rem 0; }
.brief h3 { margin: 0 0 0.3rem; }
.brief.erledigt { border-color: var(--gruen); background: #f6fbf9; }
.brief-weg { margin: 0 0 1rem; overflow-wrap: anywhere; }
.erledigt-zeile { border-top: 1px solid var(--linie); padding-top: 0.9rem; margin-bottom: 0; }
.erledigt-text { margin: 0; }

/* Log */
.protokoll { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.protokoll th, .protokoll td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.protokoll th { font-size: 0.875rem; font-weight: 500; color: var(--leise); }
.protokoll input { width: 1.15rem; height: 1.15rem; accent-color: var(--gruen); }

/* Numbers page */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin: 1rem 0 2rem; padding: 0; list-style: none; }
.kennzahlen li { background: var(--seite); border-radius: var(--ecke); padding: 1rem; color: var(--leise); }
.kennzahlen strong { display: block; font-size: 2.375rem; line-height: 1.1; font-weight: 400; color: var(--gruen); }
.balken-liste { list-style: none; margin: 0.5rem 0 2rem; padding: 0; display: grid; gap: 0.5rem; }
.balken-zeile { display: grid; grid-template-columns: 10rem 1fr 4.5rem; gap: 0.7rem; align-items: center; font-size: 0.9375rem; }
.balken-zeile span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.balken { height: 0.8rem; border-radius: var(--ecke); background: var(--seite); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gruen); }

/* Text pages */
.textseite h2 { margin-top: 2.25rem; }
.textseite h2:first-child { margin-top: 0; }
.textseite address { font-style: normal; }
.textseite li { margin-bottom: 0.4rem; }

.fuss { background: var(--tinte); color: var(--seite); padding: 1.75rem 0 2.5rem; font-size: 0.875rem; letter-spacing: 0.02em; }
.fuss p { margin: 0 0 0.5rem; }
.fuss a { color: var(--seite); }
.fuss a:hover { color: var(--gruen-hell); }
.fuss :focus-visible { outline-color: var(--gruen-hell); }

/* A button that reads as a link, for the footer. */
.link-knopf { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.fuss .link-knopf:hover { color: var(--gruen-hell); }

/* Notice on hosting and storage: header and buttons stay put, the text scrolls. */
.hinweis-dialog {
  width: min(42rem, calc(100vw - 1.5rem)); max-width: none;
  max-height: calc(100vh - 1.5rem); max-height: calc(100dvh - 1.5rem);
  padding: 0; border: 0; border-radius: var(--ecke); overflow: hidden;
  background: var(--flaeche); color: var(--tinte);
  box-shadow: 0 1.5rem 4rem rgba(30, 30, 30, 0.35);
}
.hinweis-dialog[open] { display: flex; flex-direction: column; }
.hinweis-dialog::backdrop { background: rgba(30, 30, 30, 0.62); }
.hinweis-kopf { flex: 0 0 auto; padding: 1.5rem 1.75rem 1.25rem; background: linear-gradient(250deg, #fcfacd 0%, #dbf0ec 100%); }
.hinweis-kopf .dachzeile { margin-bottom: 0.35rem; }
.hinweis-kopf h2 { margin: 0; font-size: 1.5rem; text-wrap: balance; }
.hinweis-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.25rem 1.75rem 1.25rem; }
.hinweis-einstieg { margin: 0 0 1.25rem; font-family: var(--mit); font-size: 1.0625rem; line-height: 1.55; }
.hinweis-einstieg strong { white-space: nowrap; }
.hinweis-punkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.hinweis-punkte li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.9rem; align-items: start; font-size: 0.9375rem; line-height: 1.5; }
.hinweis-punkte svg { width: 2.5rem; height: 2.5rem; padding: 0.55rem; border-radius: 50%; background: var(--gruen-ton); color: var(--gruen); }
.hinweis-punkte strong { display: block; font-size: 1rem; }
.hinweis-nachsatz { margin: 1.25rem 0 0; }
.hinweis-fuss { flex: 0 0 auto; padding: 1rem 1.75rem; border-top: 1px solid var(--linie); background: var(--flaeche); }
.hinweis-fuss .knopf-zeile { margin: 0; }
.hinweis-stand { margin: 0 0 0.7rem; padding: 0.45rem 0.8rem; border-radius: var(--ecke); background: var(--gruen-ton); color: var(--gruen-dunkel); font-size: 0.9375rem; }

@media (max-width: 30rem) {
  .hinweis-kopf { padding: 1rem 1.1rem 0.9rem; }
  .hinweis-inhalt { padding: 1rem 1.1rem; }
  .hinweis-fuss { padding: 0.75rem 1.1rem; }
  .hinweis-kopf h2 { font-size: 1.25rem; }
  .hinweis-einstieg { font-size: 1rem; }
  .hinweis-punkte li { grid-template-columns: 2.25rem 1fr; gap: 0.7rem; }
  .hinweis-punkte svg { width: 2.25rem; height: 2.25rem; padding: 0.5rem; }
  .hinweis-fuss .knopf { flex: 1 1 100%; min-height: 2.75rem; }
  .hinweis-stand { font-size: 0.875rem; padding: 0.35rem 0.7rem; }
  .kopf { padding: 1.75rem 0 1.5rem; }
  .schritt { padding: 1.5rem 1.1rem; }
  main.breite { padding-left: 0; padding-right: 0; }
  .knopf { padding: 0.7rem 1.1rem; }
  .balken-zeile { grid-template-columns: 6.5rem 1fr 4rem; }
  .protokoll th:nth-child(3), .protokoll td:nth-child(3) { display: none; }
}

@media print {
  .leiste-oben, .schritte, .fuss, .knopf, .sprung, .hinweis-dialog { display: none !important; }
}
