@font-face {
  font-family: "Quicksand";
  src: url("assets/fonts/quicksand.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --card-border: #ececec;
  --shadow: 0 6px 22px rgba(20, 24, 40, 0.06);
  --text: #444444;
  --text-strong: #222222;
  --text-dim: #6b7178;
  --accent: #f39f20;
  --accent-hover: #e08d0c;
  --accent-soft: #fff3e0;
  --accent-ink: #3a2600;
  --accent-text: #8a5200;
  --rot: #e5372b;
  --gelb: #ffc107;
  --gruen: #22b04b;
  /* Haken der Such-Animation: eigener, dunklerer Gruenton (4,13:1 auf --bg-soft).
     Die Ampelfarbe --gruen kaeme hell nur auf 2,65:1 - zu wenig fuer eine Grafik. */
  --haken: #1a8a3a;
  --ampel-body: #23262d;
  --ampel-licht-aus: #3a3f48;
  --ampel-licht-unbekannt: #4a5058;
  --dot-unbekannt: #b8bdc6;
  /* Sponsor-Logos: auch im Dark Mode helle Fläche (dunkle Logos wären sonst unsichtbar) */
  --logo-flaeche: #f6f7f9;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Quicksand", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 6px;
}

.brand-logo { display: inline-flex; }
.brand-logo img {
  height: 30px;
  width: auto;
  max-width: 70vw;
  display: block;
}

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card.error { border-color: var(--rot); }

.hidden { display: none !important; }

.app-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.app-title .akzent { color: var(--accent); }
.app-subtitle { color: var(--text-dim); margin: 4px 0 16px; font-size: 0.95rem; }

label { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }

.input-row { display: flex; gap: 8px; margin-bottom: 12px; }

input[type="tel"] {
  flex: 1;
  width: 100%;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--card-border);
  background: var(--bg);
  color: var(--text-strong);
}
input[type="tel"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

button {
  font-family: inherit;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 700;
}

button.primary { background: var(--accent); color: var(--accent-ink); width: 100%; box-shadow: 0 4px 14px rgba(243, 159, 32, 0.32); }
button.primary:hover { background: var(--accent-hover); }
button.primary:disabled { opacity: 0.55; cursor: wait; box-shadow: none; }

button.secondary {
  background: var(--bg);
  color: var(--text-strong);
  border: 1.5px solid var(--card-border);
}
button.secondary:hover { border-color: var(--accent); color: var(--accent); }

button.small { padding: 7px 13px; font-size: 0.85rem; font-weight: 600; }

.hint { font-size: 0.88rem; color: var(--text-dim); margin-top: 10px; }

/* Farb-Legende in der Eingabe-Karte */
.legende { margin-top: 12px; }
.legende summary { color: var(--accent-text); font-weight: 700; font-size: 0.9rem; }
.legende-liste { list-style: none; margin: 10px 0 0; display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; }
.legende-liste li { display: flex; align-items: center; gap: 8px; }
.legende-liste .dot { width: 14px; height: 14px; }

/* Rückruf-Button (volle Breite) */
.result-aktionen { display: flex; gap: 8px; margin-top: 16px; }
.result-aktionen button { flex: 1; }

/* Nochmal-versuchen in der Fehlerkarte */
#btn-retry { margin-top: 14px; }

/* Ampel – dunkles Gehäuse, farbige Signallichter (auf hellem Grund) */
.ampel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 78px;
  margin: 2px auto 16px;
  padding: 14px;
  background: var(--ampel-body);
  border-radius: 20px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.licht {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--ampel-licht-aus);
  transition: background 0.4s, box-shadow 0.4s;
}

.ampel.zeigt-rot .licht.rot { background: var(--rot); box-shadow: 0 0 22px var(--rot); }
.ampel.zeigt-gelb .licht.gelb { background: var(--gelb); box-shadow: 0 0 22px var(--gelb); }
.ampel.zeigt-gruen .licht.gruen { background: var(--gruen); box-shadow: 0 0 22px var(--gruen); }
.ampel.zeigt-unbekannt .licht { background: var(--ampel-licht-unbekannt); }

#result-card h2 { text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.nummer-anzeige { text-align: center; color: var(--text-dim); margin-bottom: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.inhaber { text-align: center; color: var(--text-strong); font-weight: 700; }
#result-begruendung { margin-top: 12px; }
#result-begruendung { line-height: 1.6; white-space: pre-line; font-size: 1.02rem; }

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--accent-text); font-size: 0.9rem; font-weight: 700; }

#details-liste { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
#details-liste li {
  font-size: 0.88rem;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  border-left: 3px solid var(--card-border);
}
#details-liste li.treffer { border-left-color: var(--rot); }
#details-liste li.kein_treffer { border-left-color: var(--gruen); }
#details-liste li.hinweis { border-left-color: var(--gelb); }
#details-liste li .q { font-weight: 700; display: block; margin-bottom: 2px; color: var(--text-strong); }
#details-liste li .s { color: var(--text-dim); }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.links a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-text);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 8px 12px;
}
.links a:hover { background: #ffe8c7; }

.meta { font-size: 0.8rem; color: var(--text-dim); margin-top: 12px; text-align: right; }

/* Such-Animation nahtlos in die App-Karte einbetten:
   Das Widget bringt eine eigene (fremde) Karten-Optik mit – die neutralisieren wir,
   damit die Animation wie ein normaler Teil der App-Karte aussieht (volle Breite, App-Listen-Stil). */
#loading-card .pcw-root { max-width: 100%; }
#loading-card .pcw-list {
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
  padding: 0;
}
#loading-card .pcw-list::before,
#loading-card .pcw-list::after { display: none; }
#loading-card .pcw-header { margin-bottom: 16px; }
#loading-card .pcw-title { font-size: 1.2rem; color: var(--text-strong); }
#loading-card .pcw-subtitle { color: var(--text-dim); font-size: 0.88rem; }
#loading-card .pcw-row {
  background: var(--bg-soft);
  border-color: var(--card-border);
  border-radius: 12px;
}
#loading-card .pcw-row.pcw-loading { background: var(--card); border-color: var(--accent); }
#loading-card .pcw-name { color: var(--text); }
/* Der Haken der fertigen Zeile kommt aus dem Widget mit stroke:#fff. Er liegt aber auf
   --bg-soft, weil die Regel darueber den Orange-Verlauf des Widgets schlaegt - hell sind
   das 1,07:1, der Haken ist unsichtbar. Gruen passt zur Aussage "fertig" und traegt in
   beiden Modi. */
#loading-card .pcw-check { stroke: var(--haken); }

/* Zwischenstand-Hinweis auf der Ergebnis-Karte */
.badge {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 7px 12px;
  margin-bottom: 14px;
}

/* Verlauf */
.history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-head h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-strong); }
#history-liste { list-style: none; display: flex; flex-direction: column; gap: 6px; }
#history-liste li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  cursor: pointer;
}
#history-liste li:hover { outline: 1.5px solid var(--accent-soft); }
.dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.dot.rot { background: var(--rot); }
.dot.gelb { background: var(--gelb); }
.dot.gruen { background: var(--gruen); }
.dot.unbekannt { background: var(--dot-unbekannt); }
.h-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.h-name { font-weight: 700; color: var(--text-strong); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-nummer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-strong); }
.h-nummer.klein { font-weight: 500; font-size: 0.8rem; color: var(--text-dim); }
.h-melden { flex-shrink: 0; }
.h-melden:disabled { opacity: 0.7; cursor: default; color: var(--gruen); border-color: var(--card-border); }
.h-zeit { flex-shrink: 0; font-size: 0.75rem; color: var(--text-dim); }

/* „Als App installieren"-Hinweis */
#install-card { border-color: var(--accent); background: var(--accent-soft); }
.install-zeile { display: flex; align-items: center; gap: 10px; }
.install-text { flex: 1; font-size: 0.92rem; color: var(--text-strong); }
button.primary.klein { width: auto; padding: 9px 14px; font-size: 0.88rem; flex-shrink: 0; }
button.secondary.klein { padding: 9px 14px; font-size: 0.88rem; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-dim); padding: 4px 6px; flex-shrink: 0; }
.icon-btn:hover { color: var(--text-strong); }
.install-schritte { margin: 12px 0 0 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }

footer { text-align: center; padding: 14px 16px 26px; }
footer p { font-size: 0.85rem; margin-bottom: 6px; }
footer a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
footer a:hover { color: var(--accent); }
footer .sep { color: var(--accent); margin: 0 4px; }
.footer-legal a { color: var(--accent-text); }
.footer-version { font-size: 0.68rem; color: var(--text-dim); opacity: 0.75; margin-top: 8px; font-weight: 400; }

/* ---------- Gesponserte Anzeige + Werbe-Hinweis ---------- */
/* Optisch bewusst zurückhaltend und klar vom Ergebnis abgesetzt: Werbung darf nie
   wie ein Teil der Bewertung aussehen. */
.sponsor-card { border-color: var(--card-border); background: var(--card); position: relative; }
.sponsor-label {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700; color: var(--text-dim); border: 1px solid var(--card-border);
  border-radius: 999px; padding: 2px 9px; margin-bottom: 10px;
}
/* Logo prominent über die volle Breite, darunter Firmenname als Titel */
.sponsor-kopf { display: block; }
.sponsor-logo {
  display: block; width: 100%; max-width: 100%; height: auto; max-height: 120px;
  object-fit: contain; border-radius: 12px; background: var(--logo-flaeche);
  padding: 14px 16px; margin-bottom: 14px;
}
.sponsor-text { min-width: 0; }
.sponsor-firma {
  font-weight: 700; color: var(--text-strong); font-size: 1.22rem; line-height: 1.3;
  letter-spacing: -0.01em;
}
.sponsor-bewertung {
  font-size: 1rem; color: var(--accent-text); font-weight: 700; margin-top: 7px;
  letter-spacing: 0.06em;
}
.sponsor-bewertung .sterne { color: var(--accent); font-size: 1.12rem; }
.sponsor-bewertung .note { color: var(--text-dim); font-size: 0.84rem; font-weight: 600; letter-spacing: 0; }
.sponsor-slogan { font-size: 0.96rem; color: var(--text); margin-top: 9px; line-height: 1.5; }
.sponsor-zusatz { font-size: 0.88rem; color: var(--text); margin-top: 10px; }
.sponsor-link {
  display: inline-block; margin-top: 12px; padding: 9px 16px; border-radius: 10px;
  /* --accent-ink statt #fff: Weiss auf dem Marken-Orange sind nur 2,14:1, der dunkle
     Token kommt auf 6,72:1. So machen es button.primary und .knopf-link schon laenger. */
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; font-size: 0.88rem;
}
.sponsor-link:hover { background: var(--accent-hover); }
.sponsor-hinweis { font-size: 0.7rem; color: var(--text-dim); margin-top: 12px; }

.werbe-hook { border-color: var(--accent); background: var(--accent-soft); }
.hook-text { font-size: 0.92rem; color: var(--text-strong); margin-bottom: 12px; }
.hook-fein { font-size: 0.7rem; color: var(--text-dim); margin-top: 8px; }

/* ---------- Werbe-Formular (Dialog) ---------- */
#werbe-dialog {
  border: none; border-radius: var(--radius); padding: 0; max-width: 520px; width: calc(100% - 24px);
  box-shadow: var(--shadow); color: var(--text); background: var(--card);
  /* Horizontal zentrieren MUSS explizit sein – der globale Reset (* { margin: 0 }) killt
     sonst die eingebaute Zentrierung des <dialog>, er klebt dann links.
     Vertikal BEWUSST fester Abstand statt auto: bei einem Formular, das höher ist als der
     Bildschirm, würde „auto" oben abschneiden – der Anfang wäre unerreichbar (Handy). */
  margin: 14px auto;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px); /* dvh beachtet die ein-/ausfahrende Browserleiste auf iOS */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#werbe-dialog::backdrop { background: rgba(20, 24, 40, 0.45); }
/* Unten kein Extra-Polster mehr: den Abstand zur iPhone-Homebar bringt der klebende
   Knopf-Bereich (.dialog-aktionen) selbst mit. */
.dialog-inhalt { padding: 22px 20px 0; }
.dialog-inhalt h2 { font-size: 1.15rem; color: var(--text-strong); margin-bottom: 8px; }
/* Überschrift und Paket-Kopf bekommen beim Öffnen bzw. nach der Paketwahl programmatisch den
   Fokus (damit Screenreader dort einsteigen und die Seite nicht ans Formularende springt).
   Beide tragen tabindex="-1", sind also per Tastatur NICHT erreichbar – der voreingestellte
   Fokusrahmen des Browsers ließ die Überschrift wie ein Eingabefeld aussehen. */
.dialog-inhalt h2:focus, .paket-kopf:focus { outline: none; }
.dialog-intro { font-size: 0.88rem; color: var(--text); margin-bottom: 16px; }
/* Zwischenüberschrift über dem Paket-Raster. Sie ersetzt einen freistehenden Absatz, der als
   dritter gleichrangiger Block unter Titel und Vorspann-Kasten stand. */
.schritt-titel { font-size: .98rem; font-weight: 700; color: var(--text-strong); margin: 20px 0 10px; }
.schritt-titel span { display: block; font-weight: 400; font-size: .84rem; color: var(--text-dim); margin-top: 2px; }
.dialog-inhalt label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-strong); margin: 12px 0 4px; }
.dialog-inhalt input[type="text"],
.dialog-inhalt input[type="email"],
.dialog-inhalt input[type="tel"],
.dialog-inhalt input[type="url"],
.dialog-inhalt input[type="file"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 10px;
  font-family: inherit; font-size: 0.92rem; color: var(--text-strong); background: var(--bg);
}
.dialog-inhalt input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pflicht { color: var(--rot); }
.feld-hint { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }
.feld-hint-inline { font-weight: 400; color: var(--text-dim); font-size: 0.74rem; }
.check-zeile { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: 0.82rem; margin-top: 14px; }
.check-zeile input { margin-top: 2px; flex-shrink: 0; }
.check-zeile a { color: var(--accent-text); }
.dialog-status { margin-top: 14px; font-size: 0.86rem; font-weight: 600; color: var(--gruen); }
.dialog-status.fehler { color: var(--rot); }
/* Knöpfe kleben am unteren Dialogrand: bei einem langen Formular auf dem Handy waren sie
   sonst erst nach dem Scrollen erreichbar – viele sehen sie dann gar nicht. */
.dialog-aktionen {
  display: flex; gap: 10px; margin-top: 22px;
  position: sticky; bottom: 0; z-index: 2;
  background: var(--card);
  padding: 12px 0 calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--card-border);
}
/* min-height 48px = bequeme Tippfläche nach den Zugänglichkeits-Empfehlungen */
.dialog-aktionen button { flex: 1; min-height: 48px; }
/* Honeypot – für Menschen unsichtbar, für Bots ein Köder */
.hp-feld { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Paket-Auswahl im Werbe-Dialog ---------- */
.paket-raster { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0 6px; }
@media (min-width: 620px) { .paket-raster { grid-template-columns: repeat(3, 1fr); } }
.paket-karte {
  border: 1px solid var(--card-border); border-radius: 14px; padding: 16px 14px;
  background: var(--card); position: relative; display: flex; flex-direction: column;
  cursor: pointer;
}
.paket-karte:hover { border-color: var(--accent); }
.paket-karte.empfohlen { border-color: var(--accent); border-width: 2px; box-shadow: 0 4px 16px rgba(243,159,32,.16); }
.paket-band {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  /* siehe oben: Weiss auf Orange 2,14:1, --accent-ink 6,72:1 */
  background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.paket-karte h3 { font-size: 1.06rem; color: var(--text-strong); margin-bottom: 6px; }
.paket-preis { color: var(--text-strong); font-size: .92rem; }
.paket-preis b { font-size: 2rem; line-height: 1; color: var(--accent-text); }
.paket-preis span { color: var(--text-dim); font-size: .82rem; }
.paket-jahr { font-size: .76rem; color: var(--text-dim); margin-top: 2px; }
.paket-liste { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.paket-liste li { font-size: .84rem; padding-left: 22px; position: relative; }
.paket-liste li::before { position: absolute; left: 0; font-weight: 700; }
.paket-liste li.ja::before { content: "✓"; color: var(--gruen); }
.paket-liste li.nein::before { content: "✕"; color: #c9ccd1; }
.paket-liste li.nein { color: #a8adb4; }
.paket-karte .paket-knopf { width: 100%; margin-top: 4px; }
.paket-kopf {
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px;
  padding: 10px 12px; font-size: .9rem; color: var(--text-strong); margin-bottom: 6px;
}
.paket-kopf b { color: var(--accent-text); }
.link-knopf {
  background: none; border: none; color: var(--accent-text); text-decoration: underline;
  cursor: pointer; font: inherit; font-size: .82rem; padding: 0 0 0 8px;
}
/* Felder, die nur zu bestimmten Paketen gehören */
.paket-feld.hidden { display: none; }

/* Treffer der Bewertungssuche */
.bew-treffer {
  display: block; width: 100%; text-align: left; border: 1px solid var(--card-border);
  background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 8px;
  cursor: pointer; font: inherit;
}
.bew-treffer:hover { border-color: var(--accent); }
.bew-treffer.gewaehlt { border-color: var(--gruen); background: #f2fbf5; }
.bew-treffer .bt-note { font-weight: 700; color: var(--accent-text); }
.bew-treffer .bt-name { font-size: .86rem; color: var(--text-strong); }
.bew-treffer .bt-quelle { font-size: .72rem; color: var(--text-dim); }

/* Kostenübersicht über dem Absenden-Knopf */
.kosten-box {
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px;
  padding: 14px; margin-top: 18px; font-size: .9rem; color: var(--text-strong);
}
.kosten-box .kb-preis { font-size: 1.05rem; font-weight: 700; }
.kosten-box .kb-fein { font-size: .78rem; color: var(--text-dim); margin-top: 4px; }

/* Live-Vorschau */
.vorschau-box { margin-top: 20px; }
.vorschau-titel { font-size: .76rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.vorschau-karte { box-shadow: none; border: 1px dashed var(--card-border); margin: 0; }
.vorschau-karte .sponsor-link { cursor: default; }

/* ---------- Beispiel-Anzeige (Paketkarten + Hook) ---------- */
/* Zeigt beim Entscheiden, was man bekommt - die Haken-Liste allein erklaert den
   Preisunterschied nicht. Bewusst klein, grau und mit "Beispiel" beschriftet, damit
   niemand sie fuer eine echte Anzeige haelt. */
.paket-beispiel { position: relative; margin: 10px 0 12px; }
.beispiel-marke {
  position: absolute; top: -7px; left: 8px; z-index: 1;
  background: var(--bg-soft); color: var(--text-dim);
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px;
}
.beispiel-karte {
  border: 1px dashed var(--card-border); border-radius: 10px;
  padding: 12px 10px 10px; background: var(--bg-soft); text-align: center;
}
/* Platzhalter statt grauem Balken: Ein Kunde soll auf den ersten Blick erkennen, dass an
   dieser Stelle SEIN Logo steht - ein Farbverlauf sah nur nach Ladebalken aus. */
.beispiel-logo {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 30px; width: 92%; max-width: 150px; margin: 0 auto 8px;
  white-space: nowrap; overflow: hidden;
  border: 1px dashed #c5cad1; border-radius: 7px; background: #fff;
  color: #6e747c; font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.beispiel-logo svg { width: 14px; height: 14px; flex-shrink: 0; }
.beispiel-firma { font-size: .78rem; font-weight: 700; color: var(--text-strong); }
.beispiel-sterne { font-size: .68rem; color: var(--accent-text); margin-top: 1px; }
.beispiel-slogan { font-size: .68rem; color: var(--text-dim); margin-top: 2px; line-height: 1.35; }
.beispiel-zusatz { font-size: .62rem; color: var(--text-dim); margin-top: 3px; line-height: 1.35; }
.beispiel-link {
  display: inline-block; margin-top: 6px; font-size: .64rem; font-weight: 700;
  color: var(--accent-text); border: 1px solid var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 2px 8px;
}
/* In der Hook-Karte etwas mehr Luft, dort steht sie allein */
.werbe-hook .paket-beispiel { max-width: 260px; margin: 12px auto 14px; }

/* Ueberschrift einer Feldgruppe, die zu KEINEM einzelnen Eingabefeld gehoert
   (ein <label> ohne "for" waere fuer Screenreader ein Fehler) */
.feld-titel { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }

/* Feld mit fehlerhafter Eingabe deutlich hervorheben */
[aria-invalid="true"] { border-color: var(--rot) !important; box-shadow: 0 0 0 3px rgba(229,55,43,.14); }

/* Dauereinstieg in der Fusszeile */
.footer-werbung { margin-bottom: 4px; }
.footer-werbung .link-knopf { font-size: .84rem; padding: 0; }

/* Vertrauens-Vorspann und Anbieterzeile im Werbe-Dialog.
   Der Dialog verdeckt die Fusszeile - wer ueber ?werbung=1 oder die Fusszeile einsteigt,
   saehe sonst nirgends, was die App tut und bei wem er verbindlich bestellt. */
/* BEWUSST ohne Rahmen: Mit Rahmen stand der Kasten als eigene Insel zwischen Überschrift und
   Paket-Raster und verstärkte den zerstückelten Eindruck. Der weiche Hintergrund genügt, um ihn
   als zusammengehörigen Vorspann zu lesen. */
.dialog-vorspann {
  background: var(--bg-soft); border-radius: 12px;
  padding: 14px 15px; margin: 10px 0 0; font-size: .88rem; line-height: 1.45;
}
.vorspann-lead { color: var(--text-strong); }
.vorspann-lead b { color: var(--text-strong); }
/* Haken-Liste statt Fließtext: Der Vorspann muss auf dem Handy in einem Blick erfassbar sein –
   zwei volle Absätze davor waren eine Textwand, durch die niemand liest. */
.vorspann-liste { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.vorspann-liste li { font-size: .85rem; padding-left: 21px; position: relative; color: var(--text); }
.vorspann-liste li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--gruen); }
.vorspann-liste li b { color: var(--text-strong); }
/* Vertragsformalien als Fußzeile: Sie müssen dastehen, aber nicht dort, wo der Leser entscheidet,
   ob ihn das Angebot interessiert. Kontrast bleibt über var(--text-dim) im AA-Bereich. */
.vorspann-fein { margin-top: 11px; font-size: .76rem; line-height: 1.45; color: var(--text-dim); }
/* Die Einschränkung bewusst abgesetzt und NICHT als Haken – siehe Kommentar im HTML.
   Grüner Balken statt Trennlinie: Die Linie zerschnitt den Kasten in zwei Hälften, der Balken
   hebt den Hinweis hervor UND verweist auf das, worum es darin geht – die grüne Ampel. */
.vorspann-bedingung {
  margin-top: 11px; padding-left: 10px; border-left: 3px solid var(--gruen);
  font-size: .83rem; line-height: 1.45; color: var(--text);
}
.vorspann-bedingung b { color: var(--text-strong); }
.anbieter-zeile { font-size: .76rem; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }
.anbieter-zeile a { color: var(--accent-text); }
.anbieter-zeile .sep { opacity: .5; }

/* ---------- Verkaufsseite /werbung/ ---------- */
.seite-werbung main { max-width: 720px; }
.seite-werbung .paket-karte { cursor: default; }
.seite-werbung .paket-karte:hover { border-color: var(--card-border); }
.seite-werbung .paket-karte.empfohlen:hover { border-color: var(--accent); }
.abschnitt-titel { font-size: 1.15rem; font-weight: 700; color: var(--text-strong); margin-bottom: 12px; }
.knopf-link {
  display: block; text-align: center; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border-radius: 12px;
  padding: 14px 18px; font-weight: 700; margin-top: 18px;
  box-shadow: 0 4px 14px rgba(243, 159, 32, 0.32);
}
.knopf-link:hover { background: var(--accent-hover); }
.vorteile { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .94rem; line-height: 1.55; }
.vorteile li { padding-left: 24px; position: relative; }
.vorteile li::before { content: "✓"; position: absolute; left: 0; color: var(--gruen); font-weight: 700; }
.seite-werbung .paket-raster { margin-top: 4px; }
.seite-werbung details { margin-top: 10px; }
.seite-werbung details .hint { margin-top: 6px; }

/* Paketknopf auf der Verkaufsseite: fuehrt mit vorgewaehltem Paket in den Bestell-Dialog,
   damit der Interessent seine Wahl nicht zweimal treffen muss. */
.paket-knopf-link {
  display: block; text-align: center; text-decoration: none;
  border-radius: 12px; padding: 11px 14px; font-weight: 700; font-size: 0.92rem; margin-top: 4px;
}
.paket-knopf-link.primary { background: var(--accent); color: var(--accent-ink); }
.paket-knopf-link.primary:hover { background: var(--accent-hover); }
.paket-knopf-link.secondary { background: var(--bg); color: var(--text-strong); border: 1.5px solid var(--card-border); }
.paket-knopf-link.secondary:hover { border-color: var(--accent); color: var(--accent-text); }

/* "Anzeige"-Kennzeichnung auch in den Beispielkarten: Die Seite verkauft "ehrlich
   gekennzeichnet" - dann muss das Beispiel genau das zeigen. */
.beispiel-anzeige {
  display: block; font-size: .55rem; font-weight: 700; letter-spacing: .08em;
  /* --text-dim (#6b7178) statt #9aa0a8: Auf dem hellen Kartenhintergrund waren das nur
     ~2,5:1 - ausgerechnet bei dem Label, mit dem die Seite „ehrlich gekennzeichnet" belegt. */
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px;
}

/* =====================================================================
   DARK MODE
   Folgt automatisch der Systemeinstellung des Geräts
   (prefers-color-scheme: dark) – kein manueller Schalter, dadurch kein
   Theme-Blitz (FOUC) beim Laden und nichts, was out-of-sync geraten kann.
   Überschrieben werden nur die Variablen aus :root plus die wenigen
   Stellen, die helle Fixwerte enthalten.
   ===================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #14161c;
    --bg-soft: #17191e;
    --card: #1f222a;
    --card-border: #2e333d;
    --shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    --text: #c9cdd5;
    --text-strong: #f2f4f8;
    --text-dim: #99a1ad;
    --accent-hover: #ffb03d;
    --accent-soft: rgba(243, 159, 32, 0.13);
    --accent-text: #f5a72c;
    --rot: #ff5a4d;
    --gelb: #ffc832;
    --gruen: #34c759;
    --haken: #34c759;
    --ampel-body: #131519;
    --ampel-licht-aus: #363c47;
    --ampel-licht-unbekannt: #4c5460;
    --dot-unbekannt: #6a7280;
    /* --logo-flaeche bleibt bewusst hell (#f6f7f9 wie im Light Mode):
       dunkle/transparente Sponsor-Logos wären auf dunklem Grund unsichtbar. */
  }

  /* Ampel-Gehäuse: feiner heller Rand, damit es sich von der ebenfalls
     dunklen Karte abhebt */
  .ampel { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08); }

  /* Quellen-Links: Hover etwas deutlicher als im Light Mode */
  .links a:hover { background: rgba(243, 159, 32, 0.26); }

  /* Dialog-Backdrop: dunkler für mehr Tiefe */
  #werbe-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }

  /* „Nein“-Einträge der Paketlisten (helle Fixwerte aus dem Light Mode) */
  .paket-liste li.nein { color: #838b99; }
  .paket-liste li.nein::before { color: #4d5560; }

  /* Ausgewählter Bewertungs-Treffer (helles Grün aus dem Light Mode) */
  .bew-treffer.gewaehlt { background: rgba(52, 199, 89, 0.12); }

  /* Kopf-Logo: Das Original traegt einen graubraunen Schriftzug (#675e55) - auf dunklem Grund
     nur 2,77:1, "The" und "Designer" verschwaenden, das orange "Web" bliebe stehen.
     logo-quer-dark.png hellt NUR die neutralen Bildpunkte auf (14,7:1) und laesst das
     Marken-Orange unangetastet (erzeugt von assets/mach-logo-dark.py).
     ⛔ Bewusst hier und NICHT als <picture> im HTML: Der Service Worker liefert
     stale-while-revalidate - HTML und CSS koennen aus verschiedenen Generationen stammen,
     und dann stuenden helle Farben neben dem hellen Logo. Der Pfad wird relativ zu dieser
     Datei aufgeloest und gilt damit auch fuer /werbung/. */
  .brand-logo img { content: url("assets/logo-quer-dark.png"); }

  /* Beispiel-Anzeige: Logo-Platzhalter bekommt dunkle Fläche */
  .beispiel-logo { border-color: #3f4550; background: #23262e; color: var(--text-dim); }

  /* ---------- Such-Animation (phonecheck-widget.js) ----------
     Das Widget bringt eigene helle Farben mit. Seine CSS-Variablen sind
     offiziell überschreibbar, die restlichen Fixwerte werden hier im
     Host-CSS gezielt überdeckt (höhere Spezifität durch #loading-card). */
  #loading-card .pcw-root {
    --pcw-text: var(--text-strong);
    --pcw-muted: var(--text-dim);
    --pcw-card-bg: var(--card);
    --pcw-row-bg: var(--bg-soft);
    --pcw-row-text: var(--text);
    --pcw-border: var(--card-border);
    /* Das Widget-Orange #e08d0c kommt auf dem dunklen Balken (14 % Orange ueber der Karte)
       nur auf rund 4,6:1. Betrifft nach der Regel weiter unten noch die Zaehlzeile
       .pcw-meta und die Fortschrittsfuellung .pcw-trackfill - der Statustext der
       laufenden Quelle wird dort eigens auf --accent gesetzt. */
    --pcw-accent-deep: var(--accent-hover);
  }
  #loading-card .pcw-row.pcw-loading { background: var(--card); }
  #loading-card .pcw-chip { color: #9aa3b2; background: rgba(255, 255, 255, 0.08); }
  #loading-card .pcw-statustext { color: #7e8794; }
  /* ⛔ Muss NACH der Zeile darueber stehen und mehr Klassen tragen: Sonst faerbt die
     Host-Regel (ID + Klasse) auch die GERADE LAUFENDE Quelle grau und die Animation
     verliert ihre Bildsprache - man sieht nicht mehr, welche Pruefung gerade laeuft. */
  #loading-card .pcw-row.pcw-loading .pcw-statustext { color: var(--accent); }
}
