:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --text: #15181c;
  --muted: #5b6470;
  --border: #e0e3e8;
  --border-strong: #c7ccd4;
  --accent: #d9480f;
  --accent-hover: #bf3f0c;
  --accent-ink: #ffffff;
  --accent-soft: #fff0e8;
  --ok: #2b7a2f;
  --ok-soft: #e7f4e8;
  --warn: #875200;
  --warn-soft: #fff3d4;
  --info: #1d5bb8;
  --info-soft: #e7effc;
  --danger: #c22a2a;
  --danger-soft: #fdeaea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101215;
    --surface: #1a1d22;
    --surface-2: #23272d;
    --text: #e8ebee;
    --muted: #9aa3ad;
    --border: #2e333a;
    --border-strong: #434a53;
    --accent: #ff7a3d;
    --accent-hover: #ff8f5c;
    --accent-ink: #1a0d05;
    --accent-soft: #3a2014;
    --ok: #6fd27a;
    --ok-soft: #16301b;
    --warn: #ffc547;
    --warn-soft: #382c10;
    --info: #7aaaff;
    --info-soft: #172843;
    --danger: #ff8a8a;
    --danger-soft: #3b1a1a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[hidden] { display: none !important; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: .25rem 0 1rem; }
h2 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 .75rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf und Navigation */
.chrome { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px 6px; max-width: 960px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: .5px; flex: none; }
.who { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; max-width: 960px; margin: 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
/* Breite Bildschirme: alle Reiter sichtbar, notfalls in zwei Zeilen */
@media (min-width: 700px) { .tabs { flex-wrap: wrap; overflow-x: visible; } }
/* Handy: wischbar, der ausgeblendete Rand zeigt, dass es weitergeht */
@media (max-width: 699px) {
  .tabs.mehr-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .tabs.mehr-links.mehr-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
  .tabs.mehr-links:not(.mehr-rechts) { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
  .tab { padding: 8px 10px; }
}
.tab { flex: none; display: inline-flex; align-items: center; border: 0; background: transparent; padding: 8px 12px; border-radius: 999px; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; min-height: 40px; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.count { margin-left: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 20px; }
.main { max-width: 960px; margin: 0 auto; padding: 16px 16px 40px; }
.proto { text-align: center; font-size: 12px; color: var(--muted); padding: 0 16px 28px; }

/* Karten und Layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-ok { border-color: var(--ok); }
.card-warn { border-color: var(--warn); }
.card-danger { border-color: var(--danger); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 12px; }
.grid-hsn { grid-template-columns: 1fr 1fr; max-width: 380px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline select { flex: 1 1 220px; width: auto; }
.vehicle-card h1 { margin: 0 0 4px; font-size: 1.3rem; }
.vehicle-card p:last-child { margin: 0; }

/* Formulare */
.field { display: block; margin: 0 0 12px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; font-weight: 500; padding: 0; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.upper { text-transform: uppercase; }
.upper::placeholder { text-transform: none; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; margin-bottom: 12px; cursor: pointer; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; flex: 1 1 160px; min-height: 44px; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.error { color: var(--danger); font-size: 14px; margin: 4px 0 8px; }
.error:empty { display: none; }
.error-inline { color: var(--danger); }
.hint { font-size: 14px; color: var(--muted); margin: -4px 0 12px; }
.hint-top { margin: 10px 0 0; }
.hint:empty { display: none; }
.ok { color: var(--ok); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; font-size: 17px; min-height: 52px; margin-bottom: 12px; }

/* Ergebnis */
.label { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.sublabel { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.quote { font-size: 15px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; white-space: nowrap; }
.code-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-weight: 600; margin-bottom: 4px; }
.code-en { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.block { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.block-head .label { margin: 0; }
.bar-row { margin-bottom: 10px; }
.bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar > div { height: 100%; background: var(--accent); border-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-block; font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-btn { font: inherit; font-size: 14px; color: var(--text); cursor: pointer; min-height: 36px; padding: 6px 14px; }
.chip-btn:hover { border-color: var(--accent); }
.chip-aktiv { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.motor-auswahl:empty { display: none; }
.code-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.code-preview:empty { display: none; }
.code-neu { flex: 1 1 100%; display: block; font-size: 14px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.code-neu > span { display: block; color: var(--muted); margin-bottom: 6px; }
.code-neu > span b { color: var(--text); }
.checklist { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: schritt; }
.checklist li { counter-increment: schritt; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.checklist label span::before { content: counter(schritt) ". "; font-weight: 700; color: var(--muted); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.note { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.empty-inline { color: var(--muted); background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); font-size: 15px; margin-top: 12px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: 0; }

/* KI */
.ki-box { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.ki-card { border: 1px solid var(--info); background: var(--info-soft); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
.ki-card h2 { margin: 0; }
.ki-card .chip { background: var(--surface); }
.ki-card .banner { background: var(--surface); }
.steps { margin: 0 0 12px; padding-left: 22px; }
.steps li { padding: 3px 0; }
.btn:disabled { opacity: .6; cursor: progress; }

/* Status */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-open { background: var(--info-soft); color: var(--info); }
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: var(--accent-soft); color: var(--accent); }
.banner { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: 15px; }
.banner p { margin: 6px 0 0; }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-info { background: var(--info-soft); color: var(--info); }
.banner-danger { background: var(--danger-soft); color: var(--danger); }

/* Listen */
.list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card .list { border-radius: var(--radius-sm); }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer; min-height: 56px;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row-static { cursor: default; }
.row-static:hover { background: transparent; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main > * { overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.segmented { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 10px; margin-bottom: 12px; max-width: 100%; overflow-x: auto; }
.seg-btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 36px; }
.seg-btn.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 32px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.kv:last-child { border-bottom: 0; }

/* Übersicht */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); cursor: pointer; font: inherit; color: inherit; text-align: left; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--border-strong); }
.tile-n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.tile-l { font-size: 14px; color: var(--muted); }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.brand-lg { font-size: 1.3rem; margin-bottom: 12px; }
.brand-lg .logo { width: 40px; height: 40px; font-size: 15px; }
.login h2 { font-size: 14px; color: var(--muted); margin: 20px 0 8px; font-weight: 600; }
.login .hint { margin: 20px 0 0; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); font: inherit; color: inherit; cursor: pointer; min-height: 52px; text-align: left; }
.user-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--muted); flex: none; }

/* Hinweise */
#toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(520px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 10px; font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Rechtstexte */
.recht { max-width: 760px; line-height: 1.6; }
.recht h1 { margin-top: 1.5rem; }
.recht h2 { margin-top: 1.25rem; }
.recht ul { padding-left: 20px; }
.recht li { margin-bottom: 6px; }
.recht hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Online-Version */
a { color: var(--accent); }
.proto a { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
textarea.mono { font-size: 13px; }
.laden { min-height: 60vh; display: grid; place-items: center; }
.laden .logo { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }
.foto-knopf { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.filterzeile { display: flex; flex-wrap: wrap; gap: 8px; }
.login-card .page-head { margin-bottom: 4px; }
.login-card h1 { font-size: 1.2rem; }
.check span a { white-space: nowrap; }
.nutzer-row { align-items: flex-start; }
.nutzer-aktionen { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 55%; }
.nutzer-aktionen select { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; }
.ki-card ol.steps { margin-bottom: 8px; }

@media (max-width: 560px) {
  .nutzer-row { flex-direction: column; }
  .nutzer-aktionen { max-width: 100%; justify-content: flex-start; }
  .who > span { display: none; }
  h1 { font-size: 1.3rem; }
  .card { padding: 14px; }
}

/* Fall bearbeiten / Prüfung / Sollwerte */
.btn-danger-text { color: var(--danger); }
.verlauf-zeile { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.verlauf-zeile:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.sollwerte li { font-variant-numeric: tabular-nums; }
.banner .actions { margin-top: 8px; margin-bottom: 0; }
.banner p { margin: 0; }

/* Cookie-Hinweis (nur Information, kein Tracking) */
.cookie-hinweis { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 640px; margin: 0 auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.cookie-hinweis p { margin: 0; flex: 1 1 260px; font-size: 14px; line-height: 1.45; }
.cookie-hinweis a { color: var(--accent); }

/* Support-Tickets */
.nachrichten { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.nachricht { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-right: 32px; }
.nachricht p { margin: 0 0 4px; overflow-wrap: anywhere; }
.nachricht-support { background: var(--info-soft); border-color: transparent; margin-right: 0; margin-left: 32px; }
details.card summary { cursor: pointer; font-weight: 600; }
details.card[open] summary { margin-bottom: 8px; }

/* Assistent im Fall */
.assistent-eintrag { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.assistent-frage { margin: 0 0 6px; }
.assistent-antwort { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.assistent-antwort p { margin: 0 0 6px; overflow-wrap: anywhere; }
.assistent-antwort .actions { margin: 6px 0 0; }
.warn-text { color: var(--warn); }
details.rechner { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
details.rechner summary { cursor: pointer; font-weight: 600; }
details.rechner[open] summary { margin-bottom: 8px; }
.regel .row-main > span:first-child { white-space: normal; }
.row.regel { flex-direction: column; align-items: stretch; gap: 6px; }
.row.regel .row-main, .row.regel .row-main > span { white-space: normal; overflow: visible; text-overflow: clip; min-width: 0; }
.row.regel .row-side { justify-content: flex-start; flex-wrap: wrap; }

/* Beanstandungen (Symptome ohne Fehlercode) */
.code-beanstandung { background: var(--info-soft); color: var(--info); }
/* Hinweis auf eine neue App-Version (nur wenn gerade getippt wird, sonst lädt die App selbst neu) */
.update-hinweis { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--text); color: var(--surface); border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 4px 16px rgba(0,0,0,.2); max-width: 560px; margin: 0 auto; }
/* Fragenkatalog im Fall: ein Schritt pro Ansicht, große Antwort-Knöpfe */
.anleitung-reiter { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.anleitung-reiter::-webkit-scrollbar { display: none; }
.reiter { flex: 0 0 auto; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.reiter.aktiv { background: var(--text); color: var(--surface); border-color: var(--text); }
.katalog { padding-bottom: 14px; }
.katalog-schritt { font-size: 13px; color: var(--muted); margin: 14px 0 2px; text-transform: none; }
.katalog-frage { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 2px 0 6px; }
.katalog-info { color: var(--muted); margin: 0 0 12px; }
.katalog-antworten { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.katalog-antwort { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; min-height: 52px; padding: 12px 14px; font-size: 16px; white-space: normal; }
.katalog-typisch { font-size: 12px; color: var(--info); }
.btn-primary .katalog-typisch { color: inherit; }
.katalog-empfehlung { background: var(--ok-soft); border-radius: var(--radius-sm); padding: 4px 14px 12px; margin-top: 12px; }
.katalog-empfehlung .katalog-schritt { color: var(--ok); font-weight: 600; }
.katalog-fertig { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; margin-top: 12px; }
.katalog-weg { list-style: none; margin: 10px 0 0; padding: 0; border-left: 2px solid var(--border-strong); }
.katalog-weg li { display: flex; flex-direction: column; padding: 4px 0 6px 12px; font-size: 14px; }
.katalog-weg li span { color: var(--muted); }
.katalog-weg li b { font-weight: 600; }
.katalog-weg .weg-mehr { padding-top: 0; }
.katalog-statistik { font-size: 14px; background: var(--info-soft); border-radius: var(--radius-sm); padding: 8px 12px; margin: 8px 0 0; }
.katalog-fuss { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
details.mehr-infos > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
details.mehr-infos[open] > summary { margin-bottom: 10px; }
/* Katalog-Editor im Wissen */
.knoten { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.knoten-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.knoten-kopf b { font-size: 14px; }
.knoten-empfehlung { border-left: 4px solid var(--ok); }
.knoten-frage { border-left: 4px solid var(--info); }
.antwort-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 560px) { .antwort-zeile { grid-template-columns: minmax(0, 1fr) auto; } .antwort-zeile select { grid-column: 1 / -1; grid-row: 2; } }
/* Bewertung 1–5 Sterne (Reihenfolge umgedreht, damit „bis hier“ per CSS hervorgehoben werden kann) */
.sterne { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.sterne input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sterne label { font-size: 34px; line-height: 1; color: var(--border); cursor: pointer; padding: 2px; }
.sterne input:checked ~ label, .sterne label:hover, .sterne label:hover ~ label { color: #f2a900; }
.sterne input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.sterne-anzeige { color: #f2a900; letter-spacing: 1px; }
form:has(input[name="a-behoben"][value="nein"]:checked) #bewertung-karte { display: none; }
.code-kombi { background: var(--accent-soft); color: var(--accent); }
.chip-beanstandung { background: var(--info-soft); color: var(--info); border-color: transparent; }
#beanst-chips .chip-btn { font-size: 13px; }

/* Fall: Prüfschritte in Reihenfolge, fürs Handy gebaut (große Flächen zum Antippen, Fortschritt, nächster Schritt) */
.anleitung-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; margin: 10px 0 8px; }
.fortschritt { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.fortschritt span:first-child { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fortschritt-bar { height: 6px; margin: 4px 0 6px; }
.fortschritt-bar > div { background: var(--ok); transition: width .2s; }
.schritte { list-style: none; margin: 0 0 12px; padding: 0; }
.schritte li { border-radius: var(--radius-sm); margin: 0 -8px; }
.schritte li + li { border-top: 1px solid var(--border); }
.schritte label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 8px; min-height: 52px; cursor: pointer; }
.schritte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schritt-nr { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong);
  font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface); }
.schritt-text { flex: 1; font-size: 16px; line-height: 1.4; padding-top: 4px; }
.schritte li.naechster { background: var(--accent-soft); border-top-color: transparent; }
.schritte li.naechster + li { border-top-color: transparent; }
.schritte li.naechster .schritt-nr { border-color: var(--accent); color: var(--accent); }
.schritte li.erledigt .schritt-nr { background: var(--ok); border-color: var(--ok); color: transparent; position: relative; }
.schritte li.erledigt .schritt-nr::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; }
.schritte li.erledigt .schritt-text { color: var(--muted); text-decoration: line-through; }
.schritte input:focus-visible + .schritt-nr { outline: 2px solid var(--accent); outline-offset: 2px; }
.schritte input:disabled ~ * { cursor: default; }
.sollwert-box { background: var(--info-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.sollwert-box .sublabel { color: var(--info); font-weight: 600; }
.sollwert-box ul { margin: 0; }
details.statistik { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; margin: 8px 0 4px; }
details.statistik > summary { cursor: pointer; font-size: 15px; list-style-position: outside; }
details.statistik[open] > summary { margin-bottom: 8px; }
.statistik-titel { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
details.quellen { font-size: 14px; margin-top: 8px; }
details.quellen > summary { cursor: pointer; color: var(--muted); }
details.quellen a { color: var(--accent); word-break: break-word; }
.sprungleiste { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.sprungleiste::-webkit-scrollbar { display: none; }
.sprungleiste .chip-btn { flex: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; }
.aktionsleiste { display: flex; gap: 8px; margin: 12px 0; }
.aktionsleiste .btn { flex: 1 1 0; }
@media (max-width: 699px) {
  .aktionsleiste { position: sticky; bottom: 0; z-index: 5; margin: 12px -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0, 0, 0, .06); }
  .vehicle-card { padding: 12px 14px; }
  .vehicle-card h1 { font-size: 1.15rem; }
}
details.assistent-karte > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; }
details.assistent-karte > summary::-webkit-details-marker { display: none; }
details.assistent-karte > summary h2 { margin: 0; }
details.assistent-karte > summary h2::before { content: "▸ "; color: var(--muted); }
details.assistent-karte[open] > summary { margin-bottom: 12px; }
details.assistent-karte[open] > summary h2::before { content: "▾ "; }
/* Online-Recherche der KI */
.card-info { border-color: var(--info); }
.badge-info { background: var(--info-soft); color: var(--info); }
.code-recherche { background: var(--info-soft); color: var(--info); }
.recherche-laeuft { display: flex; align-items: center; gap: 10px; }
.fahrzeug-hinweise { background: var(--warn-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0 12px; }
.fahrzeug-hinweise .sublabel { color: var(--warn); font-weight: 600; }
.fahrzeug-hinweise ul { margin: 0; padding-left: 18px; }
.spinner { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
