:root {
  /* 品牌色板 */
  --color-dark: #141838;
  --color-paper: #FCFCFD;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  /* 结构 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 上下文取色变量覆写 */
.dark-surface { background: var(--color-dark); color: var(--color-paper); }
.dark-surface a { color: #ffffff; }
.dark-surface .hl { color: var(--color-accent); }
.dark-surface .eyebrow { color: var(--color-accent); }
.paper-surface { background: var(--color-paper); color: var(--color-text); }
.paper-surface a { color: var(--color-brand); }
.paper-surface .hl { color: var(--color-brand); }
.paper-surface .eyebrow { color: var(--color-brand); }

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.75;
  background: var(--color-paper);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; transition: color .2s ease, background .2s ease; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }

/* 标题系统 */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 0.6em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; }
p { margin-bottom: 1em; max-width: 38em; }
ul, ol { margin-bottom: 1em; padding-left: 1.5em; }
li { margin-bottom: 0.5em; }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }

/* 页头与导航 */
header { position: sticky; top: 0; z-index: 100; background: rgba(252, 252, 253, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(21, 23, 35, 0.06); }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gap); }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 1.5rem; }
nav a { font-weight: 500; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--color-brand); pointer-events: none; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: var(--radius-btn); font-weight: 600; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-1px); background: #5a9de0; }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.04); }
.hero .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.hero .btn-secondary:hover { background: rgba(252, 252, 255, 0.08); }

/* 卡片与网格 */
.card { background: rgba(21, 23, 35, 0.03); border-radius: var(--radius-card); padding: var(--gap); transition: background .2s ease; }
.hero .card { background: rgba(252, 252, 255, 0.05); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: 1em; min-width: 0; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(21, 23, 35, 0.08); max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
th { font-weight: 600; }

/* FAQ */
details { margin-bottom: 1em; border-bottom: 1px solid rgba(21, 23, 35, 0.08); padding-bottom: 1em; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: "+"; font-size: 1.2em; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }

/* 眉标与高亮 */
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5em; display: block; }
.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-accent); }

/* 资讯卡片 */
.news-card { background: var(--color-paper); padding: var(--gap); border-radius: var(--radius-card); }
.news-date { font-size: 0.85rem; color: #6b7280; margin-bottom: 0.5em; display: block; }

/* SVG 基础样式 */
svg { width: 100%; height: auto; }
.anim-float { animation: float 4s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide { animation: slide 5s ease-in-out infinite; }
.flow-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 6s linear infinite; }
.anim-dot { animation: dotMove 5s linear infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes slide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes flowDash { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes dotMove { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } }

/* 响应式与无障碍 */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-paper); flex-direction: column; padding: 1rem; border-bottom: 1px solid rgba(21,23,35,0.1); }
  nav.open { display: flex; }
  .hero .container { grid-template-columns: 1fr; }
  .magazine-layout { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-float, .anim-breathe, .anim-slide, .flow-line, .anim-dot { animation: none !important; }
}
