/*
 * static/css/legal_base.css
 * ─────────────────────────────────────────────────────────────────
 * Shared styles for ALL legal pages (privacy, terms, disclaimer, cookie).
 * REPLACES: privacy.css, terms.css, disclaimer.css, cookie.css
 *
 * Rules:
 *   - NEVER override body {}, html {}, or h1/h2/p globally
 *   - ALWAYS use CSS variables from theme.css
 *   - Scoped to .legal-page and .legal-content only
 * ─────────────────────────────────────────────────────────────────
 */

/* ── Page wrapper ─────────────────────────────────────────────── */
.legal-page {
    padding-top: calc(76px + 3rem);  /* fixed navbar (76px) + breathing room */
    padding-bottom: 5rem;
    min-height: 100vh;
}

/* ── Content column ───────────────────────────────────────────── */
.legal-content {
    max-width: 860px;
    margin: 0 auto;
    /* NO background-color override — inherits --bg-primary from body */
}

/* ── Page title ───────────────────────────────────────────────── */
.legal-content h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.legal-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    display: block;
}

/* ── Section heading divider under h1 ─────────────────────────── */
.legal-content h1 + .legal-meta {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
}

/* ── Section headings ─────────────────────────────────────────── */
.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent);
}

/* ── Body text ────────────────────────────────────────────────── */
.legal-content p {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.85;
    margin-bottom: 1rem;
}

/* ── Lists ────────────────────────────────────────────────────── */
.legal-content ul,
.legal-content ol {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.85;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.4rem;
}

/* ── Inline links ─────────────────────────────────────────────── */
.legal-content a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.legal-content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ── Strong / bold ────────────────────────────────────────────── */
.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Section divider ──────────────────────────────────────────── */
.legal-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2.5rem 0;
}

/* ── Footer block inside legal content ───────────────────────── */
.legal-footer-note {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ── Table of contents (optional) ────────────────────────────── */
.legal-toc {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.legal-toc-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.legal-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.legal-toc li {
    margin-bottom: 0.25rem;
    font-size: 0.88rem;
}

.legal-toc a {
    color: var(--text-secondary);
    text-decoration: none;
}

.legal-toc a:hover {
    color: var(--accent);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .legal-page {
        padding-top: calc(76px + 2rem);
        padding-bottom: 3rem;
    }
}
