:root {
  /* 配色 */
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  /* 圆角与阴影 */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  /* 节奏与密度 */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-tight: 1.15;
  --lh-body: 1.75;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--lh-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding: var(--section-y) 0; }
.divider { border-top: 1px solid rgba(25, 21, 35, 0.1); margin: var(--section-y) 0; }

/* 面色覆盖规则 */
.dark-face { background-color: var(--color-dark); color: var(--color-paper); }
.dark-face h1, .dark-face h2, .dark-face h3, .dark-face p, .dark-face li, .dark-face td, .dark-face th { color: var(--color-paper); }
.dark-face .hl { color: var(--color-accent); }
.dark-face .badge { color: var(--color-accent); }
.dark-face a:not(.btn) { color: var(--color-accent); }
.dark-face .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }

.paper-card { background-color: var(--color-paper); color: var(--color-text); border-radius: var(--radius-card); padding: 1.5rem; box-shadow: var(--card-shadow); }
.paper-card h3, .paper-card p, .paper-card li { color: var(--color-text); }
.paper-card .hl { color: var(--color-brand); }

/* 标题与眉标 */
h1, h2, h3 { font-weight: 500; line-height: var(--lh-tight); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.5rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.5rem; }
.subtitle { font-size: clamp(1rem, 1.5vw, 1.25rem); opacity: 0.9; margin-bottom: 1.5rem; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.hl { color: var(--color-brand); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 1.5rem; height: 52px; font-size: 1rem; font-weight: 600; border-radius: var(--radius-btn); text-decoration: none; transition: transform 0.2s ease, opacity 0.2s ease; cursor: pointer; border: none; }
.btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* 布局网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.row.reverse { flex-direction: row-reverse; }
@media (max-width: 768px) { .row.reverse { flex-direction: column; } }

/* 视觉面板 */
.visual-panel { background-color: var(--color-dark); border-radius: var(--radius-card); padding: 1.5rem; position: relative; overflow: hidden; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; }
.dark-face .visual-panel { background-color: rgba(255, 255, 255, 0.05); }
.visual-panel svg { width: 100%; height: 100%; display: block; }

/* 卡片与新闻 */
.card { background: #fff; border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: 1.5rem; border: var(--card-border); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.news-card time { display: block; font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.5rem; }
.news-card p { font-size: 0.95rem; opacity: 0.85; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; table-layout: fixed; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(25, 21, 35, 0.1); overflow-wrap: break-word; word-break: break-word; }
th { font-weight: 600; }

/* FAQ */
details { margin-bottom: 1rem; border-bottom: 1px solid rgba(25, 21, 35, 0.1); padding-bottom: 1rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-left: 1.5rem; }
summary::before { content: '+'; position: absolute; left: 0; top: 0; color: var(--color-brand); }
details[open] summary::before { content: '-'; }
details p { margin-top: 0.5rem; opacity: 0.9; }

/* 时间轴与步骤 */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--color-brand); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.55rem; top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--color-brand); }
.step-num { font-size: 2rem; font-weight: 700; color: var(--color-accent); line-height: 1; margin-bottom: 0.25rem; }

/* 页头页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(244, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(25, 21, 35, 0.05); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
nav a { margin-left: 1.5rem; text-decoration: none; font-weight: 500; color: var(--color-text); transition: color 0.2s; }
nav a:hover { color: var(--color-brand); }
nav a[aria-current="page"] { color: var(--color-brand); }
footer { padding: 2rem 0; border-top: 1px solid rgba(25, 21, 35, 0.1); margin-top: var(--section-y); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links a { margin-right: 1rem; text-decoration: none; color: var(--color-text); font-size: 0.9rem; }

/* 正文限制宽度 */
.max-w-prose { max-width: 38em; margin: 0 auto; }

/* SVG 动效基础 */
.svg-anim { width: 100%; height: auto; }
.draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 8s ease-in-out infinite; }
.float { animation: floatAnim 7s ease-in-out infinite; }
.pulse-dot { animation: pulseDot 4s ease-in-out infinite; }
.flow-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 6s linear infinite; }
.transform-box-fill { transform-box: fill-box; transform-origin: center; }

@keyframes drawLine { 0% { stroke-dashoffset: 1; } 20% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes floatAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
@keyframes flowDash { 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; scroll-behavior: auto !important; }
}

a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
ul { padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }
