/* === 设计变量与基础重置 === */
:root {
  --color-bg: #fafbfc;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --color-border: #e5e7eb;
  --color-primary: #e75a43;
  --color-primary-hover: #d14732;
  --color-accent: #ffc2ad;
  --color-success: #10b981;
  --gradient-warm: linear-gradient(135deg, #e75a43 0%, #ffb899 60%, #ffe4d8 100%);
  --gradient-subtle: radial-gradient(circle at 20% 20%, rgba(231, 90, 67, 0.08) 0%, transparent 50%),
                     radial-gradient(circle at 80% 80%, rgba(255, 184, 153, 0.12) 0%, transparent 50%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.09);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-section: clamp(3.5rem, 7vw, 7rem);
  --container-max: 1200px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* === 排版系统 === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-container);
}
.display-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--color-text);
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}
.text-secondary { color: var(--color-text-secondary); }
.text-body { font-size: clamp(1rem, 1.1vw, 1.125rem); line-height: 1.7; }
.text-lead { font-size: clamp(1.1rem, 1.3vw, 1.25rem); line-height: 1.6; color: var(--color-text-secondary); }

/* === 页头与导航 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand-link { display: flex; align-items: center; gap: var(--space-sm); }
.brand-img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.01em; }
.main-nav ul { display: flex; gap: var(--space-xl); }
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}
.main-nav a:hover, .main-nav [aria-current="page"] { color: var(--color-primary); }
.main-nav [aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-primary); border-radius: 2px;
}
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.icon-svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* === 通用组件 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--gradient-warm);
  color: #fff;
  box-shadow: 0 4px 12px rgba(231, 90, 67, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(231, 90, 67, 0.45); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.section { padding: var(--space-section) 0; }
.bg-soft { background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%); }
.bg-gradient-hero { background: var(--gradient-subtle); position: relative; overflow: hidden; }

/* === 表格样式 === */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: 0.95rem; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.data-table th { background: #f9fafb; font-weight: 600; color: var(--color-text-secondary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fcfcfd; }

/* === FAQ (Details/Summary) === */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: border-color 0.2s; }
.faq-item[open] { border-color: var(--color-primary); }
.faq-summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "+"; font-size: 1.2rem; font-weight: 500; color: var(--color-text-secondary); transition: transform 0.2s;
}
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-content { padding: 0 1.25rem 1.25rem; font-size: 0.95rem; line-height: 1.65; color: var(--color-text-secondary); }

/* === SVG 动效关键帧 === */
.star-node { animation: twinkle var(--duration, 4s) ease-in-out infinite alternate; }
.line-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-connect { animation: drawLine 6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes twinkle {
  0% { opacity: 0.25; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.05); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .star-node, .line-path, .anim-connect { animation: none !important; opacity: 1 !important; }
}

/* === 响应式适配 === */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .display-title { font-size: 2rem; }
}
