/* ==========================================================
   ERP 知识站 - 全站样式
   纯静态站点，无外部依赖
   ========================================================== */

:root {
  --ink: #101828;
  --ink-2: #344054;
  --ink-3: #667085;
  --line: #e4e7ec;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --brand: #12457a;
  --brand-2: #1668a8;
  --accent: #0f9d8f;
  --accent-soft: #e7f6f3;
  --warn: #b54708;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px -12px rgba(16, 24, 40, .18);
  --max: 1140px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.2vw, 46px); }
h2 { font-size: clamp(24px, 2.8vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
ul, ol { padding-left: 1.3em; }
li { margin: .35em 0; }
code {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: .88em;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .4em;
  color: #1d2939;
}
pre {
  background: #0f1b2d;
  color: #d6e4f0;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  margin: 1.2em 0;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 60%, var(--accent) 130%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.logo small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: .06em; line-height: 1.2; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink-2);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--brand); font-weight: 600; background: #eef4fa; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--ink-2);
  box-shadow: 0 -5px 0 var(--ink-2), 0 5px 0 var(--ink-2);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -6px rgba(18, 69, 122, .55); }
.btn-primary:hover { background: #0d3a67; color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); border-color: #cddbe8; }
.btn-ghost:hover { background: #f4f8fb; color: var(--brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 76px;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(15,157,143,.13), transparent 62%),
    radial-gradient(760px 380px at 4% 0%, rgba(22,104,168,.13), transparent 60%),
    linear-gradient(180deg, #f8fbfe 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(18,69,122,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(18,69,122,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 10%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 10%, #000 10%, transparent 72%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: #fff;
  border: 1px solid #d6e4f0;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { max-width: 17em; }
.hero h1 em { font-style: normal; color: var(--brand-2); }
.hero-lead { font-size: 18px; color: var(--ink-3); max-width: 44em; margin: 20px 0 32px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stat b { display: block; font-size: 28px; color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-3); }

/* ---------------- 通用区块 ---------------- */
.section { padding: 76px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--ink-3); margin-top: 12px; }
.kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* 卡片网格 */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d3e0ec; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-3); font-size: 15px; margin-bottom: 14px; }
.card .more { font-size: 14px; font-weight: 600; }
.icon-badge {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: #0a7a6f;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 15px;
}
.icon-badge.blue { background: #eaf1f9; color: var(--brand); }
.icon-badge.sand { background: #fdf3e7; color: var(--warn); }

/* 文章列表 */
.article-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.article-row {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 26px;
  align-items: start;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.article-row:hover { text-decoration: none; background: #fbfcfe; }
.article-row .date { font-size: 13px; color: var(--ink-3); padding-top: 6px; font-variant-numeric: tabular-nums; }
.article-row h3 { font-size: 18px; margin-bottom: 6px; }
.article-row:hover h3 { color: var(--brand-2); }
.article-row p { margin: 0; color: var(--ink-3); font-size: 14.5px; }
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.blue { background: #eaf1f9; color: var(--brand); }
.tag.green { background: var(--accent-soft); color: #0a7a6f; }
.tag.sand { background: #fdf3e7; color: var(--warn); }

/* 学习路径 */
.path { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; counter-reset: step; }
.path-item { position: relative; padding: 0 20px 0 0; }
.path-item::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.path-item::after {
  content: "";
  position: absolute;
  left: 0; top: 60px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, #cddbe8, transparent);
}
.path-item h4 { font-size: 16px; margin-bottom: 6px; }
.path-item p { font-size: 14px; color: var(--ink-3); margin: 0; }

/* CTA 区块 */
.cta {
  border-radius: 18px;
  padding: 52px;
  background: linear-gradient(120deg, #0e3a66 0%, #12457a 45%, #0f6f7f 100%);
  color: #dbe8f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta h2 { color: #fff; }
.cta p { margin: 10px 0 0; color: #b9cfe3; max-width: 36em; }
.cta .btn-ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.cta .btn-primary { background: #fff; color: var(--brand); box-shadow: none; }
.cta .btn-primary:hover { background: #eef4fa; color: var(--brand); }

/* ---------------- 内页 ---------------- */
.page-head {
  padding: 60px 0 48px;
  background: linear-gradient(180deg, #f8fbfe, #fff);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(28px, 3.4vw, 38px); }
.page-head p { color: var(--ink-3); max-width: 46em; margin: 14px 0 0; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--brand-2); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 56px; align-items: start; }
.layout > * { min-width: 0; }
.prose { max-width: 760px; font-size: 16.5px; overflow-wrap: break-word; }
.prose h2 { margin: 44px 0 16px; padding-top: 8px; font-size: 25px; }
.prose h3 { margin: 30px 0 12px; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: #f4faf9;
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
}
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.toc {
  position: sticky;
  top: 92px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.toc h4 { font-size: 13px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.toc li { margin: 0 0 2px; }
.toc a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--ink-2); }
.toc a:hover { background: #fff; color: var(--brand); text-decoration: none; }
.note-box {
  margin-top: 18px;
  padding: 16px;
  background: #fff;
  border: 1px dashed #cfdae5;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-3);
}

/* 文章尾部 */
.article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-3);
}

/* 筛选 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-bar button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: .15s;
}
.filter-bar button:hover { border-color: #cddbe8; }
.filter-bar button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  background: #0e1b2b;
  color: #9fb3c6;
  padding: 52px 0 26px;
  font-size: 14px;
}
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer .logo { color: #fff; }
.site-footer .logo small { color: #8194a6; }
.site-footer h5 { color: #fff; font-size: 13px; letter-spacing: .08em; margin: 0 0 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: #9fb3c6; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-desc { margin-top: 14px; color: #8194a6; max-width: 30em; line-height: 1.8; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.09);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  text-align: center;
  color: #7d90a3;
  font-size: 13px;
}
.footer-bottom a { color: #7d90a3; }
.footer-bottom a:hover { color: #fff; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; }
  .path-item::after { display: none; }
  .layout { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px;
    display: none;
    box-shadow: 0 14px 24px -18px rgba(16,24,40,.5);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav-toggle { display: grid; }
  .hero { padding: 58px 0 52px; }
  .section { padding: 54px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { margin-top: 40px; }
  .article-row { grid-template-columns: 1fr; gap: 6px; }
  .article-row .date { padding-top: 0; }
  .article-row .tag { justify-self: start; }
  .cta { padding: 34px 26px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
  .path { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
}

@media print {
  .site-header, .site-footer, .toc, .cta { display: none; }
}
