/* ═══════════════════════════════════════════════════════════
   Equslac · Hoja de estilos para documentos científicos
   Alineada al sistema de diseño de la web (Pantone 2172/3577 C,
   Jost + Cormorant Garamond). Formato A4, listo para imprimir.
   ═══════════════════════════════════════════════════════════ */
:root{
  --blue:#167ec2; --blue-light:#8bbcdb; --blue-dark:#0d6aab;
  --blue-bg:#EEF6FB; --blue-bg-2:#DDE9F2; --off-white:#F8FAFB;
  --sage:#4CAF7D; --sage-bg:#E8F5EE; --amber:#F5A623;
  --warm:#FFF8E7; --warm-border:#F5C842;
  --gray-600:#4A5862; --gray-900:#1A2B38; --gray-400:#7A8B96; --gray-200:#D2DCE3;
  --font-sans:'Jost',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-serif:'Cormorant Garamond',Georgia,serif;
}
*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-print-color-adjust:exact;print-color-adjust:exact}
body{
  font-family:var(--font-sans); font-size:10.5pt; line-height:1.6;
  color:var(--gray-900); background:var(--off-white);
}
.page{
  width:210mm; min-height:297mm; margin:0 auto 8mm; background:#fff;
  position:relative; overflow:hidden; box-shadow:0 6px 28px rgba(22,126,194,.14);
}
/* Pantalla: bloques tipo "hoja". Impresión/PDF: flujo continuo con la portada
   como única página a sangre (named page) y márgenes en las páginas de contenido. */
@page{ size:A4; margin:0 }
@page doc{ size:A4; margin:15mm 0 }
@media print{
  html,body{ background:#fff }
  .page{ box-shadow:none; margin:0; min-height:0; overflow:visible }
  .page + .page{ page-break-before:auto }
  .cover{ page-break-after:always }
  .content{ page:doc }
  table,figure,.callout,.note,.keypoints,.stats,.step,.sintoma,.velocidad{ break-inside:avoid }
  h2,h3,h4{ break-after:avoid }
}

/* ── Portada ── */
.cover{
  background:linear-gradient(150deg,var(--blue) 0%,var(--blue-dark) 60%,#0a5c95 100%);
  color:#fff; padding:30mm 22mm 24mm; min-height:297mm;
  display:flex; flex-direction:column;
}
.cover-logo{ height:56px; width:auto; margin-bottom:auto; align-self:flex-start }
.cover-eyebrow{
  font-size:11pt; letter-spacing:.22em; text-transform:uppercase;
  font-weight:500; color:var(--blue-light); margin-bottom:16px;
}
.cover h1{
  font-family:var(--font-serif); font-weight:500; font-size:40pt;
  line-height:1.06; letter-spacing:-.3px; margin-bottom:14px; max-width:150mm;
}
.cover h1 span{ color:var(--blue-light) }
.cover-sub{
  font-size:13.5pt; font-weight:300; line-height:1.5; max-width:140mm;
  color:rgba(255,255,255,.92);
}
.cover-tag{
  margin-top:26px; display:inline-block; align-self:flex-start;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25);
  border-radius:50px; padding:7px 18px; font-size:10pt; letter-spacing:.05em;
}
.cover-foot{
  margin-top:24px; padding-top:18px; border-top:1px solid rgba(255,255,255,.22);
  font-size:9pt; color:rgba(255,255,255,.8); line-height:1.7;
}
.cover-foot b{ color:#fff; font-weight:500 }

/* ── Contenido ── */
.content{ padding:6mm 22mm 18mm }
.content.first{ padding-top:14mm }
.lead{
  font-family:var(--font-serif); font-size:16pt; font-weight:400;
  line-height:1.45; color:var(--blue-dark); margin-bottom:22px;
}
.lead b{ font-weight:600; color:var(--blue) }
h2{
  font-family:var(--font-serif); font-weight:600; font-size:19pt;
  color:var(--blue-dark); margin:26px 0 10px; line-height:1.12;
  display:flex; align-items:baseline; gap:10px;
}
h2 .num{
  font-family:var(--font-sans); font-size:11pt; font-weight:600; color:#fff;
  background:var(--blue); border-radius:7px; padding:3px 9px; line-height:1;
}
h3{
  font-family:var(--font-sans); font-weight:600; font-size:12pt;
  color:var(--blue); margin:18px 0 8px;
}
p{ margin-bottom:11px; color:var(--gray-600); text-align:justify }
p strong{ color:var(--gray-900); font-weight:500 }
ul{ margin:0 0 12px 0; padding-left:0; list-style:none }
ul li{
  position:relative; padding-left:22px; margin-bottom:8px; color:var(--gray-600);
}
ul li::before{
  content:""; position:absolute; left:4px; top:8px; width:7px; height:7px;
  background:var(--blue-light); border-radius:50%;
}

/* ── Tablas ── */
.tbl-wrap{ margin:14px 0 8px }
table{
  width:100%; border-collapse:collapse; font-size:9pt;
  border-radius:10px; overflow:hidden; box-shadow:0 2px 10px rgba(22,126,194,.07);
}
caption{
  caption-side:bottom; font-size:8pt; color:var(--gray-400);
  text-align:left; padding:8px 2px 0; line-height:1.4; font-style:italic;
}
thead th{
  background:var(--blue); color:#fff; font-weight:500; text-align:left;
  padding:9px 11px; font-size:9pt; letter-spacing:.02em;
}
thead th.hl{ background:var(--blue-dark) }
tbody td{ padding:7px 11px; border-bottom:1px solid var(--blue-bg-2); color:var(--gray-600) }
tbody td:first-child{ color:var(--gray-900); font-weight:500 }
tbody tr:nth-child(even){ background:var(--off-white) }
tbody td.hl{ background:var(--blue-bg); color:var(--blue-dark); font-weight:600 }
tbody tr:nth-child(even) td.hl{ background:#E4F0F8 }
.tbl-num{ text-align:center !important }

/* ── Destacados ── */
.callout{
  background:var(--warm); border:1px solid var(--warm-border);
  border-left:4px solid var(--amber); border-radius:10px;
  padding:13px 18px; margin:18px 0; font-size:9.5pt;
}
.callout b{ color:#9a6a00 }
.note{
  background:var(--blue-bg); border-left:4px solid var(--blue-light);
  border-radius:8px; padding:12px 16px; margin:16px 0; font-size:9.5pt; color:var(--gray-600);
}
.keypoints{
  background:var(--sage-bg); border:1px solid #C5E6D3; border-radius:12px;
  padding:16px 20px; margin:18px 0;
}
.keypoints h3{ color:#2e7d52; margin-top:0 }
.keypoints ul li::before{ background:var(--sage) }

/* ── Stat cards ── */
.stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:18px 0 }
.stat{ background:var(--blue-bg); border:1px solid var(--blue-bg-2); border-radius:12px; padding:14px 16px; text-align:center }
.stat .big{ font-family:var(--font-serif); font-size:26pt; font-weight:600; color:var(--blue); line-height:1 }
.stat .lbl{ font-size:8.5pt; color:var(--gray-600); margin-top:6px; line-height:1.35 }

/* ── Referencias ── */
.refs{ margin-top:18px; padding-top:14px; border-top:2px solid var(--gray-200) }
.refs h2{ font-size:15pt; margin-top:0 }
.refs ol{ padding-left:18px; columns:1 }
.refs li{ font-size:7.8pt; color:var(--gray-400); margin-bottom:5px; line-height:1.4; text-align:left }

/* ── Pie ── */
.docfoot{
  margin-top:22px; padding-top:14px; border-top:1px solid var(--gray-200);
  font-size:7.5pt; color:#9aa7b0; text-align:center; line-height:1.5;
}
figcaption{ font-size:8pt; color:var(--gray-400); font-style:italic; text-align:center; margin-top:6px }

/* ── Barra de acciones (no se imprime) ── */
.doc-actions{
  position:fixed; top:16px; right:16px; z-index:999; display:flex; gap:8px;
}
.doc-actions button, .doc-actions a{
  font-family:var(--font-sans); font-size:10pt; font-weight:500; cursor:pointer;
  border:none; border-radius:50px; padding:10px 18px; color:#fff; background:var(--blue);
  box-shadow:0 4px 16px rgba(22,126,194,.32); transition:transform .15s ease, background .15s ease;
  text-decoration:none; display:inline-flex; align-items:center;
}
.doc-actions button:hover, .doc-actions a:hover{ background:var(--blue-dark); transform:translateY(-1px) }
.doc-actions button.ghost{ background:#fff; color:var(--blue); border:1px solid var(--blue-bg-2) }
.doc-actions button.ghost:hover{ background:var(--blue-bg) }
@media print{ .doc-actions{ display:none !important } }
@media (max-width:680px){ .doc-actions button, .doc-actions a{ padding:9px 14px; font-size:9.5pt } }

/* ── Pasos numerados ── */
.steps{ display:flex; flex-direction:column; gap:11px; margin:16px 0 }
.step{
  display:flex; gap:14px; align-items:flex-start;
  background:#fff; border:1px solid var(--blue-bg-2); border-radius:12px;
  padding:14px 16px; box-shadow:var(--shadow-sm);
}
.step-n{
  flex:0 0 32px; width:32px; height:32px; border-radius:50%;
  background:var(--blue); color:#fff; font-weight:600; font-size:11pt;
  display:flex; align-items:center; justify-content:center;
}
.step-body{ flex:1 }
.step-body h4{ font-family:var(--font-sans); font-weight:600; font-size:11pt; color:var(--blue-dark); margin-bottom:3px }
.step-body p{ margin:0; font-size:9.5pt }
.step-body p strong{ color:var(--gray-900) }

/* ── Chips ── */
.chips{ display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 }
.chip{
  background:var(--blue-bg); color:var(--blue-dark); border:1px solid var(--blue-bg-2);
  border-radius:50px; padding:6px 14px; font-size:9pt; font-weight:500;
}
.chip.lead-chip{ background:var(--blue); color:#fff; border-color:var(--blue) }
