/* Lo que cuestan los Poderes, en pagina propia (12-10-2026).
   La escribe herramientas/poderes_modulo.py; antes era la subpestana
   «poderes» del motor (clases pd-* y cap-* de auditavision.css). Aqui todo
   va con prefijo po- para no heredar el tema oscuro del motor.
   Texto corrido >= 16 px; todo lo que se toca >= 44 px. */

.po { margin-top: 4px; display: grid; gap: 18px; }
.po b { color: inherit; }

/* --- Indice: siete tarjetas, cada una una liga a su capitulo --- */
.po-indice { scroll-margin-top: 88px; }
.po-indice-cab { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: #5a6782; }
.po-tarjetas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.po-tarjetas li { display: flex; }
.po-tarjeta { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 14px 14px 12px; border: 1px solid #dfe5f0; border-radius: 14px; background: #f7f9fd; color: #0b2a63; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.po-tarjeta:hover { transform: translateY(-2px); border-color: #c9a84c; box-shadow: 0 6px 18px rgba(11, 42, 99, .10); }
.po-tarjeta:focus-visible { outline: 3px solid #f3cf65; outline-offset: 2px; }
.po-t-num { font-variant-numeric: tabular-nums; font-size: 14px; letter-spacing: .08em; color: #5a6782; }
.po-t-ico { position: absolute; top: 12px; right: 14px; font-size: 22px; line-height: 1; }
.po-t-tit { font-size: 17px; font-weight: 700; line-height: 1.3; padding-right: 30px; }
.po-t-cifra { margin-top: 4px; font-family: var(--font-serif, Georgia, serif); font-size: 22px; font-weight: 700; line-height: 1.2; color: #8a6d1f; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.po-t-pie { font-size: 14px; line-height: 1.4; color: #44526b; }
.po-t-res { margin-top: 4px; font-size: 15px; line-height: 1.45; color: #2a3a57; }

/* --- Capitulos --- */
.po-cap { border: 1px solid #dfe5f0; border-left: 5px solid #0b2a63; border-radius: 14px; padding: 18px 20px; background: #fff; display: grid; gap: 14px; scroll-margin-top: 88px; min-width: 0; }
.po-cap > * { min-width: 0; }
.po-cap-num { margin: 0; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #5a6782; }
.po-tit { margin: 0; font-size: 23px; line-height: 1.3; color: #0b2a63; text-wrap: balance; }
.po-lead { margin: 0; font-size: 17px; line-height: 1.6; color: #2a3a57; max-width: 75ch; }
.po-nota { margin: 0; font-size: 16px; line-height: 1.6; color: #44526b; max-width: 90ch; }
.po-op { font-size: 15px; color: #5a6782; }
.po-num { font-variant-numeric: tabular-nums; }
.po-enlace { color: #1d4ed8; font-weight: 600; }
/* Ligas dentro del texto (glosario, otro capitulo): el relleno vertical
   agranda la zona de toque a 44 px sin mover el renglon. */
.po a.glos-pagina, .po-enlace { padding: 12px 0; }
.po a.glos-pagina { color: #1d4ed8; text-decoration: underline dotted; text-underline-offset: 3px; }
/* La llamada [nn] a fuentes-oficiales.html, tocable en la lista de documentos */
.po-docs .apartado-libro-llamado { font-size: 15px; line-height: 1; vertical-align: baseline; }
.po-docs .apartado-libro-llamado a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

/* Ligas a la fuente: chip tocable de 44 px */
.po-fuente { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; vertical-align: middle; padding: 0 2px; font-size: 15px; line-height: 1.35; color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.po-fuente:hover, .po-fuente:focus-visible { color: #0b2a63; }

/* Botones de accion (ligas a otras paginas) */
.po-accion { margin: 0; }
.po-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: #0b2a63; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.po-btn:hover { background: #163f8a; }
.po-btn:focus-visible { outline: 3px solid #f3cf65; outline-offset: 2px; }

/* Navegacion al pie de cada capitulo */
.po-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px dashed #dfe5f0; padding-top: 10px; }
.po-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid #dfe5f0; border-radius: 10px; font-size: 15px; font-weight: 600; color: #0b2a63; text-decoration: none; }
.po-nav a:hover { border-color: #c9a84c; }
.po-nav a:focus-visible { outline: 3px solid #f3cf65; outline-offset: 2px; }
.po-nav-sig { border-color: #c9a84c !important; text-align: right; }

/* --- Tu parte --- */
.po-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.po-duo-c { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #e2e8f2; border-radius: 12px; background: #f7f9fd; }
.po-duo-c.po-legislativo { border-top: 4px solid #0f6f8f; }
.po-duo-c.po-judicial { border-top: 4px solid #c9a84c; }
.po-k { font-size: 15px; color: #44526b; }
.po-v { font-size: 30px; line-height: 1.2; color: #0b2a63; font-variant-numeric: tabular-nums; }
.po-s { font-size: 15px; color: #5a6782; }

/* --- Filas con barra --- */
.po-lado { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.po-lado-c { display: grid; gap: 8px; align-content: start; min-width: 0; }
.po-lado-cab { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; border-bottom: 1px solid #dfe5f0; padding-bottom: 8px; font-size: 16px; }
.po-lado-cab span { font-weight: 700; color: #0b2a63; }
.po-lado-cab b { font-size: 18px; color: #8a6d1f; font-variant-numeric: tabular-nums; }
.po-fila { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(80px, 2fr) auto; gap: 10px; align-items: center; font-size: 15px; }
.po-fila-n { color: #2a3a57; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.po-fila-v { color: #0b2a63; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.po-barra { display: block; height: 10px; background: #e8eef9; border-radius: 3px; overflow: hidden; }
.po-barra-v { display: block; height: 100%; background: #c9a84c; border-radius: 3px; }
.po-barra-v.po-v-leg { background: #0f6f8f; }
.po-barra-v.po-v-jud { background: #c9a84c; }

/* --- Pilas por capitulo de gasto --- */
.po-pila { display: grid; gap: 5px; }
.po-pila-cab { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 15px; color: #2a3a57; }
.po-pila-cab span:last-child { color: #5a6782; font-variant-numeric: tabular-nums; }
.po-det-cuerpo > .po-pila-cab { font-weight: 700; color: #0b2a63; margin-top: 6px; }
.po-pila-barra { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: #e8eef9; }
.po-pila-barra > span { display: block; height: 100%; }
.po-cap-1000 { background: #c9a84c; } .po-cap-2000 { background: #1b7f4c; } .po-cap-3000 { background: #0f6f8f; }
.po-cap-4000 { background: #d9822b; } .po-cap-5000 { background: #b3261e; } .po-cap-6000 { background: #1d4ed8; }
.po-leyenda { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; color: #44526b; }
.po-leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.po-leyenda i, .po-tabla th i { width: 12px; height: 12px; display: inline-block; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.po-ejec { height: 22px; }
.po-ej-ejercido { background: #c9a84c; } .po-ej-compromiso { background: #0f6f8f; } .po-ej-disponible { background: #8a94a8; }

/* --- Subbloques y plegables --- */
.po-sub { display: grid; gap: 10px; border-top: 1px dashed #dfe5f0; padding-top: 14px; min-width: 0; }
.po-sub-t { margin: 0; font-size: 18px; line-height: 1.35; color: #0b2a63; }
.po-det { border: 1px solid #dfe5f0; border-radius: 12px; background: #f7f9fd; min-width: 0; }
.po-det > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; line-height: 1.35; color: #0b2a63; }
.po-det > summary::-webkit-details-marker { display: none; }
.po-det > summary::after { content: '+'; margin-left: auto; font-size: 22px; line-height: 1; color: #8a6d1f; }
.po-det[open] > summary::after { content: '−'; }
.po-det > summary:focus-visible { outline: 3px solid #f3cf65; outline-offset: 2px; }
.po-det-ico { font-size: 20px; }
.po-det-t { flex: 1; min-width: 0; }
.po-det-cuerpo { display: grid; gap: 8px; padding: 4px 14px 14px; background: #fff; border-radius: 0 0 12px 12px; min-width: 0; }

/* --- Tablas: se desplazan dentro de su caja, nunca la pagina --- */
.po-tabla-w { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f2; border-radius: 10px; }
.po-tabla-w:focus-visible { outline: 3px solid #f3cf65; outline-offset: 2px; }
.po-tabla { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.po-tabla th, .po-tabla td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f2; vertical-align: top; color: #2a3a57; }
.po-tabla thead th { font-size: 14px; letter-spacing: .03em; color: #44526b; background: #f4f7fc; font-weight: 700; }
.po-tabla tbody th { font-weight: 600; color: #0b2a63; }
.po-tabla td { font-variant-numeric: tabular-nums; }
.po-tabla td small { color: #5a6782; font-size: 14px; }
.po-tabla .po-fuente { margin: 0; }
.po-tabla-gasto { min-width: 760px; }
.po-tabla-gasto td, .po-tabla-gasto th { white-space: nowrap; }
.po-tabla-gasto td:first-child { white-space: normal; min-width: 150px; }
.po-avance-c { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.po-avance { position: relative; flex: 1; height: 10px; min-width: 70px; background: #e8eef9; border-radius: 5px; overflow: hidden; }
.po-avance-v { display: block; height: 100%; background: #c9a84c; border-radius: 5px; }
.po-avance-mitad { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 2px; background: #0b2a63; opacity: .85; }
.po-var { padding: 1px 5px; border-radius: 4px; font-size: 14px; }
.po-var-sube { color: #8a5a00; background: rgba(245, 165, 36, .16); }
.po-var-baja { color: #2b527a; background: rgba(120, 160, 210, .18); }

/* --- Listas --- */
.po-lista { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.55; color: #2a3a57; }
.po-docs { margin: 0; padding-left: 26px; display: grid; gap: 6px; font-size: 16px; line-height: 1.45; color: #2a3a57; }
.po-docs li { min-width: 0; }
.po-doc { display: inline-flex; align-items: center; min-height: 44px; color: #1d4ed8; overflow-wrap: anywhere; }
.po-docs code { margin-left: 8px; font-size: 14px; color: #5a6782; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .po-tarjeta { transition: none; }
  .po-tarjeta:hover { transform: none; }
}
@media (max-width: 900px) {
  .po-tarjetas { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
  .po-tarjetas { grid-template-columns: 1fr; gap: 8px; }
  .po-cap { padding: 14px 12px; }
  .po-tit { font-size: 21px; }
  .po-lado { grid-template-columns: 1fr; }
  .po-fila { grid-template-columns: minmax(0, 1fr) auto; }
  .po-fila .po-barra { grid-column: 1 / -1; grid-row: 2; }
  .po-det > summary { padding: 8px 10px; }
  .po-det-cuerpo { padding: 4px 10px 12px; }
  .po-nav a { flex: 1 1 100%; justify-content: center; }
  .po-v { font-size: 26px; }
}
