/* Split-screen auth pages (register, login) */

/* ---------- Page shell ---------- */
body:has(.rg-page) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: #070a13 !important;
    font-family: "Inter", system-ui, sans-serif;
}

body:has(.rg-page) .navbar,
body:has(.rg-page) .mobile-header,
body:has(.rg-page) .mobile-bottom-nav,
body:has(.rg-page) .mobile-fab,
body:has(.rg-page) .footer,
body:has(.rg-page) .live-chat-button,
body:has(.rg-page) #importantAlertBtn {
    display: none !important;
}

body:has(.rg-page) .content-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body:has(.rg-page) .content-container > .alert {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    width: min(560px, calc(100% - 2rem));
    margin: 0;
    padding: 0.85rem 2.75rem 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    background: #0c111d;
    color: #f2f5f7;
    border: 1px solid rgba(197, 168, 125, 0.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body:has(.rg-page) .content-container > .alert-danger {
    border-color: rgba(238, 119, 130, 0.55);
    border-left: 3px solid #ee7782;
}

body:has(.rg-page) .content-container > .alert-success {
    border-color: rgba(76, 192, 138, 0.5);
    border-left: 3px solid #4cc08a;
}

body:has(.rg-page) .content-container > .alert .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.6;
}

.rg-page {
    --rg-bg: #070a13;
    --rg-surface: #111827;
    --rg-surface-2: #0c111d;
    --rg-line: rgba(197, 168, 125, 0.16);
    --rg-line-strong: rgba(197, 168, 125, 0.32);
    --rg-gold: #c5a87d;
    --rg-gold-hi: #deceb5;
    --rg-gold-lo: #9f8359;
    --rg-text: #f2f5f7;
    --rg-muted: #a3adbb;
    --rg-faint: #6b7487;
    --rg-ok: #4cc08a;
    --rg-bad: #ee7782;
    --rg-warn: #e2c27a;

    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 46%) 1fr;
    color: var(--rg-text);
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.auth-ready .rg-page { opacity: 1; }

/* ---------- Brand panel ---------- */
.rg-brand {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
    background:
        radial-gradient(55% 50% at 85% 8%, rgba(197, 168, 125, 0.22), transparent 70%),
        linear-gradient(180deg, #0c111d 0%, #070a13 100%);
    border-right: 1px solid var(--rg-line);
    isolation: isolate;
}

.rg-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(197, 168, 125, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 168, 125, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}

.rg-brand-logo img {
    display: block;
    height: 38px;
    width: auto;
}

.rg-brand-body {
    margin: auto 0;
    padding: 2.5rem 0;
    max-width: 30rem;
}

.rg-brand h2 {
    font-family: "Instrument Serif", Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.3rem, 3.4vw, 3.3rem);
    line-height: 1.08;
    margin: 0 0 1rem;
    color: var(--rg-text);
}

.rg-brand h2 em {
    font-style: italic;
    color: var(--rg-gold);
}

.rg-brand-lead {
    color: var(--rg-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0 0 2rem;
}

.rg-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.rg-features li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--rg-line);
    border-radius: 14px;
    background: rgba(12, 17, 29, 0.55);
    backdrop-filter: blur(6px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rg-features li:hover {
    border-color: var(--rg-line-strong);
    transform: translateX(3px);
}

.rg-features i {
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--rg-gold);
    background: linear-gradient(160deg, rgba(197, 168, 125, 0.16), rgba(197, 168, 125, 0.04));
    border: 1px solid var(--rg-line-strong);
    font-size: 0.9rem;
}

.rg-features strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rg-text);
}

.rg-features span {
    display: block;
    font-size: 0.8rem;
    color: var(--rg-muted);
    line-height: 1.4;
}

.rg-chart {
    position: absolute;
    right: 1.5rem;
    bottom: 3.5rem;
    width: 78%;
    max-width: 520px;
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
}

.rg-chart .line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: rgDraw 2.4s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.rg-chart .spark {
    opacity: 0;
    animation: rgSpark 0.8s 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rgDraw { to { stroke-dashoffset: 0; } }
@keyframes rgSpark { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .rg-chart .line { animation: none; stroke-dashoffset: 0; }
    .rg-chart .spark { animation: none; opacity: 1; }
}

.rg-brand-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: var(--rg-faint);
    font-size: 0.76rem;
}

.rg-brand-foot span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.rg-brand-foot i { color: var(--rg-gold); opacity: 0.8; }

/* ---------- Form panel ---------- */
.rg-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem clamp(1.25rem, 3.5vw, 3rem);
    background:
        radial-gradient(70% 50% at 100% 0%, rgba(197, 168, 125, 0.06), transparent 60%),
        var(--rg-bg);
}

.rg-mobile-logo { display: none; }
.rg-mobile-logo img { display: block; height: 28px; width: auto; }

/* ---------- Animated logo (auth/_logo_motion.html) ---------- */
.ctfx-lm {
    --lm-mark: #C5A87D;
    --lm-ink: #F2F5F7;
    display: block;
    width: auto;
    aspect-ratio: 428.8 / 94;
    overflow: visible;
}
.rg-brand-logo .ctfx-lm { height: 38px; }
.rg-mobile-logo .ctfx-lm { height: 28px; }
html[data-theme="ivory"] .ctfx-lm--auto {
    --lm-mark: #7A5F36;
    --lm-ink: #0C111D;
}
.ctfx-lm .lm-mark { fill: none; stroke: var(--lm-mark); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ctfx-lm .lm-base,
.ctfx-lm .lm-line { stroke-dasharray: 1 2; }
.ctfx-lm .lm-base { animation: ctfx-lm-draw 0.6s 0.2s cubic-bezier(0.65, 0, 0.35, 1) both; }
.ctfx-lm .lm-line { animation: ctfx-lm-draw 0.8s 0.45s cubic-bezier(0.65, 0, 0.35, 1) both; }
.ctfx-lm .lm-dot {
    fill: var(--lm-mark);
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
    animation: ctfx-lm-pop 0.55s 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ctfx-lm .lm-ring {
    stroke-width: 0.8;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: ctfx-lm-ring 0.9s 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ctfx-lm .lm-word path {
    fill: var(--lm-ink);
    transform-box: fill-box;
    animation: ctfx-lm-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ctfx-lm .lm-word path:nth-child(1) { animation-delay: 1.05s; }
.ctfx-lm .lm-word path:nth-child(2) { animation-delay: 1.11s; }
.ctfx-lm .lm-word path:nth-child(3) { animation-delay: 1.17s; }
.ctfx-lm .lm-word path:nth-child(4) { animation-delay: 1.23s; }
.ctfx-lm .lm-word path:nth-child(5) { animation-delay: 1.29s; }
.ctfx-lm .lm-word path:nth-child(6) { animation-delay: 1.35s; }
.ctfx-lm .lm-word path:nth-child(7) { animation-delay: 1.41s; }
.ctfx-lm .lm-sheen { animation: ctfx-lm-sheen 1.1s 2.25s cubic-bezier(0.45, 0, 0.2, 1) both; }
@keyframes ctfx-lm-draw { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@keyframes ctfx-lm-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ctfx-lm-ring { from { opacity: 0.75; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes ctfx-lm-rise { 0% { opacity: 0; transform: translateY(105%); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ctfx-lm-sheen { from { transform: translateX(0); } to { transform: translateX(380px); } }
@media (prefers-reduced-motion: reduce) {
    .ctfx-lm * { animation: none !important; }
    .ctfx-lm .lm-sheen { display: none; }
}

.rg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.rg-topbar-link {
    flex-shrink: 0;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    white-space: nowrap;
    color: var(--rg-muted);
}

.rg-topbar-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    padding: 0.32rem 0.85rem;
    border: 1px solid var(--rg-line-strong);
    border-radius: 999px;
    color: var(--rg-gold);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.rg-topbar-link a:hover {
    background: rgba(197, 168, 125, 0.1);
    color: var(--rg-gold-hi);
}

.rg-form-wrap {
    width: 100%;
    max-width: 540px;
    margin: auto;
    padding: 0.75rem 0;
    animation: rgRise 0.5s ease-out both;
}

@keyframes rgRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.rg-head h1 {
    font-family: "Instrument Serif", Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 2.2vw, 1.95rem);
    line-height: 1.1;
    margin: 0 0 0.2rem;
    color: var(--rg-text);
}

.rg-head p {
    margin: 0;
    color: var(--rg-muted);
    font-size: 0.82rem;
}

/* Progress steps */
.rg-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.85rem 0 0.75rem;
    padding: 0;
}

.rg-steps li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rg-faint);
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}

.rg-steps li::before {
    content: "";
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.rg-steps li.is-active { color: var(--rg-text); }
.rg-steps li.is-active::before { background: rgba(197, 168, 125, 0.45); }
.rg-steps li.is-done { color: var(--rg-gold); }
.rg-steps li.is-done::before { background: linear-gradient(90deg, var(--rg-gold-lo), var(--rg-gold-hi)); }

.rg-steps li span { display: inline-flex; align-items: center; gap: 0.4rem; }
.rg-steps li .fa-check { display: none; font-size: 0.65rem; }
.rg-steps li.is-done .fa-check { display: inline; }

.rg-section-note {
    margin-left: auto;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rg-faint);
}

/* Sections */
.rg-section {
    padding: 0.75rem 0.9rem 0.85rem;
    margin-bottom: 0.55rem;
    border: 1px solid rgba(197, 168, 125, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent), var(--rg-surface-2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rg-section:focus-within {
    border-color: var(--rg-line-strong);
    box-shadow: 0 0 0 3px rgba(197, 168, 125, 0.05);
}

.rg-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.55rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rg-muted);
}

.rg-section-num {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--rg-line-strong);
    color: var(--rg-gold);
    font-size: 0.62rem;
    letter-spacing: 0;
    transition: all 0.25s ease;
}

.rg-section.is-done .rg-section-num {
    background: var(--rg-gold);
    border-color: var(--rg-gold);
    color: #0c111d;
}

.rg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.7rem;
}

.rg-span { grid-column: 1 / -1; }

/* Fields */
.rg-field { display: flex; flex-direction: column; min-width: 0; }

.rg-field > label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #c3c9d4;
    margin-bottom: 0.25rem;
}

.rg-field > label small {
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--rg-faint);
    white-space: nowrap;
}

.rg-control {
    position: relative;
    display: flex;
    align-items: center;
}

.rg-control > .rg-ico {
    position: absolute;
    left: 0.8rem;
    font-size: 0.74rem;
    color: var(--rg-faint);
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.rg-control:focus-within > .rg-ico { color: var(--rg-gold); }

.rg-input {
    width: 100%;
    height: 38px;
    padding: 0 0.85rem 0 2.2rem;
    background: rgba(5, 9, 17, 0.55);
    border: 1px solid rgba(163, 173, 187, 0.2);
    border-radius: 9px;
    color: var(--rg-text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rg-input::placeholder { color: var(--rg-faint); }

.rg-input:hover { border-color: rgba(197, 168, 125, 0.3); }

.rg-input:focus {
    outline: none;
    background: rgba(5, 9, 17, 0.8);
    border-color: rgba(197, 168, 125, 0.7);
    box-shadow: 0 0 0 3px rgba(197, 168, 125, 0.12);
}

.rg-input:-webkit-autofill,
.rg-input:-webkit-autofill:hover,
.rg-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--rg-text);
    -webkit-box-shadow: 0 0 0 1000px #0a101b inset;
    caret-color: var(--rg-text);
    transition: background-color 9999s ease-out 0s;
}

.rg-input.has-trailing { padding-right: 2.4rem; }

.rg-field.is-valid .rg-input { border-color: rgba(76, 192, 138, 0.55); }
.rg-field.is-invalid .rg-input,
.rg-field.has-error .rg-input { border-color: rgba(238, 119, 130, 0.7); }
.rg-field.has-error .rg-ico { color: var(--rg-bad); }

.rg-state {
    position: absolute;
    right: 0.8rem;
    font-size: 0.7rem;
    color: var(--rg-ok);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
    pointer-events: none;
}

.rg-field.is-valid .rg-state { opacity: 1; transform: none; }

.rg-eye {
    position: absolute;
    right: 0.3rem;
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    font-size: 0.78rem;
    background: transparent;
    color: var(--rg-faint);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 3;
}

.rg-eye:hover,
.rg-eye:focus-visible {
    color: var(--rg-gold);
    background: rgba(197, 168, 125, 0.1);
    outline: none;
}

.rg-error {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--rg-bad);
    animation: rgShake 0.3s ease-out;
}

.rg-error i { font-size: 0.66rem; margin-top: 0.12rem; }

@keyframes rgShake {
    0%, 100% { transform: none; }
    30% { transform: translateX(-3px); }
    60% { transform: translateX(3px); }
}

/* Phone */
.rg-phone {
    display: flex;
    height: 38px;
    background: rgba(5, 9, 17, 0.55);
    border: 1px solid rgba(163, 173, 187, 0.2);
    border-radius: 9px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rg-phone:hover { border-color: rgba(197, 168, 125, 0.3); }

.rg-phone:focus-within {
    border-color: rgba(197, 168, 125, 0.7);
    box-shadow: 0 0 0 3px rgba(197, 168, 125, 0.12);
}

.rg-field.has-error .rg-phone { border-color: rgba(238, 119, 130, 0.7); }
.rg-field.is-valid .rg-phone { border-color: rgba(76, 192, 138, 0.55); }

.rg-dial {
    position: relative;
    flex-shrink: 0;
    width: 84px;
    border-right: 1px solid rgba(163, 173, 187, 0.18);
}

.rg-dial-shown {
    position: absolute;
    inset: 0 1.2rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rg-text);
    pointer-events: none;
}

.rg-dial-shown i { color: var(--rg-gold); font-size: 0.68rem; }

.rg-dial::after {
    content: "";
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 0.32rem;
    height: 0.32rem;
    border-right: 1.5px solid var(--rg-gold);
    border-bottom: 1.5px solid var(--rg-gold);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.rg-dial select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.rg-dial select option {
    color: #0c111d;
    background: #f2f5f7;
}

.rg-phone .rg-input {
    height: 100%;
    border: 0;
    border-radius: 0 9px 9px 0;
    background: transparent;
    padding-left: 0.75rem;
    box-shadow: none !important;
}

/* Password strength */
.rg-pwmeta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rg-strength {
    flex: 0 0 120px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    align-items: center;
    gap: 0.2rem;
}

.rg-strength .seg {
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease;
}

.rg-strength .label {
    min-width: 2.6rem;
    text-align: right;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--rg-faint);
}

.rg-strength[data-level="1"] .seg:nth-child(-n+1) { background: var(--rg-bad); }
.rg-strength[data-level="2"] .seg:nth-child(-n+2) { background: var(--rg-warn); }
.rg-strength[data-level="3"] .seg:nth-child(-n+3) { background: var(--rg-gold); }
.rg-strength[data-level="4"] .seg:nth-child(-n+4) { background: var(--rg-ok); }
.rg-strength[data-level="1"] .label { color: var(--rg-bad); }
.rg-strength[data-level="2"] .label { color: var(--rg-warn); }
.rg-strength[data-level="3"] .label { color: var(--rg-gold); }
.rg-strength[data-level="4"] .label { color: var(--rg-ok); }

.rg-rules {
    flex: 1;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.rg-rules li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(163, 173, 187, 0.18);
    font-size: 0.65rem;
    color: var(--rg-faint);
    transition: all 0.2s ease;
}

.rg-rules li i { font-size: 0.5rem; }
.rg-rules li .fa-check { display: none; }

.rg-rules li.ok {
    color: var(--rg-ok);
    border-color: rgba(76, 192, 138, 0.4);
    background: rgba(76, 192, 138, 0.07);
}

.rg-rules li.ok .fa-check { display: inline; }
.rg-rules li.ok .fa-circle { display: none; }

/* Terms */
.rg-terms {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--rg-line);
    border-radius: 10px;
    background: var(--rg-surface-2);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rg-terms:hover { border-color: var(--rg-line-strong); }

.rg-terms input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.rg-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(197, 168, 125, 0.5);
    border-radius: 4px;
    background: rgba(5, 9, 17, 0.55);
    color: transparent;
    font-size: 0.55rem;
    transition: all 0.2s ease;
}

.rg-terms input:focus-visible + .rg-check { box-shadow: 0 0 0 4px rgba(197, 168, 125, 0.18); }

.rg-terms input:checked + .rg-check {
    background: linear-gradient(160deg, var(--rg-gold-hi), var(--rg-gold-lo));
    border-color: var(--rg-gold);
    color: #0c111d;
}

.rg-terms-text {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #c3c9d4;
}

.rg-terms-text a {
    color: var(--rg-gold);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(197, 168, 125, 0.35);
}

.rg-terms-text a:hover { color: var(--rg-gold-hi); border-color: var(--rg-gold-hi); }

.rg-terms-wrap.is-invalid .rg-terms {
    border-color: rgba(238, 119, 130, 0.6);
    background: rgba(238, 119, 130, 0.05);
}

.rg-terms-wrap.is-invalid .rg-check { border-color: var(--rg-bad); }

/* Referral */
.rg-referral { margin-top: 0.5rem; }

.rg-referral-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--rg-muted);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rg-referral-toggle:hover,
.rg-referral-toggle[aria-expanded="true"] { color: var(--rg-gold); }

.rg-referral-toggle .chev { font-size: 0.65rem; transition: transform 0.25s ease; }
.rg-referral-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.rg-referral-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.rg-referral-body.is-open { grid-template-rows: 1fr; }
.rg-referral-body > div { overflow: hidden; }
.rg-referral-body .rg-field { padding-top: 0.45rem; }

#manual_referral_code {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 600;
}

#manual_referral_code::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }

/* Submit */
.rg-actions { margin-top: 0.8rem; }

.rg-submit {
    position: relative;
    width: 100%;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--rg-gold);
    color: #0c111d;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(197, 168, 125, 0.16);
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.rg-submit:hover {
    background: var(--rg-gold-hi);
    box-shadow: 0 10px 26px rgba(197, 168, 125, 0.24);
}

.rg-submit:active { background: var(--rg-gold); }
.rg-submit:focus-visible { outline: 2px solid var(--rg-gold-hi); outline-offset: 3px; }

.rg-submit .btn-icon { transition: transform 0.2s ease; }
.rg-submit:hover .btn-icon { transform: translateX(3px); }

.rg-submit:disabled {
    cursor: progress;
    opacity: 0.8;
    transform: none;
}

.rg-submit .btn-loading {
    align-items: center;
    gap: 0.6rem;
}

.rg-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(12, 17, 29, 0.25);
    border-top-color: #0c111d;
    border-radius: 50%;
    animation: rgSpin 0.8s linear infinite;
}

@keyframes rgSpin { to { transform: rotate(360deg); } }

.rg-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: var(--rg-faint);
}

.rg-secure i { color: var(--rg-gold); opacity: 0.8; }

/* ---------- Login ---------- */
.rg-form-wrap--narrow { max-width: 400px; }

.rg-form-wrap--narrow .rg-head { margin-bottom: 1.1rem; }

.rg-form-wrap--narrow .rg-section { padding: 1rem 1rem 0.9rem; }

.rg-field--gap { margin-top: 0.75rem; }

.rg-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.rg-label-row label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #c3c9d4;
    margin: 0;
}

.rg-link-sm {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rg-gold);
    text-decoration: none;
}

.rg-link-sm:hover { color: var(--rg-gold-hi); }

.rg-remember {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.76rem;
    color: #c3c9d4;
    cursor: pointer;
    user-select: none;
}

.rg-remember input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.rg-remember input:focus-visible + .rg-check { box-shadow: 0 0 0 3px rgba(197, 168, 125, 0.18); }

.rg-remember input:checked + .rg-check {
    background: linear-gradient(160deg, var(--rg-gold-hi), var(--rg-gold-lo));
    border-color: var(--rg-gold);
    color: #0c111d;
}

.rg-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rg-faint);
}

.rg-divider::before,
.rg-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(163, 173, 187, 0.16);
}

.rg-google {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid rgba(163, 173, 187, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--rg-text);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rg-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(197, 168, 125, 0.4);
    color: var(--rg-text);
}

.rg-google:focus-visible { outline: 2px solid var(--rg-gold-hi); outline-offset: 3px; }

.rg-switch {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--rg-muted);
}

.rg-switch a {
    margin-left: 0.25rem;
    color: var(--rg-gold);
    font-weight: 700;
    text-decoration: none;
}

.rg-switch a:hover { color: var(--rg-gold-hi); }

.rg-awards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(163, 173, 187, 0.1);
}

.rg-awards img {
    height: 46px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.rg-awards img:hover { opacity: 1; }

/* ---------- Password reset ---------- */
.rg-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--rg-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rg-back:hover { color: var(--rg-gold); }
.rg-back i { font-size: 0.7rem; transition: transform 0.2s ease; }
.rg-back:hover i { transform: translateX(-3px); }

.rg-howto {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin: -0.35rem 0 0.9rem;
    padding: 0;
}

.rg-howto li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--rg-muted);
}

.rg-howto span {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--rg-line-strong);
    color: var(--rg-gold);
    font-size: 0.6rem;
}

.rg-link-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.rg-link-btn i { font-size: 0.62rem; margin-right: 0.15rem; }

.rg-captcha {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.rg-captcha-q {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--rg-line-strong);
    border-radius: 9px;
    background: rgba(197, 168, 125, 0.06);
    color: var(--rg-text);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    user-select: none;
}

.rg-captcha .rg-input {
    padding-left: 0.85rem;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.rg-field.has-error .rg-captcha .rg-input { border-color: rgba(238, 119, 130, 0.7); }

.rg-captcha--picture {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.rg-captcha-img {
    display: block;
    width: 128px;
    height: 46px;
    border: 1px solid var(--rg-line-strong);
    border-radius: 9px;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.rg-captcha--picture .rg-input,
.rg-page .rg-cmp .rg-captcha--picture .rg-input {
    height: 46px;
    font-size: 1.05rem;
    letter-spacing: 0.3em;
}

.rg-captcha--picture .rg-input::placeholder {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
}

.rg-link-btn:disabled { opacity: 0.5; cursor: progress; }

/* ---------- Captcha modal ---------- */
#captchaModal .modal-dialog { max-width: 420px; }

#captchaModal .modal-content {
    background: #111827;
    border: 1px solid rgba(197, 168, 125, 0.28);
    border-radius: 18px;
    color: #f2f5f7;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    font-family: "Inter", sans-serif;
}

#captchaModal .modal-header,
#captchaModal .modal-footer {
    border-color: rgba(197, 168, 125, 0.14);
}

#captchaModal .modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Instrument Serif", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 400;
}

#captchaModal .modal-title i { color: #c5a87d; font-size: 1rem; }
#captchaModal .modal-body p { color: #a3adbb; font-size: 0.88rem; }

#captchaModal .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.55rem 1rem;
}

#captchaModal .btn-secondary {
    background: transparent;
    border: 1px solid rgba(163, 173, 187, 0.3);
    color: #c3c9d4;
}

#captchaModal .btn-outline-light {
    border-color: rgba(197, 168, 125, 0.4);
    color: #c5a87d;
}

#captchaModal .btn-primary {
    background: linear-gradient(180deg, #deceb5, #c5a87d);
    border: 0;
    color: #0c111d;
}

#captchaModal .btn-primary:disabled { opacity: 0.45; }

#turnstile-container {
    width: 100%;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#turnstile-container .cf-turnstile,
#turnstile-container iframe { width: 300px !important; max-width: 100% !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .rg-brand { padding: 2rem 2.25rem; }
}

@media (max-width: 960px) {
    .rg-page { grid-template-columns: 1fr; }
    .rg-brand { display: none; }
    .rg-mobile-logo { display: block; align-self: center; margin: auto 0; }
    .rg-mobile-logo + .rg-form-wrap { margin: 0 auto auto; }
    .rg-mobile-logo .ctfx-lm,
    .rg-mobile-logo img { height: 46px; }
    .rg-main { padding: 0.9rem 1.25rem; }
}

@media (max-width: 560px) {
    .rg-main { padding: 0.8rem 0.85rem; }
    .rg-topbar-link .rg-topbar-q { display: none; }
    .rg-grid { grid-template-columns: 1fr; gap: 0.55rem; }
    .rg-input { font-size: 16px; height: 40px; }
    .rg-phone { height: 40px; }
    .rg-pwmeta { flex-direction: column-reverse; align-items: stretch; gap: 0.4rem; }
    .rg-strength { flex-basis: auto; }
    #turnstile-container { transform: scale(0.94); transform-origin: center; }
}

@media (min-width: 961px) and (max-height: 800px) {
    .rg-main { padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .rg-head p,
    .rg-steps,
    .rg-secure { display: none; }
    .rg-head { margin-bottom: 0.6rem; }
    .rg-section { padding: 0.6rem 0.85rem 0.7rem; margin-bottom: 0.45rem; }
    .rg-section-title { margin-bottom: 0.4rem; }
    .rg-grid { gap: 0.45rem 0.7rem; }
    .rg-input, .rg-phone { height: 36px; }
    .rg-terms { padding: 0.45rem 0.8rem; }
    .rg-referral { margin-top: 0.4rem; }
    .rg-actions { margin-top: 0.55rem; }
    .rg-submit { height: 40px; }
    .rg-brand { padding: 1.75rem 2.5rem; }
    .rg-brand-body { padding: 1rem 0; }
    .rg-brand h2 { font-size: 2.2rem; margin: 0 0 0.6rem; }
    .rg-brand-lead { margin-bottom: 1.1rem; font-size: 0.88rem; }
    .rg-features { gap: 0.5rem; }
    .rg-features li { padding: 0.55rem 0.8rem; }
    .rg-features i { width: 2rem; height: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rg-page *, .rg-page *::before, .rg-page *::after {
        animation: none !important;
        transition: none !important;
    }
    .rg-chart .line { stroke-dashoffset: 0; }
}

/* ---------- Register card (compact, like the ctforex.com landing form) ----------
   Selectors start with .rg-page .rg-cmp so they outrank theme-ivory-auto.css, which loads after this file. */
.rg-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.rg-cmp {
    --c-card: #0f1522;
    --c-card-line: rgba(197, 168, 125, 0.16);
    --c-card-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.85);
    --c-field: rgba(255, 255, 255, 0.03);
    --c-field-line: rgba(163, 173, 187, 0.2);
    --c-field-hover: rgba(197, 168, 125, 0.45);
    --c-gold: linear-gradient(135deg, #e4d4b8 0%, #c5a87d 55%, #a98a5c 100%);
    max-width: 420px;
    padding: 1.5rem 0;
}

[data-theme="ivory"] .rg-cmp {
    --c-card: #ffffff;
    --c-card-line: rgba(12, 17, 29, 0.08);
    --c-card-shadow: 0 40px 90px -40px rgba(12, 17, 29, 0.35);
    --c-field: rgba(247, 244, 238, 0.7);
    --c-field-line: rgba(12, 17, 29, 0.12);
    --c-field-hover: rgba(116, 90, 52, 0.45);
}

.rg-page .rg-cmp .rg-cmp-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.5rem;
    border: 1px solid var(--c-card-line);
    border-radius: 24px;
    background: var(--c-card);
    box-shadow: var(--c-card-shadow);
}

.rg-page .rg-cmp .rg-cmp-head {
    margin-bottom: 0.35rem;
    text-align: center;
}

.rg-page .rg-cmp .rg-cmp-head h1 {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--rg-text);
}

.rg-page .rg-cmp .rg-cmp-head p {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--rg-muted);
}

.rg-page .rg-cmp .rg-cmp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.rg-page .rg-cmp .rg-input {
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--c-field-line);
    border-radius: 8px;
    background: var(--c-field);
    font-size: 0.875rem;
}

.rg-page .rg-cmp .rg-input.has-trailing { padding-inline-end: 2.4rem; }

.rg-page .rg-cmp .rg-phone {
    height: 40px;
    border: 1px solid var(--c-field-line);
    border-radius: 8px;
    background: var(--c-field);
}

.rg-page .rg-cmp .rg-input:hover,
.rg-page .rg-cmp .rg-phone:hover { border-color: var(--c-field-hover); }

.rg-page .rg-cmp .rg-field.is-valid .rg-input:not(:focus),
.rg-page .rg-cmp .rg-field.is-valid .rg-phone:not(:focus-within) { border-color: var(--c-field-line); }

.rg-page .rg-cmp .rg-field .rg-input:focus,
.rg-page .rg-cmp .rg-field .rg-phone:focus-within {
    border-color: var(--rg-gold);
    background: var(--c-card);
    box-shadow: 0 0 0 3px rgba(197, 168, 125, 0.16);
}

.rg-page .rg-cmp .rg-field.has-error .rg-input,
.rg-page .rg-cmp .rg-field.is-invalid .rg-input,
.rg-page .rg-cmp .rg-field.has-error .rg-phone { border-color: var(--rg-bad); }

.rg-page .rg-cmp .rg-phone .rg-input,
.rg-page .rg-cmp .rg-field .rg-phone .rg-input:focus {
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.rg-page .rg-cmp .rg-dial {
    width: 88px;
    border-right: 0;
    border-inline-end: 1px solid var(--c-field-line);
}

.rg-page .rg-cmp .rg-dial-shown { inset: 0; padding-inline-end: 0.9rem; font-size: 0.875rem; font-weight: 500; }
.rg-page .rg-cmp .rg-dial::after { right: auto; inset-inline-end: 0.75rem; }
.rg-page .rg-cmp .rg-state { right: auto; inset-inline-end: 0.75rem; font-size: 0.65rem; }
.rg-page .rg-cmp .rg-eye { right: auto; inset-inline-end: 0.3rem; width: 1.9rem; height: 1.9rem; }
.rg-page .rg-cmp .rg-error { margin-top: 0.25rem; font-size: 0.69rem; line-height: 1.3; }

.rg-page .rg-cmp .rg-terms {
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
}

.rg-page .rg-cmp .rg-check { width: 15px; height: 15px; margin-top: 0.1rem; border-radius: 4px; background: var(--c-field); font-size: 0.5rem; }
.rg-page .rg-cmp .rg-terms input:checked + .rg-check { background: var(--c-gold); border-color: transparent; }
.rg-page .rg-cmp .rg-terms-text { font-size: 0.75rem; line-height: 1.45; color: var(--rg-muted); }
.rg-page .rg-cmp .rg-terms-wrap.is-invalid .rg-terms { background: none; }
.rg-page .rg-cmp .rg-terms-wrap.is-invalid .rg-terms-text { color: var(--rg-bad); }

.rg-page .rg-cmp .rg-referral { margin-top: -0.2rem; }
.rg-page .rg-cmp .rg-referral-toggle { font-size: 0.75rem; font-weight: 500; }
.rg-page .rg-cmp .rg-referral-body .rg-field { padding-top: 0.5rem; }

.rg-page .rg-cmp .rg-submit {
    width: 100%;
    height: 44px;
    margin-top: 0.15rem;
    border-radius: 999px;
    background: var(--c-gold);
    color: #0c111d;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 12px 26px -14px rgba(197, 168, 125, 0.8);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rg-page .rg-cmp .rg-submit:hover,
.rg-page .rg-cmp .rg-submit:active {
    background: var(--c-gold);
    filter: brightness(1.05);
    box-shadow: 0 16px 30px -14px rgba(197, 168, 125, 0.9);
}

.rg-page .rg-cmp .rg-submit:active { transform: translateY(1px); }
.rg-page .rg-cmp .rg-submit .rg-spinner { border-color: rgba(12, 17, 29, 0.25); border-top-color: #0c111d; }

.rg-page .rg-cmp .rg-switch {
    margin: 0.05rem 0 0;
    font-size: 0.75rem;
    text-align: center;
}

.rg-page .rg-cmp .rg-switch a { margin: 0; }

.rg-page .rg-cmp .rg-secure {
    display: flex;
    margin-top: 0.05rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--c-card-line);
    font-size: 0.69rem;
    font-weight: 500;
}

@media (max-width: 560px) {
    .rg-cmp { padding: 0.75rem 0; }
    .rg-page .rg-cmp .rg-cmp-card { padding: 1.15rem; border-radius: 20px; }
    .rg-page .rg-cmp .rg-input,
    .rg-page .rg-cmp .rg-phone { font-size: 16px; }
}

@media (max-width: 420px) {
    .rg-page .rg-cmp .rg-cmp-row--pw { grid-template-columns: 1fr; }
}

/* ---------- Photo brand panel (register, login) ---------- */
.rg-page .rg-brand.rg-brand--photo {
    padding: 2.5rem 3.25rem;
    background:
        radial-gradient(60% 45% at 85% 0%, rgba(197, 168, 125, 0.16), transparent 70%),
        radial-gradient(45% 35% at 0% 100%, rgba(197, 168, 125, 0.07), transparent 70%),
        linear-gradient(180deg, #0b101b 0%, #070a13 100%);
}

/* The box overhangs the panel bottom (clipped by .rg-brand's overflow: hidden) so the photo's forest stays out of view. */
.rg-page .rg-brand.rg-brand--photo::before {
    inset: 46% 0 auto;
    height: 74%;
    background:
        linear-gradient(90deg, rgba(7, 10, 19, 0.78) 0%, rgba(7, 10, 19, 0.32) 45%, rgba(7, 10, 19, 0) 75%),
        url("../images/Tatra-Mountains-in-Winter-Zakopane-Poland.webp") 62% 0 / cover no-repeat;
    opacity: 0.5;
    filter: saturate(0.75);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 58%, rgba(0, 0, 0, 0.35) 70%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 58%, rgba(0, 0, 0, 0.35) 70%);
}

.rg-page .rg-brand--photo .rg-brand-body { max-width: 27rem; }

.rg-page .rg-brand--photo h2 {
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 3.4vw, 3.2rem);
    color: var(--rg-text);
}

.rg-page .rg-brand--photo .rg-brand-lead {
    margin-bottom: 2.75rem;
    font-size: 0.98rem;
    color: var(--rg-muted);
}

.rg-journey {
    list-style: none;
    display: grid;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.rg-journey li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.rg-journey li:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 15.5px;
    top: 40px;
    bottom: calc(-1.6rem + 8px);
    width: 1px;
    background: linear-gradient(rgba(197, 168, 125, 0.45), rgba(197, 168, 125, 0.12));
}

.rg-journey .num {
    flex: none;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 168, 125, 0.45);
    border-radius: 50%;
    background: rgba(12, 17, 29, 0.6);
    color: var(--rg-gold);
    font-size: 0.8rem;
    font-weight: 600;
}

.rg-journey li.is-current .num {
    border-color: transparent;
    background: linear-gradient(135deg, #e4d4b8 0%, #c5a87d 55%, #a98a5c 100%);
    color: #0c111d;
    box-shadow: 0 0 0 6px rgba(197, 168, 125, 0.12);
}

.rg-journey li > div { padding-top: 0.3rem; }

.rg-journey--icons li:not(:last-child)::after { display: none; }
.rg-journey--icons .num { font-size: 0.78rem; }

.rg-journey strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rg-text);
}

.rg-journey small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--rg-muted);
}

.rg-page .rg-brand--photo .rg-brand-foot {
    gap: 0.5rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(197, 168, 125, 0.14);
    color: var(--rg-muted);
    font-size: 0.76rem;
}

.rg-submitting {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(60% 45% at 50% 45%, rgba(197, 168, 125, 0.08), transparent 70%),
        rgba(5, 8, 15, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: rgSubmitFade 0.25s ease-out;
}
.rg-submitting[hidden] { display: none; }
.rg-submitting-card {
    --rg-wait-gold: #c5a87d;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(400px, 100%);
    padding: 2.4rem 2rem 1.4rem;
    overflow: hidden;
    border: 1px solid rgba(197, 168, 125, 0.26);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(23, 30, 46, 0.97), rgba(12, 17, 28, 0.98));
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #f2f5f7;
    text-align: center;
    animation: rgSubmitRise 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.rg-submitting-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 170px;
    background: radial-gradient(55% 75% at 50% 0%, rgba(197, 168, 125, 0.2), transparent 72%);
    pointer-events: none;
}
.rg-submitting-card::after {
    content: "";
    position: absolute;
    inset: 0 12% auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rg-wait-gold), transparent);
    opacity: 0.8;
}
.rg-submitting-card > * { position: relative; }
.rg-submitting-logo {
    width: min(320px, 100%);
    aspect-ratio: 1040 / 410;
    margin: -0.2rem auto -0.3rem;
}
.rg-submitting-logo .ctfx-morph { display: block; width: 100%; height: 100%; overflow: visible; }

.rg-submitting-bar {
    width: 100%;
    height: 3px;
    margin: 1.2rem 0 1.4rem;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(197, 168, 125, 0.13);
}
.rg-submitting-bar span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--rg-wait-gold) 30%, #ecd9b5 50%, var(--rg-wait-gold) 70%, transparent);
    animation: rgWaitBar 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes rgWaitBar { from { transform: translateX(-110%); } to { transform: translateX(270%); } }
.rg-submitting.is-finished .rg-submitting-bar span {
    width: 100%;
    background: var(--rg-wait-gold);
    transform-origin: left center;
    animation: rgWaitBarDone 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
[dir="rtl"] .rg-submitting.is-finished .rg-submitting-bar span { transform-origin: right center; }
@keyframes rgWaitBarDone { from { transform: scaleX(0); } }

.rg-submitting-title {
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.rg-submitting-steps {
    display: grid;
    gap: 0.6rem;
    width: 100%;
    margin: 1.1rem 0 0;
    padding: 0.95rem 1.05rem;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    text-align: start;
}
.rg-submitting-steps li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #687384;
    font-size: 0.87rem;
    line-height: 1.35;
    transition: color 0.3s ease;
}
.rg-submitting-steps .dot {
    display: grid;
    flex: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(163, 173, 187, 0.3);
    border-radius: 50%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.rg-submitting-steps .dot i {
    color: #0f1522;
    font-size: 0.6rem;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rg-submitting-steps li.is-active { color: #f2f5f7; }
.rg-submitting-steps li.is-active .dot {
    border: 2px solid rgba(197, 168, 125, 0.22);
    border-top-color: var(--rg-wait-gold);
    animation: rgSubmitSpin 0.8s linear infinite;
}
.rg-submitting-steps li.is-done { color: #c3cad4; }
.rg-submitting-steps li.is-done .dot {
    border-color: var(--rg-wait-gold);
    background: var(--rg-wait-gold);
}
.rg-submitting-steps li.is-done .dot i { opacity: 1; transform: none; }

.rg-submitting-note {
    margin: 1.1rem 0 0;
    color: #a3adbb;
    font-size: 0.8rem;
    line-height: 1.55;
}
.rg-submitting-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 1.1rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #7f8998;
    font-size: 0.74rem;
}
.rg-submitting-secure i { color: var(--rg-wait-gold); font-size: 0.7rem; }

@keyframes rgSubmitSpin { to { transform: rotate(360deg); } }
@keyframes rgSubmitFade { from { opacity: 0; } }
@keyframes rgSubmitRise { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@media (max-width: 420px) {
    .rg-submitting-card { padding: 2rem 1.35rem 1.2rem; border-radius: 18px; }
    .rg-submitting-logo { width: min(270px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
    .rg-submitting,
    .rg-submitting-card { animation: none; }
    .rg-submitting-bar span { animation-duration: 3s; }
    .rg-submitting-steps li.is-active .dot { animation-duration: 2.4s; }
}
html[data-theme="ivory"] .rg-submitting {
    background:
        radial-gradient(60% 45% at 50% 45%, rgba(122, 95, 54, 0.08), transparent 70%),
        rgba(247, 244, 238, 0.82);
}
html[data-theme="ivory"] .rg-submitting-card {
    --rg-wait-gold: #7a5f36;
    border-color: #e4ded2;
    background: linear-gradient(180deg, #ffffff, #fbf9f5);
    box-shadow: 0 32px 80px rgba(12, 17, 29, 0.14), inset 0 1px 0 #ffffff;
    color: #0c111d;
}
html[data-theme="ivory"] .rg-submitting-card::before {
    background: radial-gradient(55% 75% at 50% 0%, rgba(197, 168, 125, 0.22), transparent 72%);
}
html[data-theme="ivory"] .rg-submitting-bar { background: rgba(122, 95, 54, 0.12); }
html[data-theme="ivory"] .rg-submitting-bar span {
    background: linear-gradient(90deg, transparent, #7a5f36 30%, #c5a87d 50%, #7a5f36 70%, transparent);
}
html[data-theme="ivory"] .rg-submitting-steps {
    border-color: #ece6da;
    background: #faf8f4;
}
html[data-theme="ivory"] .rg-submitting-steps li { color: #9aa0aa; }
html[data-theme="ivory"] .rg-submitting-steps .dot { border-color: rgba(12, 17, 29, 0.18); }
html[data-theme="ivory"] .rg-submitting-steps .dot i { color: #ffffff; }
html[data-theme="ivory"] .rg-submitting-steps li.is-active { color: #0c111d; }
html[data-theme="ivory"] .rg-submitting-steps li.is-active .dot {
    border-color: rgba(122, 95, 54, 0.2);
    border-top-color: #7a5f36;
}
html[data-theme="ivory"] .rg-submitting-steps li.is-done { color: #4a5260; }
html[data-theme="ivory"] .rg-submitting-steps li.is-done .dot { border-color: #7a5f36; }
html[data-theme="ivory"] .rg-submitting-note { color: #4a5260; }
html[data-theme="ivory"] .rg-submitting-secure { border-top-color: #ece6da; color: #6b7280; }

@media (min-width: 961px) and (max-height: 820px) {
    .rg-page .rg-brand.rg-brand--photo { padding: 1.75rem 2.75rem; }
    .rg-page .rg-brand--photo h2 { font-size: 2.3rem; margin-bottom: 0.7rem; }
    .rg-page .rg-brand--photo .rg-brand-lead { margin-bottom: 1.75rem; font-size: 0.9rem; }
    .rg-journey { gap: 1.1rem; }
    .rg-journey li:not(:last-child)::after { bottom: calc(-1.1rem + 8px); }
}
