:root {
    color-scheme: dark;
    --auth-background: #111214;
    --auth-panel: #202226;
    --auth-panel-soft: #282a2f;
    --auth-text: #f4f1e9;
    --auth-muted: #b4b0a8;
    --auth-border: rgba(255, 255, 255, 0.14);
    --auth-accent: #f0c779;
    --auth-accent-strong: #ffd88c;
    --auth-error: #ffb4a6;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(240, 199, 121, 0.12), transparent 34rem),
        radial-gradient(circle at 88% 82%, rgba(88, 112, 155, 0.16), transparent 38rem),
        var(--auth-background);
    color: var(--auth-text);
}

button,
input {
    font: inherit;
}

.auth-page {
    width: min(1100px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: clamp(34px, 8vw, 108px);
    padding: 52px 0;
}

.auth-introduction {
    max-width: 520px;
}

.auth-eyebrow,
.auth-step {
    margin: 0 0 10px;
    color: var(--auth-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-introduction h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 8vw, 6.4rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.auth-tagline {
    max-width: 390px;
    margin: 24px 0 0;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.35;
}

.auth-privacy-note {
    max-width: 460px;
    margin: 20px 0 0;
    color: var(--auth-muted);
    line-height: 1.65;
}

.auth-card {
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    padding: clamp(24px, 5vw, 42px);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 32%),
        var(--auth-panel);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 30px;
    padding: 5px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.14);
}

.auth-tab {
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--auth-muted);
    font-size: 0.9rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.auth-tab:hover,
.auth-tab:focus-visible {
    color: var(--auth-text);
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.auth-tab.is-active {
    background: var(--auth-text);
    color: #171719;
}

.auth-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.auth-heading > p:last-child {
    margin: 12px 0 0;
    color: var(--auth-muted);
    line-height: 1.55;
}

.auth-error {
    margin: 20px 0 0;
    border: 1px solid rgba(255, 180, 166, 0.35);
    border-radius: 13px;
    padding: 12px 14px;
    background: rgba(255, 180, 166, 0.08);
    color: var(--auth-error);
    line-height: 1.45;
}

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

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field > span,
.auth-preference legend {
    color: var(--auth-text);
    font-size: 0.88rem;
    font-weight: 760;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    padding: 11px 13px;
    background: rgba(0, 0, 0, 0.16);
    color: var(--auth-text);
}

.auth-field input:focus-visible,
.auth-preference-range:focus-visible {
    border-color: var(--auth-accent);
    outline: 2px solid rgba(240, 199, 121, 0.3);
    outline-offset: 2px;
}

.auth-field-help {
    margin: -12px 0 0;
    color: var(--auth-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-preference {
    min-width: 0;
    margin: 2px 0 0;
    border: 1px solid var(--auth-border);
    border-radius: 17px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.auth-preference > p {
    margin: 8px 0 18px;
    color: var(--auth-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.auth-preference-boundaries {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.auth-preference-range {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 24px;
    margin: 14px 0 8px;
    background: transparent;
    cursor: pointer;
}

.auth-preference-range::-webkit-slider-runnable-track {
    height: 5px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-preference-range::-moz-range-track {
    height: 5px;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-preference-range::-moz-range-progress {
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: transparent;
}

.auth-preference-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: 2px solid #171719;
    border-radius: 50%;
    background: var(--auth-accent);
}

.auth-preference-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid #171719;
    border-radius: 50%;
    background: var(--auth-accent);
}

.auth-preference-value {
    display: block;
    min-height: 24px;
    color: var(--auth-accent-strong);
    font-weight: 800;
    text-align: center;
}

.auth-submit {
    min-height: 50px;
    border: 1px solid var(--auth-text);
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--auth-text);
    color: #171719;
    font-weight: 820;
    cursor: pointer;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    filter: brightness(1.08);
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

.auth-security-note {
    margin: 22px 0 0;
    color: var(--auth-muted);
    font-size: 0.76rem;
    line-height: 1.45;
    text-align: center;
}

.auth-access-message {
    margin: 20px 0 0;
    color: var(--auth-text);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.auth-access-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 24px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-access-links a {
    color: var(--auth-accent);
    text-underline-offset: 3px;
}

.auth-access-links a:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: none;
}

.auth-recovery-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 2px;
    color: var(--auth-accent);
    font-size: 0.86rem;
    font-weight: 700;
    text-underline-offset: 3px;
}

.auth-form > .auth-recovery-link {
    justify-self: end;
    margin-top: -12px;
}

.auth-recovery-link:hover,
.auth-recovery-link:focus-visible {
    color: var(--auth-accent-strong);
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.auth-recovery-message {
    margin: 20px 0 0;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    padding: 12px 14px;
    color: var(--auth-text);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.auth-recovery-help {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 20px 0 0;
    color: var(--auth-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .auth-page {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 34px 0;
    }

    .auth-introduction {
        text-align: center;
        margin: 0 auto;
    }

    .auth-tagline,
    .auth-privacy-note {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 520px) {
    .auth-page {
        width: min(100% - 20px, 1100px);
    }

    .auth-card {
        border-radius: 21px;
        padding: 22px 18px;
    }
}

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