/* Las páginas aparte del sitio (privacidad, términos, la ayuda y la 404). La portada (index.html) lleva su propio CSS adentro;
   aquí van los mismos tokens, la marca, la cabecera, los botones y el pie, para que se vean iguales.
   Si cambia un color o el pie en la portada, cámbialo aquí también. Archivo aparte para que estas páginas no
   necesiten 'unsafe-inline' en su CSP (public-sitio/_headers). Nada se carga de fuera. */

:root {
  --paper: #eef3f1; --card: #fff; --sunk: #f6f9f8; --ink: #15302a; --ink-2: #44605a; --muted: #557069;
  --line: #d3e0dc; --line-2: #e6eeeb; --green: #0f6b57; --green-2: #0b4a3d; --green-soft: #dcefe8; --green-text: #0f6b57;
  --yellow: #f3c64f; --yellow-2: #e2ad2a; --yellow-soft: #fbefd2; --on-green: #fff; --focus: #0b4a3d;
  --warn-ink: #6b4d00;
  --lift: 0 1px 0 rgba(21, 48, 42, .05), 0 22px 40px -26px rgba(21, 48, 42, .45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1715; --card: #13221e; --sunk: #101d1a; --ink: #e5efec; --ink-2: #b4c7c1; --muted: #9db3ac;
    --line: #25393a; --line-2: #1c2e2a; --green: #3fae92; --green-2: #2c8a73; --green-soft: #173a31; --green-text: #6fd0b5;
    --yellow-soft: #3a2d12; --on-green: #06241d; --focus: #f3c64f; --warn-ink: #f0c062;
    --lift: 0 1px 0 rgba(0, 0, 0, .3), 0 22px 40px -24px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--green-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--yellow); color: #15302a; padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Marca: la "Cápsula de relevo" (src/marca.tsx) */
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 780; font-size: 21px; letter-spacing: -.03em; }
.logo { display: block; flex: none; width: 34px; height: auto; aspect-ratio: 27 / 21; }
.logo .lg-v { fill: #0f6b57; } .logo .lg-a { fill: #f3c64f; } .logo .lg-c { fill: #fff; }
.logo .lg-h { fill: none; stroke: #0f6b57; stroke-width: 2.1; stroke-linecap: round; }
.brand b { font-weight: inherit; color: var(--green-text); }
@media (prefers-color-scheme: dark) { .logo .lg-v { fill: #1b8a6f; } .brand b { color: #f3c64f; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 750; font-size: 16.5px; text-decoration: none; white-space: nowrap; transition: transform .15s, background .15s; }
.btn-sun { background: var(--yellow); color: #15302a; box-shadow: 0 2px 0 var(--yellow-2), 0 14px 24px -12px rgba(0, 0, 0, .45); }
.btn-sun:hover { background: #f6d06a; transform: translateY(-1px); }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-green:hover { background: var(--green-2); }
.btn-line { color: var(--green-text); box-shadow: inset 0 0 0 2px currentColor; background: transparent; }
.btn-line:hover { background: var(--green-soft); }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.top .btn { min-height: 42px; padding: 0 18px; font-size: 15.5px; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15.5px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--line-2); }
.top .reu-btn { margin-left: auto; }
@media (min-width: 980px) { .nav { display: flex; } .top .nav + .reu-btn { margin-left: 8px; } }
@media (max-width: 479px) { .top .reu-btn { width: 42px; padding: 0; } .top .reu-btn .txt { display: none; } }
@media (min-width: 480px) { .top .reu-btn svg { display: none; } }

/* Kicker con las dos pastillas del logo (igual que la portada) */
.kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 15px; font-weight: 750; color: var(--green-text); }
.kicker::before { content: ""; flex: none; width: 20px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2.5 5.5 27 21'%3E%3Cpath d='M6.326 13.782L9.858 11.904A6.5 6.5 0 0 1 10.958 11.443A8 8 0 0 0 16.958 22.728A6.5 6.5 0 0 1 15.961 23.382L12.429 25.26A6.5 6.5 0 0 1 6.326 13.782Z' fill='%230f6b57'/%3E%3Cpath d='M15.156 9.087L19.571 6.74A6.5 6.5 0 0 1 25.674 18.218L21.259 20.565A6.5 6.5 0 0 1 15.156 9.087Z' fill='%23f3c64f'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (prefers-color-scheme: dark) { .kicker::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2.5 5.5 27 21'%3E%3Cpath d='M6.326 13.782L9.858 11.904A6.5 6.5 0 0 1 10.958 11.443A8 8 0 0 0 16.958 22.728A6.5 6.5 0 0 1 15.961 23.382L12.429 25.26A6.5 6.5 0 0 1 6.326 13.782Z' fill='%233fae92'/%3E%3Cpath d='M15.156 9.087L19.571 6.74A6.5 6.5 0 0 1 25.674 18.218L21.259 20.565A6.5 6.5 0 0 1 15.156 9.087Z' fill='%23f3c64f'/%3E%3C/svg%3E"); } }

/* ───────────── Páginas legales ───────────── */
.doc { padding-top: 28px; padding-bottom: 56px; }
.doc-in { max-width: 780px; }
.borrador { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 26px; padding: 10px 14px; border-radius: 12px; background: var(--yellow-soft); color: var(--warn-ink); border: 1px solid color-mix(in srgb, var(--yellow-2) 45%, transparent); font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.borrador svg.i { width: 18px; height: 18px; margin-top: 1px; }
.doc h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.doc .ver { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.doc .resumen { margin-top: 18px; font-size: 18.5px; color: var(--ink-2); }
.doc .aclara { margin-top: 18px; padding: 14px 16px; border-left: 5px solid var(--green); border-radius: 0 14px 14px 0; background: var(--card); font-weight: 650; }
.indice { margin: 28px 0 8px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.indice h2 { font-size: 16px; font-weight: 750; letter-spacing: 0; color: var(--ink-2); }
.indice ol { margin: 10px 0 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; font-size: 15.5px; line-height: 1.75; }
.indice a { text-decoration: none; }
.indice a:hover { text-decoration: underline; }
.doc section { margin-top: 40px; scroll-margin-top: 84px; }
.doc section h2 { font-size: clamp(22px, 3.6vw, 27px); font-weight: 780; }
.doc section p, .doc section ul, .doc section ol, .doc section .tabla { margin-top: 12px; }
.doc section ul, .doc section ol { padding-left: 22px; }
.doc section li + li { margin-top: 6px; }
.doc section h3 { margin-top: 22px; font-size: 19px; font-weight: 750; }
.doc .no { font-weight: 700; }
.tabla { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.tabla table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.tabla th, .tabla td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.tabla th { background: var(--sunk); font-weight: 750; color: var(--ink); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td:first-child { font-weight: 650; }
/* En el teléfono, cada fila de la tabla es una ficha (sin scroll de lado) */
@media (max-width: 599px) {
  .tabla { overflow: visible; border: 0; background: none; }
  .tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabla table, .tabla tbody, .tabla tr, .tabla td { display: block; }
  .tabla tr { margin-bottom: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
  .tabla td { padding: 4px 0; border: 0; }
  .tabla td[data-l]::before { content: attr(data-l); display: block; font-size: 13px; font-weight: 750; color: var(--muted); }
  .tabla td:first-child { font-size: 16.5px; }
  .tabla td:first-child::before { display: none; }
}
/* Un plazo o un dato que todavía está por confirmar en la revisión legal */
.pend { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--yellow-2); }
.leyenda { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.doc .contacto-doc { margin-top: 12px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.arriba { display: inline-block; margin-top: 36px; font-weight: 700; }

/* ───────────── Centro de ayuda (/ayuda/, lo arma scripts/ayuda-publica.mjs) ───────────── */
[hidden] { display: none !important; }
.migas ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 18px; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.migas li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.migas a { color: var(--ink-2); font-weight: 650; text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.ay h1 { overflow-wrap: break-word; }
.ay-cab { max-width: 780px; }
.ay-cab h1 { font-size: clamp(32px, 6vw, 46px); font-weight: 800; letter-spacing: -.03em; }
.ay-buscar { margin-top: 24px; }
.ay-buscar label { display: block; font-weight: 750; margin-bottom: 8px; }
.ay-buscar input { width: 100%; min-height: 54px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 17px; }
.ay-buscar input::placeholder { color: var(--muted); opacity: 1; }
.ay-buscar input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.ay-n { min-height: 1.5em; margin-top: 6px; font-size: 15px; color: var(--muted); }
.ay-temas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ay-temas a { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 650; font-size: 15px; text-decoration: none; }
.ay-temas a:hover { background: var(--green-soft); color: var(--ink); }
.ay-tema { scroll-margin-top: 84px; }
.ay-tema h2 { font-size: clamp(22px, 3.6vw, 27px); font-weight: 780; }
.ay-lista, .ay-guias { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.ay-guias { gap: 12px; }
.doc section ul.ay-lista, .doc section ul.ay-guias, .doc .ay-rel ul { padding-left: 0; }
.doc section .ay-lista > li, .doc section .ay-guias > li { margin-top: 0; }
@media (min-width: 720px) { .ay-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ay-guias { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ay-guias { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ay-lista a, .ay-guias a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.ay-lista a:hover, .ay-guias a:hover { border-color: var(--green); transform: translateY(-1px); }
.ay-lista b, .ay-guias b { font-size: 17px; font-weight: 750; line-height: 1.3; color: var(--green-text); }
.ay-lista span, .ay-guias a > span:last-child { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.ay-guias a { padding: 18px; box-shadow: var(--lift); border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.ay-guias b { font-size: 18px; color: var(--ink); }
.ay-etq { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: var(--yellow-soft); color: var(--warn-ink); font-size: 13px; font-weight: 750; line-height: 1.5; }
.ay-rel .ay-etq { margin-right: 8px; vertical-align: 1px; }
.ay-nada { margin-top: 28px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px dashed var(--line); font-weight: 650; }
.ay-r { margin-top: 18px; font-size: 18px; }
.ay-r p, .ay-r ol { margin-top: 14px; }
.ay-r ol { padding-left: 24px; }
.ay-r li + li { margin-top: 8px; }
.ay-rel { margin-top: 40px; }
.doc .ay-rel h2, .ay-contacto h2 { font-size: 20px; font-weight: 780; }
.ay-rel ul { margin: 12px 0 0; padding: 0; list-style: none; border-radius: 16px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.ay-rel li + li { margin-top: 0; border-top: 1px solid var(--line-2); }
.ay-rel a { display: block; padding: 12px 16px; font-weight: 650; text-decoration: none; }
.ay-rel a:hover { background: var(--green-soft); }
.ay-contacto { margin-top: 40px; padding: 20px; border-radius: 18px; background: var(--green-soft); }
.ay-contacto p { margin-top: 8px; color: var(--ink-2); }
.ay-contacto-b { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }
.ay-contacto .btn { min-height: 44px; padding: 0 16px; font-size: 15.5px; white-space: normal; overflow-wrap: anywhere; }
.ay-contacto .btn-wa svg.i { width: 20px; height: 20px; }
.ay-legal { display: flex; gap: 12px; align-items: flex-start; border-left-color: var(--yellow-2) !important; font-weight: 400 !important; font-size: 16px; line-height: 1.5; }
.ay-legal svg.i { margin-top: 2px; color: var(--warn-ink); }
.ay-pasos { list-style: none; padding-left: 0 !important; counter-reset: paso; }
.ay-pasos > li { position: relative; padding: 16px 16px 16px 64px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); counter-increment: paso; scroll-margin-top: 84px; }
.ay-pasos > li + li { margin-top: 12px !important; }
.ay-pasos > li::before { content: counter(paso); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--on-green); font-weight: 800; }
.ay-pasos h3 { margin-top: 4px !important; font-size: 18.5px; }
.ay-pasos p { margin-top: 8px !important; }
.ay-app { padding: 10px 12px; border-radius: 12px; background: var(--sunk); font-size: 16px; color: var(--ink-2); }
.ejemplo { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--yellow-soft); }
.ejemplo p { margin: 0 !important; }
.ay-fuentes li { overflow-wrap: anywhere; }
@media (max-width: 479px) { .ay-pasos > li { padding-left: 16px; padding-top: 58px; } }

/* ───────────── 404 ───────────── */
.e404 { display: grid; place-items: center; min-height: calc(100vh - 64px - 160px); padding: 48px 0; text-align: center; }
.e404 .cap { display: block; width: 120px; height: auto; margin: 0 auto 22px; }
.e404 h1 { font-size: clamp(30px, 6vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.e404 p { margin: 12px auto 0; max-width: 42ch; color: var(--ink-2); font-size: 18px; }
.e404 .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ───────────── Pie (igual que la portada) ───────────── */
footer { padding: 28px 0 36px; border-top: 1px solid var(--line); background: var(--paper); }
footer .wrap { display: grid; gap: 18px; }
.contacto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 16px; color: var(--ink-2); }
.contacto a { font-weight: 700; }
.pie-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.pie-links a { color: var(--ink-2); font-weight: 650; }
.legal { font-size: 14.5px; color: var(--muted); max-width: 72ch; }
.btn-wa { min-height: 42px; padding: 0 16px; font-size: 15.5px; background: var(--green); color: var(--on-green); }
.btn-wa:hover { background: var(--green-2); }
.btn-wa svg.i { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .top, footer, .skip, .indice, .arriba, .ay-buscar, .ay-contacto { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .tabla { border: 1px solid #999; }
}
