/* /help/ — база знаний в тёмном каркасе home-landing */

body.landing-help {
  --home-bg: #0a0e14;
  --home-surface: #111827;
  --home-surface-2: #1f2937;
  --home-text: #f9fafb;
  --home-muted: #9ca3af;
  --home-accent: #22d3ee;
  --home-accent-2: #38bdf8;
  --home-cta: #2dd4bf;
  --home-cta-text: #0f172a;
  --home-grid: rgba(56, 189, 248, 0.06);
  --home-glow: rgba(34, 211, 238, 0.12);
}

.kb-help {
  position: relative;
  color: var(--home-text);
  min-height: 60vh;
}

/* Hero как /courses/ (.courses-landing-hero) */
.kb-help-hero {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.kb-help-hero .home-container {
  text-align: center;
}

.kb-help-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--home-text);
  text-align: center;
  margin: 0 0 0.75rem;
}

.kb-help-hero__lead {
  color: var(--home-muted);
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.55;
}

.kb-help .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kb-help-search {
  max-width: 36rem;
  margin: 1.35rem auto 0;
}

.kb-help-search__field {
  position: relative;
}

.kb-help-search__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.92);
  color: var(--home-text);
  padding: 0.85rem 3rem 0.85rem 1rem;
  font-size: 1rem;
  line-height: 1.35;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

/* Native clear is tiny/inconsistent — we use a custom control. */
.kb-help-search__input::-webkit-search-decoration,
.kb-help-search__input::-webkit-search-cancel-button,
.kb-help-search__input::-webkit-search-results-button,
.kb-help-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.kb-help-search__input::placeholder {
  color: rgba(156, 163, 175, 0.9);
}

.kb-help-search__input:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.kb-help-search__clear {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--home-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.kb-help-search__clear.is-visible,
.kb-help-search__clear:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.kb-help-search__clear[hidden] {
  display: none;
}

.kb-help-search__clear:hover,
.kb-help-search__clear:focus-visible {
  color: #d1d5db;
  background: rgba(156, 163, 175, 0.14);
  outline: none;
}

.kb-help-search__clear-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.kb-help-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 1.1rem;
}

.kb-help-search-meta:not(:has(.kb-help-search-meta__text)) {
  justify-content: flex-end;
}

.kb-help-search-meta__text {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.95rem;
}

.kb-help-search-meta__query {
  color: var(--home-text);
}

.kb-help-search-meta__clear {
  color: var(--home-accent);
  text-decoration: none;
  font-size: 0.92rem;
}

.kb-help-search-meta__clear:hover {
  color: var(--home-accent-2);
}

.kb-help-search-empty {
  margin: 0;
}

.kb-help-search-empty__text,
.kb-help-search-empty__support {
  margin: 0;
  color: var(--home-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.kb-help-search-empty__support {
  margin-top: 0.65rem;
}

.kb-help-search-empty__link {
  color: var(--home-accent);
  text-decoration: none;
  font-weight: 600;
}

.kb-help-search-empty__link:hover,
.kb-help-search-empty__link:focus-visible {
  color: var(--home-accent-2);
  text-decoration: underline;
}

.kb-help__article-card__kicker {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--home-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Каталог сразу под hero */
.kb-help-catalog.home-section.home-section--tight {
  padding-top: 0.35rem !important;
  padding-bottom: clamp(2rem, 5vw, 3.5rem) !important;
}

.kb-help__intro {
  max-width: 52rem;
}

/* Article page: full home-container width (like blog post) */
.kb-help-article-page.home-section.home-section--tight {
  padding-top: 1.25rem !important;
  padding-bottom: clamp(2.5rem, 6vw, 4rem) !important;
}

.kb-help-article-page__head {
  margin-bottom: 1.35rem;
}

.kb-help-article-page .kb-help__lead {
  max-width: none;
  width: 100%;
  font-size: 1.125rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  text-align: justify;
  hyphens: auto;
}

.kb-help-article-page .kb-help__title {
  max-width: none;
  width: 100%;
  text-align: left;
}

.kb-help__title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--home-text);
}

.kb-help__lead {
  margin: 0 0 1.5rem;
  color: var(--home-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.kb-help__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--home-muted);
}

.kb-help__breadcrumb a {
  text-decoration: none;
  color: var(--home-accent);
}

.kb-help__breadcrumb a:hover {
  color: var(--home-accent-2);
}

.kb-help__categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.kb-help__category {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(
    165deg,
    rgba(31, 41, 55, 0.96) 0%,
    rgba(17, 24, 39, 0.94) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

a.kb-help__category:hover,
a.kb-help__category:focus-visible {
  text-decoration: none;
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.35),
    0 0 28px rgba(45, 212, 191, 0.28);
}

a.kb-help__category:hover .kb-help__category-title,
a.kb-help__category:hover .kb-help__category-desc,
a.kb-help__category:focus-visible .kb-help__category-title,
a.kb-help__category:focus-visible .kb-help__category-desc {
  text-decoration: none;
}

.kb-help__category-title {
  font-size: 1.15rem;
  margin: 0;
  color: var(--home-text);
  text-decoration: none;
}

a.kb-help__category:hover .kb-help__category-title {
  color: var(--home-cta);
}

.kb-help__category-desc {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  flex: 1 1 auto;
  text-decoration: none;
}

/* Category detail: header + article cards in one tight block */
.kb-help-category-page.home-section.home-section--tight {
  padding-top: 1.25rem !important;
  padding-bottom: clamp(2rem, 5vw, 3.5rem) !important;
}

.kb-help-category-page__head {
  margin-bottom: 1.15rem;
}

.kb-help-category-page .kb-help__lead {
  margin-bottom: 0;
}

.kb-help__article-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
}

.kb-help__article-cards > li {
  width: 100%;
  min-width: 0;
}

.kb-help__article-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(
    165deg,
    rgba(31, 41, 55, 0.9) 0%,
    rgba(17, 24, 39, 0.92) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.kb-help__article-card:hover,
.kb-help__article-card:focus-visible {
  text-decoration: none;
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.35),
    0 0 24px rgba(45, 212, 191, 0.25);
}

.kb-help__article-card__title {
  display: block;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--home-text);
  line-height: 1.35;
  text-decoration: none;
}

.kb-help__article-card:hover .kb-help__article-card__title {
  color: var(--home-cta);
  text-decoration: none;
}

.kb-help__article-card__excerpt {
  display: block;
  margin-top: 0.35rem;
  width: 100%;
  max-width: none;
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-decoration: none;
  text-align: left;
}

.kb-help__article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kb-help__article-list li {
  margin: 0.35rem 0;
  color: var(--home-muted);
}

.kb-help__article-list--lg li {
  margin: 0 0 1rem;
}

.kb-help__article-list a {
  text-decoration: none;
  font-weight: 600;
  color: var(--home-accent);
}

.kb-help__article-list a:hover {
  color: var(--home-accent-2);
}

.kb-help__article-list p {
  margin: 0.35rem 0 0;
  color: var(--home-muted);
  font-size: 0.95rem;
}

.kb-help__content {
  width: 100%;
  max-width: none;
  line-height: 1.76;
  font-size: 1.125rem;
  color: rgba(226, 232, 240, 0.9);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.kb-help__content p,
.kb-help__content li {
  color: rgba(226, 232, 240, 0.9);
  text-align: justify;
}

.kb-help__content p {
  margin: 0 0 1.1em;
}

.kb-help__content ul,
.kb-help__content ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.kb-help__content a {
  color: var(--home-cta);
  text-decoration: none;
}

.kb-help__content a:hover {
  color: var(--home-accent-2);
  text-decoration: underline;
}

.kb-help__content h2,
.kb-help__content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  color: var(--home-text);
  letter-spacing: -0.01em;
  text-align: left;
}

.kb-help__content h2 {
  font-size: 1.45rem;
}

.kb-help__content h3 {
  font-size: 1.25rem;
}

.kb-help__content code,
.kb-help__content pre {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  color: #e2e8f0;
}

.kb-help__content pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

.kb-help__content code {
  padding: 0.1em 0.35em;
}

.kb-help__content pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.kb-help__related {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.kb-help__related-title,
.kb-help__section-nav-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--home-text);
}

.kb-help__related-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.kb-help__related-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(31, 41, 55, 0.65);
  color: var(--home-cta);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.kb-help__related-chip:hover,
.kb-help__related-chip:focus-visible {
  text-decoration: none;
  color: var(--home-text);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.28),
    0 0 18px rgba(45, 212, 191, 0.2);
}

/* Article page: full parent width (not capped at 1180px) + main fills remaining grid track */
body.landing-help .kb-help-article-page .home-container.kb-help-article-layout {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.home-container.kb-help-article-layout {
  display: block;
}

.home-container.kb-help-article-layout--with-aside {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.kb-help-article-layout__main {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.kb-help-article-layout__main > .kb-help__breadcrumb,
.kb-help-article-layout__main > .kb-help-article-page__head,
.kb-help-article-layout__main > .kb-help__content,
.kb-help-article-layout__main > .kb-help__related,
.kb-help-article-layout__main > .kb-help-feedback,
.kb-help-article-layout__main > .kb-help__pager {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Sticky sidebar: overflow-x:hidden on .home-landing creates a scrollport and kills sticky */
body.landing-help .home-landing.kb-help {
  overflow-x: clip;
}

.kb-help-article-layout__aside {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height, 60px) + 1.5rem);
  z-index: 5;
  min-width: 0;
  max-height: calc(100vh - var(--header-height, 60px) - 2rem);
}

.kb-help__nav-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(17, 24, 39, 0.84);
  box-shadow: 0 24px 80px rgba(2, 8, 23, 0.32);
}

.kb-help__nav-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.kb-help__nav-card-head .kb-help__nav-badge {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.kb-help__nav-card-all {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--home-cta);
  text-decoration: none;
}

.kb-help__nav-card-all:hover {
  color: var(--home-accent-2);
}

.kb-help__nav-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  max-height: 2.3rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.42);
  color: #ecfdf5;
  font-size: 0.92rem;
}

.kb-help__nav-badge__text {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

/* Fade only when the title is clipped (toggled by help_nav_badge.js). */
.kb-help__nav-badge__text.is-overflowing {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 1.75rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 1.75rem),
    transparent 100%
  );
}

.kb-help__article-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.kb-help__article-nav::-webkit-scrollbar {
  width: 6px;
}

.kb-help__article-nav::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.kb-help__article-nav-link {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #d7dfec;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.kb-help__article-nav-link__text {
  display: block;
  width: 100%;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: break-word;
}

a.kb-help__article-nav-link:hover,
.kb-help__article-nav-link.is-active {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.1);
  color: #ecfdf5;
  text-decoration: none;
}

.kb-help__article-nav-link.is-active {
  font-weight: 650;
}

/* Pager — like cabinet career-question-detail__pager */
.kb-help__pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  align-items: start;
}

.kb-help__pager-col {
  min-width: 0;
}

.kb-help__pager-col--next {
  text-align: right;
}

.kb-help__pager-link {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--home-cta);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  text-align: left;
}

.kb-help__pager-link--next {
  text-align: right;
}

.kb-help__pager-link:hover,
.kb-help__pager-link:focus-visible {
  color: var(--home-accent-2);
}

.kb-help__pager-muted {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(215, 223, 236, 0.72);
  margin-bottom: 0.2rem;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.kb-help__pager-title-text {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #f1f5f9;
  word-break: break-word;
}

.kb-help__pager-link:hover .kb-help__pager-title-text {
  color: #fff;
}

@media (max-width: 960px) {
  .home-container.kb-help-article-layout--with-aside {
    grid-template-columns: 1fr;
  }

  .kb-help-article-layout__aside {
    position: static;
    order: -1;
    max-height: none;
    z-index: auto;
  }

  .kb-help__nav-card {
    max-height: none;
    overflow: visible;
  }

  .kb-help__article-nav {
    max-height: min(42vh, 18rem);
  }
}

@media (max-width: 640px) {
  .kb-help__pager {
    grid-template-columns: 1fr;
  }

  .kb-help__pager-col--next {
    text-align: left;
  }

  .kb-help__pager-link--next {
    text-align: left;
  }

  .kb-help__nav-card {
    border-radius: 22px;
    padding: 1.25rem;
  }
}

.kb-help__empty-cat,
.kb-help .text-muted {
  margin: 0;
  font-size: 0.9rem;
  color: var(--home-muted) !important;
}

.kb-help-feedback {
  margin: 1.75rem 0 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.72);
}

.kb-help-feedback__question {
  margin: 0 0 0.85rem;
  color: var(--home-text);
  font-size: 1.05rem;
  font-weight: 600;
}

.kb-help-feedback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.kb-help-feedback__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(31, 41, 55, 0.85);
  color: var(--home-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.kb-help-feedback__btn:hover,
.kb-help-feedback__btn:focus-visible {
  color: var(--home-text);
  border-color: rgba(45, 212, 191, 0.45);
  outline: none;
}

.kb-help-feedback__btn.is-active,
.kb-help-feedback__btn[aria-pressed="true"] {
  color: var(--home-cta-text, #0f172a) !important;
  background: var(--home-cta, #2dd4bf) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35);
}

.kb-help-feedback__icon {
  display: block;
  flex: 0 0 auto;
}

.kb-help-feedback__thanks {
  margin: 0.85rem 0 0;
  color: var(--home-muted);
  font-size: 0.95rem;
}

