/* ================================================================
   帮助中心 · 文章页样式 (article.css)
   配合 common.css 使用
================================================================ */

/* ---------- 面包屑 ---------- */
.art-crumb {
  padding: 22px 0 10px;
  font-size: 13px;
  color: var(--gs-muted);
  background: #fff;
  border-bottom: 1px solid var(--gs-border);
}
.art-crumb ol {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.art-crumb li { display: inline-flex; align-items: center; gap: 8px; }
.art-crumb li + li::before {
  content: "›";
  color: var(--gs-muted);
  font-size: 14px;
}
.art-crumb a {
  color: var(--gs-text-soft);
  transition: color .15s;
}
.art-crumb a:hover { color: var(--gs-accent-dark); }
.art-crumb li[aria-current="page"] {
  color: var(--gs-primary);
  font-weight: 600;
}

/* ---------- 文章容器 ---------- */
.art-wrap {
  padding: 36px 0 80px;
  background: #fff;
}
.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: flex-start;
}

/* ---------- 文章正文 ---------- */
.art-main {
  min-width: 0;
}
.art-header {
  padding-bottom: 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--gs-border);
}
.art-header .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px;
  color: var(--gs-accent-dark);
  background: rgba(255, 186, 0, 0.12);
  border-radius: var(--gs-radius-pill);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.art-header h1 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 800;
  color: var(--gs-primary);
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin: 0 0 10px;
}
.art-header .en {
  font-size: 14px;
  color: var(--gs-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  line-height: 1.5;
}
.art-header .meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--gs-muted);
}
.art-header .meta a {
  color: var(--gs-accent-dark);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.art-header .meta a:hover { text-decoration: underline; }

/* ---------- 正文内容 ---------- */
.art-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--gs-text);
}
.art-content > * + * { margin-top: 18px; }
.art-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gs-primary);
  letter-spacing: -0.3px;
  line-height: 1.35;
  margin-top: 44px;
  margin-bottom: 14px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}
.art-content h2:first-child { margin-top: 0; }
.art-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--gs-primary);
  line-height: 1.4;
  margin-top: 32px;
  margin-bottom: 10px;
  scroll-margin-top: 100px;
}
.art-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gs-primary);
  margin-top: 24px;
  margin-bottom: 8px;
}
.art-content p { color: var(--gs-text-soft); }
.art-content a {
  color: var(--gs-accent-dark);
  border-bottom: 1px solid rgba(255, 186, 0, 0.35);
  transition: border-color .15s, background .15s;
}
.art-content a:hover {
  border-bottom-color: var(--gs-accent);
  background: rgba(255, 186, 0, 0.08);
}
/* 按钮类链接不应套用文章文本链接的下划线/颜色样式 */
.art-content a.gs-btn,
.art-content a.gs-btn:hover {
  border-bottom: 0;
  background: var(--gs-accent);
}
.art-content a.gs-btn-primary,
.art-content a.gs-btn-primary:hover { color: #1d1d1d; }
.art-content a.gs-btn-primary:hover { background: var(--gs-accent-dark); }
.art-content a.gs-btn-ghost {
  background: transparent;
  color: var(--gs-primary);
}
.art-content a.gs-btn-ghost:hover {
  background: rgba(51, 77, 100, 0.06);
  color: var(--gs-primary);
}
.art-content strong { color: var(--gs-primary); font-weight: 700; }
.art-content em { font-style: normal; font-weight: 600; color: var(--gs-primary); }
.art-content code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  background: var(--gs-bg-soft);
  border: 1px solid var(--gs-border);
  border-radius: 5px;
  color: var(--gs-primary);
}
.art-content kbd {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 2px 7px;
  background: #fff;
  border: 1px solid var(--gs-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--gs-primary);
  box-shadow: 0 1px 0 rgba(51,77,100,0.08);
}
.art-content ul, .art-content ol {
  padding-left: 26px;
  color: var(--gs-text-soft);
}
.art-content ul li, .art-content ol li {
  margin-bottom: 8px;
  line-height: 1.85;
}
.art-content ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
.art-content ol > li {
  position: relative;
  padding-left: 44px;
  counter-increment: step;
  min-height: 30px;
}
.art-content ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, var(--gs-accent), #ff8c00);
  color: #1d1d1d;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(255,186,0,0.25);
}
/* 嵌套列表：还原 UA 编号样式 */
.art-content li ol,
.art-content li ul {
  margin-top: 8px;
  padding-left: 24px;
}
.art-content li ol {
  counter-reset: none;
  list-style: decimal;
}
.art-content li ol > li {
  padding-left: 0;
  counter-increment: none;
}
.art-content li ol > li::before { content: none; }

/* 图片 */
.art-content figure {
  margin: 28px 0;
  text-align: center;
}
.art-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--gs-border);
  box-shadow: 0 8px 24px rgba(51, 77, 100, 0.10);
}
.art-content figure figcaption {
  font-size: 13px;
  color: var(--gs-muted);
  margin-top: 10px;
  font-style: italic;
}
.art-content img.inline {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--gs-border);
  box-shadow: 0 8px 24px rgba(51, 77, 100, 0.10);
  display: block;
  margin: 24px auto;
}

/* 表格 */
.art-content .art-table,
.art-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
  background: #fff;
  border: 1px solid var(--gs-border);
  border-radius: 10px;
  overflow: hidden;
}
.art-content .art-table thead,
.art-content table thead {
  background: linear-gradient(180deg, #f7fafd 0%, #eef3f8 100%);
}
.art-content .art-table th,
.art-content table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--gs-primary);
  border-bottom: 1px solid var(--gs-border);
  font-size: 13.5px;
  letter-spacing: 0.2px;
}
.art-content .art-table td,
.art-content table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gs-border);
  color: var(--gs-text-soft);
  vertical-align: top;
  line-height: 1.7;
}
.art-content .art-table tr:last-child td,
.art-content table tr:last-child td {
  border-bottom: 0;
}
.art-content .art-table td:first-child,
.art-content table td:first-child {
  background: var(--gs-bg-soft);
  font-weight: 600;
  color: var(--gs-primary);
  width: 22%;
}

/* 代码块 */
.art-content pre {
  margin: 18px 0;
  padding: 16px 20px;
  background: #1d2733;
  color: #e6edf3;
  border-radius: 10px;
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  border: 1px solid #0f1620;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.art-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* 提示 / 警告块 */
.art-callout {
  display: flex; gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid;
  margin: 24px 0;
  line-height: 1.75;
}
.art-callout svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; }
.art-callout .body { flex: 1; font-size: 15px; }
.art-callout .body p { margin: 0; color: inherit; }
.art-callout .body p + p { margin-top: 8px; }
.art-callout.is-info {
  background: rgba(51, 120, 200, 0.06);
  border-color: rgba(51, 120, 200, 0.22);
  color: #274b73;
}
.art-callout.is-info svg { color: #3378c8; }
.art-callout.is-tip {
  background: rgba(255, 186, 0, 0.08);
  border-color: rgba(255, 186, 0, 0.35);
  color: #805600;
}
.art-callout.is-tip svg { color: var(--gs-accent-dark); }
.art-callout.is-warn {
  background: rgba(216, 89, 89, 0.06);
  border-color: rgba(216, 89, 89, 0.25);
  color: #8f3030;
}
.art-callout.is-warn svg { color: #d85959; }

/* 视频占位 */
.art-video {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
  box-shadow: 0 14px 36px -12px rgba(0,0,0,0.4);
}
.art-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- 右侧目录 ---------- */
.art-toc {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-left: 20px;
  border-left: 1px solid var(--gs-border);
}
.art-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gs-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.art-toc ul {
  list-style: none; padding: 0; margin: 0;
}
.art-toc li + li { margin-top: 4px; }
.art-toc a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gs-text-soft);
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  margin-left: -2px;
  transition: color .15s, border-color .15s, background .15s;
}
.art-toc a:hover {
  color: var(--gs-primary);
  background: var(--gs-bg-soft);
}
.art-toc a.is-active {
  color: var(--gs-accent-dark);
  border-left-color: var(--gs-accent);
  font-weight: 600;
  background: rgba(255, 186, 0, 0.06);
}
.art-toc a.lvl-3 { padding-left: 22px; font-size: 12.5px; }

/* ---------- 上下篇 ---------- */
.art-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--gs-border);
}
.art-nav a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--gs-bg-soft);
  border: 1px solid var(--gs-border);
  border-radius: 12px;
  color: var(--gs-primary);
  transition: border-color .2s, background .2s, transform .2s;
}
.art-nav a:hover {
  border-color: rgba(255, 186, 0, 0.5);
  background: linear-gradient(135deg, #fffaef 0%, #ffffff 70%);
}
.art-nav .dir {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--gs-muted); text-transform: uppercase;
}
.art-nav .title {
  font-size: 15px; font-weight: 700; line-height: 1.5;
}
.art-nav .next { text-align: right; }
.art-nav a.disabled {
  opacity: 0.4; pointer-events: none;
}

/* ---------- 底部卡片（英文原版 / 返回） ---------- */
.art-footer-cta {
  margin-top: 40px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fffaef 0%, #f7fafd 100%);
  border: 1px solid var(--gs-border);
  border-radius: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.art-footer-cta .txt {
  flex: 1; min-width: 240px;
}
.art-footer-cta h3 {
  font-size: 16px; font-weight: 700; color: var(--gs-primary); margin: 0 0 4px;
}
.art-footer-cta p {
  font-size: 14px; color: var(--gs-text-soft); margin: 0; line-height: 1.7;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .art-layout { grid-template-columns: 1fr; gap: 0; }
  .art-toc { display: none; }
}
@media (max-width: 560px) {
  .art-wrap { padding: 24px 0 60px; }
  .art-header { margin-bottom: 26px; }
  .art-nav { grid-template-columns: 1fr; }
  .art-content h2 { font-size: 21px; margin-top: 32px; }
  .art-content h3 { font-size: 17px; }
  .art-content { font-size: 15.5px; }
  .art-content ol > li { padding-left: 38px; }
  .art-content ol > li::before { width: 26px; height: 26px; font-size: 12px; }
}
