body {
  max-width: 800px;
  margin: auto;
  padding: 1em;
  line-height: 1.7;
}

/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  background: #eee;
  padding: 5px;
  border-radius: 5px;
}
.terms { font-size: .9em; }
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
  border-style: dashed;
  color: #ddd;
}
/* #TableOfContents, #TOC {
  border: 1px solid #eee;
  border-radius: 5px;
} */

/* pagination */
.pagination { text-align: center; }
.pagination li { display: inline; }
.pagination a { padding: 0 .2em; }

/* code */
pre {
  /*border: 1px solid #ddd;*/
  /*box-shadow: 5px 5px 5px #eee;*/
  /*padding: 1em;*/
  overflow-x: auto;
  border-radius: 5px;
  line-height: 1.9;
}

/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

table {
  margin: auto;
  /*border-top: 1px solid #666;*/
  /*border-bottom: 1px solid #666;*/
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }


/**
 * GitHub Light 风格的自定义样式
 * 基于 hugo-xmin 主题进行调整
 */

/* 基础字体设置 */
body,
button,
input,
select,
textarea {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 14px;
    /* line-height: 1.5; */
    color: #24292f;
}

/* 标题字体设置 */
.title,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-weight: 600;
    color: #24292f;
    margin-top: 24px;
    margin-bottom: 16px;
}

h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

h3 {
    font-size: 1.25em;
}

h4 {
    font-size: 1em;
}

/* 主体内容样式 */
.single main {
    padding: 2rem;
    border-radius: 6px;
    border: 1px solid #d0d7de;
    background-color: #ffffff;
}

/* 链接样式 */
a {
    color: #0969da;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    display: block;
    overflow-x: auto;
}

table th,
table td {
    padding: 6px 13px;
    border: 1px solid #d0d7de;
}

table tr {
    background-color: #ffffff;
    border-top: 1px solid #d0d7de;
}

table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

table thead tr {
    background-color: #f6f8fa;
}

/* 引用块样式 */
blockquote {
    padding: 0 1em;
    color: #57606a;
    border-left: 0.25em solid #d0d7de;
    margin: 16px 0;
}



/* 列表样式 */
ul, ol {
    padding-left: 2em;
}

li + li {
    margin-top: 0.25em;
}

/* 搜索框样式 */
.search input {
    padding: 5px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    outline: none;
}

.search input:focus {
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
}

/* 页脚样式 */
footer {
    margin-top: 32px;
    padding: 16px 0;
    color: #57606a;
    font-size: 12px;
}
/* ========== Hugo Chroma: Atom One Light 代码高亮方案 ========== */
.highlight {
  margin-top: 0;
  margin-bottom: 16px;
}

pre,
.highlight pre.chroma {
  background-color: #fafafa !important;
  color: #383a42 !important;
  border: 1px solid #eaecef !important;
  border-radius: 6px !important;
  font-family: var(--font-mono) !important;
  font-size: 88% !important;
  line-height: 1.65 !important;
  overflow: auto;
  padding: 16px !important;
  margin-top: 0;
  margin-bottom: 16px;
  tab-size: 4;
  outline: none;
}

.highlight pre.chroma {
  margin-bottom: 0;
}

pre code,
.chroma code {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 100% !important;
  line-height: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: pre;
  word-break: normal;
}

/* 关键字 (func, return, if, type, struct, package, import...) -> One Light 紫 (#a626a4) */
.chroma .k,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr,
.chroma .ow {
  color: #a626a4;
  font-weight: normal;
}

/* 函数名、方法调用、标签 -> One Light 蓝 (#4078f2) */
.chroma .nf,
.chroma .fm,
.chroma .nl,
.chroma .language-java .na,
.chroma .language-scala .na {
  color: #4078f2;
  font-weight: normal;
}

/* 运算符、内置函数 (make, len, append)、正则、符号 -> One Light 青蓝 (#0184bc) */
.chroma .o,
.chroma .nb,
.chroma .sr,
.chroma .ss {
  color: #0184bc;
  font-weight: normal;
}

/* 类型 (string, int)、类名、结构体、注解/装饰器、命名空间 -> One Light 暖金 (#c18401) */
.chroma .kt,
.chroma .nc,
.chroma .nd,
.chroma .ne,
.chroma .nn {
  color: #c18401;
  font-weight: normal;
}

/* 数字、布尔值、常量、属性名 -> One Light 琥珀橙 (#986801) */
.chroma .kc,
.chroma .no,
.chroma .na,
.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo {
  color: #986801;
  font-weight: normal;
}

/* HTML/XML/YAML 标签、特殊变量 (this/self)、成员属性 -> One Light 珊瑚红 (#e45649) */
.chroma .nt,
.chroma .bp,
.chroma .nv,
.chroma .vc,
.chroma .vg,
.chroma .vi,
.chroma .vm,
.chroma .py {
  color: #e45649;
}

/* 字符串字面量 -> One Light 森林绿 (#50a14f) */
.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .se,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .s1 {
  color: #50a14f;
}

/* 括号 ()[]{} 与标点符号 .,;: -> 清冷中灰 (#696c77)，弱化视觉噪点 */
.chroma .p {
  color: #696c77;
}

/* 普通标识符与变量 */
.chroma .n,
.chroma .nx {
  color: #383a42;
}

/* 注释 -> One Light 浅灰斜体 (#a0a1a7) */
.chroma .c,
.chroma .ch,
.chroma .cm,
.chroma .c1,
.chroma .cs,
.chroma .cp,
.chroma .cpf {
  color: #a0a1a7;
  font-style: italic;
}

/* Diff 与通用格式 */
.chroma .gd {
  color: #e45649;
  background-color: #ffebe9;
}

.chroma .gi {
  color: #50a14f;
  background-color: #dafbe1;
}

.chroma .ge {
  font-style: italic;
}

.chroma .gs {
  font-weight: 600;
}

.chroma .gh,
.chroma .gu {
  color: #4078f2;
  font-weight: 600;
}

.chroma .go {
  color: #696c77;
}

.chroma .gp {
  color: #a0a1a7;
  user-select: none;
}

.chroma .err {
  color: #e45649;
}

/* Chroma 行高亮与行号表格兼容（防止被正文 table 边框样式污染） */
.chroma .hl {
  display: block;
  width: 100%;
  background-color: rgba(64, 120, 242, 0.08);
}

.chroma .lnlinks {
  outline: none;
  text-decoration: none;
  color: inherit;
}

.chroma .lntable {
  display: table;
  width: auto;
  border-spacing: 0;
  border-collapse: collapse;
  padding: 0;
  margin: 0;
  border: 0 !important;
}

.chroma .lntable tr,
.chroma .lntable td,
.chroma .lntd {
  vertical-align: top;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  background: transparent !important;
}

.chroma .lnt,
.chroma .ln {
  white-space: pre;
  -webkit-user-select: none;
  user-select: none;
  margin-right: 0.6em;
  padding: 0 0.4em 0 0;
  color: #a0a1a7;
}


/* 代码块滚动条样式 - 隐藏滚动条但保留滚动功能 */
pre,
pre code,
.chroma code {
  overflow-x: auto;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

pre::-webkit-scrollbar,
pre code::-webkit-scrollbar,
.chroma code::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari */
  width: 0 !important;
  height: 0 !important;
}


/* ========== 全局分割线统一 (GitHub Light 极简细实线) ========== */
hr {
  border: none !important;
  border-top: 1px solid #eaecef !important;
  height: 0 !important;
  margin: 20px 0;
  background: transparent !important;
}

nav hr {
  margin: 14px 0 20px 0;
}

footer hr {
  margin: 24px 0 14px 0;
}

/* ========== 导航栏样式修复 ========== */

/* 导航栏定位上下文 */
nav {
  position: relative;
}

/* 菜单项垂直对齐 - 重置列表的 margin-top */
nav .menu li {
  vertical-align: middle;
  margin-top: 0 !important;
}

/* 确保所有菜单链接样式一致 */
nav .menu li a,
nav ul.menu li a,
ul.menu li a,
.menu li a,
.menu a {
  display: inline-block !important;
  padding: 5px !important;
  font-size: 14px !important;
  background: #eee !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  line-height: 1.5 !important;
  height: auto !important;
  min-height: auto !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

/* ========== ⌘K 极简搜索面板样式 ========== */
.search-container {
  display: inline-block;
  margin-left: 0;
  vertical-align: middle;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #57606a;
  background: #eee;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  vertical-align: middle;
  box-sizing: border-box;
  margin: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.search-trigger:hover {
  color: #24292f;
  background: #e2e4e8;
}

.search-trigger-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.search-trigger-kbd {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  color: #57606a;
  letter-spacing: 0.02em;
}

/* 搜索模态窗与毛玻璃遮罩 */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.search-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 31, 36, 0.24);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.search-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(27, 31, 36, 0.14), 0 2px 6px rgba(27, 31, 36, 0.06);
  overflow: hidden;
  transform: translateY(-8px) scale(0.99);
  transition: transform 0.16s ease;
  text-align: left;
}

.search-modal.is-open .search-dialog {
  transform: translateY(0) scale(1);
}

/* 顶部输入栏 */
.search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eaecef;
}

.search-input-icon {
  color: #57606a;
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  color: #24292f;
  padding: 0;
}

#search-input::placeholder {
  color: #8c959f;
}

.search-clear {
  border: none;
  background: transparent;
  color: #8c959f;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
}

.search-clear:hover {
  color: #24292f;
  background: #f6f8fa;
}

.search-esc {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  color: #57606a;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  user-select: none;
}

.search-esc:hover {
  color: #24292f;
  border-color: #8c959f;
}

/* 结果列表主体 */
.search-body {
  max-height: 56vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.search-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.search-section-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: #8c959f;
  letter-spacing: 0.02em;
}

.search-result-item {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #24292f;
  text-decoration: none !important;
  transition: background-color 0.1s ease;
}

.search-result-item + .search-result-item {
  margin-top: 2px;
}

.search-result-item:hover,
.search-result-item.active {
  background: #f6f8fa;
  text-decoration: none !important;
}

.search-result-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #24292f;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-item.active .search-result-title {
  color: #0969da;
}

.search-result-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #8c959f;
  font-variant-numeric: tabular-nums;
}

.search-result-summary {
  margin-top: 3px;
  font-size: 12.5px;
  color: #57606a;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.search-result-item mark {
  background: #fff8c5;
  color: #24292f;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 500;
}

.search-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: #8c959f;
}

/* 底部快捷键提示栏 */
.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f6f8fa;
  border-top: 1px solid #eaecef;
  font-size: 12px;
  color: #57606a;
}

.search-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-hints kbd {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  color: #57606a;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 3px;
  padding: 2px 4px;
  margin-right: 3px;
}

.search-count {
  font-size: 11.5px;
  color: #8c959f;
  font-variant-numeric: tabular-nums;
}

/* ========== 文章列表去掉默认圆点与日期弱化 ========== */
ul.post-list {
  list-style: none;
  padding-left: 20px;
}

ul.post-list .date {
  color: #8c959f;
  font-size: 0.9em;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

/* ========== Tags 标签云极简胶囊矩阵 ========== */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eaecef;
}

.page-header .page-title {
  font-size: 1.45em;
  font-weight: 600;
  color: #24292f;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.page-header .page-count {
  font-size: 12.5px;
  color: #8c959f;
  font-variant-numeric: tabular-nums;
}
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 32px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #24292f;
  background-color: #f6f8fa;
  border: 1px solid #eaecef;
  border-radius: 5px;
  text-decoration: none !important;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.tag-pill:hover {
  color: #0969da;
  background-color: #eaeef2;
  border-color: #d0d7de;
  text-decoration: none !important;
}

.tag-pill-count {
  font-size: 11.5px;
  color: #8c959f;
  font-variant-numeric: tabular-nums;
}

.tag-pill:hover .tag-pill-count {
  color: #57606a;
}

/* ========== 正文排版、标题阶梯与行内代码样式 (仿照 utteranc.es) ========== */
main {
  font-size: 14px;
  line-height: 1.7;
  color: #24292e;
  word-wrap: break-word;
}

main p,
main ul,
main ol,
main blockquote,
main table {
  margin-top: 0;
  margin-bottom: 16px;
}

main li + li {
  margin-top: 0.3em;
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 24px;
  margin-bottom: 16px;
  color: #24292e;
}

main h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

main h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

main h3 {
  font-size: 1.25em;
}

main h4 {
  font-size: 1em;
}

main h5 {
  font-size: 0.875em;
}

main h6 {
  font-size: 0.85em;
  color: #6a737d;
}

main h1 code,
main h2 code,
main h3 code,
main h4 code,
main h5 code,
main h6 code {
  font-size: inherit;
}

:not(pre) > code {
  font-family: var(--font-mono);
  font-size: 85%;
  padding: 0.2em 0.4em;
  margin: 0;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 6px;
  color: #24292e;
}

/* ========== 正文表格宽度自适应修复 ========== */
main table {
  display: table;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

/* ========== 文章头部元信息 (article-meta) 极简左对齐样式 ========== */
.article-meta {
  background: transparent !important;
  padding: 8px 0 16px 0 !important;
  margin: 12px 0 24px 0;
  border-radius: 0 !important;
  border-bottom: 1px solid #eaecef;
  text-align: left !important;
}

.article-meta .article-title {
  font-size: 1.65em;
  font-weight: 600;
  color: #24292f;
  line-height: 1.35;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.article-meta .article-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: #57606a;
  line-height: 1.5;
}

.article-meta .article-date,
.article-meta .article-author {
  color: #57606a;
  font-variant-numeric: tabular-nums;
}

.article-meta .meta-sep {
  color: #d0d7de;
  margin: 0 2px;
  user-select: none;
}

.article-meta .article-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.article-meta .article-tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #57606a;
  background-color: #f6f8fa;
  border: 1px solid #eaecef;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.article-meta .article-tag:hover {
  color: #24292f;
  background-color: #eaeef2;
  border-color: #d0d7de;
  text-decoration: none;
}

/* ========== 极简侧边目录 (TOC Sidebar) ========== */
.toc-sidebar {
  position: fixed;
  top: 50%;
  left: calc(50% + 420px);
  transform: translateY(-50%);
  z-index: 900;
}

/* 默认态：极简短横线指示器 */
.toc-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 12px 10px;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.toc-lines.toc-lines-compact {
  gap: 4px;
}

.toc-line {
  height: 2px;
  border-radius: 1px;
  background-color: #d0d7de;
  transition: width 0.2s ease, background-color 0.2s ease, height 0.2s ease;
}

.toc-line.level-1 {
  width: 16px;
}

.toc-line.level-2 {
  width: 11px;
}

.toc-line.level-3 {
  width: 7px;
}

.toc-line.active {
  background-color: #24292f;
  height: 2.5px;
}

.toc-line.level-1.active {
  width: 20px;
}

.toc-line.level-2.active {
  width: 15px;
}

.toc-line.level-3.active {
  width: 11px;
}

/* 展开态：悬停时浮现的目录卡片 */
.toc-card {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) translateX(-6px);
  width: 230px;
  max-height: 68vh;
  overflow-y: auto;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #d0d7de;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.15);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.toc-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.toc-sidebar:hover .toc-lines,
.toc-sidebar:focus-within .toc-lines {
  opacity: 0;
}

.toc-sidebar:hover .toc-card,
.toc-sidebar:focus-within .toc-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* 目录内部列表样式 */
.toc-card #TableOfContents {
  margin: 0;
  padding: 0;
  border: none;
}

.toc-card #TableOfContents ul,
.toc-card #TableOfContents ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-card #TableOfContents ul ul,
.toc-card #TableOfContents ol ol {
  padding-left: 10px;
  margin-left: 6px;
  margin-top: 2px;
  border-left: 1px solid #eaecef;
}

.toc-card #TableOfContents li {
  margin: 2px 0;
  line-height: 1.4;
}

.toc-card #TableOfContents a {
  display: block;
  padding: 4px 8px;
  font-size: 13px;
  color: #57606a;
  text-decoration: none;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.toc-card #TableOfContents a:hover {
  color: #24292f;
  background-color: #f6f8fa;
  text-decoration: none;
}

.toc-card #TableOfContents a.active {
  color: #0969da;
  font-weight: 600;
  background-color: #f6f8fa;
}

/* 中等屏幕：固定在右侧边缘并向左展开，防止超出视口 */
@media (max-width: 1340px) {
  .toc-sidebar {
    left: auto;
    right: 16px;
  }

  .toc-lines {
    align-items: flex-end;
  }

  .toc-card {
    left: auto;
    right: 0;
    transform: translateY(-50%) translateX(6px);
  }
}

/* 窄屏与移动端隐藏侧边目录 */
@media (max-width: 960px) {
  .toc-sidebar {
    display: none !important;
  }
}

/* ========== 移动端响应式样式 ========== */
@media (max-width: 768px) {
  .article-meta .article-title {
    font-size: 1.4em;
  }

  .search-trigger-kbd {
    display: none;
  }

  .search-modal {
    padding: 6vh 12px 16px;
  }

  .search-hints {
    display: none;
  }
}
