.legal-page {
    width: min(100% - 3rem, 1180px);
    margin-inline: auto;
    padding: 7rem 0 6rem;
}

.legal-hero {
    max-width: 760px;
    margin: 0 auto 4.5rem;
    text-align: center;
}

.legal-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legal-hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.legal-lede {
    margin: 1rem auto 0;
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.legal-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    margin-top: 1.5rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}


/* Main document layout */

.legal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 720px);
    justify-content: center;
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
}


/* Sidebar */

.legal-sidebar {
    position: sticky;
    top: 7rem;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    padding-right: 1rem;
}

.legal-nav-title {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legal-sidebar nav {
    display: grid;
    gap: 0.15rem;
}

.legal-sidebar a {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-muted);
    text-decoration: none;
    transition:
        color 120ms ease,
        transform 120ms ease;
}

.legal-sidebar a:hover {
    color: var(--text-primary);
    transform: translateX(2px);
}


/* Document */

.legal-content {
    min-width: 0;
}

.legal-content section {
    padding: 0 0 3.5rem;
    margin: 0 0 3.5rem;
    border-bottom: 1px solid var(--border-subtle);
    scroll-margin-top: 7rem;
}

.legal-content section:last-child {
    border-bottom: 0;
}

.legal-content h2 {
    margin: 0 0 1.4rem;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.legal-content h3 {
    margin: 2rem 0 0.8rem;
    font-size: 1rem;
}

.legal-content p,
.legal-content li {
    font-size: 0.96rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.legal-content p {
    margin: 0.85rem 0;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.legal-content li + li {
    margin-top: 0.35rem;
}


/* Mobile */

@media (max-width: 820px) {
    .legal-page {
        width: min(100% - 1.5rem, 720px);
        padding-top: 5.5rem;
    }

    .legal-hero {
        text-align: left;
        margin-bottom: 3rem;
    }

    .legal-meta {
        justify-content: flex-start;
    }

    .legal-layout {
        display: block;
    }

    .legal-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 3rem;
        padding: 1rem 0 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .legal-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem 1rem;
    }
}

@media (max-width: 520px) {
    .legal-sidebar nav {
        grid-template-columns: 1fr;
    }
}