/* Stellar v2 主题适配：长代码块折叠 */

figure.highlight.is-collapsible {
  position: relative;
  /* 收起后跳回代码块头部时，避开吸顶区域 */
  scroll-margin-top: calc(var(--gap-page) + 16px);
}

figure.highlight.is-collapsible > .code-fold-btn {
  display: block;
  padding: 7px 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-meta);
  background: var(--block);
  border-top: 1px dashed var(--block-border);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

/* hover：只做轻微提亮，不叠半透明色块 */
figure.highlight.is-collapsible > .code-fold-btn:hover {
  color: var(--text-p2);
  background: color-mix(in srgb, var(--text-p1) 4%, var(--block));
}

figure.highlight.is-collapsible > .code-fold-btn:active {
  color: var(--text-p1);
  background: color-mix(in srgb, var(--text-p1) 7%, var(--block));
}
