:root {
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --auth-blue: #263dff;
    --auth-blue-hover: #1730ed;
    --auth-black: #0b0b0d;
    --auth-paper: #f4f5f8;
    --auth-white: #ffffff;
    --auth-muted: #666978;
    --auth-border: #dfe1e9;
    --auth-border-strong: #b9bdca;
    --auth-danger: #b42318;
    --auth-danger-soft: #fff1f0;
    --auth-blue-soft: #eef0ff;
    --auth-primary: var(--auth-blue);
    --auth-primary-hover: var(--auth-blue-hover);
    --auth-primary-focus: rgb(38 61 255 / 15%);
    --auth-background: var(--auth-paper);
    --auth-surface: var(--auth-white);
}

.auth-theme--branded {
    --auth-primary-hover: color-mix(in srgb, var(--auth-primary) 88%, black);
    --auth-primary-focus: color-mix(in srgb, var(--auth-primary) 18%, transparent);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--auth-background);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--auth-black);
    background: var(--auth-background);
    font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: var(--auth-primary);
    font-weight: 700;
    text-underline-offset: .2em;
}

a:hover {
    text-decoration-thickness: .12em;
}

:focus-visible {
    outline: 3px solid var(--auth-primary);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: .75rem;
    left: .75rem;
    padding: .65rem 1rem;
    color: var(--auth-white);
    background: var(--auth-black);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

.auth-shell {
    display: grid;
    width: min(100%, 60rem);
    min-height: 100vh;
    min-height: 100dvh;
    align-content: center;
    justify-items: center;
    gap: clamp(1.5rem, 4vh, 2.25rem);
    margin-inline: auto;
    padding: clamp(2rem, 7vh, 4.5rem) 1.25rem;
}

.auth-brand img {
    display: block;
    width: clamp(13.5rem, 24vw, 17rem);
    height: auto;
}

.auth-brand--client img {
    width: auto;
    max-width: min(15rem, 70vw);
    height: auto;
    max-height: 6.5rem;
    object-fit: contain;
}

.auth-card {
    width: min(100%, 29rem);
    padding: clamp(1.5rem, 5vw, 2.25rem);
    border: 1px solid var(--auth-border);
    border-radius: 1.5rem;
    background: var(--auth-surface);
    box-shadow: 0 1rem 2.75rem rgb(11 11 13 / 6%);
}

.auth-card--wide {
    width: min(100%, 52rem);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.08;
    letter-spacing: -.035em;
}

h1,
.step-title {
    margin-bottom: .75rem;
    font-size: clamp(1.75rem, 7vw, 2.15rem);
}

h2 {
    font-size: 1.25rem;
}

.auth-intro,
.selected-email,
.auth-muted {
    color: var(--auth-muted);
}

.auth-intro {
    margin-bottom: 1.75rem;
}

.selected-email {
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
}

.field {
    display: grid;
    gap: .5rem;
    margin-bottom: 1.15rem;
}

label {
    font-size: .9rem;
    font-weight: 750;
}

input {
    width: 100%;
    min-height: 3.4rem;
    padding: .85rem 1rem;
    border: 1px solid var(--auth-border-strong);
    border-radius: .875rem;
    color: var(--auth-black);
    background: var(--auth-white);
    transition: border-color .16s ease, box-shadow .16s ease;
}

input:hover {
    border-color: #8f94a3;
}

input:focus {
    border-color: var(--auth-primary);
    outline: 0;
    box-shadow: 0 0 0 3px var(--auth-primary-focus);
}

input:active {
    border-color: var(--auth-primary);
}

input:focus-visible {
    outline: 0;
}

.button,
button.button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    padding: .8rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--auth-white);
    background: var(--auth-primary);
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s ease;
}

.button:hover,
button.button:hover {
    color: var(--auth-white);
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
}

.button--full {
    width: 100%;
}

.button--secondary,
button.button--secondary {
    border-color: var(--auth-border);
    color: var(--auth-black);
    background: var(--auth-white);
}

.button--secondary:hover,
button.button--secondary:hover {
    color: var(--auth-black);
    background: var(--auth-paper);
}

.text-button {
    padding: 0;
    border: 0;
    color: var(--auth-primary);
    background: transparent;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.back-button {
    display: inline-flex;
    align-items: center;
    margin: 0 0 1.35rem;
    color: var(--auth-black);
    font-size: .9rem;
}

.form-footer,
.auth-footer-link {
    margin: 1.35rem 0 0;
    text-align: center;
}

.form-footer {
    display: grid;
    gap: .75rem;
}

.validation-summary,
.field-error,
.validation {
    color: var(--auth-danger);
}

.validation-summary:not(:empty) {
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid #f2bbb6;
    border-radius: .875rem;
    background: var(--auth-danger-soft);
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.15rem;
}

.field-error,
.validation {
    font-size: .875rem;
}

.notice {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--auth-blue);
    border-radius: 0 .875rem .875rem 0;
    color: #3f4350;
    background: var(--auth-blue-soft);
}

.notice--danger {
    border-left-color: var(--auth-danger);
    background: var(--auth-danger-soft);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 6.5rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .85rem;
    padding: .35rem;
    border: 0;
    color: var(--auth-primary);
    background: transparent;
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
    transform: translateY(-50%);
}

.continue-button {
    display: none;
}

.js .continue-button {
    display: inline-flex;
}

.js .login-step[hidden] {
    display: none;
}

.js .login-step.is-entering {
    animation: step-in 160ms ease-out;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.account-nav,
.sessions {
    display: grid;
    gap: .8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-nav a,
.account-nav .logout-button {
    display: flex;
    width: 100%;
    min-height: 3.5rem;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1rem;
    border: 1px solid var(--auth-border);
    border-radius: .875rem;
    color: var(--auth-black);
    background: var(--auth-paper);
    font: inherit;
    font-weight: 750;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-nav a::after {
    color: var(--auth-blue);
    content: "\2192";
}

.account-nav a:hover,
.account-nav .logout-button:hover {
    border-color: var(--auth-blue);
    background: var(--auth-blue-soft);
}

.logout-form {
    margin: 0;
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-header .auth-intro {
    margin-bottom: 0;
}

.page-kicker {
    margin-bottom: .75rem;
    color: var(--auth-blue);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.session-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}

.session-card {
    padding: 1.15rem;
    border: 1px solid var(--auth-border);
    border-radius: 1rem;
    background: var(--auth-paper);
}

.session-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1rem;
}

.session-heading h2 {
    margin: 0;
}

.badge {
    display: inline-flex;
    min-height: 1.7rem;
    align-items: center;
    padding: .25rem .6rem;
    border-radius: 999px;
    color: var(--auth-blue);
    background: var(--auth-blue-soft);
    font-size: .75rem;
    font-weight: 800;
}

dl {
    display: grid;
    grid-template-columns: minmax(9rem, .8fr) minmax(0, 1.2fr);
    gap: .55rem 1rem;
    margin: 0;
}

dt {
    color: var(--auth-muted);
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.session-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.auth-powered-by {
    position: fixed;
    z-index: 1;
    bottom: 1.25rem;
    left: 1.5rem;
}

.auth-powered-by img {
    display: block;
    width: 7rem;
    height: auto;
}

@keyframes step-in {
    from {
        opacity: 0;
        transform: translateY(.3rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 36rem) {
    .auth-shell {
        align-content: start;
        gap: 1.5rem;
        padding: 2rem .9rem;
    }

    .auth-brand img {
        width: 13.5rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: 1.25rem;
    }

    dl {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    dd {
        margin-bottom: .5rem;
    }

    .page-actions .button,
    .session-toolbar .button {
        width: 100%;
    }
}

@media (max-width: 60rem), (max-height: 45rem) {
    .auth-theme--branded body {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .auth-theme--branded .auth-shell {
        min-height: 0;
    }

    .auth-powered-by {
        position: static;
        margin: 0 0 1.25rem 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
