  /* Utilidades que Tailwind CDN no cubre de fábrica */
  html { scroll-behavior: smooth; }
  body { font-family: 'Inter', sans-serif; background-color: #F7F5F1; color: #14181C; }

  .font-emotion-italic { font-style: italic; }

  /* Foco visible accesible en todos los elementos interactivos */
  a:focus-visible, button:focus-visible, input:focus-visible,
  select:focus-visible, textarea:focus-visible {
    outline: 3px solid #D80032;
    outline-offset: 2px;
    border-radius: 2px;
  }

  /* Enlace "saltar al contenido" para usuarios de teclado / lectores de pantalla */
  .skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #D80032;
    color: #FFF;
    padding: 0.75rem 1.25rem;
    z-index: 100;
    font-weight: 700;
    border-radius: 0 0 8px 0;
  }
  .skip-link:focus {
    left: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }
  
  /* Fix: la clase .grid de Tailwind y el atributo [hidden] tienen la misma
     especificidad CSS, así que .grid puede ganar y dejar el panel visible.
     Esta regla fuerza el ocultamiento cuando el panel lleva [hidden]. */
  .team-panel[hidden] {
    display: none;
  }  
  /* Tipografía de lectura para el programa completo */
  .prose-uex h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.85rem;
    color: #14181C;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #D80032;
    scroll-margin-top: 6rem;
  }
  .prose-uex > h1:first-child { margin-top: 0; }
  .prose-uex h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.4rem;
    color: #14181C;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    scroll-margin-top: 6rem;
  }
  .prose-uex h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #D80032;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 6rem;
  }
  .prose-uex h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1C2B39;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    scroll-margin-top: 6rem;
  }
  .prose-uex h5 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(28,43,57,0.5);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .prose-uex p { margin-bottom: 1rem; color: #1C2B39; }
  .prose-uex > p:first-of-type { font-size: 1.05rem; }
  .prose-uex strong { font-weight: 700; color: #14181C; }
  .prose-uex em { font-style: italic; }
  .prose-uex img { max-width: 100%; height: auto; border-radius: 1rem; margin: 1.5rem 0; }
  .prose-uex blockquote {
    border-left: 4px solid #D80032;
    background: rgba(247,245,241,0.7);
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
  }
  .prose-uex blockquote p:last-child { margin-bottom: 0; }
  .prose-uex ul, .prose-uex ol { margin-bottom: 1rem; padding-left: 1.5rem; }
  .prose-uex ul { list-style: disc; }
  .prose-uex ol { list-style: decimal; }
  .prose-uex li { margin-bottom: 0.35rem; }
  .prose-uex li > ul, .prose-uex li > ol { margin-top: 0.35rem; margin-bottom: 0; }
  .prose-uex li::marker { color: #D80032; font-weight: 600; }
  .prose-uex a { color: #D80032; text-decoration: underline; text-underline-offset: 2px; }
  .prose-uex a:hover { color: #E60036; }
  .prose-uex hr { border: none; border-top: 1px solid rgba(28,43,57,0.12); margin: 2.5rem 0; }

  .toc-link[aria-current="true"] {
    color: #D80032;
    font-weight: 700;
  }

  /* Referencias cruzadas entre medidas del programa */
  .medida-ref {
    color: #D80032;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    white-space: nowrap;
  }
  .medida-ref:hover {
    color: #1C2B39;
    text-decoration-color: #1C2B39;
  }
  /* Margen superior para que el header fijo no tape la medida al hacer scroll */
  [id^="medida-"] {
    scroll-margin-top: 5rem;
  }
/* Páginas legales */
.prose-uex > h2:first-child { margin-top: 0; }
.prose-uex h2[id] { scroll-margin-top: 6rem; }
/* Datos pendientes de completar antes de publicar */
.pendiente {
  background: rgba(216,0,50,0.08);
  border: 1px dashed #D80032;
  border-radius: 4px;
  padding: 0 0.3em;
  color: #14181C;
  font-weight: 600;
}

/* Menú principal: entre 1024 y 1279 px no cabe con el espacio de Tailwind (gap-6). Comprobado a 1024 px en la portada,
   que tiene la etiqueta más larga («Cómo gobernaremos»). */
@media (min-width: 1024px) and (max-width: 1279px) {
  header > nav > ul[class] { gap: 0.875rem; }
}

/* Foto de la portada (index.html): el retrato es vertical. En móvil el hueco es 4:3, no 3:2, para que el
   degradado inferior no tape la barbilla. En escritorio la altura la marca el bloque de texto. */
@media (max-width: 1023.98px) {
  .foto-portada { aspect-ratio: 4 / 3; }
}

/* ============================================================ */
/* Adenda al programa (adenda/index.html) y aviso de la portada  */
/* ============================================================ */
.adenda-resumen { margin-top: 1rem; }
.adenda-area { margin: 1.75rem 0 .75rem; }
.adenda-area:first-child { margin-top: 0; }
.adenda-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.adenda-medida { display: flex; gap: .75rem; }
.adenda-cod { flex: none; width: 3.5rem; font-weight: 600; color: #D80032; font-variant-numeric: tabular-nums; }
.adenda-aviso { background: #FFF; border-top: 1px solid rgba(28,43,57,.1); border-bottom: 1px solid rgba(28,43,57,.1); }
.adenda-aviso-interior { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.adenda-aviso-etiqueta { font-size: .8125rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; color: #D80032; margin: 0 0 .25rem; }
.adenda-aviso-titulo { font-family: 'Archivo Black', sans-serif; font-size: 1.25rem; line-height: 1.3; color: #1C2B39; margin: 0 0 .25rem; }
.adenda-aviso-texto { margin: 0; color: rgba(28,43,57,.8); }
.adenda-aviso-boton { align-self: flex-start; flex: none; display: inline-flex; align-items: center; gap: .5rem; background: #1C2B39; color: #FFF; font-weight: 600; padding: .875rem 1.5rem; border-radius: 9999px; text-decoration: none; transition: background-color .2s; }
.adenda-aviso-boton:hover { background: #D80032; color: #FFF; }
@media (min-width: 768px) {
  .adenda-aviso-interior { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
  .adenda-aviso-boton { align-self: center; }
}
