/*
 * codenote 新版布局（仿 labuladong 文章页：左目录 320px / 正文 960px / 右「本文内容」260px）
 * 仅在 html.page--codenote.codenote-v2 下生效
 */

html.page--codenote.codenote-v2 {
  --cn2-nav-h: 45px;
  --cn2-bg: #ffffff;
  --cn2-fg: #3c3c43;
  --cn2-heading: #101828;
  --cn2-sidebar-fg: #364153;
  --cn2-muted-fg: rgba(60, 60, 67, 0.78);
  --cn2-faint-fg: rgba(60, 60, 67, 0.39);
  --cn2-border: #c2c2c4;
  --cn2-border-soft: rgba(194, 194, 196, 0.4);
  --cn2-primary: #3b82f6;
  --cn2-primary-soft: rgba(59, 130, 246, 0.1);
  --cn2-primary-soft-hover: rgba(59, 130, 246, 0.15);
  --cn2-hover: rgba(142, 150, 170, 0.05);
  --cn2-card: #f6f6f7;
  --cn2-code-bg: rgba(142, 150, 170, 0.12);
  --cn2-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --cn2-mono: ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --cn2-done: #10b981;
  --cn2-skeleton: rgba(142, 150, 170, 0.16);
  --cn2-icon-book: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20'/></svg>");
  --cn2-icon-book-open: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 7v14'/><path d='M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z'/></svg>");
  --cn2-icon-book-check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20'/><path d='m9 9.5 2 2 4-4'/></svg>");
}

html.page--codenote.codenote-v2.theme--dark {
  --cn2-bg: #0d1117;
  --cn2-fg: #dfdfd6;
  --cn2-heading: #f0f0f0;
  --cn2-sidebar-fg: #c9d1d9;
  --cn2-muted-fg: rgba(235, 235, 245, 0.6);
  --cn2-faint-fg: rgba(235, 235, 245, 0.35);
  --cn2-border: #3c3f44;
  --cn2-border-soft: rgba(60, 63, 68, 0.7);
  --cn2-primary: #60a5fa;
  --cn2-primary-soft: rgba(96, 165, 250, 0.12);
  --cn2-primary-soft-hover: rgba(96, 165, 250, 0.18);
  --cn2-hover: rgba(101, 117, 133, 0.16);
  --cn2-card: #161b22;
  --cn2-code-bg: rgba(101, 117, 133, 0.2);
  --cn2-done: #3fb950;
  --cn2-skeleton: rgba(101, 117, 133, 0.22);
}

/* Hydro 给 html/body 设了 overflow-y:auto，body 成为不滚动的滚动容器会让 sticky 失效；clip 只裁剪不建滚动容器 */
html.page--codenote.codenote-v2,
html.page--codenote.codenote-v2 body {
  overflow-x: clip;
  overflow-y: visible;
}

/* 内容加载前后滚动条出现/消失会改变视口宽度，预留滚动槽避免三栏横移 */
html.page--codenote.codenote-v2 {
  scrollbar-gutter: stable;
}

html.page--codenote.codenote-v2 body,
html.page--codenote.codenote-v2 #panel,
html.page--codenote.codenote-v2 .main-area {
  background: var(--cn2-bg);
}

/* ==================== 三栏骨架 ==================== */

html.page--codenote.codenote-v2 .page-layout {
  display: flex;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 96px;
  box-sizing: border-box;
  color: var(--cn2-fg);
  font-family: var(--cn2-font);
}

html.page--codenote.codenote-v2 .main-area {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  justify-content: flex-start;
}

html.page--codenote.codenote-v2 .content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 32px 40px;
}

html.page--codenote.codenote-v2 .content-container > * {
  width: min(960px, 100%);
  max-width: 960px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1535px) {
  html.page--codenote.codenote-v2 .page-layout {
    padding: 0 48px;
  }
}

@media (max-width: 1279px) {
  html.page--codenote.codenote-v2 .page-layout {
    padding: 0 24px;
  }
}

/* ==================== 左侧目录 ==================== */

@media (min-width: 1201px) {
  html.page--codenote.codenote-v2 .sidebar-fixed {
    position: sticky;
    top: var(--cn2-nav-h);
    left: auto;
    flex: 0 0 auto;
    width: 320px !important;
    height: calc(100vh - var(--cn2-nav-h));
    padding: 24px;
    box-sizing: border-box;
    background: transparent;
    border-right: 1px solid var(--cn2-border-soft);
    transform: none;
    overflow: visible;
    z-index: 10;
    transition: width 0.3s ease, padding 0.3s ease;
  }

  html.page--codenote.codenote-v2 .sidebar-fixed.collapsed {
    width: 0 !important;
    padding-left: 0;
    padding-right: 0;
    transform: none;
  }

  html.page--codenote.codenote-v2 .sidebar-fixed.collapsed .sidebar-content {
    visibility: hidden;
    opacity: 0;
  }

  html.page--codenote.codenote-v2 .sidebar-toggle {
    left: auto !important;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 48px;
    font-size: 12px;
    color: var(--cn2-faint-fg);
    transform: translate(100%, -50%);
    z-index: 20;
    transition: color 0.2s ease;
  }

  html.page--codenote.codenote-v2 .sidebar-toggle:hover {
    color: var(--cn2-muted-fg);
  }
}

@media (max-width: 1200px) {
  html.page--codenote.codenote-v2 .page-layout {
    padding: 0 16px;
  }

  html.page--codenote.codenote-v2 .sidebar-fixed {
    top: var(--cn2-nav-h);
    width: min(320px, calc(100vw - 48px)) !important;
    height: calc(100vh - var(--cn2-nav-h));
    padding: 24px 16px;
    box-sizing: border-box;
    background: var(--cn2-bg);
    border-right: 1px solid var(--cn2-border-soft);
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.08);
  }

  html.page--codenote.codenote-v2 .sidebar-toggle {
    display: none;
  }

  html.page--codenote.codenote-v2 .content-container {
    padding: 24px 8px;
  }
}

html.page--codenote.codenote-v2 .sidebar-content {
  padding: 0;
  transition: opacity 0.2s ease;
}

/* 高度取内容实际高度，超出侧栏可用高度时才收缩并滚动，底部操作紧跟列表 */
html.page--codenote.codenote-v2 #toc-container {
  flex: 0 1 auto;
  margin-bottom: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--cn2-border) transparent;
}

html.page--codenote.codenote-v2 #toc-container::-webkit-scrollbar-track {
  background: transparent;
}

html.page--codenote.codenote-v2 .toc-header {
  margin-bottom: 16px;
  padding: 0 8px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

html.page--codenote.codenote-v2 .toc-header-line2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--cn2-sidebar-fg);
}

html.page--codenote.codenote-v2 .toc-nav li {
  margin-bottom: 1px;
}

html.page--codenote.codenote-v2 #toc-container > li + li {
  margin-top: 16px;
}

html.page--codenote.codenote-v2 .toc-item,
html.page--codenote.codenote-v2 .toc-nav .toc-nav .toc-item {
  gap: 6px;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--cn2-sidebar-fg);
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

html.page--codenote.codenote-v2 .toc-item:hover {
  background: var(--cn2-hover);
  color: var(--cn2-heading);
}

html.page--codenote.codenote-v2 .toc-item.active {
  background: var(--cn2-primary-soft);
  color: var(--cn2-primary);
  font-weight: 500;
}

html.page--codenote.codenote-v2 .toc-item.active:hover {
  background: var(--cn2-primary-soft-hover);
}

html.page--codenote.codenote-v2 .toc-item.active::before {
  display: none;
}

html.page--codenote.codenote-v2 .toc-item > span:not(.toc-read-status) {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.page--codenote.codenote-v2 .toc-item i {
  width: 16px;
  margin-right: 0;
  font-size: 14px;
  text-align: center;
  color: var(--cn2-muted-fg);
  flex-shrink: 0;
}

html.page--codenote.codenote-v2 .toc-item.active i {
  color: inherit;
}

/* 分类行：纯文字 + 右侧箭头 */
html.page--codenote.codenote-v2 #toc-container > li > .toc-item:not([data-pid]) > .fa-folder {
  display: none;
}

html.page--codenote.codenote-v2 #toc-container > li > .toc-item:not([data-pid]) {
  color: var(--cn2-fg);
}

html.page--codenote.codenote-v2 .toc-item .fa-chevron-right,
html.page--codenote.codenote-v2 .toc-item .fa-chevron-down {
  margin-left: 0;
  font-size: 12px;
  color: var(--cn2-muted-fg);
}

html.page--codenote.codenote-v2 .toc-nav > li > .toc-nav,
html.page--codenote.codenote-v2 .toc-nav > li.expanded > .toc-nav {
  margin-top: 0;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--cn2-border-soft);
}

html.page--codenote.codenote-v2 .toc-status-icon {
  margin-right: 0 !important;
}

/* 阅读状态：未读 book / 阅读中 book-open / 已读完 book-check（lucide） */
html.page--codenote.codenote-v2 .toc-read-status {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background-color: var(--cn2-muted-fg);
  opacity: 0.6;
  -webkit-mask: var(--cn2-icon-book) center / 16px 16px no-repeat;
  mask: var(--cn2-icon-book) center / 16px 16px no-repeat;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

html.page--codenote.codenote-v2 .toc-item[data-read-status='1'] .toc-read-status {
  background-color: var(--cn2-primary);
  opacity: 1;
  -webkit-mask-image: var(--cn2-icon-book-open);
  mask-image: var(--cn2-icon-book-open);
}

html.page--codenote.codenote-v2 .toc-item[data-read-status='2'] .toc-read-status {
  background-color: var(--cn2-done);
  opacity: 1;
  -webkit-mask-image: var(--cn2-icon-book-check);
  mask-image: var(--cn2-icon-book-check);
}

html.page--codenote.codenote-v2 .sidebar-content {
  display: flex;
  flex-direction: column;
}

html.page--codenote.codenote-v2 .toc-footer {
  flex: 0 0 auto;
  margin-top: 16px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--cn2-border-soft);
}

html.page--codenote.codenote-v2 .toc-clear-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: var(--cn2-muted-fg);
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
  transition: color 0.15s ease;
}

html.page--codenote.codenote-v2 .toc-clear-read-btn:hover {
  color: #ef4444;
}

html.page--codenote.codenote-v2 .toc-clear-read-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

html.page--codenote.codenote-v2 .toc-status-accepted {
  color: #10b981;
}

html.page--codenote.codenote-v2 .toc-status-wrong {
  color: #ef4444;
}

/* ==================== 文章头部 ==================== */

html.page--codenote.codenote-v2 .doc-header {
  margin-bottom: 0;
}

html.page--codenote.codenote-v2 .doc-header-title {
  flex-wrap: wrap;
  gap: 8px 0;
  margin-bottom: 24px;
  padding-bottom: 0;
  font-size: 13px;
  color: var(--cn2-muted-fg);
}

html.page--codenote.codenote-v2 .doc-header-problem {
  margin-top: 0;
  font-family: var(--cn2-font);
}

html.page--codenote.codenote-v2 .doc-header-problem-title {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--cn2-heading);
}

html.page--codenote.codenote-v2 .doc-header-problem-views,
html.page--codenote.codenote-v2 .doc-header-problem-views .doc-header-problem-view-count {
  color: var(--cn2-muted-fg) !important;
}

html.page--codenote.codenote-v2 .doc-header-problem-rule {
  margin: 40px 0 32px;
  border-top: 1px solid var(--cn2-border);
}

html.page--codenote.codenote-v2 .codenote-share-btn {
  width: 32px;
  height: 32px;
  border-color: var(--cn2-border-soft);
  border-radius: 8px;
  background: transparent;
  color: var(--cn2-muted-fg);
}

html.page--codenote.codenote-v2 .codenote-share-btn:hover {
  border-color: var(--cn2-border);
  background: var(--cn2-card);
  color: var(--cn2-primary);
}

/* ==================== 正文排版 ==================== */

html.page--codenote.codenote-v2 .markdown-body {
  font-family: var(--cn2-font) !important;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cn2-fg);
}

/* 加载态：骨架屏占位并撑住首屏高度，底部栏 / 页脚不会先于正文露出 */
html.page--codenote.codenote-v2 .markdown-body.markdown-body--fetching {
  min-height: calc(100vh - var(--cn2-nav-h) - 180px);
}

html.page--codenote.codenote-v2 .markdown-body.markdown-body--fetching > .markdown-loading {
  display: block;
  padding-top: 8px;
  background: var(--cn2-bg);
}

html.page--codenote.codenote-v2 .markdown-body--fetching > .markdown-loading > * {
  display: none;
}

html.page--codenote.codenote-v2 .markdown-body--fetching > .markdown-loading::before {
  content: '';
  display: block;
  height: 320px;
  max-height: 100%;
  background:
    linear-gradient(var(--cn2-skeleton) 0 0) 0 0 / 42% 28px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 60px / 100% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 88px / 96% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 116px / 90% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 144px / 62% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 196px / 30% 22px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 238px / 100% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 266px / 94% 14px,
    linear-gradient(var(--cn2-skeleton) 0 0) 0 294px / 76% 14px;
  background-repeat: no-repeat;
  animation: cn2-skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes cn2-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

html.page--codenote.codenote-v2 .markdown-body p {
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.6;
}

html.page--codenote.codenote-v2 .markdown-body strong {
  font-weight: 600;
}

/* 右侧目录一级 = h1，对应 labuladong 的 h2 样式；依次下移一级 */
html.page--codenote.codenote-v2 .markdown-body h1 {
  margin: 48px 0 16px;
  padding-bottom: 8px;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cn2-heading);
  border-bottom: 1px solid var(--cn2-border);
  scroll-margin-top: 64px;
}

html.page--codenote.codenote-v2 .markdown-body h2 {
  margin: 40px 0 12px;
  padding-bottom: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cn2-heading);
  border-bottom: none;
  scroll-margin-top: 64px;
}

html.page--codenote.codenote-v2 .markdown-body h3 {
  margin: 20px 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cn2-heading);
  scroll-margin-top: 64px;
}

html.page--codenote.codenote-v2 .markdown-body h4 {
  margin: 16px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cn2-heading);
}

html.page--codenote.codenote-v2 .markdown-body a {
  color: var(--cn2-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

html.page--codenote.codenote-v2 .markdown-body a:hover {
  text-decoration: none;
  border-bottom-color: var(--cn2-primary);
}

html.page--codenote.codenote-v2 .markdown-body :not(pre) > code {
  padding: 0.2em 0.4em;
  border-radius: 4px;
  background: var(--cn2-code-bg);
  color: var(--cn2-heading);
  font-family: var(--cn2-mono);
  font-size: 0.85em;
  font-weight: 400;
}

html.page--codenote.codenote-v2 .markdown-body pre {
  margin: 24px 0;
}

html.page--codenote.codenote-v2 .markdown-body ul,
html.page--codenote.codenote-v2 .markdown-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

html.page--codenote.codenote-v2 .markdown-body li {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.7;
}

html.page--codenote.codenote-v2 .markdown-body blockquote {
  margin: 8px 0;
  padding: 6px 14px;
  border-left: none;
  border-radius: 8px;
  background: var(--cn2-card);
  color: var(--cn2-fg);
  font-style: normal;
}

html.page--codenote.codenote-v2 .markdown-body img {
  border-radius: 8px;
}

html.page--codenote.codenote-v2 .markdown-body th {
  white-space: nowrap;
}

/* ==================== 正文结束分割线 ==================== */

html.page--codenote.codenote-v2 .codenote-read-end {
  height: 1px;
  margin-top: 48px;
  margin-bottom: 36px;
  background: var(--cn2-border);
}

/* ==================== 上一篇 / 下一篇 ==================== */

html.page--codenote.codenote-v2 .content-container > .codenote-v2-pager {
  width: min(960px, 100%);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

html.page--codenote.codenote-v2 .codenote-v2-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

html.page--codenote.codenote-v2 .codenote-v2-pager:empty {
  display: none;
}

html.page--codenote.codenote-v2 .cn2-pager-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--cn2-border);
  border-radius: 8px;
  color: var(--cn2-fg);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

html.page--codenote.codenote-v2 .cn2-pager-link:hover {
  background: var(--cn2-card);
  color: var(--cn2-heading);
}

html.page--codenote.codenote-v2 .cn2-pager-link--next {
  grid-column: 2;
  text-align: end;
}

html.page--codenote.codenote-v2 .cn2-pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cn2-muted-fg);
  font-size: 12px;
  line-height: 16px;
}

html.page--codenote.codenote-v2 .cn2-pager-link--next .cn2-pager-label {
  flex-direction: row-reverse;
}

html.page--codenote.codenote-v2 .cn2-pager-title {
  margin: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  html.page--codenote.codenote-v2 .codenote-v2-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  html.page--codenote.codenote-v2 .cn2-pager-link--next {
    grid-column: auto;
  }
}

/* ==================== 右侧「本文内容」 ==================== */

html.page--codenote.codenote-v2 .right-toc .toc-title {
  display: none;
}

html.page--codenote.codenote-v2 .right-toc-v2-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  color: var(--cn2-fg);
}

html.page--codenote.codenote-v2 .right-toc .toc-list li {
  margin-bottom: 4px;
}

html.page--codenote.codenote-v2 .right-toc .toc-list a {
  margin-left: -2.5px;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
  color: var(--cn2-muted-fg);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  transition: color 0.15s ease, border-color 0.15s ease;
}

html.page--codenote.codenote-v2 .right-toc .toc-list a:hover {
  color: var(--cn2-fg);
  border-left-color: var(--cn2-border);
}

html.page--codenote.codenote-v2 .right-toc .toc-list a.active {
  color: var(--cn2-primary);
  border-left-color: var(--cn2-primary);
  font-weight: 500;
}

html.page--codenote.codenote-v2 .right-toc .toc-list a.toc-h2 {
  padding-left: 22px;
  font-size: 14px;
}

@media (min-width: 1300px) {
  html.page--codenote.codenote-v2 .right-toc-shell {
    position: sticky;
    top: var(--cn2-nav-h);
    align-self: flex-start;
    flex: 0 0 260px;
    width: 260px;
    height: calc(100vh - var(--cn2-nav-h) - 72px);
    padding: 24px 8px 24px 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  html.page--codenote.codenote-v2 .right-toc {
    position: relative;
    top: auto !important;
    left: auto;
    width: auto;
    max-height: none;
    padding: 0 0 0 12px;
    overflow: visible;
    background: transparent !important;
    z-index: auto;
  }

  html.page--codenote.codenote-v2 .right-toc::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--cn2-border);
    opacity: 0.6;
  }

  html.page--codenote.codenote-v2 .right-toc .toc-list {
    max-height: calc(100vh - var(--cn2-nav-h) - 150px);
    overflow-y: auto;
    padding-right: 8px;
    line-height: 1.6;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--cn2-muted-fg) transparent;
  }

  html.page--codenote.codenote-v2 .right-toc .toc-list::-webkit-scrollbar {
    width: 6px;
  }

  html.page--codenote.codenote-v2 .right-toc .toc-list::-webkit-scrollbar-thumb {
    background-color: var(--cn2-muted-fg);
    border-radius: 999px;
  }
}
