.legal-page {
    min-height: 100vh;
    padding: 124px 22px 70px;
    color: #fff;
    background:
        radial-gradient(
            circle at 82% 8%,
            rgba(126, 34, 206, 0.16),
            transparent 28%
        ),
        linear-gradient(180deg, #050508, #07050c 52%, #040407);
}

.legal-container {
    width: min(100%, 1060px);
    margin: 0 auto;
}

.legal-hero,
.legal-document {
    border: 1px solid rgba(192, 132, 252, 0.14);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.008)
        ),
        rgba(9, 7, 16, 0.82);
    box-shadow:
        0 30px 85px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 44px 40px;
    margin-bottom: 18px;
    border-radius: 27px;
}

.legal-hero::after {
    content: "";
    position: absolute;
    top: -125px;
    right: -65px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(192, 132, 252, 0.12);
    border-radius: 50%;
    background:
        repeating-radial-gradient(
            circle,
            transparent 0 34px,
            rgba(192, 132, 252, 0.045) 35px 36px
        );
    pointer-events: none;
}

.legal-kicker {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    padding: 0 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 999px;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.08);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.legal-hero h1 {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}

.legal-hero p {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.7;
}

.legal-meta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 21px;
}

.legal-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.025);
    font-size: 9px;
}

.legal-document {
    padding: 32px;
    border-radius: 24px;
}

.legal-section {
    padding: 22px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.legal-section:first-child {
    padding-top: 0;
}

.legal-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 13px;
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -0.5px;
}

.legal-section p,
.legal-section li {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    line-height: 1.75;
}

.legal-section p {
    margin: 0 0 10px;
}

.legal-section ul {
    display: grid;
    gap: 7px;
    margin: 12px 0;
    padding-left: 20px;
}

.legal-section a {
    color: #d8b4fe;
}

.legal-placeholder {
    color: #f0abfc;
    font-weight: 800;
}

.legal-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.legal-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(192, 132, 252, 0.14);
    border-radius: 13px;
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.055);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 680px) {
    .legal-page {
        padding: 94px 12px 38px;
    }

    .legal-hero {
        padding: 28px 19px;
        border-radius: 21px;
    }

    .legal-document {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .legal-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .legal-links a {
        justify-content: center;
    }
}


/* Legal pages visibility safeguard */

.legal-warning,
.legal-document,
.legal-links {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.legal-document {
    display: block;
}

.legal-section {
    display: block;
}


/* Legal pages stable layout */

.legal-page {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
}

.legal-container {
    display: block !important;
    position: relative !important;
}

.legal-hero {
    position: relative !important;
}

.legal-document {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 18px 0 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}
