/* gratis-autobewertung.de — handgeschrieben, keine Frameworks, keine Webfonts.
   Reihenfolge: Tokens, Reset, Basistypografie, Layout, Komponenten, Utilities, Print. */

/* ---------- Tokens ---------- */
:root {
  --ink: #14181f;
  --ink-soft: #4a5462;
  --muted: #66707e;
  --line: #e0e5ec;
  --line-soft: #eef1f5;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-sink: #eef2f7;

  --accent: #0f5f8f;
  --accent-dark: #0b4a70;
  --accent-tint: #e8f1f8;
  --go: #0f7a52;
  --go-dark: #0b5f3f;
  --warn-bg: #fdf6e6;
  --warn-line: #e8d49a;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(20, 24, 31, .05), 0 4px 16px rgba(20, 24, 31, .06);
  --shadow-lg: 0 2px 6px rgba(20, 24, 31, .06), 0 12px 40px rgba(20, 24, 31, .10);

  --wrap: 1120px;
  --prose: 68ch;
  --step: clamp(1rem, .95rem + .25vw, 1.0625rem);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Typografie ---------- */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 1.35rem + 2.2vw, 2.9rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.1rem, 1.03rem + .35vw, 1.25rem); margin-top: 1.8em; }
h2 + h3 { margin-top: 1.2em; }
p, ul, ol, table, blockquote { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.35em; }
/* Abstand zwischen Aufzählungspunkten nur im Fließtext. Global gesetzt verschiebt die Regel
   die Elemente in Flex-Listen (Navigation, Karten, Schritte) gegeneinander.
   :where() hält die Spezifität bei 0. */
:where(.prose, .note, .callout, .faq) li + li { margin-top: .35em; }
strong { font-weight: 650; }
small { font-size: .875em; color: var(--muted); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.lead {
  font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
}

blockquote {
  margin-inline: 0;
  padding: .1em 0 .1em 1.1em;
  border-left: 3px solid var(--line);
  color: var(--ink-soft);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: .12em .38em;
  word-break: break-word;
}

table { width: 100%; border-collapse: collapse; font-size: .95em; }
th, td { text-align: left; padding: .7em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; background: var(--bg-soft); }
tbody tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 .5em; border: 1px solid var(--line); border-radius: var(--radius); }
.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Hinweis nur dort, wo die Tabelle breiter als der Bildschirm ist. */
.table-hint { display: none; font-size: .85rem; color: var(--muted); margin: 0 0 1.15em; }
@media (max-width: 47.99rem) { .table-hint { display: block; } }
.table-scroll table { margin: 0; }
.table-scroll th:first-child, .table-scroll td:first-child { padding-left: 1em; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.prose { max-width: var(--prose); }
.prose > :first-child { margin-top: 0; }
section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .7em 1.1em; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; flex: none; color: var(--accent); }
.brand span i { font-style: normal; color: var(--accent); }
.site-nav ul { display: flex; gap: 1.15rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .3em 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
/* Auf schmalen Viewports seitlich scrollen statt umbrechen. Der negative Rand lässt die
   Leiste bis an den Bildschirmrand laufen, damit erkennbar ist, dass dort noch etwas folgt. */
@media (max-width: 47.99rem) {
  .site-header .wrap { padding-bottom: .35rem; }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(clamp(1rem, 4vw, 2rem) * -1);
    padding-inline: clamp(1rem, 4vw, 2rem);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 1.25rem; }
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(170deg, var(--accent-tint) 0%, var(--bg-soft) 55%, var(--bg) 100%);
  border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(2rem, 4vw, 3.25rem) clamp(2.5rem, 5vw, 4rem);
}
.hero-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.hero h1 { margin-bottom: .35em; }
.eyebrow {
  display: inline-block; margin: 0 0 1rem;
  font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-dark); background: rgba(255, 255, 255, .75);
  border: 1px solid #cddfec; border-radius: 999px; padding: .35em .85em;
}
.usp { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.usp li { position: relative; padding-left: 1.9rem; color: var(--ink-soft); }
.usp li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / .8rem no-repeat;
}

/* ---------- Widget-Karte ---------- */
.widget-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.widget-card > header {
  padding: 1.15rem clamp(1rem, 3vw, 1.6rem) 1rem;
  border-bottom: 1px solid var(--line-soft); background: var(--bg-soft);
}
.widget-card > header h2 { margin: 0 0 .2em; font-size: 1.15rem; }
.widget-card > header p { margin: 0; font-size: .92rem; color: var(--muted); }
.widget-body { padding: clamp(1rem, 3vw, 1.5rem); min-height: 260px; }
#wkda-funnel-container { min-height: 0; }
#wkda-funnel-container iframe { width: 100%; border: 0; display: block; }

/* Consent-Gate im Widget */
.widget-gate { text-align: center; padding: clamp(1rem, 3vw, 2rem) .5rem; }
.widget-gate .gate-icon {
  width: 44px; height: 44px; margin: 0 auto 1rem; color: var(--accent); opacity: .85;
}
.widget-gate h3 { margin: 0 0 .5em; font-size: 1.1rem; }
.widget-gate p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; font-size: .96rem; }
.widget-gate .gate-actions {
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.35rem;
}
.widget-gate .gate-note { font-size: .84rem; color: var(--muted); margin-top: 1.1rem; }

.widget-loading { text-align: center; color: var(--muted); padding: 3rem .5rem; font-size: .95rem; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto .9rem;
  border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.5em; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--go); color: #fff; }
.btn-primary:hover { background: var(--go-dark); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--accent); border-color: #c6d8e6; }
.btn-secondary:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-ghost {
  background: none; border-color: transparent; color: var(--accent);
  padding: .8em .6em; text-decoration: underline; text-underline-offset: .18em;
}
.btn-ghost:hover { color: var(--accent-dark); }
.btn-sm { padding: .55em 1em; font-size: .92rem; }

/* ---------- Karten / Steps ---------- */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; margin: 1.75rem 0 0; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 .4em; font-size: 1.05rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.card a { font-weight: 600; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.4rem; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; align-items: start; }
.steps > li::before {
  content: counter(s); grid-row: span 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-dark);
  font-weight: 700; font-size: 1.02rem; border: 1px solid #cddfec;
}
.steps h3 { margin: .25em 0 .3em; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0; background: var(--bg); }
.faq details + details { border-top: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; padding: 1rem 2.75rem 1rem 1.1rem; position: relative;
  font-weight: 600; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.1rem; top: 1.25rem;
  width: .6rem; height: .6rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { background: var(--bg-soft); }
.faq details > :not(summary) { margin: 0 1.1rem 1.1rem; color: var(--ink-soft); }

/* ---------- Hinweiskasten ---------- */
.note {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin: 1.5rem 0; font-size: .96rem;
}
.note p:last-child { margin-bottom: 0; }
.note strong { font-weight: 650; }

.callout {
  background: var(--accent-tint); border: 1px solid #cddfec; border-radius: var(--radius);
  padding: 1.35rem 1.4rem; margin: 2rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 1.25rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4em; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .4em; color: var(--line); color: #b9c2ce; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-sink); border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 3rem) 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem);
  font-size: .93rem; color: var(--ink-soft);
}
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .8em; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: .45em; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #dde3ea;
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between;
  font-size: .87rem; color: var(--muted);
}
.footer-bottom button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.footer-bottom button:hover { color: var(--accent); }
.disclosure { margin-top: 1.5rem; font-size: .87rem; color: var(--muted); max-width: 78ch; }

/* ---------- Consent-Dialog ---------- */
/* Blockierende Schicht: die Seite ist erst nach einer Entscheidung nutzbar.
   Auf Impressum und Datenschutzerklärung erscheint sie nicht. */
.consent {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 24, 31, .55);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  overflow-y: auto;
}
.consent[hidden] { display: none; }
/* Hintergrund nicht mitscrollen lassen, solange der Dialog offen ist. */
html.consent-open, html.consent-open body { overflow: hidden; }

.consent-dialog {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(20, 24, 31, .28);
  padding: clamp(1.35rem, 4vw, 2rem);
  width: 100%; max-width: 34rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.consent-dialog h2 { margin: 0 0 .5em; font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); }
.consent-dialog > p { margin: 0 0 1.1rem; font-size: .95rem; color: var(--ink-soft); }

.consent-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.consent-actions .btn { flex: 1 1 auto; }
.consent-actions .btn-ghost { flex: 0 0 auto; }

.consent-options { margin: 0 0 1.1rem; display: grid; gap: .75rem; }
.consent-options[hidden] { display: none; }
.consent-opt {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem;
  background: var(--bg-soft); font-size: .92rem;
}
.consent-opt input { margin: .2em 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.consent-opt strong { display: block; margin-bottom: .15em; }
.consent-opt span { color: var(--muted); }
.consent-opt input:disabled + div strong::after { content: " (immer aktiv)"; font-weight: 400; color: var(--muted); }

/* Eine gemeinsame, ruhige Zeile für Nebenaktionen. Vorher standen hier drei verschiedene
   Stile übereinander: zwei Knöpfe, ein hervorgehobener Link und darunter kleine Fußnotenlinks. */
.consent-links {
  margin: 1.35rem 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.4rem;
  font-size: .88rem; color: var(--muted);
}
.consent-links a, .consent-links .linklike { color: var(--muted); }
.consent-links a:hover, .consent-links .linklike:hover { color: var(--accent); }

/* Button, der wie ein Link aussehen soll — nötig, weil das Öffnen der Einstellungen keine
   Navigation ist und deshalb ein <button> bleiben muss. */
.linklike {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: .18em;
}

/* Schließen nur, wenn der Dialog freiwillig geöffnet wurde (Cookie-Einstellungen).
   Ohne getroffene Entscheidung gibt es kein Schließen. */
.consent-close {
  float: right; margin: -.4rem -.4rem 0 .6rem;
  background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted); padding: .2rem .45rem;
  border-radius: var(--radius);
}
.consent-close:hover { color: var(--ink); background: var(--bg-soft); }
.consent-close[hidden] { display: none; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack-cta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.75rem 0 0; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .consent, .widget-card, .stack-cta { display: none !important; }
  body { font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
