/* Подключаем шрифты */
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Martian+Mono:wght@400;500;700&display=swap');

/* Применяем шрифты через переменные Gravity UI */
.g-root {
    --g-text-header-font-family: 'Golos Text', 'Helvetica Neue', 'Arial', 'Helvetica', sans-serif;
    --g-font-family-sans: 'Golos Text', 'Helvetica Neue', 'Arial', 'Helvetica', sans-serif;
    --g-font-family-monospace: 'Martian Mono', 'Monaco', 'Consolas', 'Ubuntu Mono',
        'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', 'Courier', monospace;
    --g-text-accent-font-weight: 700;
    --g-line-height: 25px;

}

/* Применяем шрифты к контентной области */
.yfm {
    font-family: var(--g-font-family-sans) !important;
    line-height: 25px !important;
}

.yfm code,
.yfm pre code {
    font-family: var(--g-font-family-monospace) !important;
    font-size: 13px !important;
}


/* Выравниваем высоту строк в левом меню */
.dc-toc-item__text {
    line-height: 20px !important;
}

/* Увеличиваем отступ у всех пунктов списков в контенте */
.yfm ul > li,
.yfm ol > li {
    margin-top: 8px;
}

/* Увеличиваем ширину левого меню */
@media screen and (min-width: 1280px) {
    .dc-doc-layout__toc {
        width: 320px !important;
    }
    .dc-doc-layout__left {
        width: 342px !important;
    }
}

.img-caption {
    display: block;
    text-align: center;
    color: #808080;
    font-size: 13px;
}

.wn-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.2;
    margin-right: 6px;
    text-align: center;
    vertical-align: baseline;
}

.wn-badge--yellow {
    background: #fff8cc;
    border-color: #f0cf4d;
    color: #7a5a00;
}

.wn-badge--blue {
    background: #f3ecff;
    border-color: #b08af5;
    color: #5a2ca0;
}

.wn-badge--green {
    background: #eaf9ef;
    border-color: #76c98f;
    color: #1f6b3a;
}

/* Встраиваемое видео (Rutube и др.): полная ширина контента, скругление, 16:9, мобильные */
.yfm .video-embed {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 1 / 1) {
    .yfm .video-embed {
        aspect-ratio: auto;
        height: 0;
        padding-bottom: 56.25%;
    }
}

.yfm .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border: 0;
    display: block;
}