:root {
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --color-line: rgba(0,0,0,0.08);
  --color-line-dark: rgba(255,255,255,0.12);

  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --header-h: 64px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }

/* 背景主题与变量覆盖 */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
  --fg-default: var(--color-paper);
  --fg-accent: var(--color-accent);
  --fg-brand: var(--color-accent);
  --line-color: var(--color-line-dark);
}
.bg-dark .hl, .bg-dark .badge, .bg-dark a:not(.btn) { color: var(--fg-accent); }
.bg-dark .btn-secondary { border-color: var(--fg-default); color: var(--fg-default); }
.bg-dark .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.bg-dark .card {
  background-color: var(--color-paper);
  color: var(--color-text);
  --fg-default: var(--color-text);
  --fg-accent: var(--color-brand);
  --fg-brand: var(--color-brand);
}
.bg-dark .card .hl, .bg-dark .card .badge, .bg-dark .card a:not(.btn) { color: var(--fg-brand); }

.bg-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
  --fg-default: var(--color-text);
  --fg-accent: var(--color-brand);
  --fg-brand: var(--color-brand);
  --line-color: var(--color-line);
}
.bg-paper .hl, .bg-paper .badge, .bg-paper a:not(.btn) { color: var(--fg-brand); }

/* 排版 */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; color: var(--fg-default); }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: var(--gap); text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: calc(var(--gap) * 0.8); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 0.8em; }
p { margin-bottom: 1em; max-width: 38em; color: var(--fg-default); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5em; color: var(--fg-accent); }
.lead { font-size: 1.125rem; line-height: 1.6; margin-bottom: 1.5em; opacity: 0.9; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0 1.2em; height: 52px; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
  border: none; outline: none;
}
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); background-color: #c95de0; }
.btn-secondary { background: transparent; border: 1px solid var(--fg-default); color: var(--fg-default); }
.btn-secondary:hover { background: rgba(128,128,128,0.1); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* 导航与页脚 */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid var(--color-line); height: var(--header-h); display: flex; align-items: center; }
.bg-dark header { background: var(--color-dark); border-color: var(--color-line-dark); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: var(--fg-default); font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.5em; list-style: none; }
nav a { text-decoration: none; color: var(--fg-default); font-weight: 500; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--fg-brand); }
nav a[aria-current="page"] { font-weight: 700; }

footer { padding: var(--section-y) 0; border-top: 1px solid var(--line-color); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-col h4 { margin-bottom: 0.8em; font-size: 0.9rem; font-weight: 700; color: var(--fg-default); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5em; }
.footer-col a { text-decoration: none; color: var(--fg-default); opacity: 0.8; font-size: 0.9rem; }
.footer-col a:hover { opacity: 1; color: var(--fg-brand); }
.copyright { text-align: center; margin-top: var(--gap); font-size: 0.85rem; opacity: 0.7; color: var(--fg-default); }
footer .logo { margin-bottom: 1em; }

/* 布局辅助 */
section { padding: var(--section-y) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.alt-row:nth-child(even) .grid-2 { direction: rtl; }
.alt-row:nth-child(even) .grid-2 > * { direction: ltr; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* 时间线 */
.timeline { position: relative; padding-left: 2em; border-left: 2px solid var(--fg-brand); }
.timeline-item { position: relative; margin-bottom: 2em; }
.timeline-item::before { content: attr(data-step); position: absolute; left: -2.6em; top: 0; width: 2em; height: 2em; display: flex; align-items: center; justify-content: center; background: var(--fg-brand); color: #fff; font-weight: 700; font-size: 0.9rem; }

/* 卡片与新闻 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.card { border: var(--card-border); box-shadow: var(--card-shadow); padding: 1.5em; background: var(--color-paper); color: var(--color-text); }
.card time { display: block; font-size: 0.8rem; opacity: 0.7; margin-bottom: 0.5em; }
.card h4 { margin-bottom: 0.5em; font-size: 1.1rem; color: var(--color-text); }
.card p { font-size: 0.95rem; opacity: 0.85; color: var(--color-text); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; table-layout: fixed; }
th, td { padding: 0.8em 1em; text-align: left; border-bottom: 1px solid var(--line-color); overflow-wrap: break-word; word-break: break-word; }
th { font-weight: 600; color: var(--fg-default); }
td { color: var(--fg-default); }
td a { color: var(--fg-brand); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* FAQ */
details { margin-bottom: 1em; border-bottom: 1px solid var(--line-color); padding-bottom: 1em; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--fg-default); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2em; font-weight: 400; color: var(--fg-brand); }
details[open] summary::after { content: "-"; }
details p { margin-top: 0.8em; opacity: 0.9; color: var(--fg-default); }

/* SVG 动效系统 */
.svg-anim { width: 100%; height: auto; overflow: visible; transform-box: fill-box; transform-origin: center; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawStroke 4s ease-in-out infinite alternate; }
.float-slow { animation: floatSlow 6s ease-in-out infinite alternate; }
.slide-in { animation: slideIn 5s ease-in-out infinite alternate; }
.pulse-opacity { animation: pulseOpacity 3s ease-in-out infinite alternate; }
.flow-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 4s linear infinite; }

@keyframes drawStroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floatSlow { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@keyframes slideIn { from { transform: translateX(-10px); opacity: 0.8; } to { transform: translateX(0); opacity: 1; } }
@keyframes pulseOpacity { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes flowDash { from { stroke-dashoffset: 1; } to { 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; scroll-behavior: auto !important; }
  .draw-path, .float-slow, .slide-in, .pulse-opacity, .flow-line { animation: none !important; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .alt-row:nth-child(even) .grid-2 { direction: ltr; }
  nav ul { display: none; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}
