/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-text-primary: #111316;
  --color-text-secondary: #525C66;
  --color-border: #E4E7EB;
  --color-brand: #25D366;
  --color-brand-dark: #1DA851;
  --color-brand-light: #EAFDF0;
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.05);
  --shadow-hover: 0 10px 28px rgba(0,0,0,0.09);
  --container-max: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-brand-dark); }

/* 排版流体字号 */
h1 { font-size: clamp(2.1rem, 1.6rem + 2.5vw, 3.4rem); line-height: 1.25; margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.8vw, 2.2rem); line-height: 1.3; margin-bottom: 1.1rem; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 0.95rem + 1vw, 1.35rem); line-height: 1.35; margin-bottom: 0.8rem; }
p { margin-bottom: 1.1rem; max-width: 72ch; color: var(--color-text-secondary); }

/* 布局容器 */
.container { width: min(100% - 2.5rem, var(--container-max)); margin-inline: auto; padding-block: 3.5rem; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* 网格系统 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.6rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }

/* 头部与导航 */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--color-border); height: var(--header-h);
}
header .container { display: flex; justify-content: space-between; align-items: center; padding-block: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; color: var(--color-text-primary); }
.brand img { width: 34px; height: 34px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 1.6rem; }
nav a {
  color: var(--color-text-secondary); font-weight: 500; padding: 0.4rem 0;
  border-bottom: 2px solid transparent; display: inline-block;
}
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); border-color: var(--color-brand); }

/* 页脚 */
footer { background: #141719; color: #8A9299; padding: 4.5rem 0 2.5rem; }
footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
footer h4 { color: #FFF; margin-bottom: 1rem; font-size: 1.05rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.65rem; font-size: 0.95rem; }
footer a { color: inherit; }
.copyright { text-align: center; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.85rem 2.1rem; font-weight: 600; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.25s ease; border: 1.5px solid transparent; font-size: 1rem;
}
.btn-primary { background: var(--color-brand); color: #FFF; }
.btn-primary:hover { background: var(--color-brand-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37,211,102,0.25); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text-primary); }
.btn-outline:hover { border-color: var(--color-brand); color: var(--color-brand); }

/* 组件：卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1.6rem;
  box-shadow: var(--shadow-card); transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.card-icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--color-brand); }

/* 组件：表格 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
th { background: #F8FAFB; font-weight: 600; color: var(--color-text-primary); }
tr:last-child td { border-bottom: none; }
tr:hover { background: #FDFDFD; }

/* 组件：FAQ */
details { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.85rem; overflow: hidden; background: var(--color-surface); }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary { border-bottom: 1px solid var(--color-border); }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 1rem 1.25rem; color: var(--color-text-secondary); }

/* 组件：时间线/步骤 */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { position: relative; padding-left: 2.5rem; margin-bottom: 1.2rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; background: var(--color-brand-light); color: var(--color-brand);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

/* 组件：新闻卡片 */
.news-card figure { margin-bottom: 0.8rem; overflow: hidden; border-radius: var(--radius-sm); background: #EAECEF; height: 140px; }
.news-card time { display: block; font-size: 0.8rem; color: var(--color-text-secondary); margin-bottom: 0.4rem; }
.news-card h4 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.news-card p { font-size: 0.92rem; margin-bottom: 0.8rem; }
.news-card .btn-sm { font-size: 0.85rem; padding: 0.45rem 1rem; }

/* 组件：相关链接 */
.related-list { list-style: none; }
.related-list li { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px dashed var(--color-border); }
.related-list h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.related-list p { font-size: 0.88rem; margin-bottom: 0; }

/* SVG 动效基类 */
@keyframes wave-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wave-dash { 0%, 100% { stroke-dashoffset: 0; } 50% { stroke-dashoffset: 1; } }
.anim-wave-y { animation: wave-y 5.5s ease-in-out infinite; }
.anim-wave-y.d1 { animation-delay: 1.2s; }
.anim-wave-y.d2 { animation-delay: 2.4s; }
.anim-wave-y.d3 { animation-delay: 3.6s; }
.anim-wave-dash { animation: wave-dash 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .anim-wave-y, .anim-wave-dash { animation: none !important; }
}

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
::selection { background: var(--color-brand); color: #FFF; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding-block: 2.5rem; }
  header .container { padding-inline: 1.25rem; }
  nav ul { gap: 1rem; }
  nav a { font-size: 0.9rem; }
}
