:root {
    --ri-reset-bg: #f7f9fd;
    --ri-reset-surface: #ffffff;
    --ri-reset-primary: #2563eb;
    --ri-reset-primary-dark: #1d4ed8;
    --ri-reset-navy: #0f2a5f;
    --ri-reset-text: #132441;
    --ri-reset-muted: #556183;
    --ri-reset-muted-light: #8491a8;
    --ri-reset-border: #d7e2f1;
    --ri-reset-success: #16824b;
    --ri-reset-danger: #c73545;
    --ri-reset-focus: rgba(37, 99, 235, 0.16);
    --ri-reset-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ri-reset-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ri-reset-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.ri-reset-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--ri-reset-bg);
    color: var(--ri-reset-text);
    font-family: var(--ri-reset-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.ri-reset-skip {
    position: fixed;
    z-index: 30;
    top: 14px;
    left: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: var(--ri-reset-primary-dark);
    box-shadow: 0 10px 30px rgba(15, 42, 95, 0.2);
    transform: translateY(-180%);
    transition: transform 0.18s ease;
}

.ri-reset-skip:focus {
    transform: translateY(0);
}

.ri-reset-shell {
    display: grid;
    grid-template-columns: minmax(520px, 1.07fr) minmax(500px, 0.93fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.ri-reset-visual {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(34px, 4vw, 62px);
    color: #fff;
    background:
        radial-gradient(circle at 88% 9%, rgba(96, 165, 250, 0.42), transparent 33%),
        radial-gradient(circle at 4% 92%, rgba(8, 145, 178, 0.2), transparent 34%),
        linear-gradient(145deg, #0f2a5f 0%, #1748a5 48%, #2563eb 100%);
}

.ri-reset-visual::before {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 88% 78% at 50% 42%, #000 18%, transparent 90%);
    mask-image: radial-gradient(ellipse 88% 78% at 50% 42%, #000 18%, transparent 90%);
}

.ri-reset-visual::after {
    position: absolute;
    right: -190px;
    bottom: -210px;
    width: 440px;
    height: 440px;
    content: '';
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow:
        0 0 0 54px rgba(255, 255, 255, 0.035),
        0 0 0 108px rgba(255, 255, 255, 0.025);
}

.ri-reset-brand,
.ri-reset-visual-content,
.ri-reset-visual-footer {
    position: relative;
    z-index: 1;
}

.ri-reset-brand {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 36px rgba(4, 25, 69, 0.18);
}

.ri-reset-brand img {
    display: block;
    width: auto;
    height: 38px;
}

.ri-reset-visual-content {
    width: min(100%, 620px);
    margin: auto 0;
    padding: clamp(52px, 8vh, 90px) 0;
}

.ri-reset-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--ri-reset-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ri-reset-kicker::before {
    width: 24px;
    height: 1px;
    content: '';
    background: rgba(255, 255, 255, 0.72);
}

.ri-reset-visual h1 {
    max-width: 600px;
    margin: 0;
    color: #fff;
    font-family: var(--ri-reset-display);
    font-size: clamp(42px, 4.7vw, 68px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.ri-reset-visual h1 span {
    color: #cfe0ff;
}

.ri-reset-visual-content > p {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(15px, 1.3vw, 18px);
    line-height: 1.75;
}

.ri-reset-benefits {
    display: grid;
    gap: 14px;
    max-width: 575px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.ri-reset-benefits li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 14px;
}

.ri-reset-benefits li > span {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.ri-reset-benefits svg {
    width: 14px;
    height: 14px;
}

.ri-reset-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 42px;
}

.ri-reset-flow-node {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.91);
    font-family: var(--ri-reset-mono);
    font-size: 11px;
}

.ri-reset-flow-node > span {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(8px);
}

.ri-reset-flow-node svg {
    width: 18px;
    height: 18px;
}

.ri-reset-flow > i {
    width: clamp(24px, 3.6vw, 58px);
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.8));
}

.ri-reset-visual-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.58);
    font-family: var(--ri-reset-mono);
    font-size: 11px;
}

.ri-reset-visual-footer strong {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 500;
}

.ri-reset-form-side {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    overflow-y: auto;
    padding: clamp(28px, 4vw, 58px) clamp(34px, 6vw, 88px);
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.075), transparent 30%),
        var(--ri-reset-surface);
}

.ri-reset-mobile-header {
    display: none;
}

.ri-reset-form-wrap {
    width: min(100%, 470px);
    margin: auto;
    padding: 40px 0;
    scroll-margin-top: 20px;
}

.ri-reset-eyebrow {
    margin: 0 0 11px;
    color: var(--ri-reset-primary);
    font-family: var(--ri-reset-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.ri-reset-form-wrap > h1 {
    margin: 0;
    color: var(--ri-reset-navy);
    font-family: var(--ri-reset-display);
    font-size: clamp(34px, 3.2vw, 46px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.ri-reset-description {
    margin: 15px 0 0;
    color: var(--ri-reset-muted);
    font-size: 15px;
    line-height: 1.72;
}

.ri-reset-success,
.ri-reset-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 25px;
    padding: 15px 16px;
    border-radius: 13px;
    font-size: 13px;
}

.ri-reset-success {
    border: 1px solid #b9e2c9;
    background: #f1fbf5;
    color: #176b3b;
}

.ri-reset-alert {
    border: 1px solid #efbcc2;
    background: #fff4f5;
    color: #982d39;
}

.ri-reset-success > span,
.ri-reset-alert > span {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
}

.ri-reset-success svg,
.ri-reset-alert svg {
    width: 17px;
    height: 17px;
}

.ri-reset-success strong,
.ri-reset-alert strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--ri-reset-display);
    font-size: 14px;
}

.ri-reset-success p,
.ri-reset-alert p {
    margin: 0;
    line-height: 1.58;
}

.ri-reset-form {
    margin-top: 28px;
}

.ri-reset-field label {
    display: block;
    margin-bottom: 9px;
    color: var(--ri-reset-navy);
    font-size: 13px;
    font-weight: 600;
}

.ri-reset-input-wrap {
    position: relative;
}

.ri-reset-input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 20px;
    height: 20px;
    color: #8494ad;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color 0.18s ease;
}

.ri-reset-input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 17px 0 49px;
    border: 1px solid var(--ri-reset-border);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--ri-reset-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ri-reset-input::placeholder {
    color: #9aa6ba;
}

.ri-reset-input:hover {
    border-color: #b9c9df;
}

.ri-reset-input:focus {
    border-color: var(--ri-reset-primary);
    box-shadow: 0 0 0 4px var(--ri-reset-focus);
}

.ri-reset-input:focus + .ri-reset-input-icon,
.ri-reset-input-wrap:focus-within .ri-reset-input-icon {
    color: var(--ri-reset-primary);
}

.ri-reset-input.is-invalid,
.ri-reset-input[aria-invalid='true'] {
    border-color: var(--ri-reset-danger);
}

.ri-reset-helper,
.ri-reset-invalid {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.ri-reset-helper {
    color: var(--ri-reset-muted-light);
}

.ri-reset-invalid {
    color: var(--ri-reset-danger);
}

.ri-reset-button {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 13px 20px;
    border: 1px solid var(--ri-reset-primary);
    border-radius: 12px;
    background: var(--ri-reset-primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
    font-weight: 600;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ri-reset-button:hover:not(:disabled) {
    border-color: var(--ri-reset-primary-dark);
    background: var(--ri-reset-primary-dark);
    box-shadow: 0 14px 30px rgba(29, 78, 216, 0.24);
    transform: translateY(-1px);
}

.ri-reset-button:focus-visible,
.ri-reset-back:focus-visible,
.ri-reset-register a:focus-visible,
.ri-reset-legal a:focus-visible,
.ri-reset-mobile-header a:focus-visible,
.ri-reset-brand:focus-visible {
    outline: 4px solid var(--ri-reset-focus);
    outline-offset: 3px;
}

.ri-reset-button:disabled {
    border-color: #cad6e6;
    background: #e8eef7;
    color: #7e8ca2;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ri-reset-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ri-reset-spin 0.7s linear infinite;
}

.ri-reset-button.is-loading .ri-reset-spinner {
    display: inline-block;
}

.ri-reset-button:disabled .ri-reset-spinner {
    border-color: rgba(85, 97, 131, 0.28);
    border-top-color: var(--ri-reset-muted);
}

@keyframes ri-reset-spin {
    to { transform: rotate(360deg); }
}

.ri-reset-cooldown {
    margin: 10px 0 0;
    color: var(--ri-reset-muted-light);
    text-align: center;
    font-size: 12px;
}

.ri-reset-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 28px;
    color: var(--ri-reset-primary-dark);
    font-size: 13px;
    font-weight: 600;
}

.ri-reset-back svg {
    width: 18px;
    height: 18px;
    transition: transform 0.18s ease;
}

.ri-reset-back:hover svg {
    transform: translateX(-3px);
}

.ri-reset-register {
    margin: 18px 0 0;
    color: var(--ri-reset-muted);
    font-size: 13px;
}

.ri-reset-register a {
    color: var(--ri-reset-primary-dark);
    font-weight: 600;
}

.ri-reset-noscript {
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid #f0d19b;
    border-radius: 11px;
    background: #fff9eb;
    color: #81551b;
    font-size: 12px;
    line-height: 1.55;
}

.ri-reset-legal {
    display: flex;
    width: min(100%, 470px);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    color: #8491a8;
    font-size: 11px;
}

.ri-reset-legal nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.ri-reset-legal a:hover {
    color: var(--ri-reset-primary-dark);
}

.ri-reset-input:-webkit-autofill,
.ri-reset-input:-webkit-autofill:hover,
.ri-reset-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ri-reset-text);
    -webkit-box-shadow: 0 0 0 1000px #f4f8ff inset;
    box-shadow: 0 0 0 1000px #f4f8ff inset;
    border-color: #60a5fa;
    caret-color: var(--ri-reset-text);
}

@media (max-width: 1120px) {
    .ri-reset-shell {
        grid-template-columns: minmax(430px, 0.86fr) minmax(480px, 1.14fr);
    }

    .ri-reset-visual {
        padding: 34px;
    }

    .ri-reset-visual h1 {
        font-size: clamp(40px, 5vw, 58px);
    }

    .ri-reset-flow-node b {
        display: none;
    }
}

@media (max-width: 860px) {
    .ri-reset-shell {
        display: block;
    }

    .ri-reset-visual {
        display: none;
    }

    .ri-reset-form-side {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 24px clamp(20px, 7vw, 52px) 26px;
        background:
            radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.1), transparent 35%),
            radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.08), transparent 34%),
            var(--ri-reset-surface);
    }

    .ri-reset-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .ri-reset-mobile-header img {
        display: block;
        width: auto;
        height: 38px;
    }

    .ri-reset-mobile-header > a:last-child {
        color: var(--ri-reset-primary-dark);
        font-size: 13px;
        font-weight: 600;
    }

    .ri-reset-form-wrap {
        width: min(100%, 500px);
        padding: clamp(60px, 11vh, 105px) 0 52px;
    }

    .ri-reset-legal {
        width: min(100%, 500px);
    }
}

@media (max-width: 560px) {
    .ri-reset-form-side {
        padding: 20px 20px 24px;
    }

    .ri-reset-form-wrap {
        padding: 58px 0 44px;
    }

    .ri-reset-form-wrap > h1 {
        font-size: 34px;
    }

    .ri-reset-legal {
        flex-direction: column;
        align-items: flex-start;
    }

    .ri-reset-legal nav {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
