/* ============================================================
   Impresión y exportar a PDF
   ------------------------------------------------------------
   Capa: base
   ============================================================ */

/* ═══════════════════════════════════════════════════
   IMPRESIÓN / EXPORTAR A PDF
   Apunte limpio: sin navbar, sin halos, todo abierto, sin cortes feos.
═══════════════════════════════════════════════════ */
@media print {
  nav, .nav-buttons, #btn-arriba, #cursor-light, #progress-bar,
  #toc-lateral, .qr-section, #theme-toggle, .copy-latex-btn,
  #modal-bienvenida, .hero-shapes,
  .next-apunte, .toggle-all-bar, .toast-fin { display: none !important; }

  body { background: #fff !important; color: #000 !important; overflow: visible !important; }
  body::before { display: none !important; }

  .hero { margin-top: 0; padding: 24px; background: #fff !important; animation: none; }
  .hero h1 { color: var(--accent-2) !important; text-shadow: none; }
  .hero p, .hero-badge, .reading-time-badge { color: #333 !important; }

  /* Forzar todas las secciones y ejercicios abiertos en papel */
  .section-body { display: block !important; }
  .ejercicio-respuesta { display: block !important; }
  .practica-respuesta { display: block !important; }

  .section-block, .ejercicio-item, .example-box, .grafico-wrap, .paso {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  .section-block { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000 !important; text-decoration: none; }
  /* Sin hint ↻ en impresión */
  .grafico-wrap.replay-ready::after { display: none !important; }
}


/* ── BOTÓN VOLVER A BIBLIOTECA ── */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 14px;
  margin-left: 6px;
  border-left: 1px solid currentColor;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  opacity: .35;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.nav-back:hover { opacity: 1; transform: translateX(-2px); }
.nav-back svg { transition: transform .25s cubic-bezier(.34,1.56,.64,1); flex-shrink: 0; }
.nav-back:hover svg { transform: translateX(-3px); }
@media(max-width:600px) {
  .nav-back span { display: none; }      /* en mobile queda solo la flecha */
  .nav-back { padding-left: 10px; margin-left: 4px; gap: 0; }
}
