/* ─────────────────────────────────────────
   LEGAL PAGES  (terms, privacy)
───────────────────────────────────────── */

.legal-page {
    padding: 100px 0 80px;
    background: var(--bg-1);
    min-height: 100vh;
}

.legal-header {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.legal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-1);
    margin-bottom: 10px;
}

.legal-meta {
    font-size: 0.875rem;
    color: var(--text-3);
}

.legal-meta strong { color: var(--text-2); }

/* Two-column layout: sticky TOC + body */
.legal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* ── Table of Contents ── */
.legal-toc {
    position: sticky;
    top: 90px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.toc-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-3);
    margin-bottom: 12px;
}

.legal-toc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-toc ul a {
    display: block;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: var(--text-2);
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    line-height: 1.4;
}

.legal-toc ul a:hover { color: var(--text-1); background: var(--bg-3); }
.legal-toc ul a.active { color: var(--accent); background: var(--accent-bg); font-weight: 600; }

/* ── Body ── */
.legal-body {
    min-width: 0;
}

.legal-notice {
    background: var(--accent-bg);
    border: 1px solid var(--accent-bd);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 36px;
}

.legal-notice strong { color: var(--text-1); }

.legal-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 14px;
    padding-top: 4px;
}

.legal-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 20px 0 10px;
}

.legal-section p {
    font-size: 0.925rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul {
    margin: 10px 0 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-section ul li {
    font-size: 0.915rem;
    color: var(--text-2);
    line-height: 1.65;
    padding-left: 4px;
}

.legal-section a {
    color: var(--accent);
    text-decoration: none;
}

.legal-section a:hover { text-decoration: underline; }

/* Highlight boxes */
.legal-highlight {
    background: var(--bg-3);
    border: 1px solid var(--border-md);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 18px 0;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.7;
}

.legal-highlight strong { color: var(--text-1); }

.legal-highlight ul {
    margin: 10px 0 0 18px;
}

.legal-highlight-warn {
    border-left-color: #f97316;
    background: rgba(249,115,22,0.06);
    border-color: rgba(249,115,22,0.2);
}

[data-theme="light"] .legal-highlight-warn {
    background: rgba(232,99,10,0.05);
    border-color: rgba(232,99,10,0.18);
}

/* Contact block */
.legal-contact {
    margin-top: 16px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-contact p {
    font-size: 0.9rem;
    color: var(--text-2);
    margin: 0;
}

.legal-contact strong { color: var(--text-1); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
        margin-bottom: 4px;
    }
}

@media (max-width: 600px) {
    .legal-page { padding: 90px 0 60px; }
    .legal-section h2 { font-size: 1.05rem; }
}
