/* Website colors and system fonts, layered over mdBook's default layout. */
html:root {
  --paper: #f6f6f0;
  --ink: #252b25;
  --muted: #6d746c;
  --line: #dedfd6;
  --green: #203e35;
  --lime: #d5e78c;
  --bg: var(--paper);
  --fg: var(--ink);
  --sidebar-bg: #eeefe7;
  --sidebar-fg: var(--ink);
  --sidebar-active: var(--green);
  --sidebar-spacer: var(--line);
  --scrollbar: #b5beaa;
  --icons: var(--muted);
  --icons-hover: var(--green);
  --links: var(--green);
  --inline-code-color: var(--green);
  --quote-bg: #e9edde;
  --quote-border: #cbd5b9;
  --table-border-color: var(--line);
  --table-header-bg: #e5eadb;
  --table-alternate-bg: #eeefe7;
  --theme-hover: #e9edde;
  --overlay-bg: #203e3540;
  --color-scheme: light;
  --sidebar-target-width: 288px;
  --content-max-width: 800px;
  --menu-bar-height: 54px;
  --docs-header-height: 76px;
  --mono-font: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
  font-synthesis: none;
  scroll-padding-top: calc(var(--docs-header-height) + var(--menu-bar-height) + 20px);
}
body { padding-top: var(--docs-header-height); line-height: 1.85; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a, button, label { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #94b565; outline-offset: 4px; }
.docs-header {
  position: fixed; inset: 0 0 auto; z-index: 102; box-sizing: border-box;
  height: var(--docs-header-height); padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.docs-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 18px; font-weight: 600; text-decoration: none; }
.docs-brand:visited { color: var(--ink); }
.docs-brand img { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.docs-header nav { display: flex; gap: 28px; font-size: 14px; white-space: nowrap; }
.docs-header nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.docs-header nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.docs-skip-link { position: fixed; top: -80px; left: 20px; z-index: 110; padding: 10px 20px; background: var(--green); color: var(--paper); }
.docs-skip-link:focus { top: 8px; }
.sidebar { top: var(--docs-header-height); height: calc(100vh - var(--docs-header-height)); border-right: 1px solid var(--line); }
.sidebar .sidebar-scrollbox { padding: 18px 16px 30px; }
.chapter { font-size: 14px; }
.chapter li.chapter-item { margin-top: 4px; }
.chapter-link-wrapper > a { display: block; flex: 1; padding: 8px 10px; border-radius: 7px; line-height: 1.6; }
.chapter li a:hover { background: #e3e8d8; }
.chapter li a.active { background: #dfe7cd; font-weight: 600; }
.chapter ol { padding-left: 12px; }
#mdbook-menu-bar { border-bottom-color: var(--line); padding-inline: 14px; }
#mdbook-menu-bar.sticky,
#mdbook-menu-bar-hover-placeholder:hover + #mdbook-menu-bar,
#mdbook-menu-bar:hover,
html.sidebar-visible #mdbook-menu-bar { top: var(--docs-header-height) !important; }
#mdbook-menu-bar-hover-placeholder { top: var(--docs-header-height); }
#mdbook-menu-bar .left-buttons { margin: 0; }
#mdbook-menu-bar .icon-button { min-width: 44px; min-height: 44px; }
#mdbook-theme-toggle, #mdbook-theme-list { display: none; }
.menu-title { font-size: 14px; font-weight: 500; text-align: left; color: var(--muted); padding-left: 8px; cursor: default; }
.content { padding: 0 32px 24px; overflow-y: visible; }
.content main { padding-block: 28px 12px; min-height: calc(100vh - 310px); }
.content h1 { font-size: clamp(27px, 3vw, 34px); line-height: 1.4; font-weight: 600; letter-spacing: -.025em; margin: 0 0 28px; }
.content h2 { font-size: 23px; line-height: 1.5; font-weight: 550; margin-top: 40px; }
.content h3 { font-size: 19px; font-weight: 550; margin-top: 30px; }
.content h4 { font-size: 16px; margin-top: 26px; }
.content p, .content ol, .content ul { line-height: 1.85; }
.content li { margin-block: 6px; }
.content a:not(.header) { text-underline-offset: 4px; }
.content main a:not(.header) { text-decoration: underline; text-decoration-color: #b4c2a4; }
.content main img { display: block; width: auto; max-width: min(100%, 440px); height: auto; border-radius: 12px; margin-block: 18px; zoom: 1 !important; }
.content blockquote { padding: 8px 20px; border-radius: 0 8px 8px 0; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.nav-wide-wrapper { display: none; }
.nav-wrapper { display: flex !important; justify-content: space-between; gap: 16px; max-width: var(--content-max-width); margin: 24px auto; }
.mobile-nav-chapters { float: none; width: auto; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); font-size: 14px; text-decoration: none !important; }
.mobile-nav-chapters .fa-svg { font-size: 14px; }
.mobile-nav-chapters.previous::after { content: "上一篇"; }
.mobile-nav-chapters.next::before { content: "下一篇"; }
.mobile-nav-chapters.next { margin-left: auto; }
.nav-wrapper > div { display: none; }
.docs-footer { max-width: var(--content-max-width); margin: 32px auto 0; border-top: 1px solid var(--line); padding: 24px 0 8px; color: var(--muted); font-size: 12px; }
.docs-footer p { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 5px 18px; }
.docs-footer a { color: var(--muted); text-decoration: underline; overflow-wrap: anywhere; }
.docs-quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 32px; }
.content .docs-quick-links a { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbf6; text-decoration: none !important; }
.content .docs-quick-links a:hover { background: #e9edde; }
@media (max-width: 650px) {
  html:root { --docs-header-height: 68px; }
  .docs-header { padding-inline: 20px; gap: 12px; }
  .docs-brand { font-size: 15px; gap: 8px; }
  .docs-brand img { width: 30px; height: 30px; border-radius: 8px; }
  .docs-header nav { gap: 16px; font-size: 13px; }
  .docs-header nav a:last-child { display: none; }
  .content { padding-inline: 20px; }
  .content main { padding-top: 24px; }
  .content h2 { font-size: 21px; }
  .content p, .content ol, .content ul { font-size: 15px; }
  .docs-quick-links { grid-template-columns: 1fr; }
  .docs-footer p { display: block; }
  .docs-footer p span { display: block; margin-bottom: 5px; }
}
@media (max-width: 619px) {
  .sidebar { top: calc(var(--docs-header-height) + var(--menu-bar-height)); height: calc(100dvh - var(--docs-header-height) - var(--menu-bar-height)); }
  #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
