:root {
  --blau: #1d3fbf;
  --blau-dunkel: #142c85;
  --schwarz: #1a1a1a;
  --grau: #5f6672;
  --hell: #f4f6fb;
  --rand: #dde3ef;
  --weiss: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--hell);
  color: var(--schwarz);
  line-height: 1.55;
}

.rechner {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header { text-align: center; margin-bottom: 24px; }

.logo {
  max-width: 240px;
  width: 60%;
  height: auto;
  margin-bottom: 8px;
}

h1 {
  font-size: 1.5rem;
  color: var(--blau-dunkel);
  margin: 8px 0 4px;
}

.untertitel { color: var(--grau); margin: 0; font-size: 0.98rem; }

.karte {
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20, 44, 133, 0.06);
}

h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--schwarz);
}

.schritt {
  background: var(--blau);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.hinweis { color: var(--grau); font-size: 0.92rem; margin-top: 0; }

.upload-feld {
  display: block;
  border: 2px dashed var(--blau);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--blau-dunkel);
  background: #f8faff;
  transition: background 0.15s;
}
.upload-feld:hover, .upload-feld.aktiv { background: #edf2ff; }
.upload-inhalt { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.upload-inhalt svg { color: var(--blau); }

.klein { font-size: 0.82rem; color: var(--grau); }
.zentriert { text-align: center; }

.vorschau {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.vorschau-bild { position: relative; }
.vorschau-bild img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--rand);
}
.vorschau-bild button {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.frage { margin-bottom: 14px; }
.frage p { margin: 0 0 6px; }
.auswahl { display: flex; gap: 16px; flex-wrap: wrap; }
.auswahl-spalte { flex-direction: column; gap: 8px; }
.auswahl label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--hell);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
.auswahl label:has(input:checked) {
  border-color: var(--blau);
  background: #edf2ff;
}

textarea, select, input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  font: inherit;
  background: var(--weiss);
}
textarea:focus, select:focus, input:focus { outline: 2px solid var(--blau); border-color: transparent; }

.felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 520px) { .felder { grid-template-columns: 1fr; } }
.feld label { display: block; font-size: 0.9rem; margin-bottom: 4px; color: var(--grau); }
.feld-breit { grid-column: 1 / -1; }

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--grau);
  cursor: pointer;
}
.checkbox input { margin-top: 3px; }

.fehler {
  background: #fdecec;
  border: 1px solid #f3b6b6;
  color: #a12622;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.absenden {
  width: 100%;
  background: var(--blau);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.absenden:hover { background: var(--blau-dunkel); }
.absenden:disabled { background: #9aa7cf; cursor: wait; }

.laden { text-align: center; padding: 48px 16px; }
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--rand);
  border-top-color: var(--blau);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: drehen 0.9s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.ergebnis-karte { text-align: center; }
.preis-individuell { font-size: 1.6rem; }
.test-banner {
  background: #fff6e0;
  border: 1px solid #eccf87;
  color: #7a5b13;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  text-align: left;
}
.preis {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blau-dunkel);
  margin: 8px 0 2px;
}
.details {
  text-align: left;
  background: var(--hell);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.95rem;
}
.naechste-schritte { text-align: left; }
.naechste-schritte h3 { margin-bottom: 4px; }
.neu {
  background: none;
  border: 1px solid var(--blau);
  color: var(--blau);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font: inherit;
  margin-top: 8px;
}

/* Honeypot: für Menschen unsichtbar, Bots füllen es trotzdem aus */
.honigtopf {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Fußzeile mit Impressum und Datenschutz */
.fuss {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}
.fuss a {
  color: inherit;
}

/* Aufmaß zum Aufklappen */
.aufmass {
  margin-top: 14px;
  font-size: 0.9rem;
}
.aufmass summary {
  cursor: pointer;
  font-weight: 600;
}
.aufmass table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.aufmass th,
.aufmass td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding: 5px 4px;
  text-align: left;
}
.aufmass td:last-child,
.aufmass th:last-child {
  text-align: right;
}


/* ── Ergaenzungen aus dem UX-Durchgang (31.08.2026) ───────────────────────── */

/* Das Datei-Feld war mit "hidden" versteckt und damit per Tastatur nicht
   erreichbar. Jetzt ist es unsichtbar, aber anspringbar - und der Rahmen zeigt,
   wo man gerade ist. */
.nur-vorleser {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.upload-feld:focus-within {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}

/* Fortschritt beim Hochladen. Steht der Balken auf "unbestimmt", laeuft er
   endlos - dann rechnet der Server und niemand weiss, wie lange es dauert. */
.balken {
  height: 8px;
  background: var(--hellgrau, #F2F4F7);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px auto 8px;
  max-width: 320px;
}
.balken-fuellung {
  height: 100%;
  width: 0;
  background: var(--blau);
  border-radius: 4px;
  transition: width 0.2s;
}
.balken-fuellung.unbestimmt {
  width: 100% !important;
  background: linear-gradient(90deg, var(--hellgrau, #F2F4F7) 0%, var(--blau) 50%, var(--hellgrau, #F2F4F7) 100%);
  background-size: 200% 100%;
  animation: laeuft 1.4s linear infinite;
}
@keyframes laeuft {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .balken-fuellung.unbestimmt { animation: none; background: var(--blau); }
}

/* Der Hinweis, dass der Preis noch nicht verbindlich ist, war die kleinste
   graue Zeile der Seite. Jetzt ein Kasten, den man nicht uebersieht. */
.hinweis-kasten {
  background: #FFF8E6;
  border-left: 4px solid #C8912A;
  border-radius: 4px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

/* Vertrauenszeile im Kopf */
.vertrauen {
  font-size: 13px;
  color: var(--grau, #5f6672);
  margin-top: 8px;
}

/* Radiogruppen sind jetzt fieldset - der Browser malt sonst einen Rahmen */
fieldset.frage {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}
fieldset.frage legend {
  padding: 0;
  margin-bottom: 8px;
}

/* Fussleiste mit Telefonnummer */
.fuss { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
