/* Ограничение высоты лого */
.g-root .pc-desktop-navigation__wrapper .pc-logo__icon {
    max-height: 30px;
    margin-right: 50px;
}

/* Таблица на разводящей */
.yfm .index-table table, .yfm .index-table table tr td {
    border: none;
}
.yfm .index-table table thead, .yfm .index-table table tr:nth-child(2n) {
    background: var(--g-color-base-background);
}
.yfm .index-table table {
    width: 100% !important;
}
.yfm .index-table table tr td svg {
    max-width: 90px;
}
.yfm .index-table table th p, .yfm .index-table table td p {
    margin-bottom: 5px;
}

@media screen and (max-width:768px) {
  .yfm .index-table table tr {
    display: grid;
    grid-template-columns: 30% 70%;
  }
  .yfm .index-table tr td:nth-child(2n-1){
    padding-left: 0;
    padding-right: 0;
  }
}

/* Скругление и плавная смена цвета в оглавлении */
.dc-toc-item__text_clicable {
    border-radius: 8px;
    transition: background-color .1s ease-out, color .1s ease-out;
}
.dc-toc-item__text_clicable:hover {
    border-radius: 8px;
}

/* Плавная смена цвета в верхнем меню */
.pc-navigation-link {
    transition: background-color .1s ease-out, color .1s ease-out;
}

/* Плавная смена цвета в минитоке */
.dc-mini-toc__section-link {
    transition: background-color .1s ease-out, color .1s ease-out;
}

/* Скругление края и серая рамка у картинок */
.dc-doc-page .yfm img {
    border-radius: 10px;
    border: 1px solid var(--g-color-line-generic);
}

/* Шрифты */
@font-face {
    font-family: YS Text;
    src: url(https://yastatic.net/s3/home/fonts/ys/3/text-regular.woff2) format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: YS Text;
    src: url(https://yastatic.net/s3/home/fonts/ys/3/text-regular-italic.woff2) format("woff2");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: YS Text;
    src: url(https://yastatic.net/s3/home/fonts/ys/3/text-medium.woff2) format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: YS Text;
    src: url(https://yastatic.net/s3/home/fonts/ys/3/text-bold.woff2) format("woff2");
    font-weight: 700;
    font-style: normal;
}

.g-root {
    --g-font-family-sans: "YS Text", sans-serif;
}
.yfm {
    --yfm-font-family-sans: "YS Text", sans-serif;
}

/* Цвета */
.g-root_theme_light {
    --g-color-text-info-heavy: #3072b3;
    --g-color-text-positive-heavy: #2d8b5d;
    --g-color-text-warning-heavy: #bd5c0a;
    --g-color-text-danger-heavy: #bd0935;
    --g-color-text-utility-heavy: #6e4299;
    --g-color-text-misc-heavy: #556575;
}
.g-root_theme_dark {
    --g-color-text-info-heavy: #4aa1f2;
    --g-color-text-positive-heavy: #5fb8a5;
    --g-color-text-warning-heavy: #ffc56c;
    --g-color-text-danger-heavy: #e8476d;
    --g-color-text-utility-heavy: #8f52cccc;
    --g-color-text-misc-heavy: #8099b0;
}

/* Цветной текст */
.yfm .blue {
    color: var(--g-color-text-info-heavy);
}
.yfm .green {
    color: var(--g-color-text-positive-heavy);
}
.yfm .yellow {
    color: var(--g-color-text-warning-heavy);
}
.yfm .red {
    color: var(--g-color-text-danger-heavy);
}
.yfm .purple {
    color: var(--g-color-text-utility-heavy);
}
.yfm .gray {
    color: var(--g-color-text-misc-heavy);
}

/* Рамки и значки у заметок */
.yfm-accent-info {
    border: 1px solid #3697f1cc;
}
.yfm-accent-tip {
    border: 1px solid #4db09bcc;
}
.yfm-accent-warning {
    border: 1px solid #ffbe5ccc;
}
.yfm-accent-alert {
    border: 1px solid #e5325dcc;
}

.yfm .yfm-note.yfm-accent-info>p:first-child:before {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%20width='24'%20height='24'%3E%3Cpath%20fill='%233697f1'%20fill-rule='evenodd'%20d='M8%2013.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011M8%2015A7%207%200%201%200%208%201a7%207%200%200%200%200%2014m1-9.5a1%201%200%201%201-2%200%201%201%200%200%201%202%200m-.25%203a.75.75%200%200%200-1.5%200V11a.75.75%200%200%200%201.5%200z'%20clip-rule='evenodd'/%3E%3C/svg%3E");
}
.yfm .yfm-note.yfm-accent-tip>p:first-child:before {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width='24'%20height='24'%20viewBox='0%200%2016%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cmask%20id='mask0_1321_170'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='5'%20y='19'%20width='6'%20height='6'%3E%3Cellipse%20cx='8.05265'%20cy='22.2433'%20rx='2.55265'%20ry='2.75665'%20fill='%234DB09B'/%3E%3C/mask%3E%3Cg%20mask='url(%23mask0_1321_170)'%3E%3Crect%20x='3.56982'%20y='23.8967'%20width='8.27887'%20height='3.67553'%20transform='rotate(-18.14%203.56982%2023.8967)'%20fill='%234DB09B'/%3E%3C/g%3E%3Cpath%20d='M5.73096%2021.0302L10.4426%2019.4866'%20stroke='%234DB09B'%20stroke-width='2'%20stroke-linecap='round'/%3E%3Cpath%20d='M14.865%208.14437C14.865%2011.2696%2012.584%2013.1025%2011.5608%2014.454C11.0632%2015.1115%2010.7663%2016.2669%2010.7663%2016.2669L5.5%2018C5.5%2018%204.93917%2015.6605%203.87937%2014.454C2.72292%2013.1375%201%2011.2695%201%208.14436C1%204.51918%203.3246%201%207.93248%201C12.5404%201%2014.865%204.5192%2014.865%208.14437Z'%20stroke='%234DB09B'%20stroke-width='2'/%3E%3C/svg%3E");
}
.yfm .yfm-note.yfm-accent-warning>p:first-child:before {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%20width='24'%20height='24'%3E%3Cpath%20fill='%23ffbe5c'%20fill-rule='evenodd'%20d='M7.134%202.994%202.217%2011.5a1%201%200%200%200%20.866%201.5h9.834a1%201%200%200%200%20.866-1.5L8.866%202.993a1%201%200%200%200-1.732%200m3.03-.75c-.962-1.665-3.366-1.665-4.329%200L.918%2010.749c-.963%201.666.24%203.751%202.165%203.751h9.834c1.925%200%203.128-2.085%202.164-3.751zM8%205a.75.75%200%200%201%20.75.75v2a.75.75%200%200%201-1.5%200v-2A.75.75%200%200%201%208%205m1%205.75a1%201%200%201%201-2%200%201%201%200%200%201%202%200'%20clip-rule='evenodd'/%3E%3C/svg%3E");
}
.yfm .yfm-note.yfm-accent-alert>p:first-child:before {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%20width='24'%20height='24'%3E%3Cpath%20fill='%23e5325d'%20fill-rule='evenodd'%20d='M7.134%202.994%202.217%2011.5a1%201%200%200%200%20.866%201.5h9.834a1%201%200%200%200%20.866-1.5L8.866%202.993a1%201%200%200%200-1.732%200m3.03-.75c-.962-1.665-3.366-1.665-4.329%200L.918%2010.749c-.963%201.666.24%203.751%202.165%203.751h9.834c1.925%200%203.128-2.085%202.164-3.751zM8%205a.75.75%200%200%201%20.75.75v2a.75.75%200%200%201-1.5%200v-2A.75.75%200%200%201%208%205m1%205.75a1%201%200%201%201-2%200%201%201%200%200%201%202%200'%20clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Стили у уведомлений, перекрывают тип info в ДокДиректоре */
.dc-note.dc-accent-info {
    border: 1px solid #8f52cccc;
    background: none;
}
.dc-note.dc-accent-info>p:first-child:before {
    content: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2016%2016'%20width='24'%20height='24'%3E%3Cpath%20fill='%239a63d1'%20fill-rule='evenodd'%20d='m7.836%206%20.76-2.027L9.336%202H5.5a.72.72%200%200%200-.664.45L2.513%208.257a.177.177%200%200%200%20.164.243h4.965l-.732%202.013-1.082%202.975a.382.382%200%200%200%20.637.392l6.956-7.391A.29.29%200%200%200%2013.21%206H7.835m2.727-3%20.235-.627A1.386%201.386%200%200%200%209.5.5h-4c-.906%200-1.72.552-2.057%201.393L1.12%207.7A1.677%201.677%200%200%200%202.677%2010H5.5l-.545%201.5-.537%201.475a1.882%201.882%200%200%200%203.14%201.933l6.956-7.391A1.79%201.79%200%200%200%2013.21%204.5H10z'%20clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Выделение терминов обычным цветом ссылок */
.g-root_theme_light {
    --custom-color-term-hover: rgb(108, 197, 255);
}
.g-root_theme_dark {
    --custom-color-term-hover: rgb(255, 197, 108);
}
.yfm .yfm-term_title:hover {
    color: var(--custom-color-term-hover) !important;
}

/* Выделение радиобаттанов акцентным цветом */
.yfm-tabs-vertical .yfm-vertical-tab input[type="radio"]:checked + label::before {
    background-color: var(--yfm-color-base-brand);
}

/* Правка цвета у стрелки дропдауна */
.g-root_theme_light .yfm-tabs-dropdown .yfm-tabs-dropdown-select:after {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20fill='none'%20stroke='%23000'%20d='m3%206%205%205%205-5'/%3E%3C/svg%3E");
}
.g-root_theme_dark .yfm-tabs-dropdown .yfm-tabs-dropdown-select:after {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20fill='none'%20stroke='%23fff'%20d='m3%206%205%205%205-5'/%3E%3C/svg%3E");
}

/* Скрытый текст для Нейроэксперта */
.yfm .hidden-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Ширина таблиц */
.yfm .full-width-table table {
    width: 100%;
}

.yfm .table-50 table tr td:nth-child(1) {
    width: 50%;
}
.yfm .table-25 table tr td:nth-child(1) {
    width: 25%;
}

.yfm .table-2c25 table tr td:nth-child(2) {
    width: 25%;
}

.yfm .table-3c15 table tr td:nth-child(3) {
    width: 15%;
}

/* Размеры видео в таблицах */
.yfm .video table iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9 !important;
}

/* Без серой заливки строк в таблице */
.dc-doc-page .yfm .striped-none table tr:nth-child(2n) {
    background: var(--g-color-base-background);
}
.yfm .striped-none table th, .yfm table td {
    border: 1px solid var(--g-color-line-generic);
}

/* Закрашенная шапка в таблице */
.yfm .colored-header table tr:first-child td, .yfm .colored-header table tr:first-child th {
    background-color: var(--g-color-base-generic);
}

/* Зафиксировать первый столбец в таблице */
.table-with-sticky-column table th:first-child,
.table-with-sticky-column table td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--g-color-base-background);
    z-index: 1;
    will-change: transform;
}

/* Цвета для кнопок */
.g-root_theme_light {
    --custom-color-button: #008eff;
    --custom-color-button-hover: #0383e9;
    --custom-color-button-text: #fff;
    .yfm .cut-button>.yfm-cut>.yfm-cut-title:before {
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20fill='none'%20stroke='%23fff'%20d='m3%206%205%205%205-5'/%3E%3C/svg%3E") !important;
        left: 20px;
    }
}
.g-root_theme_dark {
    --custom-color-button: #ffbe5c;
    --custom-color-button-hover: #ffcb7d;
    --custom-color-button-text: #000000e6;
    .yfm .cut-button>.yfm-cut>.yfm-cut-title:before {
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20fill='none'%20stroke='%23000000e6'%20d='m3%206%205%205%205-5'/%3E%3C/svg%3E") !important;
        left: 20px;
    }
}

/* Ссылка-кнопка */
.button {
    border: none;
    outline: none;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--yc-text-body-font-family);
    padding: 12px 30px;
    border-radius: 10px;
    color: var(--custom-color-button-text);
    background-color: var(--custom-color-button);
    transform: scale(1);
    transition: transform .1s ease-out, background-color .15s linear;
}
.button:hover {
    background: var(--custom-color-button-hover);
}
.button:active {
    background: var(--custom-color-button-hover);
    transform: scale(.96);
    transition: none;
}


/* Кат-кнопка */
.yfm .cut-button>.yfm-cut>.yfm-cut-title {
    display:inline-block;
    position: relative;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-family: var(--g-text-body-font-family);
    padding: 12px 30px 12px 45px;
    border-radius: 10px;
    color: var(--custom-color-button-text);
    background-color: var(--custom-color-button);
    margin-top: 10px;
    transform: scale(1);
    transition: transform .1s ease-out, background-color .15s linear;
}
.yfm .cut-button>.yfm-cut>.yfm-cut-title:hover {
    background: var(--custom-color-button-hover);
}
.yfm .cut-button>.yfm-cut>.yfm-cut-title:active {
    background: var(--custom-color-button-hover);
    transform: scale(.96);
    transition: none;
}

/* Виджет чата */
.ya-chat-button {
    color: currentColor;
    background-color: var(--g-color-base-float-hover);
    border-radius: 10px;
}
.ya-chat-button.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__container {
    max-width: none;
    padding-left: 8px;
    padding-right: 10px;
    background-color: var(--g-color-base-float);
}
.ya-chat-button.ya-chat-button_collapsed_hover:not(:hover) .ya-chat-button__text {
    opacity: 1;
}

/* Iframe виджета Нейроэксперта */
iframe[title="neuroexpert-widget"] {
    border: 2px solid #FFD43B !important;
    width: 90dvw !important;
}

@media screen and (min-width: 768px) {
    iframe[title="neuroexpert-widget"] {
        width: 60dvw !important;
    }
}

@media screen and (min-width: 1200px) {
    iframe[title="neuroexpert-widget"] {
        width: 40dvw !important;
    }
}

/* Кнопка виджета Нейроэксперта */
.toggle-button {
    position: relative !important;
    width: 10.5rem !important;
    color: black !important;
    background:
        linear-gradient(293.24deg, #FFD43B 20.26%, #FF4E00 128.06%),
        #FFD43B !important;
    background-size: 100% 100%, 0% 100% !important;
    background-position: 0% 0%, 0% 0% !important;
    background-repeat: no-repeat !important;
    transform: scale(1);
    transition: background-size 1s ease !important;
    overflow: hidden !important;
}

.toggle-button:hover {
    background-size: 0% 100%, 100% 100% !important;
}

.toggle-button:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease-out !important;
}

/* Правка отступа после радиобаттонов */
.yfm-tabs {
    margin-bottom: 25px !important;
}

/* Правка отступов после табов */
.yfm .yfm-tab-panel:last-child {
    margin-bottom: -15px !important;
}
.yfm .yfm-tab-panel:last-child.active {
    margin-bottom: 0 !important;
}

/* Пустой абзац, который нужен для починки отступов между табами и заголовком */
.yfm p.empty {
    height: 0;
    margin: 0;
}

/* Отступы в списках */
.yfm li>p:first-child {
    margin-block: 0 !important;
}
.yfm li>p+p {
    margin-top: 15px !important;
}
.yfm ol li>ol, .yfm ol li>ul, .yfm ul li>ol, .yfm ul li>ul {
    margin-bottom: 15px !important;
    margin-top: 15px !important;
}
.yfm .yfm-tab-panel ol:last-child, .yfm .yfm-tab-panel ul:last-child {
    margin-bottom: 15px;
}
.yfm li>p:first-child+.yfm-cut, .yfm li>p:first-child+.yfm-tabs, .yfm li>p:first-child+table {
    margin-top: 15px;
}

/* Отображение разных картинок для десктопа и телефона в зависимости от ширины экрана */
@media screen and (max-width: 768px) {
    .yfm .container-desktop {
        display: none !important;
    }
}
.yfm .container-desktop p:last-child {
    margin-bottom: 15px !important;
}

@media screen and (min-width: 769px) {
    .yfm .container-mobile {
        display: none !important;
    }
}
.yfm .container-mobile p:last-child {
    margin-bottom: 15px !important;
}

/* Картинки по центру */
.container-center {
    display: flex;
    justify-content: center;
}

/* Картинка у внешних ссылок */
a.external::after {
    background-color: var(--yfm-color-link);
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 0.2em;
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 96 96'%3E%3Cpath d='M88 48a4 4 0 0 0-4 4v28c0 2.21-1.79 4-4 4H16c-2.21 0-4-1.79-4-4V16c0-2.21 1.79-4 4-4h28a4 4 0 0 0 0-8H16C9.373 4 4 9.373 4 16v64c0 6.627 5.373 12 12 12h64c6.627 0 12-5.373 12-12V52a4 4 0 0 0-4-4'/%3E%3Cpath d='M91.996 7.958a4 4 0 0 0-.075-.742c-.023-.112-.065-.216-.097-.325-.04-.142-.074-.285-.131-.423-.05-.122-.12-.231-.182-.346s-.113-.234-.187-.344a4 4 0 0 0-.407-.499c-.032-.035-.055-.075-.089-.108-.031-.031-.067-.051-.1-.081a4 4 0 0 0-.509-.416c-.108-.072-.226-.123-.339-.184-.116-.062-.228-.133-.35-.184-.139-.058-.283-.091-.427-.132-.107-.031-.21-.073-.321-.095A4 4 0 0 0 87.999 4H64a4 4 0 0 0 0 8h14.343l-32.77 32.77a4 4 0 1 0 5.656 5.656L84 17.656V32a4 4 0 0 0 8 0V8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 96 96'%3E%3Cpath d='M88 48a4 4 0 0 0-4 4v28c0 2.21-1.79 4-4 4H16c-2.21 0-4-1.79-4-4V16c0-2.21 1.79-4 4-4h28a4 4 0 0 0 0-8H16C9.373 4 4 9.373 4 16v64c0 6.627 5.373 12 12 12h64c6.627 0 12-5.373 12-12V52a4 4 0 0 0-4-4'/%3E%3Cpath d='M91.996 7.958a4 4 0 0 0-.075-.742c-.023-.112-.065-.216-.097-.325-.04-.142-.074-.285-.131-.423-.05-.122-.12-.231-.182-.346s-.113-.234-.187-.344a4 4 0 0 0-.407-.499c-.032-.035-.055-.075-.089-.108-.031-.031-.067-.051-.1-.081a4 4 0 0 0-.509-.416c-.108-.072-.226-.123-.339-.184-.116-.062-.228-.133-.35-.184-.139-.058-.283-.091-.427-.132-.107-.031-.21-.073-.321-.095A4 4 0 0 0 87.999 4H64a4 4 0 0 0 0 8h14.343l-32.77 32.77a4 4 0 1 0 5.656 5.656L84 17.656V32a4 4 0 0 0 8 0V8z'/%3E%3C/svg%3E");
    vertical-align: middle;
}
a.external:hover:after {
    background-color: var(--yfm-color-link-hover);
}

/* Картинка у ссылок на Телеграм */
a.telegram::after {
    background-color: var(--yfm-color-link);
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 0.2em;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.254 8.521 9.61 5.86a.75.75 0 0 1 .782 1.28L6.586 9.465 9.77 12.65a1.2 1.2 0 0 0 1.973-.433l2.692-7.308a1.045 1.045 0 0 0-.98-1.408h-.105q-.151 0-.298.04L2.022 6.509a.707.707 0 0 0 .046 1.375zm-3.48.834L5 10l3.71 3.71a2.7 2.7 0 0 0 4.44-.976l2.693-7.308A2.544 2.544 0 0 0 13.454 2h-.104c-.232 0-.464.03-.688.091l-11.03 2.97a2.207 2.207 0 0 0 .142 4.294' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.254 8.521 9.61 5.86a.75.75 0 0 1 .782 1.28L6.586 9.465 9.77 12.65a1.2 1.2 0 0 0 1.973-.433l2.692-7.308a1.045 1.045 0 0 0-.98-1.408h-.105q-.151 0-.298.04L2.022 6.509a.707.707 0 0 0 .046 1.375zm-3.48.834L5 10l3.71 3.71a2.7 2.7 0 0 0 4.44-.976l2.693-7.308A2.544 2.544 0 0 0 13.454 2h-.104c-.232 0-.464.03-.688.091l-11.03 2.97a2.207 2.207 0 0 0 .142 4.294' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E");
    vertical-align: middle;
}
a.telegram:hover:after {
    background-color: var(--yfm-color-link-hover);
}
