:root {
  /* 色板 */
  --deep-bg: #251943;
  --paper-bg: #DBD4ED;
  --text-color: #191523;
  --brand-color: #5214EB;
  --accent-color: #ED6E89;
  --rgb-text: 25, 21, 35;

  /* 设计 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(var(--rgb-text), 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --line-h: 1.55;
  --content-max: 1120px;
  --sidebar-w: 280px;

  /* 字体 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  line-height: var(--line-h);
  color: var(--text-color);
  background: var(--paper-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 布局：左侧吸顶品牌栏 + 右侧长页 */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--deep-bg);
  color: var(--paper-bg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a[aria-current="page"] { opacity: 1; color: var(--accent-color); }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* 区块与分节 */
.section {
  padding-block: var(--section-y);
  border-bottom: 1px solid rgba(var(--rgb-text), 0.15);
}
.section:last-child { border-bottom: none; }

.deep-surface {
  background: var(--deep-bg);
  color: var(--paper-bg);
}
.deep-surface .hl { color: var(--accent-color); }
.deep-surface .link { color: var(--accent-color); }

.paper-surface {
  background: var(--paper-bg);
  color: var(--text-color);
}
.paper-surface .hl { color: var(--brand-color); }
.paper-surface .link { color: var(--brand-color); }

/* 标题与眉标 */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.deep-surface .eyebrow { color: var(--accent-color); }
.paper-surface .eyebrow { color: var(--brand-color); }

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p { margin-bottom: 1rem; max-width: 38em; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding-inline: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--accent-color);
  color: var(--deep-bg);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-primary:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }

.btn-outline {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
}
.deep-surface .btn-outline { color: var(--paper-bg); border-color: var(--paper-bg); }
.btn-outline:hover { transform: translateY(-2px); opacity: 0.85; }

/* 图标 */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* 表格 */
.data-table {
  display: block;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(var(--rgb-text), 0.1);
}
.data-table th { font-weight: 600; }
.deep-surface .data-table th, .deep-surface .data-table td { border-bottom-color: rgba(219, 212, 237, 0.15); }

/* 卡片与面板 */
.card {
  background: var(--paper-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(var(--rgb-text), 0.35); }
.deep-surface .card { background: var(--paper-bg); color: var(--text-color); }
.deep-surface .card .hl { color: var(--brand-color); }

.panel {
  background: var(--deep-bg);
  padding: 2rem;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* 列表与步骤 */
.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.step-item {
  counter-increment: step;
  padding: 1.25rem;
  background: var(--paper-bg);
  position: relative;
}
.step-item::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}
.deep-surface .step-item { background: var(--paper-bg); color: var(--text-color); }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
  margin-bottom: var(--section-y);
}
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-color);
  display: block;
  margin-bottom: 0.5rem;
}
.deep-surface .news-card time { color: var(--accent-color); }

/* FAQ */
.faq-list details {
  border-bottom: 1px solid rgba(var(--rgb-text), 0.15);
  padding: 1rem 0;
}
.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before {
  content: "";
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235214EB' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center;
}
.deep-surface .faq-list summary::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ED6E89' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center;
}
.faq-list p { margin-top: 0.75rem; font-size: 0.95rem; }

/* 提示框 */
.callout {
  border-left: 4px solid var(--brand-color);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(var(--rgb-text), 0.03);
}
.deep-surface .callout { border-color: var(--accent-color); background: rgba(219, 212, 237, 0.08); }

/* SVG 动效 */
.svg-anim { width: 100%; height: auto; }
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.anim-draw { animation: drawDash 4s ease-in-out infinite alternate; }
.anim-float { animation: floatAnim 6s ease-in-out infinite alternate; }
.anim-breathe { animation: breatheAnim 3s ease-in-out infinite; }
.anim-slide { animation: slideInAnim 5s ease-in-out infinite alternate; }
.anim-twinkle { animation: twinkleAnim 4s ease-in-out infinite alternate; }

@keyframes drawDash {
  to { stroke-dashoffset: -1; }
}
@keyframes floatAnim {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
@keyframes breatheAnim {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideInAnim {
  from { transform: translateX(0); opacity: 0.8; }
  to { transform: translateX(6px); opacity: 1; }
}
@keyframes twinkleAnim {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.9; }
}

/* 响应式 */
@media (max-width: 900px) {
  .layout-wrapper { flex-direction: column; }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    z-index: 200;
  }
  .sidebar-nav { display: flex; gap: 1rem; }
  .sidebar-nav a { font-size: 0.85rem; padding: 0.25rem 0; }
  .main-content { margin-left: 0; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-text { order: unset; }
  .feature-row.reverse .feature-visual { order: unset; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
