/* Shared styles for every page of 21 Park Lane Circle */

:root {
    --blue-dark: #0b1f4d;
    --blue-mid: #1a3f8f;
    --gray: #6b7280;
    --gradient: linear-gradient(120deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
}

/* Cross-fade between pages when a link is followed (Chrome, Edge, Safari; other browsers just load the page) */
@view-transition { navigation: auto; }

* { box-sizing: border-box; margin: 0; }

/* Hidden steps stay hidden even though .hero and .step set their own display */
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
    background: #ffffff;
    font-family: "Google Sans", "Google Sans Flex", system-ui, sans-serif;
    font-weight: 550;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Background colour glows ---------- */

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
    animation: drift 22s ease-in-out infinite alternate;
}

.glow-1 { width: 520px; height: 520px; background: #c7dbff; top: -140px; left: -120px; }
.glow-2 { width: 460px; height: 460px; background: #e3d4ff; top: 10%;   right: -140px; animation-delay: -6s; }
.glow-3 { width: 420px; height: 420px; background: #c9f0e6; bottom: -160px; left: 18%; animation-delay: -12s; }
.glow-4 { width: 340px; height: 340px; background: #ffe1ec; bottom: 6%;  right: 14%; animation-delay: -18s; opacity: 0.45; }

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .glow { animation: none; }
}

/* ---------- Text ---------- */

/* Dark-blue gradient text. drop-shadow (not text-shadow) because text-shadow
   paints over gradient-clipped text and muddies it. */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 1.5px rgba(11, 31, 77, 0.12))
            drop-shadow(0 4px 10px rgba(11, 31, 77, 0.07));
}

h1 {
    font-weight: 550;
    line-height: 1.1;
    letter-spacing: -0.02em;
    padding-bottom: 0.08em;   /* keeps descenders (y, g) from being clipped by the gradient */
}

.subtitle {
    color: var(--gray);
    font-weight: 500;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ---------- Header ---------- */

header {
    padding: 24px 32px;
    view-transition-name: site-header;   /* stays still while the page content cross-fades */
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.25rem;
}

.brand svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1.5px rgba(11, 31, 77, 0.12));
}

/* ---------- Home page ---------- */

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px 10vh;
}

.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.hero .subtitle { margin-top: 16px; }

.button {
    margin-top: 36px;
    display: inline-block;
    padding: 14px 32px;
    border-radius: 999px;
    background: var(--gradient);
    color: #ffffff;
    font-family: inherit;
    font-weight: 550;
    font-size: 1.05rem;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(11, 31, 77, 0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(11, 31, 77, 0.22);
}

.button:focus-visible {
    outline: 3px solid var(--blue-mid);
    outline-offset: 3px;
}

/* ---------- Residence-type page ---------- */

.step {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4vh 24px 8vh;
    text-align: center;
}

.step h1 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    white-space: nowrap;   /* one line */
    margin: 0 auto;
}

/* Heading row of the residence step: heading centred until a card is picked,
   then heading on the left (over the first card) and Next on the right (over the last card) */
.step-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.step-head h1 {
    margin: 0;
    text-align: left;
    transform-origin: left top;   /* for the slide animation */
}

.step.chosen .step-head { justify-content: space-between; }

/* A little smaller once the Next button shares the row */
.step.chosen .step-head h1 { font-size: clamp(1.25rem, 2.1vw, 1.65rem); }

.next-button {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 12px 22px;
    flex-shrink: 0;
}

.step.chosen .next-button,
.next-button.shown { display: inline-flex; }

.step.chosen .step-head .next-button {
    animation: slide-in 0.45s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes slide-in {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: none; }
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* On phones the sentence can't fit on one line, so let it wrap there */
@media (max-width: 700px) {
    .step h1 { white-space: normal; }
    .step-head { flex-wrap: wrap; }
}

.cards {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    cursor: pointer;
    font: inherit;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    /* The photo; if it is missing, the colour gradient behind it shows instead */
    background-image: var(--photo), var(--fallback);
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 14px rgba(11, 31, 77, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(11, 31, 77, 0.18);
}

.card.selected {
    outline: 3px solid var(--blue-mid);
    outline-offset: 4px;
    box-shadow: 0 14px 30px rgba(11, 31, 77, 0.22);
}

.card:focus-visible {
    outline: 3px solid var(--blue-mid);
    outline-offset: 4px;
}

/* Frosted glass over the bottom of the photo: the blur fades in toward the bottom */
.card::after {
    content: "";
    position: absolute;
    inset: 15% 0 0 0;   /* starts higher up, so the fade has more room */
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    /* Eased stops (slow start, slow finish) instead of a straight line, so there's no visible edge */
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0)    0%,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.14) 45%,
        rgba(255, 255, 255, 0.30) 65%,
        rgba(255, 255, 255, 0.45) 82%,
        rgba(255, 255, 255, 0.55) 100%);
    -webkit-mask-image: linear-gradient(to bottom,
        transparent          0%,
        rgba(0, 0, 0, 0.05) 15%,
        rgba(0, 0, 0, 0.18) 30%,
        rgba(0, 0, 0, 0.40) 45%,
        rgba(0, 0, 0, 0.65) 60%,
        rgba(0, 0, 0, 0.85) 75%,
        #000                90%);
    mask-image: linear-gradient(to bottom,
        transparent          0%,
        rgba(0, 0, 0, 0.05) 15%,
        rgba(0, 0, 0, 0.18) 30%,
        rgba(0, 0, 0, 0.40) 45%,
        rgba(0, 0, 0, 0.65) 60%,
        rgba(0, 0, 0, 0.85) 75%,
        #000                90%);
}

.card-label {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 1;
    text-align: left;
    font-size: 1.3rem;
}

/* ---------- Layout step ---------- */

.panel {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 32px;
    display: grid;
    gap: 28px;
    text-align: left;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 6px 24px rgba(11, 31, 77, 0.08);
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: var(--blue-dark);
    font-size: 0.95rem;
}

.select,
.stepper {
    width: 100%;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select:focus,
.stepper:focus-within {
    outline: none;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.15);
}

.select {
    appearance: none;
    padding: 14px 44px 14px 16px;
    font: inherit;
    color: var(--blue-dark);
    cursor: pointer;
    /* down-arrow on the right */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231a3f8f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

.select:invalid { color: var(--gray); }   /* placeholder "Choose a style" in gray */

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

@media (max-width: 560px) { .numbers { grid-template-columns: 1fr; } }

.stepper {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.stepper input {
    flex: 1;
    min-width: 0;
    padding: 14px 0;
    border: none;
    background: transparent;
    text-align: center;
    font: inherit;
    font-size: 1.1rem;
    color: var(--blue-dark);
    -moz-appearance: textfield;
}

.stepper input:focus { outline: none; }

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper button {
    width: 44px;
    align-self: stretch;
    border: none;
    background: transparent;
    color: var(--blue-mid);
    font: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.stepper button:hover { background: #f0f4fb; }

/* Switch for the detached garage */
.toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--blue-dark);
    cursor: pointer;
    user-select: none;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.toggle-track {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: #d7deea;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-track { background: var(--gradient); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--blue-mid); outline-offset: 3px; }

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-button {
    padding: 12px 8px;
    border: none;
    background: none;
    color: var(--gray);
    font: inherit;
    cursor: pointer;
}

.text-button:hover { color: var(--blue-dark); }

/* Steps that sit in the middle of the screen vertically (heading + panel as one group) */
.step.centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 12vh;   /* a little above true centre, which looks centred to the eye */
}

.step.centered .panel { width: 100%; }

/* ---------- Size step ---------- */

.sizes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* minmax(0, …) stops the boxes overflowing */
    gap: 20px;
}

.sizes .wide { grid-column: 1 / -1; }

@media (max-width: 560px) { .sizes { grid-template-columns: 1fr; } }

/* Text box with its unit (sq ft, ft) shown inside on the right */
.unit-input {
    display: flex;
    align-items: center;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.unit-input:focus-within {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.15);
}

.unit-input input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 14px 0 14px 16px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 1.1rem;
    color: var(--blue-dark);
}

.unit-input input:focus { outline: none; }

.unit {
    padding: 0 16px 0 8px;
    color: var(--gray);
    font-weight: 500;
}

/* ---------- Unanswered fields: red glow, plus a shake each time Next is pressed ---------- */

.select.invalid,
.stepper.invalid,
.unit-input.invalid,
.date-input.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18), 0 0 18px rgba(220, 38, 38, 0.28);
}

.field:has(.invalid) label { color: #b91c1c; }

.shake { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-7px); }
    40%      { transform: translateX(7px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .shake { animation: none; }   /* the red glow still shows */
}

/* ---------- Location step ---------- */

.panel.wide { max-width: 1040px; }

.location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 36px;
}

@media (max-width: 820px) { .location-grid { grid-template-columns: 1fr; } }

.extras {
    display: flex;
    flex-direction: column;
    gap: 28px;
    /* stop level with the bottom of the neighbourhood list, not the "Selected:" line under it */
    padding-bottom: calc(10px + 0.95rem * 1.5);
}

/* The comments field takes up the rest of the column's height */
.extras .field:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.extras .field:last-child .textarea { flex: 1; }

.optional { color: var(--gray); font-weight: 500; }

/* Search box (reuses .unit-input) with a magnifier on the left */
.search svg { margin-left: 14px; color: var(--gray); flex-shrink: 0; }
.search input { padding-left: 10px; }

/* Scrollable A-Z list of neighbourhoods */
.picker {
    margin-top: 12px;
    height: 320px;   /* fixed, so the panel doesn't jump while searching */
    overflow-y: auto;
    padding: 0 12px 12px;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.picker-letter {
    position: sticky;
    top: 0;
    padding: 10px 4px 6px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--gray);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    z-index: 1;
}

.picker-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px;
}

.choice-item {
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--blue-dark);
    font: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

.choice-item:hover { background: #f0f4fb; }

.choice-item.selected {
    background: var(--gradient);
    color: #ffffff;
}

.picker-empty {
    padding: 20px 4px 8px;
    color: var(--gray);
    font-weight: 500;
}

.picker.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18), 0 0 18px rgba(220, 38, 38, 0.28);
}

.selected-line {
    margin-top: 10px;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
}

.selected-line strong { color: var(--blue-dark); font-weight: 550; }

/* 0-10 condition buttons */
.rating {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 5px;
}

.rating button {
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid #d7deea;
    border-radius: 10px;
    background: #ffffff;
    color: var(--blue-dark);
    font: inherit;
    cursor: pointer;
    transition: background 0.12s ease;
}

.rating button:hover { background: #f0f4fb; }

.rating button.selected {
    border-color: transparent;
    background: var(--gradient);
    color: #ffffff;
}

.rating-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 500;
}

.textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px 16px;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background: #ffffff;
    color: var(--gray);
    font: inherit;
    font-weight: 500;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea::placeholder { color: #b4bac4; }   /* lighter than typed text, so the two look different */

.textarea:focus {
    outline: none;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.15);
}

/* ---------- Listing step ---------- */

.listing-head { text-align: center; }
.listing-head .subtitle { margin-top: 12px; }

.yesno {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.yesno-btn {
    min-width: 140px;
    padding: 14px 28px;
    border: 1px solid #d7deea;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--blue-dark);
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(11, 31, 77, 0.06);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.yesno-btn:hover { background: #f0f4fb; }

.yesno-btn.selected {
    border-color: transparent;
    background: var(--gradient);
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.yesno.invalid .yesno-btn {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18), 0 0 18px rgba(220, 38, 38, 0.28);
}

.listing-details:not([hidden]) {
    animation: fade-up 0.45s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 560px) { .listing-grid { grid-template-columns: 1fr; } }

/* "$" in front of the price */
.prefix {
    padding-left: 16px;
    color: var(--gray);
    font-weight: 500;
    font-size: 1.1rem;
}

.prefix + input { padding-left: 6px; }

.date-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #d7deea;
    border-radius: 14px;
    background: #ffffff;
    color: var(--blue-dark);
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.15);
}

.date-input::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }

.listing-actions {
    width: 100%;
    max-width: 720px;
    margin: 28px auto 0;
}

/* ---------- Loading and result ---------- */

.loading,
.result { text-align: center; }

/* Spinning gradient ring */
.loader {
    width: 72px;
    height: 72px;
    margin: 0 auto 32px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(26, 63, 143, 0) 0deg, var(--blue-mid) 280deg, var(--blue-dark) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    filter: drop-shadow(0 4px 10px rgba(11, 31, 77, 0.15));
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading .subtitle { margin-top: 12px; }

.price {
    margin: 8px 0 28px;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 550;
    line-height: 1.1;
    letter-spacing: -0.02em;
    padding-bottom: 0.08em;
    font-variant-numeric: tabular-nums;   /* digits don't jiggle while counting up */
}

.result:not([hidden]) {
    animation: fade-up 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.result .subtitle { margin-top: 12px; }

.result-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.result-buttons .button { margin-top: 0; }

/* ---------- "What's driving this price" ---------- */

.insights {
    margin: 0 auto 24px;
    text-align: left;
    gap: 20px;
}

.insights:not([hidden]) {
    animation: fade-up 0.5s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.insights-title {
    font-size: 1.15rem;
    font-weight: 550;
    color: var(--blue-dark);
}

.explanation p {
    color: #374151;
    font-weight: 500;
    line-height: 1.6;
}

.explanation p + p { margin-top: 10px; }

/* Grey placeholder lines while the explanation loads */
.skeleton {
    height: 14px;
    margin: 10px 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #eef1f7 0%, #f8f9fc 50%, #eef1f7 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton.short { width: 60%; }

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* One row per driver: label, bar, amount */
.drivers {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 10px;
}

.driver {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 96px;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--blue-dark);
}

.driver-bar {
    height: 8px;
    border-radius: 4px;
    background: #eef1f7;
    overflow: hidden;
}

.driver-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--gradient);
    transform-origin: left;
    animation: grow 0.7s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.driver.negative .driver-bar span { background: linear-gradient(120deg, #b91c1c, #ef4444); }

@keyframes grow { from { transform: scaleX(0); } }

.driver-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.driver.negative .driver-amount { color: #b91c1c; }

.insights-note {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 560px) {
    .driver { grid-template-columns: 1fr 80px; }
    .driver-bar { grid-column: 1 / -1; grid-row: 2; }
}
