/* Kfz-Kreditvergleich – Theme-Styles. Entspricht dem Design der Astro-Seite (Konzept, Abschnitt 08).
   Kennzeichenblau nur für Kopfbereich, Haupt-CTA und Links. Grün und Rot nur semantisch. Gelb nur im Logo. */

/* ---------- Schriften (selbst gehostet, OFL) ---------- */
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(../fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --paper: #ffffff;
  --ledger: #f3f5f9;
  --rule: #dce0ea;
  --ink: #0e1220;
  --muted: #586074;

  --brand: #0a37a6;
  --brand-hover: #072b85;
  --brand-soft: #e8edfb;
  --on-brand: #ffffff;
  --on-brand-muted: #c9d4f5;

  --good: #11764a;
  --good-soft: #e3f3ea;
  --bad: #c2301f;
  --star: #ffcc00;

  --font-display: 'Archivo Variable', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Archivo Variable', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --stretch-plate: 68%;
  --r-card: 4px;
  --r-btn: 6px;

  --gutter-l: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
  --max: 1200px;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100000;
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--r-card);
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.eyebrow {
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--font-mono); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Fließtext (auch für Inhalte aus dem Block-Editor) ---------- */
.prose { display: grid; gap: 16px; max-width: 68ch; }
.prose > * { margin: 0; }
.prose h2 { font-stretch: 112%; font-weight: 680; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; margin-top: 12px; }
.prose h3 { font-weight: 650; font-size: 19px; line-height: 1.3; margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose li { margin: 0; }
.prose figure { margin: 0; }
.prose .wp-block-table { overflow-x: auto; }
.prose table {
  width: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.prose .wp-block-table thead { border: 0; }
.prose th,
.prose td { border: 0; border-bottom: 1px solid var(--rule); padding: 10px 12px; white-space: nowrap; }
.prose th {
  text-align: left;
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--ledger);
}
.prose .has-text-align-right { text-align: right; }

/* ---------- Kopf und Fuß der Seite ---------- */
.site-kopf { background: var(--brand); color: var(--on-brand); padding-top: env(safe-area-inset-top, 0px); }
.site-kopf-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.site-kopf nav ul { display: flex; gap: 20px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.site-kopf nav a { color: var(--on-brand); text-decoration: none; }
.site-kopf nav a:hover,
.site-kopf nav .current-menu-item > a { text-decoration: underline; }
.site-kopf a:focus-visible { outline-color: var(--on-brand); }

.site-fuss { background: var(--ledger); border-top: 1px solid var(--rule); margin-top: 72px; }
.site-fuss-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px 40px;
  padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--muted);
}
.site-fuss-marke { display: grid; gap: 14px; justify-items: start; }
.site-fuss-marke p { max-width: 60ch; }
.site-fuss nav ul { display: grid; gap: 8px; align-content: start; margin: 0; padding: 0; list-style: none; }
.site-fuss nav a { color: var(--ink); }
.site-fuss-copy { grid-column: 1 / -1; font-size: 13px; }
@media (max-width: 640px) { .site-fuss-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Markenzeichen im Kennzeichen-Stil ---------- */
.kennzeichen {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  height: 1.9em;
  font-family: var(--font-display);
  font-stretch: var(--stretch-plate);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
}
a.kennzeichen:focus-visible { outline: 2px solid var(--on-brand); outline-offset: 3px; }
.kennzeichen.sm { font-size: 17px; border-width: 1.5px; }
.kennzeichen.lg { font-size: clamp(30px, 6vw, 46px); }
.kennzeichen .eu {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  width: 1.15em;
  padding: 0.14em 0 0.12em;
  background: var(--brand);
  color: var(--on-brand);
}
.kennzeichen .eu svg { width: 0.72em; height: 0.72em; display: block; fill: var(--star); }
.kennzeichen .eu b { font-size: 0.5em; font-stretch: 100%; }
.kennzeichen .schild { display: flex; align-items: center; gap: 0.28em; padding: 0 0.42em 0 0.36em; }
.kennzeichen .plakette {
  display: grid;
  place-items: center;
  width: 0.92em;
  height: 0.92em;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.62em;
  font-stretch: 100%;
}
.kennzeichen .plakette span { transform: translateY(0.02em); }

/* ---------- Fotos ---------- */
.bild { margin: 0; display: grid; gap: 6px; min-width: 0; }
.bild img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-card);
  background: var(--ledger);
  object-fit: cover;
}
.bild.titel img { aspect-ratio: 16 / 9; }
.bild.breit img,
.bild.karte img { aspect-ratio: 3 / 2; }
.bild.inhalt img { aspect-ratio: 4 / 3; }
.bild figcaption { font: 400 11.5px/1.4 var(--font-mono); color: var(--muted); text-align: right; }
.bild figcaption a { color: var(--muted); }
.bild.auf-dunkel figcaption,
.bild.auf-dunkel figcaption a { color: var(--on-brand-muted); }
.bild.auf-dunkel figcaption a:focus-visible { outline-color: var(--on-brand); }

/* ---------- Karten mit Foto ---------- */
.karte { display: grid; gap: 8px; align-content: start; color: var(--ink); text-decoration: none; min-width: 0; }
.karte .bild { margin-bottom: 6px; }
.karte h2,
.karte h3 { font-stretch: 104%; font-weight: 680; font-size: 19px; line-height: 1.25; }
.karte p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.karte:hover h2,
.karte:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.karte:focus-visible { outline-offset: 6px; }

.raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
@media (max-width: 900px) { .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .raster { grid-template-columns: minmax(0, 1fr); } }

.block-inner { display: grid; gap: 24px; padding-block: 56px 0; }
.block-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.block-kopf h2 { font-stretch: 112%; font-weight: 700; font-size: clamp(22px, 3vw, 32px); }

/* ---------- Kopfbereich mit Rechner ---------- */
.hero { background: var(--brand); color: var(--on-brand); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  grid-template-areas: 'text rechner';
  gap: 40px;
  align-items: start;
  padding-block: 28px 48px;
}
.hero-inner.mit-bild {
  grid-template-areas: 'text rechner' 'bild rechner';
  grid-template-rows: auto 1fr;
  row-gap: 28px;
}
.hero-text { grid-area: text; container-type: inline-size; min-width: 0; display: grid; gap: 18px; align-content: start; padding-top: 8px; }
.hero-rechner { grid-area: rechner; min-width: 0; }
.hero-bild { grid-area: bild; min-width: 0; align-self: start; }
.brotkrumen ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; padding: 0; list-style: none; }
.brotkrumen li { display: flex; gap: 6px; align-items: baseline; }
.brotkrumen li + li::before { content: '/'; }
.brotkrumen li + li::before,
.brotkrumen a,
.brotkrumen span,
.eyebrow-hell {
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-brand-muted);
}
.brotkrumen a { text-decoration: none; }
.brotkrumen a:hover { color: var(--on-brand); text-decoration: underline; }
.brotkrumen a:focus-visible { outline-color: var(--on-brand); }
.hero h1 {
  display: grid;
  gap: 14px;
  font-stretch: 118%;
  font-weight: 720;
  font-size: clamp(32px, 10cqi, 62px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  hyphens: auto;
}
.hero-inner.mit-bild h1 { font-size: clamp(32px, 8cqi, 54px); }
.hero-text > p { font-size: 17px; max-width: 46ch; }
.hero-text > ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.hero-text > ul li { display: flex; gap: 10px; align-items: baseline; }
.hero-text > ul li::before { content: ''; flex: none; width: 10px; height: 2px; background: var(--on-brand); transform: translateY(-4px); }

/* Platzhalter, bis das Skript Rechner und Liste einsetzt */
.kfz-mount-rechner { min-height: 560px; }
.kfz-mount-rechner:has(> form) { min-height: 0; }
.kfz-mount-angebote { min-height: 320px; }
.kfz-mount-angebote:has(> div) { min-height: 0; }
.kfz-hinweis-js { display: block; padding: 16px; background: var(--paper); color: var(--ink); border-radius: var(--r-btn); }

.vergleich { background: var(--ledger); border-bottom: 1px solid var(--rule); }
.vergleich-inner { display: grid; gap: 12px; padding-block: 32px 40px; }
.stand { font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .hero-inner,
  .hero-inner.mit-bild {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'text' 'rechner' 'bild';
    grid-template-rows: auto;
    gap: 28px;
  }
}

/* ---------- Startseite ---------- */
.wissen-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 48px;
  align-items: start;
  padding-block: 56px 0;
}
.wissen-inner .bild { margin-top: 10px; }
@media (max-width: 900px) { .wissen-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.wissen-text { padding-block: 48px 0; }

/* ---------- Übersicht Autokredit ---------- */
.seitenkopf { background: var(--brand); color: var(--on-brand); }
.seitenkopf-inner { display: grid; gap: 14px; padding-block: 36px 44px; }
.seitenkopf h1 { font-stretch: 118%; font-weight: 720; font-size: clamp(30px, 5vw, 54px); line-height: 1.04; letter-spacing: -0.015em; max-width: 20ch; }
.seitenkopf-inner > p,
.seitenkopf-inner .prose { font-size: 18px; max-width: 56ch; color: var(--on-brand); }
.seitenkopf-inner .prose a { color: var(--on-brand); }
.uebersicht { display: grid; gap: 32px; padding-block: 44px 0; }

/* ---------- Ratgeber ---------- */
.ratgeber-liste { display: grid; gap: 36px; padding-block: 40px 0; }
.liste-kopf { display: grid; gap: 12px; max-width: 62ch; }
.liste-kopf h1 { font-stretch: 116%; font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; }
.liste-kopf p:last-child { font-size: 18px; }
.paginierung .nav-links { display: flex; gap: 12px; flex-wrap: wrap; }

.beitrag { display: grid; gap: 28px; padding-block: 36px 0; max-width: 1240px; }
.beitrag-kopf { display: grid; gap: 12px; max-width: 760px; }
.beitrag-kopf .zurueck { text-decoration: none; }
.beitrag-kopf .zurueck:hover { color: var(--ink); }
.beitrag-kopf h1 { font-stretch: 114%; font-weight: 700; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.05; letter-spacing: -0.01em; }
.beitrag-kopf .lead { font-size: 19px; line-height: 1.5; max-width: 62ch; }
.beitrag-kopf .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); }
.entwurf {
  font: 500 11.5px/1 var(--font-mono);
  padding: 5px 7px;
  border: 1px dashed var(--brand);
  border-radius: 3px;
  color: var(--brand);
  background: var(--brand-soft);
}
.beitrag-text { margin-top: 8px; }
.weiter-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 760px;
  padding: 20px 22px;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: var(--r-card);
}
.weiter-box .eyebrow { color: var(--on-brand-muted); }
.weiter-box .weiter-titel { font-family: var(--font-display); font-stretch: 110%; font-weight: 700; font-size: 22px; line-height: 1.2; margin-top: 4px; }
.weiter-box p:last-child { font-size: 15px; margin-top: 4px; }
.weiter-box .cta {
  display: inline-flex;
  padding: 13px 18px;
  font: 600 15px/1 var(--font-body);
  color: var(--brand);
  background: var(--paper);
  border-radius: var(--r-btn);
  text-decoration: none;
}
.weiter-box .cta:hover { background: var(--brand-soft); }
.weiter-box .cta:focus-visible { outline-color: var(--on-brand); }
.mehr { display: grid; gap: 20px; padding-top: 28px; border-top: 2px solid var(--ink); margin-top: 20px; }
.mehr h2 { font-stretch: 110%; font-weight: 700; font-size: 24px; }
.mehr .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
@media (max-width: 560px) { .mehr .raster { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Einfache Seiten, Methodik, Bildnachweis ---------- */
.seite { display: grid; gap: 20px; padding-block: 40px 0; }
.seite h1 { font-stretch: 116%; font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; }
.platzhalter { padding: 10px 12px; border: 1px dashed var(--brand); background: var(--brand-soft); border-radius: var(--r-card); font-size: 15px; }
.nachweis-liste { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); max-width: 860px; }
.nachweis-liste li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.nachweis-liste img { display: block; width: 120px; height: 80px; object-fit: cover; border-radius: var(--r-card); }
.nachweis-liste p { font-size: 15px; }
.nachweis-liste .motiv { font-weight: 600; }
.nachweis-liste .klein { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Einbettung per Shortcode [kfz_vergleich] in beliebigen Inhalten */
.kfz-shortcode { display: grid; gap: 24px; margin-block: 24px; }
.kfz-shortcode .kfz-shortcode-rechner { max-width: 440px; background: var(--brand); padding: 16px; border-radius: var(--r-btn); }
