/* Keep the two authentication panels consistent across sign-in, signup and recovery. */
:root {
    --auth-shell-width: 1280px;
    --auth-shell-min-height: 700px;
    --auth-story-share: minmax(0, 1.2fr);
    --auth-form-share: minmax(0, 1fr);
}

.login-shell,
.signup-shell,
.auth {
    width: min(var(--auth-shell-width), 100%);
    max-width: none;
    min-height: var(--auth-shell-min-height);
    grid-template-columns: var(--auth-story-share) var(--auth-form-share);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 26px;
    background: var(--color-surface);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .12);
}

.auth > .hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
}

.auth > .hero > :not(.accent-ring) {
    position: relative;
    z-index: 1;
}

.auth > .hero::before,
.auth > .hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.auth > .hero::before {
    width: 390px;
    height: 390px;
    top: -180px;
    right: -92px;
    background: rgba(37, 99, 235, .10);
}

.auth > .hero::after {
    width: 270px;
    height: 270px;
    left: -95px;
    bottom: -108px;
    background: rgba(20, 61, 120, .08);
}

.auth > .hero .accent-ring {
    position: absolute;
    z-index: 0;
    width: 180px;
    height: 180px;
    right: 13%;
    bottom: 9%;
    border: 18px solid rgba(37, 99, 235, .09);
    border-radius: 50%;
    pointer-events: none;
}

.auth > .hero .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

.auth > .hero .point i {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: var(--color-brand-primary);
    color: #fff;
    font-size: 14px;
}

.signup-shell .brand-logo {
    width: 230px;
    max-width: 100%;
    height: auto;
    flex: none;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.signup-shell .brand-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.story-panel,
.auth > .hero {
    padding: clamp(36px, 4.5vw, 58px);
    background:
        linear-gradient(rgba(148, 163, 184, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px),
        var(--gradient-auth-story);
    background-size: 34px 34px, 34px 34px, auto;
}

.form-panel,
.auth > .card {
    padding: clamp(34px, 4vw, 52px);
    background: var(--color-surface);
}

@media (min-width: 821px) {
    .login-shell,
    .signup-shell,
    .auth {
        height: 700px;
        min-height: 0;
    }

    .form-panel,
    .auth > .card {
        min-height: 0;
        overflow-y: auto;
    }

    .form-panel {
        display: flex;
        flex-direction: column;
        justify-content: safe center;
    }
}

@media (max-width: 1020px) and (min-width: 821px) {
    .login-shell,
    .signup-shell,
    .auth {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr);
    }

    .auth > .hero .points { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .page,
    body.auth-page {
        min-height: 100svh;
        padding: 0;
        display: block;
        background: var(--color-surface);
    }

    .login-shell,
    .signup-shell,
    .auth {
        width: 100%;
        min-height: 100svh;
        display: block;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .story-panel,
    .auth > .hero {
        display: flex;
        min-height: auto;
        padding: max(26px, env(safe-area-inset-top)) 24px 28px;
    }

    .auth > .hero .brand { margin-bottom: 28px; }
    .auth > .hero h1 { font-size: clamp(34px, 8.5vw, 48px); }
    .auth > .hero p { margin-top: 15px; font-size: 14px; line-height: 1.6; }
    .auth > .hero .points { display: none; }
    .auth > .hero .accent-ring { display: none; }

    .form-panel,
    .auth > .card {
        min-height: auto;
        padding: 34px 24px max(28px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 540px) {
    .form-panel,
    .auth > .card { padding-inline: 20px; }

    .signup-shell .brand-logo { width: 180px; }
}

/* The wordmark links every authentication screen to the landing page. */
.login-shell .brand,
.signup-shell .brand,
.auth .brand { text-decoration: none; color: inherit; }

/* Keep sign-in options aligned with the email and password controls. */
.login-card .social-login {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 16px;
}
.login-card .social-login > a { margin-top: 0 !important; min-width: 0; white-space: nowrap; }
.login-card .social-login > a svg { flex-shrink: 0; }
.login-card .social-login > a:only-of-type { grid-column: 1 / -1; }
.login-card .social-login > div:last-child { grid-column: 1 / -1; margin: 0 0 12px !important; }
.login-card .passkey-login { width: 100%; margin: 16px 0; }
.login-card [data-passkey-login-message]:empty { display: none; }
