/* 站点固定浅色，不启用深色模式 */
html {
  color-scheme: light;
}

html.dark {
  color-scheme: light;
}

#scheme-switch,
#light-dark-panel {
  display: none !important;
}

/* 首页文章更紧凑。左侧栏保持显示，广告位放在侧栏顶部。 */
body.is-home #post-list-container {
  gap: 0.55rem !important;
}

body.is-home .post-card-content {
  padding: 0.72rem 0.95rem 0.68rem !important;
}

body.is-home .post-card-title {
  margin-bottom: 0.28rem !important;
  font-size: 1.125rem !important;
  line-height: 1.4 !important;
}

body.is-home .post-card-title::before {
  top: 0.22rem !important;
  height: 0.85rem !important;
}

body.is-home .post-meta {
  margin-bottom: 0.3rem !important;
  gap: 0.45rem !important;
}

body.is-home .post-card-excerpt {
  display: -webkit-box;
  margin-bottom: 0.35rem !important;
  overflow: hidden;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.is-home .post-card-stats {
  gap: 0.55rem !important;
  font-size: 0.75rem !important;
}

#fxf-ad-slot {
  margin-bottom: 1rem;
}

.fxf-ad-frame {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 168px;
  padding: 18px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background:
    radial-gradient(120px 80px at 100% 0%, color-mix(in srgb, var(--primary, #1677ff) 22%, transparent), transparent 70%),
    var(--card-bg, #fff);
  box-shadow: 0 10px 28px -22px color-mix(in srgb, var(--primary, #1677ff) 80%, transparent);
  transition: transform 0.2s ease;
}

.fxf-ad-frame:hover {
  transform: translateY(-2px);
}

.fxf-ad-brand {
  color: color-mix(in srgb, currentColor 58%, transparent);
  font-size: 12px;
  line-height: 1.4;
}

.fxf-ad-title {
  color: var(--title-color, #172033);
  font-size: 1.25rem;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.fxf-ad-host {
  color: var(--primary, #1677ff);
  font-size: 12px;
  font-weight: 650;
}

@media (max-width: 767.98px) {
  body.is-home #fxf-ad-slot {
    margin: 0 0 0.75rem;
    padding: 0 0.25rem;
  }

  .fxf-ad-frame {
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 14px 16px;
  }

  .fxf-ad-brand {
    flex: 1 1 8rem;
  }

  .fxf-ad-title {
    flex: 1 1 100%;
  }
}
