*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 配色层 */
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  
  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  
  --content-max: 1120px;
  
  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-paper);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

/* 容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-brand);
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 110, 192, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.dark-surface .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.btn-secondary:hover {
  background-color: rgba(31, 21, 35, 0.05);
}

.dark-surface .btn-secondary:hover {
  background-color: rgba(246, 243, 247, 0.1);
}

.btn:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

/* 眉标 */
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--color-brand);
}

.dark-surface .section-eyebrow {
  color: var(--color-accent);
}

/* 标题 */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: var(--gap);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-accent);
}

/* 文本排版 */
p {
  margin-bottom: 1.5em;
  max-width: 38em;
}

.text-balance {
  text-wrap: balance;
}

/* 区块通用 */
.section {
  padding: var(--section-y) 0;
}

.dark-surface {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.dark-surface p, .dark-surface li {
  color: var(--color-paper);
}

.dark-surface a {
  color: var(--color-accent);
}

/* 卡片与面板 */
.card {
  background-color: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(31, 21, 35, 0.35);
}

.panel {
  background-color: var(--color-dark);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
}

.dark-surface .data-table th, .dark-surface .data-table td {
  border-bottom-color: rgba(246, 243, 247, 0.1);
}

.data-table th {
  font-weight: 700;
  width: 40%;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
  padding: 24px 0;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  font-weight: 400;
  color: var(--color-brand);
}

.faq-item[open] summary::before {
  content: "-";
}

.faq-item p {
  margin-top: 16px;
  color: var(--color-text);
  max-width: 100%;
}

.dark-surface .faq-item {
  border-bottom-color: rgba(246, 243, 247, 0.1);
}

.dark-surface .faq-item p {
  color: var(--color-paper);
}

/* News Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.news-card {
  background-color: var(--color-paper);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-brand);
  font-weight: 600;
}

/* Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0;
}

.hero-facts {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 24px;
}

/* Feature Tabs (Pure CSS) */
.feature-tabs-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.feature-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 100px;
  min-width: 0;
}

.feature-nav label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-nav label:hover {
  background-color: rgba(31, 21, 35, 0.05);
}

.feature-nav input[type="radio"]:checked + label {
  border-left-color: var(--color-brand);
  background-color: rgba(31, 21, 35, 0.03);
  font-weight: 700;
}

.feature-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.feature-panel.active {
  display: block;
}

.feature-visual {
  background-color: var(--color-dark);
  padding: 24px;
  margin-bottom: 24px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Steps */
.steps-list {
  counter-reset: step;
  list-style: none;
}

.steps-list li {
  position: relative;
  padding-left: 64px;
  margin-bottom: 32px;
}

.steps-list li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* SVG Animation Classes */
@keyframes flowPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes breatheDots {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes slideInCard {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flowPath 4s linear infinite;
}

.float-node {
  animation: floatNode 6s ease-in-out infinite;
}

.breathe-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: breatheDots 3s ease-in-out infinite;
}

.slide-card {
  animation: slideInCard 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Reduced Motion */
@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-node, .breathe-dot, .slide-card {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid, .feature-tabs-wrapper {
    grid-template-columns: 1fr;
  }
  
  .feature-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .feature-nav label {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .feature-nav input[type="radio"]:checked + label {
    border-bottom-color: var(--color-brand);
  }
  
  .header-inner {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .nav-list {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Accessibility Focus */
:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
