/* =========================================================
   数以轻舟Agent · 文章页样式 (article.css)
   配色参考官网 dify-ai.cn/excelagent —— 蓝色科技风
   品牌主色 #3A72ED / 深蓝 #01204E / 暖沙底 #FCFAEE
   ========================================================= */

:root {
  --brand: #3A72ED;
  --brand-light: #5C8EF0;
  --brand-dark: #2A5BC7;
  --ocean: #01204E;          /* 深蓝主文字色 */
  --text: #243b53;          /* 正文色 */
  --slate: #5A6B82;         /* 次级文字 */
  --slate-muted: #8B9DB5;   /* 弱化文字 */
  --sand: #FCFAEE;          /* 浅暖底 */
  --line: #E7ECF4;          /* 分隔线 */
  --price: #E87B3C;         /* 橙色点缀 */
  --white: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 4px 18px rgba(1,32,78,0.06);
  --shadow-md: 0 10px 40px rgba(58,114,237,0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

::selection { background: rgba(58,114,237,0.20); color: var(--ocean); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ============ 顶部导航 ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: all .3s ease;
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; color: var(--ocean); font-weight: 700; }
.nav-logo svg { display: block; }
.nav-logo .name { font-size: 17px; letter-spacing: .02em; }
.nav-logo .tag {
  font-size: 10px; color: var(--slate-muted); background: rgba(1,32,78,0.05);
  padding: 2px 10px; border-radius: 999px; font-weight: 400; letter-spacing: .04em;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 13px; color: var(--slate); transition: color .2s;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a.btn-download,
.btn-download {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 4px 16px rgba(58,114,237,0.30); transition: all .3s ease;
}
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(58,114,237,0.45); }

/* ============ 面包屑 ============ */
.breadcrumb {
  max-width: 960px; margin: 96px auto 0; padding: 0 24px;
  font-size: 12.5px; color: var(--slate-muted); letter-spacing: .02em;
}
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span.sep { margin: 0 8px; color: var(--line); }
.breadcrumb span.current { color: var(--slate); }

/* ============ 文章卡片 ============ */
.article-card {
  max-width: 960px; margin: 18px auto 60px; padding: 48px 56px 12px;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.article-header { text-align: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.article-header h1 {
  font-size: 2.35em; line-height: 1.28; color: var(--ocean);
  font-weight: 800; letter-spacing: -.01em;
}
.article-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
  margin-top: 18px; font-size: 13px; color: var(--slate);
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--slate-muted); }

/* ============ 正文排版 ============ */
.article-body { padding-top: 12px; }
.article-body h2 {
  font-size: 1.65em; color: var(--ocean); font-weight: 700;
  margin: 1.9em 0 .7em; padding-bottom: .45em;
  border-bottom: 2px solid var(--brand);
}
.article-body h3 {
  font-size: 1.28em; color: var(--ocean); font-weight: 700;
  margin: 1.5em 0 .5em;
}
.article-body p { margin: 1.05em 0; line-height: 1.95; color: var(--text); }
.article-body strong { color: var(--ocean); font-weight: 700; }

/* 引用 / 引言 */
.article-body blockquote {
  margin: 1.7em 0; padding: 16px 22px;
  background: var(--sand); border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0; color: var(--slate);
  font-size: 1.02em; line-height: 1.85;
}
.article-body blockquote p { margin: .3em 0; color: var(--slate); }

/* 列表 */
.article-body ul, .article-body ol { margin: 1.1em 0; padding-left: 1.5em; line-height: 1.9; }
.article-body li { margin: .45em 0; }
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul > li {
  position: relative; padding-left: 1.6em;
}
.article-body ul > li::before {
  content: ""; position: absolute; left: 4px; top: .78em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
}
.article-body ol { padding-left: 1.6em; }
.article-body ol li::marker { color: var(--brand); font-weight: 700; }

/* 表格 */
.table-wrap {
  margin: 1.8em 0; overflow-x: auto; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.article-body table { width: 100%; border-collapse: collapse; font-size: .94em; min-width: 560px; }
.article-body th {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-weight: 600; text-align: left; padding: 13px 16px;
  white-space: nowrap;
}
.article-body td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.article-body tbody tr:nth-child(even) { background: #F7FAFF; }
.article-body tbody tr:hover { background: rgba(58,114,237,0.05); }
.article-body tbody tr:last-child td { border-bottom: none; }

/* 分隔线 */
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* 行内代码 */
.article-body code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: .88em; background: rgba(58,114,237,0.08); color: var(--brand-dark);
  padding: 2px 6px; border-radius: 6px;
}

/* 图片与图注 */
.article-figure { margin: 2.2em 0; text-align: center; }
.article-figure img {
  display: inline-block; max-width: 100%; height: auto;
  border-radius: 12px; box-shadow: var(--shadow-md);
}
.article-figure figcaption {
  margin-top: 10px; font-size: .88em; color: var(--slate-muted); letter-spacing: .01em;
}

/* 提示词代码块 */
.article-body .prompt-block {
  margin: 1.8em 0; padding: 18px 20px;
  background: #0F172A; color: #E2E8F0;
  border-radius: 12px; border: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: .85em; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
  max-height: 460px; overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

/* 下载按钮 */
.article-body .download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 1.2em 0; padding: 13px 26px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--ocean) 100%);
  color: #fff !important; font-weight: 600; font-size: .98em;
  border-radius: 999px; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: all .25s ease;
}
.article-body .download-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============ 文章底部 CTA ============ */
.article-cta {
  margin: 48px 0 24px; padding: 40px 32px; text-align: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--ocean) 100%);
  border-radius: 16px; color: #fff;
}
.article-cta h2 { font-size: 1.7em; color: #fff; margin-bottom: 12px; font-weight: 700; }
.article-cta p { color: rgba(255,255,255,0.88); margin-bottom: 22px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 32px;
  border-radius: 999px; font-weight: 600; font-size: 14px;
  background: #fff; color: var(--brand); transition: all .3s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 32px;
  border-radius: 999px; font-weight: 600; font-size: 14px;
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.55);
  transition: all .3s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

/* ============ 页脚 ============ */
.site-footer { background: #0F172A; color: #9FB0C7; padding: 48px 0 28px; margin-top: 40px; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.footer-brand .nav-logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.8; max-width: 360px; color: #8FA0B8; }
.footer-links { display: flex; gap: 48px; }
.footer-links h4 { font-size: 12px; letter-spacing: .12em; color: #6B7C96; text-transform: uppercase; margin-bottom: 14px; }
.footer-links a { display: block; font-size: 13px; color: #9FB0C7; padding: 5px 0; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 32px; padding-top: 20px;
  text-align: center; font-size: 12px; color: #6B7C96;
}
.footer-bottom .container { display: block; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn-download) { display: none; }
}
@media (max-width: 768px) {
  .article-card { padding: 32px 22px 8px; border-radius: 14px; }
  .article-header h1 { font-size: 1.7em; }
  .article-body h2 { font-size: 1.4em; }
  .article-body h3 { font-size: 1.15em; }
  .breadcrumb { margin-top: 84px; }
  .site-footer .container { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { gap: 32px; flex-wrap: wrap; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons a { width: 100%; max-width: 300px; margin: 0 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ 内联操作步骤图（软文转文章页用） ============ */
.step-diagram {
  margin: 2.2em 0; padding: 28px 26px;
  background: linear-gradient(135deg, #F4F8FF 0%, #EEF3FF 100%);
  border: 1px solid var(--line); border-radius: 16px;
}
.step-diagram .step-item {
  display: flex; align-items: flex-start; gap: 16px; padding: 12px 0; position: relative;
}
.step-diagram .step-item:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 46px; bottom: -6px;
  width: 2px; background: linear-gradient(var(--brand), var(--brand-light));
}
.step-diagram .step-num {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; z-index: 1;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.step-diagram .step-body { padding-top: 4px; }
.step-diagram .step-title { font-weight: 700; color: var(--ocean); font-size: 1.02em; }
.step-diagram .step-desc { color: var(--slate); font-size: .92em; margin-top: 2px; }
@media (max-width: 768px) {
  .step-diagram { padding: 20px 16px; }
  .step-diagram .step-item { gap: 12px; }
}

/* ============ 文章中心 (index.html) ============ */
.hub-hero { max-width: 860px; margin: 110px auto 36px; padding: 0 24px; text-align: center; }
.hub-hero h1 { font-size: 2.2em; color: var(--ocean); font-weight: 800; }
.hub-hero p { margin-top: 14px; color: var(--slate); font-size: 1.02em; }

.hub-grid {
  max-width: 1100px; margin: 0 auto 70px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.hub-card.is-hidden { display: none !important; }
.hub-card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 26px 28px; box-shadow: var(--shadow-sm);
  transition: all .35s ease; color: inherit;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-20, rgba(58,114,237,0.2)); }
.hub-card .hub-cat {
  display: inline-block; font-size: 11px; letter-spacing: .08em; color: var(--brand);
  background: rgba(58,114,237,0.07); padding: 3px 12px; border-radius: 999px; margin-bottom: 12px;
}
.hub-card h3 { font-size: 1.28em; color: var(--ocean); font-weight: 700; line-height: 1.4; }
.hub-card p { margin-top: 10px; font-size: .92em; color: var(--slate); line-height: 1.75; }
.hub-card .hub-meta { margin-top: 16px; font-size: 12px; color: var(--slate-muted); }

.load-more-wrap { text-align: center; padding: 12px 24px 60px; }
.btn-load-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 36px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #3A72ED 0%, #2A5BC7 100%);
  box-shadow: 0 6px 20px rgba(58,114,237,.30); transition: all .25s ease;
}
.btn-load-more:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(58,114,237,.42); }
.btn-load-more.done { background: #E6ECF7; color: #5A6B82; cursor: default; box-shadow: none; transform: none; }

@media (max-width: 768px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-hero { margin-top: 92px; }
  .hub-hero h1 { font-size: 1.6em; }
}

/* ============ 文章中心搜索 + 分类筛选 ============ */
.hub-tools {
  max-width: 1100px; margin: 0 auto 34px; padding: 0 24px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.hub-search {
  position: relative; width: 100%; max-width: 560px;
}
.hub-search .search-ico {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
.hub-search input#articleSearch {
  width: 100%; height: 52px; padding: 0 46px 0 48px;
  font-size: 15px; color: var(--ocean);
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  outline: none; transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.hub-search input#articleSearch::placeholder { color: var(--slate-muted); }
.hub-search input#articleSearch:focus {
  border-color: var(--brand);
  box-shadow: 0 6px 22px rgba(58,114,237,.16);
}
/* 隐藏浏览器默认 search 清除按钮，使用自定义 × */
.hub-search input#articleSearch::-webkit-search-cancel-button { -webkit-appearance: none; }
.hub-search-clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(1,32,78,0.06); color: var(--slate); font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.hub-search-clear:hover { background: rgba(58,114,237,.12); color: var(--brand); }

.hub-cats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  max-width: 860px;
}
.hub-cat-btn {
  font-size: 12.5px; color: var(--slate); cursor: pointer;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(1,32,78,0.04); border: 1px solid transparent;
  transition: all .2s ease; white-space: nowrap;
}
.hub-cat-btn:hover { color: var(--brand); background: rgba(58,114,237,.08); }
.hub-cat-btn.is-active {
  color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-color: transparent; box-shadow: 0 4px 14px rgba(58,114,237,.28);
}

.hub-search-empty {
  max-width: 1100px; margin: 28px auto 0; padding: 0 24px; text-align: center;
  color: var(--slate-muted); font-size: 14px;
}

@media (max-width: 768px) {
  .hub-search input#articleSearch { height: 48px; font-size: 14px; }
  .hub-cats { gap: 8px; }
  .hub-cat-btn { padding: 6px 13px; font-size: 12px; }
}
