/* ─── Legal / Info Pages (FAQ, TOS, Privacy) ─── */

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.legal-header {
    text-align: center;
    margin-bottom: 40px;
}

.legal-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.legal-header .last-updated {
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── FAQ Accordion ─── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    padding: 20px 24px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: inherit;
}

.faq-question:hover {
    color: var(--blue-400);
}

.faq-question .faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: var(--blue-400);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ─── TOS / Privacy Sections ─── */
.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
}

.legal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
    border-radius: var(--radius) var(--radius) 0 0;
}

.legal-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.legal-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.legal-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-card ul, .legal-card ol {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin: 8px 0 16px 20px;
}

.legal-card li {
    margin-bottom: 6px;
}

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

.legal-card a {
    color: var(--blue-400);
    text-decoration: none;
}

.legal-card a:hover {
    text-decoration: underline;
}

/* ─── Back Link ─── */
.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.legal-back:hover {
    color: var(--blue-400);
}

.legal-back svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 24px 16px 40px;
    }
    .legal-card {
        padding: 24px 20px;
    }
    .legal-header h1 {
        font-size: 1.5rem;
    }
}
