/* ==========================================
   LEGAL / POLICY PAGES — DARK/LIGHT THEME COMPATIBLE
   ========================================== */

.legal-layout-root {
    padding: 1.5rem;
    max-width: 60rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .legal-layout-root {
        padding: 2.5rem;
    }
}

.legal-content-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---------- Header ---------- */
.legal-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.legal-header .updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ---------- Section ---------- */
.legal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legal-section h2 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.legal-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.legal-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-section ul {
    list-style: disc;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-section ul li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-section ol {
    list-style: decimal;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-section ol li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-section a {
    color: var(--btn-gradient-start);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-section a:hover {
    color: var(--btn-gradient-end);
}

/* ---------- Footer Links ---------- */
.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legal-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-footer-links a:hover {
    color: var(--btn-gradient-start);
    text-decoration: underline;
}

.legal-footer-links span {
    color: var(--border-color);
}

/* ---------- Contact Box ---------- */
.legal-contact-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legal-contact-box strong {
    color: var(--text-primary);
}

/* ---------- Table of Contents ---------- */
.legal-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.legal-toc h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.legal-toc ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.legal-toc ul li a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-toc ul li a:hover {
    color: var(--btn-gradient-start);
}