body.jsm-legal-body {
    min-height: 100vh;
    margin: 0;
    background-color: #07182a;
    background-image:
        radial-gradient(circle at 88% 82%, rgba(25, 120, 181, 0.22), transparent 28%),
        radial-gradient(circle, rgba(117, 171, 210, 0.18) 1px, transparent 1.4px);
    background-position: center, 0 0;
    background-size: auto, 22px 22px;
    color: #172033;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.jsm-legal-body a,
body.jsm-legal-body button {
    font: inherit;
}

body.public-legal-body .jsm-legal-main,
body.jsm-legal-authenticated .jsm-legal-main {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0 0 64px;
    overflow: visible;
}

body.public-legal-body .jsm-legal-main {
    margin: 0;
    background: transparent;
}

.jsm-legal-header {
    width: 100%;
    min-height: 76px;
    padding-right: max(28px, calc((100vw - 1440px) / 2));
    padding-left: max(28px, calc((100vw - 1440px) / 2));
    border: 0;
    border-bottom: 1px solid rgba(160, 194, 224, 0.14);
    background: #06101e;
}

.jsm-legal-hero {
    width: min(1040px, calc(100% - 56px));
    margin: 42px auto 24px;
    padding: clamp(36px, 5vw, 56px);
    border: 1px solid rgba(158, 194, 221, 0.2);
    border-top: 3px solid #e8cd74;
    background:
        radial-gradient(circle at 86% 10%, rgba(40, 168, 223, 0.16), transparent 38%),
        rgba(5, 17, 31, 0.94);
    color: #fff;
}

.jsm-legal-hero > span {
    display: inline-block;
    margin-bottom: 16px;
    color: #e8cd74;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.jsm-legal-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.jsm-legal-hero p {
    max-width: 820px;
    margin: 24px 0 0;
    color: #c1cfdd;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.72;
}

.jsm-legal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 796px);
    justify-content: center;
    gap: 24px;
    width: min(1040px, calc(100% - 56px));
    margin: 0 auto;
    padding-top: 0;
}

.jsm-legal-toc {
    align-self: start;
    position: sticky;
    top: 24px;
    padding: 24px 20px;
    border: 1px solid rgba(158, 194, 221, 0.18);
    background: rgba(5, 17, 31, 0.9);
}

.jsm-legal-toc > strong {
    display: block;
    margin-bottom: 16px;
    color: #e8cd74;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.jsm-legal-toc nav {
    display: grid;
    gap: 9px;
}

.jsm-legal-toc a {
    color: #aebed0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.42;
    text-decoration: none;
}

.jsm-legal-toc a:hover {
    color: #f3dd91;
}

.jsm-legal-document {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.jsm-legal-section {
    scroll-margin-top: 28px;
    padding: clamp(26px, 4vw, 38px);
    border: 1px solid rgba(13, 35, 54, 0.12);
    border-top: 3px solid #e8cd74;
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16);
}

.jsm-legal-section + .jsm-legal-section {
    padding-top: clamp(26px, 4vw, 38px);
}

.jsm-legal-section h2 {
    margin: 0 0 18px;
    color: #101827;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.jsm-legal-section p {
    margin: 0 0 15px;
    color: #4b596b;
    font-size: 15px;
    line-height: 1.78;
}

.jsm-legal-section p a {
    color: #0d6f9d;
    font-weight: 750;
}

.jsm-legal-section ul {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.jsm-legal-section li {
    position: relative;
    padding-left: 22px;
    color: #445265;
    font-size: 14px;
    line-height: 1.65;
}

.jsm-legal-section li::before {
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0aa4e;
    content: "";
}

.jsm-legal-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 36px;
    margin: 26px 0 0;
    padding: 24px 0;
    border-top: 1px solid #dce2e8;
    border-bottom: 1px solid #dce2e8;
}

.jsm-legal-contact > div {
    display: grid;
    gap: 5px;
}

.jsm-legal-contact span {
    color: #8995a4;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.jsm-legal-contact strong,
.jsm-legal-contact a {
    color: #172033;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.jsm-legal-small {
    margin-top: 18px !important;
    color: #7b8797 !important;
    font-size: 13px !important;
}

.jsm-legal-note,
.jsm-legal-warning {
    margin-top: 24px;
    padding: 20px 22px;
    background: #eaf3f8;
}

.jsm-legal-warning {
    background: #fff2df;
}

.jsm-legal-note strong,
.jsm-legal-warning strong {
    display: block;
    margin-bottom: 6px;
    color: #162234;
    font-size: 13px;
}

.jsm-legal-note p,
.jsm-legal-warning p {
    margin: 0;
    color: #4b596b;
    font-size: 14px;
    line-height: 1.6;
}

.jsm-legal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    width: min(1040px, calc(100% - 56px));
    margin: 28px auto 0;
}

.jsm-legal-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.jsm-legal-back {
    color: #c4d1df;
}

.jsm-legal-primary {
    background: linear-gradient(135deg, #e8cd74, #f7e6a0);
    color: #07101d;
}

@media (max-width: 980px) {
    .jsm-legal-layout {
        grid-template-columns: 1fr;
    }

    .jsm-legal-toc {
        position: static;
        padding-bottom: 28px;
        border-bottom: 1px solid #dce2e8;
    }

    .jsm-legal-toc nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .jsm-legal-header {
        width: 100%;
        padding-right: 14px;
        padding-left: 14px;
    }

    .jsm-legal-nav {
        display: none;
    }

    .jsm-legal-hero {
        padding: 54px 24px 60px;
    }

    .jsm-legal-layout {
        width: calc(100% - 40px);
        padding-top: 48px;
    }

    .jsm-legal-toc nav {
        grid-template-columns: 1fr;
    }

    .jsm-legal-section {
        padding-bottom: 38px;
    }

    .jsm-legal-section + .jsm-legal-section {
        padding-top: 38px;
    }

    .jsm-legal-contact {
        grid-template-columns: 1fr;
    }

    .jsm-legal-actions {
        width: calc(100% - 40px);
        flex-direction: column;
    }

    .jsm-legal-actions a {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .jsm-legal-header .jsm-public-brand > span:last-child {
        display: none;
    }

    .jsm-legal-hero h1 {
        font-size: 2.55rem;
    }
}
