/* Sign in, create account and verify (views/auth/*): a split layout without the
   site header and footer. The form comes first; the brand panel sits beside it on
   wide screens and under it on narrow ones (left out on /verify there, so the code
   field stays the only thing on screen). */

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Form column ----------------------------------------------------------- */

.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(20px, 2.6vw, 32px) clamp(20px, 5vw, 72px) clamp(32px, 5vw, 64px);
}

.auth-bar {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.auth-logo {
    display: inline-flex;
    padding: 6px 0;
}

.auth-logo img {
    width: auto;
    height: 32px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding-top: clamp(32px, 6vh, 64px);
}

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: clamp(28px, 4.5vh, 44px);
    padding: 4px;
    border-radius: var(--radius-sm, 4px);
    background: var(--surface-2);
}

.auth-switch a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm, 4px);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-switch a:hover {
    color: var(--text);
}

.auth-switch a[aria-current="page"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
}

.auth-title {
    font-family: var(--font-display);
    font-size: clamp(2.375rem, 2rem + 1.4vw, 3.25rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.auth-lede {
    margin-top: 12px;
    color: var(--text-2);
    line-height: 1.55;
    text-wrap: pretty;
}

.auth-email {
    color: var(--text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.auth-change {
    margin-top: 6px;
    font-size: 0.9375rem;
}

.auth-change a,
.auth-linkbtn {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 3px;
}

.auth-change a:hover,
.auth-linkbtn:hover {
    text-decoration-color: currentColor;
}

.auth-card .alert {
    margin-top: 24px;
}

.auth-card .alert[hidden] {
    display: none;
}

.auth-card .alert .icon {
    margin-top: 3px;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-form .alert {
    margin-top: 0;
}

.auth-form .btn {
    margin-top: 6px;
}

.auth-form .otp-input {
    min-height: 64px;
    font-size: 1.75rem;
}

.auth-turnstile {
    min-height: 65px;
}

.auth-resend {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--text-2);
    font-size: 0.875rem;
    line-height: 1.55;
}

.auth-linkbtn {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-linkbtn.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* Brand panel ----------------------------------------------------------- */

.auth-aside {
    position: sticky;
    top: 12px;
    align-self: start;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    min-height: 560px;
    margin: 12px 12px 12px 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--ink);
    color: var(--on-ink);
}

.auth-aside__media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.auth-aside__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% 100%;
}

.auth-aside__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--ink) 0%, rgba(11, 11, 12, 0.9) 28%, rgba(11, 11, 12, 0.5) 46%, rgba(11, 11, 12, 0) 64%),
        linear-gradient(0deg, rgba(11, 11, 12, 0.45) 0%, rgba(11, 11, 12, 0) 22%);
}

.auth-aside__body {
    max-width: 560px;
    padding: clamp(28px, 3.6vw, 56px);
}

.auth-aside__title {
    margin: 16px 0 24px;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 1.5rem + 2.2vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.auth-aside__title em {
    font-style: italic;
    color: var(--brand-on-ink);
}

.auth-points {
    display: grid;
    gap: 12px;
    max-width: 440px;
    list-style: none;
}

.auth-points li {
    position: relative;
    padding-left: 30px;
    color: var(--on-ink-2);
    font-size: 0.9375rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.auth-points li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 6px;
    width: 12px;
    height: 7px;
    border-left: 2.5px solid var(--brand);
    border-bottom: 2.5px solid var(--brand);
    transform: rotate(-45deg);
}

.auth-points strong {
    color: var(--on-ink);
    font-weight: 600;
}

/* Narrow screens: one column, the panel follows the form ----------------- */

@media (max-width: 960px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .auth-main {
        padding-bottom: 40px;
    }

    .auth-card {
        margin: 0 auto;
        padding-top: 36px;
    }

    .auth-aside {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
        margin: 0 12px 12px;
        border-radius: var(--radius-lg);
    }

    .auth-aside--quiet {
        display: none;
    }

    .auth-aside__media {
        position: relative;
        inset: auto;
        z-index: 0;
        height: clamp(180px, 46vw, 320px);
        margin-bottom: -44px;
    }

    .auth-aside__media::after {
        background: linear-gradient(0deg, var(--ink) 0%, rgba(11, 11, 12, 0.55) 40%, rgba(11, 11, 12, 0) 75%);
    }

    .auth-aside__body {
        position: relative;
        z-index: 1;
        max-width: 620px;
        padding: 0 24px 28px;
    }

    .auth-aside__title {
        margin: 12px 0 22px;
        font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem);
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding-inline: 16px;
    }

    .auth-card {
        padding-top: 28px;
    }

    .auth-aside {
        margin-inline: 8px;
    }

    .auth-aside__body {
        padding-inline: 20px;
    }
}
