.ae-legal-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 170, 135, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(65, 154, 248, 0.18), transparent 26%),
        linear-gradient(180deg, #f6fbff 0%, #ffffff 54%, #f8f5ff 100%);
    color: #243248;
    font-family: "Montserrat", Arial, sans-serif;
}

.ae-legal-page__shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.ae-legal-page__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ae-legal-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(165, 184, 218, 0.35);
    box-shadow: 0 14px 30px rgba(55, 79, 119, 0.1);
    color: #2f4a73;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ae-legal-page__brand {
    color: #355180;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ae-legal-article {
    padding: 34px;
    border: 1px solid rgba(165, 184, 218, 0.28);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 28px 64px rgba(52, 76, 115, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ae-legal-article__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(65, 154, 248, 0.1);
    color: #2f70d8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ae-legal-article__title {
    margin: 18px 0 12px;
    color: #1c2b43;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    font-weight: 800;
}

.ae-legal-article__effective {
    margin: 0 0 22px;
    color: #63728a;
    font-size: 15px;
    line-height: 1.65;
}

.ae-legal-section + .ae-legal-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(219, 228, 244, 0.9);
}

.ae-legal-section__title {
    margin: 0 0 14px;
    color: #22324c;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

.ae-legal-section__text {
    margin: 0 0 12px;
    color: #52627b;
    font-size: 16px;
    line-height: 1.8;
}

.ae-legal-section__list {
    margin: 0;
    padding-left: 22px;
    color: #52627b;
}

.ae-legal-section__list li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.8;
}

.ae-legal-article__footer {
    margin-top: 30px;
    padding: 18px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(255, 247, 245, 0.96));
    color: #41526e;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 700;
}

.ae-legal-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 28, 45, 0.58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 12000;
}

.ae-legal-modal.is-open {
    display: flex;
}

.ae-legal-modal__dialog {
    width: min(980px, 100%);
    max-height: min(86vh, 920px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(169, 186, 217, 0.32);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
    box-shadow: 0 36px 80px rgba(17, 33, 59, 0.28);
}

.ae-legal-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(221, 229, 244, 0.9);
}

.ae-legal-modal__label {
    color: #395688;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ae-legal-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(65, 154, 248, 0.1);
    color: #2f70d8;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.ae-legal-modal__body {
    overflow: auto;
    padding: 20px 24px 24px;
}

.ae-legal-modal .ae-legal-article {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.ae-legal-modal-open {
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .ae-legal-page__shell {
        width: min(100% - 20px, 100%);
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .ae-legal-page__hero {
        flex-direction: column;
        align-items: stretch;
    }

    .ae-legal-article,
    .ae-legal-modal__header,
    .ae-legal-modal__body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .ae-legal-article {
        border-radius: 26px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .ae-legal-modal {
        padding: 12px;
    }

    .ae-legal-modal__dialog {
        border-radius: 26px;
    }

    .ae-legal-section__title {
        font-size: 20px;
    }

    .ae-legal-section__text,
    .ae-legal-section__list li {
        font-size: 15px;
    }
}
