.auth-page {
    --auth-navy: #101c2f;
    --auth-green: #287b58;
    --auth-orange: #f26a2e;
    position: relative;
    min-height: calc(100vh - 11rem);
    padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.auth-back {
    position: absolute;
    top: 0;
    left: clamp(1rem, 4vw, 3rem);
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    color: #657083;
    font-size: 0.75rem;
    font-weight: 700;
}

.auth-back:hover,
.auth-back:focus {
    color: var(--auth-orange);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(460px, 1.1fr);
    width: min(1040px, 100%);
    min-height: 650px;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #dce1da;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(16, 28, 47, 0.14);
}

.auth-story {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 3.75rem);
    color: #fff;
    background:
        radial-gradient(circle at 15% 85%, rgba(40, 123, 88, 0.45), transparent 34%),
        linear-gradient(145deg, #14243b, #0c1728);
}

.auth-story::after {
    position: absolute;
    top: -105px;
    right: -105px;
    width: 260px;
    height: 260px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.018), 0 0 0 70px rgba(255, 255, 255, 0.012);
}

.auth-story > * {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: clamp(3rem, 8vw, 6rem);
    color: #fff;
}

.auth-brand:hover,
.auth-brand:focus {
    color: #fff;
}

.auth-brand > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    font-size: 1rem;
    box-shadow: 0 0 0 3px rgba(242, 106, 46, 0.25);
}

.auth-brand strong {
    font-size: 1rem;
    letter-spacing: -0.025em;
}

.auth-brand strong span {
    color: #ff9668;
}

.auth-eyebrow {
    margin-bottom: 0.85rem;
    color: #72c49a;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-story h1 {
    max-width: 400px;
    margin-bottom: 1.25rem;
    color: #fff;
    font-size: clamp(2.6rem, 4.3vw, 4.25rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.auth-story > div:first-child > p:last-child {
    max-width: 390px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.9rem;
    line-height: 1.7;
}

.auth-scoreboard {
    overflow: hidden;
    margin: 2.5rem 0 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
}

.scoreboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 39px;
    padding: 0 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.62rem;
    font-weight: 800;
}

.scoreboard-head small {
    color: #72c49a;
    font-size: 0.55rem;
    text-transform: uppercase;
}

.scoreboard-row {
    display: grid;
    grid-template-columns: 18px 30px 1fr 45px 25px;
    gap: 0.55rem;
    align-items: center;
    min-height: 51px;
    padding: 0 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scoreboard-row:last-child {
    border: 0;
}

.scoreboard-row.is-first {
    background: rgba(72, 180, 127, 0.08);
    box-shadow: inset 2px 0 #54b985;
}

.scoreboard-row b {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.58rem;
    text-align: center;
}

.score-avatar {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    background: #287b58;
    font-size: 0.48rem;
    font-weight: 800;
}

.score-avatar.is-orange { background: #b85c37; }
.score-avatar.is-blue { background: #4a6794; }

.scoreboard-row strong {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.62rem;
}

.scoreboard-row i {
    width: 38px;
    height: 3px;
    border-radius: 4px;
    background: linear-gradient(90deg, #62b687 70%, rgba(255, 255, 255, 0.11) 70%);
}

.scoreboard-row em {
    color: #fff;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.auth-story-foot {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
}

.auth-panel {
    display: grid;
    padding: clamp(2.5rem, 6vw, 5rem);
    place-items: center;
    background:
        linear-gradient(rgba(16, 28, 47, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 28, 47, 0.018) 1px, transparent 1px),
        #fff;
    background-size: 28px 28px;
}

.auth-panel-inner {
    width: min(390px, 100%);
}

.auth-panel .auth-eyebrow {
    color: var(--auth-green);
}

.auth-panel h2 {
    margin-bottom: 0.65rem;
    color: var(--auth-navy);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.auth-intro {
    margin-bottom: 1.8rem;
    color: #6c7685;
    font-size: 0.82rem;
    line-height: 1.6;
}

.google-button,
.email-submit {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 800;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.google-button {
    position: relative;
    color: #303b4b;
    border: 1px solid #ccd3cd;
    background: #fff;
    box-shadow: 0 4px 12px rgba(16, 28, 47, 0.04);
}

.google-button svg {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
}

.google-button:hover,
.google-button:focus {
    color: #303b4b;
    border-color: #aab4ad;
    box-shadow: 0 8px 20px rgba(16, 28, 47, 0.09);
    transform: translateY(-1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.5rem 0;
    color: #929aa4;
    font-size: 0.6rem;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    content: "";
    background: #e2e6e2;
}

.email-login .label {
    margin-bottom: 0.5rem;
    color: #374456;
    font-size: 0.68rem;
    font-weight: 800;
}

.email-login .input {
    height: 49px;
    padding-left: 2.7rem;
    border-color: #ccd3cd;
    background: #fff;
    font-size: 0.78rem;
}

.email-login .input:focus {
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(40, 123, 88, 0.1);
}

.email-login .icon {
    width: 2.7rem;
    height: 49px;
    color: #8a949f;
}

.email-login .icon svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.magic-link-note {
    margin: 0.65rem 0 1.1rem;
    color: #7d8795;
    font-size: 0.64rem;
    line-height: 1.5;
}

.captcha-wrap {
    min-height: 78px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.email-submit {
    gap: 1rem;
    color: #fff;
    border: 0;
    background: var(--auth-green);
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(40, 123, 88, 0.18);
}

.email-submit:hover,
.email-submit:focus {
    background: #216849;
    box-shadow: 0 12px 26px rgba(40, 123, 88, 0.24);
    transform: translateY(-1px);
}

.auth-security {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    margin: 1.2rem 0 0;
    color: #9098a2;
    font-size: 0.58rem;
}

.auth-security svg {
    width: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

@media screen and (max-width: 820px) {
    .auth-page {
        padding-top: 3rem;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .auth-story {
        min-height: 330px;
    }

    .auth-brand {
        margin-bottom: 3rem;
    }

    .auth-story h1 {
        font-size: clamp(2.6rem, 10vw, 4rem);
    }

    .auth-scoreboard,
    .auth-story-foot {
        display: none;
    }

    .auth-panel {
        min-height: 560px;
    }
}

@media screen and (max-width: 480px) {
    .auth-page {
        padding-right: 0;
        padding-left: 0;
    }

    .auth-back {
        left: 0;
    }

    .auth-shell {
        border-radius: 12px;
    }

    .auth-story {
        min-height: 300px;
        padding: 2rem 1.5rem;
    }

    .auth-panel {
        min-height: 0;
        padding: 3rem 1.5rem;
    }

    .captcha-wrap {
        margin-right: -0.5rem;
        transform: scale(0.93);
        transform-origin: left top;
    }
}

@media (prefers-reduced-motion: reduce) {
    .google-button,
    .email-submit {
        transition: none;
    }
}
