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

/* 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;
}
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }
hr {
  border-style: dashed;
  color: #ddd;
}
h1 {
  position: relative;
  padding-bottom: 0.1em; /* 给横线留点间距 */
  margin-bottom: 0.1em;    /* 让下面内容和标题保持距离 */
  border-bottom: 2px solid #000000ff; /* 横线，颜色和粗细可调 */
}
/* --- 保留你原有的 h1 样式，不修改 --- */

/* 以下是 h2～h6 的 Bookmark 图标样式 */
h2, h3, h4, h5, h6 {
  position: relative;
  padding-left: 1.6em; /* 留出图标空间 */
  line-height: 1.3;
}

/* 通用图标样式（使用 SVG Data URI） */
h2::before,
h3::before,
h4::before,
h5::before,
h6::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1em;   /* 基础尺寸，会按标题层级缩小 */
  height: 1.2em;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  /* SVG: 窄版 bookmark，透明填充，颜色自动跟随当前文字色 */
background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 30' fill='gray' stroke='gray' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'>\
<path d='M3 2h12a1.8 1.8 0 0 1 1.8 1.8v20.4l-7.8-4.8-7.8 4.8V3.8A1.8 1.8 0 0 1 3 2z'/>\
</svg>");

}


body > div > h1:first-of-type {
  border-top: none;
  border-bottom: none;
  padding: 0.5em 0; /* 保持文字与上下元素间距 */
}
/* code */
pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  padding: 1em;
  overflow-x: auto;
}
code { background: #deddddff; }
pre code { background: none; }

/* 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; }


#TableOfContents {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  border-left: 2px solid #e0e0e0;
  padding-left: 1rem;
  margin: 1.5rem 0;
}

#TableOfContents ul {
  list-style: none;
  margin: 0;
  padding-left: 0.8rem;
}

#TableOfContents li {
  margin: 0.25rem 0;
}

#TableOfContents a {
  text-decoration: none;
  color: #555;
  transition: color 0.2s ease;
}

#TableOfContents a:hover {
  color: #000;
}

#TableOfContents ul ul {
  border-left: 1px dashed #ddd;
  margin-left: 0.5rem;
  padding-left: 0.8rem;
  font-size: 0.9rem;
}