/* NEUXSAI 说明站 —— 纯 HTML/CSS/JS，无框架 */
:root {
  --brand: #2f6bff;
  --brand-2: #8f7bff;
  --brand-soft: #e8efff;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --line: #e4e7ef;
  --text: #1c2230;
  --muted: #5f6b80;
  --faint: #98a2b8;
  --ok: #1a9c68;
  --ok-soft: #e4f6ee;
  --warn: #c07a12;
  --warn-soft: #fff5e1;
  --danger: #d1435b;
  --danger-soft: #fdeaee;
  --code-bg: #f0f2f7;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 8px 24px rgba(20, 30, 60, .06);
  --radius: 12px;
  --sidebar-w: 264px;
  --toc-w: 200px;
  --header-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6f97ff;
    --brand-2: #a596ff;
    --brand-soft: #1b2745;
    --bg: #0f1420;
    --panel: #161c2b;
    --line: #26304a;
    --text: #e6eaf3;
    --muted: #a5afc4;
    --faint: #6f7a93;
    --ok: #3fc48e;
    --ok-soft: #12312a;
    --warn: #e4a33c;
    --warn-soft: #34290f;
    --danger: #ff7a90;
    --danger-soft: #3a1a22;
    --code-bg: #1d2436;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6f97ff;
  --brand-2: #a596ff;
  --brand-soft: #1b2745;
  --bg: #0f1420;
  --panel: #161c2b;
  --line: #26304a;
  --text: #e6eaf3;
  --muted: #a5afc4;
  --faint: #6f7a93;
  --ok: #3fc48e;
  --ok-soft: #12312a;
  --warn: #e4a33c;
  --warn-soft: #34290f;
  --danger: #ff7a90;
  --danger-soft: #3a1a22;
  --code-bg: #1d2436;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--code-bg);
  border-radius: 5px;
  padding: .1em .4em;
}
kbd { border: 1px solid var(--line); border-bottom-width: 2px; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 650; margin-top: 2.2em; padding-top: .4em; }
h3 { font-size: 16.5px; font-weight: 650; margin-top: 1.6em; }
h2 .anchor, h3 .anchor { opacity: 0; margin-left: 6px; font-weight: 400; color: var(--faint); }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin: .25em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 1.2em; background: var(--panel); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--code-bg); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
.brand:hover { text-decoration: none; }
.header-nav { display: flex; gap: 4px; margin-left: 12px; }
.header-nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; }
.header-nav a:hover, .header-nav a.is-active { color: var(--text); background: var(--code-bg); text-decoration: none; }
.header-spacer { flex: 1; }
.search {
  position: relative; width: 260px;
}
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--code-bg); color: var(--text); font: inherit; font-size: 14px;
  outline: none;
}
.search input:focus { border-color: var(--brand); background: var(--panel); }
.search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 380px; overflow: auto; padding: 6px;
}
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.is-focus { background: var(--code-bg); text-decoration: none; }
.search-results a small { display: block; color: var(--muted); font-size: 12px; }
.search-results .empty { padding: 12px; color: var(--muted); font-size: 13px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--faint); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.version-pill {
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); padding: 3px 9px; border-radius: 999px;
}

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.sidebar {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 22px 14px 40px 20px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.sidebar .group { margin-bottom: 20px; }
.sidebar .group-title { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px 10px; }
.sidebar a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.sidebar a:hover { background: var(--code-bg); color: var(--text); text-decoration: none; }
.sidebar a.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar a .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex: none; }
.sidebar a .ico { width: 18px; height: 18px; flex: none; opacity: .9; }
.sidebar-backdrop { display: none; }

.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) var(--toc-w); gap: 40px; padding: 36px 40px 80px; max-width: 1180px; }
.content { min-width: 0; }
.toc { position: sticky; top: calc(var(--header-h) + 36px); align-self: start; font-size: 13px; }
.toc .toc-title { font-weight: 700; color: var(--faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.toc a { display: block; color: var(--muted); padding: 4px 0 4px 12px; border-left: 2px solid var(--line); line-height: 1.45; }
.toc a.lv3 { padding-left: 24px; font-size: 12.5px; }
.toc a.is-active { color: var(--brand); border-left-color: var(--brand); }
.toc a:hover { color: var(--text); text-decoration: none; }

.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.lead { font-size: 17px; color: var(--muted); margin: -4px 0 26px; }
.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); }
.page-nav a { flex: 1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.page-nav a:hover { border-color: var(--brand); text-decoration: none; }
.page-nav a small { display: block; color: var(--faint); font-size: 12px; margin-bottom: 2px; }
.page-nav a.next { text-align: right; }
.page-nav a strong { color: var(--brand); font-weight: 600; }

/* ---------- 组件 ---------- */
.callout {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  padding: 12px 14px; border-radius: 10px; margin: 0 0 1.2em;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  font-size: 14px;
}
.callout > svg { width: 20px; height: 20px; margin-top: 3px; color: var(--brand); }
.callout p:last-child { margin-bottom: 0; }
.callout strong.title { display: block; margin-bottom: 2px; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout.warn > svg { color: var(--warn); }
.callout.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.callout.ok > svg { color: var(--ok); }
.callout.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.callout.danger > svg { color: var(--danger); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.4em; }
.steps > li { position: relative; padding: 0 0 18px 44px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.steps > li::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 0; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li strong:first-child { display: block; font-size: 15px; margin-bottom: 2px; }
.steps > li p { color: var(--muted); font-size: 14px; margin-bottom: .5em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0 0 1.6em; }
.card {
  padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0; font-size: 15.5px; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.card .tag { margin-top: auto; font-size: 12px; color: var(--faint); }

.ui { /* 引用软件里的按钮/菜单名 */
  display: inline-block; padding: 0 .45em; border-radius: 6px; font-size: .92em; font-weight: 600;
  background: var(--code-bg); border: 1px solid var(--line); color: var(--text); white-space: nowrap;
}
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.badge.server { background: var(--brand-soft); color: var(--brand); }
.badge.local { background: var(--ok-soft); color: var(--ok); }
.badge.unsupported { background: var(--code-bg); color: var(--faint); }
.badge.blue { background: #dcefff; color: #0b63b8; }
.badge.cash { background: #fff1cf; color: #9a6400; }
.badge.tail { background: #eae5ff; color: #5b43c9; }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.normal { background: var(--code-bg); color: var(--muted); }
.badge.invalid { background: var(--code-bg); color: var(--faint); text-decoration: line-through; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; margin: 0 0 1.2em; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 1.6em; }
.flow .node { flex: 1 1 140px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); position: relative; }
.flow .node strong { display: block; font-size: 14px; }
.flow .node span { color: var(--muted); font-size: 12.5px; line-height: 1.45; display: block; }
.flow .node em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; color: var(--faint); font-weight: 700; }
.flow .arrow { align-self: center; color: var(--faint); font-size: 18px; }

.mock { /* 模拟软件界面的小框 */
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; margin: 0 0 1.4em; box-shadow: var(--shadow);
}
.mock .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--code-bg); }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.mock .bar i:nth-child(1) { background: #ff5f57; } .mock .bar i:nth-child(2) { background: #febc2e; } .mock .bar i:nth-child(3) { background: #28c840; }
.mock .bar span { margin-left: auto; font-size: 12px; color: var(--faint); }
.mock .body { display: grid; grid-template-columns: 170px 1fr; min-height: 220px; }
.mock .side { border-right: 1px solid var(--line); padding: 10px; font-size: 12.5px; }
.mock .side div { padding: 6px 8px; border-radius: 7px; color: var(--muted); }
.mock .side div.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.mock .main { padding: 14px 16px; font-size: 13px; }
.mock .main h4 { margin: 0 0 4px; font-size: 15px; }
.mock .main p { color: var(--muted); margin: 0 0 10px; font-size: 12.5px; }
.mock .row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mock .chip { padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mock .chip.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.mock .tbl { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mock .tbl div { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.mock .tbl div:first-child { background: var(--code-bg); font-weight: 600; }
.mock .tbl div:last-child { border-bottom: 0; }

details.faq { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "＋"; color: var(--brand); font-weight: 700; width: 16px; }
details.faq[open] summary::before { content: "－"; }
details.faq .a { padding: 0 16px 14px 42px; color: var(--muted); font-size: 14px; }
details.faq .a p:last-child { margin-bottom: 0; }

/* ---------- 首页 ---------- */
.home .content-wrap { grid-template-columns: 1fr; max-width: 1080px; }
.hero {
  position: relative; overflow: hidden;
  padding: 56px 48px; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; margin-bottom: 40px;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.12); pointer-events: none;
}
.hero .eyebrow { font-size: 13px; font-weight: 600; opacity: .85; letter-spacing: .06em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.hero h1 { font-size: 38px; color: #fff; margin-bottom: 12px; max-width: 640px; }
.hero p { font-size: 17px; opacity: .92; max-width: 560px; margin-bottom: 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn.light { background: #fff; color: var(--brand); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.outline { background: var(--panel); color: var(--text); border-color: var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 0 0 44px; }
.stat { padding: 16px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 24px; font-weight: 700; color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; }
.section-title { font-size: 22px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 20px; }
.section { margin-bottom: 48px; }

.site-footer { padding: 28px 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .content-wrap { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; width: var(--sidebar-w); z-index: 40;
    transform: translateX(-100%); transition: transform .2s ease; height: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow); }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .header-nav { display: none; }
  .search { width: 160px; }
  .content-wrap { padding: 24px 18px 60px; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 28px; }
  h1 { font-size: 25px; }
  .mock .body { grid-template-columns: 1fr; }
  .mock .side { display: none; }
  .site-footer { padding: 20px 18px; }
}
@media (max-width: 520px) {
  .search { display: none; }
  .brand small { display: none; }
}

/* 顶栏里跳回官网/下载的链接 */
.header-nav a.ext { color: var(--brand); }
a.version-pill:hover { text-decoration: none; filter: brightness(.95); }
