/* 设计变量与基础设定 */
:root {
  --color-bg: #F7F6F2;
  --color-surface: #FFFFFF;
  --color-text-primary: #111111;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #737373;
  --color-border: #E2E0DA;
  --color-accent: #1A1A1A;
  --color-accent-hover: #333333;
  --color-highlight: #F0EDE6;
  --font-sans: "PingFang SC", "Helvetica Neue", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.08);
  --container-max: 1120px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); background: var(--color-bg); color: var(--color-text-primary); line-height: 1.6; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* 排版与流体字号 */
.heading-xl { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.heading-lg { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; }
.heading-md { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; }
.body-lg { font-size: clamp(1rem, 1.5vw, 1.125rem); color: var(--color-text-secondary); }
.body-md { font-size: 0.9375rem; color: var(--color-text-secondary); }
.caption { font-size: 0.8125rem; color: var(--color-text-muted); letter-spacing: 0.02em; }

/* 布局容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
.grid-auto { display: grid; gap: var(--space-md); }
.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)); }
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface); }

/* 页头与页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 246, 242, 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; }
.logo-area { display: flex; align-items: center; gap: var(--space-sm); }
.logo-area img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: 0.02em; }
.main-nav ul { display: flex; gap: var(--space-md); }
.main-nav a { font-weight: 500; font-size: 0.9375rem; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color var(--transition-base); }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--color-text-primary); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--color-text-primary); }
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: var(--space-md); flex-direction: column; gap: var(--space-sm); }
  .main-nav.is-open { display: flex; }
}

.site-footer { background: var(--color-accent); color: #F0F0F0; padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h3 { color: #FFFFFF; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-sm); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--space-md); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); }
.footer-bottom p { font-size: 0.8125rem; opacity: 0.8; }

/* 按钮组件 */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9375rem; cursor: pointer; border: 1px solid transparent; transition: all var(--transition-base); outline-offset: 2px; }
.btn-primary { background: var(--color-text-primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: transparent; border-color: var(--color-border); color: var(--color-text-primary); }
.btn-secondary:hover { border-color: var(--color-text-primary); background: var(--color-highlight); }
.btn:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: 3px; }

/* 卡片与网格 */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-md); transition: transform var(--transition-base), box-shadow var(--transition-base); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-icon { width: 40px; height: 40px; margin-bottom: var(--space-sm); stroke: var(--color-text-primary); stroke-width: 1.5; fill: none; }
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-xs); }
.card-body { color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.6; }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { margin-bottom: var(--space-sm); display: flex; justify-content: space-between; align-items: center; }
.news-date { font-size: 0.8125rem; color: var(--color-text-muted); }
.news-link { margin-top: auto; padding-top: var(--space-sm); font-weight: 500; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 4px; }
.news-link::after { content: "→"; transition: transform var(--transition-base); }
.news-link:hover::after { transform: translateX(3px); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.platform-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.platform-table th, .platform-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
.platform-table th { background: var(--color-highlight); font-weight: 600; color: var(--color-text-primary); }
.platform-table tr:last-child td { border-bottom: none; }
.platform-table tr:hover td { background: rgba(0,0,0,0.015); }

/* FAQ (details/summary) */
.faq-list { display: flex; flex-direction: column; gap: 1px; background: var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-item { background: var(--color-surface); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: none; border: none; cursor: pointer; font-weight: 600; font-size: 1rem; text-align: left; color: var(--color-text-primary); }
.faq-question::after { content: "+"; font-size: 1.25rem; font-weight: 300; transition: transform var(--transition-base); }
.faq-item[open] .faq-question::after { transform: rotate(45deg); }
.faq-answer { padding: 0 20px 18px; color: var(--color-text-secondary); line-height: 1.65; font-size: 0.9375rem; }

/* 链接列表 */
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-sm); }
.related-link { display: block; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); transition: all var(--transition-base); }
.related-link:hover { border-color: var(--color-text-primary); background: var(--color-highlight); }
.related-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 4px; }
.related-desc { font-size: 0.8125rem; color: var(--color-text-muted); }

/* SVG 通用与动效 */
.svg-container { width: 100%; max-width: 600px; margin: 0 auto; }
.line-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 6s ease-in-out infinite alternate; }
.sweep-highlight { opacity: 0; animation: sweepGlow 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drawPath { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes sweepGlow { 0%, 15% { opacity: 0; transform: translateX(-120%); } 20%, 60% { opacity: 0.6; transform: translateX(0); } 65%, 100% { opacity: 0; transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* 辅助类 */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
