.legal-hero {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    background: #2b1738;
}

.legal-hero::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(43, 23, 56, .9), rgba(43, 23, 56, .28));
    content: '';
}

.legal-hero img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    opacity: .72;
}

.legal-hero .legal-hero-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
}

.legal-hero h1 {
    margin: 0;
    color: #fff;
    font: 800 clamp(32px, 4vw, 52px)/1.08 Inter, Arial, sans-serif;
    letter-spacing: -.03em;
}

.legal-hero p {
    max-width: 520px;
    margin: 12px 0 0;
    color: #f2eaf6;
    font: 400 15px/1.6 Inter, Arial, sans-serif;
}

.legal-page {
    padding: 76px 0 96px;
    background: #faf8fb;
}

.legal-page .log-in {
    align-items: flex-start;
}

.legal-page .sidebar-user {
    position: sticky;
    top: 24px;
}

.legal-page .dashboard-list {
    padding: 25px 22px;
    border: 1px solid #e7dcec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(58, 25, 74, .07);
}

.legal-page .dashboard-list h5 {
    margin: 0 0 16px;
    color: #2b1738;
    font: 800 15px/1.3 Inter, Arial, sans-serif;
}

.legal-page .right-line-tab {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
}

.legal-page .right-line-tab .nav-link {
    display: block;
    padding: 10px 12px;
    border: 0;
    border-left: 3px solid transparent;
    color: #6d6473;
    font: 600 12px/1.4 Inter, Arial, sans-serif;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.legal-page .right-line-tab .nav-link:hover,
.legal-page .right-line-tab .nav-link:focus-visible {
    border-left-color: #ff9d28;
    background: #faf4fd;
    color: #6816a5;
}

.legal-page .theme-card {
    padding: clamp(26px, 4vw, 52px);
    border: 1px solid #e7dcec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(58, 25, 74, .08);
}

.legal-page .theme-card > h2 {
    margin: 0 0 30px;
    color: #2b1738;
    font: 800 clamp(26px, 3vw, 38px)/1.15 Inter, Arial, sans-serif;
    letter-spacing: -.03em;
}

.legal-page .terms-wrap {
    display: grid;
    gap: 30px;
}

.legal-page .terms-wrapper {
    scroll-margin-top: 28px;
}

.legal-page .terms-wrapper + .terms-wrapper {
    padding-top: 30px;
    border-top: 1px solid #eee8f1;
}

.legal-page .terms-wrapper h4 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 12px;
    color: #6816a5;
    font: 800 18px/1.3 Inter, Arial, sans-serif;
}

.legal-page .terms-wrapper h4::before {
    width: 5px;
    height: 23px;
    border-radius: 4px;
    background: #ff9d28;
    content: '';
}

.legal-page .terms-wrapper p,
.legal-page .terms-wrapper li {
    color: #5f5964;
    font: 400 14px/1.85 Inter, Arial, sans-serif;
}

.legal-page .terms-wrapper p {
    margin: 0 0 13px;
}

.legal-page .terms-wrapper p:last-child {
    margin-bottom: 0;
}

.legal-page .terms-wrapper ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.legal-page .terms-wrapper li {
    margin-bottom: 9px;
    padding-left: 5px;
}

.legal-page .terms-wrapper li::marker {
    color: #ff9d28;
}

.legal-page .terms-wrapper a {
    color: #6816a5;
    font-weight: 700;
}

@media (max-width: 991px) {
    .legal-page {
        padding: 54px 0 70px;
    }

    .legal-page .sidebar-user {
        position: static;
        margin-bottom: 26px;
    }

    .legal-page .right-line-tab {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .legal-hero,
    .legal-hero img {
        min-height: 190px;
        height: 190px;
    }

    .legal-hero p {
        font-size: 13px;
    }

    .legal-page {
        padding: 38px 0 52px;
    }

    .legal-page .right-line-tab {
        display: block;
    }

    .legal-page .theme-card {
        padding: 24px 18px;
    }

    .legal-page .terms-wrapper p,
    .legal-page .terms-wrapper li {
        font-size: 13px;
        line-height: 1.75;
    }
}

@media (max-width: 1300px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: clip;
        overflow-y: visible;
        touch-action: pan-y;
    }

    .legal-hero,
    .legal-page,
    .legal-page .log-in,
    .legal-page .theme-card,
    .legal-page .terms-wrap {
        height: auto;
        min-height: 0;
    }
}
