/* ==========================================================================
   AUDITORÍA EN IMÁGENES, UNA PÁGINA POR DIAPOSITIVA (09-10-2026)
   Las nueve páginas auditoria-<id>.html las genera herramientas/auditorias.py
   y las pinta assets/auditor/js/auditoria-imagen.js. Cargan además
   auditavision.css, civico.css y apartados.css para compartir cabecera,
   colores y etiquetas de estado.
   ========================================================================== */

/* Portada de la página: la misma imagen del carrusel, a lo ancho */
.au-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0b1a36;
}
.au-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: au-zoom 18s ease-out both;
}
@keyframes au-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.au-hero-velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 18, 40, 0.15) 0%, rgba(8, 18, 40, 0.88) 78%);
}
.au-hero-ia {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  font-size: 11px;
  color: #e2e8f0;
  background: rgba(8, 18, 40, 0.6);
  border-radius: 6px;
  padding: 3px 8px;
}
.au-hero-txt { position: relative; z-index: 1; padding-top: 70px; padding-bottom: 30px; width: 100%; }
.au-hero .apartado-migas, .au-hero .apartado-migas a { color: #dbe4f3; }
.au-hero-badge {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fde68a;
  background: rgba(8, 18, 40, 0.55);
  border: 1px solid rgba(253, 230, 138, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
}
.au-hero-tit {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  color: #ffffff;
  margin: 12px 0 8px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.au-hero-preg { font-size: clamp(16px, 1.6vw, 20px); color: #f1f5f9; max-width: 760px; margin: 0; line-height: 1.45; }

/* Secciones */
.au-pagina .apartado-cuerpo { padding-top: 26px; padding-bottom: 40px; }
.au-sec {
  background: #ffffff;
  border: 1px solid var(--civ-gris-borde);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 2px 10px rgba(12, 30, 66, 0.05);
}
.au-sec-cab { margin-bottom: 14px; }
.au-sec-tit {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--civ-azul);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.au-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--civ-azul);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  flex: none;
}
.au-sec-txt { margin: 0; color: #44526b; font-size: 15px; }
.au-nota { font-size: 12.5px; color: #5b6880; margin: 8px 0 0; }

/* Mandos */
.au-mandos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 16px; }
.au-btn {
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1c1300;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.au-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(245, 158, 11, 0.45); }
.au-btn:disabled { opacity: 0.7; cursor: progress; }
.au-btn:focus-visible { outline: 3px solid var(--civ-azul-medio); outline-offset: 2px; }
.au-btn-2 { background: #eef2f8; color: var(--civ-azul); box-shadow: none; }
.au-estado { font-size: 14px; color: #44526b; flex: 1 1 240px; }

/* 1. El dinero, paso a paso: cuadro conceptual */
.au-mapa {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.au-paso {
  flex: 1 1 170px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(180deg, #f7f9fd 0%, #eef3fb 100%);
  border: 1px solid var(--civ-gris-borde);
  border-radius: 14px;
  padding: 14px 14px 12px;
  position: relative;
}
.au-paso-ico { font-size: 30px; line-height: 1; }
.au-paso-tit { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--civ-azul-medio); }
.au-paso-v { font-family: var(--font-mono, monospace); font-size: clamp(19px, 1.8vw, 24px); font-weight: 800; color: var(--civ-azul); line-height: 1.15; word-break: break-word; }
.au-paso-txt { font-family: inherit; font-size: 15px; font-weight: 700; }
.au-paso-etq { font-size: 13px; color: #44526b; line-height: 1.35; }
.au-paso-chip { margin-top: auto; }
.au-flecha { align-self: center; font-size: 22px; color: #94a3b8; flex: none; }
.au-contando .au-paso { animation: au-late 0.9s ease-in-out infinite; animation-delay: calc(var(--i) * 0.12s); }
.au-listo .au-paso { border-color: #f5c451; box-shadow: 0 0 0 3px rgba(245, 196, 81, 0.18); }
@keyframes au-late { 50% { transform: translateY(-4px); } }

/* 2. El reparto: el monito avienta monedas a los botes */
.au-reto {
  margin: 0 0 12px;
  font-size: 15px;
  background: #fff8e6;
  border: 1px dashed #f0c45a;
  border-radius: 10px;
  padding: 10px 14px;
}
.au-escenario {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  grid-template-rows: auto auto;
  gap: 10px 18px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(180deg, #e6f0ff 0%, #f6efe0 100%);
  border: 1px solid var(--civ-gris-borde);
  overflow: hidden;
  min-height: 300px;
}
.au-caja {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--civ-gris-borde);
}
.au-caja-ico { font-size: 34px; }
.au-caja-k { font-size: 12px; font-weight: 800; color: var(--civ-azul-medio); text-transform: uppercase; letter-spacing: 0.04em; }
.au-caja-v { font-family: var(--font-mono, monospace); font-size: 13px; font-weight: 800; color: var(--civ-azul); }
.au-chango {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  align-self: end;
  position: relative;
  font-size: 58px;
  line-height: 1;
  transform-origin: 50% 100%;
}
.au-chango-bolsa { position: absolute; right: -14px; bottom: 2px; font-size: 26px; }
.au-chango.au-tira .au-chango-cuerpo { display: inline-block; animation: au-camina 0.6s ease-in-out infinite; }
.au-chango.au-salta { animation: au-salta 0.15s ease-out; }
.au-chango.au-festeja { animation: au-festeja 0.7s ease-in-out 3; }
@keyframes au-camina { 50% { transform: rotate(-8deg); } }
@keyframes au-salta { 50% { transform: translateY(-8px) scale(1.04); } }
@keyframes au-festeja { 25% { transform: translateY(-14px) rotate(-10deg); } 75% { transform: translateY(-14px) rotate(10deg); } }
.au-botes {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  align-self: end;
}
.au-bote {
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 6px 4px;
  cursor: pointer;
  color: inherit;
  min-width: 0;
}
.au-bote:hover { background: rgba(255, 255, 255, 0.55); }
.au-bote[aria-pressed="true"] { border-color: #f59e0b; background: rgba(255, 248, 230, 0.9); }
.au-bote:focus-visible { outline: 3px solid var(--civ-azul-medio); outline-offset: 2px; }
.au-bote-vaso {
  position: relative;
  width: 100%;
  max-width: 92px;
  height: 170px;
  border: 3px solid #8aa0c4;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.au-bote-lleno {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: repeating-linear-gradient(0deg, #f6c544 0 9px, #e9ae1c 9px 11px);
  transition: height 0.25s ease-out;
}
.au-bote-cuenta { position: relative; z-index: 1; font-size: 12px; font-weight: 800; margin-top: 6px; color: #1c2a44; }
.au-bote-k { font-size: 12px; font-weight: 700; line-height: 1.25; text-align: center; color: #1c2a44; overflow-wrap: anywhere; }
.au-bote-v { font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 800; color: var(--civ-azul); text-align: center; }
.au-bote-mayor .au-bote-vaso { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25); }
.au-bote-mayor .au-bote-k::before { content: ''; display: inline-block; width: 1.1em; height: 1.1em; margin-right: 0.25em; vertical-align: -0.2em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2' /%3E %3Cpath d='M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2' /%3E %3Cpath d='M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3' /%3E %3Cpath d='M4 22h16' /%3E %3Cpath d='M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z' /%3E %3Cpath d='M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3' /%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2' /%3E %3Cpath d='M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2' /%3E %3Cpath d='M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3' /%3E %3Cpath d='M4 22h16' /%3E %3Cpath d='M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z' /%3E %3Cpath d='M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3' /%3E%3C/svg%3E") center / contain no-repeat; }
.au-moneda {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 20px;
  pointer-events: none;
  z-index: 3;
  will-change: transform;
}

/* El reloj de los intereses */
.au-reloj {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #0b2a63, #12397f);
  color: #ffffff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.au-reloj-cara {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 4px solid #fbbf24;
  display: grid;
  place-items: center;
  align-content: center;
  flex: none;
}
.au-reloj-ico { font-size: 30px; animation: au-tic 1s steps(2) infinite; }
@keyframes au-tic { 50% { transform: rotate(12deg); } }
.au-reloj-seg { font-family: var(--font-mono, monospace); font-size: 13px; font-weight: 800; }
.au-reloj-txt { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; }
.au-reloj-k { font-size: 15px; color: #dbe4f3; }
.au-reloj-v { font-family: var(--font-mono, monospace); font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: #fde68a; }
.au-reloj-etq { font-size: 13px; color: #dbe4f3; }
.au-alcancia { position: relative; width: 70px; height: 80px; flex: none; display: flex; align-items: flex-end; justify-content: center; }
.au-alcancia-ico { font-size: 52px; line-height: 1; }
.au-cae { position: absolute; top: -10px; left: 50%; font-size: 20px; animation: au-cae 0.9s ease-in forwards; }
@keyframes au-cae { from { transform: translate(-50%, -20px); opacity: 1; } to { transform: translate(-50%, 46px); opacity: 0; } }

/* La fuga del impuesto que no entra */
.au-fuga-lbl { display: block; font-weight: 700; margin-bottom: 8px; }
.au-fuga-ctl { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.au-fuga-ctl input { flex: 1; accent-color: #dc2626; height: 28px; }
.au-fuga-pct { font-family: var(--font-mono, monospace); font-size: 22px; font-weight: 800; color: #b91c1c; min-width: 70px; text-align: right; }
.au-fuga-tanque {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
  max-width: 560px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #e6f0ff, #f6efe0);
  border: 1px solid var(--civ-gris-borde);
}
.au-fuga-m { font-size: 18px; text-align: center; transition: transform 0.45s ease-in, opacity 0.45s ease-in, filter 0.3s; }
.au-fuga-ida { transform: translateY(26px) rotate(90deg); opacity: 0.18; filter: grayscale(1); }
.au-fuga-res { font-size: 16px; margin: 14px 0 0; }
.au-fuga-res b { color: #b91c1c; }

/* 3. El rastro */
.au-rastro { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.au-fila { display: flex; flex-direction: column; gap: 4px; }
.au-fila-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.au-fila-k { font-size: 14.5px; font-weight: 700; color: #1c2a44; min-width: 0; }
.au-fila-k a { color: var(--civ-azul-medio); }
.au-fila-v { font-family: var(--font-mono, monospace); font-size: 14px; font-weight: 800; color: var(--civ-azul); white-space: nowrap; }
.au-riel { display: block; height: 10px; border-radius: 5px; background: #e8edf5; overflow: hidden; }
.au-barra { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.au-fila-sub { font-size: 13px; color: #5b6880; }

/* 4 y 5. Lo que se encontró y a dónde seguir */
.au-hallazgo {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f4f7fc;
  border-left: 5px solid var(--civ-azul-medio);
  border-radius: 10px;
  padding: 14px 16px;
}
.au-hallazgo p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.au-hallazgo-ico { font-size: 28px; line-height: 1; flex: none; }
.au-pendiente { background: #fff8e6; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 12px 0 0; }
.au-fuente { font-size: 13px; color: #5b6880; margin: 12px 0 0; }
.au-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.au-accion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--civ-azul);
  color: #ffffff;
}
.au-accion:hover { filter: brightness(1.12); }
.au-accion-2 { background: #eef2f8; color: var(--civ-azul); border: 1px solid var(--civ-gris-borde); }

/* Otras auditorías */
.au-otras-sec { margin-top: 10px; }
.au-otras-sec .au-sec-tit { margin-bottom: 12px; }
.au-otras { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.au-otra {
  position: relative;
  display: block;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  background: #0b1a36;
}
.au-otra img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.au-otra:hover img { transform: scale(1.06); }
.au-otra-txt {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 18, 40, 0.92));
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.au-otra-badge { font-size: 11px; font-weight: 600; color: #fde68a; }

@media (max-width: 760px) {
  .au-hero { min-height: 280px; }
  .au-sec { padding: 18px 16px; }
  .au-flecha { transform: rotate(90deg); width: 100%; text-align: center; }
  .au-mapa { flex-direction: column; }
  .au-paso { flex: none; }
  .au-escenario { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; padding: 12px; }
  .au-caja { grid-column: 1; grid-row: 1; }
  .au-chango { grid-column: 2; grid-row: 1; align-self: center; font-size: 50px; }
  .au-botes { grid-column: 1 / span 2; grid-row: 2; gap: 8px 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .au-bote { padding: 4px 2px; }
  .au-bote-vaso { height: 100px; max-width: 80px; border-width: 2px; }
  .au-bote-k { font-size: 11.5px; }
  .au-bote-v { font-size: 11px; }
  .au-fuga-m { font-size: 13px; }
  .au-fuga-tanque { grid-template-columns: repeat(10, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .au-hero-img, .au-reloj-ico, .au-contando .au-paso, .au-chango, .au-chango * { animation: none !important; }
  .au-fuga-m, .au-bote-lleno { transition: none; }
}

/* Lectura breve, escrita en el HTML (propuesta de Astra, entrega 5, 10-10-2026) */
.au-lectura { background: #fff; border: 1px solid #dfe5f0; border-radius: 16px; padding: 18px 20px; margin: 22px 0; scroll-margin-top: 140px; }
.au-lectura .au-sec-txt { margin-bottom: 10px; }
.au-lec { margin: 0; display: grid; gap: 0; }
.au-lec-fila { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 18px; padding: 12px 0; border-top: 1px solid #e6eaf2; }
.au-lec-fila:first-child { border-top: 0; }
.au-lec dt { font-weight: 800; color: #0b2a63; font-size: 15px; }
.au-lec dd { margin: 0; font-size: 15px; line-height: 1.6; color: #24324d; min-width: 0; overflow-wrap: anywhere; }
.au-lec dd p { margin: 0; }
.au-lec dd ul { margin: 0; padding-left: 18px; }
.au-lec dd li { margin: 3px 0; }
.au-lec dd a { color: #0b2a63; }
@media (max-width: 720px) {
  .au-lec-fila { grid-template-columns: 1fr; }
}

/* Servicio pertinente de cada investigacion (entrega 6, 10-10-2026). */
.au-servicio { background: #f7f9fd; border: 1px solid #c9d3e6; border-radius: 16px; padding: 16px 20px; margin: 22px 0; display: grid; gap: 8px; }
.au-servicio p { margin: 0; line-height: 1.6; color: #24324d; }
/* Investigaciones por tema y como verificamos: vivian en la portada
   («Por donde empezar») y desde el 10-10-2026 van al pie de cada una. */
.au-temas { display: grid; gap: 8px; margin: 0 0 16px; }
.au-tema { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; background: #fff; border: 1px solid #dfe5f0; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; }
.au-tema-actual { border-color: #0b2a63; background: #f4f7fd; }
.au-tema-tit { flex: 1 1 100%; font-weight: 800; color: #0b2a63; }
.au-tema-tit small { font-weight: 600; color: #5a6782; }
.au-tema a { color: #1a56b8; font-weight: 600; }
.au-tema [aria-current] { font-weight: 700; color: #24324d; }
.au-tema a + a::before, .au-tema a + span::before, .au-tema span[aria-current] + a::before { content: "·"; margin-right: 10px; color: #9aa7bf; }
.au-metodo { margin: 16px 0 0; font-size: 14.5px; line-height: 1.7; color: #24324d; }
