:root {
  --bg-dark: #140E25;
  --bg-paper: #F5F0E5;
  --text-body: #191523;
  --text-light: #F5F0E5;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;
  --btn-primary-text: #140E25;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
  --line-height-base: 1.55;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-paper);
  color: var(--text-body);
  line-height: var(--line-height-base);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* 排版基础 */
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
p { max-width: 38em; margin-bottom: 1rem; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }

/* 容器与区块 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; position: relative; }
.dark-surface { background: var(--bg-dark); color: var(--text-light); }
.paper-surface { background: var(--bg-paper); color: var(--text-body); }
.section-divider { height: 1px; background: rgba(25, 21, 35, 0.1); margin: 0; border: none; }
.dark-surface .section-divider { background: rgba(245, 240, 229, 0.12); }

/* 面取色变量覆盖 */
.dark-surface .hl { color: var(--color-accent); }
.dark-surface .badge { color: var(--color-accent); }
.dark-surface .btn-secondary { color: var(--text-light); border-color: var(--text-light); }
.dark-surface table th, .dark-surface table td { border-color: rgba(245, 240, 229, 0.15); }
.dark-surface details { border-color: rgba(245, 240, 229, 0.15); }
.dark-surface details[open] summary { border-bottom-color: rgba(245, 240, 229, 0.15); }
.paper-surface .hl { color: var(--color-brand); }
.paper-surface .badge { color: var(--color-brand); }
.paper-surface .btn-secondary { color: var(--text-body); border-color: var(--text-body); }
.paper-surface table th, .paper-surface table td { border-color: rgba(25, 21, 35, 0.1); }
.paper-surface details { border-color: rgba(25, 21, 35, 0.1); }
.paper-surface details[open] summary { border-bottom-color: rgba(25, 21, 35, 0.1); }

/* 眉标 */
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }

/* 标题高亮 */
.hl { font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0 1.25rem; height: 50px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--btn-primary-text); border: none; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn-secondary { background: transparent; border: 1px solid currentColor; }
.btn-secondary:hover { transform: translateY(-1px); }

/* 卡片 */
.card {
  background: var(--bg-paper); border: var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: var(--gap); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.flex-row > * { flex: 1 1 0; min-width: 0; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(25, 21, 35, 0.1); min-width: 0; overflow-wrap: break-word; word-break: break-word; }
th { font-weight: 700; }

/* FAQ */
details { margin-bottom: var(--gap); border-radius: var(--radius-card); overflow: hidden; }
summary {
  padding: 1rem; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.faq-content { padding: 1rem; line-height: 1.6; }

/* 步骤徽标 */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; background: var(--color-accent);
  color: var(--btn-primary-text); font-weight: 700; font-size: 0.9rem; margin-right: 0.75rem;
}

/* 流程条 */
.flow-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.flow-node { padding: 0.75rem 1.25rem; border-radius: var(--radius-card); background: rgba(25, 21, 35, 0.05); font-weight: 600; }
.dark-surface .flow-node { background: rgba(245, 240, 229, 0.08); }
.flow-arrow { color: var(--color-brand); font-size: 1.25rem; }
.dark-surface .flow-arrow { color: var(--color-accent); }

/* SVG 响应式与动效 */
.svg-responsive { width: 100%; height: auto; display: block; }
.svg-responsive svg { width: 100%; height: auto; display: block; }
.svg-transform-center { transform-box: fill-box; transform-origin: center; }

@keyframes flowDot {
  0%, 100% { transform: translate(0, 0); opacity: 0.4; }
  25% { transform: translate(12px, -18px); opacity: 1; }
  50% { transform: translate(24px, 0); opacity: 0.6; }
  75% { transform: translate(12px, 18px); opacity: 0.9; }
}
@keyframes floatPanel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes breatheDots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.dot-flow { animation: flowDot 6s ease-in-out infinite; }
.panel-float { animation: floatPanel 8s ease-in-out infinite; }
.input-breathe { animation: breatheDots 5s ease-in-out infinite; }
.line-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .dot-flow, .panel-float, .input-breathe, .line-draw { animation: none !important; }
}

/* 页头页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(245, 240, 229, 0.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(25, 21, 35, 0.08); }
.dark-surface .site-header { background: rgba(20, 14, 37, 0.9); border-bottom-color: rgba(245, 240, 229, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-brand); }
.dark-surface .nav-links a:hover, .dark-surface .nav-links a[aria-current="page"] { color: var(--color-accent); }
.site-footer { padding: var(--section-y) 0; border-top: 1px solid rgba(25, 21, 35, 0.1); margin-top: var(--section-y); }
.dark-surface .site-footer { border-top-color: rgba(245, 240, 229, 0.1); }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-copy { font-size: 0.85rem; opacity: 0.8; }

/* 新闻卡片 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; }
.news-date { font-size: 0.8rem; opacity: 0.7; margin-bottom: 0.5rem; }
.news-title { font-weight: 700; margin-bottom: 0.5rem; }
.news-excerpt { font-size: 0.95rem; opacity: 0.9; line-height: 1.6; }

/* 响应式微调 */
@media (max-width: 768px) {
  .header-inner { flex-direction: row; }
  .nav-links { gap: 1rem; }
  .flow-bar { flex-direction: column; align-items: flex-start; }
  .flow-arrow { transform: rotate(90deg); margin: 0.5rem 0; }
}
