/* ===== css/documentation-fullscreen-up.css?v=20260722-3 ===== */
/* Только documentation.html: увеличенная вверх карусель в режиме «Полный экран». */
body.documentation-page .viewer4.open {
    grid-template-rows: minmax(0, 1fr) auto auto !important;
    gap: 6px !important;
    padding-top: 4px !important;
}

body.documentation-page .viewer4.open .viewer4__stage {
    min-height: 0 !important;
    border-radius: 18px !important;
    perspective-origin: 50% 42% !important;
}

body.documentation-page .viewer4.open .viewer4__card {
    top: 49% !important;
}

/* Основная страница и изображение используют всю рассчитанную высоту карточки. */
body.documentation-page .viewer4.open .viewer4__card.active .viewer4__card-page,
body.documentation-page .viewer4.open .viewer4__card.active img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
}

/* Убирает визуальное дрожание исходной картинки после кнопки «Возврат». */
body.documentation-page #doc2026Image,
body.documentation-page .doc2026__viewer,
body.documentation-page .doc2026__viewer > img,
body.documentation-page.doc-return-stable #doc2026Image,
body.documentation-page.doc-return-stable .doc2026__viewer,
body.documentation-page.doc-return-stable .doc2026__viewer * {
    transition: none !important;
    animation: none !important;
}

body.documentation-page.doc-return-stable #doc2026Image {
    transform: none !important;
    will-change: auto !important;
}

@media (max-height: 760px) {
    body.documentation-page .viewer4.open {
        gap: 4px !important;
        padding-top: 2px !important;
    }
}

/* 2026-07-22: миниатюры разворотов и дополнительный нижний зазор.
   Только documentation.html в режиме «Полный экран». */
body.documentation-page .viewer4.open {
    /* Строка 2 — постоянный воздушный зазор между сценой и линейкой кнопок. */
    grid-template-rows: minmax(0, 1fr) 14px auto auto !important;
    column-gap: 0 !important;
    row-gap: 6px !important;
    padding-top: 2px !important;
}

body.documentation-page .viewer4.open .viewer4__stage {
    /* Сцена поднята, а снизу оставлено безопасное место перед управлением. */
    margin-bottom: 0 !important;
}

body.documentation-page .viewer4.open .viewer4__card {
    top: 47% !important;
}

body.documentation-page .viewer4.open .viewer4__controls {
    grid-row: 3 !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}

body.documentation-page .viewer4.open .viewer4__thumbs {
    grid-row: 4 !important;
    margin-top: 4px !important;
}

/* Высота всех изображений миниатюр едина, а ширина разворота вычисляется
   из реального соотношения сторон изображения. */
body.documentation-page .viewer4.open .viewer4__thumb {
    --documentation-thumb-height: clamp(64px, 6.1vw, 88px);
}

body.documentation-page .viewer4.open .viewer4__thumb img {
    height: var(--documentation-thumb-height) !important;
}

body.documentation-page .viewer4.open .viewer4__thumb.landscape {
    flex: 0 0 min(280px, calc(var(--documentation-thumb-height) * var(--documentation-thumb-ratio, 1.78) + 14px)) !important;
    width: min(280px, calc(var(--documentation-thumb-height) * var(--documentation-thumb-ratio, 1.78) + 14px)) !important;
    min-width: 150px !important;
    max-width: 280px !important;
}

body.documentation-page .viewer4.open .viewer4__thumb.landscape img {
    width: 100% !important;
    height: var(--documentation-thumb-height) !important;
    object-fit: contain !important;
}

@media (max-height: 760px) {
    body.documentation-page .viewer4.open {
        grid-template-rows: minmax(0, 1fr) 10px auto auto !important;
        row-gap: 4px !important;
    }

    body.documentation-page .viewer4.open .viewer4__card {
        top: 46.5% !important;
    }

    body.documentation-page .viewer4.open .viewer4__thumb {
        --documentation-thumb-height: clamp(56px, 5.4vw, 72px);
    }
}


/* ===== css/three-pages-thumbnails-stable.css?v=20260722-1 ===== */
/* Только documentation.html, news-lawyer-1mln.html и news-lawyer-electro.html.
   Стабилизация основной ленты миниатюр после кнопки «Возврат». */
body.three-pages-thumb-stable .doc2026__thumbs,
body.three-pages-thumb-stable #doc2026Thumbs {
    scroll-behavior: auto !important;
    overflow-anchor: none !important;
    contain: layout paint !important;
}

body.three-pages-thumb-stable .doc2026__thumb,
body.three-pages-thumb-stable .doc2026__thumb *,
body.three-pages-thumb-stable .doc2026__thumb img {
    animation: none !important;
    transition: none !important;
}

body.three-pages-thumb-stable .doc2026__thumb {
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

body.three-pages-thumb-stable .doc2026__thumb img {
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transform: translateZ(0) !important;
}

body.three-pages-thumb-stable.thumb-return-freeze .doc2026__thumb {
    transform: none !important;
    contain: layout paint !important;
}


/* ===== css/documentation-thumbnails-return-stable.css?v=20260722-3 ===== */
/* Только documentation.html: неизменная лента миниатюр при возврате. */
body.documentation-thumb-return-stable #doc2026Thumbs,
body.documentation-thumb-return-stable .doc2026__thumbs {
    scroll-behavior: auto !important;
    overflow-anchor: none !important;
    contain: layout paint !important;
}

body.documentation-thumb-return-stable .doc2026__thumb,
body.documentation-thumb-return-stable .doc2026__thumb *,
body.documentation-thumb-return-stable .doc2026__thumb img {
    animation: none !important;
    transition: none !important;
}

body.documentation-thumb-return-stable .doc2026__thumb img {
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
}

body.documentation-thumb-return-stable.documentation-return-freeze-v3 #doc2026Thumbs,
body.documentation-thumb-return-stable.documentation-return-freeze-v3 .doc2026__thumbs,
body.documentation-thumb-return-stable.documentation-return-freeze-v3 .doc2026__thumb {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
}


/* ===== css/documentation-clean-viewer.css?v=987 ===== */
/* documentation.html: полноэкранный просмотр без проводника и папочной ленты. */
#viewer2026Overlay .viewer140-pro-explorer,
#viewer2026Overlay .viewer150-pro-explorer,
#viewer2026Overlay .viewer155-explorer-panel,
#viewer2026Overlay .viewer155-explorer,
#viewer2026Overlay .viewer140-pro-topbar,
#viewer2026Overlay .viewer150-pro-topbar,
#viewer2026Overlay [data-v155-root],
#viewer2026Overlay [data-v155-folders],
#viewer2026Overlay [data-v155-toggle],
#viewer2026Overlay [data-v155-refresh],
#viewer2026Overlay [data-v155-status] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#viewer2026Overlay.viewer13482-explorer-open,
#viewer2026Overlay {
  --viewer-explorer-width: 0px !important;
  --viewer-topbar-height: 0px !important;
}

/* v3: основной документ не затемняется при возврате из полноэкранного режима. */
body.documentation-thumb-return-stable #doc2026Image {
    transition: none !important;
}
.documentation-return-cover {
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

/* v4: при возврате основной документ не может быть скрыт отложенным show(). */
html.documentation-return-lock #doc2026Image,
body.documentation-return-lock #doc2026Image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transition: none !important;
    animation: none !important;
}

/* 2026-07-24: фиксированная геометрия основного просмотра.
   Высота равна прежней максимальной высоте портретного документа, поэтому
   смена портретного листа на альбомный разворот больше не изменяет поток
   страницы и не сдвигает панель управления вверх-вниз. */
body.documentation-page .doc2026__viewer {
    box-sizing: border-box !important;
    height: 730px !important;
    min-height: 730px !important;
    overflow: hidden !important;
}

body.documentation-page .doc2026__viewer > #doc2026Image {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 700px !important;
    object-fit: contain !important;
    flex: 0 1 auto !important;
}

/* Класс ориентации может менять ширину, но больше не влияет на высоту блока. */
body.documentation-page .doc2026__viewer > #doc2026Image.landscape {
    width: min(100%, 1100px) !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    body.documentation-page .doc2026__viewer {
        height: calc(72vh + 16px) !important;
        min-height: calc(72vh + 16px) !important;
    }

    body.documentation-page .doc2026__viewer > #doc2026Image,
    body.documentation-page .doc2026__viewer > #doc2026Image.landscape {
        max-height: 72vh !important;
    }
}

/* v.400: полностью прозрачная подложка под основным документом. */
body.page-documents .doc2026__viewer {
    background: transparent !important;
    background-color: rgba(255, 255, 255, 0) !important;
    box-shadow: none !important;
}


/* HTML cleanup v987: former inline presentation rules from documentation.html. */
#education-documents {
    scroll-margin-top: 120px;
}

.documentation-entry-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 24px 0 8px;
    position: relative;
    z-index: 10;
}

#documents-entry {
    visibility: visible;
    scroll-margin-top: 72px;
}

