/* 家族和子栏目沿用站点侧栏样式，型号由栏目主列表展示。 */
.agt-classification-tree {
  --agt-classification-accent: #72ad59;
  --agt-classification-toggle-size: 44px;
  --agt-classification-icon-size: 12px;
  --agt-classification-icon-stroke: 2px;
}

.agt-classification-tree > .agt-classification-branch > a {
  padding-inline-end: calc(var(--agt-classification-toggle-size) + 12px);
  overflow-wrap: anywhere;
}

.agt-classification-tree > .agt-classification-branch > .prerji {
  display: none;
}

.agt-classification-tree > .is-expanded > .prerji {
  display: block;
}

.agt-classification-tree .prerji[hidden] {
  display: none;
}

.agt-classification-tree .prerji > li > a {
  padding-inline-end: 16px;
  overflow-wrap: anywhere;
}

.agt-classification-tree > .is-current > a,
.agt-classification-tree > .is-expanded > a {
  background: var(--agt-classification-accent);
  color: #fff;
}

.agt-classification-toggle {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  display: grid;
  place-items: center;
  inline-size: var(--agt-classification-toggle-size);
  block-size: var(--agt-classification-toggle-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #bbb;
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.agt-classification-toggle::before,
.agt-classification-toggle::after {
  content: "";
  position: absolute;
  inline-size: var(--agt-classification-icon-size);
  block-size: var(--agt-classification-icon-stroke);
  background: currentColor;
}

.agt-classification-toggle::after {
  transform: rotate(90deg);
}

.agt-classification-toggle[aria-expanded="true"]::after {
  display: none;
}

.agt-classification-branch:hover > .agt-classification-toggle,
.agt-classification-branch.is-current > .agt-classification-toggle,
.agt-classification-toggle[aria-expanded="true"] {
  color: #fff;
}

/* 没有公开内容时不显示空列表按钮；CSS 与脚本都依据实际渲染的条目判断。 */
.agt-classification-toggle[hidden] {
  display: none;
}

.agt-classification-tree a:focus-visible,
.agt-classification-toggle:focus-visible {
  outline: 2px solid var(--agt-classification-accent);
  outline-offset: -3px;
}

.agt-classification-tree > .is-current > a:focus-visible,
.agt-classification-tree > .is-expanded > a:focus-visible,
.agt-classification-toggle[aria-expanded="true"]:focus-visible {
  outline-color: #fff;
}

/* 标题在桌面作栏目名，在移动端是控制整棵目录的原生按钮。 */
.pro-slide-title > button.biaoti {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: start;
}
.pro-slide-title > button.biaoti:enabled { cursor: pointer; min-height: 44px; }
.pro-slide-title > button.biaoti:disabled { opacity: 1; }
.agt-classification-tree .prerji a[aria-current="page"] { color: #b6e69e; background: #20291c; }
@media (max-width: 992px) {
  .pro-slide .agt-classification-tree.is-menu-open { display: block; }
}
