/* 设计变量与基础重置 */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-primary: #0ea5e9;
  --color-primary-deep: #0284c7;
  --color-accent: #06b6d4;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --font-base: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 24px rgba(14, 165, 233, 0.12);
  --space-section: clamp(3rem, 6vw, 6.5rem);
  --space-block: 1.5rem;
  --container-max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--color-primary-deep); }
button, [role="button"], .btn { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }
table { width: 100%; border-collapse: collapse; }

/* 排版系统 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.25rem; }
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}
.section-desc {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--color-text-secondary);
  max-width: 720px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* 导航与页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 1.1rem; color: var(--color-text); }
.brand img { height: 32px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.95rem; color: var(--color-text-secondary); padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); border-color: var(--color-primary); }

.site-footer {
  background: #0f172a; color: #cbd5e1; padding: 3rem 0 1.5rem; margin-top: var(--space-section);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #f8fafc; margin-bottom: 1rem; font-size: 1rem; }
.footer-col a { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; color: #64748b; }

/* 按钮组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 500; font-size: 1rem;
  transition: all 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff; box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}
.btn-outline {
  border: 1.5px solid var(--color-primary); color: var(--color-primary); background: transparent;
}
.btn-outline:hover, .btn-outline:focus-visible { background: rgba(14, 165, 233, 0.05); }

/* 通用卡片与网格 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.25rem; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); }
table th, table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
table th { background: #f1f5f9; font-weight: 600; color: var(--color-text); }
table tr:last-child td { border-bottom: none; }
table td strong { color: var(--color-primary-deep); }

/* FAQ 组件 */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
details {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
}
summary {
  padding: 1rem 1.25rem; font-weight: 500; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 1.25rem 1rem; color: var(--color-text-secondary); line-height: 1.75; font-size: 0.95rem; }

/* 链接列表 */
.link-list li { margin-bottom: 0.6rem; padding-left: 1.25rem; position: relative; }
.link-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
.link-list a { font-size: 0.95rem; }
.link-list a:hover { text-decoration: underline; }

/* SVG 动效基础 */
.svg-animate { width: 100%; height: auto; overflow: visible; }
.star { fill: var(--color-accent); opacity: 0.6; }
.line-connect { stroke: var(--color-primary); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.draw-line { animation: drawLine 6s ease-in-out infinite alternate; }
.twinkle-star { animation: twinkle 4s ease-in-out infinite alternate; }
.spin-slow { animation: spinSlow 12s linear infinite; transform-box: fill-box; transform-origin: center; }

@keyframes drawLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes twinkle { 0% { opacity: 0.3; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1.1); } }
@keyframes spinSlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .draw-line, .twinkle-star, .spin-slow { animation: none; }
}

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.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; }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
