/* Sign-in page layout: brand panel on the left, form on the right.
   White throughout, with black used only for text, the logo and buttons. */

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

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

.auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 56px;
    overflow: hidden;
    background: var(--subtle);
    border-right: 1px solid var(--border);
}

/* Faint grid that fades out towards the edges */
.auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 35%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 30% 35%, #000 10%, transparent 75%);
    pointer-events: none;
}

.auth__brand > * {
    position: relative;
}

/* Oversized mark bleeding off the corner */
.auth__brand .auth__brand-mark {
    position: absolute;
    right: -110px;
    bottom: -110px;
    opacity: 0.05;
    pointer-events: none;
}

.auth__brand-mark .logo-mark {
    width: 520px;
    height: 520px;
}

.auth__pitch {
    max-width: 460px;
}

.auth__headline {
    font-size: clamp(2rem, 3.1vw, 2.9rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.auth__lede {
    margin-top: 18px;
    color: var(--fg-muted);
    font-size: 16px;
}

.auth__areas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.auth__areas li {
    padding: 6px 12px;
    border: 1px solid var(--border-hover);
    border-radius: 999px;
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
}

.auth__legal {
    color: var(--fg-muted);
    font-size: 13px;
}

/* ---- Form side ---- */

.auth__main {
    position: relative;
    display: grid;
    place-items: center;
    padding: 88px 32px 48px;
}

.auth__tools {
    position: absolute;
    top: 24px;
    right: 24px;
}

.auth__card {
    width: 100%;
    max-width: 380px;
}

.auth__title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.auth__subtitle {
    margin-top: 8px;
    margin-bottom: 28px;
    color: var(--fg-muted);
}

.auth__card .alert {
    margin-bottom: 20px;
}

.auth__card .button--block {
    margin-top: 4px;
}

.auth__help {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--fg-muted);
    font-size: 13px;
}

/* ---- Signed-in placeholder page ---- */

.placeholder {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 88px 24px 48px;
}

.placeholder__card {
    width: 100%;
    max-width: 400px;
}

.placeholder__card .brand {
    margin-bottom: 36px;
}

.facts {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    font-size: 14px;
}

.facts > div + div {
    border-top: 1px solid var(--border);
}

.facts dt {
    color: var(--fg-muted);
}

.facts dd {
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

/* ---- Smaller screens: brand panel collapses to a header strip ---- */

@media (max-width: 900px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .auth__brand {
        padding: 16px 20px;
        background: var(--bg);
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .auth__brand::before,
    .auth__brand .auth__brand-mark,
    .auth__pitch,
    .auth__legal {
        display: none;
    }

    .auth__main {
        place-items: start center;
        padding: 40px 20px;
    }

    /* The theme switch moves up into the header strip */
    .auth .auth__tools {
        top: -54px;
        right: 16px;
    }
}

/* ---- Error pages ---- */

.error-code {
    margin-bottom: 6px;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.home-link {
    margin-bottom: 10px;
}

/* ---- Set-your-password page ---- */

.field__hint {
    color: var(--fg-muted);
    font-size: 13px;
}

.auth__signout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--fg);
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
