/* Shared styles for /terms/ and /privacy/ pages.
   Slate + teal palette, sticky TOC on desktop, stacked on mobile. */

.legal-page {
    background: #f8fafc;
    padding: 60px 0 80px;
    color: #1e293b;
    line-height: 1.65;
}

.legal-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.legal-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}
.legal-pretitle {
    color: #0d9488;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
}
.legal-title {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.legal-updated {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.legal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    align-items: start;
}

/* Sticky table of contents (left column on desktop) */
.legal-toc {
    position: sticky;
    top: 100px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.legal-toc-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.legal-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.legal-toc li {
    counter-increment: toc;
    margin: 0;
}
.legal-toc li a {
    display: block;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
    padding: 6px 8px 6px 22px;
    position: relative;
    line-height: 1.4;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.legal-toc li a::before {
    content: counter(toc) ".";
    position: absolute;
    left: 4px;
    color: #94a3b8;
    font-weight: 600;
}
.legal-toc li a:hover {
    color: #0f766e;
    background: #f0fdfa;
}
.legal-toc li a.is-active {
    color: #0f766e;
    background: #f0fdfa;
    font-weight: 600;
}

/* Main content */
.legal-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 40px 48px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.legal-intro {
    color: #475569;
    font-size: 15.5px;
    margin: 0 0 28px;
}
.legal-section {
    scroll-margin-top: 90px;
    margin-bottom: 28px;
}
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    padding-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.legal-section h2 .legal-num {
    color: #0d9488;
    font-size: 14px;
    font-weight: 600;
    min-width: 26px;
}
.legal-section p {
    color: #334155;
    font-size: 15px;
    margin: 0 0 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
    margin: 8px 0 12px;
    padding-left: 22px;
    color: #334155;
    font-size: 15px;
}
.legal-section ul li { margin-bottom: 6px; }

.legal-footer-note {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}
.legal-footer-note a {
    color: #0f766e;
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .legal-toc {
        position: static;
        top: auto;
    }
    .legal-content {
        padding: 28px 24px;
    }
    .legal-title { font-size: 28px; }
}

/* Print */
@media print {
    .legal-page { background: white; padding: 0; }
    .legal-toc { display: none; }
    .legal-layout { grid-template-columns: 1fr; }
    .legal-content { border: none; box-shadow: none; padding: 0; }
}
