/* ═══════════════════════════════════════════
   legal.css — Privacy Policy & Terms of Service
   ═══════════════════════════════════════════ */

/* Override body overflow-x:hidden which breaks sticky in Chrome */
body.page-static { overflow-x: visible !important; }
html:has(body.page-static) { overflow-x: hidden; }

/* ── TOC Sidebar — pure CSS sticky ── */
.legal-content .toc {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(var(--header-h, 72px) + 2rem) !important;
    align-self: start !important;
    max-height: calc(100vh - var(--header-h, 72px) - 4rem);
    overflow-y: auto;
}
.legal-content .toc-title {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}
.legal-content .toc-list {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.legal-content .toc-item a {
    display: block;
    padding: .375rem .75rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: .5rem;
    border-left: 2px solid transparent;
    transition: all .2s;
}
.legal-content .toc-item a:hover,
.legal-content .toc-item a.active {
    color: var(--brand, #1d4ed8);
    background: rgba(59, 130, 246, .06);
    border-left-color: var(--brand, #1d4ed8);
}
@media (max-width: 1023px) {
    .legal-content .toc { display: none !important; }
    .legal-content {
        display: block !important;
        grid-template-columns: none !important;
        padding: 2rem 1rem 3rem !important;
    }
}

/* ── Content area ── */
.legal-content .content { min-width: 0; }

.legal-content .section {
    margin-bottom: 3.5rem;
    padding-top: 1rem;
}
.legal-content .section-anchor {
    display: block;
    visibility: hidden;
    height: 80px;
    margin-top: -80px;
}
.legal-content .section-num {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand, #1d4ed8);
    margin-bottom: .5rem;
    display: block;
}
.legal-content .section h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-900, #0f172a);
    line-height: 1.25;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--gray-100, #f1f5f9);
}
.legal-content .section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800, #1e293b);
    margin: 1.5rem 0 .625rem;
}
.legal-content .section p {
    font-size: .9375rem;
    color: var(--gray-600, #475569);
    line-height: 1.8;
    margin-bottom: .875rem;
}
.legal-content .section p:last-child { margin-bottom: 0; }
.legal-content .section strong {
    color: var(--gray-800, #1e293b);
    font-weight: 600;
}
.legal-content .section a {
    color: var(--brand, #1d4ed8);
    font-weight: 500;
}
.legal-content .section a:hover { text-decoration: underline; }
.legal-content .section .caps {
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-700, #334155);
    line-height: 1.75;
    margin-bottom: .875rem;
}

/* ── Bullet list ── */
.legal-content .policy-list {
    list-style: none;
    margin: .625rem 0 .875rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.legal-content .policy-list li {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .9375rem;
    color: var(--gray-600, #475569);
    line-height: 1.7;
}
.legal-content .policy-list li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand-light, #3b82f6);
    flex-shrink: 0;
    margin-top: .55rem;
}

/* ── Notice box ── */
.legal-content .notice {
    background: rgba(59, 130, 246, .04);
    border: 1px solid rgba(59, 130, 246, .15);
    border-left: 3px solid var(--brand, #1d4ed8);
    border-radius: 0 .75rem .75rem 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}
.legal-content .notice p {
    font-size: .875rem;
    color: var(--gray-700, #334155);
    font-style: italic;
    margin: 0;
    line-height: 1.7;
}
.legal-content .notice--warn {
    background: rgba(245, 158, 11, .04);
    border: 1px solid rgba(245, 158, 11, .2);
    border-left: 3px solid #f59e0b;
}
.legal-content .notice--warn p { color: var(--gray-800, #1e293b); }

/* ── Definition list ── */
.legal-content .def-list {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    margin: .75rem 0;
}
.legal-content .def-item {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
    padding: .875rem 1rem;
    background: var(--gray-50, #f8fafc);
    border-radius: .75rem;
    border: 1px solid var(--gray-200, #e2e8f0);
}
.legal-content .def-term {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--brand, #1d4ed8);
    min-width: 9rem;
    flex-shrink: 0;
    padding-top: .1rem;
    line-height: 1.5;
}
.legal-content .def-desc {
    font-size: .875rem;
    color: var(--gray-600, #475569);
    line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .legal-content .def-item { flex-direction: column; gap: .25rem; }
    .legal-content .def-term { min-width: 0; }
}
