/* ========================================
   Legal Pages — Dark Theme (Quima.DEV Hub / Quima Builder / Quima Loader)
   ======================================== */

:root {
    --legal-bg: #06081a;
    --legal-surface: #0c1028;
    --legal-border: rgba(124, 92, 255, 0.18);
    --legal-text: #e6ebff;
    --legal-text-secondary: #b5bcd9;
    --legal-text-muted: #7a82a8;
    --legal-accent: #7c5cff;
    --legal-accent-2: #4a9eff;
    --legal-cyan: #3ed4ff;
    --legal-warn: #ff6b6b;
}

html, body {
    background: var(--legal-bg);
    color: var(--legal-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--legal-accent-2); text-decoration: none; }
a:hover { color: var(--legal-cyan); text-decoration: underline; }

.legal-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
}

.legal-page {
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Top Nav (simple) */
.legal-nav {
    position: fixed;
    top: 38px;
    left: 0;
    right: 0;
    z-index: 1090;
    background: rgba(6, 8, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--legal-border);
}
.legal-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.legal-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--legal-text);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}
.legal-nav-brand img { width: 26px; height: 26px; }
.legal-nav-links { display: flex; gap: 18px; }
.legal-nav-links a {
    font-size: .88rem;
    color: var(--legal-text-secondary);
    text-decoration: none;
    transition: color .2s;
}
.legal-nav-links a:hover, .legal-nav-links a.active { color: #fff; }

/* Header */
.legal-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--legal-border);
}
.legal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--legal-accent-2), var(--legal-accent), var(--legal-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.legal-meta { color: var(--legal-text-muted); font-size: 0.95rem; margin: 0 0 4px; }

/* Table of Contents */
.legal-toc {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: 14px;
    padding: 28px 36px;
    margin-bottom: 50px;
}
.legal-toc h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 18px; }
.legal-toc ol { columns: 2; column-gap: 40px; list-style-position: inside; padding-left: 0; margin: 0; }
.legal-toc li { margin-bottom: 8px; break-inside: avoid; color: var(--legal-text-muted); font-size: 0.92rem; }
.legal-toc li a { color: var(--legal-text-secondary); text-decoration: none; transition: color .2s; }
.legal-toc li a:hover { color: var(--legal-cyan); }

/* Body */
.legal-body section {
    margin-bottom: 48px;
    scroll-margin-top: 110px;
}
.legal-body h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--legal-border);
}
.legal-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 22px 0 10px;
}
.legal-body p {
    color: var(--legal-text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 14px;
}
.legal-body ul, .legal-body ol { padding-left: 24px; margin: 0 0 16px; }
.legal-body li {
    color: var(--legal-text-secondary);
    font-size: 0.93rem;
    line-height: 1.75;
    margin-bottom: 6px;
}
.legal-body a { color: var(--legal-accent-2); text-decoration: none; }
.legal-body a:hover { color: var(--legal-cyan); text-decoration: underline; }
.legal-body strong { color: #fff; }

/* Warning */
.legal-warning {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-left: 4px solid var(--legal-warn);
    border-radius: 8px;
    padding: 18px 22px;
    margin: 22px 0;
}
.legal-warning strong { color: #ff8a8a; }
.legal-warning p { margin: 0; }

/* Highlight */
.legal-highlight {
    background: rgba(124, 92, 255, 0.07);
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-left: 4px solid var(--legal-accent);
    border-radius: 8px;
    padding: 22px 26px;
    margin: 22px 0;
}
.legal-highlight p, .legal-highlight li { font-size: 0.9rem; }

/* Final Notice */
.legal-final-notice {
    margin-top: 60px;
    padding: 30px;
    text-align: center;
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: 14px;
}
.legal-final-notice p { color: var(--legal-text-secondary); font-size: 0.9rem; line-height: 1.7; margin: 0 0 8px; }
.legal-final-notice p:last-child { margin: 0; color: var(--legal-text-muted); font-size: 0.85rem; }

/* Footer */
.legal-footer {
    margin-top: 80px;
    padding: 32px 24px;
    border-top: 1px solid var(--legal-border);
    text-align: center;
    color: var(--legal-text-muted);
    font-size: 0.85rem;
}
.legal-footer a { color: var(--legal-text-secondary); margin: 0 8px; }
.legal-footer a:hover { color: var(--legal-cyan); }

/* qsuite-bar (shared) */
.qsuite-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; background: #040614; border-bottom: 1px solid #1c2240; }
.qsuite-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 38px; display: flex; align-items: center; justify-content: space-between; font-size: .78rem; }
.qsuite-home { display: flex; align-items: center; gap: 8px; color: #e6ebff !important; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.qsuite-home img { width: 18px; height: 18px; }
.qsuite-home em { font-style: normal; background: linear-gradient(135deg, #4a9eff, #7c5cff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 600; }
.qsuite-nav { display: flex; gap: 4px; }
.qsuite-nav a { padding: 5px 12px; border-radius: 6px; color: #a8b0d4 !important; text-decoration: none; font-weight: 500; transition: .2s; font-size: .78rem; }
.qsuite-nav a:hover { background: rgba(74, 158, 255, .1); color: #fff !important; }
.qsuite-nav a.active { background: linear-gradient(135deg, rgba(74, 158, 255, .18), rgba(124, 92, 255, .18)); color: #fff !important; }
body { padding-top: 38px; }

/* Responsive */
@media (max-width: 768px) {
    .legal-page { padding-top: 60px; padding-bottom: 60px; }
    .legal-header h1 { font-size: 2rem; }
    .legal-toc { padding: 20px 22px; }
    .legal-toc ol { columns: 1; }
    .legal-body h2 { font-size: 1.3rem; }
    .legal-body h3 { font-size: 1.02rem; }
    .legal-warning, .legal-highlight { padding: 16px 18px; }
    .legal-nav-inner { height: 50px; }
    .legal-nav-links { gap: 12px; }
    .legal-nav-links a { font-size: .8rem; }
}
@media (max-width: 640px) {
    .qsuite-nav a { padding: 5px 8px; font-size: .72rem; }
    .qsuite-nav a:not(.active):not([href*="index.html"]) { display: none; }
}
@media (max-width: 480px) {
    .legal-header h1 { font-size: 1.6rem; }
    .legal-body p, .legal-body li { font-size: 0.88rem; }
}
