/* Privacy / Legal page styles moved out of main stylesheet
   Centralized here to allow page-specific tweaks and reduce global CSS size */

.legal-page {
    background: var(--white);
    padding: 24px 0 !important;
    padding-top: 100px !important;
    min-height: auto;
}

.legal-page .container {
    max-width: 840px;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-header h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.legal-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-mid), var(--accent-end));
    border-radius: 2px;
}

.legal-header .last-updated {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.legal-content {
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Minimal spacing between legal sections */
.legal-section {
    margin-bottom: 8px;
    padding-bottom: 0;
}

.legal-section h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 2px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--accent-color);
}

.legal-section h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-top: 2px;
    margin-bottom: 6px;
    font-weight: 600;
}

.legal-section p {
    margin-bottom: 6px;
    text-align: justify;
}

.legal-section ul {
    margin: 6px 0 6px 20px;
    list-style: none;
}

.legal-section ul li {
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.legal-section ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85em;
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.legal-section a:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .legal-page { padding: 18px 0; }
    .legal-header h1 { font-size: 1.4rem; }
    .legal-section h2 { font-size: 1.02rem; }
    .legal-section p { text-align: left; font-size: 0.95rem; }
    .legal-section ul { margin-left: 14px; }
}

/* Dark mode tweaks for Privacy/Legal pages */
html[data-theme="dark"] .legal-page {
    background: var(--dark-bg);
    color: var(--text-primary);
}

html[data-theme="dark"] .legal-header h1 {
    color: var(--accent-mid);
}

html[data-theme="dark"] .legal-header .last-updated {
    color: var(--text-secondary);
}

html[data-theme="dark"] .legal-content,
html[data-theme="dark"] .legal-section p,
html[data-theme="dark"] .legal-section h3 {
    color: var(--text-primary);
}

html[data-theme="dark"] .legal-section h2 {
    color: var(--accent-mid);
    border-bottom-color: rgba(139,92,246,0.18);
}

html[data-theme="dark"] .legal-section ul li:before {
    color: var(--accent-color);
}

html[data-theme="dark"] .legal-section a {
    color: var(--primary-light);
}

html[data-theme="dark"] .legal-section a:hover {
    color: var(--primary-color);
}

/* Code / pre blocks readability */
html[data-theme="dark"] .legal-section pre,
html[data-theme="dark"] .legal-section code {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    overflow: auto;
}
