/* La ayuda de VanyCorp, con la marca de la casa (sprint 6 de usabilidad, X06).

   Los colores, las fuentes (Archivo y Plex Mono, servidas desde aquí mismo), el
   claro y el oscuro y el lockup los pone VanyMarca: `/marca/tokens.css` y
   `/marca/marca.css`, copiados al generar (`generar.py`). Aquí había una paleta
   copiada a mano con otros nombres, fuentes del sistema y la barra grafito que
   VanyCuenta ya abandonó (hallazgo 1 del diagnóstico de VanyAyuda): la ayuda era
   el único sitio de la plataforma que no se parecía a los demás.

   Lo que queda aquí es solo la disposición de la página: la barra con el
   buscador, el índice de secciones y la columna de lectura. **Ningún color
   escrito a mano**: todo `var(--vc-…)` (lo comprueba `pruebas/test_generar.py`). */
* { box-sizing: border-box; }
html { color-scheme: light dark; scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--vc-bg); color: var(--vc-tinta); font-family: var(--vc-font-sans);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--vc-primario); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--vc-primario-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Barra ─────────────────────────────────────────────────────────────── */
.barra { position: sticky; top: 0; z-index: 20; background: var(--vc-superficie); color: var(--vc-tinta);
  display: flex; align-items: center; gap: 1.2rem; padding: 0 clamp(1rem, 3vw, 2.2rem); height: 56px;
  border-bottom: 1px solid var(--vc-borde); }
.marca { color: var(--vc-tinta); flex: none; }
.marca:hover { text-decoration: none; }
.volver { color: var(--vc-tinta-suave); font-size: .88rem; margin-left: auto; white-space: nowrap; }
.volver:hover { color: var(--vc-tinta); }
#menu { display: none; background: transparent; color: var(--vc-tinta); font: inherit;
  font-size: .85rem; border: 1px solid var(--vc-borde); border-radius: var(--vc-radio-sm);
  padding: .3rem .6rem; cursor: pointer; }

/* ── Buscador ──────────────────────────────────────────────────────────── */
.buscador { position: relative; flex: 1; max-width: 420px; min-width: 0; }
.buscador input { width: 100%; padding: .45rem .7rem; font: inherit; font-size: .92rem;
  background: var(--vc-bg); color: var(--vc-tinta); border: 1px solid var(--vc-borde);
  border-radius: var(--vc-radio-sm); }
.buscador input::placeholder { color: var(--vc-tinta-ejemplo); opacity: 1; }
.buscador input:focus { outline: 2px solid var(--vc-primario-2); outline-offset: 1px; }
#resultados { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--vc-superficie);
  border: 1px solid var(--vc-borde); border-radius: var(--vc-radio-md); max-height: 60vh; overflow-y: auto;
  box-shadow: var(--vc-sombra-elevada); }
#resultados a { display: block; padding: .6rem .8rem; border-top: 1px solid var(--vc-superficie-2);
  color: var(--vc-tinta); }
#resultados a:first-child { border-top: 0; }
#resultados a:hover, #resultados a.marcado { background: var(--vc-primario-suave); text-decoration: none; }
#resultados b { display: block; font-size: .95rem; }
#resultados span { display: block; color: var(--vc-tinta-suave); font-size: .82rem; }
#resultados .nada { padding: .8rem; color: var(--vc-tinta-suave); font-size: .9rem; }

/* ── Cuerpo ────────────────────────────────────────────────────────────── */
.cuerpo { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.rail { border-right: 1px solid var(--vc-borde); padding: 1.4rem 0 3rem;
  position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; }
.rail a { display: block; padding: .4rem clamp(1rem, 2vw, 1.6rem); color: var(--vc-tinta-suave);
  font-size: .92rem; border-left: 3px solid transparent; }
.rail a:hover { color: var(--vc-tinta); text-decoration: none; }
.rail a.activa { color: var(--vc-tinta); border-left-color: var(--vc-primario); font-weight: var(--vc-peso-fuerte); }
.rail .grupo { font-family: var(--vc-font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--vc-tinta-tenue); padding: 1.3rem clamp(1rem, 2vw, 1.6rem) .3rem; }
.rail .grupo:first-child { padding-top: 0; }
main { padding: clamp(1.4rem, 3vw, 2.6rem); max-width: 76ch; min-width: 0; }

/* ── Texto ─────────────────────────────────────────────────────────────── */
h1 { font-stretch: 125%; font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15;
  margin: 0 0 .4rem; text-wrap: balance; letter-spacing: -.01em; }
.sub { color: var(--vc-tinta-suave); margin: 0 0 2rem; font-size: 1.05rem; }
h2 { font-stretch: 112%; font-size: 1.3rem; margin: 2.4rem 0 .6rem; padding-top: .6rem;
  border-top: 1px solid var(--vc-borde); text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
h4 { font-size: .95rem; margin: 1.2rem 0 .3rem; color: var(--vc-tinta-suave); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
code { font-family: var(--vc-font-mono); font-size: .88em; background: var(--vc-superficie-2);
  padding: .1rem .3rem; border-radius: var(--vc-radio-sm); }
pre { background: var(--vc-superficie); color: var(--vc-tinta); border: 1px solid var(--vc-borde);
  padding: 1rem 1.1rem; overflow-x: auto; border-radius: var(--vc-radio-sm); margin: 0 0 1.2rem;
  font-size: .86rem; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
blockquote { margin: 0 0 1.2rem; padding: .8rem 1.1rem; border-left: 3px solid var(--vc-laton);
  background: var(--vc-laton-suave); }
blockquote p:last-child { margin: 0; }
.aviso { padding: .9rem 1.1rem; border-left: 3px solid var(--vc-laton); background: var(--vc-laton-suave); }
.nota { color: var(--vc-tinta-suave); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; margin-bottom: 1.2rem; }
th { text-align: left; font-family: var(--vc-font-mono); font-weight: 500; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--vc-tinta-tenue); padding: .4rem .9rem .4rem 0;
  border-bottom: 1px solid var(--vc-borde); white-space: nowrap; }
td { padding: .55rem .9rem .55rem 0; border-bottom: 1px solid var(--vc-superficie-2); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
.desplaza { overflow-x: auto; }

.enesta { border: 1px solid var(--vc-borde); border-radius: var(--vc-radio-md); padding: .8rem 1rem;
  margin: 0 0 2rem; background: var(--vc-superficie); }
.enesta span { display: block; font-family: var(--vc-font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--vc-tinta-tenue); margin-bottom: .4rem; }
.enesta a { display: block; font-size: .92rem; padding: .12rem 0; }

footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--vc-borde);
  color: var(--vc-tinta-suave); font-size: .92rem; }

@media (max-width: 860px) {
  .cuerpo { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--vc-borde);
    padding: .8rem 0; display: none; }
  .rail.abierto { display: block; }
  #menu { display: inline-block; }
  .volver { display: none; }
}
/* En un teléfono el lockup entero no cabe junto al buscador: queda «Ayuda». */
@media (max-width: 480px) {
  .barra { gap: .6rem; }
  .marca .vc-lockup { font-size: .95rem; }
}
