/* ══════════════════════════════════════════════════════════════════════════
 * QOSTUM · Manual y guías · Tipografía uniforme (2026-11-11)
 * Enrique: «un tamaño de fuente uniforme, un poco más pequeño; sin espacio
 * exagerado entre párrafos; tarjetas con la misma letra que el texto; títulos
 * con un mismo tamaño y alineación». Se carga AL FINAL del <head> de cada guía,
 * del manual y del manual de Programación, para mandar sobre sus estilos propios.
 *   Texto (párrafos, listas, tarjetas, avisos, tablas): 14 px / 1.6
 *   Entrada (lead): 15 px · Títulos: h2 20 px · h3 16 px · h4 14.5 px
 *   Entre párrafos: 10 px · entre viñetas: 4 px
 * ══════════════════════════════════════════════════════════════════════════ */

/* Texto corrido: el mismo tamaño dentro y fuera de las tarjetas */
.section p, .section li, .section td, .section dd,
.callout p, .callout li, .step-content p, .step-content li,
.concept-card p, .tipo-card-content p, .tut-list-item p,
.footer-cta p, .intro p,
body > section p, body > section li, body > section td,
.tip, .warning, .success, .highlight, .note {
  font-size: 14px !important;
  line-height: 1.6 !important;
}
.section th, body > section th { font-size: 12.5px !important; }

/* Separación entre párrafos (antes 16 px) y entre viñetas */
.section > p, .step-content > p, body > section > p, .intro > p { margin: 0 0 10px !important; }
.section li, .step-content li, body > section li { margin-bottom: 4px !important; }
.section ul, .section ol, body > section ul, body > section ol { margin-top: 0 !important; margin-bottom: 12px !important; }

/* Entrada de cada sección */

/* Títulos: un solo tamaño por nivel, alineados a la izquierda */
.section > h2, body > section > h2 { font-size: 20px !important; line-height: 1.3 !important; margin: 28px 0 8px !important; text-align: left !important; }
.section > h3, .step-content > h3, body > section > h3 { font-size: 16px !important; line-height: 1.35 !important; margin: 22px 0 6px !important; text-align: left !important; }
.section > h4, body > section > h4 { font-size: 14.5px !important; line-height: 1.35 !important; margin: 16px 0 6px !important; text-align: left !important; }
.concept-card h4, .tipo-card h4 { font-size: 14.5px !important; }
.section > h2:first-child, .section > h3:first-child, .step-content > h3:first-child { margin-top: 0 !important; }

/* Avisos y tarjetas: su título un punto menor que el texto, nunca mayor */
.callout-title { font-size: 13px !important; }
.callout { padding: 12px 16px !important; }
.callout p + p { margin-top: 6px !important; }

/* Cierre de cada guía: misma letra que el resto */
.footer-cta h2, .footer-cta h3 { font-size: 18px !important; }

/* Entre secciones: 120 px de aire se veían como un hueco. */
.section { padding-bottom: 28px !important; margin-bottom: 28px !important; }
.section-eyebrow { margin-bottom: 8px !important; }
.section-eyebrow + h2, .section-eyebrow + h1 { margin-top: 0 !important; }

/* Entrada: el mismo tamaño del texto (uniforme), en un gris apenas más suave */
.section p.lead, .section .lead, .content .lead { font-size: 14px !important; line-height: 1.6 !important; margin-bottom: 12px !important; }

/* Accesos fijos arriba (2026-11-11): volver al índice de guías y al manual desde cualquier página */
.doc-inicio { display:inline-flex; align-items:center; gap:2px; margin-right:8px; padding-right:10px; border-right:1px solid #E7E5E4; }
.doc-inicio a { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:6px; font-size:13px; font-weight:600; color:#4B5563; text-decoration:none; white-space:nowrap; }
.doc-inicio a:hover { background:#fff7ed; color:#C86D45; }
.doc-inicio a .mi, .doc-inicio a svg { width:14px; height:14px; flex:none; }
html[data-theme="dark"] .doc-inicio { border-right-color:var(--qd-border); }
html[data-theme="dark"] .doc-inicio a { color:var(--qd-text-muted); }
html[data-theme="dark"] .doc-inicio a:hover { background:rgba(217,125,85,.12); color:#E8A98A; }
@media (max-width: 720px) { .doc-inicio a { font-size:0; gap:0; padding:6px 8px; } .doc-inicio a svg { width:16px; height:16px; } }

/* ══════════════════════════════════════════════════════════════════════════
 * Espacio bien aprovechado (2026-11-12)
 * Enrique: «las tarjetas tienen una altura exagerada y ocupan muchísimo espacio
 * para presentar tan poca información… también tablas… el panel izquierdo está
 * demasiado separado y podría verse más ordenado».
 * Medido antes (1440 px): paso de una línea 73 px (18 px de relleno + círculo de
 * 36 + título de 16), tarjeta «Siguiente» 138 px, aviso con 24/48 px de margen,
 * fila de tabla 45 px, entrada del índice 37 px.
 * ══════════════════════════════════════════════════════════════════════════ */

/* ── Portada: menos aire arriba y abajo ── */
.hero { padding-top: 30px !important; padding-bottom: 18px !important; }
.hero-eyebrow { margin-bottom: 12px !important; }
.hero h1 { margin-bottom: 12px !important; }
.hero p, .hero .lead { margin-bottom: 16px !important; }
.hero-meta { gap: 18px !important; }
.hero-meta-icon { width: 26px !important; height: 26px !important; }
.layout { margin-top: 14px !important; margin-bottom: 48px !important; }

/* ── Pasos numerados: una línea = una fila compacta ── */
.step-list { gap: 6px !important; margin: 12px 0 16px !important; }
.step-row { padding: 9px 14px !important; gap: 12px !important; border-radius: 8px !important; align-items: flex-start !important; }
.step-row:not(:has(p, ul, ol)) { align-items: center !important; }
.step-num { width: 26px !important; height: 26px !important; font-size: 13px !important; margin-top: 0 !important; }
.step-row h4 { font-size: 14px !important; font-weight: 600 !important; line-height: 1.45 !important; margin: 0 !important; }
.step-row:has(p, ul, ol) h4 { margin-top: 3px !important; }
.step-row p { margin: 2px 0 0 !important; line-height: 1.5 !important; }
.step-row ul, .step-row ol { margin: 4px 0 0 !important; padding-left: 18px !important; }
.step-row li { margin-bottom: 1px !important; line-height: 1.5 !important; }
.step-row > div:last-child > :last-child { margin-bottom: 0 !important; }

/* ── Tarjetas: relleno de tarjeta, no de portada ── */
.next-card, .use-card, .concept-card, .compare-side, .compare-card:not(.par):not(.pex),
.stat-card, .feature-card, .format-card, .export-card, .hab-card, .issue-card, .origin-card,
.qw-card, .patt-card, .file-card, .speed-card, .country-card, .diag-item, .tipo-card, .insumo-card,
.tut-list-item {
  padding: 12px 14px !important;
}
.next-card h4, .use-card h4, .concept-card h4, .feature-card h4, .format-card h4 { margin: 2px 0 2px !important; }
.next-card p, .use-card p, .concept-card p { margin: 0 !important; }
.next-card-num { margin-bottom: 2px !important; }
.section [class*="grid"] { gap: 10px !important; }
.steps, .day-card, .fx-card, .combo, .cascade, .struct-box, .sheet, .gantt-mock, .scope-demo, .quant-mock {
  padding: 14px 16px !important;
}
.section > .steps, .section > .day-card, .section > .fx-card, .section > .combo, .section > .cascade,
.section > .gantt-mock, .section > .scope-demo, .section > .quant-mock, .section > .treemap,
.section > [class*="grid"], .section > .compare { margin-top: 12px !important; margin-bottom: 16px !important; }
.cascade-row { padding: 9px 14px !important; }

/* ── Avisos: el mismo margen que un párrafo ── */
.callout { margin: 12px 0 14px !important; padding: 10px 14px !important; }
.callout-title { margin-bottom: 2px !important; }

/* ── Tablas: filas de lectura, no de formulario ── */
.section table, .content table { margin: 12px 0 16px !important; }
.section thead th, .content thead th, .section table th, .content table th {
  padding: 7px 12px !important; font-size: 11.5px !important; letter-spacing: .4px; line-height: 1.35 !important;
}
.section tbody td, .content tbody td, .section table td, .content table td { padding: 6px 12px !important; line-height: 1.45 !important; }
pre.code-block, .section pre { margin: 12px 0 16px !important; padding: 12px 16px !important; }

/* ── Encabezados de subsección: pegados a lo que titulan ── */
.section > h3, .step-content > h3, body > section > h3 { margin: 18px 0 6px !important; }

/* ── Índice del manual (panel izquierdo) ── */
.sidebar .toc-label { margin: 12px 0 4px !important; padding-left: 12px !important; font-size: 10.5px !important; letter-spacing: .9px !important; }
.sidebar .toc-app-header + .toc-label, .sidebar .toc-app-header + * .toc-label { margin-top: 8px !important; }
.sidebar .toc a { padding: 4px 10px 4px 12px !important; font-size: 13.5px !important; line-height: 1.35 !important; border-radius: 6px; }
.sidebar .toc .toc-step { width: 20px !important; height: 20px !important; line-height: 20px !important; font-size: 10.5px !important; margin-right: 8px !important; }
.sidebar .toc-app-divider { margin: 3px 0 !important; }
/* Cabeceras de módulo: sin barra izquierda de color (§12 #14); el color queda en el ícono y el chevrón */
.toc-app-header {
  border-left-width: 1px !important; border-left-color: #E7E5E4 !important; border-color: #E7E5E4 !important;
  padding: 7px 10px !important; margin-bottom: 4px !important; font-size: 11px !important; border-radius: 8px !important;
}
html[data-theme="dark"] .toc-app-header { border-color: var(--qd-border, #323b48) !important; }
/* Ítem activo: fondo crema y texto en naranja oscuro, sin barra lateral (§12 #14) */
.sidebar .toc a.active { background: #FEF3EC; border-left-color: transparent !important; color: #C86D45 !important; }
html[data-theme="dark"] .sidebar .toc a.active { background: rgba(217,125,85,.14); color: #E8A98A !important; }
/* Índice de guías (barra izquierda de las guías) */
.gnav-item { padding: 4px 9px !important; }
.gnav-list { margin: 0 0 4px !important; }
/* «En esta guía / En esta página» (columna derecha) */
#qEnEstaPagina .qep-a { padding: 3px 0 3px 12px !important; }
#qEnEstaPagina .toc a { padding: 4px 8px !important; font-size: 13px !important; line-height: 1.35 !important; }
#qEnEstaPagina .toc .toc-step { width: 20px !important; height: 20px !important; line-height: 20px !important; font-size: 10.5px !important; }
/* ── Entre secciones: 80 px de hueco → 40 px (el filete queda a la mitad) ── */
.section { padding-bottom: 20px !important; margin-bottom: 20px !important; }
.section::after { margin: 20px 0 -21px !important; }
.section > :last-child { margin-bottom: 0 !important; }

/* ══ Lienzo claro (2026-11-13, Enrique: «ya no quiero que el crema anterior vuelva a aparecer») ══
   Manual, guías y artículos usan el mismo fondo que la landing y los módulos (SISTEMA §5.20):
   lienzo #FAFAF9 con cuadrícula neutra, superficies en blanco, bordes piedra #E7E5E4.
   Antes: #FDFCFA de página, encabezado rgba(253,252,250) y navegación de guías #FAF7F4. */
html:not([data-theme="dark"]) body { background-color: #FAFAF9 !important; }
html:not([data-theme="dark"]) body::before {
  background-size: 36px 36px !important;
  background-image: linear-gradient(to right, rgba(0,0,0,.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,.035) 1px, transparent 1px) !important;
}
html:not([data-theme="dark"]) .page-header { background: rgba(250,250,249,.88) !important; border-bottom-color: #E7E5E4 !important; }
html:not([data-theme="dark"]) .gnav { background: #FFFFFF !important; border-color: #E7E5E4 !important; }
