/* ==========================================================================
   ACTIVIDAD LEGISLATIVA — /proyectos/ y sección destacada de la portada
   Prefijo .lg-  ·  Tipografía Outfit  ·  Paleta institucional
   ========================================================================== */

:root {
  --lg-navy: #11103B;
  --lg-navy-2: #1A1950;
  --lg-ink: #17163A;
  --lg-text: #3B3A55;
  --lg-muted: #5E5D78;
  --lg-line: #E4E3EE;
  --lg-line-strong: #D3D2E2;
  --lg-bg: #F5F5FA;
  --lg-card: #FFFFFF;
  --lg-magenta: #9F57A7;
  --lg-magenta-ink: #7D3E86;
  --lg-magenta-soft: #F5ECF6;
  --lg-blue: #1C5CFF;
  --lg-blue-ink: #1546C7;
  --lg-blue-soft: #EAF0FF;
  --lg-turquoise: #24BCDE;
  --lg-turquoise-ink: #0B6F86;
  --lg-turquoise-soft: #E6F7FB;
  --lg-orange: #FBA85F;
  --lg-orange-ink: #8A4B0B;
  --lg-orange-soft: #FFF3E6;
  --lg-green: #047857;
  --lg-green-hover: #065F46;
  --lg-green-soft: #E6F5EE;
  --lg-red: #D92D20;
  --lg-red-ink: #B42318;
  --lg-red-soft: #FEF0EF;
  --lg-radius: 18px;
  --lg-radius-sm: 12px;
  --lg-shadow: 0 1px 2px rgba(17, 16, 59, 0.04), 0 8px 24px -12px rgba(17, 16, 59, 0.12);
  --lg-shadow-hover: 0 2px 4px rgba(17, 16, 59, 0.05), 0 22px 44px -18px rgba(17, 16, 59, 0.28);
  --lg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lg-focus: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--lg-blue);
}

.lg-page {
  background: var(--lg-bg);
  font-family: 'Outfit', sans-serif;
  color: var(--lg-text);
}

.lg-page *:focus-visible,
.lg-home *:focus-visible,
.lg-hero-cta:focus-visible {
  outline: none;
  box-shadow: var(--lg-focus);
}

.lg-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lg-tabular { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Hero de /proyectos/
   -------------------------------------------------------------------------- */
.lg-hero {
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  background:
    radial-gradient(900px 420px at 92% -10%, rgba(159, 87, 167, 0.45), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(28, 92, 255, 0.35), transparent 60%),
    linear-gradient(160deg, #11103B 0%, #17165A 55%, #11103B 100%);
  padding: calc(var(--header-h, 80px) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.lg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  pointer-events: none;
}

.lg-hero::after {
  content: '';
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  right: -8vw;
  top: -18vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 188, 222, 0.28), rgba(159, 87, 167, 0.16) 45%, transparent 70%);
  filter: blur(30px);
  animation: lg-aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes lg-aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  50% { transform: translate3d(-12vw, 8vw, 0) scale(1.15); opacity: 1; }
  100% { transform: translate3d(-4vw, 16vw, 0) scale(0.95); opacity: 0.8; }
}

.lg-hero .container { position: relative; z-index: 1; }

.lg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 1.1rem;
}

.lg-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lg-magenta), var(--lg-turquoise));
}

.lg-hero__title {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: #FFFFFF;
}

.lg-hero__lead {
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.lg-kpis {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.lg-kpi {
  position: relative;
  border-radius: var(--lg-radius);
  padding: 1.25rem 1.35rem 1.2rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.lg-kpi--main {
  background: linear-gradient(140deg, rgba(159, 87, 167, 0.32), rgba(28, 92, 255, 0.22));
  border-color: rgba(255, 255, 255, 0.2);
}

.lg-kpis > .lg-kpi { animation: lg-rise 0.7s var(--lg-ease) both; }
.lg-kpis > .lg-kpi:nth-child(2) { animation-delay: 0.08s; }
.lg-kpis > .lg-kpi:nth-child(3) { animation-delay: 0.16s; }

@keyframes lg-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.lg-kpi--main { overflow: hidden; }

.lg-kpi--main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: lg-shine 2.4s 0.6s var(--lg-ease) both;
  pointer-events: none;
}

@keyframes lg-shine { to { transform: translateX(100%); } }

.lg-kpi--espera {
  background: linear-gradient(150deg, rgba(240, 68, 56, 0.26), rgba(240, 68, 56, 0.08));
  border-color: rgba(253, 162, 155, 0.45);
}

.lg-kpi--espera .lg-kpi__value { color: #FFB4AD; }

.lg-kpi__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 7px;
  vertical-align: -6px;
  background: rgba(240, 68, 56, 0.35);
  color: #FFFFFF;
}

.lg-kpi__value {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

.lg-kpi--main .lg-kpi__value { font-size: clamp(3rem, 6vw, 4.6rem); }

.lg-kpi__label {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: #FFFFFF;
}

.lg-kpi__note {
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.lg-kpi__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

.lg-hero__meta {
  margin: 1.2rem 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.66);
}

.lg-hero__meta a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Reloj de caducidad
   -------------------------------------------------------------------------- */
.lg-reloj {
  margin-top: 14px;
  border-radius: var(--lg-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(253, 162, 155, 0.28);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  animation: lg-rise 0.7s 0.24s var(--lg-ease) both;
}

.lg-reloj.is-open { background: rgba(255, 255, 255, 0.07); border-color: rgba(253, 162, 155, 0.45); }

.lg-reloj__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  border: 0;
  border-radius: inherit;
  background: none;
  color: #FFFFFF;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lg-reloj__toggle:hover .lg-reloj__accion { background: rgba(255, 255, 255, 0.18); }
.lg-reloj__toggle:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }

.lg-reloj__titulo { flex: 1; min-width: 0; }
.lg-reloj__titulo strong { display: block; font-size: 1.02rem; }
.lg-reloj__titulo span { display: block; font-size: 0.86rem; color: rgba(255, 255, 255, 0.74); }

.lg-reloj__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(240, 68, 56, 0.3);
  color: #FFFFFF;
}

.lg-reloj__icono svg { animation: lg-arena 5s var(--lg-ease) infinite; }

@keyframes lg-arena { 0%, 80% { transform: rotate(0); } 90%, 100% { transform: rotate(180deg); } }

.lg-reloj__accion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0.45rem 0.6rem 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.lg-reloj__accion svg { transition: transform 0.3s var(--lg-ease); }
.lg-reloj.is-open .lg-reloj__accion svg { transform: rotate(180deg); }

.lg-reloj__panel { padding: 0 1.35rem 1.15rem; animation: lg-rise 0.45s var(--lg-ease) both; }

.lg-reloj__ayuda { margin: 0.1rem 0 0.9rem; font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); }

/* Gráfico: columnas por mes sobre el plazo de 24 meses; el sombreado marca el tiempo transcurrido. */
.lg-reloj__grafico { position: relative; padding-top: 28px; }

.lg-reloj__transcurrido,
.lg-reloj__vence {
  position: absolute;
  top: 0;
  bottom: 22px;
  pointer-events: none;
}

.lg-reloj__transcurrido {
  left: 0;
  width: var(--p);
  border-right: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(240, 68, 56, 0.05), rgba(240, 68, 56, 0.2));
  transform-origin: left;
  animation: lg-grow 1.1s 0.1s var(--lg-ease) both;
}

.lg-reloj__vence { right: 0; border-right: 2px solid #FF8A80; }

.lg-reloj__transcurrido > span,
.lg-reloj__vence > span {
  position: absolute;
  top: 0;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.lg-reloj__transcurrido > span {
  right: 0;
  transform: translateX(50%);
  background: #FFFFFF;
  color: var(--lg-red-ink);
  animation: lg-latido 2.4s ease-out infinite;
}

.lg-reloj__vence > span {
  right: -2px;
  background: var(--lg-red);
  color: #FFFFFF;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lg-reloj__grafico.cerca .lg-reloj__vence > span { display: none; }

@keyframes lg-latido {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.lg-reloj__meses {
  position: relative;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  height: 118px;
}

.lg-reloj__mes { display: flex; flex-direction: column; min-width: 0; }

.lg-reloj__col {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: none;
  font: inherit;
  color: inherit;
}

.lg-reloj__barra {
  display: block;
  height: calc(var(--h, 0%) * 0.78);
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: rgba(255, 255, 255, 0.12);
  transform-origin: bottom;
  animation: lg-grow-y 0.8s 0.15s var(--lg-ease) both;
}

.lg-reloj__mes:nth-child(n+2) .lg-reloj__barra { animation-delay: 0.2s; }
.lg-reloj__mes:nth-child(n+5) .lg-reloj__barra { animation-delay: 0.28s; }
.lg-reloj__mes:nth-child(n+8) .lg-reloj__barra { animation-delay: 0.36s; }

button.lg-reloj__col { cursor: pointer; transition: background-color 0.2s ease; }
button.lg-reloj__col .lg-reloj__barra {
  background: linear-gradient(180deg, #FF8A80, #D92D20);
  box-shadow: 0 6px 16px -8px rgba(240, 68, 56, 0.9);
  transition: filter 0.2s ease, transform 0.2s var(--lg-ease);
}

button.lg-reloj__col b {
  margin-bottom: 3px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #FFB4AD;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

button.lg-reloj__col:hover { background: rgba(255, 255, 255, 0.08); }
button.lg-reloj__col:hover .lg-reloj__barra { filter: brightness(1.15) saturate(1.1); }
button.lg-reloj__col:hover b,
button.lg-reloj__col[aria-pressed="true"] b { color: #FFFFFF; }
button.lg-reloj__col:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
button.lg-reloj__col[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); }
button.lg-reloj__col[aria-pressed="true"] .lg-reloj__barra { background: linear-gradient(180deg, #FFFFFF, #FFB4AD); }

.lg-reloj__etiqueta {
  height: 22px;
  padding-top: 6px;
  font-size: 0.66rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.lg-reloj__mes.actual .lg-reloj__etiqueta { color: #FFFFFF; font-weight: 700; overflow: visible; }

@keyframes lg-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Próximos vencimientos: cada botón filtra los proyectos que vencen ese mes */
.lg-reloj__vencimientos { margin-top: 1.1rem; }

.lg-reloj__subtitulo {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFB4AD;
}

.lg-reloj__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.lg-reloj__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--lg-ease);
}

.lg-reloj__chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lg-red);
  color: #FFFFFF;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.lg-reloj__chip strong { color: #FFFFFF; font-weight: 700; }
.lg-reloj__chip:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 180, 173, 0.6); transform: translateY(-1px); }
.lg-reloj__chip[aria-pressed="true"] { background: #FFFFFF; border-color: #FFFFFF; color: var(--lg-red-ink); }
.lg-reloj__chip[aria-pressed="true"] strong { color: var(--lg-red-ink); }
.lg-reloj__chip:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

/* Explicación para quien no conoce el trámite */
.lg-reloj__explica {
  margin: 0.1rem 0 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--lg-red);
  border-radius: 0 12px 12px 0;
  background: rgba(240, 68, 56, 0.12);
}

.lg-reloj__explica p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }
.lg-reloj__explica strong { color: #FFFFFF; }
.lg-reloj__titulo span strong { color: #FFB4AD; font-weight: 700; }

.lg-reloj__leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.lg-reloj__leyenda li { display: inline-flex; align-items: center; gap: 7px; }
.lg-reloj__clave { display: inline-block; width: 14px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.lg-reloj__clave--barra { background: linear-gradient(180deg, #FF8A80, #D92D20); }
.lg-reloj__clave--transcurrido { background: rgba(240, 68, 56, 0.28); border-right: 2px dashed rgba(255, 255, 255, 0.85); }
.lg-reloj__clave--vence { width: 2px; height: 14px; border-radius: 0; background: #FF8A80; }

.lg-reloj__texto { margin: 0.8rem 0 0; font-size: 0.92rem; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }
.lg-reloj__texto strong { color: #FFFFFF; }

/* --------------------------------------------------------------------------
   Barra de filtros
   -------------------------------------------------------------------------- */
.lg-main { padding: clamp(1.5rem, 3vw, 2.25rem) 0 3.5rem; }

.lg-toolbar {
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: 22px;
  box-shadow: var(--lg-shadow);
  padding: clamp(1rem, 2vw, 1.4rem);
  margin-top: calc(-1 * clamp(1.5rem, 3vw, 2.25rem) - 1.25rem);
  position: relative;
  z-index: 2;
}

.lg-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: var(--lg-bg);
  border: 1px solid var(--lg-line);
}

.lg-segment::-webkit-scrollbar { display: none; }

.lg-segment__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.45rem 0.55rem 0.45rem 0.7rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--lg-text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s var(--lg-ease), color 0.2s var(--lg-ease), box-shadow 0.2s var(--lg-ease);
}

.lg-segment__btn:hover { background: rgba(17, 16, 59, 0.05); color: var(--lg-ink); }

.lg-segment__btn[aria-pressed="true"] {
  background: var(--lg-navy);
  color: #FFFFFF;
  box-shadow: 0 6px 16px -8px rgba(17, 16, 59, 0.6);
}

.lg-segment__btn[aria-pressed="true"][data-grupo="autoria"] {
  background: linear-gradient(135deg, #8D4A96, var(--lg-magenta));
}

.lg-segment__count {
  min-width: 2.1em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #FFFFFF;
  color: var(--lg-ink);
  border: 1px solid var(--lg-line);
}

.lg-segment__btn[aria-pressed="true"] .lg-segment__count {
  background: rgba(255, 255, 255, 0.16);
  border-color: transparent;
  color: #FFFFFF;
}

.lg-scope-note {
  margin: 0.7rem 0.25rem 0;
  font-size: 0.88rem;
  color: var(--lg-muted);
  line-height: 1.45;
}

.lg-searchbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.lg-searchbar .lg-field--search { flex: 1 1 320px; }

.lg-input.lg-input--grande {
  min-height: 56px;
  padding-left: 3rem;
  border-radius: 16px;
  font-size: 1.05rem;
}

.lg-input--grande + svg,
.lg-input-wrap:has(.lg-input--grande) svg { left: 16px; }

.lg-vista {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--lg-line);
  background: var(--lg-bg);
}

.lg-vista button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--lg-muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.lg-vista button:hover { color: var(--lg-ink); }
.lg-vista button[aria-pressed="true"] { background: #FFFFFF; color: var(--lg-ink); box-shadow: 0 2px 8px -3px rgba(17, 16, 59, 0.35); }

.lg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.lg-field__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-input-wrap { position: relative; }

.lg-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lg-muted);
  pointer-events: none;
}

.lg-input,
.lg-select {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--lg-line-strong);
  background: #FFFFFF;
  color: var(--lg-ink);
  font-family: inherit;
  font-size: 0.97rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lg-input { padding-left: 2.6rem; }

.lg-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E5D78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  text-overflow: ellipsis;
  cursor: pointer;
}

.lg-input:hover,
.lg-select:hover { border-color: #B9B8CF; }

.lg-input:focus,
.lg-select:focus {
  outline: none;
  border-color: var(--lg-blue);
  box-shadow: 0 0 0 4px rgba(28, 92, 255, 0.14);
}

.lg-input::placeholder { color: #8A89A2; }

.lg-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lg-line);
}

.lg-results {
  font-size: 0.95rem;
  color: var(--lg-text);
  margin: 0;
}

.lg-results strong { color: var(--lg-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.lg-active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.lg-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0.3rem 0.5rem 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--lg-line-strong);
  background: #FFFFFF;
  color: var(--lg-ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.lg-filter-chip:hover { border-color: var(--lg-ink); }

.lg-filter-chip svg { color: var(--lg-muted); }

.lg-link-btn {
  border: 0;
  background: none;
  padding: 0.35rem 0.2rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lg-blue-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lg-sort { display: flex; align-items: center; gap: 0.6rem; }

.lg-sort .lg-select { min-height: 40px; width: auto; font-size: 0.9rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }

/* --------------------------------------------------------------------------
   Disposición: listado + panel lateral de análisis
   -------------------------------------------------------------------------- */
.lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas: "list panel";
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.lg-list { grid-area: list; min-width: 0; }

.lg-panel {
  grid-area: panel;
  position: sticky;
  top: calc(var(--header-h, 80px) + 16px);
  max-height: calc(100vh - var(--header-h, 80px) - 32px);
  display: flex;
  flex-direction: column;
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: 22px;
  box-shadow: var(--lg-shadow);
  overflow: hidden;
}

.lg-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 0.9rem 1.3rem;
  border-bottom: 1px solid var(--lg-line);
}

.lg-panel__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lg-ink);
}

.lg-panel__title svg { color: var(--lg-magenta); flex-shrink: 0; }

.lg-panel__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 40px;
  min-height: 40px;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--lg-line-strong);
  background: #FFFFFF;
  color: var(--lg-ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.lg-panel__toggle:hover { background: var(--lg-bg); }

@media (min-width: 1181px) {
  .lg-panel__toggle { display: none; }
}

.lg-panel__toggle svg { transition: transform 0.3s var(--lg-ease); }

.lg-panel__body {
  overflow-y: auto;
  padding: 1rem 1.3rem 1.3rem;
  overscroll-behavior: contain;
}

/* Grupos de filtros dentro del panel */
.lg-filtro + .lg-filtro { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--lg-line); }

.lg-filtro__titulo {
  margin: 0 0 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-opciones { display: flex; flex-direction: column; gap: 6px; }
.lg-opciones--fila { flex-direction: row; flex-wrap: wrap; }

.lg-opcion {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.4rem 0.5rem 0.4rem 0.8rem;
  border-radius: 11px;
  border: 1px solid var(--lg-line);
  background: #FFFFFF;
  color: var(--lg-ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.lg-opciones--fila .lg-opcion { flex: 1 1 auto; }
.lg-opcion:hover { border-color: var(--lg-line-strong); background: var(--lg-bg); }

.lg-opcion__n {
  min-width: 2.1em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--lg-bg);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lg-opcion[aria-pressed="true"] { background: var(--lg-navy); border-color: var(--lg-navy); color: #FFFFFF; }
.lg-opcion[aria-pressed="true"] .lg-opcion__n { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }

.lg-opcion--alerta { border-color: rgba(217, 45, 32, 0.3); color: var(--lg-red-ink); }
.lg-opcion--alerta .lg-opcion__n { background: var(--lg-red-soft); color: var(--lg-red-ink); }
.lg-opcion--alerta:hover { background: var(--lg-red-soft); border-color: rgba(217, 45, 32, 0.5); }
.lg-opcion--alerta[aria-pressed="true"] { background: var(--lg-red); border-color: var(--lg-red); color: #FFFFFF; }

.lg-panel__badge {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--lg-blue-soft);
  color: var(--lg-blue-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.lg-panel__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 1.1rem;
}

.lg-panel__stat {
  padding: 0.65rem 0.6rem;
  border-radius: 12px;
  background: var(--lg-bg);
  text-align: left;
}

.lg-panel__stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--lg-ink);
  font-variant-numeric: tabular-nums;
}

.lg-panel__stat span { display: block; font-size: 0.74rem; line-height: 1.3; color: var(--lg-muted); margin-top: 2px; }
.lg-panel__stat--alerta { background: var(--lg-red-soft); }
.lg-panel__stat--alerta strong { color: var(--lg-red-ink); }

.lg-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.lg-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name value" "meter meter";
  gap: 6px 10px;
  width: 100%;
  padding: 0.6rem 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.lg-bar:hover { background: var(--lg-bg); }

.lg-bar[aria-pressed="true"] { background: var(--lg-blue-soft); border-color: rgba(28, 92, 255, 0.35); }

.lg-bar__name {
  grid-area: name;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--lg-ink);
}

.lg-bar__value {
  grid-area: value;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--lg-ink);
  font-variant-numeric: tabular-nums;
}

.lg-bar__value small { font-size: 0.75rem; font-weight: 500; color: var(--lg-muted); margin-left: 4px; }

.lg-bar__meter {
  grid-area: meter;
  height: 8px;
  border-radius: 999px;
  background: #ECEBF4;
  overflow: hidden;
}

.lg-bar__fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lg-blue), var(--lg-magenta));
  transform-origin: left;
  animation: lg-grow 0.7s var(--lg-ease) both;
}

.lg-bar--tablas .lg-bar__fill { background: linear-gradient(90deg, var(--lg-turquoise), #4CCBE6); }

.lg-bars__divider {
  margin: 0.9rem 0.65rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-panel__note {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--lg-orange-soft);
  color: #6B3D0D;
  font-size: 0.8rem;
  line-height: 1.45;
}

@keyframes lg-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   Tarjetas de proyectos
   -------------------------------------------------------------------------- */
.lg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}

/* Mientras una ficha está expandida, las vecinas conservan su altura natural. */
.lg-grid:has(details[open]) { align-items: start; }

/* Vista en lista: una fila por expediente, con lo esencial y la descarga a la derecha */
.lg-grid--lista { grid-template-columns: minmax(0, 1fr); gap: 10px; }

.lg-grid--lista .lg-card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) auto;
  /* Las filas 1fr de los extremos absorben la altura sobrante: la columna izquierda queda centrada. */
  grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas:
    ".       body  actions"
    "type    body  actions"
    "meta    body  actions"
    "status  body  actions"
    ".       body  actions";
  align-items: center;
  gap: 0 1.25rem;
  padding: 0.85rem 1.1rem 0.85rem 1.3rem;
}

.lg-grid--lista .lg-card::before { left: -1px; right: auto; top: 0.9rem; bottom: 0.9rem; width: 3px; height: auto; border-radius: 0 4px 4px 0; }
.lg-grid--lista .lg-card:hover { transform: none; }
.lg-grid--lista .lg-card__top { display: contents; }
.lg-grid--lista .lg-type { grid-area: type; }
.lg-grid--lista .lg-status { grid-area: status; justify-self: start; }
.lg-grid--lista .lg-card__meta { grid-area: meta; margin: 0.3rem 0; }
.lg-grid--lista .lg-card__body { grid-area: body; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.lg-grid--lista .lg-card__title { margin: 0; font-size: 1.02rem; }
.lg-grid--lista .lg-card__tags { margin: 0; }
.lg-grid--lista .lg-card__summary,
.lg-grid--lista .lg-espera,
.lg-grid--lista .lg-authorship,
.lg-grid--lista .lg-card__more { display: none; }
.lg-grid--lista .lg-card__actions {
  grid-area: actions;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.lg-grid--lista .lg-download { min-height: 40px; padding: 0.4rem 0.85rem; font-size: 0.86rem; }
.lg-grid--lista .lg-download__meta { display: none; }
.lg-grid--lista .lg-official { justify-content: center; font-size: 0.84rem; }
.lg-grid--lista .lg-official--button { min-height: 40px; }

@media (max-width: 900px) {
  .lg-grid--lista .lg-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: none;
    grid-template-areas: "type status" "meta meta" "body body" "actions actions";
    gap: 0.3rem 1rem;
  }
  .lg-grid--lista .lg-status { justify-self: end; }
  .lg-grid--lista .lg-card__actions { flex-direction: row; flex-wrap: wrap; margin-top: 0.4rem; }
  .lg-grid--lista .lg-card__actions > * { flex: 1 1 auto; }
}

.lg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--lg-card);
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius);
  box-shadow: var(--lg-shadow);
  padding: 1.25rem 1.25rem 1.15rem;
  transition: box-shadow 0.3s var(--lg-ease), transform 0.3s var(--lg-ease), border-color 0.3s;
  animation: lg-card-in 0.45s var(--lg-ease) both;
}

.lg-card:hover { box-shadow: var(--lg-shadow-hover); border-color: var(--lg-line-strong); transform: translateY(-2px); }

.lg-card.is-highlighted { border-color: var(--lg-magenta); box-shadow: 0 0 0 3px rgba(159, 87, 167, 0.18), var(--lg-shadow-hover); }

.lg-card::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: -1px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--lg-accent, var(--lg-blue));
  opacity: 0.9;
}

.lg-card[data-tipo="Ley"] { --lg-accent: var(--lg-blue); }
.lg-card[data-tipo="Resolución"] { --lg-accent: var(--lg-magenta); }
.lg-card[data-tipo="Declaración"] { --lg-accent: var(--lg-turquoise); }

@keyframes lg-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.lg-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -200px), rgba(28, 92, 255, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.lg-card:hover::after { opacity: 1; }

.lg-espera { margin: 0 0 0.85rem; }

.lg-espera__texto {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lg-red-ink);
}

/* Medidor segmentado: un tramo por mes del plazo de 24 meses, para que no parezca un control deslizable. */
.lg-espera__track {
  display: block;
  height: 7px;
  background: #F4E4E3;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 calc(100% / 24 - 2px), transparent calc(100% / 24 - 2px) calc(100% / 24));
  mask-image: repeating-linear-gradient(90deg, #000 0 calc(100% / 24 - 2px), transparent calc(100% / 24 - 2px) calc(100% / 24));
}

.lg-espera__fill {
  display: block;
  width: var(--p);
  height: 100%;
  background: linear-gradient(90deg, #FBA85F, var(--lg-red));
  transform-origin: left;
  animation: lg-grow 0.9s 0.2s var(--lg-ease) both;
}

.lg-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.lg-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-blue-ink);
}

.lg-type::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.lg-type--resolucion { color: var(--lg-magenta-ink); }
.lg-type--declaracion { color: var(--lg-turquoise-ink); }

.lg-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--lg-orange-soft);
  color: var(--lg-orange-ink);
}

.lg-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #E58A2E; }
.lg-status--comision { background: var(--lg-red-soft); color: var(--lg-red-ink); }
.lg-status--comision::before { display: none; }
.lg-status--aprobado { background: var(--lg-green-soft); color: var(--lg-green); }
.lg-status--aprobado::before { background: #10A06F; }
.lg-status--archivado { background: #EEEEF3; color: var(--lg-muted); }
.lg-status--archivado::before { background: #9B9AB0; }

.lg-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: var(--lg-muted);
}

.lg-card__meta strong { color: var(--lg-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.lg-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lg-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lg-card__summary {
  margin: 0 0 0.9rem;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--lg-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lg-card__body { display: contents; }
.lg-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.75rem; padding: 0; list-style: none; }

.lg-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 0.28rem 0.6rem;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid var(--lg-line-strong);
  color: var(--lg-ink);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
}

.lg-tag svg { flex-shrink: 0; color: var(--lg-muted); }
.lg-tag--tablas { background: var(--lg-turquoise-soft); border-color: rgba(11, 111, 134, 0.25); color: var(--lg-turquoise-ink); }
.lg-tag--tablas svg { color: var(--lg-turquoise-ink); }

.lg-authorship { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.9rem; }

.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--lg-blue-soft);
  color: var(--lg-blue-ink);
}

.lg-chip--cecilia { background: var(--lg-magenta-soft); color: var(--lg-magenta-ink); }
.lg-chip--acompanamos { background: #EFEFF5; color: var(--lg-text); }
.lg-chip--norma { background: var(--lg-green-soft); color: var(--lg-green); }

.lg-card__more { margin-top: auto; border-top: 1px solid var(--lg-line); }

.lg-card__more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.1rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lg-ink);
  border-radius: 8px;
}

.lg-card__more > summary::-webkit-details-marker { display: none; }
.lg-card__more > summary svg { color: var(--lg-muted); transition: transform 0.3s var(--lg-ease); }
.lg-card__more[open] > summary svg { transform: rotate(180deg); }

.lg-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.2rem 0 0.9rem;
  font-size: 0.87rem;
  line-height: 1.5;
  animation: lg-fade 0.3s var(--lg-ease);
}

.lg-details dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-muted);
  margin-bottom: 2px;
}

.lg-details dd { margin: 0; color: var(--lg-ink); }
.lg-details dd .is-bloque { font-weight: 600; }
.lg-details a { color: var(--lg-blue-ink); text-decoration: underline; text-underline-offset: 2px; }

@keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }

.lg-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--lg-line);
}

.lg-card__more + .lg-card__actions { border-top: 0; padding-top: 0.1rem; }

.lg-download {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  background: var(--lg-green);
  color: #FFFFFF;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px -10px rgba(4, 120, 87, 0.75);
  transition: background-color 0.2s, transform 0.2s var(--lg-ease), box-shadow 0.2s;
}

.lg-download:hover { background: var(--lg-green-hover); transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(4, 120, 87, 0.85); color: #FFFFFF; }
.lg-download:active { transform: translateY(0); }
.lg-download:hover svg { animation: lg-nudge 0.6s var(--lg-ease); }

@keyframes lg-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.lg-download svg { flex-shrink: 0; }

.lg-download__meta {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
}

.lg-official {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lg-blue-ink);
  text-decoration: none;
}

.lg-official:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-official--button {
  flex: 1 1 auto;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--lg-line-strong);
  color: var(--lg-ink);
}

.lg-official--button:hover { border-color: var(--lg-ink); text-decoration: none; }

.lg-nodoc { font-size: 0.86rem; color: var(--lg-muted); }

.lg-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-top: 1.75rem; }

.lg-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--lg-ink);
  background: #FFFFFF;
  color: var(--lg-ink);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.lg-more-btn:hover { background: var(--lg-ink); color: #FFFFFF; }
.lg-more-wrap p { margin: 0; font-size: 0.85rem; color: var(--lg-muted); }

.lg-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 22px;
  border: 1px dashed var(--lg-line-strong);
  background: #FFFFFF;
  color: var(--lg-text);
}

.lg-state h3 { margin: 0.75rem 0 0.4rem; font-size: 1.2rem; color: var(--lg-ink); }
.lg-state p { margin: 0 0 1.2rem; color: var(--lg-muted); }
.lg-state a { color: var(--lg-blue-ink); text-decoration: underline; }

.lg-skeleton {
  height: 300px;
  border-radius: var(--lg-radius);
  background: linear-gradient(100deg, #EDEDF4 30%, #F7F7FB 50%, #EDEDF4 70%);
  background-size: 300% 100%;
  animation: lg-shimmer 1.4s ease-in-out infinite;
}

@keyframes lg-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.lg-spotlight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 16px;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: var(--lg-magenta-soft);
  color: var(--lg-magenta-ink);
  font-size: 0.92rem;
  font-weight: 500;
}

.lg-footnote {
  margin: 2.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--lg-muted);
  max-width: 90ch;
}

.lg-footnote a { color: var(--lg-blue-ink); text-decoration: underline; text-underline-offset: 2px; }

.lg-internal-link {
  display: block;
  width: fit-content;
  margin: 1.5rem auto 0;
  font-size: 12px;
  color: #6B6A85;
  text-decoration: none;
}

.lg-internal-link:hover { color: var(--lg-ink); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Portada: botón principal del hero
   -------------------------------------------------------------------------- */
.lg-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.6rem 0.55rem 0.6rem;
  padding-right: 1.3rem;
  border-radius: 18px;
  background: #FFFFFF;
  color: var(--lg-navy);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.25s var(--lg-ease), box-shadow 0.25s var(--lg-ease);
}

.lg-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(159, 87, 167, 0.55);
  color: var(--lg-navy);
}

.lg-hero-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--lg-magenta), var(--lg-blue));
  color: #FFFFFF;
  flex-shrink: 0;
}

.lg-hero-cta__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }

.lg-hero-cta__text small {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lg-muted);
  margin-top: 3px;
}

.lg-hero-cta__arrow { margin-left: auto; color: var(--lg-magenta); transition: transform 0.25s var(--lg-ease); }
.lg-hero-cta:hover .lg-hero-cta__arrow { transform: translateX(3px); }

/* Destello al pasar el cursor */
.lg-hero-cta { position: relative; overflow: hidden; }
.lg-hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(159, 87, 167, 0.16) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.9s var(--lg-ease);
  pointer-events: none;
}
.lg-hero-cta:hover::after { transform: translateX(130%); }

/* Los dos accesos destacados: proyectos e Instagram */
.lg-hero-primarios { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.lg-hero-primarios > .lg-hero-cta { flex: 1 1 270px; max-width: 340px; }

.lg-hero-cta--ig {
  background: linear-gradient(100deg, #F58529 0%, #D62976 24%, #962FBF 62%, #4F5BD5 100%);
  color: #FFFFFF;
  box-shadow: 0 14px 32px -12px rgba(214, 41, 118, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.lg-hero-cta--ig:hover {
  color: #FFFFFF;
  box-shadow: 0 20px 40px -14px rgba(150, 47, 191, 0.75), 0 0 0 3px rgba(255, 255, 255, 0.55);
}
.lg-hero-cta--ig::after { background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%); }
.lg-hero-cta--ig .lg-hero-cta__icon { background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.lg-hero-cta--ig .lg-hero-cta__text { text-shadow: 0 1px 2px rgba(70, 10, 60, 0.3); }
.lg-hero-cta--ig .lg-hero-cta__text small { color: rgba(255, 255, 255, 0.92); }
.lg-hero-cta--ig .lg-hero-cta__arrow { color: #FFFFFF; }
.lg-hero-cta--ig:hover .lg-hero-cta__arrow { transform: translate(2px, -2px); }

/* Overrides the strict horizontal row defined in site.css ("HERO REFINEMENTS - 2026"). */
.hero-new .hero-new__actions-container {
  display: flex;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.hero-new__actions-container .lg-hero-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-new__actions-container .lg-hero-secondary > a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 12px;
  border-width: 1.5px;
  white-space: nowrap;
}

.lg-show-mobile { display: none; }

/* Escritorio con poca altura (notebooks, Windows con escala 125 %): el hero debe entrar
   completo entre la barra de navegación y el borde inferior, sin esconder botones. */
@media (min-width: 769px) {
  .hero-new .hero-new__content { justify-content: safe center; }
}

@media (min-width: 769px) and (max-height: 940px) {
  .hero-new .hero-new__content { padding-top: calc(var(--header-h, 80px) + 30px) !important; }
  .hero-new .hero-new__panel { padding: 18px 28px !important; gap: 10px !important; }
  .hero-new .hero-new__badge { margin-bottom: 6px; }
  .hero-new .hero-new__title { font-size: clamp(34px, 6.6vh, 64px); line-height: 1.04; margin-bottom: 6px; }
  .hero-new .hero-new__subtitle { font-size: clamp(14.5px, 2.15vh, 17.6px) !important; line-height: 1.45 !important; }
  .hero-new .hero-new__actions-container { margin-top: 8px !important; gap: 10px; }
  .hero-new .lg-hero-cta { padding: 0.4rem 1.1rem 0.4rem 0.45rem; font-size: 1rem; }
  .hero-new .lg-hero-cta__icon { width: 38px; height: 38px; border-radius: 11px; }
  .hero-new .lg-hero-secondary > a { padding: 0.42rem 0.85rem; font-size: 0.88rem; }
}

@media (min-width: 769px) and (max-height: 700px) {
  .hero-new .hero-new__title { font-size: clamp(30px, 6.2vh, 44px); }
  .hero-new .hero-new__subtitle { font-size: 14px !important; line-height: 1.4 !important; }
}

/* --------------------------------------------------------------------------
   Portada: sección "Trabajo legislativo"
   -------------------------------------------------------------------------- */
.lg-home {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background:
    radial-gradient(800px 360px at 100% 0%, rgba(159, 87, 167, 0.1), transparent 60%),
    radial-gradient(700px 320px at 0% 100%, rgba(28, 92, 255, 0.08), transparent 60%),
    #FAFAFD;
  font-family: 'Outfit', sans-serif;
  color: var(--lg-text);
}

.lg-home__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.lg-home .lg-eyebrow { color: var(--lg-magenta-ink); }

.lg-home__title {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lg-ink);
}

.lg-home__title span {
  background: linear-gradient(90deg, var(--lg-magenta), var(--lg-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lg-home__lead { margin: 0 0 1.6rem; font-size: 1.08rem; line-height: 1.65; color: var(--lg-text); max-width: 52ch; }

.lg-home__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.lg-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.75rem 1.4rem;
  border-radius: 14px;
  background: var(--lg-navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(17, 16, 59, 0.9);
  transition: transform 0.2s var(--lg-ease), background-color 0.2s;
}

.lg-btn-primary:hover { background: #24226B; transform: translateY(-2px); color: #FFFFFF; }

.lg-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  border: 1.5px solid var(--lg-line-strong);
  background: #FFFFFF;
  color: var(--lg-magenta-ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.lg-btn-secondary:hover { border-color: var(--lg-magenta); background: var(--lg-magenta-soft); color: var(--lg-magenta-ink); }

.lg-home__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lg-home-kpi {
  padding: 1.25rem 1.3rem;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid var(--lg-line);
  box-shadow: var(--lg-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--lg-ease), box-shadow 0.25s var(--lg-ease);
}

a.lg-home-kpi:hover { transform: translateY(-2px); box-shadow: var(--lg-shadow-hover); }

.lg-home-kpi--main {
  justify-content: flex-end;
  background:
    radial-gradient(360px 220px at 100% 0%, rgba(159, 87, 167, 0.55), transparent 70%),
    radial-gradient(300px 220px at 0% 100%, rgba(28, 92, 255, 0.45), transparent 70%),
    var(--lg-navy);
  border-color: transparent;
  color: #FFFFFF;
  min-height: 250px;
}

.lg-home-kpi__value {
  font-size: clamp(2.4rem, 4.2vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lg-ink);
  font-variant-numeric: tabular-nums;
}

.lg-home-kpi--main .lg-home-kpi__value { font-size: clamp(3.6rem, 7vw, 5.4rem); color: #FFFFFF; }
.lg-home-kpi__label { font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--lg-ink); }
.lg-home-kpi--main .lg-home-kpi__label { color: #FFFFFF; font-size: 1.12rem; }
.lg-home-kpi__note { font-size: 0.84rem; line-height: 1.4; color: var(--lg-muted); }
.lg-home-kpi--main .lg-home-kpi__note { color: rgba(255, 255, 255, 0.75); }
.lg-home-kpi--comision { justify-content: flex-end; background: var(--lg-red-soft); border-color: rgba(217, 45, 32, 0.22); }
.lg-home-kpi--comision .lg-home-kpi__value { color: var(--lg-red-ink); }

.lg-home-kpi__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 7px;
  vertical-align: -6px;
  background: var(--lg-red);
  color: #FFFFFF;
}

.lg-home-kpi--main { position: relative; overflow: hidden; }

.lg-home-kpi--main::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(36, 188, 222, 0.18), transparent 30%);
  animation: lg-spin 12s linear infinite;
  pointer-events: none;
}

.lg-home-kpi--main > * { position: relative; z-index: 1; }

@keyframes lg-spin { to { transform: rotate(1turn); } }

.lg-home__recent { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.lg-home__recent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.1rem;
}

.lg-home__recent-head h3 { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--lg-ink); }
.lg-home__recent-head a { font-weight: 600; color: var(--lg-blue-ink); text-decoration: none; }
.lg-home__recent-head a:hover { text-decoration: underline; text-underline-offset: 3px; }

.lg-home__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.lg-home__cards .lg-card__summary { -webkit-line-clamp: 2; }

.lg-home__error { margin: 0; color: var(--lg-muted); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .lg-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "panel" "list";
    gap: 16px;
  }

  .lg-panel { position: static; max-height: none; }
  .lg-panel__toggle svg { transform: rotate(180deg); }
  .lg-layout.is-panel-collapsed .lg-panel__toggle svg { transform: none; }
  .lg-layout.is-panel-collapsed .lg-panel__head { border-bottom: 0; }
  .lg-panel__body { max-height: none; }
}

@media (max-width: 1024px) {
  .lg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-home__grid { grid-template-columns: minmax(0, 1fr); }
  .lg-home__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-home__cards > :nth-child(3) { display: none; }
}

@media (max-width: 640px) {
  .lg-hero { padding-top: calc(var(--header-h, 80px) + 1.75rem); padding-bottom: 3rem; }
  .lg-eyebrow { font-size: 0.7rem; letter-spacing: 0.1em; }
  .lg-hero__lead { font-size: 1rem; }
  .lg-kpis { gap: 8px; margin-top: 1.6rem; }
  .lg-kpi { padding: 0.85rem 0.8rem; }
  .lg-kpi--main { padding: 1.1rem 1.1rem 1rem; }
  .lg-kpi__value { font-size: 2rem; }
  .lg-kpi--main .lg-kpi__value { font-size: 3.2rem; }
  .lg-kpi__label { font-size: 0.82rem; }
  .lg-kpi__note { font-size: 0.78rem; }
  .lg-reloj__toggle { flex-wrap: wrap; padding: 0.8rem 0.9rem; }
  .lg-reloj__titulo span { font-size: 0.8rem; }
  .lg-reloj__accion { width: 100%; justify-content: center; }
  .lg-reloj__panel { padding: 0 0.9rem 1rem; }
  .lg-reloj__meses { gap: 2px; height: 92px; }
  .lg-reloj__etiqueta { font-size: 0; }
  .lg-reloj__mes.movil .lg-reloj__etiqueta { font-size: 0.62rem; overflow: visible; }
  .lg-reloj__mes:first-child .lg-reloj__etiqueta { direction: ltr; text-align: left; }
  .lg-reloj__mes:last-child .lg-reloj__etiqueta { direction: rtl; }
  button.lg-reloj__col b { font-size: 0.6rem; }
  .lg-reloj__leyenda { font-size: 0.74rem; }
  .lg-kpi__dot { width: 7px; height: 7px; margin-right: 4px; }
  .lg-toolbar { border-radius: 18px; }
  .lg-segment__btn { font-size: 0.82rem; padding: 0.45rem 0.4rem 0.45rem 0.6rem; }
  .lg-segment__count { min-width: 1.8em; padding: 0.1rem 0.4rem; }
  .lg-panel__body { padding: 0.9rem 1rem 1.1rem; }
  .lg-searchbar .lg-field--search { flex-basis: 100%; }
  .lg-sort { flex: 1 1 0; min-width: 0; }
  .lg-sort .lg-field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lg-sort .lg-select { flex: 1; width: 100%; min-height: 48px; }
  .lg-panel__summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-card { padding: 1.1rem 1.05rem 1rem; }
  .lg-card:hover { transform: none; }
  .lg-download { width: 100%; }
  .lg-home__kpis { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lg-home-kpi--main { min-height: 0; }
  .lg-home-kpi { padding: 1rem; }
  .lg-home__cards { grid-template-columns: minmax(0, 1fr); }
  .lg-home__cards > :nth-child(3) { display: flex; }
  .lg-home__actions > a { flex: 1 1 100%; justify-content: center; }

  .hero-new__actions-container .lg-hero-primarios > .lg-hero-cta { flex-basis: 100%; max-width: none; }
  .hero-new__actions-container .lg-hero-secondary { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-new__actions-container .lg-hero-secondary > a { justify-content: center; width: 100%; padding: 0.55rem 0.5rem; }
  .lg-hide-mobile { display: none; }
  .lg-show-mobile { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-card,
  .lg-bar__fill,
  .lg-details,
  .lg-skeleton,
  .lg-hero::after,
  .lg-kpis > .lg-kpi,
  .lg-kpi--main::after,
  .lg-reloj,
  .lg-reloj__panel,
  .lg-reloj__barra,
  .lg-reloj__icono svg,
  .lg-reloj__transcurrido,
  .lg-reloj__transcurrido > span,
  .lg-espera__fill,
  .lg-home-kpi--main::after,
  .lg-download:hover svg { animation: none !important; }
  .lg-kpi--main::after { display: none; }
  .lg-card,
  .lg-download,
  .lg-hero-cta,
  .lg-hero-cta::after,
  .lg-btn-primary,
  .lg-home-kpi { transition: none !important; }
  .lg-card:hover,
  .lg-hero-cta:hover,
  .lg-btn-primary:hover,
  a.lg-home-kpi:hover { transform: none; }
}

@media print {
  .lg-toolbar,
  .lg-panel,
  .lg-more-wrap,
  .lg-card__actions { display: none !important; }
  .lg-layout { grid-template-columns: 1fr; }
}
