:root {
	--doc-primary: #2868ad;
	--doc-primary-dark: #174b80;
	--doc-link: #1769aa;
	--doc-heading: #20252d;
	--doc-text: #30343b;
	--doc-soft: #4c5868;
	--doc-muted: #697386;
	--doc-bg-soft: #f3f7fc;
	--doc-bg-active: #eaf2fb;
	--doc-border: #e2eaf3;
	--doc-border-strong: #cbdced;
	--doc-radius: 12px;
	--doc-shadow: 0 8px 24px rgba(25, 45, 70, .08);
	--doc-top: 24px;       
	--doc-scroll-offset: 90px;  
	--article-scroll-offset: 90px;
}
.alert-danger {
--bs-alert-color: #58151c;
  --bs-alert-bg: rgb(255 242 239);
  --bs-alert-border-color: rgb(255 200 193);
  --bs-alert-link-color: #58151c;
  /*border: 0 solid;*/
  border-radius: 0;
}
.alert-success {
	--bs-alert-color: #0a3622;
  --bs-alert-bg: rgb(238 252 240);
  --bs-alert-border-color: rgb(190 229 194);
  --bs-alert-link-color: #0a3622;
  /*border: 0 solid;*/
  border-radius: 0;
}
.alert-warning {
  --bs-alert-color: #664d03;
  --bs-alert-bg: rgb(255 245 236);
  --bs-alert-border-color: rgb(242 211 182);
  --bs-alert-link-color: #664d03;
  /*border: 0 solid;*/
  border-radius: 0;
}
.alert-info {
  --bs-alert-color: #055160;
  --bs-alert-bg: #f3f7fc;
  --bs-alert-border-color: #dce6f2;
  --bs-alert-link-color: #055160;
  /*border: 0 solid;*/
  border-radius: 0;
}
.table {
  --bs-table-border-color: #dce6f2;
}
.table-striped > tbody > tr:nth-of-type(2n+1) > * {
  --bs-table-color-type: interit;
  --bs-table-bg-type: #f3f7fc;
}
.table-dark {
  --bs-table-color: #30343b;
  --bs-table-bg: #e6eff9;
  --bs-table-border-color: #dce6f2;
  color: #30343b;
  overflow-wrap: break-word;
}  
html { scroll-behavior: smooth; scroll-padding-top: var(--doc-scroll-offset); }
.doc-wrap, .doc-wrap *, .doc-wrap *::before, .doc-wrap *::after { box-sizing: border-box; }
.doc-wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; color: var(--doc-text); }
.doc-wrap ::selection { background: #cfe3f7; }
.doc-wrap a { text-decoration: none; }
.doc-wrap .img-fluid, .doc-wrap .img-responsive { max-width: 100%; height: auto; }
.doc-wrap .text-muted { color: var(--doc-muted); }
.doc-wrap .text-right { text-align: right; }
.doc-wrap .text-left { text-align: left; }
.doc-wrap a:focus-visible, .doc-wrap button:focus-visible { outline: 2px solid #7ba7dc; outline-offset: 2px; border-radius: 6px; }
/* --- Мини-сетка (не зависим от темы) --- */
.doc-wrap .row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.doc-wrap [class*="col-"] { width: 100%; padding: 0 10px; min-width: 0; }
@media (min-width: 576px)  { .doc-wrap .col-sm-6 { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 768px)  {
	.doc-wrap .col-md-3 { flex: 0 0 25%; max-width: 25%; }
	.doc-wrap .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
	.doc-wrap .col-md-9 { flex: 0 0 75%; max-width: 75%; }
	.doc-wrap .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px)  {
	.doc-wrap .col-lg-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
	.doc-wrap .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
	.doc-wrap .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
	.doc-wrap .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
}
/* --- Вкладки разделов --- */
.doc-sections { display: flex; gap: 4px; margin: 6px 0 0; border-bottom: 1px solid var(--doc-border); overflow-x: auto; scrollbar-width: none; }
.doc-sections::-webkit-scrollbar { display: none; }
.doc-sections a { flex: 0 0 auto; padding: 11px 16px; font-size: 14px; font-weight: 600; color: var(--doc-muted); border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.doc-sections a:hover { color: var(--doc-primary); }
.doc-sections a.active { color: var(--doc-primary-dark); border-bottom-color: var(--doc-primary); }
/* --- Каркас: сайдбар + контент --- */
.doc-wrap > .row { flex-wrap: nowrap; align-items: flex-start; margin: 0; }
.doc-wrap > .row > .doc-sidebar {
	flex: 0 0 272px; max-width: 272px; padding: 20px 14px 32px 0;
	border-right: 1px solid var(--doc-border);
	position: sticky; top: var(--doc-top);
	max-height: calc(100vh - var(--doc-top) - 16px); overflow-y: auto;
	scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.doc-wrap > .row > .doc-main { flex: 1 1 0; max-width: none; min-width: 0; padding: 26px 0 64px 36px; }
/* --- Дерево навигации --- */
.doc-tree {
  max-height: calc(100vh - var(--doc-scroll-offset, 100px) - 150px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  scroll-behavior: smooth;
}
.doc-tree-group { margin: 0 0 4px; }
.doc-tree-group .doc-tree-group { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--doc-border); }
.doc-tree-cat { display: block; padding: 7px 10px; margin-top: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--doc-heading); transition: background-color .2s ease, color .2s ease; }
.doc-tree-cat:hover { background: var(--doc-bg-soft); color: var(--doc-primary-dark); }
.doc-tree-list { list-style: none; margin: 2px 0 6px; padding: 0; }
.doc-tree-link { display: block; padding: 6px 10px; border-radius: 8px; font-size: 14px; line-height: 1.45; color: var(--doc-soft); transition: background-color .15s ease, color .15s ease; }
.doc-tree-link:hover { background: var(--doc-bg-soft); color: var(--doc-primary-dark); }
.doc-tree-cat.active { background: var(--doc-bg-active); color: var(--doc-primary-dark); font-weight: 600; }
.doc-tree-link.active { color: var(--doc-primary-dark); font-weight: 600; }
/* --- Мобильная панель и drawer --- */
.doc-mobile-bar { display: none; }
.doc-backdrop { display: none; }
.doc-menu-toggle { display: inline-flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: var(--doc-bg-soft); border: 1px solid var(--doc-border); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--doc-heading); cursor: pointer; }
.doc-menu-toggle .doc-menu-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991.98px) {
	.doc-wrap { padding: 0 16px; }
	.doc-wrap > .row { flex-wrap: wrap; }
	.doc-wrap > .row > .doc-main { flex: 0 0 100%; padding: 18px 0 48px; }
	.doc-mobile-bar { display: block; position: sticky; top: 0; z-index: 1030; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--doc-border); }
	.doc-wrap > .row > .doc-sidebar {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 1045;
		width: min(320px, 86vw); max-width: none; max-height: none; height: 100%;
		padding: 20px 16px; background: #fff; border-right: 1px solid var(--doc-border);
		box-shadow: 0 10px 40px rgba(15, 30, 60, .2);
		transform: translateX(-105%); transition: transform .28s ease;
	}
	body.doc-nav-open .doc-sidebar { transform: translateX(0); }
	body.doc-nav-open { overflow: hidden; }
	.doc-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(16, 24, 40, .45); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
	body.doc-nav-open .doc-backdrop { opacity: 1; visibility: visible; }
}
/* --- Хлебные крошки --- */
.doc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; background: transparent; }
.doc-breadcrumb li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.doc-breadcrumb li + li::before { content: "›"; color: #9aa7b8; font-size: 14px; }
.doc-breadcrumb a { display: inline-flex; padding: 5px 11px; background: var(--doc-bg-soft); border: 1px solid var(--doc-border); border-radius: 7px; font-size: 12.5px; font-weight: 500; color: #47627e; transition: all .2s ease; }
.doc-breadcrumb a:hover { color: var(--doc-primary); background: var(--doc-bg-active); border-color: var(--doc-border-strong); }
.doc-breadcrumb li.active, .doc-breadcrumb li:last-child { font-size: 12.5px; color: var(--doc-muted); }
/* --- Заголовок и мета --- */
.doc-main h1 { margin: 0 0 14px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--doc-heading); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; background: var(--doc-bg-soft); border: 1px solid var(--doc-border); border-radius: 999px; font-size: 11px; color: #526477; }

.doc-cat-lead .lead,
.doc-content .lead,
.doc-lead { margin: 0 0 26px; padding: 14px 18px; border-left: 3px solid var(--doc-primary); border-radius: 0 10px 10px 0; background: linear-gradient(90deg, var(--doc-bg-soft), #fbfdff); color: #42506a; font-size: 16px; font-style: italic; line-height: 1.65; }
.doc-lead .lead {color: #42506a; font-size: 16px; font-style: italic; line-height: 1.65;}
#doc-article .column-doc-sticky-top {
  top: 150px;
  transition: top 0.3s ease;
}
@media (min-width: 992px) {
  #doc-article .column-doc-sticky-top {
    position: -webkit-sticky;
    position: sticky;
    z-index: 920;
  }
}
#doc-article.scrolled .column-doc-sticky-top {
  top: 100px;
  }
/* --- Типографика статьи --- */
.doc-content { font-size: 16px; line-height: 1.75; color: var(--doc-text); overflow-wrap: break-word; }
.doc-content p { margin: 0 0 1.15em; }
.doc-content h2, .doc-content h3, .doc-content h4 { color: var(--doc-heading);}
.doc-content h2 { margin: 2.1em 0 .8em; padding-bottom: .35em; border-bottom: 1px solid var(--doc-border); font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.3; }
.doc-content h3 { margin: 1.7em 0 .6em; font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; line-height: 1.4; }
.doc-content h4 { margin: 1.5em 0 .5em; font-size: 17px; font-weight: 600; }
.doc-content ul, .doc-content ol { margin: 0 0 1.4em; padding-left: 1.45em; }
.doc-content li { margin-bottom: .45em; }
/*.doc-content li::marker { color: var(--doc-primary); }*/
.doc-content a { color: var(--doc-link); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(23, 105, 170, .35); text-underline-offset: 3px; }
.doc-content a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--doc-link); }
.doc-content img { max-width: 100%; height: auto; border-radius: 8px; }
.doc-content figure, .doc-content .uni-documentation-thumb { margin: 1.8em 0; }
.doc-content figure img, .doc-content .uni-documentation-thumb img { border: 1px solid var(--doc-border); }
.doc-content figcaption { margin-top: .6em; font-size: 13px; color: var(--doc-muted); }
.doc-content blockquote {
	font-size: 16px;
	margin: 0 0 26px;
  padding: 14px 18px;
  border-left: 3px solid var(--doc-primary);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, var(--doc-bg-soft), #fbfdff);
  color: #42506a;
  font-size: 16px;
  font-style: italic;
  line-height: 1.65;
	}
.doc-content hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--doc-border); }
.doc-anchor { margin-left: 8px; font-weight: 400; color: #9db4cc; opacity: 0; transition: opacity .15s ease; text-decoration: none !important; }
.doc-content h2:hover .doc-anchor, .doc-content h3:hover .doc-anchor, .doc-anchor:focus-visible { opacity: 1; }
/* --- Код --- */
.doc-content code { padding: .05em .35em;
	background: #eef2f7; 
	border: 1px solid var(--doc-border);
	border-radius: 6px; 
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; color: #1f3a5f; 
	display: inline-block;
  width: auto;
  min-width: auto;
  margin: 0 4px 0 2px;
	}
.doc-code { position: relative; margin: 1.5em 0; }
.doc-content pre { margin: 0; padding: 15px 17px; background: #f8fafc; border: 1px solid var(--doc-border); border-radius: 10px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; scrollbar-width: thin; }
.doc-content pre code { padding: 0; background: none; border: 0; font-size: inherit; color: #243044; }
.doc-copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 10px; background: #fff; border: 1px solid var(--doc-border-strong); border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--doc-soft); cursor: pointer; opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease; }
.doc-code:hover .doc-copy-btn, .doc-copy-btn:focus-visible { opacity: 1; }
.doc-copy-btn:hover { color: var(--doc-primary); border-color: var(--doc-primary); }
.doc-copy-btn.copied { color: #0f9d6a; border-color: #bbe7d0; opacity: 1; }
/* --- Врезки Note / Tip / Warning / Danger --- */
.doc-note, .doc-tip, .doc-warning, .doc-danger { position: relative; margin: 1.6em 0; padding: 14px 16px 14px 46px; border: 1px solid; border-radius: 10px; font-size: 15px; line-height: 1.65; color: #3b4757; }
.doc-note::before, .doc-tip::before, .doc-warning::before, .doc-danger::before { content: ""; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.doc-note { background: #eef6ff; border-color: #cfe3f7; }
.doc-note::before { background: #2868ad; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.doc-tip { background: #ecfdf5; border-color: #bbe7d0; }
.doc-tip::before { background: #0f9d6a; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='m22 4-10 10.01-3-3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='m22 4-10 10.01-3-3'/%3E%3C/svg%3E"); }
.doc-warning { background: #fff8eb; border-color: #f3e2b3; }
.doc-warning::before { background: #b7791f; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.doc-danger { background: #fef2f2; border-color: #f5c6c6; }
.doc-danger::before { background: #c0392b; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
.doc-note > strong:first-child, .doc-tip > strong:first-child, .doc-warning > strong:first-child, .doc-danger > strong:first-child { display: block; margin-bottom: 2px; color: var(--doc-heading); }
/* --- Оглавление справа --- */
.doc-toc-inner { position: sticky; top: var(--doc-scroll-offset); max-height: calc(100vh - var(--doc-scroll-offset) - 24px); overflow-y: auto; padding: 4px 0 12px 16px; border-left: 1px solid var(--doc-border); scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.doc-toc-title { margin-bottom: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--doc-muted); }
.doc-toc-list { list-style: none; margin: 0; padding: 0; }
.doc-toc-list .doc-toc-list { padding-left: 12px; }
.doc-toc-link { display: block; margin-left: -17px; padding: 4px 10px 4px 15px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.5; color: #5b6b80; transition: color .15s ease, border-color .15s ease; }
.doc-toc-link:hover { color: var(--doc-primary); }
.doc-toc-link.active { color: var(--doc-primary-dark); border-left-color: var(--doc-primary); font-weight: 600; }
/* --- Дата обновления --- */
.doc-updated { margin-top: 36px; text-align: right; font-size: 13px; color: var(--doc-muted); }
/* --- FAQ-аккордеон --- */
.doc-faq { margin-top: 44px; }
.doc-faq > h2, .doc-related > h2, .doc-related-products > h2, .doc-downloads > h2 { margin: 0 0 16px; font-size: 24px; font-weight: 700; color: var(--doc-heading); }
.doc-faq-desc { margin-bottom: 14px; color: var(--doc-soft); }
.doc-faq-item { margin-bottom: 10px; background: #fff; border: 1px solid var(--doc-border); border-radius: 12px; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.doc-faq-item.active { border-color: var(--doc-border-strong); box-shadow: 0 4px 14px rgba(25, 45, 70, .06); }
.doc-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 16px 18px; background: none; border: 0; text-align: left; font-size: 15.5px; font-weight: 600; line-height: 1.5; color: #252a32; cursor: pointer; }
.doc-faq-q:hover { background: #fafcfe; }
.doc-faq-q::after { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .3s ease; }
.doc-faq-item.active .doc-faq-q::after { transform: rotate(180deg); }
.doc-faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.doc-faq-a-inner { min-height: 0; overflow: hidden; padding: 0 18px; color: var(--doc-soft); font-size: 15px; line-height: 1.7; transition: padding .3s ease; }
.doc-faq-item.active .doc-faq-a { grid-template-rows: 1fr; }
.doc-faq-item.active .doc-faq-a-inner { padding-bottom: 16px; }
/* --- Файлы для скачивания --- */
.doc-downloads { margin-top: 36px; }
.doc-downloads ul { list-style: none; margin: 0; padding: 0; }
.doc-downloads li { margin-bottom: 8px; }
.doc-downloads a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--doc-bg-soft); border: 1px solid var(--doc-border); border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--doc-primary-dark); transition: all .2s ease; }
.doc-downloads a:hover { background: var(--doc-bg-active); border-color: var(--doc-border-strong); }
.doc-downloads a::before { content: ""; width: 15px; height: 15px; background: var(--doc-primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat; }
/* --- Карточки (подкатегории, related, список статей) --- */
.doc-related, .doc-related-products { margin-top: 44px; }
.doc-card { display: block; height: 100%; padding: 16px; background: #fff; border: 1px solid var(--doc-border); border-radius: var(--doc-radius); color: var(--doc-text); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.doc-card:hover { border-color: var(--doc-border-strong); box-shadow: var(--doc-shadow); transform: translateY(-2px); }
.doc-card img { width: 100%; height: auto; margin-bottom: 10px; border-radius: 8px; }
.doc-card-title { display: block; margin-bottom: 4px; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--doc-heading); transition: color .2s ease; }
.doc-card:hover .doc-card-title { color: var(--doc-primary-dark); }
.doc-card-desc { display: block; font-size: 13.5px; line-height: 1.55; color: var(--doc-muted); }
.doc-article-list { display: grid; gap: 12px; margin-top: 26px; }
.doc-article-list .doc-card { position: relative; padding-right: 48px; }
.doc-article-list .doc-card::after { content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; color: #9db4cc; transition: transform .2s ease, color .2s ease; }
.doc-article-list .doc-card:hover::after { transform: translateY(-50%) translateX(4px); color: var(--doc-primary); }
.doc-wrap [class*="col-"] > .doc-card { margin-bottom: 20px; }
/* --- Товары --- */
.doc-product-card { margin-bottom: 20px; padding: 12px; background: #fff; border: 1px solid var(--doc-border); border-radius: var(--doc-radius); text-align: center; transition: border-color .2s ease, box-shadow .2s ease; }
.doc-product-card:hover { border-color: var(--doc-border-strong); box-shadow: var(--doc-shadow); }
.doc-product-card img { width: 100%; height: auto; margin-bottom: 8px; border-radius: 8px; }
.doc-product-name { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--doc-heading); }
.doc-price { margin-bottom: 10px; font-size: 15px; }
.doc-price-old { text-decoration: line-through; color: #9ca3af; font-size: 13px; }
.doc-price-new { color: #dc2626; font-weight: 700; }
.doc-wrap .btn-primary { display: inline-block; padding: 8px 18px; background: var(--doc-primary); border: 1px solid var(--doc-primary); border-radius: 9px; color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .2s ease; }
.doc-wrap .btn-primary:hover { background: var(--doc-primary-dark); }
/* --- Prev / Next карточки --- */
.doc-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--doc-border); }
.doc-prevnext-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--doc-border); border-radius: var(--doc-radius); transition: border-color .2s ease, box-shadow .2s ease; }
.doc-prevnext-link:hover { border-color: var(--doc-primary); box-shadow: var(--doc-shadow); }
.doc-prevnext-link.is-empty { border: 0; pointer-events: none; }
.doc-prevnext-label { font-size: 12.5px; color: var(--doc-muted); }
.doc-prevnext-title { font-size: 15px; font-weight: 600; color: var(--doc-primary-dark); line-height: 1.4; }
.doc-prevnext-link.doc-next { align-items: flex-end; text-align: right; }
@media (max-width: 575.98px) { .doc-prevnext { grid-template-columns: 1fr; } .doc-prevnext-link.is-empty { display: none; } }
/* --- Пагинация --- */
.doc-wrap .pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 24px 0 0; padding: 0; }
.doc-wrap .pagination li { margin: 0; }
.doc-wrap .pagination a, .doc-wrap .pagination span { display: inline-block; padding: 6px 13px; border: 1px solid var(--doc-border); border-radius: 8px; font-size: 13.5px; color: var(--doc-soft); }
.doc-wrap .pagination a:hover { border-color: var(--doc-primary); color: var(--doc-primary); }
.doc-wrap .pagination .active span { background: var(--doc-primary); border-color: var(--doc-primary); color: #fff; }
/* --- Доступность / анимации --- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.doc-wrap *, .doc-wrap *::before, .doc-wrap *::after { transition: none !important; animation: none !important; }
}
/************************/
.doc-toc-list { list-style: none; margin: 0; padding: 0; }
.doc-toc-list .level-2 > .doc-toc-link { font-size: 12.5px; }
.doc-toc-link.is-active { color: var(--doc-primary-dark); border-left-color: var(--doc-primary); font-weight: 600; }
#doc-content pre { position: relative; }
#doc-content .code-content { overflow-x: auto; max-width: 100%; white-space: pre; scrollbar-width: thin; }
#doc-content .copy-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; font-size: 12px; border: 1px solid var(--doc-border-strong); border-radius: 7px; background: #fff; color: var(--doc-soft); cursor: pointer; opacity: .7; transition: opacity .2s ease; z-index: 5; }
#doc-content .copy-btn:hover { opacity: 1; }
#doc-content .copy-btn.copied { background: #4caf50; border-color: #4caf50; color: #fff; opacity: 1; }
.doc-toc-link.is-active { color: var(--doc-primary-dark); border-left-color: var(--doc-primary); font-weight: 600; }
.doc-toc-mini-content { position: fixed; left: 18px; bottom: 78px; z-index: 1000; display: none; width: min(360px, calc(100vw - 36px)); max-height: 65vh; overflow-y: auto; padding: 14px; background: #fff; border: 1px solid var(--doc-border); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.doc-toc-mini-content.open { display: block; }
.doc-toc-mini-header { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--doc-border); font-size: 14px; font-weight: 700; }
.doc-toc-mini-content .doc-toc-list { list-style: none; margin: 0; padding: 0; }
.doc-toc-mini-content .doc-toc-link { margin-left: 0; border-left: 0; padding: 6px 8px; border-radius: 6px; }
.doc-toc-mini-content .doc-toc-link.is-active { background: var(--doc-bg-active); }
.doc-toc-mini {
	opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1050;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  width: 48px; height: 48px;
}
.doc-toc-mini.show {
  opacity: 0.7;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.doc-toc-link.is-active { color: var(--doc-primary-dark); border-left-color: var(--doc-primary); font-weight: 600; }
.doc-toc-mini-content .doc-toc-link.is-active { background: var(--doc-bg-active); }
.doc-toc-list .level-2 > .doc-toc-link { padding-left: 26px; font-size: 12.5px; }
.doc-toc-mini-content { 
    position: fixed; left: 18px; bottom: 78px; z-index: 1000; 
    display: none; 
    width: min(360px, calc(100vw - 36px)); max-height: 65vh; 
    overflow-y: auto; 
    padding: 14px; background: #fff; 
    border: 1px solid var(--doc-border); border-radius: 12px; 
    box-shadow: 0 8px 30px rgba(0,0,0,.15); 
}
.doc-toc-mini-content.open { display: block; }
.doc-toc-inner {
	position: sticky;
	top: var(--doc-scroll-offset, 100px);
	max-height: calc(100vh - var(--doc-scroll-offset, 100px) - 24px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	scroll-behavior: smooth; /* опционально, для нативного скролла колесом */
}
/* === ЛЕВАЯ КОЛОНКА: Сайдбар и липкое позиционирование === */
.doc-sidebar-wrapper {
	position: relative;
	}
.doc-tree-container {
	position: sticky;
	top: 24px; /* Отступ от верха экрана при прокрутке */
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	padding-right: 8px;
}
.doc-tree-container::-webkit-scrollbar {
	width: 6px;
}
.doc-tree-container::-webkit-scrollbar-thumb {
	background-color: #cbd5e1;
	border-radius: 3px;
}
/* === Группы дерева === */
.doc-tree-cat-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.doc-tree-cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	text-decoration: none;
	flex: 1;
	transition: background-color 0.2s ease, color 0.2s ease;
}
/* === Кнопка сворачивания === */
.doc-tree-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	border-radius: 4px;
	transition: transform 0.25s ease, color 0.2s ease, background-color 0.2s ease;
}
.doc-tree-toggle:hover {
	background-color: #e5e7eb;
	color: #2868ad;
}
/* === Ссылки на статьи внутри категории === */
.doc-tree-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.doc-tree-link {
	display: block;
	padding: 6px 10px 6px 14px;
	border-radius: 6px;
	font-size: 13px;
	color: #4b5563;
	text-decoration: none;
	border-left: 2px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.doc-tree-link:hover {
	background-color: #f9fafb;
	color: #2868ad;
}
.doc-tree-cat-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.doc-tree-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.25s ease, color 0.2s ease, background-color 0.2s ease;
}
.doc-tree-toggle:hover {
    background-color: #e5e7eb;
    color: #2868ad;
}
/* Плавный поворот стрелки */
.doc-tree-toggle svg {
    transition: transform 0.2s ease;
}
.doc-tree-group.is-open > .doc-tree-cat-wrapper .doc-tree-toggle svg {
    transform: rotate(180deg);
}
/* Контейнер дерева документации */
.doc-tree-container {
    display: block;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
/* Внешняя обёртка не прокручивается */
.doc-tree-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
/* Настоящий контейнер прокрутки */
#doc-sidebar-tree {
    display: block;
	padding-right: 8px;
    box-sizing: border-box;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* Контейнер вложенных категорий */
.doc-tree-group > .doc-tree-children {
    display: grid;
    grid-template-rows: 0fr;
    transition:
        grid-template-rows 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Раскрытая категория */
.doc-tree-group.is-open > .doc-tree-children {
    grid-template-rows: 1fr;
}
/* Внутренний контейнер */
.doc-tree-children-inner {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        opacity 200ms ease;
}
/* Содержимое открытой категории */
.doc-tree-group.is-open > .doc-tree-children > .doc-tree-children-inner {
    opacity: 1;
}

.doc-tree-toggle svg {
    transition:
        transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.doc-tree-group.is-open > .doc-tree-cat-wrapper > .doc-tree-toggle svg {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .doc-tree-group > .doc-tree-children,
    .doc-tree-children-inner,
    .doc-tree-toggle svg {
        transition: none !important;
    }
}