/* Каталог тестов: поиск, группы, карточки */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.tests-hub-shell { max-width: 980px; }

.tests-active-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 8px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ece8f6;
  box-shadow: 0 8px 24px rgba(40, 28, 78, .05);
}
.tests-active-back {
  font-weight: 700;
  font-size: .9rem;
  color: #5b46e8;
  text-decoration: none;
  white-space: nowrap;
}
.tests-active-back:hover { text-decoration: underline; }
.tests-active-now { flex: 1 1 180px; min-width: 0; }
.tests-active-now h1,
.tests-active-now b { display: block; font-size: 1.02rem; color: #1f1733; margin: 0; font-weight: 800; }
.tests-active-now small { color: #8b8798; font-size: .8rem; }
.tests-active-bar .secondary-button { margin-left: auto; }

.tests-catalog { margin: 0 0 22px; }
.tests-catalog.is-collapsed { display: none; }

.tests-hub-tools {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}
.tests-hub-search {
  display: block;
  position: relative;
}
.tests-hub-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px 13px 42px;
  border: 1px solid #e4dff2;
  border-radius: 14px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b8798' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.2-3.2'/></svg>") 14px 50% no-repeat;
  font: inherit;
  font-size: 1rem;
  color: #1f1733;
}
.tests-hub-search input:focus {
  outline: none;
  border-color: #5b46e8;
  box-shadow: 0 0 0 4px rgba(91, 70, 232, .14);
}

.tests-hub-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tests-hub-cat {
  appearance: none;
  border: 1px solid #e4dff2;
  background: #fff;
  color: #3d3750;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.tests-hub-cat em {
  font-style: normal;
  font-weight: 650;
  color: #8b8798;
  margin-left: 4px;
}
.tests-hub-cat:hover { border-color: #cfc6ee; }
.tests-hub-cat.is-on {
  background: #5b46e8;
  border-color: #5b46e8;
  color: #fff;
}
.tests-hub-cat.is-on em { color: rgba(255,255,255,.82); }

.tests-hub-meta {
  margin: 0 0 12px;
  font-size: .82rem;
  color: #8b8798;
}

.tests-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .tests-hub-grid { grid-template-columns: 1fr 1fr; }
}

.tests-hub-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ece8f6;
  text-decoration: none;
  color: inherit;
  min-height: 92px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tests-hub-card:hover {
  border-color: #cfc6ee;
  box-shadow: 0 10px 24px rgba(40, 28, 78, .08);
  transform: translateY(-1px);
}
.tests-hub-card.is-active {
  border-color: #5b46e8;
  box-shadow: 0 0 0 3px rgba(91, 70, 232, .16);
}
.tests-hub-card.is-hidden { display: none; }
.tests-hub-card-icon {
  display: inline-flex;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: 12px;
  background: #f5f2ff;
  font-size: 1.2rem;
}
.tests-hub-card-copy { min-width: 0; }
.tests-hub-card-copy b {
  display: block;
  font-size: .98rem;
  line-height: 1.3;
  color: #1f1733;
}
.tests-hub-card-copy small {
  display: block;
  margin: 3px 0 6px;
  color: #8b8798;
  font-size: .75rem;
}
.tests-hub-card-copy em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: normal;
  font-size: .84rem;
  line-height: 1.4;
  color: #5c566c;
}

.tests-hub-empty {
  margin: 8px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: #f7f5fb;
  color: #5c566c;
  text-align: center;
}

@media (max-width: 639px) {
  .tests-hub-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .tests-hub-cat { flex: 0 0 auto; }
  .tests-active-bar .secondary-button {
    margin-left: 0;
    width: 100%;
  }
}

.tests-seo {
  margin: 28px 0 8px;
  padding: 22px 20px 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ece8f6;
}
.tests-seo-kicker {
  margin: 0 0 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5b46e8;
}
.tests-seo > h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #1f1733;
}
.tests-seo-lead {
  max-width: 62ch;
  line-height: 1.65;
  color: #3d3750;
}
.tests-seo-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
  padding: 0;
}
.tests-seo-facts div {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f5ff;
  border: 1px solid #e4dbf7;
}
.tests-seo-facts dt {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #5c3be8;
}
.tests-seo-facts dd {
  margin: 4px 0 0;
  font-size: .92rem;
  line-height: 1.45;
  color: #2a2540;
}
.tests-seo section {
  margin: 1.35rem 0;
  max-width: 66ch;
}
.tests-seo section h3 {
  margin: 0 0 .45rem;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #1f1733;
}
.tests-seo section p {
  margin: 0 0 .7rem;
  line-height: 1.65;
  color: #3d3750;
}
.tests-seo a { font-weight: 700; }
