/* Manuales de la plataforma (/manual). Se apoya en los tokens de app.css. */
body.manual { background: #fff; color: var(--ink); font-size: 16px; line-height: 1.65; }
.m-head { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.m-head::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 34px solid rgba(243, 111, 33, .22); }
.m-head .wrap { max-width: 1120px; padding-block: 28px 34px; position: relative; z-index: 1; }
.m-crumbs { font-size: 13px; opacity: .8; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m-crumbs a { color: #fff; }
.m-logos { display: inline-flex; gap: 12px; align-items: center; background: #fff; border-radius: 10px; padding: 6px 12px; margin-bottom: 18px; }
.m-logos img { height: 30px; width: auto; }
.m-head h1 { color: #fff; font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; margin-top: 10px; letter-spacing: -.01em; }
.m-head .lead { font-size: clamp(16px, 2vw, 19px); opacity: .9; max-width: 62ch; margin: 12px 0 0; }
.m-head .meta { display: flex; gap: 8px 10px; flex-wrap: wrap; justify-content: flex-start; margin-top: 18px; font-size: 14px; font-weight: 600; color: #fff; }
.m-head .meta span { background: rgba(255, 255, 255, .12); border-radius: 99px; padding: 5px 12px; }

.m-layout { max-width: 1120px; margin: 0 auto; padding: 32px 16px 64px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 900px) { .m-layout { grid-template-columns: 1fr; gap: 18px; } }
.m-toc { position: sticky; top: 16px; font-size: 14px; border-left: 3px solid var(--line); padding-left: 14px; }
.m-toc b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.m-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: toc; }
.m-toc a { color: var(--navy); text-decoration: none; }
.m-toc a:hover { text-decoration: underline; }
@media (max-width: 900px) { .m-toc { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; } .m-toc ol { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

.m-body { min-width: 0; }
.m-body > section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.m-body > section:last-child { border-bottom: 0; }
.m-body h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; display: flex; gap: 12px; align-items: baseline; }
.m-body h2 .n { flex: none; font-size: 14px; font-weight: 800; color: #fff; background: var(--orange); border-radius: 8px; padding: 3px 9px; transform: translateY(-3px); font-variant-numeric: tabular-nums; }
.m-body h3 { font-size: 19px; font-weight: 700; margin: 22px 0 6px; }
.m-body p, .m-body li { max-width: 72ch; }
.m-body ul, .m-body ol { padding-left: 22px; }
.m-body li { margin: 4px 0; }
.m-body code, .kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: #eef0f6; color: var(--navy); border-radius: 6px; padding: 1px 6px; }
.btnref { display: inline-block; font-size: .86em; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--orange); color: #fff; white-space: nowrap; }
.btnref.navy { background: var(--navy); }
.btnref.ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.tabref { display: inline-block; font-size: .86em; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: #eef0f6; color: var(--navy); white-space: nowrap; }

/* Paso con captura */
.step { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin: 18px 0; }
.step.wide { grid-template-columns: 1fr; }
.step.flip { grid-template-columns: 300px minmax(0, 1fr); }
.step.flip > figure { order: -1; }
@media (max-width: 760px) { .step, .step.flip { grid-template-columns: 1fr; } .step.flip > figure { order: 0; } }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(22, 36, 92, .12); background: #fff; }
.shot.phone { max-width: 300px; margin-inline: auto; }
.shot.phone img { border-radius: 28px; border: 8px solid #111827; box-shadow: 0 14px 32px rgba(15, 27, 72, .25); }
.shot.screen img { border: 10px solid #0b1022; border-radius: 10px; }
.shot figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.shots2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin: 18px 0; }

/* Avisos */
.note { border-radius: 12px; padding: 14px 16px; margin: 16px 0; background: #f4f6fb; border-left: 4px solid var(--navy); max-width: 72ch; }
.note.tip { background: #eef8f2; border-color: var(--ok); }
.note.warn { background: var(--warn-bg); border-color: var(--orange); }
.note b:first-child { display: block; color: var(--navy); margin-bottom: 2px; }
.note.tip b:first-child { color: var(--ok); }
.note.warn b:first-child { color: #9a4310; }

/* Tablas */
.m-table { overflow-x: auto; margin: 14px 0; }
.m-table table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.m-table th, .m-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.m-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fafbfd; }

/* Tarjetas de accesos */
.access { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }
.access a { display: grid; gap: 6px; padding: 18px; border-radius: 14px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, transform .1s; }
.access a:hover { border-color: var(--orange); transform: translateY(-1px); }
.access .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--warn-bg); color: var(--orange); }
.access b { font-size: 18px; color: var(--navy); }
.access small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.access code { justify-self: start; }

/* Línea de tiempo */
.timeline { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px dashed var(--line); max-width: none; margin: 0; }
.timeline li:first-child { border-top: 0; }
.timeline .when { font-weight: 800; color: var(--orange); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Diagramas */
.diagram { margin: 18px 0; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; color: var(--navy); }
.diagram figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.m-downloads { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.m-video { margin: 18px 0; }
.m-video video { width: 100%; border-radius: 14px; background: #000; box-shadow: 0 12px 30px rgba(15, 27, 72, .2); }
.m-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 16px 40px; border-top: 1px solid var(--line); }
details.faq { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; max-width: 72ch; }
details.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details.faq p { margin: 8px 0 0; }

/* Impresión / PDF */
@page { size: A4; margin: 16mm 14mm; }
@media print {
  body.manual { font-size: 11.5pt; }
  .m-head::after, .m-toc, .no-print, .m-video { display: none !important; }
  .m-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .m-head .wrap { padding-block: 18px 22px; }
  .m-layout { display: block; padding: 18px 0 0; }
  .m-body > section { break-inside: auto; }
  .m-body h2 { break-after: avoid; }
  .step, .shot, .note, .timeline li, .m-table tr { break-inside: avoid; }
  .step { grid-template-columns: minmax(0, 1fr) 220px; }
  .step.flip { grid-template-columns: 220px minmax(0, 1fr); }
  .shot.phone { max-width: 220px; }
  .shot img { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
