/* ISV-Anmeldung. Farben aus dem ISV-Logo: Rot #C4122D, Anthrazit #393939, Ring-Grau #B8B8B8. Schrift Barlow (OFL), selbst gehostet. */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --rot: #c4122d;
  --rot-tief: #9c0e24;
  --rot-hauch: #fbeef0;
  --tinte: #26262a;
  --text: #393939;
  --leise: #5f5f66;      /* 6.4:1 auf Weiß */
  --linie: #d4d4d8;
  --ring: #b8b8b8;
  --feld: #ffffff;
  --grund: #f5f5f6;
  --fehler: #b3261e;
  --erfolg: #1d6b3a;
  --fokus: 0 0 0 3px #fff, 0 0 0 5px var(--rot);
  --r: 10px;
  --schrift: Barlow, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titel: 'Barlow Condensed', Barlow, system-ui, sans-serif;
  color-scheme: light;
  accent-color: var(--rot);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--schrift);
  color: var(--text);
  background: var(--grund);
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--rot); color: #fff; }
a { color: var(--rot-tief); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 4px; }
h1, h2, h3 { color: var(--tinte); text-wrap: balance; }
h1 { font: 600 clamp(2.25rem, 1.6rem + 3vw, 3.5rem)/1 var(--titel); letter-spacing: -0.01em; text-transform: uppercase; margin: 0 0 0.75rem; }
h2 { font: 600 1.5rem/1.15 var(--titel); text-transform: uppercase; letter-spacing: 0.01em; margin: 0; }
p { margin: 0 0 1em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.springen { position: absolute; left: 1rem; top: -4rem; background: var(--tinte); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--r) var(--r); z-index: 10; }
.springen:focus { top: 0; }

/* ---------- Kopf und Fuß ---------- */
.kopf { background: #fff; border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kopf img { display: block; height: 3.5rem; width: auto; }
.kopf nav a { font-weight: 500; font-size: 0.95rem; color: var(--text); text-decoration: none; padding: 0.5rem 0.25rem; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; }
.kopf nav a:hover { color: var(--rot-tief); }
.kopf nav svg { width: 1rem; height: 1rem; }
.fuss { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; font-size: 0.9rem; color: var(--leise); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.fuss a { color: var(--leise); }

/* ---------- Seite mit Formular ---------- */
.buehne { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 1rem; display: grid; gap: 2rem; }
.einleitung { position: relative; }
.einleitung .lead { font-size: 1.125rem; color: var(--text); max-width: 34ch; }
.einleitung ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.9rem; max-width: 30rem; }
.einleitung li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; color: var(--text); }
.einleitung li svg { width: 1.5rem; height: 1.5rem; color: var(--rot); margin-top: 0.1rem; }
.einleitung li strong { display: block; color: var(--tinte); font-weight: 600; }
/* Der Ring aus dem Logo, nur auf großen Schirmen und rein dekorativ */
.ring { display: none; }

.karte { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgb(20 20 30 / 0.06), 0 8px 28px -12px rgb(20 20 30 / 0.18); padding: 1.5rem 1.25rem 1.75rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--linie); }
legend { padding: 0; margin-bottom: 1rem; float: left; width: 100%; }
legend + * { clear: both; }
.reihe { display: grid; gap: 1.1rem; }

.feld { display: grid; gap: 0.35rem; position: relative; align-content: start; }
.feld > label, .feld > .label { font-weight: 600; color: var(--tinte); font-size: 1rem; }
.hilfe { font-size: 0.9rem; color: var(--leise); margin: -0.1rem 0 0.1rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], input[inputmode] {
  font: inherit; color: var(--tinte); background: var(--feld);
  border: 1.5px solid #8e8e96; border-radius: var(--r);
  padding: 0.7rem 0.85rem; min-height: 48px; width: 100%;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
input::placeholder { color: #6e6e76; }
input:hover { border-color: var(--text); }
input:focus { outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px rgb(196 18 45 / 0.18); }
input[aria-invalid=true] { border-color: var(--fehler); background: #fffafa; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.kurz { max-width: 8rem; }
.feld-fehler { color: var(--fehler); font-size: 0.925rem; font-weight: 500; display: flex; gap: 0.4rem; align-items: flex-start; }
.feld-fehler:empty { display: none; }
.feld-fehler::before { content: ''; flex: none; width: 1rem; height: 1rem; margin-top: 0.2rem; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm-.75 3.5h1.5v5h-1.5v-5Zm0 6.25h1.5v1.5h-1.5v-1.5Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Auswahl mit Vorschlägen ---------- */
.auswahl { position: relative; }
.vorschlaege {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 0.3rem; list-style: none; background: #fff;
  border: 1px solid var(--linie); border-radius: var(--r);
  box-shadow: 0 12px 32px -8px rgb(20 20 30 / 0.25);
  max-height: min(18rem, 45vh); overflow-y: auto; overscroll-behavior: contain;
}
.vorschlaege[hidden] { display: none; }
.vorschlaege li { padding: 0.7rem 0.7rem; border-radius: 7px; cursor: pointer; min-height: 44px; line-height: 1.3; }
.vorschlaege li[aria-selected=true] { background: var(--rot-hauch); color: var(--tinte); }
.vorschlaege li mark { background: none; color: var(--rot-tief); font-weight: 600; }
.vorschlaege li.frei { color: var(--leise); font-style: italic; }
.vorschlaege li.frei b { color: var(--tinte); font-style: normal; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 0.15rem; background: var(--tinte); color: #fff; border-radius: 999px; padding: 0.2rem 0.25rem 0.2rem 0.85rem; font-weight: 500; font-size: 0.95rem; }
.chip button { all: unset; cursor: pointer; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; }
.chip button:hover { background: rgb(255 255 255 / 0.15); }
.chip button:focus-visible { box-shadow: 0 0 0 2px var(--tinte), 0 0 0 4px #fff; }
.chip svg { width: 0.9rem; height: 0.9rem; }

/* ---------- Einwilligung und Absenden ---------- */
.einwilligung { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; font-size: 0.975rem; }
.einwilligung input { width: 1.375rem; height: 1.375rem; margin: 0.15rem 0 0; }
.einwilligung + .feld-fehler { margin: 0.5rem 0 0 2.25rem; }
.knopf {
  font: 600 1.125rem/1 var(--schrift); letter-spacing: 0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0 1.75rem; border: 0; border-radius: var(--r);
  background: var(--rot); color: #fff; cursor: pointer; text-decoration: none;
  transition: background-color 150ms ease-out, transform 100ms ease-out;
}
.knopf:hover { background: var(--rot-tief); }
.knopf:active { transform: translateY(1px); }
.knopf[aria-busy=true] { opacity: 0.75; cursor: progress; }
.knopf[aria-busy=true]::after { content: ''; width: 1rem; height: 1rem; border: 2px solid rgb(255 255 255 / 0.4); border-top-color: #fff; border-radius: 50%; animation: drehen 0.7s linear infinite; }
.knopf.leise { background: transparent; color: var(--tinte); border: 1.5px solid #8e8e96; }
.knopf.leise:hover { border-color: var(--tinte); background: #fff; }
.knopf svg { width: 1.1rem; height: 1.1rem; }
.absenden { margin-top: 1.75rem; display: grid; gap: 0.9rem; }
.absenden .knopf { width: 100%; }
.absenden small { color: var(--leise); font-size: 0.9rem; }
@keyframes drehen { to { transform: rotate(360deg); } }

.zusammenfassung { border: 2px solid var(--fehler); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: 1.5rem; background: #fffafa; }
.zusammenfassung[hidden] { display: none; }
.zusammenfassung h2 { font: 600 1.05rem/1.3 var(--schrift); text-transform: none; color: var(--fehler); margin-bottom: 0.5rem; }
.zusammenfassung ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.zusammenfassung a { color: var(--fehler); font-weight: 500; }
.meldung { border-radius: var(--r); padding: 0.9rem 1rem; background: #fff3f4; color: var(--fehler); font-weight: 500; margin-top: 1rem; }
.meldung:empty, .meldung[hidden] { display: none; }

/* ---------- Text- und Hinweisseiten ---------- */
.text { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; }
.text h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); }
.text h2 { font-size: 1.35rem; margin: 2.25rem 0 0.6rem; }
.text p, .text li { max-width: 68ch; }
.text ul { padding-left: 1.2rem; }
.text li + li { margin-top: 0.35rem; }
.text .stand { color: var(--leise); font-size: 0.95rem; }
.danke { max-width: 36rem; margin: 0 auto; padding: 3.5rem 1.25rem 2rem; text-align: center; }
.danke .zeichen { width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; color: var(--rot); }
.danke .knoepfe { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 2rem; }
.hinweis { max-width: 36rem; margin: 4rem auto; padding: 0 1.25rem; }

@media (min-width: 40rem) {
  .reihe.zwei { grid-template-columns: 1fr 1fr; }
  /* Felder nebeneinander teilen sich die Zeilen, damit Eingabefelder auf einer Höhe stehen, auch bei ungleich langen Hinweisen */
  .reihe.gleich { grid-template-rows: repeat(4, auto); row-gap: 0; }
  .reihe.gleich > .feld { grid-row: span 4; grid-template-rows: subgrid; row-gap: 0.35rem; }
  .karte { padding: 2.25rem 2.25rem 2.5rem; }
  .absenden { grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem; }
  .absenden .knopf { width: auto; }
}

@media (min-width: 62rem) {
  .buehne { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; padding-top: 4rem; align-items: start; }
  .einleitung { position: sticky; top: 2.5rem; padding-top: 1rem; }
  .ring { display: block; position: absolute; z-index: -1; width: 26rem; height: 26rem; left: -15rem; top: 25rem; color: var(--ring); opacity: 0.6; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .chip, .knopf { border: 1px solid ButtonText; }
  .vorschlaege li[aria-selected=true] { outline: 2px solid Highlight; }
}
