:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-border: #e5e7eb;
  --color-text-main: #111827;
  --color-text-muted: #6b7280;
  --color-accent: #25D366;
  --color-accent-hover: #1da851;
  --color-focus: #25D366;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-serif: Georgia, "Songti SC", "SimSun", serif;
  --spacing-section: clamp(3rem, 6vw, 6rem);
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 排版 */
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; letter-spacing: -0.01em; margin-top: 0; margin-bottom: 0.75rem; }
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 600; }
p { margin-bottom: 1rem; max-width: 75ch; }
.text-muted { color: var(--color-text-muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--spacing-section) 0; }
.section-header { margin-bottom: 2.5rem; }
.section-header p { color: var(--color-text-muted); font-size: 1.05rem; }

/* 布局网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

/* 页头页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo img { height: 32px; width: auto; display: block; }
nav ul { display: flex; list-style: none; gap: 1.5rem; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--color-text-main); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-accent); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--color-text-main); }

.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { margin: 0 0 0.75rem; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { text-decoration: none; color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-text-main); }
.copyright { text-align: center; font-size: 0.85rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: 1.5rem; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background 0.2s, transform 0.1s, box-shadow 0.2s; border: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.25); }
.btn-secondary { background: transparent; color: var(--color-text-main); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: #f3f4f6; }
.btn-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 卡片 (新闻) */
.news-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; display: flex; flex-direction: column; transition: box-shadow 0.2s, transform 0.2s; }
.news-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.news-card time { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; font-variant-numeric: tabular-nums; }
.news-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.news-card p { font-size: 0.92rem; color: #4b5563; margin-bottom: 1rem; flex-grow: 1; }
.card-footer { margin-top: auto; }
.card-footer .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* 表格 (版本) */
.version-table-wrap { overflow-x: auto; }
.version-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.version-table th, .version-table td { padding: 0.85rem 1rem; border: 1px solid var(--color-border); text-align: left; }
.version-table th { background: var(--color-surface); font-weight: 600; }
.version-table tr:hover td { background: #fafafa; }

/* FAQ */
.faq-list details { border-bottom: 1px solid var(--color-border); padding: 1rem 0; }
.faq-list summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "+"; font-weight: bold; color: var(--color-text-muted); transition: transform 0.2s; flex-shrink: 0; }
details[open] summary::before { content: "−"; }
details p { margin: 0.75rem 0 0; color: #374151; line-height: 1.6; }

/* 相关阅读 */
.related-list { display: flex; flex-direction: column; gap: 0.75rem; }
.related-item { display: flex; align-items: baseline; gap: 0.75rem; text-decoration: none; color: inherit; }
.related-item a { font-weight: 500; color: var(--color-accent); }
.related-item span { color: var(--color-text-muted); font-size: 0.9rem; }
.link-arrow { width: 16px; height: 16px; stroke: var(--color-text-muted); fill: none; }

/* 步骤编号 */
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--color-accent); color: #fff; border-radius: 50%; font-weight: 600; font-size: 0.9rem; margin-right: 0.5rem; flex-shrink: 0; }
.step-block { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }

/* SVG 动效 */
.svg-container { width: 100%; max-width: 400px; margin: 0 auto; }
.svg-orbit circle { animation: orbit-breathe 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.svg-orbit circle:nth-child(2) { animation-delay: -2.5s; }
.svg-orbit circle:nth-child(3) { animation-delay: -5s; }
.svg-shield path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 5s ease forwards; }
@keyframes orbit-breathe { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.04); opacity: 0.4; } }
@keyframes draw-path { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

/* 焦点样式 */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }

/* 响应式适配 */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav { position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--color-border); padding: 1rem; display: none; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse; text-align: center; }
  .hero-layout .text-side { max-width: 100%; }
}
