:root {
  --ink: #14233a;
  --ink-soft: #3a4a63;
  --muted: #6b7a90;
  --line: #e6ebf2;
  --bg: #f5f9ff;
  --bg-soft: #eaf2ff;
  --accent: #2563eb;
  --accent-dark: #1b46b8;
  --gold: #c9a96a;
  --radius: 8px;
  --maxw: 1140px;
  --shadow: none;
  --shadow-lg: none;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .eyebrow {
  color: var(--accent); font-weight: 700; letter-spacing: .14em; font-size: 13px;
  text-transform: uppercase; display: inline-block; margin-bottom: 12px;
}
.section-head h2 { font-size: 32px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-cta {
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink); transition: .2s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #eaf2ff 0%, #f6f9ff 100%);
  padding: 110px 0 96px;
}
.hero::before {
  content: ""; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px;
  border: 1px solid rgba(37, 99, 235, .14); border-radius: 50%; opacity: .6;
}
.hero::after {
  content: ""; position: absolute; right: 40px; top: 40px; width: 280px; height: 280px;
  border: 1px solid rgba(37, 99, 235, .12); border-radius: 50%; opacity: .5;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { font-size: 46px; letter-spacing: .01em; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: .2s; border: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #fff; color: #d64545; border: 1px solid #f0c4c4; }
.btn-danger:hover { background: #d64545; color: #fff; border-color: #d64545; }
.readonly-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); font-size: 15px; line-height: 1.7; }

.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 30px; box-shadow: var(--shadow-lg); position: relative;
}
.hero-card .tag { color: var(--gold); font-weight: 700; letter-spacing: .12em; font-size: 12px; }
.hero-card h3 { margin: 8px 0 14px; font-size: 22px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.stat { border-top: 1px solid var(--line); padding-top: 12px; }
.stat b { display: block; font-size: 28px; color: var(--ink); }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- Cards / Services ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: .25s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card .ico {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--accent); font-size: 22px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* features split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .panel {
  background: var(--ink); color: #fff; border-radius: 12px; padding: 40px;
}
.split .panel h3, .split .panel h2 { color: #fff; }
.split .panel ul { list-style: none; padding: 0; margin: 18px 0 0; }
.split .panel li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; gap: 12px; }
.split .panel li b { color: var(--gold); }

/* ---------- News list ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .25s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-thumb {
  height: 168px; background: linear-gradient(135deg, #eaf2ff, #d8e8ff);
  position: relative; display: grid; place-items: center; color: var(--accent);
}
.news-thumb span { font-size: 40px; opacity: .8; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.news-body .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.news-body h3 { font-size: 18px; margin: 0 0 10px; }
.news-body p { color: var(--muted); font-size: 14px; margin: 0 0 16px; flex: 1; }
.tagchip {
  display: inline-block; font-size: 12px; color: var(--accent); background: var(--bg-soft);
  border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin-right: 6px;
}
.news-more { margin-top: 44px; text-align: center; }

.filterbar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.filterbar a {
  font-size: 14px; color: var(--ink-soft); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; transition: .2s;
}
.filterbar a.active, .filterbar a:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager button {
  min-width: 40px; height: 40px; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; cursor: pointer; color: var(--ink); font-weight: 600; transition: .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- Article detail ---------- */
.article-wrap { max-width: 820px; margin: 0 auto; padding: 56px 24px 96px; }
.article-wrap .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.article-wrap h1 { font-size: 38px; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin: 24px 0 36px; }
.markdown { font-size: 17px; color: var(--ink-soft); }
.markdown h1, .markdown h2, .markdown h3 { color: var(--ink); margin-top: 1.6em; }
.markdown h2 { font-size: 26px; border-left: 4px solid var(--accent); padding-left: 12px; }
.markdown h3 { font-size: 21px; }
.markdown img { border-radius: 8px; margin: 18px 0; }
.markdown blockquote {
  margin: 22px 0; padding: 14px 20px; border-left: 4px solid var(--gold);
  background: var(--bg-soft); color: var(--ink-soft); border-radius: 0 10px 10px 0;
}
.markdown pre {
  background: var(--ink); color: #e8eefc; padding: 18px; border-radius: 8px;
  overflow: auto; font-size: 14px;
}
.markdown code { font-family: "SF Mono", Consolas, monospace; font-size: .92em; }
.markdown :not(pre) > code { background: var(--bg-soft); color: var(--accent-dark); padding: 2px 6px; border-radius: 6px; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown li { margin: 6px 0; }
.markdown a { color: var(--accent); text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info .row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-info .row b { width: 70px; color: var(--ink); }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff; transition: .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.note { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd6e6; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.site-footer .brand-text strong { color: #fff; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; color: #cdd6e6; padding: 5px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: 13px; }
.icp-link { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.icp-link:hover { border-bottom-color: currentColor; }

/* ---------- Admin ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--bg-soft); padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 22px; }
.auth-card .brand { margin-bottom: 18px; }
.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #fff; padding: 26px 18px; }
.admin-side .brand-text strong { color: #fff; }
.admin-side a {
  display: flex; align-items: center; gap: 10px; color: #cdd6e6; padding: 11px 14px;
  border-radius: 10px; font-size: 15px; margin-top: 6px;
}
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-side .side-foot { margin-top: 28px; font-size: 13px; color: #8fa0bd; }
.admin-main { padding: 28px 34px; overflow: auto; }
.admin-main h1 { font-size: 24px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.list th { background: var(--bg-soft); color: var(--ink-soft); font-weight: 600; }
table.list tr:last-child td { border-bottom: 0; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.badge.on { background: #e7f6ec; color: #1f9d55; }
.badge.off { background: #fdeaea; color: #d64545; }
.row-actions { display: flex; gap: 8px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.link-btn.danger { color: #d64545; }

/* editor */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.editor-col h3 { font-size: 15px; color: var(--ink-soft); margin-bottom: 10px; }
.preview { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--bg-soft); min-height: 320px; }
.modal-back { position: fixed; inset: 0; background: rgba(20,35,58,.4); display: grid; place-items: center; padding: 24px; z-index: 100; }
.modal { background: #fff; border-radius: 12px; padding: 26px; width: 100%; max-width: 760px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal .field { margin-bottom: 14px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.toast {
  position: fixed; right: 24px; bottom: 24px; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); opacity: 0;
  transform: translateY(10px); transition: .25s; z-index: 200; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Scroll reveal（滚动进入视口淡入上移） ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .split, .contact-grid, .grid-2, .editor-grid { grid-template-columns: 1fr; }
  .grid-3, .news-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .grid-3, .news-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .section { padding: 60px 0; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-side { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .admin-side .side-foot { display: none; }
}
