/* Páginas legales de Valori+ (/privacidad y /terminos).
   Autocontenidas: no dependen de tailwind.gen.css ni del JS de la app. */
:root {
    --bg: #f7f7f8;
    --surface: #ffffff;
    --border: #e4e4e7;
    --text: #18181b;
    --muted: #52525b;
    --faint: #a1a1aa;
    --accent: #cde52d;
    --accent-ink: #4d5c00;
    --accent-soft: rgba(205, 229, 45, 0.16);
    --link: #3f6212;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f0f10; --surface: #18181b; --border: #27272a; --text: #fafafa;
        --muted: #a1a1aa; --faint: #71717a; --accent-ink: #cde52d; --accent-soft: rgba(205, 229, 45, 0.10);
        --link: #d9ef4f; --shadow: none;
    }
}
:root[data-theme="dark"] {
    --bg: #0f0f10; --surface: #18181b; --border: #27272a; --text: #fafafa;
    --muted: #a1a1aa; --faint: #71717a; --accent-ink: #cde52d; --accent-soft: rgba(205, 229, 45, 0.10);
    --link: #d9ef4f; --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px; line-height: 1.7;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { height: 34px; width: auto; display: block; }
.logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .logo-light { display: none; } :root:not([data-theme="light"]) .logo .logo-dark { display: block; } }
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { filter: brightness(.95); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }

/* Encabezado */
.hero { max-width: 1120px; margin: 0 auto; padding: 48px 20px 8px; }
.kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; font-weight: 900; margin: 16px 0 12px; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0; max-width: 680px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; color: var(--faint); }
.tabs { display: flex; gap: 6px; margin-top: 28px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); width: max-content; max-width: 100%; }
.tabs a { padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--accent); color: #111; }

/* Cuerpo: índice + documento */
.layout { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 960px) { .layout { grid-template-columns: 260px minmax(0, 1fr); } }
.toc { display: none; }
@media (min-width: 960px) {
    .toc { display: block; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
}
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; gap: 10px; padding: 7px 12px; border-radius: 10px; font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; border-left: 3px solid transparent; }
.toc a:hover { background: var(--surface); color: var(--text); }
.toc a.active { background: var(--surface); color: var(--text); border-left-color: var(--accent); font-weight: 600; }
.toc a b { color: var(--faint); font-weight: 700; min-width: 18px; }

.doc { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 12px 22px; min-width: 0; }
@media (min-width: 640px) { .doc { padding: 16px 44px; } }
.doc section { padding: 28px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.doc section:last-of-type { border-bottom: 0; }
.doc h2 { display: flex; align-items: baseline; gap: 12px; font-size: 20px; line-height: 1.3; margin: 0 0 10px; font-weight: 800; }
.doc h2 .num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 800; transform: translateY(-2px); }
.doc p { margin: 8px 0; color: var(--muted); }
.doc ul { margin: 10px 0; padding-left: 0; list-style: none; }
.doc li { position: relative; padding-left: 22px; margin: 6px 0; color: var(--muted); }
.doc li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.doc strong { color: var(--text); }
.doc code { font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); word-break: break-all; }
.note { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 15px; }
.steps { counter-reset: s; }
.steps li { counter-increment: s; padding-left: 34px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; top: .2em; left: 0; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #111; }

.contact { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border-radius: 20px; background: #111; color: #fafafa; }
.contact h3 { margin: 0 0 4px; font-size: 18px; }
.contact p { margin: 0; color: #a1a1aa; font-size: 14px; }

footer.site { border-top: 1px solid var(--border); }
footer.site div { max-width: 1120px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 13px; color: var(--faint); }
footer.site a { color: var(--muted); }

@media print {
    .topbar, .toc, .tabs, .contact .btn, footer.site { display: none !important; }
    body { background: #fff; color: #000; }
    .doc { border: 0; box-shadow: none; padding: 0; }
    .layout { display: block; padding: 0 20px; }
}

/* Borrador: datos pendientes resaltados y aviso arriba. Se quitan al publicar. */
.todo { background: #fde047; color: #111; padding: 0 6px; border-radius: 6px; font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; overflow-wrap: anywhere; }
.draft-banner { max-width: 1120px; margin: 20px auto 0; padding: 0 20px; }
.draft-banner div { padding: 12px 16px; border-radius: 14px; border: 1px dashed #ca8a04; background: rgba(253, 224, 71, .15); color: var(--text); font-size: 14px; }
.doc h3 { font-size: 16px; margin: 18px 0 6px; }
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted); }
.doc th { color: var(--text); font-weight: 700; background: var(--bg); }
.doc tr:last-child td { border-bottom: 0; }
