/* === 设计 Token 与变量 === */
:root {
  --color-dark: #2D1438;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #6EEDA8;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid rgba(31, 21, 35, 0.16);
  --card-shadow: none;
  
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器与网格 === */
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }
.grid-2 { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-3 { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* === 上下文取色 === */
.face-dark { background: var(--color-dark); color: var(--color-paper); }
.face-dark h1, .face-dark h2, .face-dark h3, .face-dark p, .face-dark li { color: var(--color-paper); }
.face-dark .hl { color: var(--color-accent); }
.face-dark .badge { color: var(--color-accent); }
.face-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.face-dark .card { background: var(--color-paper); color: var(--color-text); border-color: rgba(31, 21, 35, 0.16); }
.face-dark .card h3, .face-dark .card p { color: var(--color-text); }
.face-dark .card .hl { color: var(--color-brand); }
.face-dark .card .badge { color: var(--color-brand); }

/* === 排版层级 === */
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; line-height: 1.25; margin-block: var(--gap); text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-block: 1rem; }
p { margin-bottom: 1em; max-width: 38em; }
.text-muted { opacity: 0.85; }

.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; color: var(--color-brand); margin-bottom: 0.5em; text-transform: uppercase; }
.hl { color: var(--color-brand); font-weight: 600; }

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.75em 1.5em; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn); text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary { background: 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); opacity: 0.9; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* === 面板与卡片 === */
.panel { background: var(--color-dark); border-radius: var(--radius-card); padding: var(--gap); position: relative; overflow: hidden; }
.card { background: var(--color-paper); border: var(--card-border); border-radius: var(--radius-card); padding: var(--gap); transition: transform 0.2s ease; }
.card:hover { transform: translateY(-4px); }
.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.card-date { font-size: 0.85rem; color: var(--color-text); opacity: 0.7; }

/* === 时间轴 === */
.timeline { position: relative; padding-left: 2.5rem; border-left: 2px solid var(--color-brand); }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-marker { position: absolute; left: -2.95rem; top: 0.25rem; width: 1rem; height: 1rem; background: var(--color-brand); border-radius: 50%; border: 3px solid var(--color-paper); box-sizing: border-box; }
.timeline-time { font-size: 0.85rem; font-weight: 700; color: var(--color-brand); margin-bottom: 0.25rem; }

/* === 表格 === */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; margin-block: 1rem; min-width: 500px; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--card-border); text-align: left; vertical-align: top; }
th { font-weight: 600; width: 35%; }
td { word-break: break-word; }
tr:last-child td { border-bottom: none; }

/* === FAQ === */
details { margin-bottom: 1rem; border: var(--card-border); border-radius: var(--radius-card); background: var(--color-paper); overflow: hidden; }
summary { cursor: pointer; font-weight: 600; padding: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::-webkit-details-marker { display: none; }
details[open] summary { border-bottom: 1px solid var(--card-border); }
details p { padding: 1rem; padding-top: 0; margin-bottom: 0; }
details .chevron { width: 16px; height: 16px; transition: transform 0.2s ease; }
details[open] .chevron { transform: rotate(180deg); }

/* === 导航与页脚 === */
.header { position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 247, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--card-border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; padding: 0.5rem 0; position: relative; }
.nav-links a:hover { color: var(--color-brand); }
.nav-links a[aria-current="page"] { color: var(--color-brand); }
.footer { border-top: 1px solid var(--card-border); padding: var(--gap) 0; margin-top: var(--section-y); }
.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.7; }

/* === SVG 动效系统 === */
.svg-visual { width: 100%; height: auto; display: block; }
/* 同心轨道呼吸 */
@keyframes orbitBreathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 0.9; }
}
.anim-orbit { transform-origin: center; transform-box: fill-box; animation: orbitBreathe 8s ease-in-out infinite; }
/* 描边流动 */
@keyframes dashFlow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.anim-flow { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashFlow 4s ease infinite alternate; }
/* 轻微漂浮 */
@keyframes floatGentle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.anim-float { animation: floatGentle 6s ease-in-out infinite; }
/* 滑入显现 */
@keyframes slideUpFade { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.anim-slide { animation: slideUpFade 0.8s ease forwards; }

/* === 减少动态效果支持 === */
@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;
  }
  .anim-float, .anim-orbit, .anim-flow, .anim-slide { animation: none !important; }
}
