/* Notas de teoría — Cómputo Concurrente
   Estilo y espaciado de las páginas que genera Org (publish.el).
   Hereda colores y componentes de /styles.css y /teaching/practicas/practica.css. */

body {
  font-family: 'General Sans', system-ui, sans-serif;
  background: #fcfcfc;
}

/* El título ya se muestra en el encabezado oscuro, no hace falta repetirlo.
   Con html5-fancy, Org lo envuelve en un <header>. */
#content > header,
#content > .title,
#content > .subtitle { display: none; }

/* --- La hoja --- */
#content {
  max-width: 820px;
  margin: 2.5rem auto 3rem;
  padding: 3rem 3.2rem;
  background: var(--card-bg);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);

  /* Aquí vive el respiro entre líneas */
  font-size: 1.05rem;
  line-height: 1.85;
  color: #23232b;
}

@media (max-width: 700px) {
  #content { padding: 1.75rem 1.35rem; margin: 1.25rem 1rem 2rem; font-size: 1rem; }
}

/* --- Párrafos y listas: aire entre bloques --- */
#content p { margin: 0 0 1.5rem; }

#content ul,
#content ol { margin: 0 0 1.6rem; padding-left: 1.6rem; }
#content li { margin-bottom: .85rem; }
#content li:last-child { margin-bottom: 0; }
#content li > ul,
#content li > ol { margin: .85rem 0 0; }
#content li p { margin-bottom: .85rem; }

#content dl { margin: 0 0 1.6rem; }
#content dt { font-weight: 600; margin-top: 1.2rem; }
#content dd { margin: .4rem 0 0 1.6rem; }

/* --- Encabezados: mucho espacio arriba, poco abajo --- */
#content h1,
#content h2,
#content h3,
#content h4 { line-height: 1.3; }

#content h2 {
  margin: 3.5rem 0 1.5rem;
  font-size: 1.55rem;
  color: var(--bg);
  border-bottom: 3px solid var(--accent-pink);
  padding-bottom: .45rem;
}

#content h3 {
  margin: 2.75rem 0 1.1rem;
  font-size: 1.2rem;
  color: var(--purplue);
}

#content h4 {
  margin: 2.25rem 0 .9rem;
  font-size: 1.05rem;
  color: #444;
}

/* La primera sección después del índice no necesita separación extra */
#table-of-contents + section > h2,
#table-of-contents + div > h2 { margin-top: 1.5rem; }

/* --- Índice --- */
#table-of-contents {
  background: #faf9fd;
  border: 1px solid #ece8f6;
  border-left: 4px solid var(--purplue);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin: 0 0 3rem;
  font-size: .95rem;
  line-height: 1.7;
}
#table-of-contents h2 {
  margin: 0 0 .8rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  padding: 0;
}
#table-of-contents ul { list-style: none; margin: 0; padding-left: 0; }
#table-of-contents ul ul { padding-left: 1.2rem; margin-top: .5rem; }
#table-of-contents li { margin-bottom: .5rem; }
#table-of-contents a { text-decoration: none; color: var(--text); }
#table-of-contents a:hover { color: var(--purplue); text-decoration: underline; }

/* --- Citas y notas al margen --- */
#content blockquote {
  margin: 2rem 0;
  padding: 1.1rem 1.5rem;
  border-left: 4px solid var(--accent-green);
  background: #f6fbf9;
  border-radius: 0 10px 10px 0;
  color: #33413c;
}
#content blockquote p:last-child { margin-bottom: 0; }

/* --- Código --- */
#content pre,
#content pre.src {
  background: #1e222a;
  color: #d7dae0;
  padding: 1.3rem 1.2rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.65;
  margin: 2rem 0;
}
#content code {
  background: #f3f0fa;
  color: #6a2fb5;
  padding: .12rem .38rem;
  border-radius: 4px;
  font-size: .9em;
}
#content pre code { background: none; color: inherit; padding: 0; }

/* --- Imágenes --- */
#content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2.5rem auto;
  border-radius: 8px;
}
#content figure { margin: 2.5rem 0; text-align: center; }
#content figcaption { font-size: .88rem; color: #666; margin-top: .75rem; font-style: italic; }

/* --- Tablas --- */
#content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: .95rem;
  line-height: 1.6;
  display: block;
  overflow-x: auto;
}
#content th {
  background: var(--muted);
  color: #fff;
  text-align: left;
  padding: .8rem 1rem;
  font-weight: 600;
}
#content td { padding: .8rem 1rem; border-bottom: 1px solid #eee; vertical-align: top; }
#content tr:nth-of-type(even) td { background: #fafafa; }

/* --- Separadores y pie --- */
#content hr {
  border: none;
  border-top: 1px solid #eaeaea;
  margin: 3rem 0;
}
#postamble .status,
#postamble p.author,
#postamble p.date,
#postamble p.creator,
#postamble p.validation { display: none; }

/* Enlace de regreso, fuera de la hoja */
#postamble .back-link {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  padding: 0 3.2rem;
  border: none;
  font-size: .95rem;
}
