*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg: #09090f;
  --c-surface: #11111c;
  --c-surface-hover: #171725;
  --c-border: rgba(255, 255, 255, .08);
  --c-text: #e8e8f0;
  --c-muted: #9494aa;
  --c-accent: #6c63ff;
  --c-accent2: #00e5c0;
  --c-grad: linear-gradient(135deg, #6c63ff 0%, #00e5c0 100%);
  --header-h: 64px;
  --sidebar-w: 272px;
  --radius: 14px;
  --c-header: rgba(9, 9, 15, .86);
  color-scheme: dark;
}

html[data-theme="light"] {
  --c-bg: #f7f8fc;
  --c-surface: #ffffff;
  --c-surface-hover: #f1f3f9;
  --c-border: rgba(15, 23, 42, .1);
  --c-text: #171a2b;
  --c-muted: #626a7f;
  --c-accent: #5b54f0;
  --c-accent2: #008f79;
  --c-grad: linear-gradient(135deg, #5b54f0 0%, #00a98d 100%);
  --c-header: rgba(247, 248, 252, .88);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', 'Segoe UI', sans-serif;
  line-height: 1.75;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(108, 99, 255, .12), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(0, 229, 192, .06), transparent 24%);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: #393851; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-accent); }
a { color: inherit; }
button { font: inherit; }

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: var(--c-header);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 90rem;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.4px;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand-divider { width: 1px; height: 22px; margin: 0 4px; background: var(--c-border); }
.brand-docs { color: var(--c-muted); font-size: .94rem; font-weight: 600; }
.header-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.header-nav a { color: var(--c-muted); text-decoration: none; font-size: .9rem; transition: color .2s; }
.header-nav a:hover { color: var(--c-text); }
.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--c-border); border-radius: 9px;
  background: var(--c-surface); color: var(--c-text); cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s;
}
.theme-toggle:hover { color: var(--c-accent); border-color: rgba(108,99,255,.4); transform: translateY(-1px); }
:focus-visible { outline: 3px solid rgba(108,99,255,.45); outline-offset: 3px; }
.header-nav .nav-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1px solid rgba(108, 99, 255, .32);
  border-radius: 9px;
  color: var(--c-text);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(108, 99, 255, .12), rgba(0, 229, 192, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.header-nav .nav-login i { color: var(--c-accent2); font-size: .85rem; }
.header-nav .nav-login:hover { color: var(--c-text); }
.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  margin-right: 12px;
  border: 1px solid var(--c-border);
  border-radius: 9px;
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
}

.layout { display: flex; width: 100%; max-width: 90rem; margin: 0 auto; padding-top: var(--header-h); }
.sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  width: var(--sidebar-w);
  padding: 28px 18px 36px 28px;
  overflow-y: auto;
  border-right: 1px solid var(--c-border);
  background: transparent;
}
.nav-group { margin-bottom: 28px; }
.nav-label {
  padding: 0 11px 8px;
  color: #65657c;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--c-muted);
  text-decoration: none;
  font-size: .9rem;
  transition: color .18s, background .18s;
}
.side-link i { width: 17px; color: #626279; text-align: center; font-size: .84rem; }
.side-link .fa-terminal::before { content: "\f108"; }
.side-link:hover { color: var(--c-text); background: rgba(255, 255, 255, .04); }
.side-link.active { color: #c9c6ff; background: rgba(108, 99, 255, .13); font-weight: 700; }
.side-link.active i { color: #8d86ff; }
html[data-theme="light"] .side-link.active { color: #4f46d8; background: rgba(91, 84, 240, .12); }
html[data-theme="light"] .side-link.active i { color: #5b54f0; }
.content-wrap { width: calc(100% - var(--sidebar-w)); margin-left: var(--sidebar-w); }
.content { margin: 0 30px; padding: 66px 48px 30px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #696980;
  font-size: .82rem;
}
.breadcrumb i { font-size: .65rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid rgba(108, 99, 255, .28);
  border-radius: 99px;
  background: rgba(108, 99, 255, .1);
  color: #aaa5ff;
  font-size: .78rem;
  font-weight: 700;
}
.eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent2); }
h1 { margin-bottom: 18px; font-size: clamp(2.35rem, 5vw, 4rem); line-height: 1.14; letter-spacing: -2px; }
h1 .gradient {
  background: var(--c-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.overlay { display: none; }

.docs-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: .78rem;
  text-align: center;
}
.docs-footer-filing {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}
.docs-footer-filing a {
  color: var(--c-muted);
  text-decoration: none;
  transition: color .2s;
}
.docs-footer-filing a:hover { color: var(--c-text); }
.docs-footer-copy { color: var(--c-muted); }

@media (max-width: 860px) {
  .header-inner { padding: 0 18px; }
  .menu-button { display: grid; place-items: center; }
  .header-nav a:not(.nav-login) { display: none; }
  .sidebar { z-index: 90; transform: translateX(-100%); transition: transform .24s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .overlay {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 80;
    background: rgba(0, 0, 0, .55);
  }
  body.menu-open .overlay { display: block; }
  .content-wrap { width: 100%; margin-left: 0; }
  .content { padding: 48px 24px 80px; }
}

@media (max-width: 620px) {
  .brand-divider, .brand-docs { display: none; }
  .header-nav .nav-login { padding: 7px 12px; font-size: .82rem; }
  .header-nav { gap: 10px; }
  h1 { font-size: 2.35rem; letter-spacing: -1.3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
