/* Solo testdediagnosticoempresarial.com: resultado e informe impreso.
   Se carga después de assets/styles.css (núcleo) y assets/tipo.css (tipo test). */

/* Resultado */
.result-head { gap: 24px; padding-top: 56px; }
.result-head h1 { font-size: clamp(28px, 3.8vw, 42px); line-height: 1.2; color: #fff; }
#r-texto { max-width: 720px; font-size: 19px; }
.notice { align-self: flex-start; padding: 10px 14px; background: var(--bd-blue-dark-900); font-size: 15px; }

.ladder { list-style: none; margin: 8px 0 0; padding: 0; display: flex; }
.ladder li {
  flex: 1 1 0; min-width: 0; font-size: 16px; font-weight: 600;
  background: var(--bd-blue-dark-700); color: #fff;
  padding: 14px 26px; margin-left: -11px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
}
.ladder li:first-child { margin-left: 0; padding-left: 14px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.ladder li:last-child { padding-right: 14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16px 50%); }
.ladder li.done { background: var(--bd-blue-light); }
.ladder li.current { background: var(--bd-orange); color: var(--bd-black); }

.blockers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.blocker { padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.blocker .eyebrow { color: inherit; }
.blocker h3 { font-size: 26px; line-height: 1.2; color: inherit; }
.blocker-main { background: var(--bd-orange); color: var(--bd-black); }
.blocker-second { background: var(--bd-blue-light); color: #fff; }
.first-step { margin-top: 6px; padding: 14px 16px; background: #fff; font-size: 16px; line-height: 1.5; }

.detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.detail .stack { gap: 20px; }
.muted { font-size: 16px; color: var(--bd-ink-2); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.bar-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; margin-bottom: 6px; font-size: 16px; }
.bar-name { font-weight: 600; color: var(--bd-black); }
.bar-state { font-size: 14px; color: var(--bd-ink-2); }
.bar-track { height: 12px; background: #fff; }
.bar-fill { height: 100%; }
.bar-fortaleza .bar-fill { background: var(--bd-success); }
.bar-mejorable .bar-fill { background: var(--bd-blue-light); }
.bar-relevante .bar-fill { background: var(--bd-orange); }
.bar-critico .bar-fill { background: var(--bd-error); }
.bar-no-prioritaria .bar-fill { background: var(--bd-grey-300); }
.bar-no-prioritaria .bar-name { color: var(--bd-ink-2); }
.priorities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: p; }
.priorities li { display: flex; gap: 14px; align-items: flex-start; background: #fff; padding: 16px 18px; font-size: 16px; line-height: 1.5; counter-increment: p; }
.priorities li::before { content: "0" counter(p); flex: none; font: 700 18px/1.3 var(--font-heading); color: var(--bd-blue-light); }

@media (max-width: 640px) {
  .blocker { padding: 28px 22px; }
  .ladder { flex-direction: column; }
  .ladder li, .ladder li:first-child, .ladder li:last-child { margin: -4px 0 0; padding: 18px 16px; clip-path: polygon(0 0, 50% 8px, 100% 0, 100% calc(100% - 8px), 50% 100%, 0 calc(100% - 8px)); }
  .ladder li:first-child { margin-top: 0; padding-top: 12px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 50% 100%, 0 calc(100% - 8px)); }
  .ladder li:last-child { padding-bottom: 12px; clip-path: polygon(0 0, 50% 8px, 100% 0, 100% 100%, 0 100%); }
}

/* Botón «Descarga tu informe en PDF» (solo desde el email) */
.btn-pdf::after { content: "↓"; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.print-only { display: none; }

/* ---------- Versión impresa (Ctrl+P / Guardar como PDF desde el navegador) ---------- */
@media print {
  @page { size: A4; margin: 12mm 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff; font-size: 13px; }
  body { display: block; min-height: 0; }

  /* Fuera todo lo que no es el informe */
  .cookies, .site-footer, .notice, .result-actions,
  #screen-intro, #screen-quiz, #screen-lead { display: none !important; }
  .print-only { display: block; }

  :root { --section-y: 22px; --gutter: 14mm; }
  .wrap { max-width: none; }
  .site-header { border-bottom: 2px solid var(--bd-blue-dark); }
  .site-header .wrap { padding-top: 0; padding-bottom: 8px; }

  h1, .result-head h1 { font-size: 26px; }
  .h2, .cta-band h2 { font-size: 18px; }
  .result-head { padding-top: 24px; gap: 14px; }
  #r-texto { max-width: none; font-size: 14px; }
  .ladder li { font-size: 12px; padding-top: 9px; padding-bottom: 9px; }

  .blockers { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .blocker { padding: 20px; gap: 8px; }
  .blocker h3 { font-size: 18px; }
  .first-step { font-size: 12px; }
  .detail { grid-template-columns: 1fr 1fr; gap: 28px; }
  .bars { gap: 10px; }
  .bar-head, .priorities li, .muted { font-size: 12px; }
  .bar-state { font-size: 11px; }
  .priorities li { padding: 10px 12px; }

  /* Nada partido entre páginas */
  section, .blocker, .bars li, .priorities li, .ladder { break-inside: avoid; }

  /* El botón de reserva no se puede pulsar en papel: se muestra la dirección */
  .cta-band .wrap { padding-top: 18px; padding-bottom: 18px; }
  .cta-band p { font-size: 13px; }
  .cta-band .btn { display: inline; background: none; color: var(--bd-black); padding: 0; font-size: 13px; font-weight: 600; white-space: normal; }
  .cta-band .btn::after { content: ": " attr(href); font-weight: 400; }

  .print-footer { margin: 16px 14mm 0; padding-top: 10px; border-top: 1px solid var(--bd-grey-300); font-size: 11px; color: var(--bd-ink-2); word-break: break-all; }
}
