.page-knowledge .main {
  background: #f4f6f8;
}

.hero-community--knowledge .hero-community__lead {
  max-width: 670px;
}

.knowledge-catalog {
  background: #f4f6f8;
  color: #222325;
}

.knowledge-catalog__inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 54px;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 80px 50px 128px;
}

.knowledge-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
  min-width: 0;
  max-width: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid #e5e8ec;
}

.knowledge-search {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid #d9dde2;
  color: #7c838b;
}

.knowledge-search__icon {
  flex: 0 0 auto;
  margin-right: 12px;
}

.knowledge-search__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 28px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222325;
  font: inherit;
  font-size: 15px;
}

/* У type=search WebKit рисует собственный крестик. На странице уже есть
   доступная кнопка очистки, поэтому оставляем только её. */
.knowledge-search__input::-webkit-search-cancel-button,
.knowledge-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.knowledge-search__input::placeholder {
  color: #8a8e92;
}

.knowledge-search__clear {
  position: absolute;
  right: 0;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #737a82;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.knowledge-topics {
  margin-top: 30px;
}

.knowledge-topics__title {
  margin: 0 0 12px;
  color: #222325;
  font-size: 15px;
  font-weight: 600;
}

.knowledge-topics__list {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 4px;
}

.knowledge-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #5f656c;
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}

.knowledge-topic:hover {
  color: #1746bd;
  background: #f3f6fc;
}

.knowledge-topic.is-active {
  color: #fff;
  background: #1746bd;
}

.knowledge-topic__count {
  display: inline-block;
  min-width: 0;
  height: auto;
  padding: 0;
  background: transparent;
  color: #777e86;
  font-size: 12px;
}

.knowledge-topic.is-active .knowledge-topic__count {
  background: transparent;
  color: #fff;
}

.knowledge-topics-mobile {
  display: none;
}

.knowledge-results {
  min-width: 0;
}

.knowledge-results__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.knowledge-results__title {
  max-width: 740px;
  margin: 0;
  color: #222325;
  font-size: clamp(32px, 3.05vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.knowledge-results__count {
  flex: 0 0 auto;
  margin: 0 0 5px;
  color: #7a8087;
  font-size: 14px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.knowledge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 510px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e7eb;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, background-color .35s ease;
}

.knowledge-card:hover,
.knowledge-card:focus-within {
  z-index: 1;
  transform: translateY(-4px);
  border-color: #0c3eb3;
  background-color: #0c3eb3;
  box-shadow: 0 18px 40px rgba(25, 39, 72, .1);
}

.knowledge-card[hidden] {
  display: none !important;
}

.knowledge-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  min-height: 380px;
}

.knowledge-card__link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.knowledge-card__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.knowledge-card__visual {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  background: #0b2f88;
  isolation: isolate;
}

.knowledge-card--featured .knowledge-card__visual {
  min-height: 100%;
}

.knowledge-card__visual::before,
.knowledge-detail__cover--generated::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .42;
  background-image:
    linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(120deg, #000, transparent 82%);
}

.knowledge-card__visual::after,
.knowledge-detail__cover--generated::after {
  content: '';
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  right: -12%;
  bottom: -38%;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .05), 0 0 0 68px rgba(255, 255, 255, .04);
}

.knowledge-card__visual--tone-2 { background: #0c4e72; }
.knowledge-card__visual--tone-3 { background: #243d9c; }
.knowledge-card__visual--tone-4 { background: #075b69; }
.knowledge-card__visual--tone-5 { background: #344482; }

.knowledge-card__visual--picture::before,
.knowledge-card__visual--picture::after {
  display: none;
}

.knowledge-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.knowledge-card__visual-label {
  position: absolute;
  left: 26px;
  bottom: 24px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
}

.knowledge-card__visual-orbit {
  position: absolute;
  top: 22%;
  left: 50%;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 50%;
  transform: translateX(-50%) rotate(-18deg) scaleY(.42);
}

.knowledge-card__visual-orbit::before,
.knowledge-card__visual-orbit::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 50%;
  transform: rotate(60deg);
}

.knowledge-card__visual-orbit::after {
  transform: rotate(-60deg);
}

.knowledge-card__visual-node {
  position: absolute;
  top: calc(22% + 60px);
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 42px 12px 0 -2px rgba(255, 255, 255, .8), -46px 12px 0 -2px rgba(255, 255, 255, .8);
}

.knowledge-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 25px 27px 24px;
  background-color: #fff;
  transition: background-color .35s ease;
}

.knowledge-card:hover .knowledge-card__body,
.knowledge-card:focus-within .knowledge-card__body {
  background-color: #0c3eb3;
}

.knowledge-card--featured .knowledge-card__body {
  padding: 38px 38px 32px;
}

.knowledge-card__topics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 27px;
  margin-bottom: 18px;
}

.knowledge-card__topic {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  background: #f1f3f6;
  color: #737980;
  font-size: 12px;
  line-height: 1.2;
  transition: color .35s ease, background-color .35s ease;
}

.knowledge-card:hover .knowledge-card__topic,
.knowledge-card:focus-within .knowledge-card__topic {
  background-color: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .78);
}

.knowledge-card__title {
  margin: 0;
  color: #222325;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.025em;
  transition: color .35s ease;
}

.knowledge-card:hover .knowledge-card__title,
.knowledge-card:focus-within .knowledge-card__title {
  color: #fff;
}

.knowledge-card--featured .knowledge-card__title {
  font-size: clamp(30px, 2.5vw, 42px);
}

.knowledge-card__preview {
  margin: 17px 0 0;
  color: #6b7178;
  font-size: 15px;
  line-height: 1.48;
  transition: color .35s ease;
}

.knowledge-card:hover .knowledge-card__preview,
.knowledge-card:focus-within .knowledge-card__preview {
  color: rgba(255, 255, 255, .72);
}

.knowledge-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  color: #8a8e92;
  font-size: 13px;
  transition: color .35s ease;
}

.knowledge-card:hover .knowledge-card__meta,
.knowledge-card:focus-within .knowledge-card__meta {
  color: rgba(255, 255, 255, .68);
}

.knowledge-card__meta > span + time::before {
  content: '·';
  margin-right: 12px;
}

.knowledge-card__arrow {
  margin-left: auto;
  color: #1746bd;
  font-size: 24px;
  line-height: 1;
  transition: color .35s ease, transform .35s ease;
}

.knowledge-card:hover .knowledge-card__arrow,
.knowledge-card:focus-within .knowledge-card__arrow {
  color: #fff;
  transform: translate(2px, -2px) rotate(-45deg);
}

.knowledge-more {
  display: block;
  min-width: 246px;
  min-height: 54px;
  margin: 40px auto 0;
  padding: 14px 28px;
  border: 1px solid #1746bd;
  background: transparent;
  color: #1746bd;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}

.knowledge-more:hover {
  background: #1746bd;
  color: #fff;
}

.knowledge-more[hidden] {
  display: none;
}

.knowledge-empty {
  margin: 0;
  padding: 56px 30px;
  background: #fff;
  border: 1px solid #e4e7eb;
  color: #6b7178;
  text-align: center;
  font-size: 16px;
}

.knowledge-empty[hidden] {
  display: none;
}

@media (max-width: 1200px) {
  .knowledge-catalog__inner {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 32px;
    padding: 64px 32px 104px;
  }

  .knowledge-card--featured {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 943px) {
  .knowledge-catalog__inner {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 52px;
  }

  .knowledge-sidebar {
    position: static;
  }

  .knowledge-topics__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .knowledge-card--featured {
    grid-template-columns: 1fr;
  }

  .knowledge-card--featured .knowledge-card__visual {
    min-height: 300px;
  }
}

@media (max-width: 687px) {
  .hero-community--knowledge .hero-community__lead {
    max-width: 100%;
  }

  .knowledge-catalog__inner {
    gap: 36px;
    padding: 40px 16px 80px;
  }

  .knowledge-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .knowledge-search {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border-bottom: 1px solid #e3e5e8;
    background: #fff;
  }

  .knowledge-topics {
    margin-top: 0;
  }

  .knowledge-topics__list {
    display: none;
  }

  .knowledge-topics__title {
    display: none;
  }

  .knowledge-topics-mobile {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    padding: 15px;
    border-radius: 2px;
    background: #fff;
  }

  .knowledge-topics-mobile__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #212123;
    text-align: left;
    font: inherit;
    font-size: 14px;
    line-height: 1.25;
    cursor: pointer;
  }

  .knowledge-topics-mobile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    padding: 4.5px;
    border-radius: 74px;
    color: #8a8e92;
    transition: color .2s ease;
  }

  .knowledge-topics-mobile__icon img {
    display: none;
    width: 10px;
    height: 5px;
  }

  .knowledge-topics-mobile__icon::before {
    content: '';
    width: 10px;
    height: 5px;
    background-color: currentColor;
    -webkit-mask: url('../../img/icon-chevron-dark.svg') center / 10px 5px no-repeat;
    mask: url('../../img/icon-chevron-dark.svg') center / 10px 5px no-repeat;
    transition: transform .2s ease;
  }

  .knowledge-topics-mobile__toggle:hover .knowledge-topics-mobile__icon,
  .knowledge-topics-mobile__toggle:focus-visible .knowledge-topics-mobile__icon,
  .knowledge-topics-mobile.is-open .knowledge-topics-mobile__icon {
    color: #1746bd;
  }

  .knowledge-topics-mobile.is-open .knowledge-topics-mobile__icon::before {
    transform: rotate(-180deg);
  }

  .knowledge-topics-mobile__body {
    display: grid;
    gap: 8px;
    width: 100%;
    max-height: 310px;
    margin-top: 12px;
    padding-top: 12px;
    overflow-y: auto;
    border-top: 1px solid #e3e5e8;
  }

  .knowledge-topics-mobile__body[hidden] {
    display: none;
  }

  .knowledge-topics-mobile__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 42px;
    padding: 9px 8px;
    border: 0;
    background: transparent;
    color: #5f656c;
    text-align: left;
    font: inherit;
    font-size: 14px;
    line-height: 1.25;
    cursor: pointer;
  }

  .knowledge-topics-mobile__option:hover,
  .knowledge-topics-mobile__option:focus-visible {
    background: #f3f6fc;
    color: #1746bd;
    outline: 0;
  }

  .knowledge-topics-mobile__option.is-selected {
    background: #f3f6fc;
    color: #1746bd;
    font-weight: 600;
  }

  .knowledge-results__head {
    display: block;
    margin-bottom: 24px;
  }

  .knowledge-results__title {
    font-size: 32px;
  }

  .knowledge-results__count {
    margin-top: 14px;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .knowledge-card,
  .knowledge-card--featured {
    grid-column: auto;
    min-height: 0;
  }

  .knowledge-card__visual,
  .knowledge-card--featured .knowledge-card__visual {
    min-height: 220px;
  }

  .knowledge-card__body,
  .knowledge-card--featured .knowledge-card__body {
    padding: 22px 20px 21px;
  }

  .knowledge-card__title,
  .knowledge-card--featured .knowledge-card__title {
    font-size: 24px;
  }

  .knowledge-card__preview {
    font-size: 14px;
  }

  .knowledge-more {
    width: 100%;
    margin-top: 28px;
  }
}
