/* ═══════ LEGAL PAGES (Terms / Privacy) ═══════ */

.legal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}
.legal-header h1 { font-size: 2.5rem; margin: 0 0 10px 0; font-weight: 700; }
.legal-header p { font-size: 1.1rem; margin: 0; opacity: 0.9; }

.legal-container { max-width: 850px; margin-bottom: 60px; }

/* ── Table of Contents ── */
.legal-toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}
.legal-toc-title { font-weight: 700; font-size: 1rem; margin-bottom: 14px; color: #1f2937; }
.legal-toc-item {
    display: block;
    padding: 6px 0;
    color: #6366f1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.legal-toc-item:hover { color: #4338ca; text-decoration: underline; }

/* ── Sections ── */
.legal-sections { display: flex; flex-direction: column; gap: 24px; }
.legal-section {
    display: flex;
    gap: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color 0.2s;
}
.legal-section:hover { border-color: #6366f1; }
.legal-section:target { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.legal-section-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.legal-section-body { flex: 1; }
.legal-section-body h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px 0; color: #1f2937; }
.legal-section-text { font-size: 0.95rem; line-height: 1.7; color: #4b5563; }
.legal-section-text a { color: #6366f1; }

/* ── Footer ── */
.legal-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
    color: #9ca3af;
    font-size: 0.9rem;
}
.legal-footer a { color: #6366f1; text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }

/* ── Empty ── */
.legal-empty { text-align: center; padding: 60px 20px; color: #9ca3af; }
.legal-empty i { font-size: 3rem; display: block; margin-bottom: 15px; opacity: 0.5; }

/* ── Dark Mode ── */
[data-theme="dark"] .legal-header { background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%); }
[data-theme="dark"] .legal-toc { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .legal-toc-title { color: #f3f4f6; }
[data-theme="dark"] .legal-toc-item { color: #818cf8; }
[data-theme="dark"] .legal-section { border-color: #374151; background: #1f2937; }
[data-theme="dark"] .legal-section:hover { border-color: #6366f1; }
[data-theme="dark"] .legal-section-body h2 { color: #f3f4f6; }
[data-theme="dark"] .legal-section-text { color: #d1d5db; }
[data-theme="dark"] .legal-footer { border-color: #374151; color: #6b7280; }

/* ── Mobile ── */
@media (max-width: 768px) {
    .legal-header h1 { font-size: 1.8rem; }
    .legal-section { flex-direction: column; gap: 10px; padding: 18px; }
}
