/* Legal & Policies pages -- scoped under .legal-scope. Mirrors the blog
detail page's sticky-TOC structure (static/css/blog.css .bl-toc), but not
its CSS directly -- that's hard-scoped under .blog-scope with its own
custom-property namespace, so this is a parallel stylesheet with the same
shape rather than a shared one. */

.legal-scope {
    --lg-space: 8px;
    --lg-radius: 14px;
    --lg-surface: #ffffff;
    --lg-surface-muted: #f6f8fb;
    --lg-border: #e6eaf0;
    --lg-border-strong: #cfd8e6;
    --lg-text: #1f2733;
    --lg-text-muted: #5b6776;
    --lg-accent: var(--brand-primary, #5A5FCF);
    color: var(--lg-text);
}

.legal-scope .lg-surface {
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    border-radius: var(--lg-radius);
}

/* ---- Header band -------------------------------------------------- */
.legal-scope .lg-header-band {
    display: flex; align-items: flex-start; gap: 16px;
    background: linear-gradient(135deg, var(--brand-primary, #5A5FCF) 0%, var(--brand-secondary, #2a7bd8) 100%);
    border-radius: var(--lg-radius);
    padding: 28px 28px 24px;
    color: #fff;
    margin-bottom: 24px;
}
.legal-scope .lg-header-icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
}
.legal-scope .lg-header-text { flex: 1; min-width: 0; }
.legal-scope .lg-title { font-size: 1.85rem; font-weight: 700; color: #fff; margin: 0; }
.legal-scope .lg-header-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.legal-scope .lg-header-actions .btn-outline-secondary {
    background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); color: #fff;
}
.legal-scope .lg-header-actions .btn-outline-secondary:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.legal-scope .lg-header-actions .btn-light { font-weight: 600; }

.legal-scope .lg-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.legal-scope .lg-meta-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px; padding: 5px 12px; font-size: 0.82rem; color: #fff;
}

/* ---- Body typography -------------------------------------------------- */
.legal-scope .lg-content-card { padding: 32px; }
.legal-scope .lg-body { font-size: 17px; line-height: 1.75; color: var(--lg-text); }
.legal-scope .lg-body h2 {
    font-size: 1.5rem; font-weight: 700; margin: 2.2rem 0 1rem;
    scroll-margin-top: 96px;
}
.legal-scope .lg-body h3 {
    font-size: 1.2rem; font-weight: 600; margin: 1.6rem 0 0.8rem;
    scroll-margin-top: 96px;
}
.legal-scope .lg-body p { margin-bottom: calc(var(--lg-space) * 2.5); }
.legal-scope .lg-body ul,
.legal-scope .lg-body ol { margin-bottom: calc(var(--lg-space) * 2.5); padding-left: 1.4rem; }
.legal-scope .lg-body blockquote {
    border-left: 3px solid var(--lg-accent); padding: 0.5rem 0 0.5rem 1rem;
    color: var(--lg-text-muted); margin: 1.2rem 0;
}

/* ---- Sticky sidebar (desktop) / collapsible (mobile) ------------------ */
.legal-scope .lg-sidebar { position: sticky; top: 80px; }
.legal-scope .lg-side-heading {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--lg-text-muted); margin-bottom: 8px;
}
.legal-scope .lg-list { list-style: none; margin: 0 0 18px; padding: 0; border-left: 2px solid var(--lg-border); }
.legal-scope .lg-list:last-child { margin-bottom: 0; }
.legal-scope .lg-list a {
    display: block; padding: 6px 14px; margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--lg-text-muted); text-decoration: none; font-size: 14px; line-height: 1.4;
}
.legal-scope .lg-list a:hover { color: var(--lg-text); }
.legal-scope .lg-list a.active,
.legal-scope .lg-list a.lg-current {
    color: var(--lg-accent); border-left-color: var(--lg-accent); font-weight: 500;
}
.legal-scope .lg-list.lg-toc-list a { font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.legal-scope .lg-list.lg-toc-list li[data-toc-level="3"] a { padding-left: 26px; }

@media (max-width: 991.98px) {
    .legal-scope .lg-sidebar { position: static; }
}

/* ---- Index cards -------------------------------------------------- */
.legal-scope .lg-index-card {
    display: block; text-decoration: none; color: inherit;
    padding: 20px; transition: box-shadow .15s ease, border-color .15s ease;
}
.legal-scope .lg-index-card:hover { box-shadow: 0 8px 20px rgba(16, 24, 40, .08); border-color: var(--lg-border-strong); }
.legal-scope .lg-index-card h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; color: var(--lg-text); }
.legal-scope .lg-index-card p { color: var(--lg-text-muted); font-size: 0.88rem; margin: 0; }

/* ---- Print button -------------------------------------------------- */
.legal-scope .lg-print-btn { white-space: nowrap; }

@media print {
    .legal-scope .lg-breadcrumb,
    .legal-scope .lg-sidebar,
    .legal-scope .lg-print-btn,
    .legal-scope .lg-header-actions,
    .legal-scope .lg-mobile-toc {
        display: none !important;
    }
    .legal-scope .lg-content-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .legal-scope .lg-body { font-size: 12pt; line-height: 1.5; }
    .legal-scope .lg-header-band {
        background: none !important; color: var(--lg-text) !important; padding: 0 !important; margin-bottom: 12pt !important;
    }
    .legal-scope .lg-header-icon { display: none !important; }
    .legal-scope .lg-title { color: var(--lg-text) !important; }
    .legal-scope .lg-meta-badge { background: none !important; border-color: var(--lg-border) !important; color: var(--lg-text-muted) !important; }
    .legal-scope .lg-content-card { padding: 0 !important; border: none !important; }
}
