/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg-dark: #0b1626;
  --color-bg-light: #f6f9fc;
  --color-surface: #ffffff;
  --color-surface-alt: #eef3f9;
  --color-text-main: #1a2b3c;
  --color-text-sub: #4a5d73;
  --color-primary: #1a73e8;
  --color-accent: #00e5ff;
  --color-accent-glow: rgba(0, 229, 255, 0.25);
  --color-border: #dce4ee;
  --color-success: #2ecc71;
  --font-body: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(10, 20, 40, 0.06);
  --shadow-hover: 0 8px 24px rgba(10, 20, 40, 0.12);
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 48px;
  --space-xl: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background: var(--color-bg-light);
  line-height: 1.75;
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover, a:focus-visible { color: var(--color-accent); outline: none; }
ul, ol { list-style: none; }

/* =========================================
   排版系统（流体字号）
   ========================================= */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; color: #0f1c2e; }
h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.1rem, 1rem + 0.8vw, 1.35rem); margin-bottom: var(--space-sm); }
p { margin-bottom: 1rem; color: var(--color-text-sub); }
.section-intro { max-width: 720px; margin-bottom: var(--space-lg); font-size: clamp(1rem, 0.95rem + 0.5vw, 1.15rem); }

/* =========================================
   布局容器
   ========================================= */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--space-sm); }
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface-alt); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }

/* =========================================
   页头与页脚
   ========================================= */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 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: 10px; font-weight: 600; color: var(--color-text-main); }
.brand img { height: 32px; width: auto; object-fit: contain; }
.nav { display: flex; gap: var(--space-sm); }
.nav a { padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; color: var(--color-text-sub); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--color-surface-alt); color: var(--color-primary); font-weight: 500; }
.footer { background: var(--color-bg-dark); color: #9fb0c8; padding: var(--space-lg) 0; font-size: 0.9rem; }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-sm); align-items: center; text-align: center; }
.footer-links { display: flex; gap: var(--space-sm); flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #c4d3e6; }
.copyright { opacity: 0.7; margin-top: var(--space-sm); }

/* =========================================
   按钮组件
   ========================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: var(--radius-md); font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; font-size: 0.95rem; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 10px rgba(26, 115, 232, 0.25); }
.btn-primary:hover { background: #155db5; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(26, 115, 232, 0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: rgba(26, 115, 232, 0.06); }
.btn-group { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-sm); }

/* =========================================
   卡片与表格
   ========================================= */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-md); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-icon { width: 44px; height: 44px; background: var(--color-surface-alt); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-sm); color: var(--color-primary); }
.card-icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.card h4 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; margin-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); min-width: 500px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface-alt); font-weight: 600; color: var(--color-text-main); }
tr:last-child td { border-bottom: none; }

/* =========================================
   FAQ 手风琴
   ========================================= */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-summary { padding: 16px 20px; cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: "+"; font-size: 1.2rem; color: var(--color-primary); transition: transform 0.2s; }
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 20px 16px; color: var(--color-text-sub); line-height: 1.7; }

/* =========================================
   新闻与阅读卡片
   ========================================= */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card h4 { margin-bottom: 6px; }
.news-meta { font-size: 0.85rem; color: var(--color-text-sub); margin-bottom: 10px; }
.news-excerpt { flex-grow: 1; font-size: 0.95rem; margin-bottom: 12px; }
.news-link { font-size: 0.9rem; font-weight: 500; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--color-border); padding-bottom: 8px; }
.related-item strong { font-weight: 500; color: var(--color-text-main); }
.related-item span { font-size: 0.9rem; color: var(--color-text-sub); }

/* =========================================
   SVG 动效规范
   ========================================= */
.svg-canvas { width: 100%; height: 100%; min-height: 260px; }
.star { fill: var(--color-accent); opacity: 0.7; transition: opacity 0.3s; }
.line { stroke: var(--color-accent); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 0; fill: none; stroke-linecap: round; }
@keyframes drawLine {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.4; }
  50% { stroke-dashoffset: 1; opacity: 1; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.anim-line { animation: drawLine 8s ease-in-out infinite; }
.anim-star { animation: twinkle 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
/* 延迟错开动画周期 */
.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2.5s; }
.delay-3 { animation-delay: 4s; }

@media (prefers-reduced-motion: reduce) {
  .anim-line, .anim-star, .card { animation: none !important; }
  .card { transform: none !important; }
}

/* =========================================
   界面示意与辅助类
   ========================================= */
.mockup-frame { background: var(--color-bg-dark); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow-hover); }
.mockup-header { height: 36px; background: #1a2b3c; border-radius: 6px 6px 0 0; display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a5d73; }
.mockup-body { display: grid; grid-template-columns: 80px 1fr; gap: 0; height: 320px; border-radius: 0 0 6px 6px; overflow: hidden; }
.mockup-sidebar { background: #112233; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mockup-sidebar-item { height: 12px; background: #1e3a5f; border-radius: 4px; opacity: 0.6; }
.mockup-chat { background: #081421; padding: 16px; display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; color: #e6f0ff; }
.bubble-left { background: #1a2b3c; align-self: flex-start; border-bottom-left-radius: 2px; }
.bubble-right { background: #005c4b; align-self: flex-end; border-bottom-right-radius: 2px; }
.attachment-preview { display: flex; gap: 8px; margin-top: 4px; }
.preview-thumb { width: 60px; height: 60px; background: #1e3a5f; border-radius: 8px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 0.8rem; font-weight: 600; margin-right: 10px; vertical-align: middle; }
.tag { display: inline-block; padding: 2px 8px; background: rgba(0, 229, 255, 0.12); color: var(--color-accent); border-radius: 4px; font-size: 0.8rem; margin-bottom: 8px; }
/* 响应式微调 */
@media (max-width: 768px) {
  .nav { display: none; } /* 简化为单页锚点，移动端可折叠，此处保持静态直连 */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .mockup-body { grid-template-columns: 1fr; }
  .mockup-sidebar { display: none; }
}
