/* LVLTOP — меню «Хаб», вариант H «Блоки». Префикс hub-* — не конфликтует со стилями страниц. */

.theme-doc-sidebar-menu.hub-list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hub-list [hidden] { display: none !important; }

.hub-root {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  transition: background-color 160ms ease;
}
.hub-root:hover { background: rgba(255, 255, 255, 0.06); }
.hub-root-t {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: var(--text, #E8EDF3);
}
.hub-root-c {
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
  color: var(--text-2, #9AA7B6);
  font-variant-numeric: tabular-nums;
}
.hub-root.on { box-shadow: inset 2px 0 0 var(--accent, #4A8FE5); }
.hub-root.on .hub-root-t { color: var(--accent, #4A8FE5); }

.hub-blk {
  background: var(--raise, #18202B);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.hub-blk.cur { box-shadow: inset 0 0 0 1px rgba(74, 143, 229, 0.14); }

.hub-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #E8EDF3);
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.hub-hd:focus-visible {
  outline: 2px solid var(--accent, #4A8FE5);
  outline-offset: -2px;
  border-radius: 12px;
}
.hub-blk.cur > .hub-hd { color: var(--accent, #4A8FE5); }

.hub-chev {
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.5px solid var(--text-3, #66768A);
  border-bottom: 1.5px solid var(--text-3, #66768A);
  transform: rotate(-45deg);
  transition: transform 220ms cubic-bezier(.2, .7, .2, 1);
}
.hub-blk.open > .hub-hd .hub-chev { transform: rotate(45deg) translate(-2px, -2px); }

.hub-t { min-width: 0; }
.hub-cnt {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3, #66768A);
  font-variant-numeric: tabular-nums;
}

.hub-body { overflow: hidden; padding: 0 8px; }
.hub-blk.closed > .hub-body { display: none; }
.hub-in { padding: 0 0 8px; }

/* Вложенные группы (например, монументы по тирам) — на ступень глубже. */
.hub-in .hub-blk { background: none; margin: 4px 0 0; }
.hub-in .hub-blk > .hub-hd { padding: 8px 12px; font-size: 13px; }
.hub-in .hub-blk > .hub-body { padding: 0 0 0 12px; }

.hub-it {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2, #9AA7B6);
  text-decoration: none;
}
.hub-it:hover { background: rgba(255, 255, 255, 0.04); color: var(--text, #E8EDF3); }
.hub-it.on {
  background: rgba(74, 143, 229, 0.14);
  color: var(--text, #E8EDF3);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--accent, #4A8FE5);
}

@media (prefers-reduced-motion: reduce) {
  .hub-chev { transition: none; }
}

/* Без подчёркивания при наведении (глобальный a:hover перекрывал .hub-it / .hub-root). */
.hub-it:hover,
.hub-root:hover { text-decoration: none; }

/* Резерв под полосу прокрутки: без него текст сдвигался при открытии/закрытии разделов. */
aside[data-hub] .menu { scrollbar-gutter: stable; }
