/* ===== Универсальные таблицы для .wiki_text .table table ===== */

/* контейнер со скроллом */
.wiki_text .table {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

/* таблица */
.wiki_text .table table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
  font-size: 16px !important;  
}

/* сброс инлайнов CKFinder */
.wiki_text .table table th,
.wiki_text .table table td {
  all: unset !important;
  display: table-cell !important;
  padding: 12px 16px !important;
  border: 1px solid #e5e7eb !important;
  vertical-align: top !important;
  text-align: left !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  hyphens: auto !important;
}

/* шапка */
.wiki_text .table table thead th {
  background: linear-gradient(to bottom, #f3f4f6, #e5e7eb) !important;
  color: #111827 !important;
  font-weight: 600 !important;
  border-color: #d1d5db !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
}

/* зебра + hover */
.wiki_text .table table tbody tr:nth-child(odd) td { background: #f8fafc !important; }
.wiki_text .table table tbody tr:hover td { background: #f1f5f9 !important; }

/* скругления */
.wiki_text .table table thead tr:first-child th:first-child { border-top-left-radius: 12px !important; }
.wiki_text .table table thead tr:first-child th:last-child  { border-top-right-radius: 12px !important; }
.wiki_text .table table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px !important; }
.wiki_text .table table tbody tr:last-child td:last-child  { border-bottom-right-radius: 12px !important; }

/* подпись (если <caption>) */
.wiki_text .table table caption {
  caption-side: top !important;
  padding: 0 0 8px !important;
  font-weight: 600 !important;
}

/* ===== мобильный вид ===== */
@media (max-width: 640px) {
  .wiki_text .table {
    /* 👇 узкое затухание справа (около 20px) */
    mask-image: linear-gradient(to right, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 96%, transparent 100%);
  }

  .wiki_text .table table {
    width: max-content !important;   /* ширина по содержимому */
    min-width: 700px !important;     /* чтобы не было слишком узко */
    table-layout: auto !important;
  }

  .wiki_text .table table th,
  .wiki_text .table table td {
    white-space: nowrap !important;  /* не ломаем слова — появляется скролл */
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: manual !important;
  }
}




/* Блок отзыва */
.review {
  border: none; /* убираем рамку */
  background: #f9fafc; /* мягкий светлый фон для отделения от страницы */
  border-radius: 10px; /* немного скругляем углы */
  padding: 15px 20px; /* внутренние отступы */
  margin-bottom: 20px; /* расстояние между отзывами */
  box-shadow: 0 2px 6px rgba(0,0,0,0.06); /* лёгкая тень вместо рамки */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Эффект при наведении */
.review:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  /* transform: translateY(-2px); */
}

/* Имя и дата */
.review__name-sub0 {
  font-weight: 600;
  color: #2c3e50;
}

.review__date {
  font-size: 0.9em;
  color: #888;
  margin-left: 6px;
}

/* Текст отзыва */
.review__text {
  color: #333;
  line-height: 1.6;
  margin-top: 8px;
}

/* Кнопка "Ответить" */
.bankFeedbackLink {
  color: #0078ff;
  text-decoration: none;
  font-weight: 500;
}

.bankFeedbackLink:hover {
  text-decoration: underline;
}

/* Блок лайков */
.review_likes_par {
  margin-top: 8px;
  font-size: 0.9em;
  color: #666;
}

.thumb-up,
.thumb-down {
  cursor: pointer;
  font-weight: 600;
  color: #0078ff;
}

.thumb-up:hover,
.thumb-down:hover {
  color: #0056cc;
}






/* Базовая компактность текста */
.wiki_text {
  line-height: 1.6;
  padding: 14px 18px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Абзацы — плотнее и ровные «ступени» */
.wiki_text p { margin: 0.75em 0; }

/* Горизонтальная линия — тонкая, спокойная */
.wiki_text hr {
  height: 1px; border: 0; margin: 1.2em 0;
  background: currentColor; opacity: .12;
}

/* Списки — лучшее выравнивание, аккуратные маркеры */
.wiki_text :where(ul, ol) {
  margin: 0.65em 0 0.65em 1.15em;
  padding: 0;
}
.wiki_text li { margin: 0.3em 0; }
.wiki_text li > :where(ul, ol) { margin: 0.35em 0 0.35em 1.0em; }

/* Маркеры — спокойные, без смены гарнитуры */
/* .wiki_text ul li::marker { content: "•  "; opacity: .65; } */
/* .wiki_text ol li::marker { font-weight: 600; opacity: .7; } */

/* Чек-листы: если используете <ul class="check"> */
/* .wiki_text ul.check li::marker { content: "▢  "; opacity: .55; } */
/* .wiki_text ul.check li.done::marker { content: "▣  "; } */

/* Оглавление (если есть .toc/.contents) — компактная рамка */
.wiki_text .toc,
.wiki_text .contents {
  margin: 0.9em 0; padding: 10px 12px;
  border: 1px solid color-mix(in oklab, currentColor 16%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, currentColor 4%, transparent);
}
@supports not (color-mix(in oklab, black 10%, white)) {
  .wiki_text .toc, .wiki_text .contents {
    border-color: rgba(0,0,0,.14);
    background: rgba(0,0,0,.03);
  }
}
.wiki_text .toc ul,
.wiki_text .contents ul { margin: .4em 0 .4em 1.1em; }
.wiki_text .toc li,
.wiki_text .contents li { margin: .25em 0; }

/* Цитаты — строгая «рейка» слева, без сильного фона */
.wiki_text blockquote {
  margin: 0.9em 0;
  padding: 10px 14px;
  border-left: 3px solid color-mix(in oklab, currentColor 22%, transparent);
  background: color-mix(in oklab, currentColor 5%, transparent);
  border-radius: 4px;
}
@supports not (color-mix(in oklab, black 10%, white)) {
  .wiki_text blockquote {
    border-left-color: rgba(0,0,0,.2);
    background: rgba(0,0,0,.035);
  }
}

/* Примечания/вставки: .note/.info/.warning/.danger */
.wiki_text :where(.note,.info,.warning,.danger) {
  margin: 0.9em 0; padding: 10px 12px; border-radius: 8px;
  border: 1px solid color-mix(in oklab, currentColor 18%, transparent);
  background: color-mix(in oklab, currentColor 4%, transparent);
}
.wiki_text .warning { color: #936300; }
.wiki_text .danger  { color: #8f1d1d; }
.wiki_text .info    { color: inherit; }
@media (prefers-color-scheme: dark) {
  .wiki_text .warning { color: #f0c36d; }
  .wiki_text .danger  { color: #f29a9a; }
}
.wiki_text :where(.note,.info,.warning,.danger) p { margin: .55em 0; }

/* Изображения и подписи — аккуратные отступы */
.wiki_text img {
  /* display: block; max-width: 100%; height: auto; */
  /* margin: 1em auto; border-radius: 6px; */
}
/* .wiki_text figure { margin: 1em 0; } */
.wiki_text figcaption { text-align: center; font-size: .94em; opacity: .8; margin-top: .35em; }

/* Код — спокойные плашки без яркого контраста */
.wiki_text code {
  padding: 0.06em 0.28em;
  border-radius: 4px;
  background: rgba(0,0,0,.05);
}
.wiki_text pre {
  margin: 0.9em 0; padding: 10px 12px;
  border-radius: 6px; overflow: auto;
  background: rgba(0,0,0,.05);
}
.wiki_text pre code { background: transparent; padding: 0; }

/* Клавиши: <kbd>Enter</kbd> */
.wiki_text kbd {
  display: inline-block; padding: .15em .4em;
  border: 1px solid rgba(0,0,0,.2);
  border-bottom-width: 2px; border-radius: 4px;
  background: rgba(0,0,0,.04);
}

/* Определения: dl/dt/dd — вертикальный ритм */
.wiki_text dl { margin: .9em 0; }
.wiki_text dt { font-weight: inherit; margin-top: .5em; }
.wiki_text dd { margin: .2em 0 .5em 1.1em; }

/* Сноски: ссылки и текст сноски стоят ровнее */
.wiki_text sup, .wiki_text sub { line-height: 0; }
.wiki_text .footnotes { margin-top: 1.2em; font-size: 0.95em; opacity: .95; }
.wiki_text .footnotes ol { margin-left: 1.1em; }

/* Внимание к фокусу (клавиатура/доступность) */
.wiki_text :focus-visible {
  outline: 2px solid color-mix(in oklab, currentColor 35%, transparent);
  outline-offset: 2px;
}
@supports not (color-mix(in oklab, black 10%, white)) {
  .wiki_text :focus-visible { outline-color: rgba(0,0,0,.35); }
}

/* Выделение текста */
.wiki_text ::selection {
  background: color-mix(in oklab, currentColor 30%, transparent);
  color: inherit;
}
@supports not (color-mix(in oklab, black 10%, white)) {
  .wiki_text ::selection { background: rgba(0,0,0,.2); }
}


/* ===== СОДЕРЖАНИЕ (TOC) ===== */

/* Общий контейнер */
.section__rko__pagination.toc-box {
  background: #fff;
  border: 1px solid #eceff3;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(18, 28, 45, 0.04);
  font-size: 15px;
  line-height: 1.4;
}

/* Заголовок "Содержание" */
.toc-box .section__title {
  margin-bottom: 4px;
}
.toc-box .section__header {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
}

/* Основной список */
.toc__list {
  margin: 6px 0 8px 0;
  padding-left: 18px;
  list-style-type: decimal;
}
.toc__list li {
  margin: 4px 0;
}
.toc__list a {
  line-height: 1.35;
}
/* Активный пункт (если подсветку подключаешь JS-ом) */
.toc__list a.is-active {
  font-weight: 700;
  text-decoration: underline;
}

/* Блок "Дополнительно" */
.toc__extra {
  border-top: 1px solid #f2f4f7;
  padding-top: 6px;
  margin-top: 6px;
}
.toc__extra .bold {
  font-weight: 600;
  font-size: 14px;
}
.toc__extra ul {
  margin: 4px 0 0 18px;
  padding: 0;
}
.toc__extra li {
  margin: 4px 0;
}


/* ===== АДАПТИВНОСТЬ ===== */

/* Мобильная версия — полноширинный, без float */
@media (max-width: 991px) {
  .section__rko__pagination.toc-box {
    float: none !important;
    width: 100% !important;
    margin: 10px 0 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  .toc__extra {
    display: none; /* можешь убрать, если хочешь показывать */
  }
}

/* Десктоп — оптикание слева */
@media (min-width: 992px) {
  .section__rko__pagination.toc-box {
    float: left;
    width: 320px; /* можешь подстроить 280–360px */
    margin: 0 20px 10px 0;
  }
}

/* якоря не прячутся под фикс-шапку */
[id^="block"] {
  scroll-margin-top: 70px; /* подстрой под высоту шапки */
}

/* Небольшие анимации при ховере — опционально */
.toc__list a {
  position: relative;
}
.toc__list a::before {
  content: "›";
  position: absolute;
  left: -12px;
  opacity: 0;
  transition: opacity 0.15s;
}
.toc__list a:hover::before {
  opacity: 0.3;
}

.comments-wiki{
	padding: 10px;
}


.wiki_text table a,
.wiki_text table a span,
.wiki_text table a strong {
  color: #369 !important;
  text-decoration: none;
}


/* Unified wiki feedback block: Q&A question + article comment + Q&A answer */
.wiki-feedback-unified {
  margin: 32px 0;
  padding: 28px 40px;
  background: #f1f2fb;
  border-radius: 0;
  box-sizing: border-box;
}

.wiki-feedback-switcher {
  margin: 0 0 18px;
}

.wiki-feedback-switcher__title {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #000;
}

.wiki-feedback-switcher__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-feedback-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 18px;
  border: 1px solid #d8dced;
  border-radius: 4px;
  background: #fff;
  color: #2563eb;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.wiki-feedback-tab:hover,
.wiki-feedback-tab.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.wiki-feedback-panel[hidden],
.wiki-feedback-switcher[hidden],
.wiki-feedback-tab[hidden] {
  display: none !important;
}

.wiki-feedback-panel {
  margin: 0;
}

.wiki-feedback-unified .bankFeedback__popup,
.wiki-feedback-unified .qna-form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.wiki-feedback-unified .bankFeedback__top {
  margin-bottom: 16px;
}

.wiki-feedback-unified .bankFeedback__header {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.wiki-feedback-unified .bankFeedback__sides,
.wiki-feedback-unified .qna-form-row {
  margin: 0 0 14px;
}

.wiki-feedback-unified .bankFeedback__message,
.wiki-feedback-unified .qna-form textarea {
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
  resize: vertical;
}

.wiki-feedback-unified .bankFeedback__sides + .bankFeedback__sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.wiki-feedback-unified .bankFeedback__side,
.wiki-feedback-unified .bankFeedback__inputBox,
.wiki-feedback-unified .bankFeedback__user {
  width: 100%;
}

.wiki-feedback-unified .bankFeedback__input,
.wiki-feedback-unified .qna-form input:not([type="hidden"]):not(.qna-hp) {
  width: 100%;
  box-sizing: border-box;
}

.wiki-feedback-unified .bankFeedback__buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.wiki-feedback-unified .bankFeedback__buttons .button_accent,
.wiki-feedback-unified .qna-btn {
  min-width: 176px;
}

.wiki-feedback-unified .qna-form-msg {
  display: block;
  margin: 10px 0 0;
  text-align: center;
}

.wiki-feedback-open-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

@media (max-width: 700px) {
  .wiki-feedback-unified {
    margin: 24px 0;
    padding: 20px 16px;
  }

  .wiki-feedback-switcher__tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .wiki-feedback-tab {
    width: 100%;
  }

  .wiki-feedback-unified .bankFeedback__sides + .bankFeedback__sides {
    grid-template-columns: 1fr;
  }

  .wiki-feedback-unified .bankFeedback__buttons {
    flex-direction: column;
  }

  .wiki-feedback-unified .bankFeedback__buttons .button,
  .wiki-feedback-unified .qna-btn {
    width: 100%;
  }
}

/* v3: form is opened only after clicking a comment/Q&A button */
.wiki-feedback-unified[hidden],
.wiki-feedback-ui[hidden] {
  display: none !important;
}

.wiki-feedback-ui {
  width: 100%;
}

.wiki-feedback-switcher__hint {
  margin: -6px 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #5d6675;
}

.wiki-feedback-tab_question {
  border-color: #e1e6f2;
  background: #f8fafc;
  color: #536071;
}

.wiki-feedback-tab_question:hover,
.wiki-feedback-tab_question.is-active {
  border-color: #94a3b8;
  background: #eef4ff;
  color: #1e63f0;
}

.wiki-feedback-loading {
  padding: 14px 16px;
  border: 1px solid #d8dced;
  background: #fff;
  color: #5d6675;
}

/* Make Q&A visually quieter than article comments */
.js-wiki-feedback-qna-section .qna-box {
  box-shadow: none;
  border-color: #edf1f7;
  background: #fbfcff;
}

.js-wiki-feedback-qna-section .qna-head h2 {
  font-size: 20px;
  border-left-color: #c8d3e6;
}

.js-wiki-feedback-qna-section .qna-head p {
  color: #687386;
}

.js-wiki-feedback-qna-section .qna-btn,
.js-wiki-feedback-qna-section .qna-answer-toggle {
  border: 1px solid #d8e2f2;
  background: #f3f7ff;
  color: #1e63f0;
}
