.legal-page {
    background:
        radial-gradient(circle at 8% 18%, rgba(23, 166, 115, 0.1), transparent 26rem),
        linear-gradient(180deg, #edf6f5 0, var(--paper) 34rem);
}

.legal-main {
    padding: clamp(2rem, 6vw, 5.5rem) 0;
}

.legal-shell {
    width: min(920px, calc(100% - 40px));
    margin-inline: auto;
}

.legal-document {
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5rem);
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(12, 107, 77, 0.14);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.legal-document [data-custom-class="body"] {
    max-width: 100%;
    margin: 0 !important;
}

.legal-document [data-custom-class="title"],
.legal-document [data-custom-class="title"] * {
    color: var(--ink) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(2.65rem, 8vw, 4.7rem) !important;
    font-weight: 600 !important;
    letter-spacing: -0.045em !important;
    line-height: 1.02 !important;
}

.legal-document [data-custom-class="subtitle"],
.legal-document [data-custom-class="subtitle"] * {
    color: var(--green-700) !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 750 !important;
    letter-spacing: 0.03em !important;
}

.legal-document [data-custom-class="heading_1"],
.legal-document [data-custom-class="heading_1"] * {
    color: var(--ink) !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.015em !important;
    line-height: 1.3 !important;
}

.legal-document [data-custom-class="heading_2"],
.legal-document [data-custom-class="heading_2"] * {
    color: var(--green-700) !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: clamp(1.05rem, 2.5vw, 1.2rem) !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
}

.legal-document [data-custom-class="body_text"],
.legal-document [data-custom-class="body_text"] * {
    color: #485b66 !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.72 !important;
}

.legal-document [data-custom-class="body_text"] strong,
.legal-document [data-custom-class="body_text"] strong * {
    color: var(--ink) !important;
}

.legal-document [data-custom-class="link"],
.legal-document [data-custom-class="link"] * {
    color: var(--green-700) !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: inherit !important;
    font-weight: 700 !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.18em !important;
    word-break: break-word !important;
}

.legal-document [data-custom-class="link"]:hover,
.legal-document [data-custom-class="link"]:focus-visible {
    color: var(--green-500) !important;
}

.legal-document [id] {
    scroll-margin-top: 1.5rem;
}

.legal-document ul,
.legal-document ol {
    max-width: 100%;
    padding-left: 1.5rem;
}

.legal-document li {
    padding-left: 0.25rem;
}

.legal-document table {
    max-width: 100%;
    border-collapse: collapse;
}

.legal-document img,
.legal-document iframe {
    max-width: 100%;
}

.legal-document bdt {
    max-width: 100%;
}

@media (max-width: 760px) {
    .legal-shell {
        width: min(100% - 20px, 920px);
    }

    .legal-document {
        padding: 1.6rem;
        border-radius: 20px;
    }

    .legal-document [data-custom-class="body_text"],
    .legal-document [data-custom-class="body_text"] * {
        font-size: 0.96rem !important;
        line-height: 1.68 !important;
    }
}

@media (max-width: 420px) {
    .legal-main {
        padding-top: 0.75rem;
    }

    .legal-shell {
        width: min(100% - 10px, 920px);
    }

    .legal-document {
        padding: 1.25rem;
        border-radius: 15px;
    }

    .legal-document ul,
    .legal-document ol {
        padding-left: 1.15rem;
    }
}
