/* ==================== 设计变量与基础重置 ==================== */
:root {
  --bg-base: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-section-alt: #f3f4f6;
  --bg-hero: #ecfdf5;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent: #25D366;
  --accent-hover: #1ebd56;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --font-main: "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --container-max: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

button, [role="button"] {
  cursor: pointer;
  font: inherit;
}

/* ==================== 排版系统 ==================== */
h1, h2, h3, h4 {
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 清除默认列表标记，使用 CSS 生成器统一风格 */
ul, ol { list-style: none; }
ul > li::marker, ol > li::marker {
  color: var(--accent);
}
ul > li { padding-left: 0.5rem; }

/* ==================== 布局容器 ==================== */
.container {
  width: min(92%, var(--container-max));
  margin-inline: auto;
  padding-block: 3rem 1.5rem;
}

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section--alt {
  background: var(--bg-section-alt);
}

.section--hero {
  background: linear-gradient(180deg, var(--bg-hero) 0%, var(--bg-base) 100%);
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-size: 1rem;
  text-align: center;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  border-color: var(--border);
  background: transparent;
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card__title {
  margin-bottom: 0.5rem;
}

.card__desc {
  flex-grow: 1;
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-section-alt);
}

td { color: var(--text-secondary); }

/* ==================== FAQ (Details/Summary) ==================== */
details {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 3rem;
  color: var(--text-primary);
}

summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 1rem;
}

/* ==================== 新闻卡片与相关链接 ==================== */
.news-grid {
  display: grid;
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
}

.news-card:hover {
  box-shadow: var(--shadow-sm);
}

.news-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.news-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.related-list {
  display: grid;
  gap: 0.75rem;
}

.related-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.related-item:last-child { border-bottom: none; }

.related-link {
  font-weight: 500;
  color: var(--text-primary);
}

.related-link:hover {
  color: var(--accent);
}

.related-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==================== 头部与页脚 ==================== */
header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

nav a:hover::after, nav a[aria-current="page"]::after {
  width: 100%;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--accent);
}

footer {
  background: var(--text-primary);
  color: #d1d5db;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 600;
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
}

/* ==================== SVG 动效系统 ==================== */
.svg-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

@keyframes float-node {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -4px); }
}

.animate-draw {
  animation: draw-line 5s ease forwards;
}

.animate-float {
  animation: float-node 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* 装饰性图形节点 */
.svg-node {
  fill: var(--accent);
  animation: float-node 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-draw, .animate-float, .svg-node {
    animation: none !important;
  }
  .svg-path {
    stroke-dashoffset: 0 !important;
  }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem 0;
  }
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    width: 100%;
  }
  .grid--2, .grid--3, .grid--4 {
    grid-template-columns: 1fr;
  }
  .section { padding: 3rem 0; }
}
