/* ==========================================================================
   components.css — 基础控件：按钮 / 标签 / 卡片 / 数据条 / 下载面板
   ========================================================================== */

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 32px;
  border-radius: 27px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.16s, background 0.16s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  color: #fff;
  background: var(--brand);
}

.btn--ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: #c9d3e2;
}

.btn--pill {
  height: 40px;
  padding: 0 22px;
  border-radius: 20px;
  font-size: 15px;
}

/* 主下载按钮：高度略大，承载双行文案 */
.btn--download {
  height: 62px;
  padding: 0 44px;
  border-radius: 31px;
  gap: 12px;
}

.btn__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.25;
}

.btn__stack small {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.82;
}

/* ---------- 徽章 / 标签 ---------- */

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 12px;
  border-radius: 16px;
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand);
  color: #fff;
}

.tag--soft {
  background: var(--success-soft);
  color: var(--success);
}

/* ---------- 卡片 ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.card--flat {
  background: var(--surface-alt);
  border-color: transparent;
}

.card--plain {
  background: #fff;
  border-color: transparent;
}

.card__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}

.card__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}

.card__note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* 卡片底部文字链接：靠 auto 外边距对齐到卡片底部 */
.card__link {
  align-self: flex-start;
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

.card__link:hover {
  color: var(--brand-dark);
}

.card > .btn {
  align-self: flex-start;
}

/* 深色强调卡：把强转化位收进网格里，避免整屏色块切断阅读 */
.card--deep {
  background: var(--surface-deep);
  border-color: transparent;
}

.card--deep .eyebrow {
  color: #5b9aff;
}

.card--deep .card__title {
  color: #fff;
}

.card--deep .card__text {
  color: #9aa4b2;
}

.card--deep .card__note {
  color: #7d8794;
}

/* 图标容器 */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}

.icon-box svg {
  width: 24px;
  height: 24px;
}

/* ---------- 数据条 ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding: 40px var(--gutter);
  background: var(--surface-deep);
  text-align: center;
}

.metric__value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: #fff;
}

.metric__value--accent {
  color: #4ade80;
}

.metric__label {
  margin-top: 4px;
  font-size: 13px;
  color: #9aa4b2;
}

/* ---------- 下载面板 ---------- */

.download-panel {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 40px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #d9e0f0;
}

.download-panel__meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-left: 28px;
  font-size: 14px;
  color: var(--ink-2);
}

.download-panel__meta .mono {
  color: var(--ink-3);
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
  }
}

@media (max-width: 900px) {
  .download-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 28px;
  }

  .download-panel__meta {
    padding-left: 0;
  }

  .btn--download {
    width: 100%;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
