/* Propuesta para directivos: documento ejecutivo en pantalla y en papel (A4). */
:root {
  --rojo: #8B1E2D;
  --rojo-suave: #F5E6E8;
  --marino: #1B2A41;
  --texto: #1F2328;
  --texto-suave: #4A5260;
  --borde: #D9D4CE;
  --fondo: #F1EEEA;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fuente); font-size: 1rem; line-height: 1.55; color: var(--texto); background: var(--fondo); }
h1, h2, h3 { color: var(--marino); line-height: 1.25; }
a { color: var(--rojo); }
.saltar { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 20; }
.saltar:focus { left: 1rem; }

.barra { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .6rem max(1rem, calc((100% - 880px) / 2)); background: var(--marino); }
.barra__volver { color: #fff; text-decoration: none; font-weight: 600; }
.barra__volver:hover, .barra__volver:focus-visible { text-decoration: underline; }
.barra__boton { font: inherit; font-weight: 700; color: #fff; background: var(--rojo); border: 0; border-radius: 8px; padding: .55rem 1.1rem; cursor: pointer; }
.barra__boton:hover { background: #6E1622; }
.barra__boton:focus-visible, .barra__volver:focus-visible { outline: 3px solid #F2C14E; outline-offset: 2px; }

.hoja { max-width: 880px; margin: 1.5rem auto 3rem; background: #fff; padding: 2.5rem 3rem; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(27,42,65,.06), 0 4px 16px rgba(27,42,65,.08); }
.hoja:focus { outline: none; }

.portada { border-bottom: 4px solid var(--rojo); padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.portada__marca { display: flex; gap: .8rem; align-items: center; }
.portada__icono { width: 44px; height: 44px; flex: none; }
.portada__inst { margin: 0; font-weight: 700; color: var(--marino); }
.portada__grupo { margin: 0; color: var(--texto-suave); font-size: .95rem; }
.portada h1 { font-size: 1.85rem; margin: 1.2rem 0 .5rem; }
.portada__sub { margin: 0 0 1rem; color: var(--texto-suave); }
.portada__meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem 1rem; margin: 0; font-size: .9rem; }
.portada__meta dt { font-weight: 700; color: var(--rojo); text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.portada__meta dd { margin: 0; }

.bloque { margin: 0 0 1.75rem; }
.bloque h2 { font-size: 1.35rem; margin: 0 0 .7rem; padding-bottom: .3rem; border-bottom: 1px solid var(--borde); }
.bloque h3 { font-size: 1.05rem; margin: .9rem 0 .4rem; }
.num { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .35em; border-radius: 50%;
  background: var(--rojo); color: #fff; font-size: .8em; vertical-align: .1em; }
.claves { padding-left: 1.2rem; }
.claves li { margin-bottom: .35rem; }
.solicitud-breve { background: var(--rojo-suave); border-left: 4px solid var(--rojo); padding: .75rem 1rem; border-radius: 4px; }
.rejilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.caja { border: 1px solid var(--borde); border-radius: 6px; padding: .8rem 1rem; }
.caja h3:first-child { margin-top: 0; }
.caja p, .caja ul { margin: 0 0 .4rem; font-size: .95rem; }
.caja ul { padding-left: 1.1rem; }
.nota { font-size: .88rem; color: var(--texto-suave); }

.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .5rem 0; }
.tabla caption { text-align: left; font-weight: 700; color: var(--marino); padding-bottom: .35rem; }
.tabla th, .tabla td { border: 1px solid var(--borde); padding: .4rem .55rem; text-align: left; vertical-align: top; }
.tabla thead th { background: var(--marino); color: #fff; }
.tabla tbody tr:nth-child(even) { background: #FAF8F6; }
.gantt th[scope=row] { font-weight: 500; }
.gantt .g { text-align: center; white-space: nowrap; }
.gantt td { text-align: center; color: transparent; }
.gantt td.on { background: var(--rojo); color: var(--rojo); }

.cita { text-decoration: none; font-size: .8em; vertical-align: super; line-height: 0; white-space: nowrap; }
.cita:hover, .cita:focus-visible { text-decoration: underline; }

.peticiones li { margin-bottom: .4rem; }
.firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem 2.5rem; margin: 2.5rem 0 1.5rem; }
.firma__linea { border-bottom: 1px solid var(--texto); height: 3rem; }
.firma__nombre { margin: .35rem 0 0; font-weight: 700; }
.firma__cargo { margin: 0; color: var(--texto-suave); font-size: .9rem; }
.decision { border: 1px dashed var(--texto-suave); border-radius: 6px; padding: .5rem 1rem; }
.decision p { margin: .35rem 0; overflow-wrap: anywhere; }

.siglas { font-size: .88rem; }
.referencias { font-size: .82rem; padding-left: 1.6rem; }
.referencias li { margin-bottom: .3rem; }
.referencias li:target { background: #FFF6D6; }
.ref__url { word-break: break-all; }

@media (max-width: 700px) {
  .hoja { margin: 0; padding: 1.25rem 1rem; border-radius: 0; }
  .portada h1 { font-size: 1.45rem; }
  .portada__meta, .rejilla-2, .firmas { grid-template-columns: 1fr; }
  .tabla { font-size: .82rem; }
  .tabla th, .tabla td { padding: .35rem .4rem; overflow-wrap: anywhere; hyphens: auto; }
  .gantt { display: block; overflow-x: auto; }
}

@page { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  .no-print { display: none !important; }
  html, body { background: #fff; font-size: 10.5pt; }
  .hoja { max-width: none; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .cita { color: var(--rojo); }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
  tr, .caja, .firma, .decision, .solicitud-breve, .referencias li { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }
  .portada__meta { grid-template-columns: repeat(4, 1fr); }
  .rejilla-2 { grid-template-columns: 1fr 1fr; }
  .solicitud, .anexo { break-before: page; page-break-before: always; }
  .firmas { grid-template-columns: 1fr 1fr; break-inside: avoid; }
}
