:root {
  /* 色板 */
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --color-light-paper: #EAE9EE;
  --color-dark-card: #231B3A;
  --color-paper-card: #FFFFFF;

  /* 结构 Token */
  --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: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.75;
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

/* 基础排版 */
p { max-width: 38em; margin-bottom: 1em; }
a { color: var(--color-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* 区块容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.paper-section { background: var(--color-paper); color: var(--color-text); }
.light-paper-section { background: var(--color-light-paper); color: var(--color-text); }
.dark-section { background: var(--color-dark); color: var(--color-paper); }
.dark-section a { color: var(--color-accent); }

/* 眉标与标题 */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 12px;
}
.paper-section .eyebrow { color: var(--color-brand); }
.light-paper-section .eyebrow { color: var(--color-brand); }
.dark-section .eyebrow { color: var(--color-accent); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
  text-wrap: balance; margin-bottom: 1.5em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.25;
  margin-bottom: 1.2em; text-wrap: balance;
}
h3 {
  font-size: 1.25rem; font-weight: 700; line-height: 1.3;
  margin-bottom: 0.8em;
}
.hl { color: var(--color-brand); }
.dark-section .hl { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 24px; height: 52px; font-size: 1rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: none; transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn-primary {
  background: var(--color-accent); color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-secondary {
  background: transparent; border: 1px solid var(--color-text); color: var(--color-text);
}
.dark-section .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); background: rgba(128,128,128,0.1); }
.dark-section .btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* 胶囊与特性列表 */
.capsule-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2em; }
.capsule {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: var(--color-light-paper); color: var(--color-text);
  font-size: 0.9rem; font-weight: 500;
}
.dark-section .capsule { background: var(--color-dark-card); color: var(--color-paper); }
.capsule svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* 网格与卡片 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.card {
  background: var(--color-paper-card); padding: var(--gap);
  border: var(--card-border); box-shadow: var(--card-shadow);
}
.dark-section .card { background: var(--color-dark-card); }
.light-paper-section .card { background: var(--color-paper); }
.card-grid-item { background: var(--color-light-paper); padding: var(--gap); }
.dark-section .card-grid-item { background: var(--color-dark); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 1em 0; }
table { width: 100%; border-collapse: collapse; min-width: 320px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(128,128,128,0.2); }
th { font-weight: 700; }
.dark-section th, .dark-section td { border-bottom-color: rgba(255,255,255,0.15); }

/* FAQ */
details { margin-bottom: 16px; border-bottom: 1px solid rgba(128,128,128,0.2); padding-bottom: 16px; }
.dark-section details { border-bottom-color: rgba(255,255,255,0.15); }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-left: 24px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 0; font-weight: 700; }
details[open] summary::before { content: "-"; }
details p { margin-top: 8px; }

/* 新闻卡片 */
.news-card { background: var(--color-paper-card); padding: var(--gap); display: flex; flex-direction: column; }
.dark-section .news-card { background: var(--color-dark-card); }
.news-meta { font-size: 0.85rem; opacity: 0.8; margin-bottom: 8px; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 0.6em; }
.news-card p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 0; }

/* 页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 243, 247, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(128,128,128,0.15);
}
.dark-section .site-header { background: rgba(25, 16, 45, 0.95); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; list-style: none; }
nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-section nav a[aria-current="page"] { color: var(--color-accent); }
.site-footer { padding: 48px 0; border-top: 1px solid rgba(128,128,128,0.15); }
.dark-section .site-footer { border-top-color: rgba(255,255,255,0.1); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; gap: 16px; list-style: none; }
.footer-links a { text-decoration: none; opacity: 0.8; }

/* SVG 容器 */
.svg-visual { width: 100%; height: auto; max-width: 100%; display: block; }
.svg-panel { background: var(--color-dark-card); padding: 24px; }
.dark-section .svg-panel { background: rgba(255,255,255,0.05); }

/* SVG 动效类 */
.anim-orbit { animation: orbit-breathe 8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.anim-orbit-fast { animation: orbit-breathe 5s ease-in-out infinite reverse; transform-origin: center; transform-box: fill-box; }
.anim-float { animation: gentle-float 6s ease-in-out infinite; }
.anim-draw-line { animation: draw-line 4s ease forwards; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-bubble { animation: bubble-pop 4s ease-in-out infinite; }
.anim-pulse-dot { animation: pulse-dot 3s ease-in-out infinite; }

@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes bubble-pop {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    animation: none !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 16px 0; gap: 12px; }
  nav ul { gap: 16px; }
}
