/* ==========================================================================
   ShopMax 帮助中心 · 静态原型样式
   ========================================================================== */

:root {
  --brand: #4f46e5;
  --brand-strong: #4338ca;
  --brand-soft: #eef2ff;
  --brand-line: #c7d2fe;
  --violet: #7c3aed;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e6e9f2;
  --line-soft: #eff2f8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px -16px rgba(15, 23, 42, 0.22);
  --shadow-lg: 0 24px 60px -28px rgba(30, 27, 75, 0.35);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(79, 70, 229, 0.18);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: -3px;
}

.shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-empty {
  color: var(--muted-2);
  font-size: 13px;
  padding: 8px 0;
}

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(67, 56, 202, 0.65);
}

.brand-mark .icon {
  width: 20px;
  height: 20px;
}

.brand-text em {
  margin-left: 7px;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.main-nav a {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.main-nav a.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.header-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-search:hover {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.header-search .icon {
  width: 15px;
  height: 15px;
}

.header-search kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   首页 Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 122px;
  background:
    radial-gradient(900px 420px at 84% -12%, rgba(124, 58, 237, 0.55), transparent 60%),
    radial-gradient(720px 420px at 6% 0%, rgba(59, 130, 246, 0.32), transparent 58%),
    linear-gradient(135deg, #161233 0%, #241f56 46%, #3730a3 100%);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #c7d2fe;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.hero-eyebrow .icon {
  width: 15px;
  height: 15px;
}

.hero h1 {
  margin-bottom: 14px;
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: 16.5px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  padding: 8px 8px 8px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.hero-search > .icon {
  color: var(--muted);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15.5px;
}

.hero-search input::placeholder {
  color: var(--muted-2);
}

.hero-search button {
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #6656f0);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.8);
}

.hot-terms {
  margin-top: 16px;
  color: #a5b4fc;
  font-size: 12.5px;
}

.hot-terms a {
  margin: 0 3px;
  color: #e0e7ff;
  border-bottom: 1px dashed rgba(224, 231, 255, 0.4);
}

.hot-terms a:hover {
  color: #fff;
  border-bottom-style: solid;
}

/* --------------------------------------------------------------------------
   快捷入口
   -------------------------------------------------------------------------- */

.quick-wrap {
  position: relative;
  z-index: 2;
  margin-top: -74px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  min-height: 198px;
  padding: 24px 22px 20px;
  border: 1px solid rgba(230, 233, 242, 0.9);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.quick-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-lg);
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.9);
}

.quick-icon .icon {
  width: 22px;
  height: 22px;
}

.quick-card h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
}

.quick-card p {
  flex: 1;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.quick-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
}

.quick-meta .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.quick-card:hover .quick-meta .icon {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   首页分类
   -------------------------------------------------------------------------- */

.categories {
  padding: 72px 0 84px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2 {
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.head-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.head-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.head-link:hover .icon {
  transform: translateX(3px);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.category-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.cat-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.cat-icon .icon {
  width: 21px;
  height: 21px;
}

.cat-head h3 {
  color: var(--ink);
  font-size: 17.5px;
}

.cat-head h3 a:hover {
  color: var(--brand);
}

.cat-count {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.cat-desc {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.cat-docs {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  list-style: none;
}

.cat-docs li a {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 7px 0 7px 18px;
  color: var(--ink-2);
  font-size: 13.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-docs li a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-line);
  transform: translateY(-50%);
  transition: background 0.15s ease;
}

.cat-docs li a:hover {
  color: var(--brand);
}

.cat-docs li a:hover::before {
  background: var(--brand);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.more .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   内页面包屑条
   -------------------------------------------------------------------------- */

.page-band {
  padding: 16px 0;
  background:
    radial-gradient(600px 200px at 90% -40%, rgba(124, 58, 237, 0.45), transparent 70%),
    linear-gradient(135deg, #1b1740, #312e81);
  color: #e2e8f0;
}

.band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #c7d2fe;
  font-size: 13px;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e0e7ff;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
}

.breadcrumb .sep {
  opacity: 0.45;
}

.breadcrumb .current {
  overflow: hidden;
  max-width: 480px;
  color: #fff;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.band-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  width: 340px;
  padding: 4px 4px 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.band-search .icon {
  width: 15px;
  height: 15px;
  color: #c7d2fe;
}

.band-search input {
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.band-search input::placeholder {
  color: #a5b4fc;
}

.band-search button {
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12.5px;
  cursor: pointer;
}

.band-search button:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* --------------------------------------------------------------------------
   侧栏 + 内容布局
   -------------------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  padding-top: 28px;
  padding-bottom: 72px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow: auto;
  scrollbar-width: thin;
}

.side-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-title {
  padding: 2px 8px 10px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.cat-link .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.cat-link > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-link .count {
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 11.5px;
}

.cat-link:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.cat-link.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.cat-link.active .icon {
  color: var(--brand);
}

.cat-link.active .count {
  background: #fff;
  color: var(--brand);
}

/* 目录 */

.toc-card .side-title {
  padding-bottom: 8px;
}

.toc-list,
.toc-sub {
  list-style: none;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-list a {
  display: block;
  padding: 6px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.toc-list a:hover {
  background: var(--surface-2);
  color: var(--brand);
}

.toc-list a.active {
  border-left-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.toc-sub {
  margin: 1px 0 4px 12px;
}

.toc-sub a {
  padding: 5px 8px;
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   面板与分类页
   -------------------------------------------------------------------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.cat-panel {
  padding: 30px 34px 22px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.panel-head h1 {
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.01em;
}

.panel-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.tab {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover {
  background: var(--surface-2);
  color: var(--ink-2);
}

.tab.active {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.doc-list {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.doc-item {
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-soft);
}

.doc-item:last-child {
  border-bottom: 0;
}

.doc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 650;
}

.doc-title .icon {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transition: transform 0.18s ease, color 0.18s ease;
}

.doc-title:hover {
  color: var(--brand);
}

.doc-title:hover .icon {
  transform: translateX(3px);
  color: var(--brand);
}

.doc-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted-2);
  font-size: 12px;
}

.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.doc-meta .icon {
  width: 14px;
  height: 14px;
}

.doc-empty {
  padding: 40px;
  color: var(--muted-2);
  font-size: 14px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   文章页
   -------------------------------------------------------------------------- */

.article {
  padding: 38px 46px 34px;
}

.article h1 {
  color: var(--ink);
  font-size: 32px;
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 16px 0 8px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-meta .icon {
  width: 14px;
  height: 14px;
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.tools-label {
  margin-right: 2px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.tool-btn:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.tool-btn .icon {
  width: 15px;
  height: 15px;
}

.tool-hint {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
}

.tool-hint.is-ok {
  color: #047857;
}

.tool-hint.is-err {
  color: #b91c1c;
}

.article-cat {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.article-cat .icon {
  color: var(--brand);
}

.toc-mobile {
  display: none;
  margin: 20px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.toc-mobile .toc-list {
  margin-top: 10px;
}

.article-body {
  overflow-wrap: break-word;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.9;
}

.article-body h2 {
  position: relative;
  margin: 44px 0 16px;
  padding-left: 16px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.article-body h2::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--violet));
}

.article-body h3 {
  margin: 32px 0 12px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.5;
}

.article-body h4 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.55;
}

.article-body h5 {
  margin: 20px 0 8px;
  color: var(--ink-2);
  font-size: 15px;
}

.article-body p {
  margin: 0 0 14px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.article-body li {
  margin: 4px 0;
}

.article-body li > p {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--ink);
  font-weight: 650;
}

.article-body a {
  color: var(--brand);
  border-bottom: 1px solid var(--brand-line);
}

.article-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--brand-line);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14.5px;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--mono);
  font-size: 0.88em;
  word-break: break-all;
}

.article-body pre {
  overflow: auto;
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: #1e1b3a;
  color: #e2e8f0;
  font-size: 13.5px;
  line-height: 1.7;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-body hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

.article-body .table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

.article-body thead th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 650;
  text-align: left;
}

.article-body th,
.article-body td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

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

.article-body tbody tr:hover {
  background: #fafbff;
}

/* 截图与占位 */

.shot {
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.shot-placeholder {
  display: block;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1.5px dashed #c4b5fd;
  border-radius: 10px;
  background: #faf7ff;
  color: #7c3aed;
  font-size: 13.5px;
  line-height: 1.7;
}

/* 反馈 */

.article-feedback {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f9ff, #f5f6ff);
  text-align: center;
}

.feedback-q {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.feedback-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.vote-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand);
}

.vote-btn .icon {
  width: 16px;
  height: 16px;
}

.feedback-thanks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: #047857;
  font-size: 13.5px;
}

/* 上一篇 / 下一篇 */

.article-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pager-link:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.pager-link.next {
  align-items: flex-end;
  text-align: right;
}

.pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 12px;
}

.pager-label .icon {
  width: 14px;
  height: 14px;
}

.pager-title {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.pager-link.is-disabled {
  border: 1px dashed var(--line-soft);
  background: transparent;
  pointer-events: none;
}

/* 相关 / 热门推荐 */

.reco {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.reco-panel {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.reco-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 15px;
}

.reco-title .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.reco-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.reco-item a {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reco-item a:hover {
  color: var(--brand);
}

.reco-item p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* --------------------------------------------------------------------------
   搜索页
   -------------------------------------------------------------------------- */

.search-hero {
  padding: 56px 0 52px;
  background:
    radial-gradient(760px 340px at 88% -30%, rgba(124, 58, 237, 0.5), transparent 65%),
    radial-gradient(620px 340px at 4% -10%, rgba(59, 130, 246, 0.3), transparent 60%),
    linear-gradient(135deg, #161233 0%, #241f56 52%, #312e81 100%);
  color: #fff;
}

.search-hero-inner {
  max-width: 880px;
}

.search-hero h1 {
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.search-hero .lead {
  margin: 12px 0 26px;
  color: #cbd5e1;
  font-size: 15.5px;
}

.search-big {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 720px;
  padding: 8px 8px 8px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.search-big > .icon {
  color: var(--muted);
}

.search-big input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15.5px;
}

.search-big input::placeholder {
  color: var(--muted-2);
}

.search-big button {
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #6656f0);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chip {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: #e0e7ff;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.16);
}

.chip.is-active {
  border-color: #fff;
  background: #fff;
  color: var(--brand-strong);
  font-weight: 600;
}

.search-results {
  padding-top: 28px;
  padding-bottom: 72px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.search-stat {
  color: var(--muted);
  font-size: 13.5px;
}

.result-clear {
  color: var(--brand);
  font-size: 13px;
  white-space: nowrap;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.result-item {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.result-item:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.result-cat {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
}

.result-title {
  font-size: 18px;
  line-height: 1.5;
}

.result-title a {
  color: var(--ink);
}

.result-title a:hover {
  color: var(--brand);
}

.result-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-title mark,
.result-desc mark {
  padding: 0 1px;
  border-radius: 2px;
  background: #fef08a;
  color: inherit;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.empty-state {
  padding: 70px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-icon .icon {
  width: 26px;
  height: 26px;
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

.empty-state p {
  color: var(--muted);
  font-size: 14px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

.pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.pager button:hover:not(:disabled) {
  border-color: var(--brand-line);
  color: var(--brand);
}

.pager button.is-current {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager .ellipsis {
  padding: 0 4px;
  color: var(--muted-2);
}

.noscript-panel {
  margin-top: 20px;
  padding: 24px;
}

.noscript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
}

.noscript-list a {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: 52px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand > p {
  max-width: 420px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col h3 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.footer-col a {
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .hero {
    padding: 52px 0 108px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .cats-card {
    overflow-x: auto;
  }

  .cat-list {
    flex-direction: row;
    gap: 6px;
  }

  .cat-link {
    white-space: nowrap;
  }

  .cat-link > span:nth-child(2) {
    flex: none;
  }

  .toc-card {
    display: none;
  }

  .toc-mobile {
    display: block;
  }

  .article {
    padding: 30px 32px;
  }

  .search-hero h1 {
    font-size: 32px;
  }
}

@media (max-width: 860px) {
  .header-search span,
  .header-search kbd {
    display: none;
  }

  .header-search {
    padding: 8px 10px;
  }

  .main-nav a {
    padding: 8px 10px;
    font-size: 13.5px;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 18px;
  }

  .header-inner {
    gap: 10px;
  }

  .brand-text em {
    display: none;
  }

  .main-nav {
    gap: 0;
  }

  .main-nav a {
    padding: 7px 9px;
    font-size: 13px;
  }

  .hero {
    padding: 40px 0 100px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 14.5px;
  }

  .hero-search {
    flex-wrap: wrap;
    padding: 10px;
  }

  .hero-search > .icon {
    margin-left: 6px;
  }

  .hero-search input {
    width: calc(100% - 34px);
    flex: none;
  }

  .hero-search button {
    width: 100%;
  }

  .quick-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-card {
    min-height: 0;
  }

  .categories {
    padding: 56px 0 64px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-band {
    padding: 13px 0;
  }

  .band-search {
    display: none;
  }

  .breadcrumb .current {
    max-width: 220px;
  }

  .layout {
    padding-top: 18px;
    padding-bottom: 52px;
  }

  .cat-panel {
    padding: 24px 20px 18px;
  }

  .panel-head h1 {
    font-size: 25px;
  }

  .article {
    padding: 26px 20px 24px;
  }

  .article h1 {
    font-size: 25px;
  }

  .article-body {
    font-size: 15.5px;
  }

  .article-body h2 {
    font-size: 21px;
  }

  .article-body h3 {
    font-size: 17.5px;
  }

  .article-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager-link.next {
    align-items: flex-start;
    text-align: left;
  }

  .reco {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-hero {
    padding: 40px 0 38px;
  }

  .search-hero h1 {
    font-size: 27px;
  }

  .search-big {
    flex-wrap: wrap;
    padding: 10px;
  }

  .search-big > .icon {
    margin-left: 6px;
  }

  .search-big input {
    width: calc(100% - 34px);
    flex: none;
  }

  .search-big button {
    width: 100%;
  }

  .result-item {
    padding: 17px 18px;
  }

  .result-title {
    font-size: 16.5px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-mark .icon {
    width: 18px;
    height: 18px;
  }

  .main-nav a {
    padding: 7px 7px;
    font-size: 12.5px;
  }

  .main-nav a:nth-child(2) {
    display: none;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hot-terms {
    line-height: 2.1;
  }

  .article-meta {
    gap: 8px 12px;
  }

  .doc-title {
    font-size: 15.5px;
  }

  .tabs {
    gap: 4px;
  }

  .tab {
    padding: 6px 10px;
    font-size: 12.5px;
  }

  .feedback-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .vote-btn {
    justify-content: center;
  }

  .pager button {
    min-width: 32px;
    height: 32px;
    font-size: 12.5px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   下载中心
   -------------------------------------------------------------------------- */

.dl-panel {
  padding: 30px 34px 34px;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.dl-card.is-primary {
  border-color: var(--brand-line);
  background: linear-gradient(160deg, #fff 0%, var(--brand-soft) 100%);
  box-shadow: 0 10px 30px -18px rgba(79, 70, 229, 0.45);
}

.dl-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}

.dl-icon .icon {
  width: 20px;
  height: 20px;
}

.dl-card h3 {
  margin: 0;
  font-size: 16px;
}

.dl-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.dl-card .dl-meta {
  color: var(--muted-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
}

.dl-btn:hover {
  background: var(--brand-strong);
  color: #fff;
}

.dl-btn .icon {
  width: 15px;
  height: 15px;
}

.dl-btn.is-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
}

.dl-btn.is-ghost:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.dl-note {
  margin: 26px 0 8px;
  padding: 18px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-2);
}

.dl-note h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.dl-note ul {
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.9;
}

.dl-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.dl-note code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef2f8;
  font-size: 12.5px;
}

.dl-sections {
  margin-top: 30px;
}

.dl-all-title,
.dl-section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 15px;
}

.dl-all-title span,
.dl-section h2 span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}

.dl-section {
  margin-top: 24px;
}

.dl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}

.dl-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.dl-list li:first-child {
  border-top: 0;
}

.dl-list li:hover {
  background: var(--surface-2);
}

.dl-doc-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}

.dl-doc-title a {
  color: var(--ink-2);
}

.dl-doc-title a:hover {
  color: var(--brand-strong);
}

.dl-doc-meta {
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

.dl-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dl-mini:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.dl-mini .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 960px) {
  .dl-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dl-panel {
    padding: 22px 18px 26px;
  }

  .dl-list li {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .dl-doc-title {
    flex-basis: 100%;
  }

  .dl-doc-meta {
    flex: 1;
  }
}

/* --------------------------------------------------------------------------
   打印
   -------------------------------------------------------------------------- */

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .sidebar,
  .page-band,
  .toc-mobile,
  .article-tools,
  .article-feedback,
  .article-pager,
  .reco {
    display: none !important;
  }

  .layout,
  .layout-article {
    display: block;
    padding: 0;
  }

  .article {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .article-body a {
    color: inherit;
    border-bottom: 0;
  }

  .shot,
  .table-wrap,
  .article-body blockquote {
    break-inside: avoid;
  }
}
