
.ed-stats {
  background: #fff;
  border-bottom: 1px solid #dae3eb;
}
.ed-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.ed-stat {
  padding: 1.6rem 1.2rem;
  border-right: 1px solid #dae3eb;
}
.ed-stat:first-child {
  padding-left: 0;
}
.ed-stat:last-child {
  border-right: 0;
}
.ed-stat dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #687c8b;
}
.ed-stat dd {
  margin: 0.35rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  color: #0e2a47;
}

.ed-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1rem 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.ed-toolbar__search {
  margin-bottom: 0;
}
.ed-toolbar__year {
  display: grid;
  gap: 0.45rem;
}
.ed-toolbar__year label {
  font-weight: 700;
  color: #0e2a47;
  font-size: 0.83rem;
}
.ed-toolbar__year select {
  width: 100%;
  border: 1px solid #ccd9e2;
  border-radius: 8px;
  padding: 1rem 0.9rem;
  background: #fff;
  font: inherit;
  color: #102e48;
  cursor: pointer;
}
.ed-toolbar__year select:focus-visible {
  outline: 3px solid #a0cfea;
  outline-offset: 2px;
}
.ed-filters {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.ed-filters legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ed-filter {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d664e;
  background: #fff;
  border: 1px solid #c7d9d3;
  border-radius: 99px;
  padding: 0.6rem 1.05rem;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.ed-filter:hover {
  background: #e8f7f0;
}
.ed-filter[aria-pressed="true"] {
  background: #0e2a47;
  border-color: #0e2a47;
  color: #fff;
}
.ed-filter:focus-visible,
.ed-clear:focus-visible,
.ed-card__link:focus-visible,
.ed-card__process:focus-visible {
  outline: 3px solid #a0cfea;
  outline-offset: 2px;
}

.ed-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.4rem 0 0.9rem;
  min-height: 2rem;
}
.ed-count {
  margin: 0;
  color: #617583;
  font-size: 0.86rem;
}
.ed-clear {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0b5648;
  background: none;
  border: 0;
  padding: 0.3rem 0;
  cursor: pointer;
  text-decoration: underline;
}

.ed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.ed-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  background: #fff;
  border: 1px solid #dbe5ec;
  border-radius: 12px;
  padding: 1.25rem 1.3rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.ed-card:hover {
  border-color: #17785a;
  box-shadow: 0 10px 30px #0b253012;
}
.ed-card[hidden] {
  display: none !important;
}
.ed-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.ed-badge {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 99px;
  background: #e4f4ed;
  color: #096044;
}
.ed-badge--resultado {
  background: #e6eef6;
  color: #1d4e7e;
}
.ed-badge--despacho {
  background: #fbefdc;
  color: #7a4a08;
}
.ed-card__date {
  font-size: 0.75rem;
  color: #73838f;
}
.ed-card h3 {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.35;
  color: #0e2a47;
  margin: 0;
}
.ed-card__object {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #5d6c78;
  overflow-wrap: anywhere;
}
.ed-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
  margin-top: auto;
  padding-top: 0.3rem;
}
.ed-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-radius: 7px;
  background: #0e2a47;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}
.ed-card__link:hover {
  background: #17785a;
}
.ed-card__link svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.ed-card__process {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0d664e;
  background: none;
  border: 0;
  padding: 0.3rem 0;
  cursor: pointer;
}
.ed-card__process:hover {
  text-decoration: underline;
}

.ed-context {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.2rem 1.3rem;
  border: 1px dashed #c7d9d3;
  border-radius: 12px;
  background: #fff;
}
.ed-context p {
  margin: 0;
  color: #5d6c78;
  font-size: 0.88rem;
  line-height: 1.6;
}
.ed-context .tp-pill {
  flex: none;
}

@media (max-width: 780px) {
  .ed-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ed-stat {
    padding: 1.2rem 1rem;
  }
  .ed-stat:nth-child(odd) {
    padding-left: 0;
  }
  .ed-stat:nth-child(2) {
    border-right: 0;
  }
  .ed-stat:nth-child(-n + 2) {
    border-bottom: 1px solid #dae3eb;
  }
  .ed-toolbar {
    grid-template-columns: 1fr;
  }
  .ed-list {
    grid-template-columns: 1fr;
  }
  .ed-context {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ed-card,
  .ed-filter {
    transition: none;
  }
}
