.car-cost-stage3-panel {
    margin: 1.5rem 0;
    padding: clamp(1.15rem, 2.4vw, 1.8rem);
    border: 1px solid rgba(15, 56, 95, 0.12);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at top right, rgba(0, 110, 255, 0.08), transparent 32%),
        linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 18px 48px rgba(20, 58, 92, 0.09);
    scroll-margin-top: 7rem;
}

.car-cost-stage3-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.car-cost-stage3-head > div > span,
.car-cost-snapshot-change > div:first-child > span {
    display: block;
    color: #0d6efd;
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.car-cost-stage3-head h2 {
    margin: 0.2rem 0 0.35rem;
    color: #102a43;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.car-cost-stage3-head p {
    max-width: 70ch;
    margin: 0;
    color: #5b6b7b;
}

.car-cost-stage3-empty {
    padding: 1rem;
    border: 1px dashed rgba(13, 110, 253, 0.35);
    border-radius: 1rem;
    background: rgba(13, 110, 253, 0.04);
    color: #49637a;
}

.car-cost-proof-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.car-cost-proof-summary > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 5.5rem;
    padding: 0.9rem;
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 1rem;
    background: #fff;
}

.car-cost-proof-summary span {
    color: #6b7d8d;
    font-size: 0.78rem;
    font-weight: 700;
}

.car-cost-proof-summary strong {
    margin-top: auto;
    color: #102a43;
    font-size: 1.25rem;
}

.car-cost-change-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.car-cost-change-card {
    padding: 1rem;
    border: 1px solid rgba(15, 56, 95, 0.1);
    border-left: 4px solid #8fa3b7;
    border-radius: 1rem;
    background: #fff;
}

.car-cost-change-card.is-positive { border-left-color: #1e9e68; }
.car-cost-change-card.is-negative { border-left-color: #d94b4b; }
.car-cost-change-card.is-neutral { border-left-color: #5d78a6; }

.car-cost-change-card > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.car-cost-change-card span {
    color: #16324a;
    font-weight: 800;
}

.car-cost-change-card strong {
    color: #0d6efd;
    font-size: 0.82rem;
    text-align: right;
}

.car-cost-change-card p {
    margin: 0.55rem 0 0;
    color: #647586;
    font-size: 0.9rem;
}

.car-cost-snapshot-change {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: #102a43;
    color: #fff;
}

.car-cost-snapshot-change > div:first-child strong {
    display: block;
    margin-top: 0.2rem;
}

.car-cost-snapshot-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.car-cost-snapshot-metrics span {
    min-width: 7.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.1);
}

.car-cost-snapshot-metrics small,
.car-cost-snapshot-metrics b {
    display: block;
}

.car-cost-offer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    gap: 1rem;
}

.car-cost-offer-controls {
    display: grid;
    gap: 0.65rem;
}

.car-cost-offer-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(15, 56, 95, 0.12);
    border-radius: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.car-cost-offer-toggle input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #0d6efd;
}

.car-cost-offer-toggle span {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.car-cost-offer-toggle strong { color: #20384f; }
.car-cost-offer-toggle small { color: #0d6efd; font-weight: 800; }

.car-cost-offer-margin {
    display: grid;
    grid-template-columns: 1fr 10rem;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    background: rgba(13, 110, 253, 0.06);
    font-weight: 700;
}

.car-cost-offer-result {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #102a43, #173f62);
    color: #fff;
}

.car-cost-offer-result > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    padding: 0.75rem;
    border-radius: 0.8rem;
    background: rgba(255,255,255,0.08);
}

.car-cost-offer-result > div.is-opening { background: rgba(58, 180, 242, 0.16); }
.car-cost-offer-result > div.is-maximum { background: rgba(41, 203, 132, 0.18); }
.car-cost-offer-result strong { font-size: 1.2rem; }
.car-cost-offer-result p { margin: 0; color: rgba(255,255,255,0.72); font-size: 0.82rem; }

.car-cost-timeline-list {
    position: relative;
    display: grid;
    gap: 0.8rem;
    padding-left: 1.25rem;
}

.car-cost-timeline-list::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.36rem;
    width: 2px;
    background: linear-gradient(#d94b4b, #f0a12f, #1e9e68, #5d78a6);
}

.car-cost-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(15, 56, 95, 0.11);
    border-radius: 1rem;
    background: #fff;
}

.car-cost-timeline-marker {
    position: absolute;
    left: -1.23rem;
    top: 1.3rem;
    width: 0.75rem;
    height: 0.75rem;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #5d78a6;
    box-shadow: 0 0 0 2px #5d78a6;
}

.car-cost-timeline-item.is-high .car-cost-timeline-marker { background: #d94b4b; box-shadow: 0 0 0 2px #d94b4b; }
.car-cost-timeline-item.is-medium .car-cost-timeline-marker { background: #f0a12f; box-shadow: 0 0 0 2px #f0a12f; }
.car-cost-timeline-item.is-low .car-cost-timeline-marker { background: #1e9e68; box-shadow: 0 0 0 2px #1e9e68; }

.car-cost-timeline-item span {
    color: #0d6efd;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.car-cost-timeline-item h3 { margin: 0.15rem 0 0.35rem; color: #17324b; font-size: 1rem; }
.car-cost-timeline-item p { margin: 0; color: #5f7183; }
.car-cost-timeline-item small { display: block; margin-top: 0.45rem; color: #7b8b99; }
.car-cost-timeline-item > strong { align-self: center; color: #102a43; white-space: nowrap; }

@media (max-width: 980px) {
    .car-cost-proof-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .car-cost-offer-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .car-cost-stage3-head,
    .car-cost-snapshot-change {
        align-items: stretch;
        flex-direction: column;
    }

    .car-cost-proof-summary,
    .car-cost-change-grid {
        grid-template-columns: 1fr;
    }

    .car-cost-offer-toggle span,
    .car-cost-offer-margin,
    .car-cost-timeline-item {
        grid-template-columns: 1fr;
    }

    .car-cost-offer-toggle span {
        display: grid;
        gap: 0.2rem;
    }

    .car-cost-offer-margin input { width: 100%; }
    .car-cost-timeline-item > strong { justify-self: start; }
}

.car-cost-history-details {
    margin-top: 0.85rem;
    border: 1px solid rgba(15, 56, 95, 0.12);
    border-radius: 0.9rem;
    background: #fff;
    overflow: hidden;
}

.car-cost-history-details summary {
    padding: 0.85rem 1rem;
    cursor: pointer;
    color: #17324b;
    font-weight: 800;
}

.car-cost-history-list {
    display: grid;
    gap: 0.55rem;
    padding: 0 1rem 1rem;
}

.car-cost-history-list > div {
    display: grid;
    grid-template-columns: minmax(10rem, 0.8fr) minmax(9rem, 0.6fr) minmax(0, 1.6fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 0.75rem;
    background: #f5f9fd;
}

.car-cost-history-list span,
.car-cost-history-list small {
    color: #65788a;
}

.car-cost-history-list strong {
    color: #102a43;
}

@media (max-width: 700px) {
    .car-cost-history-list > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* Eight Stage 3 section shortcuts: two balanced rows on desktop. */
.car-cost-jump-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .car-cost-jump-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .car-cost-jump-nav {
        grid-template-columns: 1fr;
    }
}
