/*
 * Бизнес-энциклопедия KESHER.PRO
 *
 * Этот файл подключается после app.min.css.
 * Здесь находятся только собственные стили энциклопедии.
 */

:root {
  --knowledge-primary: #3f87f5;
  --knowledge-primary-hover: #2f73db;

  --knowledge-text: #2a2a2a;
  --knowledge-text-secondary: #72849a;
  --knowledge-border: #edf2f9;

  --knowledge-background: #f7f9fc;
  --knowledge-surface: #ffffff;

  --knowledge-container-width: 1560px;
  --knowledge-content-width: 1200px;

  --knowledge-radius: 12px;
  --knowledge-shadow: 0 8px 24px rgba(18, 38, 63, 0.06);
}

/*
 * Шрифт иконок Anticon.
 *
 * app.min.css содержит классы вида .anticon-*,
 * но браузеру нужен сам шрифт по корректному URL.
 */
@font-face {
  font-family: 'anticon';
  src:
    url('/knowledge/assets/fonts/anticon.eot');

  src:
    url('/knowledge/assets/fonts/anticon.eot?#iefix')
      format('embedded-opentype'),
    url('/knowledge/assets/fonts/anticon.woff')
      format('woff'),
    url('/knowledge/assets/fonts/anticon.ttf')
      format('truetype'),
    url('/knowledge/assets/fonts/anticon.svg#anticon')
      format('svg');

  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/*
 * Базовые правила для иконок.
 */
.anticon {
  display: inline-block;
  font-family: 'anticon' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  line-height: 1;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  speak: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Общая страница */

html {
  scroll-behavior: smooth;
}

.knowledge-body {
  min-width: 320px;
  margin: 0;
  color: var(--knowledge-text);
  background: var(--knowledge-background);
  font-family:
    'Poppins',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* Общий контейнер */

.knowledge-container {
  width: min(
    calc(100% - 32px),
    var(--knowledge-container-width)
  );
  margin: 0 auto;
}

/* Базовая типографика */

.knowledge-body h1,
.knowledge-body h2,
.knowledge-body h3,
.knowledge-body h4,
.knowledge-body h5,
.knowledge-body h6 {
  color: var(--knowledge-text);
  font-weight: 500;
  line-height: 1.3;
}

.knowledge-body h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.knowledge-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.knowledge-body h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.knowledge-body p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.knowledge-body a {
  color: var(--knowledge-primary);
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.knowledge-body a:hover {
  color: var(--knowledge-primary-hover);
  text-decoration: none;
}

.knowledge-body a:focus-visible {
  outline: 3px solid rgba(63, 135, 245, 0.25);
  outline-offset: 3px;
  border-radius: 4px;
}

.knowledge-body img {
  max-width: 100%;
  height: auto;
}

/* Основное содержимое */

/*
 * Одинаковый верхний отступ
 * для страницы содержания и страниц статей.
 */
.knowledge-main {
  min-height: 60vh;
  padding: 20px 0 80px;
}

/* Общая белая поверхность */

.knowledge-panel {
  padding: 32px;
  background: var(--knowledge-surface);
  border: 1px solid var(--knowledge-border);
  border-radius: var(--knowledge-radius);
  box-shadow: var(--knowledge-shadow);
}

/* Служебный текст */

.knowledge-eyebrow {
  margin-bottom: 8px;
  color: var(--knowledge-primary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-description {
  max-width: 760px;
  color: var(--knowledge-text-secondary);
  font-size: 1.05rem;
}

/* Адаптивность */

@media (max-width: 767px) {
  .knowledge-container {
    width: min(calc(100% - 24px), var(--knowledge-container-width));
  }

  .knowledge-main {
    padding: 14px 0 56px;
  }

  .knowledge-panel {
    padding: 22px;
    border-radius: 10px;
  }
}


/* ==========================================================================
 * Страница содержания
 * ======================================================================== */

.knowledge-index .knowledge-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 24px;
}

.knowledge-index .knowledge-breadcrumbs {
  margin-bottom: -10px;
}

/* Главный блок */

.knowledge-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 48px 32px;
  background:
    linear-gradient(
      135deg,
      rgba(76, 205, 231, 0.14) 0%,
      rgba(255, 255, 255, 0.96) 48%,
      rgba(167, 225, 129, 0.12) 100%
    ),
    #ffffff;
  border: 1px solid #dceafd;
  border-radius: 22px;
  box-shadow: var(--knowledge-shadow);
}

.knowledge-hero::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  content: '';
  background: rgba(63, 135, 245, 0.06);
  border-radius: 50%;
}

.knowledge-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  padding-right: 180px;
}

.knowledge-hero h1 {
  max-width: none;
  margin-bottom: 12px;
}

.knowledge-hero .knowledge-description {
  max-width: 1200px;
  margin-bottom: 0;
  font-size: 1.05rem;
}


/* Содержание */

.knowledge-toc {
  padding: 32px;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 20px;
  box-shadow: var(--knowledge-shadow);
}

.knowledge-toc-header {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 28px;
  text-align: center;
}

.knowledge-toc-header h2 {
  margin-bottom: 0;
}

.knowledge-toc-header > p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--knowledge-text-secondary);
  font-size: 0.95rem;
}

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

.knowledge-body .knowledge-toc-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  color: #475467;
  background: #f8fbff;
  border: 1px solid #e3eefc;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.knowledge-body button.knowledge-toc-link {
  width: 100%;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.knowledge-body .knowledge-toc-link.is-active {
  color: #096dd9;
  background:
    linear-gradient(
      135deg,
      rgba(63, 135, 245, 0.16),
      rgba(83, 197, 235, 0.08)
    ),
    #f3f9ff;
  border-color: #91caff;
}

.knowledge-toc-title {
  color: #14213d;
  font-weight: 600;
}

.knowledge-body .knowledge-toc-link:hover {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #abd4fb;
  text-decoration: none;
  transform: translateY(-1px);
}

.knowledge-toc-number {
  color: #096dd9;
  font-size: 12px;
  font-weight: 600;
}

.knowledge-toc-link .anticon {
  color: #096dd9;
  font-size: 15px;
}

/* Разделы */

.knowledge-sections {
  display: grid;
  gap: 24px;
}

.knowledge-section-card {
  padding: 26px;
  scroll-margin-top: 100px;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 18px;
  box-shadow: var(--knowledge-shadow);
}

.knowledge-section-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf2f9;
}

.knowledge-section-heading {
  min-width: 0;
}

.knowledge-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}

.knowledge-toggle-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 12px;
  color: #096dd9;
  background: #f3f9ff;
  border: 1px solid #cfe4fb;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.knowledge-toggle-all:hover {
  background: #eaf5ff;
  border-color: #91caff;
}

.knowledge-toggle-all .anticon {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.knowledge-toggle-all.is-open .anticon {
  transform: rotate(180deg);
}

.knowledge-section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #096dd9;
  background: #f3f9ff;
  border: 1px solid #cfe4fb;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}

.knowledge-section-header h2 {
  margin-bottom: 6px;
}

.knowledge-section-header .knowledge-description {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Тематические категории продукта */

.knowledge-categories {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.knowledge-category {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
}

.knowledge-category-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height:50px;
  padding: 11px 16px;

  color: #0f2a4a;

  background:
    linear-gradient(
      120deg,
      rgba(63, 135, 245, 0.18) 0%,
      rgba(83, 197, 235, 0.12) 52%,
      rgba(167, 225, 129, 0.18) 100%
    ),
    #f7fbff;

  cursor: pointer;
  list-style: none;
}

.knowledge-category-header::-webkit-details-marker {
  display: none;
}

.knowledge-category-title {
  min-width: 0;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.4;
}

.knowledge-category-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 0.76rem;
  white-space: nowrap;
}

.knowledge-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: #096dd9;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #b9dafb;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}

.knowledge-category-icon {
  margin-left: 5px;
  color: #096dd9;
  font-size: 13px;
  transition: transform 0.2s ease;
}

.knowledge-category[open]
  .knowledge-category-header {
  color: #0f2a4a;

  background:
    linear-gradient(
      135deg,
      rgba(76, 205, 231, 0.18) 0%,
      rgba(255, 255, 255, 0.96) 48%,
      rgba(167, 225, 129, 0.18) 100%
    ),
    #ffffff;

  border-bottom: 1px solid #d8e6ef;
}

.knowledge-category-content {
  padding: 14px;
  background: #fcfcfc;
  border-top: 0;
}

.knowledge-category-content
  .knowledge-article-groups {
  margin-top: 0;
}

.knowledge-category-title {
  color: #14213d;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Группы статей по типу материала */

/*
 * Две независимые колонки.
 *
 * Распределение блоков между ними выполняется
 * в index.astro с учётом количества статей.
 */
.knowledge-article-groups {
  columns: 3;
  column-gap: 12px;
  margin-top: 0;
}

.knowledge-article-group {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  overflow: hidden;

  background: #ffffff;
  border: 1px solid #e1e9f3;
  border-radius: 10px;
  box-shadow: none;

  break-inside: avoid;
  page-break-inside: avoid;
}

.knowledge-article-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 9px 14px;

  background:
    linear-gradient(
      135deg,
      rgba(63, 135, 245, 0.16) 0%,
      rgba(83, 197, 235, 0.11) 55%,
      rgba(63, 135, 245, 0.08) 100%
    ),
    #f4f8ff;

  border-bottom: 1px solid #cfe0f5;
}

.knowledge-article-group-header h3 {
  margin: 0;
  color: #0f2a4a;
  font-size: 0.9rem;
  font-weight: 600;
}

.knowledge-article-group-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: #096dd9;
  background: #f3f9ff;
  border: 1px solid #cfe4fb;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* Компактный вертикальный список статей */

.knowledge-article-list {
  padding: 6px 0;
  margin: 0;
  list-style: none;
}

.knowledge-article-list li {
  margin: 0;
}

.knowledge-article-list li + li {
  border-top: 0;
}

.knowledge-body .knowledge-article-list-link {
  display: block;
  min-height: 0;
  padding: 8px 14px;
  color: #344054;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.knowledge-body .knowledge-article-list-link:hover {
  color: #096dd9;
  background: #f7fbff;
  text-decoration: none;
}

.knowledge-article-list-link > span {
  min-width: 0;
}

.knowledge-article-list-link .anticon {
  color: #096dd9;
  font-size: 15px;
}

/* Адаптивность */
@media (max-width: 1199px) {
  .knowledge-article-groups {
    columns: 2;
  }
}

@media (max-width: 991px) {
  .knowledge-toc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (max-width: 1199px) {
    .knowledge-article-groups {
      columns: 1;
    }
  }
}

@media (max-width: 767px) {
  .knowledge-article-groups {
    gap: 10px;
    margin-top: 22px;
  }

  .knowledge-article-groups {
    columns: 1;
    column-gap: 0;
  }

  .knowledge-article-group {
    border-radius: 16px;
  }

  .knowledge-article-group-header {
    min-height: 40px;
    padding: 8px 12px;
  }

  .knowledge-body .knowledge-article-list-link {
    min-height: 50px;
    padding: 8px 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 767px) {
  .knowledge-hero {
    padding: 22px 22px 26px;
    border-radius: 18px;
  }

  .knowledge-toc {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .knowledge-toc-header {
    display: grid;
    gap: 10px;
  }

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

  .knowledge-section-card {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .knowledge-section-header {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 22px;
  }

  .knowledge-section-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .knowledge-toggle-all {
    width: 100%;
  }

  .knowledge-section-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 14px;
  }

  .knowledge-article-card {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .knowledge-categories {
    gap: 10px;
    margin-top: 16px;
  }

  .knowledge-category {
    border-radius: 16px;
  }

  .knowledge-category-header {
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
  }

  .knowledge-category-title {
    font-size: 0.93rem;
  }

  .knowledge-category-count-label {
    display: none;
  }

  .knowledge-category-content {
    padding: 10px;
  }

  .knowledge-article-groups {
    margin-top: 0;
  }
}
/* Страница статьи */

.knowledge-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #72849a;
  font-size: 0.86rem;
  line-height: 1.4;
}

.knowledge-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #72849a;
  text-decoration: none;
}

.knowledge-breadcrumbs a:hover {
  color: var(--knowledge-primary);
  text-decoration: none;
}

.knowledge-breadcrumbs .anticon {
  color: #72849a;
  font-size: 13px;
}

.knowledge-breadcrumb-separator {
  color: #a8b3c2;
  font-size: 1rem;
}

.knowledge-article {
  overflow: hidden;
  background: var(--knowledge-surface);
  border: 1px solid #dceafd;
  border-radius: 22px;
  box-shadow: var(--knowledge-shadow);
}

.knowledge-article-header {
  position: relative;
  overflow: hidden;
  padding: 28px 48px 32px;
  background:
    linear-gradient(
      135deg,
      rgba(76, 205, 231, 0.14) 0%,
      rgba(255, 255, 255, 0.96) 48%,
      rgba(167, 225, 129, 0.12) 100%
    ),
    #ffffff;
  border-bottom: 1px solid #dceafd;
}

.knowledge-article-header::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  content: '';
  background: rgba(63, 135, 245, 0.06);
  border-radius: 50%;
}

.knowledge-article-header-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  padding-right: 180px;
}

.knowledge-article-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

/*
 * Тип статьи: практическое руководство,
 * инструкция, обзор и другие форматы.
 */
.knowledge-article-type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  color: #475467;
  background: rgba(63, 135, 245, 0.08);
  border: 1px solid rgba(63, 135, 245, 0.18);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.knowledge-article-section {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  margin: 0;
  color: #087f8c;
  background: rgba(83, 211, 222, 0.14);
  border: 1px solid rgba(83, 211, 222, 0.2);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}

/*
 * Тематическая секция статьи внутри продукта:
 * например «Финансовый и управленческий учет».
 */
.knowledge-article-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  color: #315b82;
  background: rgba(63, 135, 245, 0.1);
  border: 1px solid rgba(63, 135, 245, 0.22);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.knowledge-article-header h1 {
  max-width: none;
  margin-bottom: 12px;
  color: #14213d;
}

.knowledge-article-header .knowledge-description {
  max-width: 1200px;
  margin-bottom: 0;
}


.knowledge-article-cover {
  margin: 0;
  border-bottom: 1px solid var(--knowledge-border);
}

.knowledge-article-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.knowledge-article-content {
  max-width: var(--knowledge-content-width);
  padding: 40px 48px 56px;
  margin: 0 auto;
}

/* Заголовки внутри Markdown */

.knowledge-article-content h2 {
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.knowledge-article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.knowledge-article-content h4 {
  margin-top: 1.6rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.knowledge-article-content > :first-child {
  margin-top: 0;
}

.knowledge-article-content > :last-child {
  margin-bottom: 0;
}

/* Абзацы и списки */

.knowledge-article-content p,
.knowledge-article-content ul,
.knowledge-article-content ol {
  margin-bottom: 1.25rem;
}

.knowledge-article-content ul,
.knowledge-article-content ol {
  padding-left: 1.5rem;
}

.knowledge-article-content li {
  margin-bottom: 0.45rem;
}

.knowledge-article-content strong {
  color: var(--knowledge-text);
  font-weight: 600;
}

/* Цитаты */

.knowledge-article-content blockquote {
  padding: 20px 24px;
  margin: 1.75rem 0;
  color: var(--knowledge-text-secondary);
  background: rgba(63, 135, 245, 0.06);
  border-left: 4px solid var(--knowledge-primary);
  border-radius: 0 8px 8px 0;
}

.knowledge-article-content blockquote > :last-child {
  margin-bottom: 0;
}

/* Код */

.knowledge-article-content code {
  padding: 0.15em 0.4em;
  color: #c7254e;
  background: #f7f7f9;
  border: 1px solid var(--knowledge-border);
  border-radius: 4px;
  font-size: 0.92em;
}

.knowledge-article-content pre {
  overflow-x: auto;
  padding: 20px;
  margin: 1.75rem 0;
  color: #f8f8f2;
  background: #1f2937;
  border-radius: 10px;
}

.knowledge-article-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

/* Изображения внутри Markdown */

.knowledge-article-content img {
  display: block;
  margin: 1.75rem auto;
  border: 1px solid var(--knowledge-border);
  border-radius: 10px;
}

/* Таблицы */

.knowledge-article-content table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  background: var(--knowledge-surface);
}

.knowledge-article-content th,
.knowledge-article-content td {
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--knowledge-border);
}

.knowledge-article-content th {
  font-weight: 600;
  background: var(--knowledge-background);
}

/* Разделитель */

.knowledge-article-content hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--knowledge-border);
}

/* Нижняя навигация */

.knowledge-article-footer {
  padding-top: 4px;
}

.knowledge-article-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--knowledge-text);
  background: var(--knowledge-surface);
  border: 1px solid var(--knowledge-border);
  border-radius: 8px;
}

.knowledge-article-footer a:hover {
  color: var(--knowledge-primary);
  border-color: rgba(63, 135, 245, 0.35);
}

/* Адаптивность статьи */

@media (max-width: 767px) {

  .knowledge-article-header-content {
    padding-right: 0;
  }

  .knowledge-article-header .knowledge-description {
    max-width: none;
  }

.knowledge-article-header {
  padding: 22px 22px 26px;
}

  .knowledge-article-content {
    padding: 28px 22px 40px;
  }

  .knowledge-article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .knowledge-breadcrumbs {
  margin-bottom: 12px;
  font-size: 0.8rem;
}

}

@media (max-width: 767px) {
  .knowledge-article-header-top {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .knowledge-article-section,
  .knowledge-article-category,
  .knowledge-article-type {
    max-width: 100%;
    margin: 0;
    white-space: normal;
    line-height: 1.35;
  }
}

/* Общая структура страницы */

.knowledge-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.knowledge-page > .knowledge-main {
  flex: 1 0 auto;
}

/* ==========================================================================
 * Public header
 * ======================================================================== */

.public-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 5px 12px 0;
  background: transparent;
}

.public-header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;

  width: 100%;
  max-width: 1700px;
  min-height: 72px;
  padding: 8px 16px;
  margin: 0 auto;

  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(30, 70, 120, 0.055);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 300px;
  color: inherit;
  text-decoration: none;
}

.public-brand:hover {
  color: inherit;
  text-decoration: none;
}

.public-brand-logo-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 58px;
  padding: 4px 12px;

  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 18px;
}

.public-brand-logo-full img {
  display: block;
  width: auto;
  height: 48px;
  max-width: none;
  object-fit: contain;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-nav-left {
  flex: 1 1 auto;
}

.public-nav-right {
  flex: 0 0 auto;
  margin-left: auto;
}

.knowledge-body .public-nav-link,
.knowledge-body .public-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 10px 13px;

  font-size: 14px;
  line-height: 1;
  text-decoration: none;

  border: 1px solid transparent;
  border-radius: 14px;

  transition:
    color 0.12s ease,
    background-color 0.12s ease,
    border-color 0.12s ease;
}

.knowledge-body .public-nav-link {
  color: #475467;
  font-weight: 500;
  background: #ffffff;
  border-color: #e3eefc;
}

.knowledge-body .public-nav-link .anticon {
  color: #475467;
  font-size: 17px;
  line-height: 1;
}

.knowledge-body .public-nav-link:hover,
.knowledge-body .public-nav-link:focus {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #cfe4fb;
  text-decoration: none;
}

.knowledge-body .public-nav-link:hover .anticon,
.knowledge-body .public-nav-link:focus .anticon {
  color: #096dd9;
}

.knowledge-body .public-nav-link.active {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #91caff;
}

.knowledge-body .public-nav-link.active .anticon {
  color: #096dd9;
}

.knowledge-body .public-login-btn {
  color: #ffffff;
  font-weight: 600;
  background: #1890ff;
  border-color: #1890ff;
}

.knowledge-body .public-login-btn .anticon {
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
}

.knowledge-body .public-login-btn:hover,
.knowledge-body .public-login-btn:focus {
  color: #ffffff;
  background: #0f7fe5;
  border-color: #0f7fe5;
  text-decoration: none;
}

.public-mobile-only {
  display: none;
}

.public-mobile-row {
  width: 100%;
  align-items: center;
  gap: 8px;
}

.public-mobile-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.public-mobile-logo {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 15px;
}

.public-mobile-logo img {
  display: block;
  width: 58px;
  height: 58px;
  max-width: none;
  object-fit: contain;
}

.knowledge-body .public-mobile-link,
.knowledge-body .public-mobile-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 40px;
  padding: 9px 11px;

  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;

  border-radius: 13px;
}

.knowledge-body .public-mobile-link {
  color: #475467;
  background: #ffffff;
  border: 1px solid #e3eefc;
}

.knowledge-body .public-mobile-link .anticon {
  color: #475467;
  font-size: 16px;
}

.knowledge-body .public-mobile-link:hover,
.knowledge-body .public-mobile-link:focus {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #cfe4fb;
}

.knowledge-body .public-mobile-login {
  color: #ffffff;
  background: #1890ff;
  border: 1px solid #1890ff;
}

.knowledge-body .public-mobile-login .anticon {
  color: #ffffff;
  font-size: 16px;
}

.knowledge-body .public-mobile-login:hover,
.knowledge-body .public-mobile-login:focus {
  color: #ffffff;
  background: #0f7fe5;
  border-color: #0f7fe5;
}

.public-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  padding: 0;
  margin-left: auto;

  color: #ffffff;
  background: #1890ff;
  border: 1px solid #1890ff;
  border-radius: 15px;
}

.public-menu-btn:hover,
.public-menu-btn:focus {
  color: #ffffff;
  background: #0f7fe5;
  border-color: #0f7fe5;
}

.public-menu-btn .anticon {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.public-mobile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 10px;
  z-index: 1001;

  width: min(320px, calc(100vw - 28px));
  padding: 10px;

  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(30, 70, 120, 0.08);
}

.public-mobile-dropdown[hidden] {
  display: none;
}

.knowledge-body .public-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 44px;
  padding: 11px 12px;

  color: #475467;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;

  border-radius: 14px;
}

.knowledge-body .public-dropdown-item .anticon {
  color: #475467;
  font-size: 16px;
  line-height: 1;
}

.knowledge-body .public-dropdown-item:hover,
.knowledge-body .public-dropdown-item:focus {
  color: #096dd9;
  background: #f3f9ff;
  text-decoration: none;
}

.knowledge-body .public-dropdown-item:hover .anticon,
.knowledge-body .public-dropdown-item:focus .anticon {
  color: #096dd9;
}

.knowledge-body .public-dropdown-item.primary {
  color: #ffffff;
  font-weight: 600;
  background: #1890ff;
}

.knowledge-body .public-dropdown-item.primary .anticon {
  color: #ffffff;
}

.knowledge-body .public-dropdown-item.primary:hover,
.knowledge-body .public-dropdown-item.primary:focus {
  color: #ffffff;
  background: #0f7fe5;
}

.public-dropdown-divider {
  height: 1px;
  margin: 8px 4px;
  background: #dceafd;
}

.public-header *,
.public-header *::before,
.public-header *::after {
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 767px) {
  .public-desktop-only {
    display: none;
  }

  .public-mobile-only {
    display: flex;
  }

  .public-header {
    padding: 4px 8px 0;
  }

  .public-header-shell {
    min-height: 56px;
    padding: 6px 8px;
    border-radius: 18px;
  }
}

@media (max-width: 390px) {
  .public-mobile-link span,
  .public-mobile-login span {
    display: none;
  }

  .knowledge-body .public-mobile-link,
  .knowledge-body .public-mobile-login {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }
}

@media (max-width: 767px) {
  .public-desktop-only {
    display: none !important;
  }

  .public-mobile-only {
    display: flex;
  }

  .public-mobile-row {
    min-width: 0;
    overflow: hidden;
  }
}

/* ==========================================================================
 * Public footer
 * ======================================================================== */

.public-footer {
  position: relative;
  z-index: 0;
  width: 100%;
  padding: 18px 12px 16px;
  overflow: visible;
  background: #f5f9ff;
}

.public-footer::before,
.public-footer::after {
  display: none !important;
  content: none !important;
}

.public-footer-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1700px;
  padding: 28px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(30, 70, 120, 0.05);
}

.footer-desktop {
  display: block;
}

.footer-mobile {
  display: none;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
  align-items: flex-start;
}

.footer-brand-col,
.footer-col {
  min-width: 0;
}

.footer-brand,
.footer-mobile-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 18px;
  text-decoration: none;
}

.footer-brand:hover,
.footer-mobile-brand:hover {
  text-decoration: none;
}

.footer-brand img {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.footer-mobile-brand img {
  display: block;
  width: min(240px, 100%);
  height: auto;
  object-fit: contain;
}

.footer-brand-sub {
  margin-top: 10px;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.footer-desktop .footer-brand-sub {
  margin-bottom: 14px;
}

.footer-desktop .footer-brand-text {
  margin-top: 0;
}

.footer-brand-text {
  max-width: 420px;
  margin: 14px 0 0;
  color: #475467;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.footer-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.footer-action-row.mobile {
  margin-top: 10px;
}

.knowledge-body .footer-soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 13px;
  color: #1677b8;
  background: #ffffff;
  border: 1px solid #cfe4fb;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.knowledge-body .footer-soft-btn:hover {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #abd4fb;
  text-decoration: none;
}

.footer-soft-btn i {
  font-size: 16px;
  line-height: 1;
}

.footer-title {
  color: #14213d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.15px;
}

.social-title {
  margin-top: 18px;
}

.footer-link-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.knowledge-body .footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #475467;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.12s ease;
}

.knowledge-body .footer-link i {
  color: #096dd9;
  font-size: 16px;
  line-height: 1;
}

.knowledge-body .footer-link:hover {
  color: #096dd9;
  text-decoration: none;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: #475467;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.footer-contact i {
  color: #096dd9;
  font-size: 16px;
  line-height: 1;
}

.footer-social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.footer-social-grid.mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.knowledge-body .footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 13px;
  color: #475467;
  background: #ffffff;
  border: 1px solid #dceafd;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.knowledge-body .footer-social-btn:hover {
  color: #096dd9;
  background: #f3f9ff;
  border-color: #abd4fb;
  text-decoration: none;
}

.footer-social-btn svg {
  flex: 0 0 auto;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  margin-top: 24px;
  border-top: 1px solid #dceafd;
}

.footer-bottom.mobile {
  display: grid;
  gap: 12px;
}

.footer-copyright {
  color: #667085;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding-right: 92px;
}

.footer-legal-links.mobile {
  justify-content: flex-start;
  gap: 8px;
  padding-right: 0;
}

.knowledge-body .footer-legal-links a {
  color: #667085;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.12s ease;
}

.knowledge-body .footer-legal-links a:hover {
  color: #096dd9;
  text-decoration: none;
}

.footer-mobile {
  gap: 18px;
}

.footer-mobile-section {
  padding: 14px;
  background: #f7fbff;
  border: 1px solid #dceafd;
  border-radius: 20px;
}

.public-footer *,
.public-footer *::before,
.public-footer *::after {
  text-shadow: none !important;
  animation: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 991px) {
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .footer-legal-links {
    padding-right: 72px;
  }
}

@media (max-width: 767px) {
  .footer-desktop {
    display: none;
  }

  .footer-mobile {
    display: grid;
  }

  .public-footer {
    padding: 14px 8px;
  }

  .public-footer-shell {
    padding: 18px 14px;
    border-radius: 22px;
    box-shadow: 0 3px 10px rgba(30, 70, 120, 0.045);
  }

  .footer-brand,
  .footer-mobile-brand {
    padding: 9px 12px;
    border-radius: 17px;
  }

  .footer-mobile-brand img {
    width: min(230px, 100%);
  }

  .footer-brand-sub {
    margin-top: 10px;
    font-size: 14px;
  }

  .footer-brand-text {
    font-size: 14px;
  }

  .footer-title {
    font-size: 14.5px;
  }

  .footer-link,
  .footer-contact,
  .footer-soft-btn,
  .footer-social-btn {
    font-size: 14px;
  }

  .footer-soft-btn,
  .footer-social-btn {
    width: 100%;
  }

  .footer-copyright,
  .footer-legal-links a {
    font-size: 13px;
  }

  .footer-soft-btn,
  .footer-social-btn,
  .footer-link,
  .footer-legal-links a {
    transition: none;
  }
}

@media (max-width: 390px) {
  .footer-social-grid.mobile {
    grid-template-columns: 1fr;
  }

  .footer-mobile-brand img {
    width: min(220px, 100%);
  }
}
