.matching-fields {
  margin: 20px 0;
}
.matching-fields h3 {
  margin-bottom: 8px;
}
.tag-group {
  border: 1px solid var(--border, #dce3e4);
  border-radius: 10px;
  margin: 8px 0;
  padding: 10px;
  background: #fff;
}
.tag-group summary {
  cursor: pointer;
  font-weight: 600;
}
.tag-search {
  margin-top: 10px;
  width: 100%;
}
.tag-options {
  max-height: 230px;
  overflow: auto;
  padding: 8px 0;
}
.tag-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 0;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
}
.tag-option[hidden] {
  display: none;
}
.tag-option input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-top: 2px;
}
.tag-add {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag-add input {
  min-width: 100px;
  flex: 1;
}
.tag-total {
  font-weight: 400;
  color: #516465;
}
.filter-panel .two-fields {
  grid-template-columns: 1fr;
}
.filter-panel {
  align-self: start;
}
.filter-panel form > .button {
  margin-top: 16px;
}
.relevance {
  background: #edf6f2;
  border-radius: 9px;
  padding: 10px;
  margin: 12px 0;
  font-size: 0.87rem;
}
.relevance summary {
  cursor: pointer;
  font-weight: 600;
  color: #265e4c;
}
.relevance p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.declared-attributes {
  margin: 22px 0;
}
.declared-attributes p {
  margin: 8px 0;
}
.candidate-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0;
}
.profile-dirty {
  color: #805623;
  font-weight: 600;
}
.search-row {
  flex-wrap: wrap;
}
.directory-layout > section {
  min-width: 0;
}
.professional-card,
.offer-card {
  overflow-wrap: anywhere;
}
.matching-fields input,
.matching-fields select {
  max-width: 100%;
}
.matching-fields .two-fields {
  margin-top: 12px;
}
@media (max-width: 800px) {
  .directory-layout {
    display: block;
  }
  /* Sin display:block: en móvil (≤760 px) el panel va plegado hasta pulsar «Filtros» (styles.css). */
  .directory-layout > .filter-panel {
    margin-bottom: 20px;
    position: static;
  }
  .matching-fields .two-fields {
    grid-template-columns: 1fr;
  }
  .candidate-controls select {
    max-width: 100%;
  }
}
