:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg-panel: #0e111a;
  --bg-panel-alt: #141824;
  --border: rgba(255, 255, 255, 0.08);
  --muted: rgba(255, 255, 255, 0.65);
  --primary: #7c5dff;
  --primary-soft: rgba(124, 93, 255, 0.12);
  --accent: #4ad5ff;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% -10%, rgba(124, 93, 255, 0.3), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(74, 213, 255, 0.2), transparent 35%), var(--bg);
  color: #fff;
  font-family: var(--font);
  line-height: 1.6;
}

/* 站点头部导航（深色） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(14, 17, 26, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: min(1200px, 90vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.site-header__brand {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.site-header__links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header__links a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.site-header__links a:hover {
  color: #fff;
  border-color: var(--border);
}

img {
  max-width: 100%;
  display: block;
  border-radius: 16px;
}

main {
  width: min(1200px, 90vw);
  margin: 0 auto 96px auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  /* 与下方 main 保持同一容器宽度 */
  width: min(1200px, 90vw);
  margin: 0 auto;
  padding: 96px 0 64px;
  min-height: 420px; /* 固定顶部区最小高度，避免因字数变化而上下跳动 */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
}

.hero__content {
  flex: 1 1 320px;
  max-width: 520px;
  min-height: 240px; /* 保持文字区域不随字数变矮 */
}

.hero__eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.83rem;
}

.hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.2;
}

.hero__lede {
  color: var(--muted);
}

.hero__cta {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pill {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pill--primary {
  background: linear-gradient(120deg, var(--primary), #a96afe);
}

.pill--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.pill:hover {
  transform: translateY(-2px);
}

.hero__datapoints {
  flex: 1 1 280px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* 顶部区域占位图，横向铺满红框位置 */
.hero-placeholder {
  grid-column: 1 / -1;
  min-height: 180px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.hero-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* 视频占位与图片同样的填充方式 */
.hero-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.hero-card {
  padding: 20px;
  background: var(--bg-panel);
  border-radius: 20px;
  border: 1px solid var(--border);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card__label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-card__value {
  font-size: 1.8rem;
}

.hero-card__hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.panel {
  background: var(--bg-panel);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.panel__header {
  margin-bottom: 16px;
}

.panel__header h2 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
}

.panel__header p {
  margin: 0;
  color: var(--muted);
}

.panel__content {
  color: var(--muted);
}

.grid--scripts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  border-radius: 24px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

code {
  font-family: "JetBrains Mono", "Space Grotesk", monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.charts--visuals {
  /* 改为单列纵向排列 */
  grid-template-columns: 1fr;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.charts--stack {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* 第二行两列布局，卡片更宽以便放大图 */
.charts--two-up {
  grid-template-columns: repeat(2, minmax(380px, 1fr));
  gap: 24px;
}

/* 让单个图卡跨两列，占据整行 */
.chart-card--wide {
  grid-column: 1 / -1;
}

/* 图表区块行间距：两行网格之间留出空间，提升层次感 */
#charts-overview .charts + .charts {
  margin-top: 28px;
}

/* 让视觉快照区域强制单列（高优先级覆盖） */
.charts.charts--visuals {
  grid-template-columns: 1fr;
}

.chart-card {
  padding: 20px;
  border-radius: 20px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
}

.chart-card header {
  margin-bottom: 12px;
}

.chart-card h3 {
  margin: 0;
}

/* 所有数据面板的副标题 60% 透明度 */
.chart-card header p {
  opacity: 0.6;
}

.sparkline {
  width: 100%;
  height: 48px;
  margin-top: auto;
}

.steps {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
}

.steps li {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
}

.markdown {
  color: var(--muted);
  transition: max-height 0.3s ease;
}

.markdown h1,
.markdown h2 {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin: 1.4em 0 0.6em;
}

.markdown h3,
.markdown h4 {
  color: #fff;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  margin: 1.25em 0 0.5em;
}

.markdown pre {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 16px;
  overflow: auto;
}

.markdown.is-collapsed {
  max-height: 320px;
  overflow: hidden;
  position: relative;
}

.markdown.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0), rgba(5, 6, 10, 0.95));
}

.site-footer {
  padding: 32px 5vw 64px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.media-slot {
  min-height: 320px;
  border: 2px dashed var(--border);
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 768px) {
  .panel {
    padding: 24px;
  }

  .hero {
    padding-top: 72px;
    min-height: 360px; /* 移动端适配的最小高度 */
  }

  .hero__content {
    min-height: 220px; /* 移动端文字区域最小高度 */
  }
}
