/* Kundenbereich: Marke nach docs/ARCHITEKTUR.md (Blau #1c3fa6 für Handlung, Gelb nur als Versatz, keine Verläufe, keine Karten). */
@font-face { font-family: "IBM Plex Sans"; src: url("/statisch/schrift/IBMPlexSans-latin-variabel.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/statisch/schrift/IBMPlexMono-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --tinte: #0c1b45;
  --tinte-leise: #4a5578;
  --handlung: #1c3fa6;
  --handlung-dunkel: #142f80;
  --versatz: #ffd24a;
  --grund: #ffffff;
  --flaeche: #f4f6fb;
  --linie: #d5dbea;
  --gut: #146c43;
  --schlecht: #a4161a;
  --schrift: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.55; color: var(--tinte); background: var(--grund); }
a { color: var(--handlung); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--handlung); outline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.blatt > h2:first-child { margin-top: 0; }
.mono, code { font-family: var(--mono); font-size: 0.95em; }
.klein { font-size: 0.85rem; }
.leise { color: var(--tinte-leise); }

.demo { margin: 0; padding: 0.4rem 1rem; background: var(--versatz); color: var(--tinte); font-size: 0.9rem; text-align: center; }

.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 1rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--linie); }
.marke { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--tinte); font-weight: 600; }
.marke img { display: block; height: 32px; width: auto; }
.firma { margin: 0; color: var(--tinte-leise); }

.navi { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; padding: 0.6rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--linie); }
.navi a { text-decoration: none; color: var(--tinte); padding: 0.25rem 0; border-bottom: 3px solid transparent; }
.navi a[aria-current="page"] { border-bottom-color: var(--versatz); font-weight: 600; }
.navi a:hover { color: var(--handlung); }
.abmelden { margin-left: auto; }

.inhalt { max-width: 62rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; }
.blatt { margin: 0 0 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--linie); }
.blatt.schmal { max-width: 32rem; border-top: 0; }

.fuss { border-top: 1px solid var(--linie); padding: 1.25rem clamp(1rem, 4vw, 2.5rem) 2rem; font-size: 0.9rem; color: var(--tinte-leise); }
.fuss p { max-width: 62rem; margin: 0.25rem auto; }

/* Formulare */
form { margin: 0.75rem 0; }
label { display: block; font-weight: 600; margin: 0.75rem 0 0.25rem; }
label.wahl, label.haken { font-weight: 400; display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.4rem 0; }
label.wahl input, label.haken input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--handlung); }
fieldset { border: 0; margin: 0.75rem 0; padding: 0; }
legend { font-weight: 600; padding: 0; }
input[type="text"], input[type="email"], input:not([type]), select {
  font: inherit; color: inherit; width: 100%; max-width: 28rem; padding: 0.6rem 0.75rem; border: 1px solid var(--tinte-leise); border-radius: 4px; background: var(--grund);
}
button, .knopf {
  font: inherit; font-weight: 600; display: inline-block; cursor: pointer; text-decoration: none; padding: 0.6rem 1.1rem; border-radius: 4px;
  border: 2px solid var(--handlung); background: var(--grund); color: var(--handlung); margin-top: 0.75rem;
}
button.haupt, .knopf.haupt { background: var(--handlung); color: #fff; box-shadow: 4px 4px 0 var(--versatz); }
button.haupt:hover, .knopf.haupt:hover { background: var(--handlung-dunkel); border-color: var(--handlung-dunkel); }
button.leise { border: 0; padding: 0.25rem 0; margin: 0; background: none; color: var(--handlung); font-weight: 400; text-decoration: underline; text-underline-offset: 0.15em; }
button:disabled { opacity: 0.55; cursor: progress; }
form.zeile { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
form.zeile select { width: auto; }
form.zeile button { margin-top: 0; }

.meldung { padding: 0.75rem 1rem; border-left: 4px solid var(--handlung); background: var(--flaeche); }
.meldung.ein { border-left-color: var(--gut); }
.meldung.aus { border-left-color: var(--schlecht); }
.hinweis { color: var(--tinte-leise); font-size: 0.95rem; }

/* Listen und Tabellen */
table.liste { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
table.liste th, table.liste td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste th { font-size: 0.85rem; color: var(--tinte-leise); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.ein { color: var(--gut); font-weight: 600; }
td.aus { color: var(--schlecht); font-weight: 600; }
ul.liste { list-style: none; margin: 0.5rem 0; padding: 0; }
ul.liste li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
ul.liste li form { margin: 0; }
dl.angaben { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: 0.4rem 1.5rem; margin: 0.5rem 0; }
dl.angaben dt { color: var(--tinte-leise); }
dl.angaben dd { margin: 0; }
.aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: baseline; }
ol.codes { columns: 2; column-gap: 2rem; font-size: 1.05rem; }
ol.schritte { padding-left: 1.25rem; }
ol.schritte li { color: var(--tinte-leise); }
ol.schritte li.erledigt { color: var(--tinte); }
ol.schritte li[aria-current="step"] { color: var(--tinte); font-weight: 600; }

.qr { width: min(100%, 18rem); margin: 0.75rem 0; }
.qr svg { display: block; width: 100%; height: auto; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.45rem; }
  .abmelden { margin-left: 0; }
  dl.angaben { grid-template-columns: 1fr; gap: 0 0; }
  dl.angaben dd { margin-bottom: 0.5rem; }
  ol.codes { columns: 1; }
  /* Tabellen werden zu Zeilenblöcken */
  table.liste thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.liste, table.liste tbody, table.liste tr, table.liste td { display: block; width: 100%; }
  table.liste tr { padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
  table.liste td { border: 0; padding: 0.15rem 0; text-align: left; }
  table.liste td[data-titel]::before { content: attr(data-titel) ": "; color: var(--tinte-leise); }
}
