.legal-page {
    background: #f4f7fb;
}

.legal-page .site-header {
    position: relative;
}

.legal-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.legal-back {
    min-height: 44px;
    color: var(--navy-900);
    background: var(--white);
    border-color: var(--line);
    box-shadow: none;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding-block: 82px 76px;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 12%, rgba(37, 211, 102, 0.18), transparent 30%),
        linear-gradient(145deg, var(--navy-950), var(--navy-800));
}

.legal-hero::after {
    position: absolute;
    right: -90px;
    bottom: -150px;
    width: 360px;
    height: 360px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.legal-kicker {
    margin: 0 0 16px;
    color: #8ce7ae;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.legal-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.7rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.legal-lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: #c9d6e5;
    font-size: clamp(1.03rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 26px 0 0;
    color: #9fb2c8;
    font-size: 0.86rem;
}

.legal-updated::before {
    width: 8px;
    height: 8px;
    content: "";
    background: var(--green-500);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(37, 211, 102, 0.12);
}

.legal-content-section {
    padding-block: 70px 96px;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(210px, 0.28fr) minmax(0, 0.72fr);
    align-items: start;
    gap: 64px;
}

.legal-toc {
    position: sticky;
    top: 28px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(6, 20, 38, 0.06);
}

.legal-toc strong {
    display: block;
    margin-bottom: 13px;
    color: var(--navy-900);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legal-toc a {
    display: block;
    padding-block: 7px;
    color: var(--slate-700);
    font-size: 0.9rem;
    line-height: 1.35;
    text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--blue-600);
}

.legal-article {
    padding: 18px 46px 48px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(6, 20, 38, 0.07);
}

.legal-section {
    scroll-margin-top: 28px;
    padding-top: 34px;
}

.legal-section + .legal-section {
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.legal-section h2 {
    margin: 0 0 16px;
    color: var(--navy-900);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.legal-section h3 {
    margin: 25px 0 8px;
    color: var(--navy-800);
    font-size: 1.02rem;
}

.legal-section p,
.legal-section li {
    color: var(--slate-700);
}

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

.legal-section ul,
.legal-section ol {
    margin: 12px 0 18px;
    padding-left: 1.35rem;
}

.legal-section li + li {
    margin-top: 9px;
}

.legal-section a {
    color: var(--blue-700);
    font-weight: 700;
}

.legal-note {
    margin-top: 22px;
    padding: 20px 22px;
    color: var(--navy-900);
    background: var(--green-100);
    border-left: 4px solid var(--green-600);
    border-radius: 0 14px 14px 0;
}

.legal-note p:last-child {
    margin-bottom: 0;
}

.legal-steps {
    padding-left: 0 !important;
    list-style: none;
    counter-reset: legal-step;
}

.legal-steps li {
    position: relative;
    min-height: 46px;
    padding: 3px 0 0 58px;
    counter-increment: legal-step;
}

.legal-steps li::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    content: counter(legal-step);
    color: var(--white);
    background: var(--navy-900);
    border-radius: 50%;
    font-weight: 850;
}

.legal-contact-card {
    margin-top: 24px;
    padding: 24px;
    background: #edf3fb;
    border: 1px solid #d5e0ef;
    border-radius: 16px;
}

.legal-contact-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--navy-900);
}

.legal-contact-card p:last-child {
    margin-bottom: 0;
}

.legal-page .site-footer {
    margin-top: 0;
}

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

    .legal-toc {
        position: static;
    }

    .legal-toc nav {
        columns: 2;
        column-gap: 28px;
    }

    .legal-toc a {
        break-inside: avoid;
    }
}

@media (max-width: 680px) {
    .legal-page {
        padding-bottom: 0;
    }

    .legal-header-inner {
        min-height: 64px;
    }

    .legal-header-inner .button {
        display: inline-flex;
        min-height: 40px;
        padding-inline: 0.85rem;
        font-size: 0.8rem;
    }

    .legal-hero {
        padding-block: 58px 56px;
    }

    .legal-hero h1 {
        font-size: clamp(2.35rem, 13vw, 3.35rem);
    }

    .legal-content-section {
        padding-block: 38px 70px;
    }

    .legal-toc {
        padding: 20px;
    }

    .legal-toc nav {
        columns: 1;
    }

    .legal-article {
        padding: 6px 22px 36px;
        border-radius: 18px;
    }

    .legal-section {
        padding-top: 28px;
    }

    .legal-section + .legal-section {
        margin-top: 22px;
    }
}
