@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #080808;
}

body.cap-lang-open {
    overflow: hidden;
}

.cap-header {
    width: 100%;
    height: 67px;
    background: #080808;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
}

.cap-header__inner {
    max-width: 1360px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;

    display: grid;
    grid-template-columns: 230px 1fr 420px;
    align-items: center;
}

.cap-header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    width: fit-content;
    line-height: 1;
    user-select: none;
}

.cap-header__logo-capital {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #f5f5f5;
}

.cap-header__logo-dot {
    width: 5px;
    height: 5px;
    margin: 0 6px;
    border-radius: 50%;
    background: #c68f57;
    box-shadow: 0 0 8px rgba(198, 143, 87, 0.65);
    transform: translateY(1px);
}

.cap-header__logo-com {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: #f5f5f5;
}

.cap-header__nav {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
}

.cap-header__nav-item {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.cap-header__nav-link {
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;

    text-decoration: none;
    color: rgba(255, 255, 255, 0.62);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;

    transition: color .18s ease;
    cursor: pointer;
}

.cap-header__nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(198, 143, 87, 0.9);
    transition: color .18s ease, transform .18s ease;
}

.cap-header__nav-icon svg,
.cap-header__drop-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cap-header__drop-icon svg {
    width: 15px;
    height: 15px;
}

.cap-header__nav-link:hover,
.cap-header__nav-item:hover .cap-header__nav-link {
    color: #ffffff;
}

.cap-header__nav-item:hover .cap-header__nav-icon {
    color: #d49d65;
    transform: translateY(-1px);
}

.cap-header__nav-link--dropdown::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .8;
    transition: transform .18s ease;
}

.cap-header__nav-item:hover .cap-header__nav-link--dropdown::after {
    transform: rotate(225deg) translateY(-1px);
}

.cap-header__dropdown {
    position: absolute;
    top: 58px;
    left: 50%;
    min-width: 240px;
    padding: 8px;

    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);

    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    will-change: opacity, transform;
}

.cap-header__dropdown::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 0;
    width: 100%;
    height: 12px;
}

.cap-header__dropdown::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #111111;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-50%) rotate(45deg);
}

.cap-header__nav-item:hover .cap-header__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.cap-header__dropdown-link {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 0 13px;

    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;

    border-radius: 12px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.cap-header__dropdown-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.045);
    transform: translateX(2px);
}

.cap-header__drop-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #c68f57;

    transition: background .18s ease, transform .18s ease;
}

.cap-header__dropdown-link:hover .cap-header__drop-icon {
    transform: scale(1.04);
}

.cap-header__drop-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cap-header__drop-title {
    color: inherit;
    font-size: 15px;
    line-height: 1;
}

.cap-header__drop-desc {
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
    line-height: 1;
}


.cap-header__language {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cap-header__lang-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cap-header__language::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    height: 14px;
    display: none;
}

.cap-header__language:hover::after,
.cap-header__language.is-open::after,
.cap-header__language:has(.cap-header__lang-toggle:checked)::after {
    display: block;
}

.cap-header__lang-current {
    height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.cap-header__language:hover .cap-header__lang-current,
.cap-header__language.is-open .cap-header__lang-current,
.cap-header__lang-toggle:checked + .cap-header__lang-current {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(198, 143, 87, 0.42);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(198, 143, 87, 0.08);
}

.cap-header__lang-flag {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: block;
    object-fit: cover;
    overflow: hidden;
    /*border-radius: 50%;*/
    /*box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10);*/
}

.cap-header__lang-code {
    min-width: 20px;
    letter-spacing: 0.35px;
}

.cap-header__lang-arrow {
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .78;
    transition: transform .18s ease;
}

.cap-header__language:hover .cap-header__lang-arrow,
.cap-header__language.is-open .cap-header__lang-arrow,
.cap-header__lang-toggle:checked + .cap-header__lang-current .cap-header__lang-arrow {
    transform: rotate(225deg) translateY(-1px);
}

.cap-header__lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 204px;
    max-height: 336px;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 143, 87, 0.55) rgba(255, 255, 255, 0.06);
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    will-change: opacity, transform;
}

.cap-header__lang-menu::before {
    content: "";
    position: absolute;
    top: -9px;
    right: 0;
    width: 100%;
    height: 12px;
}

.cap-header__lang-menu::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 28px;
    width: 10px;
    height: 10px;
    background: #111111;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}

.cap-header__lang-menu::-webkit-scrollbar {
    width: 6px;
}

.cap-header__lang-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.045);
    border-radius: 999px;
}

.cap-header__lang-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(198, 143, 87, 0.78), rgba(198, 143, 87, 0.38));
    border-radius: 999px;
}

.cap-header__lang-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 157, 101, 0.9);
}

.cap-header__language:hover .cap-header__lang-menu,
.cap-header__language.is-open .cap-header__lang-menu,
.cap-header__lang-toggle:checked ~ .cap-header__lang-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.cap-header__lang-close {
    display: none;
}

.cap-header__lang-option {
    position: relative;
    z-index: 2;
    min-height: 42px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.cap-header__lang-option:hover,
.cap-header__lang-option.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.045);
}

.cap-header__lang-option:hover {
    transform: translateX(2px);
}

.cap-header__lang-option.is-active::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: #c68f57;
    box-shadow: 0 0 8px rgba(198, 143, 87, 0.55);
}

.cap-header__lang-name {
    line-height: 1;
}

.cap-header__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}


.cap-header__buy-crypto {
    height: 40px;
    min-width: 112px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    color: #111111;
    background: #c68f57;
    border: 1px solid #c68f57;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cap-header__buy-crypto:hover {
    background: #d49d65;
    border-color: #d49d65;
    box-shadow: 0 0 0 3px rgba(198, 143, 87, 0.08);
}

.cap-header__buy-crypto:active {
    transform: translateY(1px);
}

.cap-header__buy-crypto-short {
    display: none;
}

.cap-header__btn {
    height: 40px;
    min-width: 112px;
    padding: 0 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    text-decoration: none;

    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transition: .2s ease;
}

.cap-header__btn--login {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cap-header__btn--login:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cap-header__btn--signup {
    color: #111111;
    background: #c68f57;
    border: 1px solid #c68f57;
}

.cap-header__btn--signup:hover {
    background: #d49d65;
    border-color: #d49d65;
}


.cap-header__nav-link:focus-visible,
.cap-header__dropdown-link:focus-visible,
.cap-header__btn:focus-visible,
.cap-header__buy-crypto:focus-visible,
.cap-header__lang-current:focus-visible,
.cap-header__lang-option:focus-visible {
    outline: 2px solid rgba(198, 143, 87, 0.75);
    outline-offset: 4px;
}

@media (max-width: 1180px) {
    .cap-header__inner {
        grid-template-columns: 210px 1fr 390px;
    }

    .cap-header__nav {
        gap: 20px;
    }

    .cap-header__nav-link {
        font-size: 15px;
    }

    .cap-header__btn {
        min-width: 100px;
        padding: 0 20px;
    }
}

@media (max-width: 900px) {
    .cap-header__inner {
        grid-template-columns: auto auto;
    }

    .cap-header__nav {
        display: none;
    }

    .cap-header__btn {
        min-width: auto;
        height: 40px;
        padding: 0 18px;
        font-size: 14px;
    }

    .cap-header__lang-current {
        padding: 0 12px;
    }
}

@media (max-width: 520px) {
    .cap-header {
        height: 64px;
    }

    .cap-header__inner {
        padding: 0 14px;
    }

    .cap-header__logo-capital,
    .cap-header__logo-com {
        font-size: 22px;
    }

    .cap-header__actions {
        gap: 8px;
    }

    .cap-header__language {
        position: static;
    }

    .cap-header__lang-current {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .cap-header__lang-code,
    .cap-header__lang-arrow {
        display: none;
    }

    .cap-header__lang-menu {
        position: fixed;
        inset: 0;
        z-index: 3000;
        width: 100%;
        max-height: none;
        padding: 82px 18px 28px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: #080808;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(14px);
        transform-origin: center;
    }

    .cap-header__lang-menu::before {
        content: "Choose language";
        top: 24px;
        left: 18px;
        width: auto;
        height: auto;
        color: #ffffff;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -0.4px;
    }

    .cap-header__lang-menu::after {
        display: none;
    }

    .cap-header__lang-close {
        position: fixed;
        top: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.055);
        color: #ffffff;
        font: inherit;
        font-size: 0;
        cursor: pointer;
    }

    .cap-header__lang-close::before,
    .cap-header__lang-close::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 1.8px;
        border-radius: 999px;
        background: currentColor;
    }

    .cap-header__lang-close::before {
        transform: rotate(45deg);
    }

    .cap-header__lang-close::after {
        transform: rotate(-45deg);
    }

    .cap-header__lang-option {
        min-height: 58px;
        padding: 0 16px;
        gap: 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(255, 255, 255, 0.065);
        font-size: 16px;
    }

    .cap-header__lang-option .cap-header__lang-flag {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .cap-header__lang-option:hover {
        transform: none;
    }

    .cap-header__btn--login {
        display: none;
    }

    .cap-header__btn--signup {
        display: none;
    }
}


/* Stable language selector fixes */
.cap-header__lang-menu {
    z-index: 1005;
}

@media (min-width: 521px) {
    .cap-header__language:hover .cap-header__lang-menu,
    .cap-header__language.is-open .cap-header__lang-menu,
    .cap-header__lang-toggle:checked ~ .cap-header__lang-menu,
    .cap-header__lang-menu:hover {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 520px) {
    .cap-header__language::after {
        display: none !important;
    }

    .cap-header__language:hover .cap-header__lang-menu {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(14px);
    }

    .cap-header__language.is-open .cap-header__lang-menu,
    .cap-header__lang-toggle:checked ~ .cap-header__lang-menu {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        z-index: 99999 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
        background: #080808 !important;
    }

    .cap-header__language.is-open .cap-header__lang-close,
    .cap-header__lang-toggle:checked ~ .cap-header__lang-menu .cap-header__lang-close {
        z-index: 100000 !important;
        pointer-events: auto !important;
    }
}


/* Mobile fullscreen menu based on the same checkbox + label idea as language selector */
.cap-header__mobile {
    display: none;
}

.cap-header__mobile-toggle,
.cap-header__mobile-subtoggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cap-header__mobile-burger {
    width: 42px;
    height: 42px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.cap-header__mobile-burger span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

.cap-header__mobile-burger:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
}

.cap-header__mobile-toggle:checked + .cap-header__mobile-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.cap-header__mobile-toggle:checked + .cap-header__mobile-burger span:nth-child(2) {
    opacity: 0;
}

.cap-header__mobile-toggle:checked + .cap-header__mobile-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.cap-header__mobile-menu {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 22px 16px 26px;
    display: flex;
    flex-direction: column;
    background: #080808;
    z-index: 90000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cap-header__mobile-toggle:checked ~ .cap-header__mobile-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cap-header__mobile-head {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cap-header__mobile-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.cap-header__mobile-close {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: #ffffff;
    font-size: 0;
    cursor: pointer;
    transition: background .18s ease;
}

.cap-header__mobile-close:hover {
    background: rgba(255, 255, 255, 0.075);
}

.cap-header__mobile-close::before,
.cap-header__mobile-close::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.cap-header__mobile-close::before {
    transform: rotate(45deg);
}

.cap-header__mobile-close::after {
    transform: rotate(-45deg);
}

.cap-header__mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 2px;
}

.cap-header__mobile-link {
    min-height: 52px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.15px;
    cursor: pointer;
    user-select: none;
    transition: color .18s ease, background .18s ease, padding-left .18s ease;
}

.cap-header__mobile-link:hover {
    color: #ffffff;
    background: transparent;
    padding-left: 6px;
}

.cap-header__mobile-link:active {
    color: #c68f57;
}

.cap-header__mobile-arrow,
.cap-header__mobile-go {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: .9;
    flex: 0 0 auto;
}

.cap-header__mobile-arrow {
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease, color .18s ease;
}

.cap-header__mobile-go {
    transform: rotate(-45deg);
}

.cap-header__mobile-subtoggle:checked + .cap-header__mobile-link {
    color: #c68f57;
}

.cap-header__mobile-subtoggle:checked + .cap-header__mobile-link .cap-header__mobile-arrow {
    transform: rotate(225deg) translateY(-1px);
}

.cap-header__mobile-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .24s ease, opacity .18s ease, transform .18s ease;
}

.cap-header__mobile-subtoggle:checked ~ .cap-header__mobile-submenu {
    max-height: 280px;
    opacity: 1;
    transform: translateY(0);
}

.cap-header__mobile-sub {
    min-height: 42px;
    margin: 0;
    padding: 0 0 0 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color .18s ease, padding-left .18s ease;
}

.cap-header__mobile-sub span {
    color: rgba(255, 255, 255, 0.38);
    font-size: 11px;
    font-weight: 600;
}

.cap-header__mobile-sub:hover {
    color: #ffffff;
    background: transparent;
    border-color: transparent;
    padding-left: 24px;
}

.cap-header__mobile-auth {
    padding-top: 26px;
    display: block;
}

.cap-header__mobile-auth-link {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(198, 143, 87, 0.75);
    background: #c68f57;
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.1px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.cap-header__mobile-auth-link:hover {
    background: #d49d65;
    border-color: #d49d65;
    transform: translateY(-1px);
}

.cap-header__mobile-auth-link--accent {
    background: #c68f57;
    border-color: #c68f57;
    color: #111111;
}

body.cap-mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .cap-header__mobile {
        display: inline-flex;
        align-items: center;
        order: 20;
    }

    .cap-header__actions {
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .cap-header__mobile-burger {
        width: 44px;
        height: 44px;
    }

    .cap-header__mobile-menu {
        z-index: 90000;
    }

    .cap-header__language.is-open ~ .cap-header__mobile,
    .cap-header__lang-toggle:checked ~ .cap-header__mobile {
        display: none;
    }
}


/* Header account menu */
.cap-header__account {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cap-header__account-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cap-header__account-trigger {
    height: 40px;
    min-width: 54px;
    padding: 0 9px 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.cap-header__account-trigger:hover,
.cap-header__account.is-open .cap-header__account-trigger,
.cap-header__account-toggle:checked + .cap-header__account-trigger {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(198, 143, 87, 0.42);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(198, 143, 87, 0.08);
}

.cap-header__account-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cap-header__account-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cap-header__account-avatar--large {
    width: 52px;
    height: 52px;
    min-width: 52px;
}

.cap-header__account-chevron {
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .78;
    transition: transform .18s ease;
}

.cap-header__account.is-open .cap-header__account-chevron,
.cap-header__account-toggle:checked + .cap-header__account-trigger .cap-header__account-chevron {
    transform: rotate(225deg) translateY(-1px);
}

.cap-header__account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 312px;
    max-height: calc(100vh - 86px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.98);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 1010;
}

.cap-header__account-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 27px;
    width: 12px;
    height: 12px;
    background: #111111;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}

.cap-header__account.is-open .cap-header__account-menu,
.cap-header__account-toggle:checked ~ .cap-header__account-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.cap-header__account-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 18px 16px 14px;
}

.cap-header__account-user {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cap-header__account-email {
    max-width: 190px;
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cap-header__account-uid {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.cap-header__account-copy {
    width: 18px;
    height: 18px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: color .18s ease;
}

.cap-header__account-copy:hover {
    color: #c68f57;
}

.cap-header__account-copy svg {
    width: 15px;
    height: 15px;
}

.cap-header__account-badges {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 8px;
}

.cap-header__account-badge {
    min-height: 25px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.cap-header__account-badge--muted {
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.38);
}

.cap-header__account-badge--vip {
    background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.78));
    color: #171717;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.cap-header__account-close {
    display: none;
}

.cap-header__account-nav {
    padding: 4px 0 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 143, 87, 0.45) rgba(255, 255, 255, 0.04);
}

.cap-header__account-link {
    min-height: 54px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color .18s ease, background .18s ease, padding-left .18s ease;
}

.cap-header__account-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.045);
    padding-left: 22px;
}

.cap-header__account-ico {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.86);
}

.cap-header__account-ico svg {
    width: 20px;
    height: 20px;
    display: block;
}

.cap-header__account-logout {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color .18s ease, background .18s ease;
}

.cap-header__account-logout:hover {
    color: #c68f57;
    background: rgba(255, 255, 255, 0.035);
}

.cap-header__account-trigger:focus-visible,
.cap-header__account-link:focus-visible,
.cap-header__account-logout:focus-visible,
.cap-header__account-copy:focus-visible,
.cap-header__account-close:focus-visible {
    outline: 2px solid rgba(198, 143, 87, 0.75);
    outline-offset: 4px;
}

body.cap-account-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .cap-header__account-trigger {
        width: 42px;
        min-width: 42px;
        padding: 0;
    }

    .cap-header__account-chevron {
        display: none;
    }

    .cap-header__account-menu {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: #080808;
        box-shadow: none;
        transform: translateY(12px);
        transform-origin: center;
        z-index: 95000;
    }

    .cap-header__account-menu::before {
        display: none;
    }

    .cap-header__account-head {
        min-height: 86px;
        align-items: center;
        padding: 18px 16px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .cap-header__account-avatar--large {
        width: 54px;
        height: 54px;
        min-width: 54px;
    }

    .cap-header__account-email {
        max-width: calc(100vw - 150px);
    }

    .cap-header__account-close {
        position: fixed;
        top: 18px;
        right: 16px;
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.055);
        color: #ffffff;
        font-size: 0;
        cursor: pointer;
        z-index: 95001;
    }

    .cap-header__account-close::before,
    .cap-header__account-close::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 1.8px;
        border-radius: 999px;
        background: currentColor;
    }

    .cap-header__account-close::before {
        transform: rotate(45deg);
    }

    .cap-header__account-close::after {
        transform: rotate(-45deg);
    }

    .cap-header__account-nav {
        flex: 1 1 auto;
        padding: 12px 0 8px;
    }

    .cap-header__account-link {
        min-height: 56px;
        padding: 0 18px;
        font-size: 14px;
    }

    .cap-header__account-logout {
        min-height: 58px;
        background: rgba(255, 255, 255, 0.02);
    }
}


@media (min-width: 901px) {
    .cap-header__account::after {
        content: "";
        position: absolute;
        top: 100%;
        right: 0;
        width: 312px;
        height: 14px;
        display: none;
    }

    .cap-header__account:hover::after,
    .cap-header__account:focus-within::after {
        display: block;
    }

    .cap-header__account:hover .cap-header__account-trigger,
    .cap-header__account:focus-within .cap-header__account-trigger {
        background: rgba(255, 255, 255, 0.075);
        border-color: rgba(198, 143, 87, 0.42);
        color: #ffffff;
        box-shadow: 0 0 0 3px rgba(198, 143, 87, 0.08);
    }

    .cap-header__account:hover .cap-header__account-chevron,
    .cap-header__account:focus-within .cap-header__account-chevron {
        transform: rotate(225deg) translateY(-1px);
    }

    .cap-header__account:hover .cap-header__account-menu,
    .cap-header__account:focus-within .cap-header__account-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 520px) {
    .cap-header__account-trigger {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .cap-header__account-trigger .cap-header__account-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
}

/* Account verification badge */
.cap-header__account-badge--verify {
    border: 1px solid transparent;
    letter-spacing: -0.01em;
}

.cap-header__account-badge--verify.is-unverified {
    color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.08);
}

.cap-header__account-badge--verify.is-verified {
    color: #07150d;
    background: linear-gradient(180deg, rgba(52, 232, 143, 0.96), rgba(35, 172, 104, 0.92));
    border-color: rgba(52, 232, 143, 0.42);
    box-shadow: 0 0 0 1px rgba(52, 232, 143, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}


/* Account rank badges */
.cap-header__account-badge--rank {
    color: #111111;
    background: linear-gradient(180deg, rgba(214, 214, 214, 0.98), rgba(165, 165, 165, 0.92));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.cap-header__account-badge--rank-basic {
    color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.cap-header__account-badge--rank-starter {
    color: #111111;
    background: linear-gradient(180deg, rgba(198, 143, 87, 0.96), rgba(156, 107, 61, 0.94));
    border-color: rgba(198, 143, 87, 0.42);
}

.cap-header__account-badge--rank-active {
    color: #06130d;
    background: linear-gradient(180deg, rgba(52, 232, 143, 0.96), rgba(35, 172, 104, 0.94));
    border-color: rgba(52, 232, 143, 0.42);
}

.cap-header__account-badge--rank-trader {
    color: #111111;
    background: linear-gradient(180deg, rgba(222, 183, 128, 0.98), rgba(198, 143, 87, 0.94));
    border-color: rgba(198, 143, 87, 0.48);
}

.cap-header__account-badge--rank-pro {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(73, 73, 73, 0.98), rgba(28, 28, 28, 0.96));
    border-color: rgba(198, 143, 87, 0.38);
}

.cap-header__account-badge--rank-vip {
    color: #111111;
    background: linear-gradient(180deg, rgba(245, 219, 170, 0.98), rgba(198, 143, 87, 0.96));
    border-color: rgba(245, 219, 170, 0.46);
    box-shadow: 0 0 0 1px rgba(198, 143, 87, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}


/* Buy Crypto button for authorized users */
@media (max-width: 900px) {
    .cap-header__buy-crypto {
        height: 40px;
        min-width: 104px;
        padding: 0 16px;
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .cap-header__buy-crypto {
        height: 38px;
        min-width: 88px;
        padding: 0 12px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .cap-header__buy-crypto {
        min-width: 58px;
        padding: 0 12px;
    }

    .cap-header__buy-crypto-full {
        display: none;
    }

    .cap-header__buy-crypto-short {
        display: inline;
    }
}
