/* Passt der Sitz? (Kindersitz-Finder): mobil zuerst, ohne Framework, ohne fremde Schriften. */

:root {
  --text: #1c2226;
  --text-leise: #4d565e;
  --grund: #f5f6f3;
  --karte: #ffffff;
  --flaeche: #eef0ec;
  --rand: #d9ddd6;
  --akzent: #155e75;
  --akzent-hell: #e3f0f3;
  --akzent-text: #ffffff;
  --passt: #1d6b40;
  --passt-grund: #e6f3ea;
  --norm: #1f4f8a;
  --norm-grund: #e7eef8;
  --offen: #7a4a00;
  --offen-grund: #fbf0dc;
  --nein: #9e2a2a;
  --nein-grund: #f9e8e6;
  --werbung: #5b3e8c;
  --radius: 14px;
  --schatten: 0 1px 2px rgb(20 30 25 / 6%), 0 2px 8px rgb(20 30 25 / 5%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8ebee;
    --text-leise: #b4bcc4;
    --grund: #14181a;
    --karte: #1c2124;
    --flaeche: #242a2e;
    --rand: #3a4247;
    --akzent: #7cc6dc;
    --akzent-hell: #1b3038;
    --akzent-text: #0b1b22;
    --passt: #84d9a6;
    --passt-grund: #183324;
    --norm: #a3c6f3;
    --norm-grund: #1a2840;
    --offen: #f1c47a;
    --offen-grund: #362a14;
    --nein: #f2a09a;
    --nein-grund: #3a1d1d;
    --werbung: #c9b2f0;
    --schatten: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
}

a { color: var(--akzent); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible,
.chips label:has(input:focus-visible) {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--karte);
  padding: 0.5rem 1rem;
}
.skip:focus { left: 1rem; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] { display: none !important; }

.kopf, main, .fuss {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.kopf { padding-top: 0.9rem; }
.marke { margin: 0; font-weight: 700; color: var(--akzent); letter-spacing: 0.01em; }

h1 { font-size: 1.55rem; line-height: 1.2; margin: 0.6rem 0 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 0.25rem; }
h4 { font-size: 1.05rem; line-height: 1.3; margin: 0 0 0.15rem; }

.intro { color: var(--text-leise); margin: 0 0 1rem; }

/* ---------- Auswahl ---------- */
.check {
  background: var(--karte);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  border: 1px solid var(--rand);
  padding: 1rem;
  margin: 0 0 1.25rem;
}
.feld { margin: 0; border: 0; padding: 0; min-width: 0; }
.feld + .feld { margin-top: 1rem; }
.feld > label, .feld legend { display: block; font-weight: 600; margin-bottom: 0.4rem; padding: 0; }
.optional { font-weight: 400; color: var(--text-leise); }
.hilfe { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--text-leise); }

input[type="text"], input[type="email"], select {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem; /* ab 16px zoomt iOS nicht ins Feld */
  padding: 0.75rem 0.9rem;
  min-height: 52px;
  border: 1.5px solid var(--rand);
  border-radius: 10px;
  background: var(--karte);
  color: var(--text);
}
input[type="text"]:focus, input[type="email"]:focus, select:focus { border-color: var(--akzent); }

#auto-suche {
  padding-left: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697279' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.8rem center;
  background-size: 1.2rem;
}

.auto-liste {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0.25rem;
  max-height: min(22rem, 55vh);
  overflow-y: auto;
  border: 1px solid var(--rand);
  border-radius: 10px;
  background: var(--karte);
  overscroll-behavior: contain;
}
.liste-marke {
  position: sticky;
  top: -0.25rem;
  background: var(--karte);
  padding: 0.5rem 0.75rem 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-leise);
}
.liste-auto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.liste-auto:hover, .liste-auto[aria-selected="true"] { background: var(--akzent-hell); }
.liste-name { font-weight: 600; }
.liste-detail { font-size: 0.88rem; color: var(--text-leise); }
.liste-leer { padding: 0.75rem; color: var(--text-leise); }

.beliebt { margin-top: 0.9rem; }
.beliebt-titel { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--text-leise); }
.beliebt .chips { list-style: none; margin: 0; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip, .chips label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  padding: 0.55rem 0.95rem;
  min-height: 44px;
  border: 1.5px solid var(--rand);
  border-radius: 999px;
  background: var(--karte);
  color: var(--text);
  cursor: pointer;
}
.chip:hover, .chips label:hover { border-color: var(--akzent); }
.chips label:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); font-weight: 600; }
.chips input { margin: 0; accent-color: var(--akzent); width: 1.1rem; height: 1.1rem; }
/* Sitzplatz: kompakte Chips, Auswahl an Füllung und Haken erkennbar */
.chips-platz { gap: 0.4rem; }
.chips-platz label { padding: 0.45rem 0.8rem; font-size: 0.95rem; position: relative; }
.chips-platz input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips-platz label:has(input:checked) { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.chips-platz label:has(input:checked)::before { content: "✓"; font-weight: 700; }

.gewaehlt-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.gewaehlt-auto p { margin: 0; }
.gewaehlt-label { display: block; font-size: 0.85rem; color: var(--text-leise); }
#gewaehlt-name { font-size: 1.1rem; }

.knopf-leise {
  flex: none;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--akzent);
  border-radius: 999px;
  background: transparent;
  color: var(--akzent);
  cursor: pointer;
}

.filter { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rand); }
.filter select { max-width: 16rem; }

.knopf {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  padding: 0.8rem 1.1rem;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--akzent);
  color: var(--akzent-text);
  cursor: pointer;
}

.fehler { color: var(--nein); font-weight: 600; margin: 0.5rem 0 0; }

/* ---------- Ergebnis ---------- */
.ergebnis h2 { margin-top: 0.5rem; }
.zusammenfassung { font-size: 1.05rem; margin: 0 0 0.75rem; }

.symbol {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}
.passt .symbol, .gruppe-passt .symbol { background: var(--passt); color: var(--karte); }
.norm .symbol, .gruppe-norm .symbol { background: var(--norm-grund); color: var(--norm); border: 2px solid var(--norm); font-family: Georgia, serif; font-style: italic; }
.offen .symbol, .gruppe-offen .symbol { background: var(--offen-grund); color: var(--offen); border: 2px dashed var(--offen); }
.nein .symbol, .gruppe-nein .symbol { background: var(--nein-grund); color: var(--nein); border-radius: 5px; }

/* Überblick-Kacheln */
.ueberblick {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.kachel a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.6rem;
  align-items: center;
  min-height: 64px;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  text-decoration: none;
  color: var(--text);
}
.kachel .symbol { grid-row: 1 / 3; }
.kachel-zahl { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.kachel-text { font-size: 0.88rem; line-height: 1.25; color: var(--text-leise); }
.kachel.passt a { background: var(--passt-grund); border-color: var(--passt); }
.kachel.norm a { background: var(--norm-grund); }
.kachel.offen a { background: var(--offen-grund); }
.kachel.nein a { background: var(--nein-grund); }
.kachel.null a { opacity: 0.75; }

.gruppe { margin: 1.75rem 0; scroll-margin-top: 1rem; }
.gruppe h3 { display: flex; align-items: center; gap: 0.55rem; }
.gruppe-text { margin: 0.25rem 0 0.75rem; color: var(--text-leise); font-size: 0.97rem; }
.anzahl { font-weight: 400; color: var(--text-leise); }
.leer { color: var(--text-leise); font-style: italic; margin: 0; }

.sitze { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.sitz {
  height: 100%;
  border: 1px solid var(--rand);
  border-top: 4px solid var(--rand);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  background: var(--karte);
  box-shadow: var(--schatten);
}
.gruppe-passt .sitz { border-top-color: var(--passt); }
.gruppe-norm .sitz { border-top-color: var(--norm); border-top-style: double; border-top-width: 5px; }
.gruppe-offen .sitz { border-top-color: var(--offen); border-top-style: dashed; }
.gruppe-nein .sitz { border-top-color: var(--nein); border-top-style: dotted; border-top-width: 5px; }

.sitz-typ {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-leise);
}
.meta { margin: 0 0 0.6rem; color: var(--text-leise); font-size: 0.93rem; }
.norm-hinweis { background: var(--norm-grund); padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.93rem; margin: 0.25rem 0 0.6rem; }
.pruefung { background: var(--offen-grund); padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.93rem; }
.unterzeile { margin: 0.4rem 0 0.35rem; font-weight: 600; font-size: 0.9rem; }

/* Platz-Kacheln: 2 × 2 wie im Auto */
.plaetze {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}
.platz {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: var(--flaeche);
  border: 1.5px solid transparent;
}
.platz.gewaehlt { border-color: var(--akzent); }
.platz-symbol {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}
.platz.passt .platz-symbol { background: var(--passt); color: var(--karte); }
.platz.norm .platz-symbol { background: var(--norm-grund); color: var(--norm); border: 2px solid var(--norm); font-family: Georgia, serif; font-style: italic; }
.platz.offen .platz-symbol { background: var(--offen-grund); color: var(--offen); border: 2px dashed var(--offen); }
.platz.nein .platz-symbol { background: var(--nein-grund); color: var(--nein); border-radius: 4px; }
.platz-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.platz-name { font-weight: 600; font-size: 0.92rem; }
.platz-status { font-size: 0.85rem; color: var(--text-leise); }
.platz.passt .platz-status { color: var(--passt); font-weight: 600; }
.platz.nein .platz-status { color: var(--nein); }

.quelle-kurz { margin: 0.7rem 0 0; font-size: 0.88rem; color: var(--text-leise); }

.mehr { margin-top: 0.35rem; font-size: 0.93rem; }
.mehr summary {
  cursor: pointer;
  color: var(--akzent);
  font-weight: 600;
  padding: 0.6rem 0;
  min-height: 44px;
  list-style-position: inside;
}
.platz-details { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.platz-details li { margin: 0.25rem 0; }
.quelle { font-size: 0.9rem; color: var(--text-leise); }
.quelle p { margin: 0.2rem 0; }

.angebot {
  margin-top: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rand);
  display: grid;
  gap: 0.4rem;
}
.werbung {
  justify-self: start;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--werbung);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 0.4rem;
}
.angebot-hinweis { margin: 0; font-size: 0.92rem; }

.hinweis-klein { font-size: 0.9rem; color: var(--text-leise); }

/* ---------- Erinnerung ---------- */
.erinnerung {
  background: var(--akzent-hell);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  margin-top: 2rem;
}
.erinnerung h2 { margin-top: 0; }
.erinnerung .knopf { margin-top: 0.75rem; }
.danke p { margin: 0.25rem 0; }

/* ---------- Erklärungen ---------- */
.erklaerung details {
  border-bottom: 1px solid var(--rand);
}
.erklaerung summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  min-height: 44px;
}
.erklaerung details p { margin: 0 0 0.75rem; }

.fuss {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rand);
  font-size: 0.9rem;
  color: var(--text-leise);
}
.fuss nav { display: flex; gap: 1.25rem; }
.fuss nav a { display: inline-block; padding: 0.4rem 0; }

/* Rechtsseiten */
.platzhalter { background: var(--offen-grund); padding: 0.6rem 0.8rem; border-radius: 6px; }
.luecke { background: var(--offen-grund); color: var(--offen); outline: 2px dashed var(--offen); outline-offset: 1px; padding: 0 0.2rem; border-radius: 3px; font-weight: 600; }

@media (min-width: 40rem) {
  h1 { font-size: 2rem; }
  .check { padding: 1.25rem 1.5rem; }
  .ueberblick { grid-template-columns: repeat(4, 1fr); }
  .plaetze { grid-template-columns: repeat(4, 1fr); }
  .knopf { width: auto; }
  .knopf-angebot { justify-self: start; }
}

@media (min-width: 60rem) {
  .kopf, main, .fuss { max-width: 60rem; }
  .intro { max-width: 44rem; }
  .check { max-width: 44rem; }
  .sitze { grid-template-columns: repeat(2, 1fr); }
  .plaetze { grid-template-columns: repeat(2, 1fr); }
  .erinnerung, .erklaerung, .finanzierung, .hinweis-klein { max-width: 44rem; }
}
