:root {
  --bg-primary: #161310;
  --bg-secondary: #1e1a16;
  --bg-card: #231f1a;
  --bg-elevated: #2c2620;
  --text-primary: #e6dfd5;
  --text-secondary: #a89e91;
  --text-muted: #7a7268;
  --accent-primary: #c9956b;
  --accent-hover: #e0b088;
  --accent-glow: rgba(201, 149, 107, 0.25);
  --border-subtle: rgba(200, 180, 150, 0.12);
  --border-active: rgba(201, 149, 107, 0.4);
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-xxl: 8rem;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.8vw, 3rem); font-weight: 600; margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--text-secondary); max-width: 75ch; overflow-wrap: break-word; word-break: break-word; }
small { font-size: 0.85rem; color: var(--text-muted); overflow-wrap: break-word; }

a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease, transform 0.2s ease; overflow-wrap: break-word; }
a:hover, a:focus-visible { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Components */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-active);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #161310;
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background: rgba(201, 149, 107, 0.1);
}

.section-desc {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
  overflow-wrap: break-word;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  overflow-wrap: break-word;
  word-break: break-word;
}

th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* FAQ */
details {
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-sm);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details > div {
  padding-top: var(--space-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Header & Footer */
header {
  padding: var(--space-sm) 0;
  background: rgba(22, 19, 16, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
}

nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

footer {
  padding: var(--space-lg) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-xs);
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.copyright {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow-wrap: break-word;
}

/* SVG & Animations */
svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.wave-path {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.anim-wave-1 { animation: waveFloat1 6s ease-in-out infinite alternate; }
.anim-wave-2 { animation: waveFloat2 7.5s ease-in-out infinite alternate-reverse; }
.anim-wave-3 { animation: waveFloat3 9s ease-in-out infinite alternate; }

@keyframes waveFloat1 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}
@keyframes waveFloat2 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-18px); }
}
@keyframes waveFloat3 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

/* Draw effect */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 3.5s ease forwards;
}

@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

svg circle, svg rect, svg g {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Utility */
.text-center { text-align: center; }
.mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-xl) 0;
}

/* 窄屏响应式与防溢出修复 */
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  .step-list li {
    padding-left: 2.5rem;
    min-height: auto;
  }
  article, main, section {
    overflow-x: hidden;
  }
}

