/* =========================
   📏 Ancho de lectura óptimo
   ========================= */

main {
  max-width: 70ch;
  margin: 2rem auto;
  line-height: 1.65;
  font-size: 1.05rem;
}


/* =========================
   📚 Sidebar (TOC)
   ========================= */

#TOC {
  font-size: 0.9rem;
  line-height: 1.4;
  padding-left: 0.5rem;
}

/* Más aire entre items */
#TOC ul {
  padding-left: 1rem;
}

/* Links del índice */
#TOC a {
  text-decoration: none;
  color: #444;
}

/* Hover */
#TOC a:hover {
  color: #000;
  text-decoration: underline;
}

/* Activo */
#TOC a.active {
  font-weight: 600;
  color: #000;
}


/* =========================
   🔽 Subniveles más claros
   ========================= */

#TOC ul ul a {
  color: #666;
}

#TOC ul ul ul a {
  color: #888;
}


/* =========================
   📌 Sidebar fijo (sticky)
   ========================= */

.sidebar {
  position: sticky;
  top: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}


/* =========================
   🧠 Mejora lectura general
   ========================= */

p {
  margin-bottom: 1rem;
}

h1, h2, h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}


/* =========================
   💻 Código más limpio
   ========================= */

pre {
  font-size: 0.9rem;
  border-radius: 6px;
}