/* Transparencia algorítmica: resumen de cada sistema, preguntas frecuentes y ficha del CPLT. */
.algo-system { padding: 2.5rem 0 3rem; }

.algo-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  margin-bottom: 2.5rem;
  border: 1px solid var(--pm-line);
  border-left: 4px solid var(--pm-gold-500);
  border-radius: 0 18px 18px 0;
  background: var(--pm-navy-850);
}
.algo-summary__title { margin-bottom: .6rem; color: var(--pm-gold-400); font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
.algo-summary__lead { max-width: 62ch; color: var(--pm-text); line-height: 1.7; }
.algo-summary__avatar { flex: none; width: clamp(96px, 14vw, 160px); height: auto; }
.algo-summary__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.algo-link { color: var(--pm-gold-400); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.algo-link:hover { color: var(--pm-gold-300); }

.algo-facts { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.2rem 0 0; list-style: none; }
.algo-facts li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .85rem;
  border: 1px solid var(--pm-line);
  border-radius: 999px;
  background: var(--pm-navy-800);
  color: var(--pm-text);
  font-size: .88rem;
}
.algo-facts i { color: var(--pm-gold-400); }

.algo-faq { margin-bottom: 2rem; }
.algo-question { border-bottom: 1px solid var(--pm-line); }
.algo-question summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  color: var(--pm-text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.algo-question summary::-webkit-details-marker { display: none; }
.algo-question summary::after {
  content: "+";
  position: absolute;
  top: .75rem;
  right: .25rem;
  color: var(--pm-gold-400);
  font-size: 1.4rem;
  line-height: 1;
}
.algo-question[open] summary::after { content: "−"; }
.algo-question summary:focus-visible { outline: 3px solid var(--pm-gold-500); outline-offset: 2px; }
.algo-question__body { padding: 0 0 1.1rem; color: var(--pm-text-soft); line-height: 1.7; max-width: 80ch; }
.algo-question__body p { margin-bottom: .6rem; }
.algo-question__body ol, .algo-question__body ul { margin: 0; padding-left: 1.3rem; }
.algo-question__body li + li { margin-top: .4rem; }

.algo-contact {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  background: var(--pm-navy-850);
}
.algo-contact > i { color: var(--pm-gold-400); font-size: 1.6rem; }
.algo-contact h3 { margin-bottom: .3rem; color: var(--pm-text); font-size: 1.05rem; font-weight: 700; }
.algo-contact p { margin: 0; color: var(--pm-text-soft); overflow-wrap: anywhere; }
.algo-contact a { color: var(--pm-gold-400); text-decoration: underline; text-underline-offset: .2em; }

.algo-record__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.algo-record__head > p { max-width: 40ch; color: var(--pm-text-soft); font-size: .9rem; }

.algo-table-wrap { margin-bottom: 2rem; }
.algo-table { width: 100%; border-collapse: collapse; color: var(--pm-text); font-size: .93rem; }
.algo-table caption {
  caption-side: top;
  padding: 0 0 .75rem;
  color: var(--pm-gold-400);
  font-size: 1.15rem;
  font-weight: 700;
}
.algo-table caption span {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-right: .4rem;
  border-radius: 50%;
  background: var(--pm-gold-500);
  color: var(--pm-navy-900);
  font-size: .9rem;
}
.algo-table th, .algo-table td { padding: .75rem 1rem; border: 1px solid var(--pm-line); vertical-align: top; text-align: left; }
.algo-table thead th { background: var(--pm-navy-800); color: var(--pm-text-soft); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.algo-table tbody th { width: 38%; font-weight: 600; }
.algo-table td { color: var(--pm-text-soft); line-height: 1.6; overflow-wrap: anywhere; }
.algo-table td a { color: var(--pm-gold-400); }
.algo-table__group th { background: var(--pm-navy-850); color: var(--pm-gold-300); font-size: .85rem; letter-spacing: .04em; }

.algo-source { padding: 0 0 4rem; }
.algo-source .container { display: flex; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--pm-line); color: var(--pm-text-soft); font-size: .9rem; }
.algo-source i { color: var(--pm-gold-400); font-size: 1.3rem; }
.algo-source p { margin: 0; max-width: 90ch; }
.algo-source a { color: var(--pm-gold-400); text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 767.98px) {
  .algo-summary { flex-direction: column-reverse; align-items: flex-start; }
  .algo-record__head { display: block; }
  /* La tabla pasa a filas apiladas: campo arriba, información abajo */
  .algo-table thead { display: none; }
  .algo-table, .algo-table tbody, .algo-table tr, .algo-table th, .algo-table td { display: block; width: 100%; }
  .algo-table tbody th { width: 100%; border-bottom: 0; }
  .algo-table td { border-top: 0; }
}
