/* === 设计变量与基础重置 === */
:root {
  --color-primary: #0A8F4C;
  --color-primary-hover: #076B3A;
  --color-bg: #F8F9FA;
  --color-surface: #FFFFFF;
  --color-text: #111827;
  --color-text-muted: #4B5563;
  --color-border: #E5E7EB;
  --color-accent-light: #ECFDF5;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --container-max: 1120px;
  --space-base: 1rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: clamp(14px, 0.9rem + 0.5vw, 16px);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }

/* === 排版系统 === */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 calc(var(--space-base) * 1.5); }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-alt { background: var(--color-surface); }
.heading-serif { font-family: var(--font-serif); letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.2rem); line-height: 1.2; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.2rem, 2.2rem); line-height: 1.3; font-weight: 600; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
h3 { font-size: clamp(1.1rem, 1.5vw + 0.2rem, 1.3rem); font-weight: 600; margin-bottom: 0.75rem; }
.text-body { color: var(--color-text-muted); max-width: 65ch; }
.hero-title { text-wrap: balance; margin-bottom: 1rem; }
.section-intro { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* === 布局工具 === */
.grid-2 { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media(min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media(min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.flex-center { display: flex; align-items: center; justify-content: center; }
.asymmetric { display: grid; gap: 2rem; }
@media(min-width: 900px) { .asymmetric { grid-template-columns: 1.1fr 0.9fr; align-items: center; } }

/* === 导航与页头页脚 === */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 10; }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; }
.nav-list { display: flex; gap: 1.5rem; }
.nav-link { font-size: 0.95rem; font-weight: 500; padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-primary); border-color: var(--color-primary); }
.mobile-toggle { display: none; background: none; border: 1px solid var(--color-border); padding: 0.5rem; cursor: pointer; border-radius: var(--radius-sm); }
@media(max-width: 767px) {
  .mobile-toggle { display: inline-flex; }
  .nav-list { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 1rem; gap: 0.5rem; }
  .nav-list.open { display: flex; }
}

.site-footer { background: #F3F4F6; border-top: 1px solid var(--color-border); padding: 2.5rem 0; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer-links { display: flex; gap: 1.5rem; font-size: 0.9rem; color: var(--color-text-muted); }
.footer-copy { font-size: 0.85rem; color: #6B7280; }

/* === 按钮与交互 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer; border: none; text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text-muted); background: #F9FAFB; }
kbd { background: #F3F4F6; border: 1px solid #D1D5DB; border-radius: 4px; padding: 0.15rem 0.4rem; font-size: 0.8rem; font-family: monospace; }

/* === 卡片组件 === */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2vw, 1.5rem); box-shadow: var(--shadow-card); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-icon { width: 40px; height: 40px; background: var(--color-accent-light); border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 1rem; color: var(--color-primary); }
.card-meta { font-size: 0.8rem; color: #9CA3AF; margin-bottom: 0.75rem; display: block; }

/* === 表格 === */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.data-table th { background: #F9FAFB; font-weight: 600; color: var(--color-text); }
.data-table tr:last-child td { border-bottom: none; }

/* === FAQ === */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-summary {
  padding: 1rem 0; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: '+'; font-size: 1.25rem; color: var(--color-text-muted); transition: transform 0.2s; }
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding-bottom: 1rem; color: var(--color-text-muted); }

/* === SVG 动效基类 === */
.svg-anim { width: 100%; height: auto; overflow: visible; }
.orbit-ring { fill: none; stroke: var(--color-primary); stroke-width: 1.5; opacity: 0.15; transform-origin: center; transform-box: fill-box; }
.animate-orbit-breathe { animation: orbit-breathe 6s ease-in-out infinite alternate; }
.animate-orbit-delay1 { animation: orbit-breathe 6s ease-in-out infinite alternate 1.5s; }
.animate-orbit-delay2 { animation: orbit-breathe 6s ease-in-out infinite alternate 3s; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s ease forwards; }
.draw-path-loop { animation: draw-line 4s ease-in-out infinite alternate; }
.pulse-dot { animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

@keyframes orbit-breathe {
  0% { transform: scale(0.96); opacity: 0.1; }
  50% { transform: scale(1.02); opacity: 0.25; }
  100% { transform: scale(0.98); opacity: 0.12; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .animate-orbit-breathe, .draw-path, .draw-path-loop, .pulse-dot { animation: none !important; }
}

/* === 界面示意区 === */
.ui-mockup {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); display: grid; grid-template-columns: 240px 1fr; height: 360px;
}
@media(max-width: 640px) { .ui-mockup { grid-template-columns: 1fr; height: auto; } }
.ui-sidebar { background: #F8F9FA; border-right: 1px solid var(--color-border); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ui-chat { display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; background: #fff; }
.msg { padding: 0.6rem 1rem; border-radius: var(--radius-md); max-width: 75%; margin-bottom: 0.75rem; font-size: 0.9rem; }
.msg-in { background: #F3F4F6; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg-out { background: var(--color-accent-light); align-self: flex-end; border-bottom-right-radius: 2px; color: #065A36; }

/* === 焦点可见性 === */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }
/* 隐藏列表默认标记的兼容处理 */
li::marker { color: var(--color-primary); content: "•"; }
ol li { counter-increment: step-counter; }
ol li::before { content: counter(step-counter); font-weight: 700; color: var(--color-primary); margin-right: 0.5rem; }
ol { padding-left: 1.5rem; }
ol li { padding: 0.5rem 0; }
ol li::before { position: static; display: inline-block; width: 1.5rem; height: 1.5rem; line-height: 1.5rem; text-align: center; border-radius: 50%; background: var(--color-accent-light); margin-right: 0.75rem; }
ol.step-list li::before { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
ol.step-list li { counter-reset: none; }
ol.step-list li::before { content: ''; position: static; margin-right: 0.75rem; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--color-primary); display: inline-block; vertical-align: middle; }
ol.step-list { list-style: none; padding: 0; }
ol.step-list > li { padding: 0.75rem 0; }
ol.step-list > li::before { content: attr(data-step); }
ol.step-list > li:nth-child(1)::before { content: "1"; }
ol.step-list > li:nth-child(2)::before { content: "2"; }
ol.step-list > li:nth-child(3)::before { content: "3"; }
ol.step-list > li:nth-child(4)::before { content: "4"; }
ol.step-list > li:nth-child(5)::before { content: "5"; }
/* 修正上面步数样式，改用简单数字前缀更稳妥 */
.steps-container { counter-reset: step; }
.steps-container li { position: relative; padding-left: 2rem; margin-bottom: 1rem; counter-increment: step; }
.steps-container li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.5rem; height: 1.5rem; background: var(--color-accent-light); color: var(--color-primary); border-radius: 50%; font-size: 0.85rem; font-weight: 700; display: grid; place-items: center; }
