/*
 * /v3 personal loan form. Tokens come from lp-forms.css, which loads first.
 */
.v3-page {
    padding: 124px 0 80px;
    background:
        radial-gradient(900px 460px at 0 -80px, rgba(63, 101, 119, .14), transparent 70%),
        radial-gradient(700px 420px at 100% 10%, rgba(23, 166, 127, .1), transparent 70%),
        var(--lp-bg);
}
.v3-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: 3.5rem;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}

/* ---------- Aside ---------- */
.v3-aside {
    position: sticky;
    top: 120px;
    padding-top: 1rem;
    animation: v3Up .5s ease both;
}
.v3-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .35rem .8rem;
    border-radius: 99px;
    background: var(--lp-steel-soft);
    color: var(--lp-steel);
    font-size: .8rem;
    font-weight: 600;
}
.v3-title {
    margin-bottom: .85rem;
    color: var(--lp-ink);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.12;
}
.v3-lead {
    margin-bottom: 2rem;
    color: var(--lp-muted);
    font-size: 1.05rem;
}
.v3-summary {
    margin-bottom: 1.75rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid var(--lp-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(6px);
}
.v3-summary h2 {
    margin-bottom: .75rem;
    color: var(--lp-steel);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.v3-summary dl {
    display: grid;
    gap: .6rem;
    margin: 0;
}
.v3-summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.v3-summary dt {
    color: var(--lp-muted);
    font-weight: 500;
}
.v3-summary dd {
    margin: 0;
    color: var(--lp-ink);
    font-weight: 700;
    text-align: right;
}
.v3-summary .is-set dd {
    animation: v3Flash .6s ease;
}
.v3-perks {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--lp-ink);
    font-weight: 500;
}
.v3-perks i {
    margin-right: .5rem;
    color: var(--lp-green);
}

/* ---------- Card ---------- */
.v3-card {
    padding: 2rem 2.25rem 1.75rem;
    border: 1px solid var(--lp-line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--lp-card-shadow);
    animation: v3Up .5s .1s ease both;
}
.v3-card .lp-trust {
    margin-top: 1.5rem;
    font-size: .8rem;
}
.v3-head {
    margin-bottom: 1.75rem;
}
.v3-sections {
    display: flex;
    justify-content: space-between;
    margin: 0 0 .65rem;
    padding: 0;
    list-style: none;
    color: #a3acb6;
    font-size: .75rem;
    font-weight: 600;
}
.v3-sections li {
    transition: color .25s ease;
}
.v3-sections .is-done {
    color: var(--lp-green);
}
.v3-sections .is-active {
    color: var(--lp-ink);
}
.v3-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--lp-steel-soft);
}
.v3-progress span {
    display: block;
    width: 4%;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--lp-steel), var(--lp-green));
    transition: width .45s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Steps ---------- */
.v3-step {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.v3-step[hidden] {
    display: none;
}
.v3-step.is-entering-fwd {
    animation: v3InRight .35s cubic-bezier(.2, .8, .2, 1) both;
}
.v3-step.is-entering-back {
    animation: v3InLeft .35s cubic-bezier(.2, .8, .2, 1) both;
}
.v3-q {
    float: none;
    width: 100%;
    margin-bottom: .4rem;
    padding: 0;
    color: var(--lp-ink);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.25;
}
.v3-sub {
    margin-bottom: 1.5rem;
    color: var(--lp-muted);
}
.v3-q + .v3-field,
.v3-q + .v3-tiles {
    margin-top: 1.25rem;
}

/* Tiles */
.v3-tiles {
    display: grid;
    gap: .75rem;
}
.v3-tiles-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.v3-tile,
.v3-chip {
    position: relative;
    display: flex;
    margin: 0;
    cursor: pointer;
}
.v3-tile input,
.v3-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.v3-tile > span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    gap: .2rem;
    min-height: 76px;
    padding: .9rem 2.6rem .9rem 1.1rem;
    border: 1.5px solid var(--lp-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.v3-tile > span::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 1.5px solid var(--lp-line);
    border-radius: 50%;
    background: #fff;
    transition: all .15s ease;
}
.v3-tile i {
    margin-bottom: .2rem;
    color: var(--lp-steel);
    font-size: 1.3rem;
}
.v3-tile strong {
    color: var(--lp-ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}
.v3-tile small {
    color: var(--lp-muted);
    font-size: .85rem;
}
.v3-tile:hover > span {
    border-color: rgba(63, 101, 119, .45);
    transform: translateY(-1px);
}
.v3-tile input:focus-visible + span {
    box-shadow: var(--lp-ring);
}
.v3-tile input:checked + span {
    border-color: var(--lp-green);
    background: rgba(23, 166, 127, .06);
    box-shadow: 0 10px 24px -16px rgba(23, 166, 127, .9);
}
.v3-tile input:checked + span::after {
    border-color: var(--lp-green);
    background: var(--lp-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='m4 8.5 2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 14px no-repeat;
    animation: v3Pop .3s ease;
}

/* Chips */
.v3-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.v3-chips-wrap {
    display: flex;
    flex-wrap: wrap;
}
.v3-chip span {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .5rem .85rem;
    border: 1.5px solid var(--lp-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lp-ink);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    transition: all .15s ease;
}
.v3-chips-wrap .v3-chip span {
    white-space: nowrap;
}
.v3-chip:hover span {
    border-color: rgba(63, 101, 119, .45);
}
.v3-chip input:focus-visible + span {
    box-shadow: var(--lp-ring);
}
.v3-chip input:checked + span {
    border-color: var(--lp-green);
    background: rgba(23, 166, 127, .07);
    color: #0f7a5c;
    font-weight: 600;
}

/* Inputs */
.v3-field {
    margin-bottom: 1.25rem;
}
.v3-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.v3-label {
    display: block;
    margin-bottom: .45rem;
    color: var(--lp-ink);
    font-size: .9rem;
    font-weight: 600;
}
.v3-input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 1rem;
    border: 1.5px solid var(--lp-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lp-ink);
    font-size: 1rem;
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.v3-input::placeholder {
    color: #a3acb6;
    font-weight: 400;
}
.v3-input:focus {
    border-color: var(--lp-steel);
    outline: 0;
    box-shadow: var(--lp-ring);
}
.v3-select {
    padding-right: 2.5rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%233f6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 1rem center / 14px;
    appearance: none;
    cursor: pointer;
}
.v3-select:invalid {
    color: #a3acb6;
}
.v3-select option {
    color: var(--lp-ink);
}
.v3-money,
.v3-secure {
    position: relative;
}
.v3-money > span,
.v3-secure > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: var(--lp-muted);
    font-weight: 600;
    transform: translateY(-50%);
    pointer-events: none;
}
.v3-money .v3-input,
.v3-secure .v3-input {
    padding-left: 2.2rem;
}
.v3-secure .v3-input {
    letter-spacing: .08em;
}
.v3-hint {
    margin: .4rem 0 0;
    color: var(--lp-muted);
    font-size: .8rem;
}
.v3-employer {
    margin-bottom: .25rem;
    padding: 1.1rem 1.1rem .1rem;
    border-radius: 16px;
    background: var(--lp-bg);
    animation: v3Up .3s ease both;
}
.v3-employer[hidden] {
    display: none;
}
.v3-employer .v3-input {
    background-color: #fff;
}
.v3-chips-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v3-optional {
    color: var(--lp-muted);
    font-weight: 400;
}

/* Consent */
.v3-consent {
    margin: .25rem 0 0;
    color: #8a939d;
    font-size: .72rem;
    line-height: 1.55;
}
.v3-consent a {
    color: var(--lp-steel);
    font-weight: 600;
}
.v3-fine {
    margin: .75rem 0 0;
    color: #8a939d;
    font-size: .7rem;
    line-height: 1.5;
}

/* Errors */
.v3-error {
    display: none;
    margin: .4rem 0 0;
    color: #d64545;
    font-size: .8rem;
    font-weight: 500;
}
.v3-error.is-shown {
    display: block;
    animation: v3Shake .3s ease;
}
.v3-field.is-invalid .v3-input,
.v3-field.is-invalid .v3-chip span {
    border-color: #e38b8b;
}
.v3-form-error {
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: #fdecec;
    color: #b23a3a;
    font-size: .875rem;
    font-weight: 500;
}

/* Nav */
/* Continue / See my offers full width, with a small Back link under it */
.v3-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    margin-top: 1.75rem;
}
.v3-nav .v3-btn {
    flex: none;
}
.v3-btn {
    position: relative;
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 56px;
    padding: 0 1.75rem;
    border: 0;
    border-radius: 14px;
    background: var(--lp-steel);
    box-shadow: 0 14px 28px -16px rgba(63, 101, 119, .9);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    transition: background .15s ease, transform .15s ease, opacity .2s ease;
}
.v3-btn:hover {
    background: var(--lp-steel-dark);
}
.v3-btn:active {
    transform: scale(.99);
}
.v3-btn i {
    transition: transform .15s ease;
}
.v3-btn:hover i {
    transform: translateX(3px);
}
.v3-nav[hidden],
.v3-btn[hidden] {
    display: none;
}
.v3-btn:disabled {
    cursor: wait;
}
.v3-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: v3Spin .7s linear infinite;
}
.v3-btn.is-loading .v3-spinner {
    display: inline-block;
}
.v3-btn.is-loading i,
.v3-btn.is-loading .v3-btn-label {
    display: none;
}
.v3-back {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: .25rem;
    padding: 0 0 3px;
    border: 0;
    /* One line under the arrow and the word together */
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    background: none;
    color: var(--lp-muted);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1;
}
.v3-back i {
    font-size: .8rem;
}
.v3-back:hover {
    color: var(--lp-ink);
}
.v3-back[hidden] {
    display: none;
}

/* ---------- Keyframes ---------- */
@keyframes v3Up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes v3InRight {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: none; }
}
@keyframes v3InLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: none; }
}
@keyframes v3Pop {
    0% { transform: scale(.6); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes v3Flash {
    0% { color: var(--lp-green); transform: translateY(4px); opacity: 0; }
    100% { transform: none; opacity: 1; }
}
@keyframes v3Shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
@keyframes v3Spin {
    to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .v3-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        max-width: 600px;
    }
    /* Phones and tablets open straight on the form */
    .v3-aside {
        display: none;
    }
}
@media (max-width: 575px) {
    .v3-page {
        padding: 84px 0 48px;
    }
    .v3-title {
        font-size: 1.6rem;
    }
    .v3-lead {
        font-size: .95rem;
    }
    .v3-card {
        padding: 1.5rem 1.15rem 1.25rem;
        border-radius: 22px;
    }
    .v3-q {
        font-size: 1.3rem;
    }
    .v3-sections {
        font-size: .68rem;
    }
    .v3-tile > span {
        min-height: 68px;
        padding: .8rem 2.4rem .8rem .95rem;
    }
    .v3-tile strong {
        font-size: .95rem;
    }
    .v3-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    /* Keep Back / Continue on screen on long steps */
    .v3-nav {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 1.25rem -1.15rem 0;
        padding: .75rem 1.15rem calc(.75rem + env(safe-area-inset-bottom));
        background: linear-gradient(rgba(255, 255, 255, 0), #fff 30%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .v3-page *,
    .v3-page *::before,
    .v3-page *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition: none !important;
    }
}

/* Long lists (loan purpose): shorter tiles */
.v3-tiles-compact {
    gap: .6rem;
}
.v3-tiles-compact .v3-tile > span {
    min-height: 54px;
    padding: .65rem 2.4rem .65rem .9rem;
    border-radius: 12px;
}
.v3-tiles-compact .v3-tile strong {
    font-size: .92rem;
}

/* eConsent badge under the consent text */
.v3-econsent {
    display: block;
    width: auto;
    height: 34px;
    margin: .75rem auto 0;
}
