/**
 * Artcore CMS
 *
 * @copyright (c) 2026 АРТЕФАКТ. Все права защищены.
 * @license   Проприетарная лицензия, см. LICENSE.txt
 */

/*
 * Сетка конструктора и базовый вид элементов. Цвета, шрифты и скругления —
 * переменные --ac-*: шаблон сайта переопределяет их, не трогая сетку.
 * Точки перелома: планшет — до 1024 px, телефон — до 640 px.
 */
:root {
    --ac-text: #111111;
    --ac-muted: #6b6b66;
    --ac-line: #e5e4df;
    --ac-surface: #ffffff;
    --ac-soft: #f4f3ef;
    --ac-accent: #0071e3;
    --ac-accent-text: #ffffff;
    --ac-dark: #111111;
    --ac-dark-text: #f4f3ef;
    --ac-radius: 0px; /* скругление содержимого элементов; своё задаётся на вкладке «Стиль» */
    --ac-container: 1160px;
    --ac-narrow: 760px;
    --ac-heading-font: inherit;
    --ac-heading-weight: 600;
}

/* Секции и сетка */
.ac-layout { display: block; }
.ac-section { position: relative; padding-top: var(--ac-pt, 64px); padding-bottom: var(--ac-pb, 64px); background-size: cover; background-position: center; }
.ac-container { max-width: var(--ac-container); margin-inline: auto; padding-inline: 16px; }
.ac-w-narrow > .ac-container { max-width: var(--ac-narrow); }
.ac-w-full > .ac-container { max-width: none; }
.ac-theme-soft { background-color: var(--ac-soft); }
.ac-theme-dark { background-color: var(--ac-dark); color: var(--ac-dark-text); --ac-text: var(--ac-dark-text); --ac-muted: #bdbcb6; --ac-line: #34332f; }
.ac-theme-accent { background-color: var(--ac-accent); color: var(--ac-accent-text); --ac-text: var(--ac-accent-text); --ac-muted: rgba(255, 255, 255, .8); --ac-line: rgba(255, 255, 255, .3); }
.ac-has-bg.ac-theme-dark { background-color: rgba(0, 0, 0, .55); background-blend-mode: multiply; }

/* Фон, затемнение, высота и оформление секций и колонок (настройки конструктора) */
.ac-col.ac-has-bg, .ac-el.ac-has-bg { background-size: cover; }
/* Анимация появления элементов: класс ac-anim-on ставит скрипт сайта (без скрипта и при
   «уменьшить движение» элементы видны сразу). */
.ac-anim-on [data-ac-anim] { opacity: 0; }
.ac-anim-on [data-ac-anim="up"] { transform: translateY(36px); }
.ac-anim-on [data-ac-anim="down"] { transform: translateY(-36px); }
.ac-anim-on [data-ac-anim="left"] { transform: translateX(-48px); }
.ac-anim-on [data-ac-anim="right"] { transform: translateX(48px); }
.ac-anim-on [data-ac-anim="zoom"] { transform: scale(.9); }
/* Плавно только появление; скрытие при загрузке — мгновенное. */
.ac-anim-on [data-ac-anim].ac-in { opacity: 1; transform: none; transition: opacity var(--ac-anim-d, .6s) ease var(--ac-anim-delay, 0s), transform var(--ac-anim-d, .6s) cubic-bezier(.2, .7, .2, 1) var(--ac-anim-delay, 0s); }
.ac-has-video { overflow: hidden; }
.ac-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.ac-has-overlay::after { content: ""; position: absolute; inset: 0; z-index: 0; background: var(--ac-ov); opacity: var(--ac-ov-o, .5); border-radius: inherit; pointer-events: none; }
.ac-has-video > .ac-container, .ac-has-overlay > .ac-container { position: relative; z-index: 1; }
.ac-section.ac-minh { display: flex; flex-direction: column; }
.ac-section.ac-minh > .ac-container { width: 100%; }
.ac-svalign-center { justify-content: center; }
.ac-svalign-bottom { justify-content: flex-end; }
.ac-cols-natural > .ac-container > .ac-row { align-items: start; }
.ac-shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08); }
.ac-shadow-md { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.ac-shadow-lg { box-shadow: 0 18px 44px rgba(0, 0, 0, .18); }
/* Цвет ссылок, затемнение колонок и элементов, изменение при наведении, фигурный край секции */
.ac-has-link a:not(.ac-btn) { color: var(--ac-link); }
.ac-col.ac-has-overlay, .ac-el.ac-has-overlay { position: relative; isolation: isolate; }
.ac-col.ac-has-overlay::after, .ac-el.ac-has-overlay::after { z-index: -1; }
.ac-hover { transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease; }
.ac-layout .ac-hover-lift:hover { transform: translateY(-6px); }
.ac-layout .ac-hover-zoom:hover { transform: scale(1.03); }
.ac-layout .ac-hover-lift:hover, .ac-layout .ac-hover-shadow:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, .18) !important; }
.ac-layout .ac-hover-bg:hover { background-color: var(--ac-hbg) !important; }
.ac-layout .ac-hover-bg.ac-has-gradient:hover { background-image: none !important; }
.ac-layout .ac-hover-tx:hover { color: var(--ac-htx) !important; --ac-text: var(--ac-htx); }
.ac-shape { position: absolute; left: 0; right: 0; height: var(--ac-sh, 60px); line-height: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ac-shape svg { display: block; width: 100%; height: 100%; }
.ac-shape-top { top: -1px; }
.ac-shape-bottom { bottom: -1px; transform: rotate(180deg); }
.ac-shape-flip svg { transform: scaleX(-1); }
.ac-has-shape > .ac-container { position: relative; z-index: 1; }
@media (max-width: 640px) { .ac-shape { height: calc(var(--ac-sh, 60px) * .6); } }
@media (prefers-reduced-motion: reduce) {
    .ac-hover { transition: none; }
    .ac-layout .ac-hover:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .ac-bg-video { display: none; } }

.ac-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--ac-gap, 24px); align-items: stretch; }
/* Своего скругления у колонки нет: углы задаются на вкладке «Стиль» (radius_tl…bl). */
.ac-col { min-width: 0; display: flex; flex-direction: column; gap: var(--ac-el-gap, 20px); }
.ac-col > * { min-width: 0; }
.ac-valign-center { justify-content: center; }
.ac-valign-bottom { justify-content: flex-end; }
.ac-col-d-1 { grid-column: span 1; } .ac-col-d-2 { grid-column: span 2; } .ac-col-d-3 { grid-column: span 3; }
.ac-col-d-4 { grid-column: span 4; } .ac-col-d-5 { grid-column: span 5; } .ac-col-d-6 { grid-column: span 6; }
.ac-col-d-7 { grid-column: span 7; } .ac-col-d-8 { grid-column: span 8; } .ac-col-d-9 { grid-column: span 9; }
.ac-col-d-10 { grid-column: span 10; } .ac-col-d-11 { grid-column: span 11; } .ac-col-d-12 { grid-column: span 12; }

@media (min-width: 1025px) {
    .ac-hide-d { display: none !important; }
}
@media (max-width: 1024px) {
    .ac-col-t-1 { grid-column: span 1; } .ac-col-t-2 { grid-column: span 2; } .ac-col-t-3 { grid-column: span 3; }
    .ac-col-t-4 { grid-column: span 4; } .ac-col-t-5 { grid-column: span 5; } .ac-col-t-6 { grid-column: span 6; }
    .ac-col-t-7 { grid-column: span 7; } .ac-col-t-8 { grid-column: span 8; } .ac-col-t-9 { grid-column: span 9; }
    .ac-col-t-10 { grid-column: span 10; } .ac-col-t-11 { grid-column: span 11; } .ac-col-t-12 { grid-column: span 12; }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .ac-hide-t { display: none !important; }
}
@media (max-width: 640px) {
    .ac-section { padding-top: calc(var(--ac-pt, 64px) * .65); padding-bottom: calc(var(--ac-pb, 64px) * .65); }
    .ac-col-m-1 { grid-column: span 1; } .ac-col-m-2 { grid-column: span 2; } .ac-col-m-3 { grid-column: span 3; }
    .ac-col-m-4 { grid-column: span 4; } .ac-col-m-5 { grid-column: span 5; } .ac-col-m-6 { grid-column: span 6; }
    .ac-col-m-7 { grid-column: span 7; } .ac-col-m-8 { grid-column: span 8; } .ac-col-m-9 { grid-column: span 9; }
    .ac-col-m-10 { grid-column: span 10; } .ac-col-m-11 { grid-column: span 11; } .ac-col-m-12 { grid-column: span 12; }
    .ac-order-m-1 { order: 1; } .ac-order-m-2 { order: 2; } .ac-order-m-3 { order: 3; } .ac-order-m-4 { order: 4; }
    .ac-order-m-5 { order: 5; } .ac-order-m-6 { order: 6; } .ac-order-m-7 { order: 7; } .ac-order-m-8 { order: 8; }
    .ac-order-m-9 { order: 9; } .ac-order-m-10 { order: 10; } .ac-order-m-11 { order: 11; } .ac-order-m-12 { order: 12; }
    .ac-hide-m { display: none !important; }
}

/* Общие для элементов */
.ac-el { min-width: 0; }
.ac-align-center { text-align: center; }
.ac-align-right { text-align: right; }
.ac-muted { color: var(--ac-muted); }
.ac-heading { margin: 0; font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1.ac-heading { font-size: 2.6em; } h2.ac-heading { font-size: 1.9em; } h3.ac-heading { font-size: 1.35em; }
h4.ac-heading { font-size: 1.15em; } h5.ac-heading, h6.ac-heading { font-size: 1em; }
.ac-heading.ac-size-large { font-size: clamp(2em, 4vw, 3em); }
.ac-heading.ac-size-huge { font-size: clamp(2.2em, 5.2vw, 4em); }
/* Элементы подстраиваются под ширину своей колонки, а не только экрана:
   в узкой колонке заголовок мельче, плитки галереи и материалов — в меньше рядов. */
.ac-el-heading, .ac-el-gallery, .ac-el-articles { container-type: inline-size; }
@container (max-width: 380px) {
    .ac-layout .ac-el-heading .ac-heading.ac-heading { font-size: clamp(1.1em, 9cqi, 1.7em); overflow-wrap: break-word; hyphens: auto; }
    .ac-layout .ac-el-heading :is(h3, h4, h5, h6).ac-heading.ac-heading { font-size: clamp(1em, 7cqi, 1.25em); }
    .ac-layout .ac-el-gallery .ac-gallery { grid-template-columns: repeat(min(var(--ac-cols, 3), 2), minmax(0, 1fr)); }
}
@container (max-width: 560px) {
    .ac-layout .ac-el-articles .ac-articles { grid-template-columns: minmax(0, 1fr); }
}
.ac-text, .ac-plain { margin: 0; line-height: 1.65; }
.ac-text > :first-child { margin-top: 0; }
.ac-text > :last-child { margin-bottom: 0; }
.ac-text img { max-width: 100%; height: auto; }
.ac-size-large { font-size: 1.15em; }
.ac-size-small { font-size: .9em; }
.ql-align-center { text-align: center; } .ql-align-right { text-align: right; } .ql-align-justify { text-align: justify; }

/* Кнопки */
.ac-buttons { display: block; }
.ac-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px;
    border-radius: var(--ac-radius); border: 1px solid var(--ac-accent); background: var(--ac-accent); color: var(--ac-accent-text);
    font: inherit; font-weight: 500; text-decoration: none; line-height: 1.2; cursor: pointer; max-width: 100%;
}
.ac-btn:hover { filter: brightness(.94); }
.ac-btn-outline { background: transparent; color: var(--ac-text); border-color: currentColor; }
.ac-btn-link { background: transparent; border-color: transparent; color: var(--ac-text); padding-inline: 0; text-decoration: underline; text-underline-offset: 4px; }
.ac-btn-large { padding: 14px 28px; font-size: 1.08em; }
.ac-theme-accent .ac-btn-primary { background: var(--ac-accent-text); color: var(--ac-accent); border-color: var(--ac-accent-text); }

/* Изображения и пропорции */
.ac-figure { margin: 0; }
.ac-figure img, .ac-figure a { display: block; width: 100%; }
.ac-figure img { height: auto; border-radius: var(--ac-radius); }
.ac-figure figcaption { font-size: .9em; color: var(--ac-muted); margin-top: 8px; }
.ac-ratio-21x9 img, .ac-ratio-21x9 .ac-slide-media { aspect-ratio: 21 / 9; }
.ac-ratio-16x9 img, .ac-ratio-16x9 .ac-slide-media, .ac-video.ac-ratio-16x9 { aspect-ratio: 16 / 9; }
.ac-ratio-4x3 img, .ac-ratio-4x3 .ac-slide-media, .ac-video.ac-ratio-4x3 { aspect-ratio: 4 / 3; }
.ac-ratio-1x1 img, .ac-ratio-1x1 .ac-slide-media, .ac-video.ac-ratio-1x1 { aspect-ratio: 1; }
.ac-ratio-3x4 img { aspect-ratio: 3 / 4; }
.ac-video.ac-ratio-9x16 { aspect-ratio: 9 / 16; max-width: 420px; }
.ac-figure[class*="ac-ratio-"]:not(.ac-ratio-auto) img, .ac-gallery:not(.ac-ratio-auto) img { object-fit: cover; height: auto; }

/* Галерея */
.ac-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--ac-cols, 3), minmax(0, 1fr)); gap: 12px; }
.ac-gallery a { display: block; }
.ac-gallery img { display: block; width: 100%; border-radius: var(--ac-radius); }
.ac-gallery .ac-caption { display: block; font-size: .85em; color: var(--ac-muted); margin-top: 6px; }
@media (max-width: 640px) { .ac-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Слайдер */
.ac-slider { position: relative; }
.ac-slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; gap: 0; border-radius: var(--ac-radius); }
.ac-slider-track::-webkit-scrollbar { display: none; }
.ac-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; display: grid; }
.ac-slide-media { background: var(--ac-soft); border-radius: var(--ac-radius); overflow: hidden; }
.ac-slide-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto; }
.ac-slide-title { font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); font-size: clamp(1.6em, 3.4vw, 2.6em); line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
.ac-slide-text p { margin: 0 0 14px; }
.ac-slider-overlay .ac-slide-text {
    position: absolute; left: 24px; bottom: 24px; max-width: min(520px, calc(100% - 48px)); padding: 24px;
    background: var(--ac-surface); color: var(--ac-text); border-radius: var(--ac-radius);
}
.ac-slider-split .ac-slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.ac-slider-split .ac-slide-media { order: 2; }
.ac-slider-below .ac-slide-text { padding-top: 20px; }
.ac-slider-controls { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.ac-slider-controls button {
    width: 44px; height: 44px; border-radius: var(--ac-radius); border: 1px solid var(--ac-line); background: var(--ac-surface);
    color: var(--ac-text); font-size: 18px; cursor: pointer;
}
.ac-slider-dots { display: flex; gap: 6px; margin-left: 8px; }
.ac-slider-dots button { width: 28px; height: 3px; padding: 0; border: 0; border-radius: 0; background: var(--ac-line); }
.ac-slider-dots button[aria-current="true"] { background: var(--ac-accent); }
@media (max-width: 860px) {
    .ac-slider-split .ac-slide { grid-template-columns: 1fr; gap: 20px; }
    .ac-slider-split .ac-slide-media { order: 0; }
    .ac-slider-overlay .ac-slide-text { position: static; max-width: none; padding: 18px 0 0; background: none; }
}

/* Аккордеон и вкладки */
.ac-accordion details { border-top: 1px solid var(--ac-line); }
.ac-accordion details:last-child { border-bottom: 1px solid var(--ac-line); }
.ac-accordion summary {
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0;
    font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); font-size: 1.1em;
}
.ac-accordion summary::-webkit-details-marker { display: none; }
.ac-accordion summary::after { content: "+"; color: var(--ac-accent); font-weight: 400; }
.ac-accordion details[open] summary::after { content: "−"; }
.ac-accordion-body { padding-bottom: 18px; color: var(--ac-muted); }
.ac-accordion-body > :first-child { margin-top: 0; }
.ac-tabs-list { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--ac-line); margin-bottom: 18px; }
.ac-tabs-list button {
    font: inherit; font-weight: 500; padding: 10px 14px; background: none; border: 0; border-bottom: 2px solid transparent;
    color: var(--ac-muted); cursor: pointer; margin-bottom: -1px;
}
.ac-tabs-list button[aria-selected="true"] { color: var(--ac-text); border-bottom-color: var(--ac-accent); }
.ac-tabs.is-ready .ac-tab-title { display: none; }
.ac-tab-title { font-size: 1.1em; margin: 18px 0 8px; }

/* Материалы */
.ac-articles { display: grid; grid-template-columns: repeat(var(--ac-cols, 3), minmax(0, 1fr)); gap: 28px 24px; }
.ac-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ac-card-media { display: block; aspect-ratio: 3 / 2; background: var(--ac-soft); border-radius: var(--ac-radius); overflow: hidden; }
.ac-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-card-body { display: flex; flex-direction: column; gap: 8px; }
.ac-card-meta { margin: 0; font-size: .85em; color: var(--ac-muted); }
.ac-card-title { margin: 0; font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); font-size: 1.15em; line-height: 1.3; }
.ac-card-title a { color: inherit; text-decoration: none; }
.ac-card-title a:hover { text-decoration: underline; }
.ac-card p { margin: 0; }
.ac-more { color: var(--ac-accent); font-weight: 500; text-decoration: none; }
.ac-articles-grid .ac-card { position: relative; }
.ac-articles-grid .ac-card-media { aspect-ratio: 1; }
/* Материал без изображения и без заглушки в «Настройках» — серый фон. */
.ac-card-media.is-empty { background: var(--ac-placeholder, #d6d5d0); }
.ac-articles-grid .ac-card-body { position: absolute; inset: auto 0 0 0; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); border-radius: 0 0 var(--ac-radius) var(--ac-radius); }
.ac-articles-grid .ac-card-meta { color: rgba(255, 255, 255, .85); }
.ac-articles-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 24px; padding-bottom: 8px; }
.ac-articles-slider { --ac-per: 3; scrollbar-width: none; }
.ac-articles-slider::-webkit-scrollbar { display: none; }
.ac-articles-slider .ac-card { flex: 0 0 calc((100% - (var(--ac-per) - 1) * 24px) / var(--ac-per)); scroll-snap-align: start; }
.ac-strip-wrap { position: relative; }
.ac-strip-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ac-strip-nav button { width: 40px; height: 40px; border: 1px solid var(--ac-line); background: var(--ac-bg, #fff); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.ac-strip-nav button:disabled { opacity: .35; cursor: default; }
.ac-articles-list { list-style: none; margin: 0; padding: 0; }
.ac-articles-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 20px 0; border-top: 1px solid var(--ac-line); }
.ac-articles-list li:last-child { border-bottom: 1px solid var(--ac-line); }
.ac-articles-list h3 { margin: 0; font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); font-size: 1.15em; }
.ac-articles-list h3 a { color: inherit; text-decoration: none; }
.ac-articles-list p { margin: 4px 0 0; }
.ac-date-block strong { display: block; font-family: var(--ac-heading-font); font-size: 2.1em; line-height: 1; font-variant-numeric: tabular-nums; }
.ac-date-block small { display: block; color: var(--ac-muted); margin-top: 6px; }
@media (max-width: 1024px) {
    .ac-articles { grid-template-columns: repeat(min(var(--ac-cols, 3), 2), minmax(0, 1fr)); }
    .ac-articles-slider .ac-card { flex-basis: calc((100% - (min(var(--ac-per), 2) - 1) * 24px) / min(var(--ac-per), 2)); }
}
@media (max-width: 640px) {
    .ac-articles { grid-template-columns: minmax(0, 1fr); }
    .ac-articles-slider .ac-card { flex-basis: 85%; }
    .ac-articles-list li { grid-template-columns: 64px minmax(0, 1fr); }
    .ac-articles-list .ac-btn { grid-column: 2; justify-self: start; }
}

/* Значок с текстом */
.ac-icon-text { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.ac-icon-left { flex-direction: row; align-items: flex-start; gap: 14px; }
.ac-icon-text.ac-align-center { align-items: center; }
.ac-icon { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ac-radius); background: var(--ac-soft); color: var(--ac-accent); }
.ac-theme-dark .ac-icon, .ac-theme-accent .ac-icon { background: rgba(255, 255, 255, .12); color: inherit; }
.ac-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ac-icon-body { display: flex; flex-direction: column; gap: 4px; }
.ac-icon-title { font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); font-size: 1.1em; }
a.ac-icon-text:hover .ac-icon-title { color: var(--ac-accent); }

/* Разделитель, видео, встраиваемый блок */
.ac-divider-line { display: flex; align-items: center; }
.ac-divider-line::before { content: ""; flex: 1; border-top: 1px solid var(--ac-line); }
.ac-video { position: relative; width: 100%; background: #000; border-radius: var(--ac-radius); overflow: hidden; }
.ac-video iframe, .ac-video video { width: 100%; height: 100%; border: 0; display: block; }
/* Узкий плеер (например, вертикальный 9:16) — по центру, слева или справа. */
.ac-video-center { margin-inline: auto; }
.ac-video-right { margin-left: auto; }
/* Изображение заданной ширины — не шире колонки, по центру, слева или справа. */
.ac-figure-sized { width: 100%; }
.ac-figure-center { margin-inline: auto; }
.ac-figure-right { margin-left: auto; }
.ac-embed { display: block; width: 100%; border: 0; border-radius: var(--ac-radius); background: var(--ac-soft); }

/* Окно просмотра галереи */
.ac-lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: hidden; }
.ac-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.ac-lightbox-count { position: fixed; top: 24px; left: 24px; color: #fff; font-size: 14px; }
.ac-lightbox .ac-lightbox-nav { top: 50%; right: auto; transform: translateY(-50%); }
.ac-lightbox .ac-lightbox-prev { left: 16px; }
.ac-lightbox .ac-lightbox-next { left: auto; right: 16px; }
.ac-lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.ac-lightbox img { display: block; width: calc(100vw - 32px); height: calc(100vh - 32px); object-fit: contain; user-select: none; }
@media (max-width: 640px) { .ac-lightbox .ac-lightbox-nav { top: auto; bottom: 16px; transform: none; } }
.ac-lightbox button { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; background: #fff; color: #111; font-size: 26px; line-height: 1; cursor: pointer; z-index: 1; }
.ac-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Подсказки редактора (выводятся только в режиме правки) */
.ac-note { margin: 0; padding: 12px 14px; border: 1px dashed var(--ac-line); border-radius: var(--ac-radius); color: var(--ac-muted); font-size: 14px; }
.ac-code-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ac-media-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #1f1f1d; color: #fff; border-radius: var(--ac-radius); font-size: 14px; }
.ac-media-card.is-static { position: relative; inset: auto; }
.ac-media-play { width: 64px; height: 64px; background: rgba(255, 255, 255, .16); position: relative; }
.ac-media-play::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 18px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.ac-media-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ac-accent, #0071e3); }
.ac-placeholder-media {
    display: flex; align-items: center; justify-content: center; text-align: center; min-height: 160px; padding: 16px;
    background: var(--ac-soft);
    border: 1px dashed var(--ac-line); border-radius: var(--ac-radius); color: var(--ac-muted); font-size: 14px;
}
.ac-empty-column, .ac-empty-page {
    min-height: 80px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
    border: 1px dashed #c9c8c1; border-radius: var(--ac-radius); color: #8b8a84; font-size: 14px;
}
.ac-empty-page { min-height: 240px; margin: 32px 16px; }

@media (prefers-reduced-motion: reduce) {
    .ac-slider-track, .ac-articles-slider { scroll-behavior: auto; }
}

/* Меню, хлебные крошки, переключатель языка */
.ac-pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ac-line); }
.ac-pager a { font-weight: 500; text-decoration: none; color: inherit; border-bottom: 1px solid currentColor; }
.ac-menu ul { list-style: none; margin: 0; padding: 0; }
.ac-menu a { color: inherit; text-decoration: none; }
.ac-menu a:hover, .ac-menu [aria-current] { color: var(--ac-accent); }
.ac-menu-vertical li + li { margin-top: 6px; }
.ac-menu-vertical ul ul { padding-left: 16px; margin-top: 6px; }
.ac-menu-horizontal > ul { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.ac-menu-horizontal ul ul { display: none; }
.ac-menu-sep { display: block; color: var(--ac-muted); font-size: .85em; }
.ac-menu-group { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; }
.ac-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .9em; color: var(--ac-muted); }
.ac-crumbs a { color: inherit; }
.ac-crumbs [aria-current] { color: var(--ac-text); }
.ac-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9em; }
.ac-langs.ac-align-center { justify-content: center; }
.ac-langs.ac-align-right { justify-content: flex-end; }
.ac-langs a { color: var(--ac-muted); text-decoration: none; }
.ac-langs a[aria-current] { color: var(--ac-text); font-weight: 600; }

/* Блоки в позициях шаблона */
.ac-block-title { max-width: var(--ac-container); margin: 0 auto; padding: 24px 16px 0; font-family: var(--ac-heading-font); font-weight: var(--ac-heading-weight); }

/* Формы обратной связи */
.ac-form { display: grid; gap: 16px; }
.ac-form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ac-form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 14px; }
.ac-form-field.is-wide { grid-column: 1 / -1; }
.ac-form-field > label { font-weight: 500; }
.ac-form input[type=text], .ac-form input[type=email], .ac-form input[type=tel], .ac-form select, .ac-form textarea {
    font: inherit; font-size: 16px; color: var(--ac-text); background: var(--ac-surface); width: 100%;
    border: 1px solid #8f8e88; border-radius: var(--ac-radius); padding: 11px 14px;
}
.ac-form textarea { min-height: 120px; resize: vertical; }
.ac-form :focus-visible { outline: 2px solid var(--ac-accent); outline-offset: 1px; }
.ac-form-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ac-form-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.ac-form-req { color: #b3261e; }
.ac-form-error { margin: 0; color: #b3261e; font-size: 13px; }
.ac-form-field.has-error input, .ac-form-field.has-error textarea, .ac-form-field.has-error select { border-color: #b3261e; }
.ac-form-note { margin: 0; font-size: 13px; color: var(--ac-muted); }
.ac-form-status:empty { display: none; }
.ac-form-status { padding: 10px 14px; border-left: 3px solid var(--ac-accent); background: var(--ac-soft); border-radius: 0 var(--ac-radius) var(--ac-radius) 0; }
.ac-form-status.is-ok { border-color: #2f7d32; }
.ac-form-status.is-error { border-color: #b3261e; }
.ac-form-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ac-form button[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 640px) { .ac-form-fields { grid-template-columns: minmax(0, 1fr); } }

/* Поиск */
.ac-search { display: flex; gap: 8px; }
.ac-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid #8f8e88; border-radius: var(--ac-radius); background: var(--ac-surface); color: var(--ac-text); }
.ac-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Вертикальное фото в карточке материала: целиком поверх размытой копии самого себя */
.ac-card-media { position: relative; }
.ac-card-media img.ac-cover-blur { position: absolute; inset: 0; filter: blur(18px); transform: scale(1.2); }
.ac-card-media img.ac-cover-whole { position: relative; object-fit: contain; }

/* Галерея, вставленная в текст визуальным редактором */
.ac-gallery-embed { --ac-g: 3; margin: 1.5em 0; gap: 8px; }
.ac-gallery-embed.ac-gcols-2 { --ac-g: 2; } .ac-gallery-embed.ac-gcols-3 { --ac-g: 3; } .ac-gallery-embed.ac-gcols-4 { --ac-g: 4; }
.ac-gallery-embed.ac-gcols-5 { --ac-g: 5; } .ac-gallery-embed.ac-gcols-6 { --ac-g: 6; }
.ac-gallery-embed .ac-gitem { margin: 0; }
.ac-gallery-embed a { display: block; }
.ac-gallery-embed img { display: block; width: 100%; height: auto; margin: 0; border-radius: var(--ac-radius); }
.ac-gview-grid { display: grid; grid-template-columns: repeat(var(--ac-g), minmax(0, 1fr)); }
.ac-gview-grid img { aspect-ratio: 1; object-fit: cover; }
.ac-gview-masonry { column-count: var(--ac-g); column-gap: 8px; }
.ac-gview-masonry .ac-gitem { break-inside: avoid; margin-bottom: 8px; }
.ac-gview-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.ac-gview-strip .ac-gitem { flex: 0 0 calc((100% - (var(--ac-g) - 1) * 8px) / var(--ac-g)); scroll-snap-align: start; }
.ac-gview-strip img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 640px) {
    .ac-gview-grid, .ac-gview-masonry { --ac-g: 2 !important; }
    .ac-gview-strip .ac-gitem { flex-basis: 80%; }
}
/* Слайдшоу из галереи: одно большое изображение, стрелки, точки или миниатюры, подпись поверх.
   Без скрипта — лента с прокруткой; скрипт сайта собирает сцену (.ac-gs-stage) и ставит is-ready. */
.ac-gview-slideshow { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; --ac-gs-ratio: 16 / 9; }
.ac-gview-slideshow.ac-gratio-21x9 { --ac-gs-ratio: 21 / 9; } .ac-gview-slideshow.ac-gratio-3x2 { --ac-gs-ratio: 3 / 2; }
.ac-gview-slideshow.ac-gratio-4x3 { --ac-gs-ratio: 4 / 3; } .ac-gview-slideshow.ac-gratio-1x1 { --ac-gs-ratio: 1; }
.ac-gview-slideshow > .ac-gitem { flex: 0 0 100%; scroll-snap-align: start; }
.ac-gview-slideshow img { aspect-ratio: var(--ac-gs-ratio); object-fit: cover; }
.ac-gview-slideshow.is-ready { display: block; overflow: visible; outline-offset: 4px; }
.ac-gs-stage { position: relative; overflow: hidden; aspect-ratio: var(--ac-gs-ratio); background: #111; touch-action: pan-y; }
.ac-gs-stage .ac-gitem { position: absolute; inset: 0; margin: 0; transform: translateX(100%); }
.ac-gs-stage .ac-gitem.is-active { transform: none; z-index: 1; }
.ac-gs-stage .ac-gitem a, .ac-gs-stage .ac-gitem img { width: 100%; height: 100%; }
.ac-gs-stage .ac-gitem img { aspect-ratio: auto; }
.ac-gfx-slide .ac-gs-stage .ac-gitem { transition: transform .6s cubic-bezier(.25, .7, .2, 1); }
.ac-gfx-fade .ac-gs-stage .ac-gitem { transform: none; opacity: 0; transition: opacity .7s ease; }
.ac-gfx-fade .ac-gs-stage .ac-gitem.is-active { opacity: 1; }
.ac-gs-stage .ac-gitem:not(.is-active):not(.is-leaving) { visibility: hidden; }
/* Медленное приближение изображения на активном слайде. */
.ac-gkb .ac-gs-stage .ac-gitem.is-active img { animation: ac-gs-zoom 9s ease-out both; }
@keyframes ac-gs-zoom { from { transform: scale(1); } to { transform: scale(1.12); } }
.ac-gs-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 40px 24px 20px; color: #fff; font-size: 1em; line-height: 1.4; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); pointer-events: none; }
.ac-gs-arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; padding: 0; border: 0; background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s ease, background-color .2s ease; }
.ac-gs-arrow svg { width: 24px; height: 24px; }
.ac-gs-arrow.is-prev { left: 12px; } .ac-gs-arrow.is-next { right: 12px; }
.ac-gs-arrow:hover { background: rgba(0, 0, 0, .6); }
.ac-gview-slideshow:hover .ac-gs-arrow, .ac-gview-slideshow:focus-within .ac-gs-arrow { opacity: 1; }
.ac-gs-arrow:focus-visible { opacity: 1; outline: 2px solid #fff; outline-offset: 2px; }
.ac-gs-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ac-gs-dots button { width: 28px; height: 3px; padding: 0; border: 0; background: var(--ac-line); cursor: pointer; }
.ac-gs-dots button::before { content: ""; display: block; margin: -10px 0; height: 23px; }
.ac-gs-dots button[aria-current="true"] { background: var(--ac-accent); }
.ac-gs-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.ac-gs-thumbs button { flex: 0 0 auto; width: 96px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .6; transition: opacity .2s ease; }
.ac-gs-thumbs button[aria-current="true"], .ac-gs-thumbs button:hover { opacity: 1; }
.ac-gs-thumbs button[aria-current="true"] { border-color: var(--ac-accent); }
.ac-gs-thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (hover: none) { .ac-gs-arrow { opacity: 1; } }
@media (max-width: 640px) { .ac-gs-arrow { width: 40px; height: 40px; margin-top: -20px; } .ac-gs-thumbs button { width: 72px; } .ac-gs-caption { padding: 28px 14px 12px; font-size: .9em; } }
@media (prefers-reduced-motion: reduce) {
    .ac-gs-stage .ac-gitem { transition: none !important; }
    .ac-gkb .ac-gs-stage .ac-gitem.is-active img { animation: none; }
}

/* Документы (страница раздела, элемент конструктора, вставка в текст). */
.ac-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ac-docs { display: grid; gap: 14px; }
.ac-docs ul { list-style: none; margin: 0; padding: 0; }
.ac-docs-heading { margin: 14px 0 0; font-size: 1.15em; }
.ac-docs-empty { margin: 0; color: var(--ac-muted); }
.ac-doc-type { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 40px; height: 44px; padding: 0 4px; background: var(--ac-soft); color: var(--ac-muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.ac-doc-type.is-pdf { background: #fdecec; color: #b42318; }
.ac-doc-type.is-doc, .ac-doc-type.is-docx, .ac-doc-type.is-odt, .ac-doc-type.is-rtf { background: #e8f0fd; color: #1f5fbf; }
.ac-doc-type.is-xls, .ac-doc-type.is-xlsx, .ac-doc-type.is-ods, .ac-doc-type.is-csv { background: #e6f4ea; color: #1e7b3a; }
.ac-doc-type.is-ppt, .ac-doc-type.is-pptx, .ac-doc-type.is-odp { background: #fdf0e4; color: #b4560f; }
.ac-doc-type.is-zip { background: #f1ecfb; color: #6a3fc0; }
.ac-doc-title { font-weight: 600; color: var(--ac-text); overflow-wrap: anywhere; }
.ac-doc-meta, .ac-doc-desc { display: block; font-size: .875em; color: var(--ac-muted); }
.ac-doc-desc { margin-top: 2px; }
.ac-doc-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ac-doc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); color: var(--ac-accent); font-size: .875em; font-weight: 600; white-space: nowrap; text-decoration: none; }
.ac-docs-list { display: grid; }
.ac-doc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--ac-line); color: inherit; text-decoration: none; }
.ac-docs-list li:last-child .ac-doc { border-bottom: 1px solid var(--ac-line); }
.ac-doc-body { flex: 1; min-width: 0; }
.ac-doc:hover .ac-doc-title { color: var(--ac-accent); }
.ac-doc:hover .ac-doc-btn, .ac-doc-btn:hover { border-color: var(--ac-accent); background: var(--ac-accent); color: var(--ac-accent-text); }
.ac-docs-scroll { overflow-x: auto; }
.ac-docs-table { width: 100%; border-collapse: collapse; }
.ac-docs-table th { padding: 8px 10px; border-bottom: 2px solid var(--ac-line); color: var(--ac-muted); font-size: .8em; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
.ac-docs-table td { padding: 10px; border-bottom: 1px solid var(--ac-line); vertical-align: middle; }
.ac-docs-table td a:not(.ac-doc-btn) { color: var(--ac-text); font-weight: 600; text-decoration: none; }
.ac-docs-table td a:not(.ac-doc-btn):hover { color: var(--ac-accent); }
.ac-docs-table .ac-doc-type { height: 26px; min-width: 42px; font-size: 10px; }
.ac-nowrap { white-space: nowrap; }
.ac-docs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.ac-doc-tile { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.ac-doc-tile .ac-doc-type { align-self: flex-start; }
.ac-doc-tile:hover { border-color: var(--ac-accent); transform: translateY(-2px); }
.ac-doc-tile:hover .ac-doc-title { color: var(--ac-accent); }
.ac-docs-group { border-top: 1px solid var(--ac-line); }
.ac-docs-group:last-child { border-bottom: 1px solid var(--ac-line); }
.ac-docs-group summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; font-weight: 600; list-style: none; }
.ac-docs-group summary::-webkit-details-marker { display: none; }
.ac-docs-group summary span:first-child { flex: 1; }
.ac-docs-group summary::after { content: "+"; color: var(--ac-accent); font-size: 1.25em; line-height: 1; }
.ac-docs-group[open] summary::after { content: "−"; }
.ac-docs-count { min-width: 26px; padding: 2px 8px; background: var(--ac-soft); color: var(--ac-muted); font-size: .8em; text-align: center; }
.ac-docs-group > .ac-docs-list, .ac-docs-group > .ac-docs-empty { padding: 0 0 14px 4px; }
.ac-docs-search { display: flex; gap: 8px; max-width: 520px; margin: 0 0 18px; }
/* Плитки в ряд и цвета кнопки «Скачать» — по настройкам раздела. */
.ac-docs.has-cols .ac-docs-tiles { grid-template-columns: repeat(var(--ac-docs-cols, 3), minmax(0, 1fr)); }
@media (max-width: 960px) { .ac-docs.has-cols .ac-docs-tiles { grid-template-columns: repeat(min(var(--ac-docs-cols, 3), 4), minmax(0, 1fr)); } }
@media (max-width: 640px) { .ac-docs.has-cols .ac-docs-tiles { grid-template-columns: repeat(min(var(--ac-docs-cols, 3), 2), minmax(0, 1fr)); } }
.ac-docs.has-btn-colors .ac-doc-btn { background: var(--ac-doc-btn-bg, transparent); color: var(--ac-doc-btn-fg, var(--ac-accent)); border-color: var(--ac-doc-btn-bg, var(--ac-line)); }
.ac-docs.has-btn-colors .ac-doc:hover .ac-doc-btn, .ac-docs.has-btn-colors .ac-doc-btn:hover { filter: brightness(.92); background: var(--ac-doc-btn-bg, var(--ac-accent)); color: var(--ac-doc-btn-fg, var(--ac-accent-text)); }
/* Вид «Дерево»: папки всех уровней раскрываются на месте. */
.ac-docs-tree-node { border-top: 1px solid var(--ac-line); }
.ac-docs-tree-node summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; font-weight: 600; list-style: none; }
.ac-docs-tree-node summary::-webkit-details-marker { display: none; }
.ac-docs-tree-node summary span:nth-child(2) { flex: 1; }
.ac-docs-tree-body { padding-left: 22px; padding-bottom: 8px; }
.ac-docs-folder { width: 20px; height: 16px; flex: none; display: inline-block; background: #e9b44c; position: relative; }
.ac-docs-folder::before { content: ""; position: absolute; left: 0; top: -3px; width: 9px; height: 5px; background: #e9b44c; }
.ac-docs-tree-node[open] > summary .ac-docs-folder { background: #f2c766; }
/* Дерево разделов (подразделы ссылками) над списком на странице раздела. */
.ac-docs-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ac-docs-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); color: var(--ac-text); text-decoration: none; font-weight: 500; }
.ac-docs-nav a:hover { border-color: var(--ac-accent); color: var(--ac-accent); }
.ac-docs-search input { flex: 1; min-width: 0; }
@media (max-width: 600px) {
    .ac-doc-btn span { display: none; }
    .ac-doc { gap: 10px; }
}
.ac-docs-search input { padding: 10px 12px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); color: var(--ac-text); font: inherit; }
.ac-docs-search input:focus { outline: 2px solid var(--ac-accent); outline-offset: 1px; }
.ac-docs-search button { padding: 10px 18px; border: 0; border-radius: var(--ac-radius); background: var(--ac-accent); color: var(--ac-accent-text); font: inherit; font-weight: 600; cursor: pointer; }
/* Выбранные файлы: карточки, крупный блок, ссылка-плашка в тексте. */
.ac-docs-files--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ac-doc-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); }
.ac-doc-card-top { display: flex; gap: 12px; align-items: flex-start; }
.ac-doc-card a.ac-doc-title { display: block; color: var(--ac-text); text-decoration: none; }
.ac-doc-card a.ac-doc-title:hover { color: var(--ac-accent); }
.ac-doc-card .ac-doc-desc { margin: 0; }
.ac-doc-card .ac-doc-btn { align-self: flex-start; margin-top: auto; }
.ac-doc-btn:hover { border-color: var(--ac-accent); }
.ac-doc-feature { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px; background: var(--ac-soft); border-left: 4px solid var(--ac-accent); border-radius: var(--ac-radius); }
.ac-doc-feature .ac-doc-type { height: 64px; min-width: 56px; font-size: 14px; }
.ac-doc-feature-title { display: block; font-family: var(--ac-heading-font, inherit); font-weight: var(--ac-heading-weight, 600); font-size: 1.25em; line-height: 1.25; overflow-wrap: anywhere; }
.ac-doc-feature .ac-doc-desc { margin: 4px 0 0; }
.ac-doc-btn.is-primary { padding: 11px 18px; background: var(--ac-accent); border-color: var(--ac-accent); color: var(--ac-accent-text); }
.ac-doc-btn.is-primary:hover { filter: brightness(.92); }
@media (max-width: 600px) {
    .ac-doc-feature { grid-template-columns: auto minmax(0, 1fr); }
    .ac-doc-feature .ac-doc-btn { grid-column: 1 / -1; justify-content: center; }
    .ac-doc-feature .ac-doc-btn span { display: inline; }
    .ac-doc-card .ac-doc-btn span { display: inline; }
}
/* Раздел с подпапками: поиск, путь, папки плитками, дерево, две колонки. */
.ac-dn { display: grid; gap: 14px; container-type: inline-size; }
.ac-dn-search input { width: 100%; max-width: 520px; padding: 10px 12px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); color: var(--ac-text); font: inherit; }
.ac-dn-search input:focus { outline: 2px solid var(--ac-accent); outline-offset: 1px; }
.ac-dn-results[hidden], .ac-dn-main[hidden], .ac-dn-pane[hidden], .ac-dn-results li[hidden] { display: none; }
.ac-dn-folder { width: 20px; height: 15px; flex: none; display: inline-block; position: relative; margin-top: 3px; background: #e9b44c; border-radius: 1px 3px 3px 3px; }
.ac-dn-folder::before { content: ""; position: absolute; left: 0; top: -3px; width: 9px; height: 4px; background: #e9b44c; border-radius: 2px 2px 0 0; }
.ac-dn-pane { display: grid; gap: 14px; }
.ac-dn-path-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 12px; background: var(--ac-soft); border-radius: var(--ac-radius); font-size: .92em; }
.ac-dn-path-bar a { color: var(--ac-accent); text-decoration: underline; text-underline-offset: 2px; }
.ac-dn-sep { color: var(--ac-muted); }
.ac-dn-folders { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ac-dn-tile { display: flex; gap: 12px; align-items: center; height: 100%; padding: 14px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); color: var(--ac-text); text-decoration: none; transition: border-color .15s; }
.ac-dn-tile:hover { border-color: var(--ac-accent); }
.ac-dn-tile:hover .ac-dn-name { color: var(--ac-accent); }
.ac-dn-tile .ac-dn-folder { width: 28px; height: 21px; }
.ac-dn-tile .ac-dn-folder::before { width: 12px; height: 5px; top: -4px; }
.ac-dn-tile-text { min-width: 0; }
.ac-dn-name { font-weight: 600; overflow-wrap: anywhere; }
.ac-dn-node { border-top: 1px solid var(--ac-line); }
.ac-dn-tree > .ac-dn-node:last-child { border-bottom: 1px solid var(--ac-line); }
.ac-dn-node > summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; }
.ac-dn-node > summary::-webkit-details-marker { display: none; }
.ac-dn-node > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin-right: 2px; border-right: 2px solid var(--ac-muted); border-bottom: 2px solid var(--ac-muted); transform: rotate(-45deg); transition: transform .15s; }
.ac-dn-node[open] > summary::before { transform: rotate(45deg); }
.ac-dn-node > summary .ac-dn-name { flex: 1; }
.ac-dn-in { margin: 0 0 10px 3px; padding-left: 24px; border-left: 1px solid var(--ac-line); }
.ac-dn-in > .ac-dn-node:last-child { border-bottom: 0; }
.ac-dn-split { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ac-dn-nav { padding-right: 14px; border-right: 1px solid var(--ac-line); }
.ac-dn-nav ul { list-style: none; margin: 0; padding: 0; }
.ac-dn-nav ul ul { padding-left: 16px; }
.ac-dn-nav-item { display: flex; gap: 8px; align-items: center; padding: 6px 8px; color: var(--ac-text); text-decoration: none; border-radius: var(--ac-radius); }
.ac-dn-nav-item .ac-dn-name { flex: 1; font-weight: 500; }
.ac-dn-nav-item .ac-dn-folder { width: 16px; height: 12px; margin-top: 1px; }
.ac-dn-nav-item .ac-dn-folder::before { width: 7px; height: 3px; top: -2px; }
.ac-dn-nav-item:hover { color: var(--ac-accent); }
.ac-dn-nav-item[aria-current="true"] { background: var(--ac-soft); box-shadow: inset 3px 0 0 var(--ac-accent); }
.ac-dn-nav-item[aria-current="true"] .ac-dn-name { font-weight: 600; }
.ac-dn-nav .ac-docs-count { background: none; padding: 0; min-width: 0; }
.ac-dn-select-wrap { display: none; }
.ac-dn-select { width: 100%; padding: 10px; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); color: var(--ac-text); font: inherit; }
.ac-dn-panes { min-width: 0; }
.ac-dn-title { margin: 0; font-size: 1.25em; }
.ac-dn-path { margin: -8px 0 0; color: var(--ac-muted); font-size: .875em; }
/* Узкий блок (колонка или телефон): дерево папок — выпадающим списком, папки — в один ряд. */
@container (max-width: 620px) {
    .ac-dn-split { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ac-dn-nav { display: none; }
    .ac-dn-select-wrap { display: block; }
    .ac-dn-folders { grid-template-columns: minmax(0, 1fr); }
    .ac-dn-in { padding-left: 12px; }
}
/* Раздел документов, вставленный в текст: на сайте заменяется списком; здесь — запасной вид (окно редактора). */
.ac-docs-embed { margin: 1.2em 0; padding: 14px 16px; border: 1.5px dashed var(--ac-line); border-radius: var(--ac-radius); }
.ac-docs-embed p { margin: 0; font-weight: 600; }
.ac-docs-inline { margin: 1.2em 0; }
/* Текст из визуального редактора: размер и цвет (классы ql-…), видео, вставленное в текст. */
.ql-size-small { font-size: .8em; }
.ql-size-large { font-size: 1.35em; }
.ql-size-huge { font-size: 1.8em; }
.ql-color-red { color: #c92a2a; }
.ql-color-orange { color: #d9480f; }
.ql-color-green { color: #2b8a3e; }
.ql-color-blue { color: #1c64c4; }
.ql-color-purple { color: #7048e8; }
.ql-color-gray { color: #6b6b66; }
.ac-video-inline { margin: 1.2em 0; }
.ac-video-inline.ac-ratio-9x16 { max-width: 360px; }
.ac-video-embed { margin: 1.2em 0; padding: 14px 16px; border: 1.5px dashed var(--ac-line); border-radius: var(--ac-radius); }
.ac-video-embed p { margin: 0; overflow-wrap: anywhere; }/* PDF-слайдер (страницы рисует pdf.js). */
.ac-pdf { margin: 1.5em 0; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-surface); overflow: hidden; }
.ac-pdf:focus-visible { outline: 2px solid var(--ac-accent); outline-offset: 2px; }
.ac-pdf-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 240px; background: var(--ac-soft); }
.ac-pdf-canvas { display: block; width: 100%; height: auto; }
.ac-pdf:not(.is-ready) .ac-pdf-canvas { display: none; }
.ac-pdf-status { margin: 0; padding: 24px; color: var(--ac-muted); text-align: center; }
.ac-pdf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-top: 1px solid var(--ac-line); }
.ac-pdf-bar button { width: 38px; height: 38px; border: 1px solid var(--ac-line); background: var(--ac-surface); color: var(--ac-text); font-size: 20px; line-height: 1; cursor: pointer; }
.ac-pdf-bar button:hover:not(:disabled) { border-color: var(--ac-accent); color: var(--ac-accent); }
.ac-pdf-bar button:disabled { opacity: .35; cursor: default; }
.ac-pdf-count { min-width: 64px; color: var(--ac-muted); font-size: .9em; text-align: center; font-variant-numeric: tabular-nums; }
.ac-pdf-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-pdf-download { padding: 7px 14px; border-radius: var(--ac-radius); background: var(--ac-accent); color: var(--ac-accent-text); font-size: .9em; font-weight: 600; text-decoration: none; }
.ac-form-embed { margin: 1.2em 0; padding: 14px 16px; border: 1.5px dashed var(--ac-line); border-radius: var(--ac-radius); }
.ac-form-embed p { margin: 0; font-weight: 600; }
.ac-form-inline { margin: 1.5em 0; }
.ac-pdf-embed { margin: 1.2em 0; padding: 14px 16px; border: 1.5px dashed var(--ac-line); border-radius: var(--ac-radius); }
.ac-pdf-embed p { margin: 0; font-weight: 600; }
.ac-pdf .ac-pdf-bar a.ac-pdf-download, .ac-pdf .ac-pdf-bar a.ac-pdf-download:visited { color: var(--ac-accent-text); }
.ac-pdf .ac-pdf-bar a.ac-pdf-download:hover { filter: brightness(1.08); color: var(--ac-accent-text); }

/* Страница материала: заголовок 36 px (на телефоне 28 px). Размер из «Настроек → Типографика» главнее. */
/* Строка заполняется до конца: правило шаблона «делить строки поровну» (text-wrap: balance) для заголовка материала отключено. */
.ac-article .ac-art-title { font-size: 36px; text-wrap: wrap; }
@media (max-width: 640px) { .ac-article .ac-art-title { font-size: 28px; } }

/* Галерея внизу материала: мозаика — крупное фото и четыре поменьше; остальные — в просмотре. */
/* Просмотрщик фото материала: рамка постоянной высоты, фото целиком, по бокам — размытая копия фото. */
.ac-art-media { margin: 20px 0 28px; }
.ac-art-media.w { margin-top: 32px; }
.ac-av-stage { position: relative; height: 420px; overflow: hidden; background: var(--ac-soft); }
.ac-av-slide { position: absolute; inset: 0; display: block; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; cursor: zoom-in; }
.ac-av-slide.is-current { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.ac-av-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.15) brightness(.82); transform: scale(1.05); }
.ac-av-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.ac-av-slide:focus-visible { outline: 3px solid var(--ac-accent); outline-offset: -3px; }
.ac-av-count { position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 3px 9px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; line-height: 1.4; }
.ac-av-open { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s ease; }
.ac-av-open svg { width: 20px; height: 20px; }
.ac-art-media .ac-gs-arrow, .ac-av-open { opacity: 0; }
.ac-art-media:hover .ac-gs-arrow, .ac-art-media:focus-within .ac-gs-arrow, .ac-art-media:hover .ac-av-open, .ac-art-media:focus-within .ac-av-open { opacity: 1; }
.ac-av-thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; scrollbar-width: thin; }
.ac-av-th { flex: 0 0 auto; width: 72px; height: 54px; padding: 0; border: 0; background: var(--ac-soft); cursor: pointer; opacity: .55; transition: opacity .2s ease; }
.ac-av-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ac-av-th:hover, .ac-av-th[aria-current="true"] { opacity: 1; }
.ac-av-th[aria-current="true"] { outline: 2px solid var(--ac-accent); outline-offset: -2px; }
.ac-av-th:focus-visible { outline: 3px solid var(--ac-accent); outline-offset: 1px; opacity: 1; }
@media (max-width: 640px) {
    .ac-av-stage { height: 260px; }
    .ac-av-th { width: 56px; height: 42px; }
}
@media (hover: none) { .ac-art-media .ac-gs-arrow, .ac-av-open { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ac-av-slide, .ac-av-slide.is-current { transition: none; } }

/* Схема страницы (страница «Блоки»): свои ряды, колонки у материала, колонки подвала. */
.ac-prow { padding-block: 8px; }
.ac-prow-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.ac-prow-col { grid-column: span var(--span, 12); min-width: 0; }
.ac-prow-bg-accent { background: var(--acc, var(--ac-accent, #0071e3)); color: var(--acc-ink, #fff); }
.ac-prow-bg-dark { background: #111; color: #f2f2f2; }
.ac-prow-bg-accent a, .ac-prow-bg-dark a { color: inherit; }
.ac-with-side { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; --sw: 25%; }
.ac-with-side.ac-side-w4 { --sw: 33.333%; }
.ac-with-side.has-left { grid-template-columns: var(--sw) minmax(0, 1fr); grid-template-areas: "left main"; }
.ac-with-side.has-right { grid-template-columns: minmax(0, 1fr) var(--sw); grid-template-areas: "main right"; }
.ac-with-side.has-left.has-right { grid-template-columns: var(--sw) minmax(0, 1fr) var(--sw); grid-template-areas: "left main right"; }
.ac-side-main { grid-area: main; min-width: 0; }
.ac-side-left { grid-area: left; min-width: 0; }
.ac-side-right { grid-area: right; min-width: 0; }
.ac-footer-cols { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) {
    .ac-with-side, .ac-with-side.has-left, .ac-with-side.has-right, .ac-with-side.has-left.has-right { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "left" "right"; }
    .ac-footer-cols-3, .ac-footer-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ac-prow-grid { grid-template-columns: minmax(0, 1fr); }
    .ac-prow-col { grid-column: auto; }
    .ac-prow-desktop { display: none; }
    .ac-footer-cols { grid-template-columns: minmax(0, 1fr); }
}
