/* Mobile styles for car report pages
 *
 * IMPORTANT: This file MUST be linked AFTER the inline <style> block
 * so that these rules naturally override inline base styles by source order.
 * No !important needed — source order wins.
 *
 * Padding constant: 16px (used for card padding, text inset, summary-box offset).
 *
 * Text color hierarchy (4 tiers):
 *   PRIMARY   #1a1a1a — headings, key numbers, risk names, pros/cons, summary titles
 *   SECONDARY #374151 — body text, descriptions, labels, values, card headers
 *   TERTIARY  #6B7280 — supporting text, ranges, years, compare descs
 *   MUTED     #9CA3AF — hints, disclaimers, copyright, toggles, separators
 */
@media (max-width: 600px) {

    /* ── 1. PAGE LAYOUT ── */
    /* Body: no horizontal padding. Cards fill full width. */
    body {
        padding-left: 0;
        padding-right: 0;
        color: #1a1a1a;
    }

    /* Non-card text elements: 16px horizontal inset */
    .header-row,
    h1,
    .last-updated,
    .disclaimer,
    .bottom-actions,
    .trust-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 1.2rem;
        color: #1a1a1a;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .summary-line {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    /* ── 2. CARD SYSTEM ── */
    /* All card-like elements: full-width, white, flat, 16px padding */
    .card {
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
        margin-bottom: 16px;
    }

    .mobile-compare {
        border-radius: 0;
        box-shadow: none;
        background: #fff;
        padding: 16px;
    }
    .mobile-compare h3 {
        text-transform: none;
        font-size: 0.85rem;
        font-weight: 500;
        color: #6B7280;
        letter-spacing: 0.3px;
        text-align: center;
        margin-bottom: 14px;
        font-style: normal;
    }
    .mobile-compare-list a:hover,
    .mobile-compare-list a:active {
        background: #f0f4ff;
    }
    .mobile-compare-list a > span:first-child {
        display: block;
        min-height: 44px;
    }
    .mobile-compare-list .compare-model {
        color: #374151;
    }
    .mobile-compare-list .compare-years {
        white-space: nowrap;
        color: #6B7280;
    }
    .mobile-compare-list .compare-desc {
        font-size: 0.85rem;
        color: #6B7280;
    }

    /* Hide bottom action buttons on mobile */
    .bottom-actions {
        display: none;
    }

    /* Summary-box: bleeds to card edges.
     * Card padding = 16px, so offsets = -16px.
     * Bottom padding = 16px to fill card's bottom padding exactly. */
    .summary-box {
        margin: 16px -16px -16px;
        padding: 14px 16px 16px;
        border-radius: 0;
        border: none;
        border-top: 2px solid #e5e7eb;
    }
    .summary-box.caution,
    .summary-box.warning {
        background: #f9fafb;
        border-top-color: #e5e7eb;
    }
    .summary-box.neutral {
        border-top-color: #e5e7eb;
    }
    .summary-title {
        font-size: 0.9rem;
        color: #1a1a1a;
    }
    .summary-text {
        font-size: 0.85rem;
        color: #374151;
    }

    /* ── 3. CONTENT-TOP (cost card + editorial) ── */
    /* Flex column, 16px gap, cost card first via order */
    .content-top {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }
    .content-top .card {
        order: -1;
        margin-bottom: 0;
    }
    .content-top .editorial-overview {
        margin: 0;
    }

    /* ── 4. EDITORIAL OVERVIEW ── */
    /* Looks like a card: white, 16px padding, no blue border */
    .editorial-overview {
        display: flex;
        flex-direction: column;
        background: #fff;
        padding: 16px;
        border-left: none;
        border-radius: 0;
        box-shadow: none;
    }

    /* Reorder: pros/cons first, buy/avoid second, text third */
    .editorial-overview .overview-highlights {
        order: 1;
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
        gap: 0;
        border-top: none;
        border-bottom: none;
        padding: 0;
        margin: 0;
    }
    .editorial-overview .pros-col,
    .editorial-overview .cons-col {
        display: contents;
    }
    .editorial-overview .highlight-item {
        display: flex;
        width: 100%;
        font-size: 0.9rem;
        font-weight: 500;
        padding: 5px 0;
        margin: 4px 0;
        background: none;
        border-left: none;
        border-radius: 0;
        color: #1a1a1a;
    }

    .editorial-overview .overview-bottom {
        order: 2;
        margin: 12px 0 0;
        padding: 12px 0 0;
        border-top: 1px solid #e5e7eb;
        border-bottom: none;
        font-size: 0.9rem;
        color: #374151;
    }
    .editorial-overview .buy-if {
        background: none;
        padding: 0;
        border-radius: 0;
        margin-bottom: 10px;
        color: #374151;
    }
    .editorial-overview .buy-if strong { color: inherit; }
    .editorial-overview .avoid-if {
        background: none;
        padding: 0;
        border-radius: 0;
        color: #374151;
    }
    .editorial-overview .avoid-if strong { color: inherit; }

    .editorial-overview .overview-text {
        order: 3;
        margin: 14px 0 0;
        padding: 14px 0 0;
        border-top: 1px solid #e5e7eb;
        font-size: 0.9rem;
        line-height: 1.6;
        color: #374151;
    }

    /* ── 5. COST SECTION ── */
    .big-number {
        font-size: 1.7rem;
        white-space: nowrap;
        color: #1a1a1a;
    }

    .big-number-unit {
        font-size: 0.85rem;
        color: #6B7280;
    }

    .cost-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .cost-header h2 {
        text-align: left;
    }

    .km-control {
        margin-left: 0;
        width: 100%;
        flex-direction: row-reverse;
        justify-content: flex-end;
        gap: 12px;
        background: none;
        padding: 0;
        margin-top: 8px;
    }

    .km-slider {
        flex: 1;
        min-width: 150px;
        height: 6px;
    }
    .km-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        background: #9CA3AF;
        border: none;
        box-shadow: none;
    }
    .km-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: #9CA3AF;
        border: none;
        box-shadow: none;
    }

    .km-label {
        color: #6B7280;
    }

    .compare-links {
        display: none;
    }

    .cost-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .cost-label {
        width: auto;
        font-size: 0.85rem;
        text-align: left;
        color: #374151;
    }

    .cost-bar-container {
        width: 100%;
        height: 24px;
        flex: none;  /* Override flex: 1 which collapses height in column direction on Android Chrome */
    }

    .cost-value {
        color: #374151;
    }

    /* ── 6. BAR COLORS ── */
    /* Cost bars: muted, professional */
    .bar-fixed { background: #5B8DB8; }
    .bar-risk { background: #C47070; }
    /* Risk bars: solid colors, no gradients */
    .risk-low { background: #4CAF7D; }
    .risk-medium { background: #D4A843; }
    .risk-high { background: #C48A4A; }
    .risk-critical { background: #C45454; }

    /* ── 7. RISK SECTION ── */
    .risk-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .risk-name {
        font-size: 0.9rem;
        color: #1a1a1a;
    }

    .risk-cost {
        font-size: 0.85rem;
        color: #6B7280;
    }

    /* For .risk-detail based reports (test report / future) */
    .risk-item .risk-detail .risk-summary { color: #374151; }
    .risk-item .risk-detail .risk-note { color: #374151; }

    /* For <details> based reports (current template) */
    .risk-item details summary { color: #374151; }
    .risk-item details .risk-note { color: #374151; }

    /* ── 8. TEXT HIERARCHY ── */

    /* — Card titles: sentence case, heavier — */
    .card-title {
        text-transform: none;
        font-size: 0.95rem;
        font-weight: 600;
        color: #374151;
        letter-spacing: 0;
    }

    /* — Compare section — */
    .compare-row {
        flex-direction: column;
        gap: 4px;
        padding: 10px 0;
    }
    .compare-label {
        font-size: 0.85rem;
        color: #374151;
        font-weight: 500;
    }
    .compare-value {
        font-size: 0.85rem;
        color: #6B7280;
        font-weight: 400;
    }

    /* — Breadcrumbs — */
    .breadcrumb { color: #6B7280; }

    /* — Last updated / trust — */
    .last-updated { color: #6B7280; }
    .last-updated .mobile-years { color: #6B7280; }
    .last-updated .mobile-years::after { color: #9CA3AF; }
    .trust-mobile-only { color: #6B7280; }

    /* — Language switch — */
    .lang-switch a:not(.active) { color: #9CA3AF; }

    /* — MUTED #9CA3AF — */
    .hint { color: #9CA3AF; }
    .hint-more { color: #9CA3AF; }
    .hint-less { color: #9CA3AF; }
    .disclaimer { color: #9CA3AF; }
    .trust-footer { color: #9CA3AF; }

    /* ── 9. TYPOGRAPHY + CHECKLIST ── */
    .simple-list li {
        font-size: 0.85rem;
        padding: 8px 0;
        list-style: none;
        padding-left: 24px;
        position: relative;
        color: #374151;
    }
    .simple-list li strong {
        color: #374151;
    }
    .simple-list li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 13px;
        width: 14px;
        height: 14px;
        border: 1.5px solid #d1d5db;
        border-radius: 3px;
        box-sizing: border-box;
    }

    /* Checklist section headers: chevron indicator */
    .checklist-section .checklist-header::after {
        content: '\203A';
        display: inline-block;
        margin-left: 6px;
        font-size: 0.9rem;
        color: #9CA3AF;
        transition: transform 0.2s;
        transform: rotate(0deg);
    }
    .checklist-section.open .checklist-header::after {
        transform: rotate(90deg);
    }

    .checklist-extras .checklist-extras-summary { color: #9CA3AF; }

    /* ── 10. ACTION BUTTONS ── */
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
 * REDESIGN BLOCK — ported from reports/_proto_mobile_xa7k9m2nq8wmh.html
 * Locked 2026-05-02 per MOBILE_REDESIGN_LOCKED.md
 *
 * Adds: .report-header, .hero-image, .site-nav, .breadcrumb-inline,
 *       .compare-image, redesigned cost rows, hairline cards.
 * ============================================================ */

/* PDF download CTA recolored to differentiate from upcoming carVertical banner
 * (carVertical keeps light-blue, PDF goes white + green-accent border).
 * Uses existing palette only (#4CAF7D from risk-low + #e5e7eb neutral border).
 * Override of inline .checklist-download — source order: inline < external. */
.checklist-download {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4CAF7D;
}
.checklist-download:hover {
    background: #fafafa;
    border-color: #d4d4d8;
    border-left-color: #4CAF7D;
}

/* Baseline rules (no media query) — ensure SVG sizing applies at every breakpoint */
.site-logo-mark { width: 19px; height: 19px; flex-shrink: 0; }
.site-logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: #0a0a0a; flex-shrink: 0; }
.site-logo-text { font-weight: 600; font-size: 0.94rem; letter-spacing: -0.018em; color: #0a0a0a; }
.search-box-icon { width: 16px; height: 16px; flex-shrink: 0; }
.search-icon svg { width: 18px; height: 18px; }
.hero-image img { display: block; max-width: 100%; height: auto; }

/* ============================================================
 * Read-more (mobile-only) for the .overview-text Background paragraph.
 * Mirrors the risk-item .hint-more/.hint-less inline pattern: the "· more"
 * span sits at the end of the truncated last line via absolute positioning
 * with a fade-out gradient over the cut text. ".open" toggles full text. */
.overview-text .hint { display: none; }
@media (max-width: 600px) {
    /* :has(.hint-more) gates line-clamp ONLY to reports built with the new
     * template (the F30 EN experiment). Reports rendered before the template
     * change don't have a hint-more child, so :has() doesn't match and the
     * paragraph stays full-text — no orphan truncation. */
    .overview-text:has(.hint-more):not(.open) {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        position: relative;
    }
    /* Whole paragraph clickable on mobile (matches risk-item pattern: wide
     * click target avoids the sharp small-target tap flash). Cursor reflects
     * that in both states (collapsed expands; expanded collapses). */
    .overview-text:has(.hint-more) { cursor: pointer; }
    .overview-text:has(.hint-more):not(.open) .hint-more {
        display: inline;
        position: absolute;
        right: 12px;
        bottom: 0;
        padding-left: 1.5em;
        background: linear-gradient(to right, rgba(255,255,255,0) 0, #fff 1.2em);
        color: #9ca3af;
        font-size: 0.85rem;
        cursor: pointer;
    }
    .overview-text.open .hint-less {
        display: inline;
        margin-left: 4px;
        color: #9ca3af;
        font-size: 0.85rem;
        cursor: pointer;
    }
}

/* ============================================================
 * carVertical CTA position switch
 * Mobile: above Common Problems (.cv-block-mobile shows)
 * Desktop: below Common Problems (.cv-block-desktop shows)
 * Mobile users hit avg 52.9% scroll-depth, cv-cta below sat at 52% so
 * only ~half ever saw it. Above-Common-Problems on mobile pulls it
 * higher in the funnel without breaking desktop's intent-peak placement. */
.cv-block-mobile { display: none; }
@media (max-width: 600px) {
    .cv-block-mobile {
        display: block;
        /* Padding-top (not margin-top) to avoid margin collapsing with the
         * previous .card's margin-bottom: 16px — both 16px would collapse to
         * 16px, no visible change. Padding doesn't collapse, so this adds
         * a real 16px on top of the existing 16px gap, balancing the ~36px
         * gap below the card (disclosure padding + next .card internal
         * padding). */
        padding-top: 16px;
    }
    .cv-block-desktop { display: none; }
    /* No hairlines around the mobile cv-cta block — the bordered card with
     * its blue accent is visually self-sufficient. Remove the natural
     * border-top from Common Problems specifically when it follows the
     * cv-cta wrapper, so the seam below the cv-cta is also clean. */
    .cv-block-mobile + .card { border-top: none; }
}

/* ============================================================
 * carVertical CTA (between Common Problems + Pre-Purchase Checklist)
 * Variant B locked. Light-blue card visually paired with .checklist-download
 * but distinct (light blue vs white+green-accent).
 * ============================================================ */
.cv-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f0f4ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin: 0 0 6px 0;
}
.cv-cta:hover {
    background: #e8effe;
    border-color: #bfdbfe;
}
.cv-cta-card {
    padding: 16px;
    align-items: flex-start;
}
.cv-cta-logo {
    flex-shrink: 0;
    width: 92px;
    align-self: center;
}
.cv-cta-logo img {
    width: 100%;
    height: auto;
    display: block;
}
.cv-cta-body { flex: 1; min-width: 0; }
.cv-cta-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}
.cv-cta-card .cv-cta-title { font-size: 0.95rem; }
.cv-cta-sub {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.45;
}
.cv-cta-card .cv-cta-sub { margin-top: 5px; }
.cv-cta-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    align-self: center;
}
.cv-affiliate-disclosure {
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    margin: 0 0 16px 0;
    line-height: 1.4;
}
@media (max-width: 600px) {
    /* Mobile: bordered card with carVertical-blue left accent + visible
     * arrow, mirroring the .checklist-download PDF row's "click-me" grammar
     * (it uses 4px green accent). Stands out from editorial body without
     * screaming "ad." 16px horizontal margin so box has a gap from screen
     * edges (body has no padding on mobile). */
    .cv-cta {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-left: 4px solid #0073F0;
        border-radius: 8px;
        padding: 14px 14px 14px 12px;
        /* No top margin: cv-cta belongs to the Common Problems section above
         * (per the section-grouping decision). Desktop already does this via
         * its own margin: 0 0 6px 0; this mirrors that intent on mobile. */
        margin: 0 16px 16px;
    }
    .cv-cta:hover {
        background: #fafafa;
        border-color: #d4d4d8;
        border-left-color: #0073F0;
    }
    .cv-cta-card .cv-cta-logo { width: 76px; }
    /* Arrow visible on mobile to signal external link */
    .cv-cta-card .cv-cta-arrow { display: block; }
    /* Disclosure: small caption below the bordered box, no border */
    .cv-affiliate-disclosure {
        padding: 0 16px 20px;
        margin: 0;
    }
}

/* ============================================================
 * Search dropdown + fullscreen overlay
 * Extracted from report templates' inline <style> 2026-05-04
 * so brand hubs can share via /report.css. Reports still have
 * a copy inline; identical, harmless duplicate.
 * ============================================================ */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    margin-top: 4px;
}
.search-results.active { display: block; }
.search-result-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}
.search-result-years {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.selected { background: #f0f4ff; }
.search-result-item strong { color: #2563eb; }

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: white;
    flex-direction: column;
}
.search-overlay.active {
    display: flex;
}
.search-overlay-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.search-overlay-header input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: #f9fafb;
    outline: none;
}
.search-overlay-header input:focus {
    border-color: #71717a;
    background: white;
}
.search-overlay-cancel {
    background: none;
    border: none;
    color: #18181b;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    white-space: nowrap;
}
.search-overlay-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.search-overlay-results .search-result-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    -webkit-tap-highlight-color: transparent;
}
.search-overlay-results .search-result-item:hover {
    background: none;
}
.search-overlay-results .search-result-name {
    font-size: 0.95rem;
    color: #333;
}
.search-overlay-results .search-result-name strong {
    color: #18181b;
    background: #f4f4f5;
    padding: 0 2px;
    border-radius: 2px;
}
.search-overlay-results .search-result-years {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

        /* AI hero image — preview-only, two-column magazine header */
        .report-header {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 28px;
            align-items: center;
            margin: 8px 0 20px 0;
        }
        .report-header-text h1 {
            margin-bottom: 6px;
        }
        /* V2: frameless editorial photo, 16:9 crop — no card chrome */
        .hero-image {
            overflow: visible;
            margin: 0;
        }
        .hero-image img {
            width: 100%;
            display: block;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            object-position: center 50%;
            border-radius: 4px;
        }
        /* Subtle photo-credit style — below image, not overlay */
        .hero-image figcaption {
            margin-top: 4px;
            font-size: 0.68rem;
            color: #aaa;
            font-style: italic;
            text-align: right;
            letter-spacing: 0.01em;
        }
        @media (max-width: 720px) {
            .report-header {
                grid-template-columns: 1fr;
                gap: 14px;
                margin: 8px 0 0 0;  /* zero bottom — close gap to first card */
            }
            /* Hero image on mobile: square corners, tight gap to next card, subtle caption */
            .hero-image {
                margin: 8px 0 0 0;
                position: relative;
            }
            .hero-image img {
                border-radius: 0;
            }
            .hero-image figcaption {
                position: absolute;
                bottom: 6px;
                right: 8px;
                margin-top: 0;
                font-size: 0.6rem;
                color: rgba(255, 255, 255, 0.75);
                background: none;
                padding: 0;
                text-shadow: 0 0 4px rgba(0, 0, 0, 0.55);
                font-style: italic;
                letter-spacing: 0.02em;
                text-align: right;
            }
            /* Editorial card sits flush below image on mobile */
            .content-top {
                margin-top: 0;
                gap: 4px;  /* reduce from mobile.css's 16px — tighter Risk-buffer-to-pros gap */
            }

            /* Option B — borderless sections with a single hairline divider between */
            .editorial-overview {
                border: none;
                border-radius: 0;
                margin: 0;
                padding-top: 8px;
                padding-bottom: 16px;
            }
            .card {
                border: none;
                margin-bottom: 0;
                padding-top: 25px;
                padding-bottom: 8px;
                border-top: 1px solid #e5e7eb;
            }
            /* When .summary-box is the last child, its margin-bottom (-8px) takes
               care of reaching the card edge; ensure card padding-bottom stays at 8 */

            /* Cost header (big number + slider line): tighten gap on mobile */
            .cost-header {
                gap: 2px;  /* mobile.css default 12px — moves slider line up ~10px */
            }

            /* Exception for the FIRST card on mobile (cost section, ordered first via
               mobile.css). It sits directly under the hero image — no preceding
               section to transition from — so the standard 25px padding-top + hairline
               are unwarranted. Densify it. */
            .card:has(.cost-header) {
                padding-top: 14px;
                border-top: none;
            }
            .card:has(.cost-header) .card-title {
                margin-bottom: 2px;
            }

            /* Cost rows: thin neutral progress bars; label + value on top line */
            .cost-row {
                display: flex;
                flex-wrap: wrap;
                align-items: baseline;
                gap: 4px 8px;
                margin-bottom: 16px;
            }
            .cost-label {
                flex: 1 1 auto;
                width: auto;
                font-size: 0.85rem;
                font-weight: 500;
                color: #18181b;
            }
            .cost-value {
                /* Pull out of absolute positioning into inline flex layout */
                position: static;
                right: auto;
                top: auto;
                bottom: auto;
                display: inline-block;
                margin-left: auto;
                flex-shrink: 0;
                font-size: 0.85rem;
                font-weight: 500;
                color: #18181b;
            }
            .cost-bar-container {
                flex: 1 1 100%;
                width: 100%;
                height: 5px;
                background: #f4f4f5;
                border-radius: 999px;
                overflow: hidden;
                margin-top: 4px;
            }
            .cost-bar {
                height: 100%;
                border-radius: 999px;
            }
            /* Both cost bars use a NEUTRAL dark fill on mobile — no severity coding.
               'Fixed' vs 'Risk buffer' is conveyed by the labels, not by color.
               Keeps cost bars visually distinct from risk-severity bars (which use
               red/yellow/green color coding). */
            .bar-fixed,
            .bar-risk {
                background: #374151;
            }

            /* Compare cards: image on top, text below. Wider cards. Neutral styling. */
            .mobile-compare-list a {
                width: 240px;
                background: #fff;
                border: 1px solid #e5e7eb;
                border-radius: 8px;
                overflow: hidden;
                padding: 0;
                color: #18181b;
            }
            .mobile-compare-list a .compare-image {
                width: 100%;
                aspect-ratio: 16 / 9;
                object-fit: cover;
                display: block;
                border-bottom: 1px solid #f0f0f0;
                background: #f4f4f5;
            }
            .mobile-compare-list a .compare-text {
                padding: 10px 12px 12px 12px;
                display: flex;
                flex-direction: column;
                gap: 6px;
                flex: 1;
            }
            .mobile-compare-list a .compare-header {
                display: flex;
                flex-direction: column;
                gap: 2px;
            }
            .mobile-compare-list .compare-model {
                font-size: 0.85rem;
                font-weight: 600;
                color: #18181b;
            }
            .mobile-compare-list .compare-years {
                font-size: 0.7rem;
                color: #6b7280;
            }
            .mobile-compare-list .compare-desc {
                font-size: 0.72rem;
                color: #6b7280;
                line-height: 1.4;
            }
            /* Touch UX: no persistent state on any of :hover/:active/:focus during
               scroll-touch. mobile.css applies :hover unconditionally (NOT wrapped in
               @media hover) so on iOS the hover sticks after a tap-release. Force all
               three states to white here, then re-enable hover only on real mouse
               devices via nested @media (hover: hover). */
            .mobile-compare-list a {
                -webkit-tap-highlight-color: transparent;
            }
            .mobile-compare-list a:hover,
            .mobile-compare-list a:active,
            .mobile-compare-list a:focus,
            .mobile-compare-list a:focus-visible {
                background: #fff;
                outline: none;
            }
            @media (hover: hover) {
                .mobile-compare-list a:hover {
                    background: #fafafa;
                }
            }
            /* Zero the trailing margin of card content so card padding actually defines the gap */
            .card > *:last-child,
            .card > *:last-child > *:last-child {
                margin-bottom: 0;
            }
            .editorial-overview > *:last-child,
            .editorial-overview > *:last-child > *:last-child {
                margin-bottom: 0;
            }
            /* Editorial overview internals: borderless + unified 16px gap between sub-groups
               (overrides both inline desktop CSS and mobile.css spacing) */
            .editorial-overview .overview-highlights {
                border: none;
                padding: 0;
                margin: 0 0 16px 0;
            }
            .editorial-overview .overview-bottom {
                border: none;
                padding: 0;
                margin: 0 0 16px 0;
            }
            .editorial-overview .overview-text {
                /* Reordered to position 3 on mobile (after pros/cons + buy/avoid).
                   Style as visually-subordinate "background context" so it doesn't
                   blend with avoid-if and look like an afterthought paragraph. */
                border: none;
                padding: 0 0 0 12px;
                margin: 0;
                border-left: 2px solid #e5e7eb;
                font-size: 0.88rem;
                font-style: italic;
                color: #374151;
                line-height: 1.55;
            }
            .editorial-overview .overview-text::before {
                content: "Background";
                display: block;
                font-style: normal;
                font-weight: 600;
                font-size: 0.72rem;
                color: #6b7280;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                margin-bottom: 6px;
            }

            /* Summary-box bg should reach the card's bottom edge. mobile.css uses
               margin-bottom: -16px (designed for its 16px card padding). My card
               padding-bottom is 8px, so override to -8px for edge-to-edge.
               Also drop the thick 2px grey top border that visually competes with
               the card boundary — section transition is enough separation. */
            .card .summary-box {
                margin-bottom: -8px;
                border-top: none;
            }
        }

        /* ===========================================================
           Desktop compare section (NEW for v2 prototype, was mobile-only)
           Same content + per-card image-on-top pattern as mobile, but laid
           out as a 5-column grid (no horizontal scroll) inside a card.
           =========================================================== */
        @media (min-width: 769px) {
            .mobile-compare {
                display: block;
                background: none;
                border: none;
                border-radius: 0;
                padding: 0;
                margin: 24px 0 16px 0;
            }
            .mobile-compare h3 {
                font-size: 1rem;
                font-weight: 600;
                color: #374151;
                text-transform: none;
                letter-spacing: 0;
                margin: 0 0 16px 0;
            }
            .mobile-compare-list {
                display: flex;
                flex-wrap: nowrap;
                gap: 12px;
                overflow-x: auto;
                padding-bottom: 8px;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: thin;
            }
            .mobile-compare-list a {
                flex-shrink: 0;
                width: 300px;
                background: #fff;
                border: 1px solid #e5e7eb;
                border-radius: 8px;
                overflow: hidden;
                padding: 0;
                color: #18181b;
                text-decoration: none;
                display: flex;
                flex-direction: column;
            }
            .mobile-compare-list a .compare-image {
                width: 100%;
                aspect-ratio: 16 / 9;
                object-fit: cover;
                display: block;
                border-bottom: 1px solid #f0f0f0;
                background: #f4f4f5;
            }
            .mobile-compare-list a .compare-text {
                padding: 12px 14px 14px 14px;
                display: flex;
                flex-direction: column;
                gap: 6px;
                flex: 1;
            }
            .mobile-compare-list a .compare-header {
                display: flex;
                flex-direction: column;
                gap: 2px;
            }
            .mobile-compare-list .compare-model {
                font-size: 0.88rem;
                font-weight: 600;
                color: #18181b;
                line-height: 1.25;
            }
            .mobile-compare-list .compare-years {
                font-size: 0.72rem;
                color: #6b7280;
            }
            .mobile-compare-list .compare-desc {
                font-size: 0.78rem;
                color: #6b7280;
                line-height: 1.5;
            }
            .mobile-compare-list a:hover {
                background: #fafafa;
            }
        }

        /* Site-nav: dense one-row header — logo + breadcrumb (left) / search + lang (right). No divider; whitespace does the work. */
        .site-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 18px 0 22px;
            margin-bottom: 4px;
        }
        .site-nav-left {
            display: flex;
            align-items: center;
            gap: 14px;
            min-width: 0;
            flex: 1 1 auto;
        }
        .site-logo {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            text-decoration: none;
            color: #0a0a0a;
            flex-shrink: 0;
        }
        .site-logo-mark { width: 19px; height: 19px; flex-shrink: 0; }
        .site-logo-text {
            font-weight: 600;
            font-size: 0.94rem;
            letter-spacing: -0.018em;
            color: #0a0a0a;
        }
        .site-nav .crumb-divider {
            color: #d4d4d8;
            font-size: 0.8rem;
            user-select: none;
            flex-shrink: 0;
        }
        .breadcrumb-inline {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.82rem;
            color: #71717a;
            min-width: 0;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
        .breadcrumb-inline a {
            color: #71717a;
            text-decoration: none;
            transition: color 0.12s;
        }
        .breadcrumb-inline a:hover { color: #0a0a0a; }
        .breadcrumb-inline .sep {
            color: #d4d4d8;
            font-weight: 400;
        }
        .header-utils {
            display: flex;
            align-items: center;
            gap: 18px;
            flex-shrink: 0;
        }
        .site-nav .search-box {
            position: relative;
            flex: 0 0 auto;
            width: 340px;
            max-width: 100%;
        }
        .search-box-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #a1a1aa;
            pointer-events: none;
        }
        .site-nav .search-box input#car-search {
            width: 100%;
            padding: 10px 50px 10px 38px;
            border: 1px solid #e4e4e7;
            border-radius: 8px;
            font-size: 0.9rem;
            color: #18181b;
            background: #fafafa;
            transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
            font-family: inherit;
        }
        .site-nav .search-box input#car-search::placeholder { color: #a1a1aa; }
        .site-nav .search-box input#car-search:hover { background: #fff; }
        .site-nav .search-box input#car-search:focus {
            outline: none;
            border-color: #d4d4d8;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.9);
        }
        .search-kbd {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: center;
            gap: 1px;
            padding: 2px 5px;
            font-size: 0.7rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            color: #71717a;
            background: #fff;
            border: 1px solid #e4e4e7;
            border-radius: 4px;
            line-height: 1;
            pointer-events: none;
        }
        .site-nav .lang-switch {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 0.82rem;
            color: #a1a1aa;
        }
        .site-nav .lang-switch a {
            color: #a1a1aa;
            text-decoration: none;
            padding: 0;
            border-radius: 0;
            background: transparent;
            font-weight: 400;
            transition: color 0.12s;
        }
        .site-nav .lang-switch a:hover { color: #18181b; }
        .site-nav .lang-switch a.active {
            color: #0a0a0a;
            background: transparent;
            font-weight: 600;
        }
        .site-nav .lang-switch .lang-sep {
            color: #e4e4e7;
            user-select: none;
        }
        /* Hide the legacy standalone breadcrumb row — now inlined into .site-nav */
        .breadcrumb-row { display: none; }
        @media (max-width: 860px) {
            .site-nav .search-box { width: 200px; }
            .breadcrumb-inline { font-size: 0.78rem; }
        }
        /* Desktop: keep visual order = logo | search | lang
           HTML order is: site-nav-left, lang-switch, search-box (lang moved earlier so it can sit on row 1 with logo on mobile).
           CSS `order` reorders the visual layout back on desktop. */
        .site-nav .site-nav-left { order: 1; }
        .site-nav .search-box { order: 2; }
        .site-nav .lang-switch { order: 3; }

        /* Mobile-only search button — pill-style, looks like a search input, opens .search-overlay on tap */
        .search-icon {
            display: none;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 8px 16px;
            background: #f4f4f5;
            border: none;
            border-radius: 999px;
            color: #71717a;
            font-size: 0.88rem;
            font-family: inherit;
            cursor: pointer;
            text-align: left;
            min-height: 40px;
        }
        .search-icon-label { font-weight: 400; }
        .search-icon:active { background: #e4e4e7; }
        .search-icon svg { flex-shrink: 0; opacity: 0.7; }

        @media (max-width: 720px) {
            .site-nav {
                gap: 10px;
                padding: 6px 16px 12px 16px;  /* tighter top, horizontal breathing room */
                flex-wrap: wrap;
                align-items: center;
            }
            /* Mobile-only order override: lang on row 1 with logo, search on row 2 */
            .site-nav .site-nav-left { order: 1; }
            .site-nav .lang-switch { order: 2; }
            .site-nav .search-box { order: 3; }
            /* Row 1: logo+breadcrumb (left) + lang switch (right) */
            .site-nav-left { flex: 1 1 auto; gap: 10px; min-width: 0; }
            .lang-switch {
                flex: 0 0 auto;
                flex-shrink: 0;
                gap: 10px;
            }
            /* Row 2: search-box full width */
            .site-nav .search-box {
                flex: 1 1 100%;
                width: 100%;
                max-width: 100%;
            }
            /* Hide the real desktop input + inline icon + kbd hint; show the mobile button */
            .site-nav .search-box input#car-search { display: none; }
            .site-nav .search-box .search-box-icon { display: none; }
            .search-kbd { display: none; }
            .search-icon { display: flex; }
            .site-logo-text { font-size: 0.92rem; }

            /* Tighten title-to-image gap */
            .report-header { gap: 6px; margin: 8px 0 0 0; }
            .report-header-text h1 { margin-bottom: 4px; }
            .report-header-text .last-updated { margin-bottom: 2px; }
            .report-header-text .subtitle { margin-bottom: 2px; }
            .hero-image { margin: 4px 0 0 0; }
        }
