:root{
  --chip-primary:#5B3192;   /* единый фирменный цвет */
  --chip-text-on:#fff;      /* текст на заливке */
  --chip-fs: 14px;
  --chip-lh: 16px;
}

.rst-content p.tags{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.5rem .6rem;
  margin:.25rem 0 1.25rem;   /* top 0.25rem | right/left 0 | bottom 1.25rem */
  /* font-family:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important; */
}

.rst-content p.tags > span:first-child{ margin-right:.4rem; white-space:nowrap; }
.rst-content p.tags > span:not(:first-child){ display:none; }

.rst-content p.tags > a.reference.external{
  display:inline-flex; align-items:center;
  padding:.42rem .9rem;
  border:1.9px solid var(--chip-primary);
  border-radius:9999px;
  background:#fff;
  color:var(--chip-primary) !important;
  text-decoration:none;
  font-weight:400; font-size:16px; line-height:1.1; letter-spacing:.015em;
  cursor:pointer;
  transition:background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.rst-content p.tags > a.reference.external:hover,
.rst-content p.tags > a.reference.external:focus-visible{
  background:var(--chip-primary);
  color:var(--chip-text-on) !important;
  border-color:var(--chip-primary);
  box-shadow:0 4px 14px rgba(91,49,146,.22);
  outline:none;
}

/*
.rst-content p.tags > a.reference.external{
  font-size: var(--chip-fs) !important;
  line-height: var(--chip-lh) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  vertical-align: middle;
}
*/
