.markdown-body {
  display: flow-root;
  min-width: 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p,
.markdown-body ul,
.markdown-body ol { margin-bottom: 1.25rem; }
.markdown-body li + li { margin-top: 0.35rem; }
.markdown-body :is(h1, h2, h3, h4, h5, h6) {
  color: #1e293b;
  font-weight: 650;
  line-height: 1.45;
  margin: 2rem 0 1rem;
}
.markdown-body h1 { font-size: 1.9rem; }
.markdown-body h2 { font-size: 1.5rem; }
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }
.markdown-body :is(h5, h6) { font-size: 1rem; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 0.5rem; }
.markdown-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid #5275a4;
  background: #f1f5f9;
  color: #475569;
}
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body :not(pre) > code {
  padding: 0.15em 0.35em;
  border-radius: 0.25rem;
  background: #eef2f6;
  color: #85405d;
  font-size: 0.9em;
}
.markdown-body pre {
  padding: 1rem;
  margin: 1.5rem 0;
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  background: #f8fafc;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}
.markdown-body :is(.highlight, .codehilite) {
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #d8e0e9;
  border-radius: 0.5rem;
  background: #f8fafc;
}
.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.markdown-body :is(.highlight, .codehilite) pre {
  margin: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}
/* 标题单元格保留表格布局，不能设为 display: block。 */
.markdown-body :is(.highlight, .codehilite) th.filename {
  display: table-cell;
  padding: 0;
  background: #eef2f6;
  border-bottom: 1px solid #d8e0e9;
  text-align: left;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.markdown-body :is(.highlight, .codehilite) span.filename {
  display: block;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #eef2f6;
  color: #526174;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.markdown-body :is(.highlight, .codehilite) table {
  display: table;
  width: auto;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  overflow: visible;
}
.markdown-body :is(.highlight, .codehilite) :is(th, td) {
  border: 0;
  padding: 0;
  vertical-align: top;
}
.markdown-body :is(.highlight, .codehilite) td.linenos {
  width: 1%;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #eef2f6;
  border-right: 1px solid #d8e0e9;
  color: #64748b;
  text-align: right;
  white-space: nowrap;
}
.markdown-body :is(.highlight, .codehilite) td.linenos pre {
  padding-inline: 0.75rem;
}
.markdown-body :is(.highlight, .codehilite) td.linenos :is(.normal, .special) {
  padding-inline: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #F00 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666 } /* Operator */
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */
.highlight .go { color: #717171 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #04D } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #687822 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
.highlight .no { color: #800 } /* Name.Constant */
.highlight .nd { color: #A2F } /* Name.Decorator */
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #00F } /* Name.Function */
.highlight .nl { color: #767600 } /* Name.Label */
.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
.highlight .w { color: #BBB } /* Text.Whitespace */
.highlight .mb { color: #666 } /* Literal.Number.Bin */
.highlight .mf { color: #666 } /* Literal.Number.Float */
.highlight .mh { color: #666 } /* Literal.Number.Hex */
.highlight .mi { color: #666 } /* Literal.Number.Integer */
.highlight .mo { color: #666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #00F } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666 } /* Literal.Number.Integer.Long */



/* 代码高亮与行号相关样式（原有） */
.highlight .lineno,
.highlighttable td.linenos,
.codehilite .linenos,
.codehilite table td.linenos {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}
.highlight pre > code > span { user-select: text; }

.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) {
  display: block;
  width: max-content;
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid #94a3b8;
  margin: 1.5rem 0;
  overflow-wrap: normal;
  font-size: 0.9375rem;
}

.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) :is(th, td) {
  /* 单元格内边框略浅，增强与外边框的对比 */
  border: 1px solid var(--table-cell-divider, #b8c4d2);
  padding: 8px 12px;
  vertical-align: top;
}


.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) thead th {
  background-color: var(--table-head-bg, #eef2f6);
  font-weight: 600;
  /* 表头与内容分隔更明显 */
  border-bottom: 2px solid var(--table-border, #adb5bd);
}

/* 斑马纹只用于普通表格，不影响代码行号表格。 */
.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) tbody tr:nth-child(odd) {
  background-color: var(--table-row-odd-bg, #ffffff);
}
.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) tbody tr:nth-child(even) {
  background-color: var(--table-row-even-bg, #eef2f6);
}

/* 悬停高亮覆盖奇偶行底色。 */
.markdown-body table:not(.highlighttable):not(.codehilitetable):not(.highlight table):not(.codehilite table) tbody tr:hover {
  background-color: var(--table-hover-bg, #e2eaf4);
}

/* 目录完整展开，不设内部纵向滚动。 */
.markdown-body .toc {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #d8e0e9;
  border-radius: 0.5rem;
  padding: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}
.markdown-body .toc::before {
  content: "文章目录";
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 650;
  color: #1e293b;
}


/* TOC 列表样式 */
.markdown-body .toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.markdown-body .toc > ul {
  margin-top: 0;
}

.markdown-body .toc li {
  margin: 4px 0;
  position: relative;
}

/* TOC 嵌套缩进 */
.markdown-body .toc ul ul {
  margin-left: 16px;
  padding-left: 12px;
  border-left: 2px solid #cbd5e1;
}

.markdown-body .toc ul ul ul {
  border-left-color: #d8e0e9;
}

/* TOC 链接样式 */
.markdown-body .toc a {
  display: block;
  color: #365e91;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
  position: relative;
  overflow-wrap: anywhere;
  white-space: normal;
}

.markdown-body .toc a:hover {
  background-color: #e8eef6;
  color: #24466f;
  text-decoration: none;
}

.markdown-body .toc a:active {
  background-color: #dde6f2;
}

/* 空目录不占用空间。 */
.markdown-body .toc:empty {
  display: none;
}

@media (max-width: 575.98px) {
  .markdown-body :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 1.5rem;
  }
  .markdown-body h1 { font-size: 1.6rem; }
  .markdown-body h2 { font-size: 1.35rem; }
  .markdown-body blockquote { padding: 0.75rem 1rem; }
  .markdown-body .toc { padding: 1rem; }
  .markdown-body .toc ul ul {
    margin-left: 8px;
    padding-left: 8px;
  }
}
