/* ============================================================
   Medienbro Webhelfer — Onboarding-Seite
   Eigene Datei, NICHT landing/style.css (die bleibt unangetastet,
   siehe docs/ONBOARDING-SEITE.md). Tokens unten sind 1:1 aus
   landing/style.css uebernommen ("Warm Craft"), damit die Seite zur
   Landing passt, ohne sie zu importieren oder zu aendern.
   Statisch, kein Framework, system-ui-Fonts, keine Fremd-Requests.
   ============================================================ */

:root {
  /* Farbe (identisch zu landing/style.css) */
  --color-bg: #FAF5EC;
  --color-surface: #FFFFFF;
  --color-surface-tint: #F2E8D8;
  --color-text: #241E17;
  --color-text-muted: #6B5E4F;
  --color-primary: #B54A2C;
  --color-primary-dark: #8F3A20;
  --color-primary-tint: #F4E3DA;
  --color-secondary: #2F4A3D;
  --color-secondary-tint: #E3EAE4;
  --color-border: #E7DCC9;
  --color-border-strong: #241E17;
  --color-positive: #2F6B4A;

  /* Neu fuer Formulare: Fehler-/Warnfarbe (Kontrast siehe unten) */
  --color-danger: #B3261E;
  --color-danger-bg: #FBEAE8;
  --color-danger-border: #E7B7B1;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 22px; --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(36, 30, 23, 0.10);
  --shadow-md: 0 8px 20px rgba(36, 30, 23, 0.12);

  --duration-fast: 140ms; --duration-base: 260ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --container-max: 640px;
}

/* ---- Kontrast-Audit (WCAG 2.1, relative Luminanz berechnet, siehe
   landing/style.css fuer die uebernommenen Werte) ----
     --color-text auf --color-bg        = 15.20:1
     --color-text-muted auf --color-bg  =  5.79:1
     --color-text-muted auf --color-surface = 6.29:1
     #FFFFFF auf --color-primary        =  5.28:1  (Buttontext)
     --color-danger (#B3261E) auf --color-bg (#FAF5EC)      = 6.02:1
     --color-danger (#B3261E) auf --color-surface (#FFFFFF) = 6.54:1
     --color-danger (#B3261E) auf --color-danger-bg         = 5.61:1
   Alle Kombinationen liegen ueber der 4.5:1-Mindestanforderung fuer
   Fliesstext (rechnerisch geprueft, nicht nur geschaetzt).

   Neu fuer das UX-Redesign (2026-07-28) -- alle neuen Komponenten
   (progress-badge, choice-card, accordion, reassurance-note, card--info)
   verwenden AUSSCHLIESSLICH die oben bereits geprueften Farb-Token, es
   kommt keine neue Farbe hinzu. Rechnerisch NEU geprueft (Python-Skript,
   gleiche WCAG-Formel):
     --color-primary-dark auf --color-primary-tint = 6.03:1  (Accent-Text auf Tint-Flaechen)
     --color-text auf --color-primary-tint          = 13.23:1 (Choice-Card-Text, ausgewaehlt)
     --color-text auf --color-surface-tint          = 13.60:1 (Choice-Card-Text, Repeat-Item-BG)
     #FFFFFF auf --color-primary                    = 5.28:1  (progress-badge__dot--active, wie Buttontext)
     #FFFFFF auf --color-secondary                  = 9.69:1  (next-steps-Nummern im card--info)
     --color-secondary auf --color-secondary-tint    = 7.91:1  (card--info-Ueberschrift)
   WICHTIG, bewusst NICHT verwendet: --color-primary als Textfarbe AUF
   --color-primary-tint waere nur 4.23:1 (unter der 4.5:1-Grenze) -- deshalb
   nutzt keine neue Komponente diese Kombination fuer Fliesstext. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, li, fieldset, legend, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: none; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
h1, h2, h3 { line-height: 1.2; font-weight: 750; }
a { color: var(--color-primary); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* ---- Grundlayout ---- */
.page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-8);
}
.page-header { text-align: center; margin-bottom: var(--space-5); }
.page-header h1 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.page-header p { color: var(--color-text-muted); font-size: 0.95rem; }
.page-header .brand { font-weight: 750; color: var(--color-primary); }

/* ---- Buttons (Teilmenge aus landing/style.css, eigenstaendig kopiert) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 650;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}
.btn--primary { background: var(--color-primary); color: #FFFFFF; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary-tint); }
.btn--full { width: 100%; }
.btn--lg { min-height: 56px; font-size: 1.05rem; padding: var(--space-4) var(--space-5); }
.btn--small { min-height: 44px; padding: var(--space-2) var(--space-4); font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Fortschritt: "Schritt 1 von 2" ----
   Kein Mehrseiten-Assistent mehr (siehe .card weiter unten) -- Schritt 1 ist
   diese Formularseite (Pflichtangaben + optionale Extras auf einer Seite),
   Schritt 2 ist die Bestaetigungsseite nach dem Absenden (server.py,
   ausserhalb dieser Datei). Rein informativ, kein interaktiver Zustand. */
.progress-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-2);
  flex-wrap: wrap;
}
.progress-badge__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 650;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.progress-badge__dot--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF; /* 5.28:1 auf --color-primary, siehe Kontrast-Audit oben */
}
.progress-badge__label { font-size: 0.95rem; color: var(--color-text-muted); }
.progress-badge__sep { color: var(--color-border-strong); opacity: 0.35; }
.step-status {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0 auto var(--space-2);
  max-width: 46ch;
}

/* ---- Formular-Grundbausteine ---- */
form { display: block; }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 1.2rem; margin-bottom: var(--space-1); }
.card--primary { border: 2px solid var(--color-primary); }
.card--info { background: var(--color-secondary-tint); border-color: var(--color-secondary-tint); }
.card--info h2 { color: var(--color-secondary); }
/* Hinweistexte auf >=15px angehoben (Plan-19-Audit 25.08.2026, P2-Fund a):
   0.85rem/0.9rem landeten bei 16px Grundschrift auf 13.6px/14.4px -- unter
   der 15px-Grenze fuer diese Fliesstext-Klasse. Farbe (--color-text-muted =
   #6B5E4F) war bereits die Kontrast-geprüfte Muted-Farbe von oben (5.79:1 /
   6.29:1, siehe Kontrast-Audit) und bleibt unveraendert, nur die Groesse
   steigt. Betrifft: step__hint, reassurance-note, step-status, field__help,
   field__optional, progress-badge__label, footer-note, optional-intro. */
.step__hint { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: var(--space-4); }

.field { margin-bottom: var(--space-4); }
.field:last-child { margin-bottom: 0; }
/* Ersetzt frueheres style="margin-top: var(--space-4);" auf dem Hinweis-Feld
   zu den Oeffnungszeiten (index.html) -- CSP-Fund 25.08.2026, siehe
   server.py-Moduldocstring: keine Inline-style-Attribute mehr. */
.field--top-spaced { margin-top: var(--space-4); }
.field label,
.field legend {
  display: block;
  font-weight: 650;
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
}
.field__optional { color: var(--color-text-muted); font-weight: 400; font-size: 0.95rem; }
.field__help { color: var(--color-text-muted); font-size: 0.95rem; margin-top: var(--space-1); }

input[type="text"], input[type="tel"], input[type="email"], input[type="time"],
input[type="number"], input[type="url"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--color-primary); }
input:invalid:not(:placeholder-shown) { border-color: var(--color-danger); }

.field-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: var(--space-1);
  font-weight: 600;
}

/* Checkbox-Reihen: eigene Zeile statt winziger Standard-Checkbox, Klick-
   flaeche komplett >=44px (Touch-Guideline). */
.check-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
}
.check-row input[type="checkbox"] {
  width: 24px; height: 24px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.check-row label { font-weight: 500; margin: 0; }

/* ---- Auswahl-Kacheln (Branche, Oeffnungszeiten-Vorlagen) -- groessere,
   antippbare Alternative zu klassischen Radiobuttons, komplette Kachel ist
   Klickflaeche (>=48px hoch, deutlich ueber der 44px-Touch-Guideline). Die
   native Radio-Eingabe bleibt sichtbar (kein Verstecken per CSS) -- so
   funktioniert Auswahl/Tastatur/Screenreader ueberall gleich, auch in
   Browsern ohne :has()-Unterstuetzung (progressive Verbesserung nur fuer
   die staerkere Hervorhebung der Auswahl). ---- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-2);
}
.choice-grid--hours { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-bottom: var(--space-3); }
.choice-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 500;
  transition: border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}
.choice-card input[type="radio"] {
  width: 22px; height: 22px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.choice-card:hover { border-color: var(--color-primary); }
/* Zwei Wege zum selben Ergebnis, bewusst redundant: :has() deckt moderne
   Browser nativ ab (auch ganz ohne JS), .choice-card--selected ist ein
   JS-Fallback (script.js hoert auf "change" im choice-grid) fuer Browser
   ohne :has()-Unterstuetzung -- in dieser Umgebung selbst gemessen (Chromium
   meldet CSS.supports('selector(:has(*))') === true, wendet die Regel aber
   nicht an). Ohne beides waere die Auswahl nur am kleinen nativen Radio-Punkt
   erkennbar -- zu unauffaellig fuer eine Kachel dieser Groesse. */
.choice-card:has(input:checked),
.choice-card.choice-card--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
  font-weight: 650;
}
.choice-card:has(input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* ---- Tarifwahl (Punkt 8, Selbst-Bedienungs-Checkout) ----
   Eigene, breitere Kachel-Variante -- min-height bleibt bei >=48px (Touch-
   Guideline), aber mit Platz fuer zwei Textzeilen statt nur einem Label. */
.choice-grid--tarif { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.choice-card--tarif {
  align-items: flex-start;
  min-height: 64px;
  flex-direction: row;
}
.choice-card__text { display: flex; flex-direction: column; gap: 2px; }
.choice-card__title { font-weight: 650; }
.choice-card__price { color: var(--color-text-muted); font-size: 0.9rem; }
.choice-card--recommended { border-color: var(--color-primary); }
.choice-card__badge {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 650;
  vertical-align: middle;
}
.tarif-preis-hinweis {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  font-weight: 600;
}

/* ---- Absenden + wiederkehrender Hinweis "geht auch spaeter" ---- */
.submit-row { margin-top: var(--space-5); text-align: center; }
.submit-row--final { margin-top: 0; }
.reassurance-note {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: var(--space-3);
}
.reassurance-note strong { color: var(--color-text); }
.reassurance-note--center { text-align: center; margin: var(--space-2) 0 var(--space-4); }

/* Einwilligungs-/Transparenzsatz direkt am Absenden-Bereich (Plan-19-Audit,
   P0-2-Teilfix): kurz, in Zielgruppensprache, kein Juristendeutsch, keine
   neue Pflichtvalidierung -- nur ein Hinweis mit Link zur Datenschutzerklaerung. */
.consent-note {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: var(--space-2);
}
.consent-note a { color: var(--color-text); text-decoration: underline; }

/* ---- Optionale Extras ---- */
.optional-sections { margin-bottom: var(--space-4); }
.optional-intro {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-align: center;
  max-width: 50ch;
  margin: 0 auto var(--space-4);
}
.optional-intro strong { color: var(--color-text); }

/* ---- Aufklappbare Abschnitte (<details>) ----
   Stehen im HTML bewusst mit "open" da: ohne JS bleiben sie offen (eine
   laengere, aber komplett nutzbare Seite). Erst script.js entfernt das
   open-Attribut und macht daraus kompakte, antippbare Abschnitte -- siehe
   script.js, Kommentar am Dateianfang. */
.accordion {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 650;
  font-size: 1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 750;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}
.accordion[open] > summary::before { content: "–"; }
.accordion summary:focus-visible { outline: 3px solid var(--color-primary); outline-offset: -3px; border-radius: var(--radius-sm); }
.accordion__body { padding: 0 var(--space-4) var(--space-4); }
.accordion .field:first-child,
.accordion .step__hint:first-child { margin-top: 0; }

.accordion--nested {
  margin: var(--space-3) 0 0;
  background: var(--color-bg);
  border-style: dashed;
}
.accordion--nested summary { font-size: 0.95rem; font-weight: 600; }

/* ---- "Was passiert danach" -- Liste im Info-Kaertchen ---- */
.next-steps { display: flex; flex-direction: column; gap: var(--space-2); counter-reset: step; }
.next-steps li {
  counter-increment: step;
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text);
}
.next-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 650;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Oeffnungszeiten ---- */
.hours-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.hours-row:last-of-type { border-bottom: none; }
.hours-row__day { font-weight: 650; }
.hours-row__times { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.hours-row__times .field { margin-bottom: 0; flex: 1 1 120px; }
.hours-row__times label { font-weight: 400; font-size: 0.85rem; color: var(--color-text-muted); }
@media (min-width: 560px) {
  .hours-row { grid-template-columns: 110px 1fr; align-items: center; }
}

/* ---- Wiederholte Gruppen (Team) -- ohne JS: alle Plaetze sichtbar (die
   ganze Seite ist dann einfach etwas laenger, aber komplett nutzbar). Erst
   .js-enhanced (siehe script.js) blendet unbenutzte Folge-Plaetze aus und
   zeigt sie erst nach Klick auf "+ weitere Person" (progressive
   Enthuellung, kein dynamisches DOM-Bauen noetig). Der "+ weitere
   Person"-Knopf selbst ist ohne JS unsichtbar, weil er ohne Skript nichts
   täte -- ohne JS sind ja bereits alle Plaetze offen. ---- */
.repeat-group { display: flex; flex-direction: column; gap: var(--space-3); }
.repeat-item {
  background: var(--color-surface-tint);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.js-enhanced .repeat-item--extra:not(.is-revealed) { display: none; }
.repeat-item .field { margin-bottom: var(--space-2); }
.repeat-item__row { display: flex; gap: var(--space-2); }
.repeat-item__row .field { flex: 1; }
.add-more { display: none; margin-top: var(--space-2); }
.js-enhanced .add-more { display: inline-flex; }

.menu-hint {
  background: var(--color-primary-tint);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--color-primary-dark);
}
.menu-hint strong { display: block; margin-bottom: var(--space-1); }

/* ---- Honeypot: fuer Menschen unsichtbar, aber NICHT display:none/
   visibility:hidden (manche Bots ueberspringen dann die Pruefung), im
   DOM ausserhalb des Bildschirms + aus dem Accessibility-Tree
   entfernt + nicht per Tab erreichbar. ---- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.legal-hint {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.legal-hint strong { color: var(--color-danger); }

.page-footer { margin-top: var(--space-6); }
.footer-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: 0;
}
.footer-note a { color: var(--color-text); text-decoration: underline; }

/* Rechtslinks auf /start/ (Plan-19-Audit, P0-2): vorher kein einziger
   Rechtslink auf der Anmeldeseite -- gleiche URLs wie landing/index.html
   .site-footer__legal, eigene schlanke Fassung fuer diese Seite. */
.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  margin-top: var(--space-3);
}
.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-decoration: underline;
}
.footer-legal a:hover { color: var(--color-text); }

/* ---- Ergebnisseiten (server.py: Erfolg/Fehler/Rate-Limit) ---- */
.result-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: var(--space-5); }
.result-card {
  max-width: 480px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.result-card h1 { font-size: 1.4rem; margin-bottom: var(--space-3); }
.result-card p { margin-bottom: var(--space-3); color: var(--color-text-muted); }
.result-card--ok h1 { color: var(--color-positive); }
.result-card--error { text-align: left; }
.result-card--error h1 { color: var(--color-danger); }
.result-card--error ul { list-style: disc; padding-left: var(--space-5); margin-bottom: var(--space-3); }
.result-card--error li { margin-bottom: var(--space-1); }
.result-contact a { font-weight: 650; }
