:root {
    --bg-top: #0b35cc;
    --bg-mid: #4576ff;
    --bg-bottom: #f5f8ff;
    --logo-frame-bg: #142b47;
    --card-white: rgba(255, 255, 255, 0.94);
    --panel-blue: linear-gradient(160deg, #0b35cc 0%, #2458ef 40%, #5b88ff 100%);
    --text-strong: #102d52;
    --text-soft: #5f7090;
    --shadow: 0 32px 80px rgba(19, 46, 107, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: var(--text-strong);
    background:
        radial-gradient(circle at top left, rgba(148, 181, 255, 0.45), transparent 30%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 36%, #dce7ff 70%, var(--bg-bottom) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
}

.landing-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 0;
}

.header-logo-frame {
    display: grid;
    place-items: center;
    width: min(100%, 18.75rem);
    padding: 1rem 30px 1rem 100px;
    background: rgba(20, 43, 71, 0.92);
    border-radius: 0 0 2rem 1rem;
    box-shadow: 0 16px 34px rgba(8, 22, 54, 0.28);
    transform: skewX(-16deg);
    transform-origin: top left;
}

.header-logo-frame .brand-logo {
    width: 108%;
    max-width: none;
    transform: skewX(16deg);
}

.header-back-link {
    margin: 0.9rem 1rem 0 0;
    background: rgba(20, 43, 71, 0.7);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 28px rgba(8, 22, 54, 0.18);
    backdrop-filter: blur(10px);
}

.page-shell-scroll {
    overflow: visible;
    overflow-x: hidden;
}

.landing-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.landing-slideshow::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at top left, rgba(148, 181, 255, 0.42), transparent 32%),
        linear-gradient(180deg, rgba(11, 53, 204, 0.82) 0%, rgba(69, 118, 255, 0.7) 36%, rgba(220, 231, 255, 0.78) 70%, rgba(245, 248, 255, 0.92) 100%);
}

.landing-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    overflow: hidden;
    animation: landing-fade 24s infinite ease-in-out;
    animation-delay: var(--slide-delay);
    will-change: opacity;
}

.landing-slide::before {
    content: '';
    position: absolute;
    inset: -12%;
    background-image: var(--slide-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: saturate(0.94) contrast(1.02) blur(10px);
    transform: translate3d(8%, 0, 0) scale(1.18);
    animation: landing-pan 24s infinite ease-in-out;
    animation-delay: var(--slide-delay);
    will-change: transform, filter;
}

.slide-one {
    --slide-image: url('images/wes1.png');
    --slide-delay: -4s;
}

.slide-two {
    --slide-image: url('images/wes2.png');
    --slide-delay: -20s;
}

.slide-three {
    --slide-image: url('images/wes3.png');
    --slide-delay: -12s;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.ambient-one {
    width: 16rem;
    height: 16rem;
    top: 8%;
    left: -4rem;
    background: rgba(141, 195, 255, 0.48);
}

.ambient-two {
    width: 22rem;
    height: 22rem;
    right: -8rem;
    bottom: -6rem;
    background: rgba(255, 255, 255, 0.62);
}

.login-layout {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(0.85rem, 2.4vh, 1.25rem);
}

.login-card {
    position: relative;
    width: min(100%, 90rem);
    border-radius: 2rem;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    animation: rise-in 0.8s ease-out;
}

.brand-panel {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 1.45rem;
    min-height: auto;
    padding: 1rem 1.15rem;
    color: #fff;
    text-align: center;
    background: transparent;
    overflow: visible;
}

.brand-panel::before,
.brand-panel::after {
    content: none;
}

.top-pulse {
    display: inline-block;
    width: 4.25rem;
    height: 0.82rem;
    border-radius: 999px;
    background: rgba(10, 28, 92, 0.35);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

.brand-logo {
    width: 100%;
    height: auto;
    display: block;
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.55rem;
    width: min(100%, 75rem);
}

.eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(3.4rem, 10vw, 6.45rem);
    line-height: 1.02;
    font-weight: 700;
}

.subtext {
    margin: 0.5rem auto 0;
    max-width: 14rem;
    font-size: 0.89rem;
    color: rgba(255, 255, 255, 0.88);
}

.form-panel {
    padding: 1.15rem 1.15rem 1.2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
}

.cta-panel {
    display: grid;
    gap: 0.82rem;
    text-align: center;
}

.cta-kicker {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: #4a68a3;
}

.cta-copy {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-soft);
}

.brand-panel .cta-kicker {
    color: rgba(255, 255, 255, 0.72);
}

.brand-panel .cta-copy {
    max-width: 54rem;
    margin: 0 auto;
    font-size: 1.5rem;
    line-height: 1.78;
    color: rgba(255, 255, 255, 0.86);
}

.brand-panel .primary-btn {
    width: min(100%, 30.75rem);
    margin: 0.35rem auto 0;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.primary-btn {
    border: none;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1947dd 0%, #3468ff 52%, #6c97ff 100%);
    box-shadow: 0 16px 28px rgba(39, 88, 234, 0.26);
}

.primary-btn:hover,
.primary-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 22px 32px rgba(39, 88, 234, 0.3);
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(28, 78, 219, 0.28);
    background: rgba(240, 245, 255, 0.95);
    color: #1c4edb;
    font-weight: 600;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.outline-btn:hover,
.outline-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(28, 78, 219, 0.48);
    box-shadow: 0 18px 32px rgba(39, 88, 234, 0.14);
}

.calculator-page {
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(148, 181, 255, 0.45), transparent 30%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 36%, rgba(20, 43, 71, 0.96) 70%, var(--logo-frame-bg) 100%);
}

.calculator-layout {
    position: relative;
    max-width: 74rem;
    margin: 0 auto;
    padding: 6.25rem 1rem 1rem;
    display: grid;
    gap: 1.25rem;
}

.calculator-hero {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 1.9rem;
    color: #fff;
    background: linear-gradient(145deg, rgba(8, 41, 150, 0.95), rgba(48, 95, 255, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 58px rgba(13, 38, 106, 0.22);
    overflow: hidden;
}

.calculator-hero::before {
    content: '';
    position: absolute;
    width: 18rem;
    height: 18rem;
    top: -9rem;
    right: -6rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
}

.hero-brand-lockup {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 600;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.back-link:hover,
.back-link:focus-visible {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.calculator-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.7rem;
    max-width: 36rem;
}

.calculator-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.08;
}

.calculator-hero-copy p:last-child {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.calculator-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
}

.calculator-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 1.3rem;
}

.quote-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 1.7rem;
    box-shadow: 0 24px 55px rgba(19, 46, 107, 0.12);
    backdrop-filter: blur(16px);
    padding: 1.3rem;
}

.calculator-panel .panel-kicker,
.calculator-panel .panel-heading h2,
.calculator-panel .panel-heading p,
.calculator-panel .input-group label {
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 2px 18px rgba(8, 22, 54, 0.42), 0 1px 2px rgba(8, 22, 54, 0.28);
}

.calculator-panel .field-error {
    color: #ffd9e2;
    text-shadow: 0 2px 14px rgba(110, 18, 47, 0.42);
}

@supports (mix-blend-mode: difference) {
    .calculator-panel .panel-kicker,
    .calculator-panel .panel-heading h2,
    .calculator-panel .panel-heading p,
    .calculator-panel .input-group label {
        color: #ffffff;
        mix-blend-mode: difference;
        text-shadow: none;
    }
}

.panel-heading {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
}

.panel-heading.compact {
    margin-bottom: 1rem;
}

.panel-kicker {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #4e6faa;
}

.panel-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.2;
    color: var(--text-strong);
}

.panel-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 0.93rem;
}

.quote-form {
    display: grid;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.field-span-full {
    grid-column: 1 / -1;
}

.input-group {
    display: grid;
    gap: 0.42rem;
}

.input-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-strong);
}

.input-group input,
.input-group select {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(86, 123, 219, 0.24);
    background: #fff;
    color: var(--text-strong);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    appearance: none;
}

.input-group input::placeholder {
    color: #8b9ab6;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: rgba(39, 88, 234, 0.7);
    box-shadow: 0 0 0 4px rgba(68, 116, 255, 0.14);
    transform: translateY(-1px);
}

.input-group.is-invalid input,
.input-group.is-invalid select {
    border-color: rgba(198, 53, 88, 0.55);
    box-shadow: 0 0 0 4px rgba(198, 53, 88, 0.1);
}

.field-error {
    min-height: 1rem;
    font-size: 0.76rem;
    color: #b32947;
}

.result-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.result-stat {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 1.2rem;
    background: linear-gradient(180deg, rgba(240, 245, 255, 0.95), rgba(227, 236, 255, 0.95));
    border: 1px solid rgba(84, 123, 220, 0.18);
}

.stat-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5470a5;
}

.stat-value {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.1;
    color: #163060;
}

.quote-block {
    display: grid;
    gap: 0.72rem;
    margin-bottom: 1rem;
}

.quote-block h3 {
    margin: 0;
    font-size: 1rem;
    color: #1a3564;
}

.quote-block > p,
.detail-grid p,
.breakdown-list p,
.risk-summary-card p,
.panel-note,
.quote-placeholder p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.detail-grid,
.breakdown-list {
    display: grid;
    gap: 0.55rem;
}

.detail-grid span,
.breakdown-list span {
    font-weight: 600;
    color: var(--text-strong);
}

.adjustment-list {
    display: grid;
    gap: 0.6rem;
}

.adjustment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: rgba(244, 247, 255, 0.95);
    color: var(--text-strong);
}

.impact-positive {
    color: #214ecf;
}

.impact-negative {
    color: #1c8a5a;
}

.risk-summary-card {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 1.2rem;
    background: linear-gradient(180deg, rgba(16, 45, 82, 0.04), rgba(65, 104, 192, 0.08));
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(31, 78, 215, 0.12);
    color: #214ecf;
    font-size: 0.82rem;
    font-weight: 700;
}

.download-form {
    margin-top: 1.15rem;
}

.panel-note {
    margin-top: 0.9rem;
    font-size: 0.84rem;
}

.quote-placeholder {
    display: grid;
    gap: 0.85rem;
    place-items: center;
    min-height: 22rem;
    padding: 1.2rem;
    text-align: center;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, rgba(243, 247, 255, 0.96), rgba(233, 240, 255, 0.96));
    border: 1px dashed rgba(88, 122, 212, 0.28);
}

.placeholder-icon {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #1846db, #5d89ff);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 20px 40px rgba(39, 88, 234, 0.2);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes landing-fade {
    0% {
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    26% {
        opacity: 1;
    }

    42% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes landing-pan {
    0% {
        filter: saturate(0.94) contrast(1.02) blur(14px);
        transform: translate3d(8%, 0, 0) scale(1.18);
    }

    8% {
        filter: saturate(0.94) contrast(1.02) blur(0);
        transform: translate3d(6%, 0, 0) scale(1.16);
    }

    26% {
        filter: saturate(0.94) contrast(1.02) blur(0);
        transform: translate3d(-1%, 0, 0) scale(1.13);
    }

    42% {
        filter: saturate(0.94) contrast(1.02) blur(10px);
        transform: translate3d(-6%, 0, 0) scale(1.12);
    }

    100% {
        filter: saturate(0.94) contrast(1.02) blur(10px);
        transform: translate3d(-6%, 0, 0) scale(1.12);
    }
}

@media (min-width: 768px) {
    .login-layout {
        padding: 1.5rem;
    }

    .login-card {
        width: min(100%, 96rem);
    }

    .brand-panel {
        padding: 1rem 1.45rem;
    }

    .hero-copy {
        width: min(100%, 81rem);
    }

    .calculator-layout {
        padding: 6.5rem 1.5rem 2rem;
    }

    .calculator-panel,
    .quote-panel {
        padding: 1.45rem;
    }
}

@media (max-height: 760px) {
    .login-layout {
        padding: 0.65rem;
    }

    .login-card {
        width: min(100%, 75rem);
    }

    .header-logo-frame {
        width: min(100%, 15rem);
        padding: 0.8rem 30px 0.8rem 100px;
    }

    .hero-copy {
        width: min(100%, 63rem);
    }

    .hero-copy h1 {
        font-size: 3.5rem;
    }

    .cta-kicker {
        font-size: 0.72rem;
    }

    .cta-copy {
        font-size: 1.4rem;
        line-height: 1.72;
    }

    .primary-btn {
        min-height: 2.85rem;
    }
}

@media (max-width: 900px) {
    .landing-header {
        align-items: flex-start;
    }

    .header-logo-frame {
        width: min(100%, 13.5rem);
        padding: 0.8rem 1rem 0.8rem 64px;
        border-radius: 0 0 1.5rem 0.8rem;
    }

    .header-logo-frame .brand-logo {
        width: 100%;
    }

    .header-back-link {
        margin: 0.75rem 0.75rem 0 0;
        min-height: 2.4rem;
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }

    .login-layout {
        padding: 5.25rem 1rem 1.25rem;
    }

    .login-card {
        width: min(100%, 34rem);
    }

    .brand-panel {
        gap: 0.95rem;
        padding: 0.5rem 0.35rem;
    }

    .hero-copy {
        width: min(100%, 24rem);
        gap: 0.95rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.1rem, 8vw, 3.1rem);
        line-height: 1.06;
    }

    .brand-panel .cta-copy {
        max-width: 20rem;
        font-size: 1rem;
        line-height: 1.6;
    }

    .brand-panel .primary-btn {
        width: min(100%, 16rem);
    }

    .calculator-layout {
        max-width: 40rem;
        padding: 7.4rem 1rem 1rem;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calculator-panel {
        padding: 0.4rem 0;
    }

    .quote-panel {
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        gap: 0.35rem;
        margin-bottom: 0.85rem;
    }

    .quote-placeholder {
        min-height: 14rem;
    }
}

@media (max-width: 640px) {
    .landing-header {
        left: 0;
        right: 0;
    }

    .header-logo-frame {
        width: min(100%, 11.75rem);
        padding: 0.75rem 0.9rem 0.75rem 52px;
        border-radius: 0 0 1.15rem 0.65rem;
    }

    .hero-copy {
        width: min(100%, 20.5rem);
        gap: 0.85rem;
    }

    .hero-copy h1 {
        font-size: clamp(1.95rem, 10vw, 2.65rem);
        line-height: 1.08;
    }

    .brand-panel .cta-copy {
        max-width: 18rem;
        font-size: 0.96rem;
        line-height: 1.56;
    }

    .brand-panel .primary-btn {
        width: min(100%, 14.75rem);
        min-height: 2.95rem;
    }

    .calculator-layout {
        max-width: 100%;
        padding: 6.9rem 0.75rem 0.75rem;
    }

    .calculator-panel,
    .quote-panel {
        padding: 0.9rem;
        border-radius: 1.2rem;
    }

    .header-back-link {
        margin: 0.65rem 0.65rem 0 0;
        min-height: 2.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }

    .form-grid,
    .result-stat-grid {
        grid-template-columns: 1fr;
    }

    .input-group input,
    .input-group select {
        min-height: 2.85rem;
        padding: 0.78rem 0.85rem;
    }

    .result-stat {
        padding: 0.9rem;
    }

    .adjustment-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-slide {
        animation: none !important;
        opacity: 0;
    }

    .landing-slide::before {
        animation: none !important;
        filter: saturate(0.94) contrast(1.02) blur(0);
        transform: scale(1.08);
    }

    .slide-one {
        opacity: 1;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}