/* Öffentliche Händlerseite /haendler. Externes Stylesheet, damit die CSP ohne 'unsafe-inline' auskommt.
   Tokens wie WagenGebot Pro (--accent #12664f, Logo-Blau #2166F3, Radien 10–16 px). */
:root {
  color-scheme: light dark;
  --page: #f3f6f8;
  --surface: #ffffff;
  --surface-alt: #eef3f1;
  --ink: #17202a;
  --muted: #56626d;
  --line: #d9e2e7;
  --accent: #12664f;
  --accent-strong: #0d4d3d;
  --accent-soft: #dcefe8;
  --accent-ink: #ffffff;
  --brand-blue: #2166f3;
  --brand-blue-soft: #eaf0fd;
  --link: #0d5945;
  --promo-bg: #0d4d3d;
  --promo-ink: #ffffff;
  --promo-tag-bg: #ffffff;
  --promo-tag-ink: #0d4d3d;
  --focus-color: #2166f3;
  --radius-control: 10px;
  --radius-card: 12px;
  --radius-section: 16px;
  --shadow-card: 0 1px 2px rgba(23, 32, 42, .04), 0 6px 18px rgba(23, 32, 42, .05);
  --shadow-raised: 0 12px 32px rgba(24, 39, 52, .10);
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #f1f8f5 100%);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101719;
    --surface: #182124;
    --surface-alt: #141d20;
    --ink: #eef4f2;
    --muted: #b2c0bd;
    --line: #2f3d40;
    --accent: #7bd2b4;
    --accent-strong: #a2e6cd;
    --accent-soft: #1d302c;
    --accent-ink: #0b1f19;
    --brand-blue: #8ab1ff;
    --brand-blue-soft: #1a2640;
    --link: #8fdcc1;
    --promo-bg: #173a30;
    --promo-ink: #eef8f4;
    --promo-tag-bg: #7bd2b4;
    --promo-tag-ink: #0b1f19;
    --focus-color: #8ab1ff;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-raised: 0 12px 32px rgba(0, 0, 0, .35);
    --hero-bg: linear-gradient(135deg, #182124 0%, #15231f 100%);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; }

a:hover { color: var(--accent-strong); }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink);
}

p { margin: 0; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  color: #ffffff;
  background: #12664f;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

/* Aktions-Banner */
.promo {
  color: var(--promo-ink);
  background: var(--promo-bg);
}

.promo-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
}

.promo-tag {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--promo-tag-ink);
  background: var(--promo-tag-bg);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.promo-text {
  font-size: 15px;
  line-height: 1.4;
}

.promo-text strong {
  margin-right: 6px;
  font-size: 17px;
  font-weight: 800;
}

/* Kopfzeile */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.brand-logo {
  width: 124px;
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.header-link:hover { color: var(--accent); text-decoration: underline; }

/* Schaltflächen */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(13, 77, 61, .2);
}

.btn-primary:hover {
  color: var(--accent-ink);
  background: var(--accent-strong);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.btn-small {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 15px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-row-center {
  justify-content: center;
  margin-top: 32px;
}

/* Hero */
.hero {
  padding-block: 56px 64px;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
}

.lead {
  max-width: 60ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.hero .cta-row { margin-top: 28px; }

.hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.fee-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-blue);
  border-radius: var(--radius-section);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.fee-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.fee-amount {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 750;
}

.fee-number {
  color: var(--accent);
  font-size: 48px;
  font-weight: 850;
  line-height: 1;
}

.fee-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.fee-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.fee-list li {
  position: relative;
  padding-left: 28px;
  font-weight: 650;
}

.fee-list li::before {
  content: "";
  position: absolute;
  top: .35em;
  left: 2px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* Abschnitte */
.section { padding-block: 64px; }

.section-alt {
  border-block: 1px solid var(--line);
  background: var(--surface-alt);
}

.section-head { margin-bottom: 28px; }

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.benefit-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius-control);
  color: var(--accent);
  background: var(--accent-soft);
}

.benefit-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit h3,
.step h3 {
  font-size: 18px;
  font-weight: 750;
}

.benefit p,
.step p {
  margin-top: 6px;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.step-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #2166f3;
  font-size: 18px;
  font-weight: 800;
}

/* FAQ */
.faq-shell { max-width: 820px; }

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}

.faq details p {
  max-width: 65ch;
  padding-bottom: 18px;
  color: var(--muted);
}

/* Abschluss */
.closing {
  padding-block: 48px;
  color: var(--promo-ink);
  background: var(--promo-bg);
}

.closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.closing h2 {
  color: inherit;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
}

.closing p {
  margin-top: 6px;
  opacity: .92;
}

.closing .btn-primary {
  color: var(--promo-tag-ink);
  background: var(--promo-tag-bg);
}

.closing .btn-primary:hover {
  color: var(--promo-tag-ink);
  background: var(--accent-soft);
}

.closing .btn-secondary {
  color: var(--promo-ink);
  background: transparent;
  border-color: rgba(255, 255, 255, .55);
}

.closing .btn-secondary:hover {
  color: var(--promo-ink);
  border-color: var(--promo-ink);
}

.closing a:focus-visible { outline-color: #ffffff; }

/* Fußzeile */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 980px) {
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .closing-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .promo-inner { align-items: flex-start; }
  .promo-tag { margin-top: 1px; }
  .promo-text strong { display: block; margin: 0 0 2px; }
  .header-inner { min-height: 64px; }
  .brand-logo { width: 104px; }
  .header-link { padding-inline: 6px; font-size: 14px; }
  .hero { padding-block: 36px 44px; }
  .lead { font-size: 17px; }
  .cta-row .btn { width: 100%; }
  .fee-card { padding: 22px; }
  .section { padding-block: 44px; }
  .benefit-grid,
  .steps { grid-template-columns: 1fr; }
  .step {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
  }
  .step-number { grid-row: span 2; margin-bottom: 0; }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 20px;
  }
}

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

@media print {
  .skip-link, .header-nav, .site-footer, .cta-row { display: none; }
  body, .hero, .section-alt { background: #ffffff; color: #000000; }
}

/* Händler-AGB /haendler/agb (lokal/haendler-agb.html, erzeugt von scripts/build-dealer-terms-page.cjs).
   Gleiche Tokens wie /haendler; Lesetext 17 px (mobil 16 px), Zeilenlänge höchstens 72ch. */
.terms {
  padding-block: 40px 64px;
}

.terms-shell {
  max-width: 1120px;
}

.terms-head {
  max-width: 880px;
}

.terms-head h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
}

.terms-version {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 16px;
  font-size: 15px;
}

.terms-version span {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.terms-version span:first-child {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.terms-print-hint {
  max-width: 72ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.terms-summary {
  max-width: 72ch;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-card);
  background: var(--brand-blue-soft);
}

.terms-summary h2 {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
}

.terms-summary ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.terms-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}

.terms-toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.terms-toc h2 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 800;
}

.terms-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms-toc a {
  display: flex;
  gap: 6px;
  min-height: 36px;
  align-items: baseline;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
}

.terms-toc a:hover {
  color: var(--accent);
  background: var(--surface-alt);
}

.toc-no {
  flex: none;
  min-width: 2.2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.terms-body {
  min-width: 0;
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.65;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.terms-section + .terms-section {
  margin-top: 36px;
}

.terms-section h2 {
  margin-bottom: 14px;
  padding-top: 4px;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  hyphens: manual;
}

.terms-section,
.clause {
  scroll-margin-top: 16px;
}

.clause,
.clause-cont {
  margin-top: 12px;
}

.clause:target {
  margin-inline: -10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.clause-no {
  margin-right: 4px;
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.clause-no:hover { text-decoration: underline; }

.clause-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 24px;
}

.terms-end {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 980px) {
  .terms-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .terms-toc {
    position: static;
    max-height: none;
    max-width: 72ch;
  }
  .terms-toc ol {
    columns: 2;
    column-gap: 16px;
  }
  .terms-toc li { break-inside: avoid; }
}

@media (max-width: 600px) {
  .terms { padding-block: 28px 44px; }
  .terms-summary { padding: 16px; }
  .terms-toc ol { columns: 1; }
  .terms-body { font-size: 16px; }
}

/* Sehr schmale Geräte (320 px): „Geschäftsbedingungen“ passt bei 28 px nicht in eine Zeile und würde
   ohne Trennstrich mitten im Wort umbrechen. hyphens: auto trennt Überschriften zu früh („Allgemeine Ge-“),
   daher fluide kleinere Größe, bis das längste Wort ganz in die Zeile passt (320 px: 24 px). */
@media (max-width: 359.98px) {
  .terms-head h1 { font-size: clamp(22px, 7.5vw, 28px); }
}

@media print {
  .terms-page .site-header,
  .terms-toc,
  .terms-print-hint,
  .terms-summary,
  .terms-end a { display: none; }
  .terms-page { font-size: 11pt; }
  .terms { padding: 0; }
  .terms-shell { width: 100%; max-width: none; }
  .terms-layout { display: block; margin-top: 16px; }
  .terms-body { font-size: 11pt; line-height: 1.45; }
  .terms-version span { padding: 0; border: 0; background: none; color: #000000; }
  .terms-head h1 { font-size: 20pt; }
  .terms-section h2 { font-size: 13pt; break-after: avoid; page-break-after: avoid; }
  .terms-page a { color: #000000; text-decoration: none; }
  .clause:target { margin: 12px 0 0; padding: 0; background: none; }
  .clause, .clause-list li { break-inside: avoid; }
}

/* iPhone-App (WebView ohne Systemränder) und Querformat: Inhalte nicht unter Statusleiste,
   Dynamic Island oder Home-Indikator. Im normalen Safari sind die Werte im Hochformat 0. */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.promo,
.site-header { padding-top: env(safe-area-inset-top, 0px); }
.promo ~ .site-header { padding-top: 0; }
.site-footer { padding-bottom: env(safe-area-inset-bottom, 0px); }
