/* DMV Permit Test Trainer — Bildsprache der US-Wegweiser. Grün nur als Tafel, Gelb nur zum Kaufen. */
@font-face {
  font-family: Overpass;
  src: url('fonts/overpass-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --gruen: #00613a;
  --gruen-tief: #004a2c;
  --gruen-hell: #e3efe8;
  --gelb: #ffc20e;
  --gelb-tief: #f0b000;
  --asphalt: #1f2328;
  --text: #1f2328;
  --text-2: #4a535b;
  --papier: #f3f5f4;
  --weiss: #ffffff;
  --linie: #d3dad6;
  --rot: #b3261e;
  --fokus: #1f2328;
  --rand: 14px;
  --breite: 1200px;
  --schrift: Overpass, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--weiss);
  font-feature-settings: 'kern', 'tnum' 0;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.1875rem; font-weight: 750; }
p { margin: 0; }
a { color: var(--gruen); text-underline-offset: 3px; }
a:hover { color: var(--gruen-tief); }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }

.sprung { position: absolute; left: 16px; top: -60px; background: var(--asphalt); color: #fff; padding: 12px 16px; border-radius: 8px; z-index: 50; }
.sprung:focus { top: 12px; color: #fff; }
.unsichtbar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Knöpfe -------------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: inherit; font-weight: 800; font-size: 1.0625rem; line-height: 1.2;
  border-radius: 10px; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.knopf-kaufen { background: var(--gelb); color: var(--asphalt); border-color: var(--asphalt); box-shadow: 0 3px 0 var(--asphalt); }
.knopf-kaufen:hover { background: var(--gelb-tief); color: var(--asphalt); }
.knopf-kaufen:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--asphalt); }
.knopf-gross { min-height: 56px; padding: 16px 28px; font-size: 1.1875rem; }
.knopf-klein { min-height: 44px; padding: 8px 16px; font-size: 1rem; box-shadow: 0 2px 0 var(--asphalt); }
.knopf-ruhig { background: var(--weiss); color: var(--asphalt); border-color: var(--asphalt); }
.knopf-ruhig:hover { background: var(--papier); color: var(--asphalt); }
@media (prefers-reduced-motion: reduce) { .knopf { transition: none; } .knopf-kaufen:active { transform: none; } }

/* --- Kopf ------------------------------------------------------------------ */
.kopf { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--linie); }
@supports (backdrop-filter: blur(8px)) { .kopf { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); } }
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.marke { display: inline-flex; align-items: center; gap: 12px; color: var(--asphalt); text-decoration: none; font-weight: 800; font-size: 1.0625rem; min-height: 44px; }
.marke:hover { color: var(--asphalt); }
.marke-zeichen { width: 34px; height: 34px; flex: none; }
.haupt { display: flex; gap: 4px; margin-left: auto; }
.haupt a { color: var(--text); text-decoration: none; font-weight: 600; padding: 12px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.haupt a:hover { background: var(--papier); color: var(--text); }
@media (max-width: 860px) { .haupt { display: none; } .kopf-innen > .knopf { margin-left: auto; } }
@media (max-width: 420px) { .marke-name { display: none; } .kopf-innen { padding: 8px 16px; } }

/* --- Hero: grüne Wegweisertafel mit weißem Innenrand -------------------------- */
.hero { background: var(--weiss); padding: 16px 16px 0; }
.hero-tafel {
  max-width: 1400px; margin: 0 auto; background: var(--gruen); color: #fff;
  border-radius: 22px; padding: 12px; position: relative;
}
.hero-tafel::before {
  content: ''; position: absolute; inset: 10px; border: 3px solid #fff; border-radius: 15px; pointer-events: none;
}
.hero-innen {
  max-width: var(--breite); margin: 0 auto; padding: clamp(36px, 6vw, 80px) clamp(24px, 4vw, 56px) clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: clamp(28px, 3vw, 40px); align-items: center;
}
.hero-kennung { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: 20px; }
.hero-kennung-zeichen { width: 30px; height: 30px; }
.hero h1 { font-size: clamp(2.375rem, 1.4rem + 3.6vw, 4rem); font-weight: 850; line-height: 1.02; letter-spacing: -0.025em; max-width: 14ch; }
.hero-unter { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.55; margin-top: 20px; max-width: 34em; color: #f1f7f3; }
.hero-form { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.hero-staat { display: flex; flex-direction: column; gap: 8px; flex: 1 1 220px; max-width: 300px; }
.hero-staat label { font-weight: 700; font-size: .9375rem; }
.hero-form .knopf-kaufen { border-color: var(--asphalt); }
.hero-preiszeile { margin-top: 16px; font-size: .9375rem; color: #e4efe8; }
.hero-bild { margin: 0 -24px 0 0; }
@media (min-width: 1100px) { .hero-bild { margin-right: -48px; } }
.hero-bild img { width: 100%; filter: drop-shadow(0 24px 40px rgba(0, 30, 15, .35)); }
.hinweis-band { max-width: 1400px; margin: 12px auto 0; text-align: center; font-size: .875rem; color: var(--text-2); padding: 0 16px; }
@media (max-width: 860px) {
  .hero-bild { margin: 0; }
  .hero { padding: 12px 12px 0; }
  .hero-innen { grid-template-columns: 1fr; padding-top: 32px; }
  .hero h1 { max-width: none; }
  .hero-staat { max-width: none; flex-basis: 100%; }
  .hero-form .knopf { flex: 1 1 100%; }
}

/* Auswahl */
.auswahl { position: relative; display: block; }
.auswahl select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 56px; padding: 12px 44px 12px 16px;
  font: inherit; font-size: 1.0625rem; color: var(--text); background: #fff; border: 2px solid var(--asphalt); border-radius: 10px; cursor: pointer;
}
.auswahl svg { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; pointer-events: none; color: var(--text); }

/* --- Abschnitte -------------------------------------------------------------- */
.abschnitt { padding: clamp(56px, 8vw, 104px) 24px; }
.spalte { max-width: 760px; margin: 0 auto; }
.breit { max-width: var(--breite); margin: 0 auto; }
.abschnitt-kopf { max-width: 640px; margin-bottom: 40px; }
.abschnitt-kopf p { margin-top: 16px; color: var(--text-2); font-size: 1.125rem; }
@media (max-width: 600px) { .abschnitt { padding-left: 16px; padding-right: 16px; } }

.probleme h2 { margin-bottom: 28px; }
.probleme-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.probleme-liste li { padding: 16px 0 16px 40px; border-top: 1px solid var(--linie); position: relative; font-size: 1.125rem; }
.probleme-liste li:last-child { border-bottom: 1px solid var(--linie); }
.probleme-liste li::before {
  content: ''; position: absolute; left: 4px; top: 21px; width: 18px; height: 18px; background: var(--gelb);
  border: 2px solid var(--asphalt); transform: rotate(45deg); border-radius: 3px;
}

/* Vorschau */
.vorschau { background: var(--papier); }
.vorschau-raster { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 28px; align-items: end; }
.vorschau-bild { margin: 0; }
.vorschau-frage, .vorschau-fortschritt { grid-column: span 8; }
.vorschau-ergebnis, .vorschau-karten { grid-column: span 4; }
.vorschau-frage { order: 1; } .vorschau-ergebnis { order: 2; } .vorschau-karten { order: 3; } .vorschau-fortschritt { order: 4; }
.vorschau-ergebnis img, .vorschau-karten img { max-width: min(300px, 100%); margin: 0 auto; }
.vorschau-bild figcaption { margin-top: 16px; font-weight: 650; text-align: center; color: var(--text); }
@media (max-width: 900px) {
  .vorschau-frage, .vorschau-fortschritt { grid-column: span 12; }
  .vorschau-ergebnis, .vorschau-karten { grid-column: span 6; }
  .vorschau-frage { order: 1; } .vorschau-fortschritt { order: 2; } .vorschau-ergebnis { order: 3; } .vorschau-karten { order: 4; }
}
@media (max-width: 560px) {
  .vorschau-raster { gap: 28px 12px; }
  .vorschau-bild figcaption { font-size: .9375rem; }
}

/* Inhalt: Kapitel als Ausfahrten einer Strecke */
.inhalt-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.inhalt-kopf { position: sticky; top: 104px; margin-bottom: 0; }
.inhalt-kopf .knopf { margin-top: 28px; }
.kapitel { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.kapitel-zeile { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--linie); }

.kapitel-nr {
  align-self: start; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--gruen); color: #fff; border-radius: 8px; outline: 2px solid #fff; outline-offset: -5px;
  font-weight: 850; font-size: 1.75rem; line-height: 1; padding: 12px 8px 12px;
}
.kapitel-nr span { font-size: .75rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 4px; }
.kapitel-zeile p { margin-top: 8px; color: var(--text-2); }
@media (max-width: 900px) {
  .inhalt-raster { grid-template-columns: 1fr; gap: 32px; }
  .inhalt-kopf { position: static; }
}
@media (max-width: 480px) {
  .kapitel-zeile { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .kapitel-nr { font-size: 1.375rem; }
  .kapitel-nr span { font-size: .6875rem; }
}

/* Funktionen */
.funktionen { background: var(--asphalt); color: #fff; }
.funktionen .abschnitt-kopf p { color: #c9d1cd; }
.funktionen-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 2px solid #fff; }
.funktionen-liste div { padding: 28px 28px 32px 0; border-bottom: 1px solid #4a535b; }
.funktionen-liste dt { font-weight: 800; font-size: 1.1875rem; }
.funktionen-liste dt::before { content: ''; display: block; width: 36px; height: 4px; background: var(--gelb); margin-bottom: 16px; }
.funktionen-liste dd { margin: 8px 0 0; color: #d3dad6; }
@media (max-width: 900px) { .funktionen-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .funktionen-liste { grid-template-columns: 1fr; } }

/* Zeichenband */
.zeichenband-innen { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.zeichenband-text p { margin-top: 16px; color: var(--text-2); font-size: 1.125rem; }
.zeichen-reihe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
.zeichen-reihe li { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-weight: 650; font-size: .9375rem; }
.zeichen-reihe svg { width: 96px; height: 96px; }
@media (max-width: 900px) { .zeichenband-innen { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .zeichen-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); } .zeichen-reihe svg { width: 80px; height: 80px; } }

/* Ablauf */
.ablauf { background: var(--papier); }
.ablauf h2 { margin-bottom: 36px; }
.ablauf-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ablauf-liste li { background: #fff; border: 2px solid var(--asphalt); border-radius: 14px; padding: 28px; }
.ablauf-nr {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--gelb); border: 2px solid var(--asphalt); font-weight: 850; font-size: 1.25rem; margin-bottom: 16px;
}
.ablauf-liste p { margin-top: 8px; color: var(--text-2); }
@media (max-width: 860px) { .ablauf-liste { grid-template-columns: 1fr; } }

/* Für wen */
.fuerwen-bild { margin: 0 0 48px; }
.fuerwen-bild img { border-radius: 18px; width: 100%; aspect-ratio: 1600 / 560; object-fit: cover; }
.fuerwen-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.fuerwen h2 { margin-bottom: 20px; }
.fuerwen h3 { font-size: 1.5rem; margin: 12px 0 20px; }
.liste-ja, .liste-nein { list-style: none; margin: 0; padding: 0; }
.liste-ja li, .liste-nein li { position: relative; padding: 8px 0 8px 36px; }
.liste-ja li::before { content: ''; position: absolute; left: 0; top: 9px; width: 22px; height: 22px; background: var(--gruen); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.5 4.5L17 5.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.5 4.5L17 5.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.liste-nein li { color: var(--text-2); }
.liste-nein li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 18px; height: 4px; background: var(--text-2); }
@media (max-width: 860px) { .fuerwen-raster { grid-template-columns: 1fr; gap: 24px; } .fuerwen-bild { margin-bottom: 32px; } .fuerwen-bild img { aspect-ratio: 4 / 3; object-position: 20% 50%; } }

/* Preis: zweite Tafel */
.preis { padding-top: 24px; }
.preis-tafel { max-width: 1100px; margin: 0 auto; background: var(--gruen); color: #fff; border-radius: 22px; padding: 12px; position: relative; }
.preis-tafel::before { content: ''; position: absolute; inset: 10px; border: 3px solid #fff; border-radius: 15px; pointer-events: none; }
.preis-innen { padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.preis h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); }
.preis-betrag { margin-top: 24px; display: flex; align-items: baseline; gap: 12px; }
.preis-betrag strong { font-size: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); font-weight: 850; line-height: 1; letter-spacing: -0.03em; }
.preis-betrag span { font-size: 1.125rem; font-weight: 700; }
.preis-unter { margin-top: 8px; color: #e4efe8; }
.preis-kopf .knopf { margin-top: 28px; }
.preis-liste { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(255,255,255,.7); }
.preis-liste li { padding: 12px 0 12px 36px; border-bottom: 1px solid rgba(255,255,255,.35); position: relative; font-weight: 600; }
.preis-liste li::before { content: ''; position: absolute; left: 0; top: 14px; width: 20px; height: 20px; background: var(--gelb); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.5 4.5L17 5.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.5 4.5L17 5.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 860px) { .preis-innen { grid-template-columns: 1fr; gap: 32px; } .preis { padding-left: 12px; padding-right: 12px; } .preis-kopf .knopf { width: 100%; } }

/* Fragen */
.fragen h2 { margin-bottom: 24px; }
.fragen-liste details { border-top: 1px solid var(--linie); }
.fragen-liste details:last-child { border-bottom: 1px solid var(--linie); }
.fragen-liste summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-weight: 750; font-size: 1.125rem; position: relative; min-height: 44px;
}
.fragen-liste summary::-webkit-details-marker { display: none; }
.fragen-liste summary::after {
  content: ''; position: absolute; right: 4px; top: 20px; width: 20px; height: 20px; background: var(--text); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s ease;
}
.fragen-liste details[open] summary::after { transform: rotate(180deg); }
.fragen-liste summary:hover { color: var(--gruen); }
.fragen-liste details p { padding: 0 0 24px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .fragen-liste summary::after { transition: none; } }

/* Abschluss */
.abschluss { background: var(--papier); text-align: center; }
.abschluss-innen p { margin: 16px auto 28px; color: var(--text-2); font-size: 1.125rem; max-width: 34em; }

/* Fuß */
.fuss { background: var(--asphalt); color: #d3dad6; padding: 48px 24px 120px; font-size: .9375rem; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; display: grid; gap: 24px; }
.fuss-marke { display: flex; gap: 16px; align-items: flex-start; }
.fuss-marke strong { color: #fff; }
.fuss-hinweis { max-width: 70ch; }
.fuss-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.fuss-nav a, .fuss-knopf { color: #fff; padding: 12px 8px; min-height: 44px; display: inline-flex; align-items: center; }
.fuss-nav a:first-child { padding-left: 0; }
.fuss-nav a:hover, .fuss-knopf:hover { color: var(--gelb); }
.fuss-knopf { background: none; border: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fuss :focus-visible { outline-color: var(--gelb); }
@media (min-width: 861px) { .fuss { padding-bottom: 48px; } }

/* Leiste am Handy */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: #fff; border-top: 2px solid var(--asphalt); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.leiste[hidden] { display: none; }
.leiste-preis strong { font-size: 1.375rem; font-weight: 850; }
.leiste-preis span { color: var(--text-2); font-size: .9375rem; }
@media (min-width: 861px) { .leiste { display: none !important; } }

/* Rechtstexte, 404 */
.recht { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.recht h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); font-weight: 850; }
.recht h2 { font-size: 1.375rem; margin: 36px 0 12px; }
.recht p, .recht ul { margin: 0 0 16px; }
.recht li { margin-bottom: 8px; }
.recht-stand { color: var(--text-2); margin-top: 8px !important; }
.meldungsseite { padding: 96px 24px; }
.meldungsseite-innen { max-width: 640px; margin: 0 auto; }
.meldungsseite h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); font-weight: 850; }
.meldungsseite p { margin-top: 16px; font-size: 1.125rem; }
@media (max-width: 600px) { .recht { padding: 40px 16px 64px; } .meldungsseite { padding: 64px 16px; } }

/* Einwilligungsbanner */
.banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 720px; margin: 0 auto;
  background: #fff; border: 2px solid var(--asphalt); border-radius: 14px; padding: 20px 20px; box-shadow: 0 12px 32px rgba(0,0,0,.18); font-size: .9375rem;
}
.banner[hidden] { display: none; }
.banner-knoepfe { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.banner-knoepfe .knopf { flex: 1 1 140px; }
@media (max-width: 600px) { .banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; font-size: .875rem; } .banner-knoepfe { margin-top: 12px; } .banner-knoepfe .knopf { flex: 1 1 0; min-height: 44px; } }

/* Fokus auf grünen Tafeln: Weiß statt Asphalt (Asphalt auf Grün nur 2,1:1). */
.hero-tafel :focus-visible, .preis-tafel :focus-visible { outline-color: #fff; }
