/* ============================================================
   Yoy — Documento técnico formal (brand compartido)
   Sistema visual: portada navy sólida + páginas de sección con
   encabezado numerado grande ("01.", "02."...) en azul Yoy,
   tarjetas/tablas/callouts sobre fondo claro para impresión limpia.
   Usado por: doc_yoy_requisitos_red.html, doc_yoy_politicas_tecnicas.html,
   doc_yoy_seguridad.html
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 13px; color: #1a1a1a; background: #eef1f6; }

.page { max-width: 880px; margin: 36px auto; background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,0.10); }

/* ---- portada ---- */
.cover { background: #0f2d5e; color: #fff; padding: 52px 56px 40px; min-height: 480px; display: flex; flex-direction: column; }
.cover .brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 56px; }
.cover .brand-row img { height: 26px; width: auto; }
.cover .doc-kind { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #93b8e8; }
.cover h1 { font-size: 30px; font-weight: 800; line-height: 1.28; margin-bottom: 12px; max-width: 620px; }
.cover h1 em { font-style: normal; color: #6fb3f7; }
.cover .subtitle { font-size: 14px; color: #b8d0ef; max-width: 560px; line-height: 1.6; margin-bottom: auto; }
.cover-meta { display: flex; gap: 36px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; margin-top: 40px; }
.cover-meta div { font-size: 12px; }
.cover-meta span { display: block; color: #93b8e8; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 3px; }

/* ---- índice (opcional) ---- */
.toc { padding: 44px 56px; }
.toc h2 { font-size: 20px; color: #0f2d5e; margin-bottom: 22px; }
.toc ol { list-style: none; }
.toc li { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px solid #e9ecef; font-size: 13px; }
.toc li .n { font-weight: 800; color: #1a56db; font-size: 15px; width: 22px; }
.toc li .t { color: #1a1a1a; font-weight: 600; }
.toc li .p { margin-left: auto; color: #9ca3af; font-size: 11.5px; }

/* ---- cuerpo ---- */
.body { padding: 44px 56px; }

.section-block { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid #e9ecef; }
.section-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.section-head .num { font-size: 34px; font-weight: 800; color: #1a56db; line-height: 1; }
.section-head h2 { font-size: 21px; font-weight: 700; color: #0f2d5e; }
.section-intro { font-size: 12.5px; color: #4b5563; margin: 10px 0 16px; line-height: 1.6; max-width: 68ch; }

h3 { font-size: 12.5px; font-weight: 700; color: #1e3a6e; margin: 18px 0 8px; }
h4 { font-size: 11.5px; font-weight: 700; color: #1e3a6e; margin: 4px 0 6px; }
p.p { font-size: 12.5px; color: #374151; line-height: 1.65; margin-bottom: 10px; }
p.p:last-child { margin-bottom: 0; }
ul.plain, ol.plain { padding-left: 18px; margin: 6px 0 10px; }
ul.plain li, ol.plain li { font-size: 12.5px; color: #374151; line-height: 1.6; margin-bottom: 4px; }

/* ---- tablas ---- */
table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 12px; }
th { background: #0f2d5e; color: #fff; text-align: left; padding: 8px 12px; font-weight: 600; }
td { padding: 7px 12px; border-bottom: 1px solid #e9ecef; vertical-align: top; line-height: 1.5; color: #374151; }
tr:nth-child(even) td { background: #f7f9fc; }
td code, p code { background: #eef2f7; padding: 1px 6px; border-radius: 3px; font-family: Consolas, monospace; font-size: 11.5px; color: #1e3a6e; }

/* ---- bloques de dominio / técnicos ---- */
.domain-block { background: #0f172a; color: #7dd3fc; font-family: Consolas, monospace; font-size: 11.5px; padding: 14px 18px; border-radius: 6px; line-height: 2; margin: 10px 0; }

/* ---- grilla de dominios (listas largas) ---- */
.domain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.domain-grid .d-item { background: #0f172a; color: #7dd3fc; font-family: Consolas, monospace; font-size: 11px; padding: 9px 10px; border-radius: 6px; text-align: center; overflow-wrap: break-word; }
@media print { .domain-grid { page-break-inside: avoid; } }

/* ---- callouts ---- */
.callout { border-left: 3px solid; padding: 11px 15px; margin: 12px 0; border-radius: 0 5px 5px 0; font-size: 12.5px; line-height: 1.6; }
.callout.blue   { border-color: #1a56db; background: #eff6ff; }
.callout.amber  { border-color: #d97706; background: #fffbeb; }
.callout.green  { border-color: #16a34a; background: #f0fdf4; }
.callout.slate  { border-color: #64748b; background: #f8fafc; }
.callout strong { display: block; margin-bottom: 3px; font-size: 12.5px; }

/* ---- tags ---- */
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.tag.required    { background: #dcfce7; color: #15803d; }
.tag.recommended { background: #dbeafe; color: #1d4ed8; }
.tag.conditional { background: #ffedd5; color: #c2410c; }
.tag.pending     { background: #f3f4f6; color: #6b7280; }

/* ---- grillas ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 12px 0; }

.sec-card { border: 1px solid #dde3ee; border-radius: 7px; padding: 14px 16px; }
.sec-card .sc-head { font-weight: 700; font-size: 12px; color: #0f2d5e; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sc-dot.blue   { background: #1a56db; }
.sc-dot.green  { background: #16a34a; }
.sc-dot.orange { background: #FF6600; }
.sec-card ul { padding-left: 16px; }
.sec-card li  { font-size: 12px; margin: 4px 0; line-height: 1.5; color: #374151; }
.sec-card p   { font-size: 12px; line-height: 1.55; color: #374151; }

/* ---- tarjetas numeradas (pasos) ---- */
.step-card { position: relative; border: 1px solid #dde3ee; border-radius: 7px; padding: 18px 16px 14px; margin-top: 14px; }
.step-badge { position: absolute; top: -11px; left: 14px; background: #1a56db; color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.step-card strong.t { display: block; font-size: 12.5px; color: #0f2d5e; margin-bottom: 4px; }
.step-card span.d, .step-card p.d { font-size: 12px; color: #4b5563; line-height: 1.55; }

/* ---- usb / comparación bueno-malo ---- */
.usb-card { border: 1px solid #dde3ee; border-radius: 7px; padding: 14px 16px; }
.usb-card .uc-head { font-weight: 700; font-size: 12px; margin-bottom: 8px; }
.usb-card.recommended { border-color: #16a34a; background: #f0fdf4; }
.usb-card.recommended .uc-head { color: #15803d; }
.usb-card.standard .uc-head { color: #374151; }
.usb-card ul { padding-left: 16px; }
.usb-card li { font-size: 12px; margin: 3px 0; color: #374151; }

/* ---- matriz de responsabilidades ---- */
.resp-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; }
.resp-owner .dot { width: 8px; height: 8px; border-radius: 50%; }
.resp-owner.yoy .dot { background: #1a56db; }
.resp-owner.cliente .dot { background: #FF6600; }
.resp-owner.compartido .dot { background: #00BFA6; }

/* ---- footer de página ---- */
.doc-footer { background: #f7f9fc; border-top: 1px solid #dde3ee; padding: 16px 56px; display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: #9ca3af; }
.doc-footer .pageno { background: #0f2d5e; color: #fff; font-weight: 700; padding: 3px 12px; border-radius: 10px; font-size: 10.5px; }

@media print {
  @page { margin: 10mm; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  body { background: #fff; }
  .page { box-shadow: none; margin: 0; max-width: 100%; }
  .body { padding: 32px 46px; }
  .section-head h2, h3, h4 { page-break-after: avoid; }
  table, .sec-card, .usb-card, .step-card, .callout, .domain-block, .domain-grid, .grid2, .grid3 { page-break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }
  .body > .section-block { page-break-before: always; break-before: page; }
  .body > .section-block:first-child { page-break-before: avoid; break-before: avoid; }
  .toc { page-break-after: always; break-after: page; }
}

/* ---- Trust Center: barra superior de navegación ---- */
.tc-topbar {
  max-width: 880px; margin: 0 auto; padding: 14px 4px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: 'Segoe UI', Arial, sans-serif; flex-wrap: wrap;
}
.tc-topbar a.tc-home { color: #4b5563; font-size: 12.5px; text-decoration: none; font-weight: 600; }
.tc-topbar a.tc-home:hover { color: #0f2d5e; }
.tc-topbar .tc-right { display: flex; align-items: center; gap: 10px; }
.tc-topbar .tc-version { font-size: 11px; color: #9ca3af; }
.tc-topbar a.tc-pdf {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0f2d5e; color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 20px;
}
.tc-topbar a.tc-pdf:hover { background: #1a56db; }
@media print { .tc-topbar { display: none; } }
