:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #16212c;
  --ink-soft: #34455a;
  --muted: #5f6f80;
  --line: #e2e8f0;
  --brand: #0b5c8a;
  --brand-dark: #083f5f;
  --brand-light: #e7f1f7;
  --accent: #b45309;
  --accent-bg: #fdf6ec;
  --radius: 10px;
  --wrap: 1080px;
  --shadow: 0 1px 2px rgba(16, 33, 48, .05), 0 8px 24px rgba(16, 33, 48, .05);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.78;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
time { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; text-decoration: none; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(140deg, var(--brand) 0%, #0e7490 100%);
  color: #fff; font-size: 18px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-block; padding: 8px 10px; border-radius: 6px;
  color: var(--ink-soft); font-size: 15px; white-space: nowrap;
}
.nav a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }
.nav a.active { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.nav-toggle, .nav-btn { display: none; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding-top: 16px; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: #9aa9b8; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 首页 ---------- */
.hero {
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(14, 116, 144, .55), transparent 70%),
    linear-gradient(135deg, #082b41 0%, #0b5c8a 62%, #0e7490 100%);
  color: #fff; padding: 72px 0 64px;
}
.hero-inner { max-width: 820px; }
.hero-kicker {
  margin: 0 0 12px; font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; color: #b7dbe8;
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.3; letter-spacing: -.01em; font-weight: 700;
}
.hero-lead { margin: 0 0 28px; font-size: 17px; line-height: 1.85; color: #d8e8f1; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.hero .btn-primary { background: #fff; color: var(--brand-dark); }
.hero .btn-primary:hover { background: #e8f4fa; }

.section { margin-top: 54px; }
.section-head { margin-bottom: 20px; }
.section-head h2 {
  margin: 0 0 4px; font-size: 24px; letter-spacing: -.01em;
  padding-left: 12px; border-left: 4px solid var(--brand); line-height: 1.4;
}
.section-head p { margin: 0; color: var(--muted); font-size: 14px; padding-left: 16px; }
.section-note {
  margin-bottom: 64px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.section-note h2 { margin: 0 0 8px; font-size: 18px; }
.section-note p { margin: 0; color: var(--muted); font-size: 14.5px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { text-decoration: none; border-color: #b9d4e2; box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink); }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7b8a99; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: #a9b6c3; display: inline-block; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover { text-decoration: none; border-color: #b9d4e2; box-shadow: var(--shadow); }
.cat-name { font-size: 17px; font-weight: 600; }
.cat-note { font-size: 13.5px; color: var(--muted); }
.cat-count { margin-top: 6px; font-size: 12px; color: var(--brand); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tool-entry {
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, #fff, #f7fbfd);
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 20px; color: var(--ink);
}
.tool-entry:hover { text-decoration: none; box-shadow: var(--shadow); }
.tool-entry strong { font-size: 17px; }
.tool-entry span { font-size: 13.5px; color: var(--muted); }

/* ---------- 栏目页 ---------- */
.category-head, .page-head { padding-top: 34px; }
.kicker {
  margin: 0 0 8px; font-size: 12.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); font-weight: 600;
}
.category-head h1, .page-head h1, .article-head h1, .notfound h1 {
  margin: 0 0 12px; font-size: clamp(26px, 3.6vw, 34px); line-height: 1.35; letter-spacing: -.01em;
}
.category-desc, .page-desc { margin: 0; color: var(--muted); font-size: 16px; max-width: 760px; }
.category-body, .page-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px;
  margin-top: 32px; padding-bottom: 64px;
}
.page-body { display: block; max-width: 820px; }
.pinned {
  background: var(--brand-light); border: 1px solid #cfe3ee; border-radius: var(--radius);
  padding: 18px 20px; margin: 28px 0 8px;
}
.pinned-label { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; color: var(--brand); font-weight: 600; }
.pinned-link { font-size: 18px; font-weight: 600; color: var(--brand-dark); }
.pinned-desc { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-row a { font-size: 18px; font-weight: 600; color: var(--ink); }
.post-row a:hover { color: var(--brand); }
.post-row p { margin: 6px 0 8px; color: var(--muted); font-size: 14.5px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: #7b8a99; }
.category-side { position: relative; }
.tool-card {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 20px;
}
.tool-label { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; color: var(--brand); font-weight: 600; }
.tool-card a { font-size: 17px; font-weight: 600; }
.tool-card p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; }

/* ---------- 文章页 ---------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 52px;
  padding-top: 34px; padding-bottom: 64px;
}
.article { min-width: 0; max-width: 740px; }
.article-head .kicker a { color: var(--brand); }
.article-head h1 { margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--muted); }
.lede {
  margin: 24px 0 18px; padding: 16px 20px;
  background: var(--surface); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 16.5px; line-height: 1.8; color: var(--ink-soft);
}
.source {
  margin: 0 0 26px; padding: 12px 16px; background: #eef3f7;
  border-radius: 8px; font-size: 13px; color: var(--ink-soft);
}
.prose { font-size: 16.5px; line-height: 1.9; color: #23303d; }
.prose > p { margin: 0 0 18px; }
.prose h2 {
  margin: 40px 0 14px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 22px; line-height: 1.45; letter-spacing: -.01em;
}
.prose h3 { margin: 28px 0 10px; font-size: 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: #10202e; }
.prose code { background: #eef2f6; border-radius: 4px; padding: 1px 5px; font-size: 14px; }
.prose blockquote {
  margin: 20px 0; padding: 14px 18px; background: #f3f6f9;
  border-left: 3px solid #b9c9d6; color: var(--ink-soft); font-size: 15px;
}
.prose blockquote p { margin: 0; }
.table-wrap { margin: 22px 0 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.65; min-width: 480px; }
.prose th, .prose td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #eef3f7; font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: #fbfcfd; }

.related-service {
  margin: 32px 0; padding: 18px 20px; background: var(--accent-bg);
  border: 1px solid #f0dcc0; border-left: 4px solid var(--accent); border-radius: 8px;
  font-size: 14.5px; color: #5e4423;
}
.related-service p { margin: 0; }
.rs-label { margin-bottom: 4px !important; font-size: 12px; letter-spacing: .12em; font-weight: 600; color: var(--accent); }
.disclaimer { margin: 30px 0 0; font-size: 13px; color: #7b8a99; }
.related { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.related h2 { font-size: 19px; margin: 18px 0 10px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.rl-cat { font-size: 12px; color: var(--muted); }

.sidebar { font-size: 14px; }
.side-block {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 14px; margin-bottom: 16px;
}
.side-block:nth-child(2) { position: static; }
.side-block:nth-child(3) { position: static; }
.side-block h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); line-height: 1.6; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--ink-soft); }
.side-list a:hover { color: var(--brand); }
.side-tool a { font-size: 15px; font-weight: 600; }
.side-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 工具页 ---------- */
.calc {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 24px; margin: 26px 0 34px; box-shadow: var(--shadow);
}
.calc-head h2 { margin: 0 0 6px; font-size: 20px; }
.calc-head p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; margin-bottom: 18px; }
.calc-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-soft); }
.calc-grid input {
  width: 100%; min-height: 42px; padding: 8px 10px; font-size: 16px;
  border: 1px solid #cfdae4; border-radius: 6px; background: #fff; color: var(--ink);
}
.calc-grid input:focus { outline: 2px solid rgba(11, 92, 138, .28); border-color: var(--brand); }
.calc-result { margin-top: 18px; font-size: 14.5px; }
.calc-result .result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.calc-result .result-item { background: #f3f8fb; border-radius: 8px; padding: 12px 14px; }
.calc-result .result-label { display: block; font-size: 12.5px; color: var(--muted); }
.calc-result .result-value { font-size: 19px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.calc-result .warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 6px; background: #fdecec; color: #9b1c1c; font-size: 13.5px; }
.calc-result .ok { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- 关于 / 联系 / 404 ---------- */
.page-body .prose { max-width: 780px; }
.notfound { padding: 64px 20px 80px; }
.notfound-back { margin-top: 30px; }
.notfound .cat-grid { margin-top: 26px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0d1d2b; color: #a9bac9; font-size: 14px; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px;
  padding: 36px 20px 22px;
}
.footer-brand { margin: 0 0 6px; color: #fff; font-size: 16px; font-weight: 600; }
.footer-about p { margin: 0; max-width: 520px; line-height: 1.7; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 20px; align-content: start; }
.footer-nav a { color: #c5d3de; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 14px 20px 28px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px; color: #7f94a6;
}
.footer-bottom a { color: #9db0c0; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article { max-width: none; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .side-block { position: static; margin: 0; }
  .category-body { grid-template-columns: 1fr; gap: 28px; }
  .category-side { order: -1; }
  .tool-card { position: static; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 60px; }
  .brand-sub { display: none; }
  .nav-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px;
  }
  .nav-btn span { display: block; height: 2px; background: var(--ink-soft); border-radius: 2px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
    box-shadow: 0 12px 24px rgba(16, 33, 48, .08);
  }
  .nav a { padding: 12px 8px; font-size: 16px; border-bottom: 1px solid #f0f4f8; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .hero { padding: 52px 0 44px; }
  .hero-lead { font-size: 16px; }
  .section { margin-top: 42px; }
  .card-grid, .cat-grid, .tool-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-layout { padding-top: 24px; }
  .prose { font-size: 16px; }
  .prose table { min-width: 420px; }
  .calc { padding: 18px; }
  .section-note { margin-bottom: 48px; }
}
