/* 导航层级连线样式 */

/* 变量定义 */
body.nav-linked {
  --nav-gap: 34px;
  --line-dim: rgba(105, 254, 255, 0.42);
  --line-lit: #02faff;
  --line-lit-glow: rgba(2, 250, 255, 0.75);
  --rail-left: 80px;
  --rail-right: 131px;
}

/* 定位基准 */
body.nav-linked .atst-tab,
body.nav-linked .atst-tab .item {
  position: relative;
}

/* 横向轨道线 */
body.nav-linked .atst-tab::before {
  content: '';
  position: absolute;
  left: var(--rail-left);
  right: var(--rail-right);
  top: calc(var(--nav-gap) / -2 - 1px);
  height: 2px;
  background: var(--line-dim);
  pointer-events: none;
  z-index: 1;
}

/* 短刻度线：每个二级导航中心各一根 */
body.nav-linked .atst-tab .item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--nav-gap) / -2 + 1px);
  width: 2px;
  height: calc(var(--nav-gap) / 2 - 1px);
  margin-left: -1px;
  background: var(--line-dim);
  pointer-events: none;
  z-index: 1;
}

/* 起点竖线：学习任务中心向下 */
body.nav-linked #learning_center::after {
  content: '';
  position: absolute;
  left: calc(50% + var(--source-dx, 0px));
  top: 100%;
  width: 2px;
  height: calc(var(--nav-gap) / 2 + 1px);
  margin-left: -1px;
  background: var(--line-lit);
  box-shadow: 0 0 4px var(--line-lit-glow);
  pointer-events: none;
}

/* 横线：从起点到选中项 */
body.nav-linked .atst-tab .item.cur::after {
  content: '';
  position: absolute;
  top: calc(var(--nav-gap) / -2 - 1px);
  height: 2px;
  left: calc(min(var(--src), 50%) - 1px);
  width: calc(max(var(--src), 50%) - min(var(--src), 50%) + 2px);
  background: var(--line-lit);
  box-shadow: 0 0 4px var(--line-lit-glow);
  pointer-events: none;
  z-index: 2;
}

/* 终点刻度线变亮 */
body.nav-linked .atst-tab .item.cur::before {
  background: var(--line-lit);
  box-shadow: 0 0 4px var(--line-lit-glow);
}

/* 高亮圆点 */
body.nav-linked #learning_center::before,
body.nav-linked .atst-tab .item .nav-link-dot {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 4px;
  background: #00fbff;
  box-shadow: 0 0 4px 0 #01fbff;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* 起点圆点 */
body.nav-linked #learning_center::before {
  left: calc(50% + var(--source-dx, 0px));
  margin-left: -2px;
  top: calc(100% - 0px);
}

/* 终点圆点 */
body.nav-linked .atst-tab .item .nav-link-dot {
  left: 50%;
  margin-left: -2px;
  bottom: calc(100% - 0px);
}

/* 选中时圆点显示 */
body.nav-linked:has(.atst-tab .item.cur) #learning_center::before,
body.nav-linked .atst-tab .item.cur .nav-link-dot {
  opacity: 1;
}

/* 无选中项时起点线隐藏 */
body.nav-linked:not(:has(.atst-tab .item.cur)) #learning_center::after {
  display: none;
}

/* 导航线图片 */
.nav_bg {
  width: 1031px;
  text-align: center;
  margin-left: 118px;
  position: absolute;
  top: -31px;
}