/* ─── Legal Pages Shared Styles ─────────────────────────── */
/* Used by: privacy.html, terms.html, security.html         */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0F172A;
    color: #F8FAFC;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

code {
    font-size: 0.75rem;
    background: #334155;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
}

/* ─── Layout ─── */
.legal-container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ─── */
.legal-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1E293B;
}
.legal-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
}
.legal-header-left { display: flex; align-items: center; gap: 12px; }
.legal-back {
    color: #64748B; font-size: 1.25rem; transition: color 0.15s;
}
.legal-back:hover { color: #94A3B8; }
.legal-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.875rem; font-weight: 600; color: #94A3B8;
}
.legal-logo img { filter: invert(1); }
.legal-header-right { display: flex; align-items: center; gap: 8px; }
.legal-header-right a {
    font-size: 0.75rem; color: #64748B; transition: color 0.15s;
}
.legal-header-right a:hover { color: #94A3B8; }
.legal-header-right .sep { color: #334155; font-size: 0.75rem; }

/* ─── Main ─── */
.legal-main { padding: 48px 24px 64px; }

.legal-title-row {
    display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.legal-title-row h1 {
    font-size: 1.875rem; font-weight: 700;
}
.legal-date {
    font-size: 0.875rem; color: #64748B; margin-bottom: 40px;
}

/* ─── Content ─── */
.legal-content { display: flex; flex-direction: column; gap: 40px; }
.legal-content section { display: block; }
.legal-content h2 {
    font-size: 1.125rem; font-weight: 600; color: #F8FAFC;
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.legal-content p {
    font-size: 0.9375rem; color: #CBD5E1; line-height: 1.7;
}
.legal-content p + p { margin-top: 12px; }
.legal-content strong { color: #F8FAFC; }
.legal-content a { color: #2563EB; transition: color 0.15s; }
.legal-content a:hover { text-decoration: underline; }

/* ─── Cards ─── */
.card {
    background: #1E293B; border: 1px solid #334155;
    border-radius: 12px; padding: 16px; margin-top: 12px;
}
.card-sm { padding: 12px; }
.card-label {
    font-size: 0.6875rem; font-weight: 600; color: #94A3B8;
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.card-label-green {
    font-size: 0.6875rem; font-weight: 600; color: #34D399;
    margin-bottom: 4px;
}
.card-text { font-size: 0.875rem; color: #94A3B8; line-height: 1.6; }
.card-text-light { font-size: 0.875rem; color: #CBD5E1; line-height: 1.6; }
.card-name { font-size: 0.875rem; font-weight: 500; color: #F8FAFC; margin-bottom: 2px; }

/* Card layouts */
.card-row { display: flex; align-items: flex-start; gap: 12px; }
.card-row-inner { display: flex; align-items: flex-start; gap: 12px; }
.card-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; color: #94A3B8; }
.card-success-border { border-color: rgba(16, 185, 129, 0.1); background: rgba(16, 185, 129, 0.03); }

/* Grids */
.card-grid-1 { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.card-grid-1 .card { margin-top: 0; }
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.card-grid-2 .card { margin-top: 0; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Stat cards (security page) */
.stat-card {
    background: #0F172A; border: 1px solid #334155;
    border-radius: 8px; padding: 12px; text-align: center;
}
.stat-label { font-size: 0.6875rem; color: #64748B; margin-bottom: 2px; }
.stat-value { font-size: 0.875rem; font-weight: 600; color: #F8FAFC; }

/* Warning / Danger / Success cards */
.card-warning {
    background: rgba(245, 158, 11, 0.03); border-color: rgba(245, 158, 11, 0.2);
    margin-top: 16px;
}
.card-danger {
    background: rgba(239, 68, 68, 0.03); border-color: rgba(239, 68, 68, 0.2);
}
.card-success {
    background: rgba(16, 185, 129, 0.03); border-color: rgba(16, 185, 129, 0.2);
}
.warning-title { font-size: 0.875rem; font-weight: 600; color: #FBBF24; margin-bottom: 6px; }
.danger-title { font-size: 0.875rem; font-weight: 600; color: #F87171; margin-bottom: 8px; }

/* Check/cross items */
.check-item {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.875rem; color: #94A3B8; margin-top: 8px; line-height: 1.6;
}
.check { color: #10B981; flex-shrink: 0; font-weight: 700; }
.cross { color: #EF4444; flex-shrink: 0; font-weight: 700; }
.arrow { color: #2563EB; flex-shrink: 0; font-weight: 700; margin-top: 1px; }

/* Lists */
.arrow-list, .check-list, .cross-list {
    list-style: none; margin-top: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.arrow-list li, .check-list li, .cross-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.875rem; color: #94A3B8; line-height: 1.6;
}
.arrow-list li strong, .check-list li strong, .cross-list li strong { color: #F8FAFC; }

/* Table */
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.legal-table th {
    text-align: left; padding: 10px 16px; color: #94A3B8; font-weight: 500;
    border-bottom: 1px solid #334155;
}
.legal-table td {
    padding: 10px 16px; color: #CBD5E1;
}
.legal-table tr + tr { border-top: 1px solid rgba(51, 65, 85, 0.5); }
.legal-table td strong { color: #F8FAFC; }

.card-divider {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid rgba(239, 68, 68, 0.1);
    font-size: 0.875rem; color: #94A3B8;
}

/* ─── Security page specifics ─── */
.trust-overline {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.6875rem; font-weight: 600; color: #2563EB;
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
.trust-title {
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
    line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px;
}
.trust-subtitle {
    font-size: 1.0625rem; color: #94A3B8; line-height: 1.7; max-width: 640px;
}
.trust-subtitle strong { color: #F8FAFC; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.badge {
    padding: 6px 12px; font-size: 0.75rem; font-weight: 600;
    background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 9999px; color: #34D399;
}

.section-icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.section-icon-row h2 { margin-bottom: 0; font-size: 1.25rem; font-weight: 700; }

.layer-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
    font-size: 0.875rem; color: #F8FAFC;
}
.layer-num {
    width: 24px; height: 24px; border-radius: 6px; background: #2563EB;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0;
}

.card-emoji { font-size: 1.125rem; margin-top: 2px; flex-shrink: 0; }

.gov-num {
    width: 24px; height: 24px; border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: #34D399; flex-shrink: 0;
    margin-top: 2px;
}

.card-mono { font-family: 'Inter', monospace; }
.header-name { font-size: 0.75rem; color: #34D399; margin-bottom: 2px; }
.header-value { font-size: 0.6875rem; color: #64748B; word-break: break-all; }

/* Trust CTA */
.trust-bottom-cta { border-top: 1px solid #1E293B; padding-top: 40px; }
.trust-cta-box {
    background: linear-gradient(135deg, #1E293B, #0F172A);
    border: 1px solid #334155; border-radius: 16px;
    padding: 32px; text-align: center;
}
.trust-cta-overline {
    font-size: 0.6875rem; font-weight: 600; color: #2563EB;
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}
.trust-cta-box h3 {
    font-size: 1.5rem; font-weight: 700; color: #F8FAFC;
    line-height: 1.3; margin-bottom: 12px;
}
.trust-cta-desc {
    font-size: 0.875rem; color: #94A3B8; max-width: 400px;
    margin: 0 auto 24px; line-height: 1.6;
}
.trust-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 0.9375rem; font-weight: 700;
    color: white; background: #2563EB; border-radius: 10px;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(37, 99, 235, 0.3);
}
.trust-cta-btn:hover {
    background: #1D4ED8; text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.5), 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ─── Footer ─── */
.legal-footer {
    margin-top: 64px; padding-top: 32px;
    border-top: 1px solid #1E293B;
    display: flex; align-items: center; justify-content: space-between;
}
.legal-footer p { font-size: 0.75rem; color: #64748B; }
.legal-footer a { font-size: 0.75rem; color: #2563EB; transition: color 0.15s; }
.legal-footer a:hover { text-decoration: underline; }
.legal-footer-links { display: flex; align-items: center; gap: 8px; }
.legal-footer-links .sep { color: #334155; font-size: 0.75rem; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .card-grid-2 { grid-template-columns: 1fr; }
    .card-grid-3 { grid-template-columns: 1fr; }
    .legal-header-inner { padding: 12px 16px; }
    .legal-main { padding: 32px 16px 48px; }
    .legal-title-row h1 { font-size: 1.5rem; }
    .trust-title { font-size: 1.75rem; }
    .legal-footer { flex-direction: column; gap: 12px; text-align: center; }
}
