/* 1. Базовая центровка и ограничение ширины всей страницы */
html {
    overflow-y: scroll;
}

html,
body {
    min-width: 0;
    overflow-x: hidden;
}

.b-pageLayout {
    width: 1160px;
    max-width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.b-pageContent,
.b-pageContent__layout,
#internal_wrapper,
.b-workZone,
.b-workZone__layout,
.b-article,
.b-article__preWrapper,
.b-article__wrapper,
.b-article__innerWrapper,
.description_on_page {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .b-pageLayout {
        max-width: 100%;
    }
}

/* 2. Изображения */
.description_on_page img {
    width: auto;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Скриншоты вкладок на страницах настроек */
.description_on_page img[src*="ScreenMaster_Main_ru"],
.description_on_page img[src*="ScreenMaster_Setup_ru_1"],
.description_on_page img[src*="ScreenMaster_Setup_ru_2"],
.description_on_page img[src*="ScreenMaster_Setup_ru_3"] {
    display: block;
    max-width: 560px;
    width: 100%;
    margin: 0 auto 12px auto;
}

/* 3А. Таблицы-описания БЕЗ рамок: в одну колонку */
.description_on_page table.detbl:not(:has(td[style*="solid"])),
.description_on_page table.detbl:not(:has(td[style*="solid"])) tbody,
.description_on_page table.detbl:not(:has(td[style*="solid"])) tr,
.description_on_page table.detbl:not(:has(td[style*="solid"])) td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

.description_on_page table.detbl:not(:has(td[style*="solid"])) col {
    display: none;
}

.description_on_page table.detbl:not(:has(td[style*="solid"])) td {
    padding: 6px 10px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Картинки в таблицах-описаниях — по центру */
.description_on_page table.detbl:not(:has(td[style*="solid"])) td .p:has(img),
.description_on_page table.detbl:not(:has(td[style*="solid"])) td:first-child .p {
    text-align: center !important;
}

.description_on_page table.detbl:not(:has(td[style*="solid"])) img {
    display: inline-block;
    margin: 4px auto 14px auto;
}

/* 3Б. Таблицы с данными (с рамками): сохраняем колонки */
.description_on_page table.detbl:has(td[style*="solid"]) {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.description_on_page table.detbl:has(td[style*="solid"]) td {
    padding: 8px 10px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 4. Выравнивание абзацев */
.description_on_page .p[style*="justify"] {
    text-align: left !important;
    line-height: 1.5;
}

.description_on_page .p[style*="center"] {
    text-align: center !important;
}

.description_on_page .p[style*="center"] img,
.description_on_page .p[style*="center"] hr {
    margin-left: auto;
    margin-right: auto;
}

/* 5. Списки внутри статей: маркер и текст в одной строке, выравнивание влево */
.b-article ul.de_list,
.description_on_page ul.de_list {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 6px 0 14px 0;
    padding-left: 22px;
    list-style-type: disc;
    list-style-position: outside;
    text-align: left;
    float: none;
}

.b-article ul.de_list li,
.description_on_page ul.de_list li {
    display: list-item;
    width: auto;
    max-width: 100%;
    margin: 0 0 6px 0;
    padding: 0;
    text-align: left;
    float: none;
}

.b-article ul.de_list li .p,
.description_on_page ul.de_list li .p {
    display: inline !important;
    line-height: 1.5;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    float: none;
}

/* 6. Главная страница manual.html: двухколоночный вводный блок */
.manual-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 16px 0 20px 0;
}

.manual-hero__text {
    flex: 1 1 auto;
    min-width: 0;
}

.manual-hero__image {
    flex: 0 0 250px;
    text-align: center;
}

@media (max-width: 820px) {
    .manual-hero {
        flex-direction: column;
    }

    .manual-hero__image {
        order: -1;
        flex: 0 0 auto;
    }
}

/* 7. Страница images.html: адаптивная сетка карточек */
.interface-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 12px 0 24px 0;
}

.interface-card {
    text-align: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.interface-card__title {
    margin-bottom: 10px;
    font-weight: 600;
}

.interface-card__link {
    text-decoration: none;
}

.interface-card__link:hover {
    text-decoration: underline;
}

.interface-card__img {
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: center;
}

.interface-card__img .p {
    padding: 0;
    margin: 0;
    text-align: center;
}

.interface-card__img a {
    display: inline-block;
    max-width: 100%;
    margin: 0 auto 8px auto;
}

.interface-card__img a:last-child {
    margin-bottom: 0;
}

.interface-card__img img {
    display: block;
    float: none;
    position: static;
    left: auto;
    width: auto;
    max-width: 100%;
    max-height: 280px;
    height: auto;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 760px) {
    .interface-grid {
        grid-template-columns: 1fr;
    }
}

/* Строки «картинка слева — текст справа» на странице путей и имен файлов */
.path-rows {
    margin: 12px 0 24px 0;
}

.path-row {
    margin-bottom: 18px;
}

.path-row::after {
    content: "";
    display: table;
    clear: both;
}

.path-row__media {
    float: left;
    margin: 0 20px 10px 0;
    text-align: left;
}

.path-row__media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
}

.path-row__text {
    text-align: left;
}

@media (max-width: 720px) {
    .path-row__media {
        float: none;
        margin: 0 0 10px 0;
    }
}

/* Тонкие горизонтальные разделители между пунктами настроек */
.path-divider {
    border: none;
    border-top: 1px solid #cbd5e1;
    height: 1px;
    background: transparent;
    margin: 14px 0;
    clear: both;
}

/* Центрируем и оформляем заголовок секции как главный заголовок страницы */
.description_on_page h2.section-heading {
    display: block;
    width: 100%;
    margin: 24px 0 12px 0;
    padding: 0;
    border: none;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #2b4c7e;
    text-align: center;
    float: none;
}

/* Выравниваем пункты выбора области захвата строго по левому краю */
.description_on_page table.detbl:not(:has(td[style*="solid"])) td .p {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.description_on_page img[src*="btn_define_area.png"] {
    display: inline-block;
    vertical-align: middle;
    float: none;
    margin: 0 4px;
}

/* Светло-серый фон основной рабочей области */
.b-workZone {
    background: transparent !important;
}

/* Заголовок содержания справки */
.menu_on_page > h2 {
    display: inline-block;
    font-family: Arial, sans-serif;
    font-size: 11pt;
    font-weight: bold;
    font-style: normal;
    color: #4f87fd;
    text-decoration: none;
    margin: 5px 0 3px;
    padding: 0;
    border: none;
    line-height: normal;
    white-space: pre;
    text-align: left;
    letter-spacing: normal;
    word-spacing: normal;
}

/* Название ScreenMaster */
span.de_DAAA3A59A2 {
    font-weight: normal;
    font-style: normal;
    text-decoration: none;
}

span.de_DAAA3A59A2 strong {
    font-weight: bold;
    font-style: normal;
    text-decoration: none;
    color: inherit;
}

/* Заголовки статей справки */
.b-article .description_on_page h1 {
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: normal;
    word-spacing: normal;
    margin: 8px 0 12px 0;
    max-width: none;
    text-shadow: none;
}

/* Единый стиль текстовых ссылок внутри статей и перечня настроек */
.description_on_page a,
.description_on_page a:link,
.description_on_page a:visited,
.description_on_page a span,
.menu_on_page .b-tree__itemText a,
.menu_on_page .b-tree__itemText a:link,
.menu_on_page .b-tree__itemText a:visited,
.menu_on_page .b-tree__itemText a span {
    color: #2184d0;
    text-decoration: none;
}

.description_on_page a,
.menu_on_page .b-tree__itemText a {
    border-bottom: 1px solid #85bde7;
}

.description_on_page a:hover,
.description_on_page a:hover span,
.menu_on_page .b-tree__itemText a:hover,
.menu_on_page .b-tree__itemText a:hover span {
    color: #5db2f3;
}

.description_on_page a:hover,
.menu_on_page .b-tree__itemText a:hover {
    border-bottom-color: #a3d4f9;
}

.description_on_page a:focus-visible {
    outline: 2px solid #85bde7;
    outline-offset: 2px;
}

/* Светло-голубая рамка вокруг статьи и цвет вкладок меню, как в старой справке */
.b-article,
.m-tabs__selectorItem__selected .b-tabs__selectorContent,
.b-tabs__wrapperItems {
    background-color: #eaf7ff !important;
}

html,
body {
    min-height: 100%;
}

body {
    background:
        linear-gradient(180deg, rgba(38, 156, 174, 0.17) 0%, rgba(38, 156, 174, 0) 38%, rgba(27, 113, 151, 0.06) 100%),
        linear-gradient(180deg, #f7faff 0%, #edf4fc 55%, #ffffff 100%) no-repeat !important;
    background-attachment: fixed !important;
}