html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  --color-text: #2a2a2a;
  --color-muted: #5a5a5a;
  --color-link: #0fbc49;
  --color-border: #e0e0e0;
  --color-bg-code: #f5f5f5;
  --color-bg-note: #f8f9fa;
  --color-bg-header: #fff;
  --color-bg-nav: #f8f9fa;
}
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
.layout {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
  padding-left: 240px;
  padding-top: 68px;
}
.main-content {
  flex: 1 1 0;
  min-width: 0;
  max-width: 840px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.doc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg-header);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  z-index: 10;
}
.doc-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.5rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.doc-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.doc-menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 4px;
}
.doc-menu-btn:hover {
  background: rgba(0,0,0,0.05);
}
.doc-nav-overlay {
  display: none;
}
.doc-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.doc-header-link {
  color: var(--color-link) !important;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  white-space: nowrap;
}
.doc-header-link:hover {
  color: var(--color-link);
}
.doc-logo {
  height: 36px;
  width: auto;
  display: block;
}
.doc-header-label {
  font-size: 0.9rem;
  color: var(--color-muted);
}
.doc-nav {
  position: fixed;
  top: 68px;
  left: 0;
  width: 240px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  background: var(--color-bg-nav);
  border-right: 1px solid var(--color-border);
  padding: 0.6rem 0;
}
.doc-nav-inner {
  padding: 0 0.75rem;
}
.doc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-nav li {
  margin-bottom: 0.1rem;
}
.doc-nav-section:not(.doc-nav-section-collapsible) ul > li > a {
  font-weight: 600;
  font-size: 0.85rem;
}
.doc-nav-section-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.doc-nav-section-head a {
  flex: 1;
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 0;
}
.doc-nav-section-body {
  margin-top: 0.1rem;
  margin-bottom: 0;
}
.doc-nav-toggle {
  flex-shrink: 0;
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 3px;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.doc-nav-toggle:hover {
  color: var(--color-text);
  background: rgba(0,0,0,0.05);
}
.doc-nav-compact .doc-nav-toggle {
  display: flex;
}
.doc-nav-compact .doc-nav-section-collapsed .doc-nav-section-body {
  display: none;
}
.doc-nav-compact .doc-nav-section-collapsed .doc-nav-toggle .fa-minus {
  display: none !important;
}
.doc-nav-compact .doc-nav-section-collapsed .doc-nav-toggle .fa-plus {
  display: inline !important;
}
.doc-nav-compact .doc-nav-section:not(.doc-nav-section-collapsed) .doc-nav-toggle .fa-plus {
  display: none !important;
}
.doc-nav-compact .doc-nav-section:not(.doc-nav-section-collapsed) .doc-nav-toggle .fa-minus {
  display: inline !important;
}
.doc-nav.doc-nav-compact {
  overflow-y: auto;
}
.doc-nav-sub {
  position: relative;
  padding-left: 0.5rem;
  margin-left: 0.35rem;
  font-size: 0.82rem;
  border-left: 1px solid var(--color-border);
}
.doc-nav-sub:first-of-type::before {
  content: '';
  position: absolute;
  left: -0.35rem;
  top: 0.5em;
  width: 0.35rem;
  height: 1px;
  background: var(--color-border);
}
.doc-nav-sub + li:not(.doc-nav-sub) {
  margin-top: 0.15rem;
}
.doc-nav a {
  display: block;
  padding: 0.2rem 0.4rem;
  line-height: 0.85;
  font-size: 0.85rem;
  border-radius: 3px;
  color: var(--color-text);
  text-decoration: none;
}
.doc-nav a:hover {
  background: rgba(0,0,0,0.05);
  text-decoration: none;
}
.doc-nav a.active {
  background: rgba(42,110,233,0.1);
  color: var(--color-link);
  font-weight: 500;
  text-decoration: none;
}
.doc-nav-section {
  margin-bottom: 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}
.doc-nav-section:first-child {
  padding-top: 0;
  border-top: none;
}
.doc-nav-section:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .doc-header {
    padding-left: 0.75rem;
  }
  .doc-header-inner {
    padding-left: 0.75rem;
  }
  .doc-header-left {
    margin-right: auto;
  }
  .doc-menu-btn {
    display: flex;
  }
  .layout {
    flex-direction: column;
    padding-left: 0;
    padding-top: 68px;
  }
  .doc-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 68px);
    z-index: 100;
    flex: none;
    max-height: none;
    border-right: none;
    border-bottom: none;
    background: var(--color-bg-nav);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0.25s;
    visibility: hidden;
  }
  .doc-nav.doc-nav-open {
    transform: translateX(0);
    visibility: visible;
  }
  .doc-nav-overlay {
    display: block;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  .doc-nav-overlay.doc-nav-overlay-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .doc-nav-inner {
    display: block;
    flex-wrap: unset;
    gap: unset;
    padding: 1rem;
    max-width: 320px;
  }
  .doc-nav-section {
    margin-bottom: 0;
  }
  .doc-nav .doc-nav-toggle {
    display: flex !important;
  }
  .doc-header-label {
    display: none;
  }
}
.main-content h1,
.main-content h2,
.main-content h3 {
  scroll-margin-top: 5rem;
}
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
p {
  margin: 0 0 1rem;
}
ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
li {
  margin-bottom: 0.35rem;
}
a {
  color: var(--color-link);
  text-decoration: underline;
}
a:hover {
  text-decoration: underline;
}
.version {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.toc {
  background: var(--color-bg-note);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.toc ul {
  margin: 0;
  padding-left: 1.25rem;
}
.toc li {
  margin-bottom: 0.25rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
th, td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
th {
  background: var(--color-bg-code);
  font-weight: 600;
}
pre, code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
}
pre {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
code {
  background: var(--color-bg-code);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
pre code {
  padding: 0;
  background: none;
}
.note {
  background: var(--color-bg-note);
  border-left: 4px solid var(--color-link);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.note strong {
  display: block;
  margin-bottom: 0.25rem;
}
.support {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}
.footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}
.doc-dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #2d6a6a;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
  vertical-align: middle;
}
.doc-dash-btn i {
  font-size: 0.75rem;
  color: #2d6a6a;
}
.card-link {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 1rem;
  color: var(--color-text);
}
.card-link:hover {
  border-color: var(--color-link);
  background: rgba(42,110,233,0.04);
  text-decoration: none;
}
.card-link strong {
  display: block;
  margin-bottom: 0.25rem;
}
.card-link span {
  font-size: 0.9rem;
  color: var(--color-muted);
}
