/* ================================================================
   HTML MD Docs
   01. Variables
   02. Reset / Base
   03. Header
   04. Desktop Layout
   05. Sidebar / Accordion Navigation
   06. Main Document
   07. Table of Contents
   08. Mobile Navigation / TOC
   09. Markdown Base
   10. Markdown Headings
   11. Markdown Inline Text / Links
   12. Markdown Lists / Tasks
   13. Markdown Quote
   14. Markdown Code
   15. Markdown Table
   16. Markdown Media
   17. Markdown Extra Elements
   18. Responsive
   ================================================================ */

/* ================================================================
   01. Variables
   ================================================================ */
:root {
  --page-bg: #ffffff;
  --sidebar-bg: #f6f7f8;
  --surface: #f6f6f4;
  --surface-soft: #fafaf8;

  --text-strong: #20232a;
  --text-main: #292929;
  --text-soft: #5f5f5b;
  --text-muted: #81817c;

  --line: #e7e8ea;
  --line-strong: #d8dadd;

  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --link: #245e92;
  --link-hover: #111111;

  --header-height: 64px;
  --sidebar-width: 280px;
  --toc-width: 280px;
  --article-width: 780px;

  --body-size: 16px;
  --body-line: 1.62;

  --radius-sm: 4px;
  --radius-md: 8px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ================================================================
   02. Reset / Base
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text-strong);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button,
a {
  color: inherit;
}

img,
svg {
  display: block;
}

::selection {
  background: #dbeafe;
  color: #111;
}

/* ================================================================
   03. Header
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 128px;
  height: auto;
}

.mobile-tools {
  display: none;
}

/* ================================================================
   04. Desktop Layout
   ================================================================ */
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  min-height: calc(100vh - var(--header-height));
}

.sidebar {
  min-width: 0;
  background: var(--sidebar-bg);
}

.sidebar-scroll {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 12px 30px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.main-content {
  min-width: 0;
  padding: 46px 46px 90px;
}

.doc-article {
  width: min(100%, var(--article-width));
  margin: 0 auto;
}

.toc-sidebar {
  min-width: 0;
  padding: 44px 24px 70px 0;
}

/* ================================================================
   05. Sidebar / Accordion Navigation
   ================================================================ */
.docs-nav {
  width: 100%;
}

.nav-group {
  border-bottom: 1px solid #dedfe2;
}

.nav-group:first-child {
  border-top: 0;
}

.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #383c42;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.nav-group-title svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: #989ba0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-90deg);
  transition: transform .22s var(--ease), stroke .2s ease;
}

.nav-group.is-open .nav-group-title svg {
  transform: rotate(0deg);
}

.nav-group-title:hover svg,
.nav-group-title:focus-visible svg {
  stroke: var(--text-strong);
}

.nav-group-title:focus-visible,
.nav-link:focus-visible,
.mobile-tool:focus-visible,
.mobile-toc-close:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.nav-children {
  display: none;
  padding-bottom: 12px;
}

.nav-group.is-open .nav-children {
  display: block;
}

.nav-link {
  display: block;
  position: relative;
  padding: 8px 6px;
  color: #666a70;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  border-radius: 4px;
  transition: color .18s ease, background-color .18s ease;
}


.nav-link:hover {
  color: var(--text-strong);
  background: rgba(0, 0, 0, .025);
}

.nav-link.is-active {
  color: var(--brand-hover);
  font-weight: 650;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -30px;
  width: 3px;
  height: 20px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
  transform: translateY(-50%);
}

/* ================================================================
   06. Main Document
   ================================================================ */
.doc-status {
  display: none;
  margin: 0;
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.doc-status.is-visible {
  display: block;
}

.doc-status.is-error {
  padding: 16px 18px;
  border: 1px solid #efd6d6;
  border-radius: 8px;
  background: #fff8f8;
  color: #8a2d2d;
}

/* 文档页的第一个一级标题比普通 Markdown h1 更突出。 */
.markdown-body > h1:first-child {
  margin: 0 0 1.45em;
  padding-bottom: .95em;
  border-bottom: 1px solid var(--line-strong);
  font-size: clamp(30px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

/* ================================================================
   07. Table of Contents
   ================================================================ */
.toc-card {
  position: sticky;
  top: calc(var(--header-height) + 44px);
  max-height: calc(100vh - var(--header-height) - 72px);
  padding-left: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--line-strong);
  scrollbar-width: thin;
}

.toc-title {
  margin: 0 0 10px;
  color: #45494f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.toc-list,
.mobile-toc-list {
  display: flex;
  flex-direction: column;
}

.toc-link {
  position: relative;
  display: block;
  padding: 7px 0;
  color: #74787e;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}

.toc-link--sub {
  padding-left: 13px;
  font-size: 12.5px;
}

.toc-link:hover {
  color: var(--text-strong);
}

.toc-link.is-active {
  color: var(--brand-hover);
  font-weight: 650;
}

.toc-link.is-active::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -17px;
  width: 2px;
  background: var(--brand);
}

.toc-link--sub.is-active::before {
  left: -17px;
}

.toc-empty {
  margin: 0;
  padding: 6px 0;
  color: #999da3;
  font-size: 12.5px;
  line-height: 1.55;
}

/* ================================================================
   08. Mobile Navigation / TOC
   ================================================================ */
.page-mask {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: block;
  visibility: hidden;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 22, 24, .56);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

.mobile-toc-panel {
  position: fixed;
  z-index: 210;
  top: calc(var(--header-height) + 57px);
  right: 18px;
  left: 18px;
  visibility: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(26, 29, 31, .16);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s var(--ease), visibility 0s linear .22s;
}

.mobile-toc-inner {
  max-height: min(64vh, 520px);
  overflow-y: auto;
  padding: 18px 20px 20px;
}

.mobile-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mobile-toc-head strong {
  font-size: 14px;
}

.mobile-toc-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.mobile-toc-close:hover {
  background: var(--surface);
}

.mobile-toc-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.mobile-toc-list {
  padding-top: 8px;
}

.mobile-toc-list .toc-link {
  padding: 9px 0;
  font-size: 14px;
}

.mobile-toc-list .toc-link--sub {
  padding-left: 16px;
  font-size: 13.5px;
}

.mobile-toc-list .toc-link.is-active::before {
  left: -20px;
}

/* ================================================================
   09. Markdown Base
   复用 html-md-blog 的紧凑正文排版逻辑。
   ================================================================ */
.markdown-body {
  color: var(--text-main);
  font-size: var(--body-size);
  line-height: var(--body-line);
  word-break: normal;
  overflow-wrap: break-word;
}

.markdown-body > :first-child {
  margin-top: 0 !important;
}

.markdown-body > :last-child {
  margin-bottom: 0 !important;
}

.markdown-body p {
  margin: 0 0 .9em;
}

.markdown-body hr {
  height: 0;
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

/* ================================================================
   10. Markdown Headings
   ================================================================ */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--text-strong);
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.markdown-body h1 {
  margin: 1.8em 0 .65em;
  font-size: 30px;
  letter-spacing: -.025em;
}

.markdown-body h2 {
  margin: 1.65em 0 .6em;
  font-size: 24px;
  letter-spacing: -.02em;
}

.markdown-body h3 {
  margin: 1.5em 0 .55em;
  font-size: 20px;
  letter-spacing: -.012em;
}

.markdown-body h4 {
  margin: 1.4em 0 .5em;
  font-size: 17px;
}

.markdown-body h5 {
  margin: 1.3em 0 .45em;
  font-size: 15px;
}

.markdown-body h6 {
  margin: 1.2em 0 .4em;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: .02em;
}

/* ================================================================
   11. Markdown Inline Text / Links
   ================================================================ */
.markdown-body strong,
.markdown-body b {
  color: var(--text-strong);
  font-weight: 700;
}

.markdown-body em,
.markdown-body i {
  font-style: italic;
}

.markdown-body del,
.markdown-body s {
  color: var(--text-muted);
  text-decoration-thickness: 1px;
}

.markdown-body a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}

.markdown-body a:hover {
  color: var(--link-hover);
}

.markdown-body a:focus-visible,
.markdown-body summary:focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
}

.markdown-body small {
  color: var(--text-soft);
  font-size: .86em;
}

.markdown-body sub,
.markdown-body sup {
  position: relative;
  font-size: .75em;
  line-height: 0;
  vertical-align: baseline;
}

.markdown-body sup {
  top: -.5em;
}

.markdown-body sub {
  bottom: -.2em;
}

.markdown-body mark {
  padding: .06em .22em;
  background: #fff0a6;
  color: inherit;
  border-radius: 2px;
}

.markdown-body abbr[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* ================================================================
   12. Markdown Lists / Tasks
   ================================================================ */
.markdown-body ul,
.markdown-body ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.markdown-body li {
  margin: .2em 0;
  padding-left: .1em;
}

.markdown-body li::marker {
  color: #696965;
}

.markdown-body li > p {
  margin: .3em 0;
}

.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ul,
.markdown-body ol ol {
  margin-top: .25em;
  margin-bottom: .25em;
}

.markdown-body ul.contains-task-list {
  padding-left: 1.6em;
}

.markdown-body .task-list-item {
  list-style: none;
}

.markdown-body .task-list-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0 .55em 0 -1.48em;
  vertical-align: -.12em;
  accent-color: #565652;
  pointer-events: none;
}

/* ================================================================
   13. Markdown Quote
   ================================================================ */
.markdown-body blockquote {
  margin: 1.2em 0;
  padding: .1em 0 .1em 1em;
  border-left: 3px solid var(--line-strong);
  color: var(--text-soft);
}

.markdown-body blockquote > :first-child {
  margin-top: 0;
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body blockquote blockquote {
  margin: 1em 0;
  border-left-color: var(--line);
}

/* ================================================================
   14. Markdown Code
   ================================================================ */
.markdown-body code,
.markdown-body kbd,
.markdown-body samp {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.markdown-body :not(pre) > code {
  padding: .1em .32em;
  border: 1px solid #e5e5e2;
  border-radius: var(--radius-sm);
  background: #f3f3f1;
  color: #303030;
  font-size: .86em;
  overflow-wrap: anywhere;
}

.markdown-body pre {
  max-width: 100%;
  margin: 1.2em 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: #292929;
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
}

.markdown-body pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

.markdown-body kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fafafa;
  color: #333;
  font-size: .82em;
  line-height: 1.4;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

/* ================================================================
   15. Markdown Table
   ================================================================ */
.markdown-body .table-scroll {
  width: 100%;
  margin: 1.25em 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.markdown-body table {
  width: 100%;
  min-width: 620px;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.55;
}

.markdown-body th,
.markdown-body td {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th:last-child,
.markdown-body td:last-child {
  border-right: 0;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.markdown-body th {
  background: #f3f3f1;
  color: var(--text-strong);
  font-weight: 650;
  white-space: nowrap;
}

.markdown-body tbody tr:nth-child(even) td {
  background: var(--surface-soft);
}

/* ================================================================
   16. Markdown Media
   ================================================================ */
.markdown-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 6px;
}

.markdown-body a img {
  border: 0;
}

.markdown-body figure {
  margin: 1.5em 0;
}

.markdown-body figure img {
  margin: 0 auto;
}

.markdown-body figcaption {
  margin-top: .75em;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.markdown-body video,
.markdown-body audio,
.markdown-body iframe {
  display: block;
  max-width: 100%;
  margin: 1.5em auto;
  border: 0;
}

.markdown-body video {
  width: 100%;
  height: auto;
}

/* ================================================================
   17. Markdown Extra Elements
   ================================================================ */
.markdown-body details {
  margin: 1.2em 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.markdown-body summary {
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 650;
  line-height: 1.6;
}

.markdown-body details[open] summary {
  margin-bottom: .75em;
}

.markdown-body details > :last-child {
  margin-bottom: 0;
}

.markdown-body dl {
  margin: 1.2em 0;
}

.markdown-body dt {
  margin-top: 1em;
  color: var(--text-strong);
  font-weight: 700;
}

.markdown-body dd {
  margin: .35em 0 0 1.4em;
  color: var(--text-soft);
}

.markdown-body ins {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ================================================================
   18. Responsive
   ================================================================ */
@media (max-width: 1180px) {
  :root {
    --toc-width: 220px;
  }

  .main-content {
    padding-right: 32px;
    padding-left: 32px;
  }

  .toc-sidebar {
    padding-right: 18px;
  }
}

@media (max-width: 980px) {
  :root {
    --header-height: 64px;
    --body-size: 16px;
    --body-line: 1.65;
  }

  body {
    background: #eef2f6;
  }

  body.nav-open,
  body.toc-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    padding: 0 24px;
  }

  .brand img {
    width: 130px;
  }

  .mobile-tools {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    height: 57px;
    border-bottom: 1px solid var(--line-strong);
    background: #fff;
  }

  .mobile-tool {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 0 24px;
    border: 0;
    background: transparent;
    color: #464a50;
    font-size: 13px;
    cursor: pointer;
  }

  .mobile-tool--toc {
    justify-content: flex-end;
    margin-left: auto;
  }

  .mobile-tool svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tool:disabled {
    opacity: .42;
    cursor: default;
  }

  .docs-layout {
    display: block;
    min-height: 0;
  }

  .sidebar {
    position: fixed;
    z-index: 220;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(82vw, 354px);
    background: var(--sidebar-bg);
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    will-change: transform;
  }

  .sidebar-scroll {
    position: static;
    height: 100%;
    padding: 34px 32px 50px;
  }

  .nav-group-title {
    min-height: 56px;
    font-size: 14px;
  }

  .nav-link {
    padding: 8px 6px;
    font-size: 14px;
  }

  .nav-link.is-active::before {
    left: -32px;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .page-mask,
  body.toc-open .page-mask {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }

  body.toc-open .mobile-toc-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .main-content {
    width: 100%;
    margin: 0;
    padding: 34px 24px 72px;
    background: #fff;
    box-shadow: none;
  }

  .doc-article {
    width: 100%;
  }

  .toc-sidebar {
    display: none;
  }

  .markdown-body > h1:first-child {
    margin-bottom: 1.35em;
    padding-bottom: .9em;
    font-size: clamp(28px, 7.5vw, 34px);
  }

  .markdown-body h1 {
    font-size: 26px;
  }

  .markdown-body h2 {
    font-size: 22px;
  }

  .markdown-body h3 {
    font-size: 19px;
  }

  .markdown-body h4 {
    font-size: 17px;
  }

  .markdown-body h5 {
    font-size: 15px;
  }

  .markdown-body h6 {
    font-size: 14px;
  }

  .markdown-body pre {
    margin-left: -4px;
    margin-right: -4px;
    padding: 14px 15px;
  }

  .markdown-body pre code {
    font-size: 12.5px;
  }

  .markdown-body .table-scroll {
    width: calc(100% + 8px);
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0 22px;
  }

  .mobile-tool {
    padding: 0 22px;
  }

  .main-content {
    width: 100%;
    padding: 32px 24px 64px;
  }

  .mobile-toc-panel {
    right: 14px;
    left: 14px;
  }

  .markdown-body ul,
  .markdown-body ol {
    padding-left: 1.45em;
  }
}

@media (max-width: 390px) {
  .brand img {
    width: 124px;
  }

  .main-content {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
  }

  .mobile-tool {
    padding-right: 18px;
    padding-left: 18px;
  }

  .sidebar {
    width: 84vw;
  }

  .sidebar-scroll {
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ================================================================
   19. SEO Knowledge System Adaptation
   ================================================================ */
.seo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.seo-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.seo-brand-text {
  color: #182033;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.sidebar-label {
  margin: 12px 4px 8px;
  color: #737780;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* Task List 只保留复选框，不显示普通无序列表圆点。 */
.markdown-body ul.contains-task-list {
  list-style: none;
}

.markdown-body .task-list-item::marker {
  content: "";
}

/* 右侧目录只由 JavaScript 输出 H2；当前阅读位置使用品牌色高亮。 */
.toc-link.is-active {
  color: var(--brand-hover);
}

/* 左侧当前章节稍微增强识别度，但保持参考模板的轻量风格。 */
.nav-link.is-active {
  background: rgba(37, 99, 235, .055);
}

@media (max-width: 980px) {
  .sidebar-label {
    margin-top: 0;
  }
}

/* ================================================================
   20. Document Toolbar / Pager
   ================================================================ */
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 26px;
}

.doc-tool-link {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .18s ease;
}

.doc-tool-link:hover,
.doc-tool-link:focus-visible {
  color: var(--brand-hover);
}

.doc-tool-link:focus-visible,
.doc-pager-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.doc-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.doc-pager-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.doc-pager-link:hover {
  border-color: #cbd5e1;
  background: #fff;
  transform: translateY(-1px);
}

.doc-pager-link span {
  color: var(--text-muted);
  font-size: 12px;
}

.doc-pager-link strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.doc-pager-next {
  text-align: right;
}

.doc-pager-link[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .doc-toolbar {
    margin-bottom: 22px;
  }

  .doc-pager {
    grid-template-columns: 1fr;
  }

  .doc-pager-next {
    text-align: left;
  }
}
