:root {
  /* 色板 */
  --color-dark: #121531;
  --color-paper: #E8E9EA;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #ED7D6E;
  
  /* 结构 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  
  /* 排版 */
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

/* 容器与布局 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-block: var(--section-y); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* 头部与导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232, 233, 234, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 23, 35, 0.1);
  transition: background 0.3s;
}
.site-header.scrolled { background: rgba(232, 233, 234, 0.95); border-bottom-color: var(--color-text); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--color-text); font-weight: 500; padding: 8px 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-brand); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-brand); }
.header-actions { display: flex; align-items: center; gap: 16px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(237, 125, 110, 0.25); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.05); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.icon-btn { width: 20px; height: 20px; flex-shrink: 0; }

/* 卡片与面板 */
.card {
  border: var(--card-border); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); padding: var(--gap);
  background: var(--color-paper); color: var(--color-text);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.visual-panel {
  background: var(--color-dark); border-radius: var(--radius-card);
  padding: var(--gap); aspect-ratio: 4/3; position: relative; overflow: hidden;
}
.visual-panel svg { width: 100%; height: auto; display: block; }

/* 文本样式 */
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px; color: var(--color-brand);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.15; letter-spacing: 0.02em; margin: 0 0 24px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin: 0 0 32px; }
h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 16px; }
p { margin: 0 0 16px; max-width: 38em; }
.hl { font-weight: 800; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table th, .data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid currentColor;
  white-space: normal;
  word-break: break-word;
}
.data-table th { font-weight: 700; background: rgba(0,0,0,0.03); }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { border: var(--card-border); border-radius: var(--radius-card); padding: 20px; background: var(--color-paper); }
.faq-item summary { cursor: pointer; font-weight: 600; 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: 400; color: var(--color-brand); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 16px; color: var(--color-text); }

/* 页脚 */
.site-footer { border-top: 1px solid rgba(21, 23, 35, 0.1); padding: 48px 0; margin-top: 64px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--color-text); text-decoration: none; }
.footer-links a:hover { color: var(--color-brand); }
.footer-copy { margin-top: 32px; font-size: 0.9rem; opacity: 0.8; }

/* 深色面覆盖规则 */
.bg-dark { background-color: var(--color-dark); color: var(--color-paper); }
.bg-dark .badge { color: var(--color-accent); }
.bg-dark .hl { color: var(--color-accent); }
.bg-dark a:not(.btn) { color: var(--color-accent); }
.bg-dark .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.bg-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.bg-dark .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.bg-dark .data-table th, .bg-dark .data-table td { border-color: rgba(232, 233, 234, 0.2); }
.bg-dark .data-table th { background: rgba(255,255,255,0.05); }

.card-light-on-dark {
  background: var(--color-paper); color: var(--color-text);
  border-color: var(--color-text); box-shadow: var(--card-shadow);
}
.card-light-on-dark .badge { color: var(--color-brand); }
.card-light-on-dark .hl { color: var(--color-brand); }
.card-light-on-dark a:not(.btn) { color: var(--color-brand); }
.card-light-on-dark .data-table th, .card-light-on-dark .data-table td { border-color: rgba(21, 23, 35, 0.15); }
.card-light-on-dark .data-table th { background: rgba(0,0,0,0.03); }

/* SVG 动效基础 */
.svg-anim { width: 100%; height: auto; display: block; }
.line-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-flow { animation: drawFlow 6s ease-in-out infinite alternate; }
.anim-float { animation: softFloat 5s ease-in-out infinite; }
.anim-breathe { animation: breathPulse 3s ease-in-out infinite; }
.anim-slide { animation: slideIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.transform-center { transform-box: fill-box; transform-origin: center; }

@keyframes drawFlow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-flow, .anim-float, .anim-breathe, .anim-slide { animation: none !important; }
  .card:hover, .btn:hover { transform: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .visual-panel { order: -1; }
}
