@font-face {
  font-family: Roboto;
  src: url("/brand/roboto-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Roboto;
  src: url("/brand/roboto-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Roboto;
  src: url("/brand/roboto-800-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Roboto;
  src: url("/brand/roboto-800-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

/* Shared header: primary-system height 62px, logo 130px, medium button 38px. */
:root {
  --header-height: 62px;
  --help-page-gutter: 20px;
  --help-search-aside-width: 280px;
  --help-font-family: Roboto, Arial, sans-serif;
  --help-header-background: #fff;
  --help-header-text: #1f2737;
  --help-header-brand-text: #145286;
  --help-header-muted: #646973;
  --help-header-border: #ecedee;
  --help-header-hover: #f4f4f5;
  --help-header-field: #fafafa;
  --help-header-border-hover: #cfd1d4;
  --help-header-search-icon: url("/brand/search.svg");
  --help-header-logo: url("/brand/promoloko-logo.svg");
  --docs-heading-color: #282f3e;
  --docs-primary: #0ba5ec;
}

.g-root,
.yfm {
  --g-font-family-sans: var(--help-font-family);
  --g-text-body-font-family: var(--help-font-family);
  --g-text-caption-font-family: var(--help-font-family);
  --g-text-display-font-family: var(--help-font-family);
  --g-text-header-font-family: var(--help-font-family);
  --g-text-subheader-font-family: var(--help-font-family);
  --yfm-font-family-sans: var(--help-font-family);
  font-family: var(--help-font-family);
}

.g-root.g-root_theme_dark {
  --g-color-base-background: rgb(31, 35, 40);
  background-color: var(--g-color-base-background);
  --help-header-background: #282f3e;
  --help-header-text: #fff;
  --help-header-brand-text: #fff;
  --help-header-muted: #b7babf;
  --help-header-border: #4c525e;
  --help-header-hover: #404653;
  --help-header-field: #343b48;
  --help-header-border-hover: #7c8089;
  --help-header-search-icon: url("/brand/diplodoc-search.svg");
  --help-header-logo: url("/brand/promoloko-logo-dark.svg");
  --docs-heading-color: #ecedee;
}

/* Hide scroll indicators while preserving wheel, touch and keyboard scrolling. */
html:has(.pc-navigation, .help-content),
body:has(.pc-navigation, .help-content),
body:has(.pc-navigation, .help-content) * {
  scrollbar-width: none;
}

html:has(.pc-navigation, .help-content)::-webkit-scrollbar,
body:has(.pc-navigation, .help-content)::-webkit-scrollbar,
body:has(.pc-navigation, .help-content) *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.g-root .pc-navigation {
  box-sizing: border-box;
  height: var(--header-height);
  background: var(--help-header-background);
  border-bottom: 1px solid var(--help-header-border);
  box-shadow: none;
  color: var(--help-header-text);
}

.g-root .pc-desktop-navigation__wrapper {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  padding-inline: var(--help-page-gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.g-root .pc-desktop-navigation__wrapper .pc-desktop-navigation__logo {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 12px;
  margin: 0;
  text-decoration: none;
}

.g-root .pc-desktop-navigation__logo .pc-logo__icon {
  display: block;
  width: 130px;
  height: auto;
  flex: none;
  margin: 0;
}

/* Keep the rendered logo in sync even when CustomNavigation retains its theme props. */
.g-root .pc-desktop-navigation__logo .pc-logo__icon {
  content: var(--help-header-logo);
}

.g-root .pc-desktop-navigation__logo .pc-logo__text {
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  min-height: 24px;
  margin: 0 0 -1px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--help-header-border);
  color: var(--help-header-brand-text);
  /* Branding has the same metrics on home and articles in every text mode. */
  font: 600 .875rem/1.285714 var(--help-font-family);
  letter-spacing: 0;
  white-space: nowrap;
}

.g-root .pc-navigation a:focus-visible,
.g-root .pc-navigation button:focus-visible {
  outline: 2px solid var(--docs-primary);
  outline-offset: 2px;
}

.g-root .Layout_full-header,
.g-root .dc-subnavigation_invisible {
  --dc-header-height: var(--header-height);
}

.g-root .pc-desktop-navigation__right {
  margin-inline-start: auto;
}

.g-root .pc-Grid.pc-navigation > .container-fluid {
  padding-inline: 0;
  max-width: none;
}

.g-root .pc-desktop-navigation__buttons {
  gap: 12px;
}

.g-root .pc-navigation .help-suggestion-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  min-height: 2.375rem;
  height: 2.375rem;
  padding: 0 12px;
  border: 1px solid var(--help-header-border);
  border-radius: 10px;
  background: var(--help-header-field);
  color: #9fa3a9;
  font: 500 .875rem/1.285714 var(--help-font-family);
  white-space: nowrap;
  cursor: not-allowed;
}

.g-root_theme_dark .pc-navigation .help-suggestion-button {
  color: #93979e;
}

.help-suggestion-icon {
  display: block;
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("/brand/suggestion.svg") center / contain no-repeat;
}

/* One visible set of actions on every viewport, including native local search. */
.g-root .pc-desktop-navigation__mobile-navigation-container,
.g-root .pc-desktop-navigation__navigation-container,
.g-root .pc-navigation .pc-mobile-menu-button {
  display: none;
}

.g-root .pc-navigation .Suggest__input {
  /* Match the compact home header, independently of article text size. */
  height: 2.375rem;
  min-height: 2.375rem;
  --g-text-input-background-color: var(--help-header-field);
  --g-text-input-border-color: var(--help-header-border);
  --g-text-input-border-color-hover: var(--help-header-border-hover);
  --g-text-input-border-color-active: var(--docs-primary);
  --g-text-input-focus-outline-color: var(--docs-primary);
  --g-text-input-text-color: var(--help-header-text);
  --g-text-input-placeholder-color: var(--help-header-muted);
  --g-text-input-border-radius: 10px;
}

.g-root .pc-navigation .Suggest__input .g-text-input__content {
  background-image: var(--help-header-search-icon);
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
  background-position: left 10px center;
}

.g-root .pc-navigation .Suggest__input .g-text-input__control {
  height: 2.25rem;
  min-height: 2.25rem;
  padding-inline-start: 2.125rem;
  font: 400 .875rem/1.285714 var(--help-font-family);
  letter-spacing: normal;
}

.g-root .pc-navigation .Suggest__input .g-text-input__additional-content { display: none; }
.g-root .pc-navigation .Suggest__close { color: var(--help-header-text); }

@media (min-width: 769px) {
  body:not(.dc-root_focused-search) .pc-navigation .dc-search-suggest__wrapper {
    min-width: 264px;
    max-width: 264px;
  }

  .g-root .pc-desktop-navigation__wrapper.help-search-aligned {
    position: relative;
  }

  .g-root .help-search-aligned .pc-desktop-navigation__buttons > li:has(.dc-search-suggest__wrapper) {
    display: block;
    position: absolute;
    height: auto;
    min-height: 0;
    padding: 0;
    top: 50%;
    left: var(--help-search-left);
    width: var(--help-search-width);
    transform: translateY(-50%);
  }

  .g-root .pc-navigation .help-search-aligned .pc-desktop-navigation__buttons .dc-search-suggest__wrapper {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .g-root .pc-desktop-navigation__buttons { display: flex; }
  .g-root .pc-desktop-navigation__navigation-container { display: none; }

  body:not(.dc-root_focused-search) .pc-navigation .dc-search-suggest__wrapper {
    min-width: 38px;
    max-width: 38px;
  }

  body:not(.dc-root_focused-search) .pc-navigation .Suggest__input .g-text-input__content {
    background-position: center;
  }

  body:not(.dc-root_focused-search) .pc-navigation .Suggest__input .g-text-input__control {
    padding-inline-start: 0;
  }

  body:not(.dc-root_focused-search) .pc-navigation .Suggest__input .g-text-input__control::placeholder {
    color: transparent;
  }

  body.dc-root_focused-search .pc-desktop-navigation__buttons { gap: 0; }

  .g-root .pc-navigation .help-suggestion-button {
    position: relative;
    width: 2.375rem;
    min-width: 2.375rem;
    padding: 0;
  }

  .help-suggestion-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.dc-root_focused-search .help-suggestion-item {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1279px) {
  :root { --help-search-aside-width: 196px; }
}

@media (max-width: 640px) {
  .g-root .pc-desktop-navigation__wrapper {
    gap: 12px;
  }

  .g-root .pc-desktop-navigation__wrapper .pc-desktop-navigation__logo { gap: 8px; }

  .g-root .pc-desktop-navigation__logo .pc-logo__icon { width: 110px; }

  .g-root .pc-desktop-navigation__logo .pc-logo__text { padding-inline-start: 8px; }

  .g-root .pc-desktop-navigation__left,
  .g-root .pc-desktop-navigation__right { flex: 0 0 auto; }

  .g-root .pc-desktop-navigation__buttons { gap: 8px; }

}

@media (max-width: 380px) {
  .g-root .pc-desktop-navigation__wrapper .pc-desktop-navigation__logo { gap: 8px; }

  .g-root .pc-desktop-navigation__logo .pc-logo__icon { width: 90px; }

  .g-root .pc-desktop-navigation__logo .pc-logo__text {
    padding-inline-start: 8px;
  }
}

@media (max-width: 350px) {
  .g-root .pc-desktop-navigation__wrapper { gap: 8px; }

  .g-root .pc-desktop-navigation__logo .pc-logo__icon { width: 80px; }

  .g-root .pc-desktop-navigation__buttons { gap: 4px; }

  .g-root .pc-navigation .help-suggestion-button {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    height: 32px;
  }
}
