/* ============================================================
   components.css — 按钮 / 徽标 / 卡片 / 图标块 / 列表 / 问答 / 数据条
   ============================================================ */

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
              box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  color: var(--text-invert);
  box-shadow: 0 6px 18px rgba(255, 143, 184, 0.28);
}

.btn--primary:hover {
  background: var(--brand-strong);
  color: var(--text-invert);
  box-shadow: 0 10px 26px rgba(255, 143, 184, 0.38);
}

/* 描边款用 box-shadow 而不是 border —— 实边框会把按钮撑高 2px，与同行实心按钮不齐 */
.btn--ghost {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn--ghost:hover {
  color: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--line-brand);
  background: rgba(255, 143, 184, 0.08);
}

.btn--lg { padding: 16px 34px; font-size: var(--fs-md); }
.btn--block { width: 100%; }

/* ---- 徽标 / 标签 ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.6;
  background: var(--surface-2);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pill--brand { background: var(--brand-surface); color: var(--brand-ink-deep); box-shadow: inset 0 0 0 1px var(--line-brand); }
.pill--accent { background: var(--accent-surface); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(183, 156, 245, 0.3); }
.pill--ok { color: var(--ok); box-shadow: inset 0 0 0 1px rgba(111, 220, 168, 0.3); }
.pill--warn { color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255, 201, 120, 0.32); }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---- 卡片 ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
  border-color: var(--line-brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card__title {
  font-size: var(--fs-lg);
  color: var(--text);
}

.card__text {
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.72;
}

/* ---- 图标块 ---- */
.icon-tile {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-surface);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--line-brand);
}

.icon-tile svg { width: 26px; height: 26px; }

.icon-tile--accent {
  background: var(--accent-surface);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(183, 156, 245, 0.3);
}

/* ---- 定义列表（资料表） ---- */
.spec {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3) var(--sp-5);
}

.spec dt {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.spec dd {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .spec { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1) 0; }
  .spec dd { margin-bottom: var(--sp-3); }
}

/* ---- 问答手风琴 ---- */
.qa {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}

.qa[open] { border-color: var(--line-brand); }

.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.qa__q::-webkit-details-marker { display: none; }

.qa__q:hover { color: var(--brand-soft); }

.qa__q::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.22s var(--ease);
}

.qa[open] .qa__q::after { transform: rotate(-135deg) translateY(-2px); }

.qa__a {
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--text-body);
  font-size: var(--fs-sm);
  line-height: 1.78;
}

.qa__a > * + * { margin-top: var(--sp-3); }

.qa-list { display: grid; gap: var(--sp-3); }

/* ---- 提示条 ---- */
.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-body);
}

.notice__icon { flex: 0 0 auto; color: var(--brand); }
.notice--warn { border-color: rgba(255, 201, 120, 0.34); background: rgba(255, 201, 120, 0.07); }
.notice--warn .notice__icon { color: var(--warn); }

/* ---- 步骤时间线 ---- */
.steps {
  display: grid;
  gap: var(--sp-5);
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: var(--sp-8);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-surface);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  box-shadow: inset 0 0 0 1px var(--line-brand);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.step__text { color: var(--text-body); font-size: var(--fs-sm); }

/* ---- 表格 ---- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 560px;
}

table.data th,
table.data td {
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}

table.data td { color: var(--text-body); }
table.data tr:last-child td { border-bottom: none; }
table.data td strong { color: var(--text); }
