:root {
  /* 色板 */
  --color-bg-dark: #140E25;
  --color-bg-paper: #FCFCFD;
  --color-text-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #6EEDD2;

  /* 取色变量 - 纸面模式 */
  --text-main: var(--color-text-body);
  --text-muted: #5A5668;
  --border-color: #E8E6F0;
  --bg-card: #FFFFFF;
  --highlight: var(--color-brand);

  /* 取色变量 - 深色面模式 */
  .dark-surface {
    --text-main: var(--color-bg-paper);
    --text-muted: #B8B4C8;
    --border-color: #2A2440;
    --bg-card: #1E1832;
    --highlight: var(--color-accent);
  }

  /* 设计 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  
  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Consolas", monospace;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--color-bg-paper);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

section {
  padding: var(--section-y) 0;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.dark-surface .site-header {
  background-color: rgba(20, 14, 37, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text-main);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: currentColor;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background-color: rgba(0,0,0,0.05);
}

.dark-surface .btn-secondary {
  color: var(--color-bg-paper);
  border-color: var(--color-bg-paper);
}

.dark-surface .btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 眉标 */
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--highlight);
  margin-bottom: 16px;
}

/* 标题 */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 32px;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.highlight {
  color: var(--highlight);
}

/* 段落 */
p {
  margin-bottom: 1.5em;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 38em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  line-height: 1.6;
}

.dark-surface .hero-subtitle {
  color: #B8B4C8;
}

/* 卡片 */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

/* 网格 */
.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);
}

/* 表格 */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: rgba(0,0,0,0.02);
  font-weight: 600;
  color: var(--text-main);
}

td {
  color: var(--text-muted);
}

.dark-surface th {
  background-color: rgba(255,255,255,0.05);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--highlight);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 12px;
  margin-bottom: 24px;
  color: var(--text-muted);
}

/* 步骤编号 */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 6px;
  margin-right: 12px;
}

/* 页脚 */
.site-footer {
  background-color: var(--color-bg-dark);
  color: #B8B4C8;
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: var(--color-bg-paper);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  color: #B8B4C8;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid #2A2440;
  padding-top: 32px;
  text-align: center;
  font-size: 0.9rem;
}

/* SVG 动效关键帧 */
@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.svg-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-stroke 4s ease-in-out infinite;
}

.svg-float {
  animation: float-gentle 6s ease-in-out infinite;
}

.svg-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin-slow 20s linear infinite;
}

.svg-pulse {
  animation: pulse-opacity 4s ease-in-out infinite;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #191523 !important;
    -webkit-text-fill-color: #191523 !important;
  }
}
