:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

a {
    text-underline-offset: .18em;
}

.legal-body {
    --legal-primary: #5147e5;
    --legal-primary-dark: #3730a3;
    --legal-ink: #172033;
    --legal-muted: #667085;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 4% 12%, rgba(129, 140, 248, .13), transparent 28rem),
        radial-gradient(circle at 96% 42%, rgba(14, 165, 233, .08), transparent 32rem),
        #f8f9fc;
    color: var(--legal-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.legal-site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(23, 32, 51, .07);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
    backdrop-filter: blur(18px);
}

.legal-site-header__inner,
.legal-footer__inner {
    display: flex;
    align-items: center;
    width: min(100% - 40px, 1040px);
    margin: 0 auto;
}

.legal-site-header__inner {
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--legal-ink);
    font-size: 1.08rem;
    font-weight: 760;
    letter-spacing: -.025em;
    text-decoration: none;
}

.legal-brand__mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #6d63f0 0%, #4338ca 100%);
    box-shadow: 0 8px 20px rgba(79, 70, 229, .24);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}

.legal-brand__accent {
    color: var(--legal-primary);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid rgba(79, 70, 229, .17);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(23, 32, 51, .06);
    color: #3f3a9f;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.legal-back svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.legal-back:hover,
.legal-back:focus-visible {
    border-color: rgba(79, 70, 229, .35);
    box-shadow: 0 10px 24px rgba(79, 70, 229, .12);
    transform: translateY(-1px);
}

.legal-back:focus-visible,
.legal-brand:focus-visible,
.legal-nav a:focus-visible,
.legal-page a:focus-visible,
.legal-footer a:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .28);
    outline-offset: 3px;
}

.legal-main {
    width: 100%;
    padding: clamp(28px, 5vw, 58px) 20px 24px;
}

.legal-page {
    width: min(100%, 1040px);
    margin: 0 auto;
    color: var(--legal-ink);
}

.legal-hero {
    position: relative;
    isolation: isolate;
    min-height: 270px;
    padding: clamp(34px, 6vw, 68px);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: 28px;
    background: linear-gradient(118deg, rgba(255, 255, 255, .96) 0%, rgba(242, 244, 255, .92) 54%, rgba(232, 236, 255, .9) 100%);
    box-shadow: 0 22px 54px rgba(49, 46, 129, .09);
}

.legal-hero::before {
    position: absolute;
    z-index: -1;
    top: -132px;
    right: -92px;
    width: 330px;
    height: 330px;
    border: 52px solid rgba(99, 102, 241, .09);
    border-radius: 50%;
    content: "";
}

.legal-hero::after {
    position: absolute;
    z-index: -1;
    right: 72px;
    bottom: -90px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(56, 189, 248, .08);
    content: "";
    filter: blur(1px);
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--legal-primary);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #38bdf8);
    box-shadow: 0 0 0 5px rgba(99, 102, 241, .09);
    content: "";
}

.legal-hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    color: #141b2d;
    font-size: clamp(2.25rem, 6vw, 4.25rem);
    font-weight: 760;
    letter-spacing: -.052em;
    line-height: .98;
}

.legal-hero p {
    max-width: 790px;
    margin: 0;
    color: #5c667c;
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.7;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 22px;
    padding: 6px;
    border: 1px solid rgba(23, 32, 51, .07);
    border-radius: 17px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 10px 30px rgba(23, 32, 51, .045);
}

.legal-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #596378;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.legal-nav a:hover {
    background: #f3f4ff;
    color: var(--legal-primary-dark);
}

.legal-nav a[aria-current="page"] {
    background: linear-gradient(135deg, #6259e8, #4f46e5);
    box-shadow: 0 7px 18px rgba(79, 70, 229, .22);
    color: #fff;
}

.legal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.legal-summary article,
.legal-section {
    border: 1px solid rgba(23, 32, 51, .08);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 40px rgba(23, 32, 51, .05);
}

.legal-summary article {
    position: relative;
    min-height: 142px;
    padding: 25px 26px;
    overflow: hidden;
    border-radius: 20px;
}

.legal-summary article::before {
    display: block;
    width: 38px;
    height: 4px;
    margin-bottom: 19px;
    border-radius: 99px;
    background: linear-gradient(90deg, #6259e8, #38bdf8);
    content: "";
}

.legal-summary h2 {
    margin: 0 0 8px;
    color: #20283a;
    font-size: 1.02rem;
    font-weight: 760;
    letter-spacing: -.018em;
}

.legal-summary p {
    margin: 0;
    color: var(--legal-muted);
    font-size: .93rem;
    line-height: 1.58;
}

.legal-section {
    padding: clamp(26px, 4.8vw, 48px);
    margin-bottom: 16px;
    border-radius: 22px;
}

.legal-section h2 {
    margin: 0 0 20px;
    color: #1d2537;
    font-size: clamp(1.28rem, 3vw, 1.55rem);
    font-weight: 760;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.legal-section h3 {
    margin: 28px 0 10px;
    color: #2d374c;
    font-size: 1.02rem;
    font-weight: 740;
    letter-spacing: -.012em;
}

.legal-section p,
.legal-section li {
    color: #536077;
    font-size: .98rem;
    line-height: 1.76;
}

.legal-section p {
    margin: 0 0 17px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
    padding-left: 1.35rem;
    margin: 0 0 20px;
}

.legal-section li::marker {
    color: var(--legal-primary);
}

.legal-section li + li {
    margin-top: 7px;
}

.legal-section strong {
    color: #303a50;
    font-weight: 720;
}

.legal-callout {
    position: relative;
    padding: 19px 22px 19px 24px;
    margin-top: 22px;
    border: 1px solid rgba(99, 102, 241, .12);
    border-left: 4px solid var(--legal-primary);
    border-radius: 12px;
    background: linear-gradient(120deg, #f7f7ff, #f1f5ff);
    color: #465269;
    line-height: 1.65;
}

.legal-page a {
    color: var(--legal-primary-dark);
    font-weight: 600;
}

.legal-updated {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 28px;
    color: var(--legal-muted);
    font-size: .83rem;
}

.legal-updated::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a5b4fc;
    content: "";
}

.legal-footer {
    padding: 20px 20px 36px;
}

.legal-footer__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    color: #7a8498;
    font-size: .82rem;
}

.legal-footer a {
    color: #5d6680;
    font-weight: 600;
    text-decoration: none;
}

.legal-footer a:hover {
    color: var(--legal-primary);
}

.legal-footer__separator {
    width: 1px;
    height: 14px;
    background: #d9ddea;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .legal-back,
    .legal-nav a {
        transition: none;
    }
}

@media (max-width: 680px) {
    .legal-site-header__inner {
        width: min(100% - 28px, 1040px);
        min-height: 66px;
    }

    .legal-back {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .legal-back span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .legal-main {
        padding: 22px 14px 16px;
    }

    .legal-hero {
        min-height: 0;
        padding: 32px 24px 36px;
        border-radius: 22px;
    }

    .legal-hero::before {
        top: -150px;
        right: -160px;
    }

    .legal-hero h1 {
        font-size: clamp(2.18rem, 12vw, 3.15rem);
    }

    .legal-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .legal-nav::-webkit-scrollbar {
        display: none;
    }

    .legal-nav a {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .legal-summary {
        grid-template-columns: 1fr;
    }

    .legal-summary article {
        min-height: auto;
        padding: 22px;
        border-radius: 17px;
    }

    .legal-summary article::before {
        margin-bottom: 15px;
    }

    .legal-section {
        padding: 26px 22px;
        border-radius: 18px;
    }

    .legal-section p,
    .legal-section li {
        font-size: .95rem;
    }

    .legal-updated {
        align-items: flex-start;
        justify-content: flex-start;
        line-height: 1.5;
        text-align: left;
    }

    .legal-updated::before {
        flex: 0 0 auto;
        margin-top: .45em;
    }

    .legal-footer {
        padding-bottom: 28px;
    }

    .legal-footer__separator {
        display: none;
    }
}
