:root {
    --account-ink: #201a13;
    --account-muted: #6c6257;
    --account-line: #e8ded1;
    --account-gold: #ffcc33;
    --account-maroon: #7a0019;
    --account-paper: #fffaf2;
    --account-danger: #9d2437;
}

* { box-sizing: border-box; }

body.account-recovery-page {
    margin: 0;
    min-height: 100vh;
    color: var(--account-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 5% 5%, rgba(255, 204, 51, .22), transparent 28rem),
        radial-gradient(circle at 96% 8%, rgba(122, 0, 25, .08), transparent 28rem),
        repeating-linear-gradient(90deg, rgba(32, 26, 19, .02) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(180deg, rgba(32, 26, 19, .014) 0 1px, transparent 1px 72px),
        var(--account-paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.account-recovery-shell {
    display: grid;
    justify-items: center;
    align-content: center;
    width: min(100% - 32px, 1040px);
    min-height: calc(100vh - 104px);
    margin: 0 auto;
    padding: 44px 0 72px;
}

.account-recovery-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 520px);
    padding: 36px;
    border: 1px solid rgba(32, 26, 19, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 24px 70px rgba(32, 26, 19, .13);
}

.account-recovery-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--account-maroon), #b30b31 60%, var(--account-gold));
}

.account-recovery-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 15px;
    color: var(--account-maroon);
    background: #fff2c6;
}

.account-recovery-icon svg,
.account-security-note svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-recovery-kicker {
    margin: 0 0 9px;
    color: var(--account-maroon);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.account-recovery-card h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 40px);
    line-height: 1.06;
    letter-spacing: -.045em;
}

.account-recovery-intro {
    margin: 13px 0 26px;
    color: var(--account-muted);
    font-size: 15px;
    line-height: 1.6;
}

.account-recovery-form { margin: 0; }
.account-form-field { margin-bottom: 17px; }

.account-form-field label {
    display: block;
    margin-bottom: 8px;
    color: #3b312a;
    font-size: 13px;
    font-weight: 800;
}

.account-form-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid var(--account-line);
    border-radius: 12px;
    color: var(--account-ink);
    background: #fff;
    font: inherit;
    font-size: 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.account-form-field input:focus {
    border-color: var(--account-maroon);
    outline: none;
    box-shadow: 0 0 0 4px rgba(122, 0, 25, .11);
}

.account-form-field.has-error input { border-color: var(--account-danger); }

.account-form-errors,
.account-field-errors,
.account-recovery-message {
    padding: 11px 13px;
    border: 1px solid rgba(157, 36, 55, .2);
    border-radius: 10px;
    color: var(--account-danger);
    background: rgba(157, 36, 55, .07);
    font-size: 13px;
    line-height: 1.45;
}

.account-form-errors { margin: 0 0 16px; }
.account-field-errors { margin-top: 7px; }
.account-recovery-message { margin: 0 0 18px; }
.account-form-errors p,
.account-field-errors p,
.account-recovery-message p { margin: 0; }

.account-form-help {
    margin-top: 7px;
    color: var(--account-muted);
    font-size: 12px;
    line-height: 1.5;
}

.account-form-help ul { margin: 7px 0 0; padding-left: 19px; }

.account-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid var(--account-maroon);
    border-radius: 12px;
    color: #fff;
    background: var(--account-maroon);
    box-shadow: 0 10px 20px rgba(122, 0, 25, .17);
    font: inherit;
    font-size: 15px;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.account-primary-button:hover {
    background: #920222;
    box-shadow: 0 14px 28px rgba(122, 0, 25, .22);
    transform: translateY(-1px);
}

.account-primary-button:focus-visible,
.account-recovery-switch a:focus-visible {
    outline: 3px solid rgba(122, 0, 25, .23);
    outline-offset: 3px;
}

.account-security-note {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 18px;
    padding: 13px;
    border-radius: 12px;
    color: #5f543f;
    background: #fff8df;
}

.account-security-note svg { width: 20px; height: 20px; color: #806000; }
.account-security-note p { margin: 0; font-size: 12px; line-height: 1.5; }

.account-recovery-switch {
    margin: 20px 0 0;
    color: var(--account-muted);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.account-recovery-switch a {
    color: var(--account-maroon);
    font-weight: 850;
    text-decoration: none;
}

.account-next-steps {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.account-next-steps li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
}

.account-next-steps li > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: #604500;
    background: #fff0b5;
    font-size: 12px;
    font-weight: 900;
}

.account-next-steps p { margin: 0; color: var(--account-muted); font-size: 13px; line-height: 1.45; }
.account-next-steps strong { display: block; margin-bottom: 2px; color: var(--account-ink); }

.account-recovery-help {
    margin: 18px 0 0;
    color: var(--account-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 760px) {
    body.account-recovery-page .mobile-tab-bar,
    body.account-recovery-page .mobile-explore-tray { display: none !important; }

    .account-recovery-shell {
        align-content: start;
        width: 100%;
        min-height: calc(100dvh - 64px);
        padding: 28px 20px calc(38px + env(safe-area-inset-bottom));
    }

    .account-recovery-card {
        padding: 29px 21px 24px;
        border-radius: 24px;
        box-shadow: 0 18px 38px rgba(72, 48, 25, .11);
    }

    .account-recovery-icon { width: 44px; height: 44px; margin-bottom: 17px; border-radius: 14px; }
    .account-recovery-card h1 { font-size: clamp(29px, 9vw, 36px); }
    .account-recovery-intro { margin-bottom: 23px; font-size: 14px; }
    .account-form-field input,
    .account-primary-button { min-height: 52px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .account-primary-button,
    .account-form-field input { transition: none; }
}
