.o-anchor {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.o-anchor-line {
  flex-shrink: 0;
  position: relative;
  width: var(--anchor-line-width);
  border-radius: var(--anchor-line-width);
  margin-right: var(--anchor-line-gap);
  margin-left: calc(var(--anchor-circle-size) / 2);
}

.o-anchor-indicator {
  position: absolute;
  display: flex;
  align-items: center;
  width: var(--anchor-indicator-width);
  background-color: transparent;
  opacity: 0;
  transition: top var(--o-easing-standard-in) var(--o-duration-m1);
}
.o-anchor-indicator::after {
  content: "";
  width: var(--anchor-indicator-width);
  height: var(--anchor-indicator-height);
  border-radius: var(--anchor-line-width);
  background-color: var(--o-color-primary1);
}

.o-anchor-item {
  min-width: var(--anchor-item-min-width);
  width: var(--anchor-item-width);
}

.o-anchor-item-link {
  --anchor-item-link-left-extra-indent: calc(var(--anchor-item-text-indent) * var(--anchor-item-depth));
  --anchor-circle-top: calc(var(--anchor-item-link-padding-v) + var(--anchor-item-link-text-height) / 2 - var(--anchor-circle-size) / 2);
  cursor: pointer;
  display: inline-flex;
  text-decoration: none;
  width: 100%;
  color: var(--anchor-item-link-color, inherit);
  font-size: var(--anchor-item-link-text-size);
  line-height: var(--anchor-item-link-text-height);
  padding: var(--anchor-item-link-padding-v) var(--anchor-item-link-padding-h);
  padding-left: calc(var(--anchor-item-link-left-extra-indent) + var(--anchor-item-link-padding-h));
  border-radius: var(--anchor-item-link-radius);
  transition: background-color var(--o-duration-s) var(--o-easing-standard);
  word-break: break-word;
  position: relative;
}
@media (hover: hover) {
  .o-anchor-item-link:hover {
    color: var(--anchor-item-link-color-hover);
  }
}
.o-anchor-item-link:active {
  color: var(--anchor-item-link-color-press);
}
.o-anchor-item-link.disabled {
  color: var(--anchor-item-link-color-disabled);
}
@media (hover: hover) {
  .o-anchor-item-link.disabled:hover {
    cursor: not-allowed;
  }
}

.o-anchor-item:has(.o-anchor-item-link.is-active) > .o-anchor-item-link:not(.disabled),
.o-anchor-item-link.is-active:not(.disabled) {
  font-weight: 600;
  color: var(--anchor-item-link-color-active);
}
.o-anchor-item:has(.o-anchor-item-link.is-active) > .o-anchor-item-link:not(.disabled) .o-anchor-item-circle,
.o-anchor-item-link.is-active:not(.disabled) .o-anchor-item-circle {
  border-color: currentColor;
}

.o-anchor-item-title {
  max-height: calc(var(--anchor-item-max-row) * var(--anchor-item-link-text-height));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--anchor-item-max-row);
}

.o-anchor-item-sub-link {
  font-size: var(--anchor-item-sub-link-text-size);
  line-height: var(--anchor-item-sub-link-text-height);
  padding-top: var(--anchor-item-sub-link-padding-v);
  padding-bottom: var(--anchor-item-sub-link-padding-v);
}

.o-anchor-item-lines {
  width: var(--anchor-line-width);
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(0px - var(--anchor-line-gap) - var(--anchor-line-width));
}

.o-anchor-item-top-line,
.o-anchor-item-bottom-line {
  background-color: var(--anchor-line-bg-color);
  position: absolute;
  left: 0;
  right: 0;
}

.o-anchor-item-top-line {
  top: 0;
  bottom: 50%;
}

.o-anchor-item-bottom-line {
  top: 50%;
  bottom: 0;
}

.o-anchor-item-link:not(.o-anchor-item-sub-link) .o-anchor-item-circle {
  position: absolute;
  height: var(--anchor-circle-size);
  width: var(--anchor-circle-size);
  top: var(--anchor-circle-top);
  left: 50%;
  transform: translateX(-50%);
  border: var(--anchor-circle-ring-width) solid var(--anchor-line-bg-color);
  border-radius: 50%;
}
.o-anchor-item-link:not(.o-anchor-item-sub-link) .o-anchor-item-top-line {
  bottom: unset;
  height: calc(var(--anchor-circle-top) - var(--anchor-circle-gap));
}
.o-anchor-item-link:not(.o-anchor-item-sub-link) .o-anchor-item-bottom-line {
  top: calc(var(--anchor-circle-top) + var(--anchor-circle-size) + var(--anchor-circle-gap));
}
@media (hover: hover) {
  .o-anchor-item-link:not(.o-anchor-item-sub-link):hover .o-anchor-item-circle {
    border-color: currentColor;
  }
}

.o-anchor-items > .o-anchor-item:first-child > .o-anchor-item-link .o-anchor-item-top-line {
  display: none;
}
.o-anchor-items > .o-anchor-item:last-child:not(.with-children) > .o-anchor-item-link .o-anchor-item-bottom-line {
  display: none;
}

@media (hover: hover) {
  .o-anchor-menu .o-anchor-item-sub-link:hover {
    background-color: var(--anchor-item-bg-color-hover);
  }
}
.o-anchor-menu .o-anchor-item-sub-link:active {
  background-color: var(--anchor-item-bg-color-press);
}

.o-anchor-link-popover-wrapper {
  max-width: var(--anchor-popover-max-width);
}

.o-anchor {
  --anchor-line-width: 1px;
  --anchor-line-bg-color: var(--o-color-control4);
  --anchor-line-gap: var(--o-gap-2);
  --anchor-indicator-width: 2px;
  --anchor-indicator-height: 12px;
  --anchor-indicator-bg-color: var(--o-color-primary1);
  --anchor-circle-size: 8px;
  --anchor-circle-ring-width: 1.5px;
  --anchor-circle-gap: 8px;
}

.o-anchor-item {
  --anchor-item-min-width: 144px;
  --anchor-item-link-color: var(--o-color-info2);
  --anchor-item-link-color-active: var(--o-color-primary1);
  --anchor-item-link-color-hover: var(--o-color-primary2);
  --anchor-item-link-color-press: var(--o-color-primary3);
  --anchor-item-link-color-disabled: var(--o-color-info4);
  --anchor-item-max-row: 2;
  --anchor-item-link-text-size: var(--o-font_size-text1);
  --anchor-item-link-text-height: var(--o-line_height-text1);
  --anchor-item-sub-link-text-size: var(--o-font_size-tip1);
  --anchor-item-sub-link-text-height: var(--o-line_height-tip1);
  --anchor-item-link-padding-h: 8px;
  --anchor-item-link-padding-v: 8px;
  --anchor-item-sub-link-padding-v: 5px;
  --anchor-item-link-radius: var(--o-radius_control-s);
  --anchor-item-text-indent: 12px;
}

.o-anchor-small .o-anchor-item {
  --anchor-item-link-text-size: var(--o-font_size-tip1);
  --anchor-item-link-text-height: var(--o-line_height-tip1);
  --anchor-item-sub-link-text-size: var(--o-font_size-tip2);
  --anchor-item-sub-link-text-height: var(--o-line_height-tip2);
  --anchor-item-link-padding-v: 5px;
  --anchor-item-sub-link-padding-v: 5px;
}

.o-anchor-menu .o-anchor-item {
  --anchor-item-link-text-size: var(--o-font_size-tip1);
  --anchor-item-link-text-height: var(--o-line_height-tip1);
  --anchor-item-sub-link-text-size: var(--o-font_size-tip1);
  --anchor-item-sub-link-text-height: var(--o-line_height-tip1);
  --anchor-item-link-padding-v: 5px;
  --anchor-item-sub-link-padding-v: 5px;
  --anchor-item-text-indent: 20px;
  --anchor-item-bg-color-hover: var(--o-color-control2-light);
  --anchor-item-bg-color-press: var(--o-color-control3-light);
}

.o-anchor-link-popover-wrapper {
  --anchor-popover-max-width: 200px;
}

@media (min-width: 0px) and (max-width: 1680px) {
  .o-anchor:not(.o-anchor-menu) .o-anchor-item {
    --anchor-item-link-text-size: var(--o-font_size-tip1);
    --anchor-item-link-text-height: var(--o-line_height-tip1);
    --anchor-item-sub-link-text-size: var(--o-font_size-tip2);
    --anchor-item-sub-link-text-height: var(--o-line_height-tip2);
    --anchor-item-link-padding-v: 5px;
    --anchor-item-sub-link-padding-v: 5px;
  }
}
@media (max-width: 840px) {
  .o-anchor-menu .o-anchor-item {
    --anchor-item-sub-link-text-size: var(--o-font_size-tip2);
    --anchor-item-sub-link-text-height: var(--o-line_height-tip2);
  }
}