/* ============================================================
   OFFTRACK CARE — Public pages layer
   Loaded after care.css on the public-facing pages
   (index, wissen, fahrcheck, schaden-melden, termine).
   Portal + admin keep using care.css alone.
   ============================================================ */

:root {
    --font-display: 'Archivo', 'Inter', -apple-system, sans-serif;
    --amber: #B45309;
    --amber-soft: #FEF3C7;
}

.public-page h1, .public-page h2, .public-page h3 {
    font-family: var(--font-display);
}

/* ── Public navbar: logo + links + auth action ─────────────── */

.pnav { height: 64px; }

.pnav .container {
    max-width: 1200px;
}

.pnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pnav-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-600);
    padding: 8px 12px;
    border-radius: var(--radius);
    white-space: nowrap;
}
.pnav-link:hover { color: var(--ink-950); background: var(--ink-100); }
.pnav-link.active { color: var(--ink-950); font-weight: 600; }

.pnav-burger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--ink-800);
}

@media (max-width: 880px) {
    .pnav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 10px 16px 16px;
        box-shadow: var(--shadow-md);
    }
    .pnav-links.open { display: flex; }
    .pnav-link { padding: 12px 12px; font-size: 15px; }
    .pnav-burger { display: inline-flex; }
}

/* ── Page header band ───────────────────────────────────── */

.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 52px 0 44px;
}

.page-head .overline { color: var(--accent-dark); margin-bottom: 10px; }

.page-head h1 {
    font-size: clamp(26px, 4vw, 34px);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.page-head p {
    font-size: 15px;
    color: var(--ink-500);
    max-width: 620px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .page-head { padding: 36px 0 30px; }
}

/* ── Landing hero ───────────────────────────────────────── */

.hero-photo {
    position: relative;
    background: var(--ink-950);
    color: #fff;
    padding: 116px 0 124px;
    background-size: cover;
    background-position: center 62%;
}
.hero-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(20, 17, 15, 0.88) 20%, rgba(20, 17, 15, 0.55) 65%, rgba(20, 17, 15, 0.35));
}
.hero-photo .container { position: relative; max-width: 1200px; }

.hero-photo .hero-overline { color: #E8A87C; }

.hero-photo h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 620px;
    margin-bottom: 20px;
}

.hero-photo p {
    font-size: 16.5px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    max-width: 540px;
    margin-bottom: 38px;
}

@media (max-width: 640px) {
    .hero-photo { padding: 72px 0 80px; }
}

/* ── Section scaffolding ────────────────────────────────── */

.section { padding: 76px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section .container, .wide-container { max-width: 1200px; }

.section-head { margin-bottom: 36px; max-width: 640px; }
.section-head .overline { color: var(--accent-dark); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin-bottom: 10px; }
.section-head p { font-size: 14.5px; color: var(--ink-500); line-height: 1.6; }

@media (max-width: 640px) { .section { padding: 52px 0; } }

/* ── Service cards (landing) ────────────────────────────── */

.svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.svc-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    color: inherit;
}
.svc-card:hover { border-color: var(--ink-400); box-shadow: var(--shadow-md); color: inherit; }

.svc-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--ink-950);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.svc-icon svg { width: 19px; height: 19px; }

.svc-card h3 { font-size: 16px; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-card p { font-size: 13.5px; color: var(--ink-500); line-height: 1.6; flex: 1; }

.svc-cta {
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
}
.svc-card:hover .svc-cta { text-decoration: underline; }

.badge-soon {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
    background: var(--amber-soft);
    padding: 3px 8px;
    border-radius: 100px;
}

@media (max-width: 960px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }

/* ── Fahrcheck band (landing) ───────────────────────────── */

.check-band {
    background: var(--ink-950);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.check-band h2 { color: #fff; font-size: 21px; letter-spacing: -0.015em; margin-bottom: 6px; }
.check-band p { color: rgba(255, 255, 255, 0.66); font-size: 14px; max-width: 520px; line-height: 1.6; }

.ampel {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 14px;
}
.ampel span { width: 10px; height: 10px; border-radius: 50%; }
.ampel .a-red { background: #EF4444; }
.ampel .a-yellow { background: #F59E0B; }
.ampel .a-green { background: #22C55E; }

@media (max-width: 640px) { .check-band { padding: 30px 24px; } }

/* ── Big footer ─────────────────────────────────────────── */

.footer-big {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 0 0;
}

.footer-big .container { max-width: 1200px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 44px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 14px;
}

.footer-col p { font-size: 13px; color: var(--ink-500); line-height: 1.65; max-width: 260px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--ink-600); padding: 4px 0; }
.footer-col a:hover { color: var(--accent-dark); }
.footer-col img { height: 22px; margin-bottom: 14px; display: block; }

.footer-base {
    border-top: 1px solid var(--border);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.footer-base p, .footer-base a { font-size: 12.5px; color: var(--ink-400); }
.footer-base a:hover { color: var(--ink-700); }
.footer-base-links { display: flex; gap: 18px; }

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ── Wissensbereich: controls (search + vehicle + tabs) ─── */

.kb-controls {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0 0;
    position: sticky;
    top: 64px;
    z-index: 30;
}

.kb-controls-row {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-search {
    flex: 1 1 240px;
    max-width: 400px;
    position: relative;
}
.filter-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    pointer-events: none;
}
.filter-search .form-input { padding: 9px 12px 9px 36px; font-size: 14px; }

.filter-vehicle {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-vehicle label { font-size: 12.5px; font-weight: 600; color: var(--ink-500); white-space: nowrap; }
.filter-vehicle .form-select { width: auto; font-size: 13.5px; padding: 8px 34px 8px 12px; }

.kb-tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.kb-tabs::-webkit-scrollbar { display: none; }

.kb-tab {
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-500);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 4px 2px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.13s ease;
}
.kb-tab:hover { color: var(--ink-950); }
.kb-tab.active { color: var(--ink-950); font-weight: 600; border-bottom-color: var(--accent); }
.kb-tabs.searching .kb-tab.active { color: var(--ink-500); font-weight: 500; border-bottom-color: transparent; }

@media (max-width: 880px) {
    .kb-controls { position: static; }
    .filter-search { max-width: none; flex-basis: 100%; }
}

/* ── Knowledge sections ─────────────────────────────────── */

.kb-results { padding-bottom: 72px; }

.k-section { padding: 32px 0 8px; }

.k-section-sub {
    font-size: 13.5px;
    color: var(--ink-500);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* Category label above each section while searching */
.k-section.search-hit::before {
    content: attr(data-search-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.k-empty {
    font-size: 13.5px;
    color: var(--ink-400);
    padding: 18px 0;
}

/* Hinweis über einem gefüllten Raster: das Modell hat noch kein Video.
   Ruhiger als eine Warnung, deutlicher als Kleingedrucktes. */
.k-note {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-600);
    background: var(--ink-50);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0 0 20px;
}

/* YouTube-style link cards (Guides & Videos) */
.yt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 18px;
    align-items: stretch;
}

/* Guides & Videos grouped by topic (Strom, Batterie, CZone, …) */
.kb-topic-group .yt-grid { margin-top: 0; }
.kb-topic-group .tile-section-title { margin: 26px 0 12px; }
.kb-topic-group:first-child .tile-section-title { margin-top: 14px; }
@media (max-width: 960px) { .yt-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .yt-grid { grid-template-columns: 1fr; } }

.yt-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.yt-card:hover { border-color: var(--ink-400); box-shadow: var(--shadow-md); color: inherit; }

.yt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--ink-900), var(--ink-700));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.yt-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Gebrochenes oder fehlendes Titelbild: dieselbe Titelkarte wie die
   Supabase-Poster (js/wissen.js legt .yt-thumb-card unter das <img>). */
.yt-thumb-card {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(#3F617A, #3F617A) top / 100% 6px no-repeat,
        #1C1917;
}
.yt-thumb.no-poster .yt-thumb-card { display: block; }
.yt-thumb-card-logo {
    position: absolute;
    top: calc(22% - 8px);
    left: 8%;
    height: 24px;
    width: auto;
    display: block;
}
.yt-thumb-card-title {
    position: absolute;
    top: 40%;
    left: 8%;
    right: 16%;
    color: #FAFAF9;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}
.yt-thumb-card-bar {
    position: absolute;
    top: 62%;
    left: 8%;
    width: 56px;
    height: 4px;
    background: #3F617A;
}
.yt-thumb-card-sub {
    position: absolute;
    top: calc(62% + 14px);
    left: 8%;
    color: var(--ink-400);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
}

.yt-play {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 30px;
    border-radius: 8px;
    background: rgba(28, 25, 23, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}
.yt-play svg { width: 14px; height: 14px; margin-left: 1px; }
.yt-card:hover .yt-play { background: var(--accent); transform: scale(1.06); }

.yt-thumb .video-run {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 1;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(28, 25, 23, 0.85);
    border-radius: 4px;
    padding: 2px 7px;
    font-variant-numeric: tabular-nums;
}

.yt-body { padding: 15px 18px 17px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.yt-body h3 { font-size: 14.5px; margin-bottom: 5px; overflow-wrap: break-word; }
/* Voller Text bleibt im DOM (Vorbehalt-Tests). Sichtbar sind zwei Zeilen. */
.yt-body p,
.yt-body .yt-teaser {
    font-size: 12.5px;
    color: var(--ink-500);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
    min-width: 0;
}
.yt-body .g-tags { margin-top: 12px; }

/* Karten, die den Player in dieser Seite öffnen, sind Knöpfe und keine Links.
   Ein <button> bringt seine eigene Schriftart und Ausrichtung mit — beides
   zurücksetzen, sonst sieht die Karte anders aus als ihre Nachbarn. */
button.yt-card {
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    padding: 0;
    width: 100%;
    cursor: pointer;
}
button.yt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Video-Player (Wissensbereich) ────────────────────────
   In der Seite, nicht in einem neuen Tab. Video und iframe stehen in einem
   Behälter mit fester Seitenverhältnis-Angabe statt fester Höhe: die Bühne
   folgt der Breite des Dialogs und wird auf dem Telefon nicht abgeschnitten. */
.vp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(28, 25, 23, 0.68);
    overscroll-behavior: contain;
}
/* Muss nach display:flex stehen, sonst zeigt der Dialog trotz [hidden]. */
.vp-backdrop[hidden] { display: none; }

/* Die Seite hinter dem Dialog scrollt nicht mit. */
body.vp-open { overflow: hidden; }

.vp-dialog {
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}
.vp-dialog:focus { outline: none; }

.vp-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px 12px;
}
.vp-title { font-size: 16.5px; line-height: 1.35; flex: 1; }

.vp-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vp-close svg { width: 16px; height: 16px; }
.vp-close:hover { border-color: var(--ink-400); color: var(--ink-950); }

.vp-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ink-950, #0C0A09);
}
.vp-stage video,
.vp-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Die Fehlerfläche ist Text und braucht kein 16:9. */
.vp-stage.is-fail { aspect-ratio: auto; background: var(--ink-100); }
.vp-fail {
    padding: 28px 22px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-600);
}
.vp-fail strong { color: var(--ink-900); }
.vp-fail p { margin-bottom: 8px; }
.vp-fail-ways {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}
.vp-fail-ways a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    background: var(--surface);
    border: 1px solid var(--ink-300);
    border-radius: var(--radius);
    padding: 7px 13px;
}
.vp-fail-ways a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

.vp-info { padding: 15px 22px 20px; }
.vp-text { font-size: 13px; color: var(--ink-600); line-height: 1.6; }
.vp-meta {
    font-size: 11.5px;
    color: var(--ink-400);
    margin-top: 9px;
    font-variant-numeric: tabular-nums;
}

/* Auf dem Telefon eine Vollbildfläche: der Dialog nutzt die ganze Breite und
   scrollt, wenn Bild, Titel und Beschreibung zusammen höher sind als der
   Bildschirm. */
@media (max-width: 640px) {
    /* Volle Breite, aber nicht auf volle Höhe gestreckt: sonst steht unter
       einer kurzen Beschreibung eine leere weisse Fläche. Reicht der Inhalt
       über den Bildschirm, greift max-height und der Dialog scrollt. */
    .vp-backdrop { padding: 0; }
    .vp-dialog {
        max-width: none;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .vp-head { padding: 14px 16px 10px; }
    .vp-title { font-size: 15px; }
    .vp-info { padding: 13px 16px 22px; }
    .vp-fail { padding: 22px 16px; }
}

/* Downloads */
.dl-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }

.dl-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.dl-group-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dl-group-head span { font-size: 11.5px; font-weight: 500; color: var(--ink-400); }

.dl-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
}
.dl-item:last-child { border-bottom: none; }

.dl-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: var(--ink-100);
    color: var(--ink-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-icon svg { width: 16px; height: 16px; }

.dl-info { flex: 1; min-width: 0; }
.dl-info strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-900); }
.dl-info span { font-size: 12px; color: var(--ink-400); }

.dl-btn {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-700);
    background: var(--surface);
    border: 1px solid var(--ink-300);
    border-radius: var(--radius);
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.12s ease;
}
.dl-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.dl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 800px) { .dl-groups { grid-template-columns: 1fr; } }

/* Guide + video cards */
.g-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 18px;
}
@media (max-width: 960px) { .g-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .g-grid { grid-template-columns: 1fr; } }

.g-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.g-media {
    position: relative;
    aspect-ratio: 16 / 8.5;
    background: var(--ink-100);
    color: var(--ink-400);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}
.g-media svg { width: 30px; height: 30px; }

.g-media .video-run {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(28, 25, 23, 0.85);
    border-radius: 4px;
    padding: 3px 8px;
    font-variant-numeric: tabular-nums;
}

.media-placeholder-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-500);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
}

.g-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.g-body h3 { font-size: 15px; margin-bottom: 6px; }
.g-body p { font-size: 13px; color: var(--ink-500); line-height: 1.55; flex: 1; }

.g-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.g-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-600);
    background: var(--ink-100);
    border-radius: 4px;
    padding: 3px 8px;
}
.g-tag.seasonal { color: var(--accent-dark); background: var(--accent-soft); }

/* Damage library */
.dmg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 800px) { .dmg-grid { grid-template-columns: 1fr; } }

.dmg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.dmg-head {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.dmg-head h3 { font-size: 14.5px; }
.dmg-count { font-size: 11.5px; color: var(--ink-400); white-space: nowrap; }

.dmg-item { padding: 15px 20px; border-bottom: 1px solid var(--border); }
.dmg-item:last-child { border-bottom: none; }

.dmg-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.dmg-item-title strong { font-size: 13.5px; color: var(--ink-900); }
.dmg-item p { font-size: 12.5px; color: var(--ink-500); line-height: 1.55; }

.dmg-badge {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 100px;
    padding: 3px 9px;
    white-space: nowrap;
}
.dmg-badge.user-error { color: var(--amber); background: var(--amber-soft); }
.dmg-badge.warranty { color: var(--success); background: var(--success-soft); }

/* Care cards */
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 800px) { .care-grid { grid-template-columns: 1fr; } }

.care-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
}
.care-card h3 { font-size: 15px; margin-bottom: 14px; }

.care-list { list-style: none; }
.care-list li {
    padding: 9px 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.55;
}
.care-list li strong { display: block; color: var(--ink-900); font-size: 13px; }
.care-list li span { color: var(--ink-500); }

/* FAQ accordion */
.faq-groups { margin-top: 18px; display: flex; flex-direction: column; gap: 26px; }

.faq-group h3 { font-size: 15px; margin-bottom: 12px; }

.acc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }

.acc-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
    background: none;
    border: none;
    padding: 16px 20px;
    cursor: pointer;
}
.acc-head:hover { color: var(--accent-dark); }
.acc-head svg { flex-shrink: 0; color: var(--ink-400); transition: transform 0.18s ease; }
.acc-item.open .acc-head svg { transform: rotate(180deg); }

.acc-body {
    display: none;
    padding: 0 20px 18px;
    font-size: 13.5px;
    color: var(--ink-600);
    line-height: 1.65;
}
.acc-item.open .acc-body { display: block; }

.acc-body p { margin-bottom: 10px; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body ul, .acc-body ol { margin: 6px 0 12px 20px; }
.acc-body li { margin-bottom: 4px; }
.acc-body .highlight {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 13px;
}
.acc-body a { color: var(--accent-dark); text-decoration: underline; }

/* ── Multi-step form (Schadensmeldung) ──────────────────── */

.form-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 88px; }

/* Desktop: use the width – wider card, roomier padding,
   urgency / next-step tiles side by side */
@media (min-width: 1000px) {
    .form-wrap { max-width: 980px; }
    .form-card { padding: 38px 44px 40px; }
    .form-card h2 { font-size: 20px; margin-bottom: 24px; }
    .tile-col.tile-col-wide {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .tile-col.tile-col-wide .tile { align-items: flex-start; }
    .steps-bar { max-width: 640px; margin-left: auto; margin-right: auto; margin-bottom: 34px; }
    .sb-label { font-size: 12.5px; }
}

.steps-bar {
    display: flex;
    margin-bottom: 28px;
}
.steps-bar .sb-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    text-align: center;
}
.steps-bar .sb-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: var(--ink-200);
}
.steps-bar .sb-step.done:not(:last-child)::after { background: var(--ink-950); }

.sb-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--surface);
    border: 2px solid var(--ink-300);
    color: var(--ink-400);
    z-index: 1;
}
.sb-step.done .sb-dot { background: var(--ink-950); border-color: var(--ink-950); color: #fff; }
.sb-step.active .sb-dot {
    border-color: var(--accent);
    color: var(--accent-dark);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.sb-label { font-size: 11.5px; font-weight: 500; color: var(--ink-400); }
.sb-step.active .sb-label { color: var(--ink-950); font-weight: 600; }
.sb-step.done .sb-label { color: var(--ink-600); }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px 32px;
}
@media (max-width: 560px) { .form-card { padding: 22px 18px; } }

.form-card h2 { font-size: 18px; margin-bottom: 20px; }

.tile-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin: 24px 0 10px;
}

.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } }

.tile {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--ink-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
    background: var(--surface);
}
.tile:hover { border-color: var(--ink-600); }
.tile:has(input:checked) { border-color: var(--ink-950); background: var(--ink-50); box-shadow: inset 0 0 0 1px var(--ink-950); }

.tile input {
    margin-top: 3px;
    accent-color: var(--ink-950);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.tile-label strong { display: block; font-size: 13.5px; color: var(--ink-900); }
.tile-label span { font-size: 12px; color: var(--ink-500); line-height: 1.45; }

.tile-col { display: flex; flex-direction: column; gap: 10px; }
.tile-col .tile { align-items: center; }

textarea.form-input { resize: vertical; min-height: 110px; line-height: 1.55; }

/* File upload */
.upload-zone {
    border: 1.5px dashed var(--ink-300);
    border-radius: var(--radius-lg);
    background: var(--ink-50);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.13s ease, background 0.13s ease;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone svg { width: 26px; height: 26px; color: var(--ink-400); margin-bottom: 10px; }
.upload-zone strong { display: block; font-size: 13.5px; color: var(--ink-800); }
.upload-zone span { font-size: 12px; color: var(--ink-400); }
.upload-zone input { display: none; }

.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--ink-700);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
}
.file-row button {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-400);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
}
.file-row button:hover { color: var(--danger); }

.form-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}
.form-nav .spacer { flex: 1; }

.summary-block {
    background: var(--ink-50);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 13px;
}
.summary-block dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-top: 10px;
}
.summary-block dt:first-child { margin-top: 0; }
.summary-block dd { color: var(--ink-800); margin: 2px 0 0; }

/* Success panel after submit */
.submit-success {
    text-align: center;
    padding: 46px 26px;
}
.submit-success .success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.submit-success h2 { margin-bottom: 8px; }
.submit-success p { font-size: 14px; color: var(--ink-500); max-width: 420px; margin: 0 auto 24px; line-height: 1.6; }

/* Auth gate on damage page */
.gate-wrap { max-width: 430px; margin: 0 auto; padding: 56px 24px 96px; }

/* ── Fahrcheck ──────────────────────────────────────────── */

.dc-wrap { max-width: 680px; margin: 0 auto; padding: 40px 24px 88px; }

.dc-notice {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-600);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 13px 16px;
    margin-bottom: 26px;
    line-height: 1.55;
}

.q-card {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px 32px;
}
.q-card.active { display: block; }
@media (max-width: 560px) { .q-card { padding: 22px 18px; } }

.q-num {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 10px;
}
.q-card h2 { font-size: 18px; margin-bottom: 6px; }
.q-help { font-size: 13.5px; color: var(--ink-500); line-height: 1.6; margin-bottom: 22px; }

.q-progress {
    display: flex;
    gap: 5px;
    margin-bottom: 18px;
}
.q-progress span { height: 5px; flex: 1; border-radius: 3px; background: var(--ink-200); }
.q-progress span.done { background: var(--ink-950); }

.dc-answers { display: flex; flex-direction: column; gap: 9px; }

.dc-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    text-align: left;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-800);
    background: var(--surface);
    border: 1px solid var(--ink-300);
    border-radius: var(--radius);
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.dc-btn:hover { border-color: var(--ink-950); background: var(--ink-50); }

.dc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dc-dot.red { background: #EF4444; }
.dc-dot.yellow { background: #F59E0B; }
.dc-dot.green { background: #22C55E; }

.dc-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 16px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.dc-back:hover { color: var(--ink-950); }

/* Result */
#dcResult { scroll-margin-top: 84px; }

.dc-result-banner {
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
}
.dc-result-banner h2 { font-size: 19px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.dc-result-banner p { font-size: 14px; line-height: 1.6; }
.dc-result-banner .dc-light { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

.dc-result-banner.red { background: var(--danger-soft); border: 1px solid #FECACA; }
.dc-result-banner.red h2, .dc-result-banner.red p { color: #991B1B; }
.dc-result-banner.red .dc-light { background: #EF4444; }

.dc-result-banner.yellow { background: var(--amber-soft); border: 1px solid #FDE68A; }
.dc-result-banner.yellow h2, .dc-result-banner.yellow p { color: #92400E; }
.dc-result-banner.yellow .dc-light { background: #F59E0B; }

.dc-result-banner.green { background: var(--success-soft); border: 1px solid #BBF7D0; }
.dc-result-banner.green h2, .dc-result-banner.green p { color: #065F46; }
.dc-result-banner.green .dc-light { background: #22C55E; }

.dc-next {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px 28px;
}
.dc-next h3 { font-size: 15px; margin-bottom: 12px; }
.dc-next ul { margin: 0 0 18px 20px; font-size: 13.5px; color: var(--ink-700); line-height: 1.85; }
.dc-next .btn { margin-right: 8px; margin-bottom: 8px; }
.dc-hint { font-size: 13.5px; color: var(--ink-600); margin: 0 0 16px; }

.dc-restart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent-dark);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.dc-restart:hover { text-decoration: underline; }

/* ── Termine (placeholder) ──────────────────────────────── */

.appt-single {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 18px;
    align-items: stretch;
    max-width: 980px;
    margin: 0 auto;
}
@media (max-width: 760px) { .appt-single { grid-template-columns: 1fr; } }

.soon-cal {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--ink-100);
    color: var(--ink-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.appt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 30px;
}
.appt-card h2 { font-size: 17px; margin: 14px 0 8px; }
.appt-card > p { font-size: 13.5px; color: var(--ink-500); line-height: 1.6; margin-bottom: 16px; }

.appt-features { list-style: none; margin-bottom: 4px; }
.appt-features li {
    display: flex;
    gap: 9px;
    align-items: baseline;
    font-size: 13.5px;
    color: var(--ink-700);
    padding: 5px 0;
}
.appt-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.soon-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}
.soon-panel h3 { font-size: 15.5px; margin-bottom: 6px; }
.soon-panel p { font-size: 13.5px; color: var(--ink-500); max-width: 480px; margin: 0 auto; line-height: 1.6; }

/* ── Small helpers ──────────────────────────────────────── */

.error-banner {
    background: var(--danger-soft);
    border: 1px solid #FECACA;
    color: #991B1B;
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.cta-band {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 64px 0;
    text-align: center;
}
.cta-band h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.cta-band p { font-size: 14.5px; color: var(--ink-500); margin-bottom: 26px; }
.cta-band .btn { margin: 0 5px 8px; }

/* ── Legal pages (Impressum / Datenschutz / Nutzungsbedingungen) ── */

.legal-wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px 88px; }

.legal-draft {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--amber-soft);
    border: 1px solid #FDE68A;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 34px;
    font-size: 13px;
    color: #92400E;
    line-height: 1.6;
}
.legal-draft strong { display: block; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 3px; }
.legal-draft svg { flex-shrink: 0; margin-top: 2px; }

.legal-body h2 {
    font-size: 18px;
    letter-spacing: -0.01em;
    margin: 34px 0 10px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 14.5px; margin: 20px 0 6px; }
.legal-body p {
    font-size: 14px;
    color: var(--ink-700);
    line-height: 1.7;
    margin-bottom: 12px;
}
.legal-body ul { margin: 0 0 14px 20px; }
.legal-body li { font-size: 14px; color: var(--ink-700); line-height: 1.7; margin-bottom: 5px; }
.legal-body a { color: var(--accent-dark); text-decoration: underline; }
.legal-body .addr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--ink-800);
    line-height: 1.75;
}
.legal-check {
    background: var(--ink-50);
    border: 1px dashed var(--ink-300);
    border-radius: var(--radius);
    padding: 2px 7px;
    font-size: 12.5px;
    color: var(--ink-600);
    white-space: nowrap;
}
.legal-meta {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--ink-400);
}
