/* Legal template layout (2 columns: TOC | content) */
.legal-page .is-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.legal-page .is-title{
    text-align: center;
}

.legal-page .is-middle{
    width: 100%;
}

/* TOC box */
.legal-page .is-left {
    position: sticky;
    top: 6rem;
    /* adjust to your header height */
    align-self: start;
}

.legal-page #is-article h2{
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
    padding: unset;
    border-left: none;
    background: none;
}

.legal-page #is-article h3{
    font-size: 1.2rem;
}

.legal-page .is-toc {
    background: var(--card, #fff);
    border-radius: 12px;
    padding: 1rem;
}

.legal-page .is-toc h3 {
    font-size: 1rem;
    margin-bottom: .5rem;
}

.legal-page .is-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legal-page .is-toc li {
    margin: .25rem 0;
}

.legal-page .is-toc a {
    display: block;
    padding: .25rem .5rem;
    border-radius: 6px;
    color: var(--ink, #0F2654);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.legal-page .is-toc a:hover {
    background: #f5faff;
}

/* Prevent headings from hiding under sticky header when anchored */
.legal-page #is-article h2 {
    scroll-margin-top: 110px;
}

/* tweak to header height */

/* Smooth scroll for anchor links (optional) */
html {
    scroll-behavior: smooth;
}

/* Stack on mobile */
@media (max-width: 900px) {
    .legal-page .is-body {
        display: flex;
        flex-direction: column-reverse;
    }

    .legal-page .is-left {
        position: static;
        width: 100%;
    }
}