/* 设计变量与基础设定 */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-secondary: #57534e;
  --color-accent: #059669;
  --color-accent-hover: #047857;
  --color-border: #e7e5e4;
  --color-focus: #d97706;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-subtle: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
  --transition-base: 0.2s ease-in-out;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 排版系统（流体字号） */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.25; text-wrap: balance; color: var(--color-text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.35rem); margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); max-width: 75ch; }
small { font-size: 0.875em; color: var(--color-text-secondary); }

/* 布局容器 */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-sm); }
.section { padding: var(--space-lg) 0; }
.grid-2 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* 页头与导航 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250, 250, 249, 0.95); 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; text-decoration: none; color: inherit; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; }
.nav ul { display: flex; list-style: none; gap: var(--space-sm); }
.nav a { text-decoration: none; color: var(--color-text-secondary); font-size: 0.95rem; padding: 6px 10px; border-radius: var(--radius-sm); transition: var(--transition-base); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-accent); background: #ecfdf5; }

/* 按钮组件 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; font-size: 1rem; font-weight: 500; border-radius: var(--radius-sm); border: none; cursor: pointer; text-decoration: none; transition: var(--transition-base); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* 卡片与界面示意 */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-subtle); transition: var(--transition-base); }
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.mock-window { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.mock-titlebar { height: 32px; background: #f5f5f5; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: #ccc; }
.mock-body { padding: var(--space-sm); display: grid; grid-template-columns: 240px 1fr; gap: 12px; min-height: 260px; }
.mock-sidebar { background: #fafafa; border-radius: var(--radius-sm); padding: 12px; }
.mock-chat { background: #fdfdfd; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #f9f9f7; font-weight: 600; color: var(--color-text-secondary); font-size: 0.9rem; }
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-sm); overflow: hidden; }
details summary { padding: 14px 16px; cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.2rem; color: var(--color-text-secondary); transition: transform 0.2s; }
details[open] summary::after { content: "−"; }
details p { padding: 0 16px 14px; color: var(--color-text-secondary); margin-top: 0; }

/* 图标规范 */
.icon { width: 24px; height: 24px; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* SVG 动效核心规则 */
.svg-container { width: 100%; max-width: 480px; aspect-ratio: 1 / 1; position: relative; }
.orbit-ring { fill: none; stroke: var(--color-accent); stroke-width: 1.5; opacity: 0.6; transform-box: fill-box; transform-origin: center; }
.orbit-ring:nth-child(1) { animation: breathe 6s ease-in-out infinite alternate; }
.orbit-ring:nth-child(2) { animation: breathe 8s ease-in-out infinite alternate-reverse; stroke-width: 1; opacity: 0.4; }
.orbit-ring:nth-child(3) { animation: breathe 10s ease-in-out infinite alternate; stroke-width: 0.8; opacity: 0.3; }
.draw-path { fill: none; stroke: var(--color-accent); stroke-width: 2; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 6s linear infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(0.95); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: 0.5; }
  10% { opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.5; }
}

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@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; }
  .orbit-ring, .draw-path { animation: none !important; }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .nav ul { flex-wrap: wrap; justify-content: center; gap: 4px; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-sidebar { display: none; }
  .section { padding: var(--space-md) 0; }
}
