/* 组件：按钮 / 圆角标 / 卡片 / 图标块 / 列表 / 折叠 / 筛选片 / 时间线 / 正文 */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 52px;
  padding-inline: 28px;
  border: 0;
  border-radius: var(--r-btn);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-hover);
  color: #fff;
}

.btn--primary:active {
  transform: translateY(1px);
}

/* 描边款：用 inset 阴影而不是 border，避免把按钮撑高 2px 对不齐 */
.btn--ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn--ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.btn--quiet {
  background: var(--bg-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn--quiet:hover {
  background: var(--brand-surface);
  color: var(--brand);
}

/* 深色面上的描边按钮 */
.btn--on-dark {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px #313a47;
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn--sm {
  height: 42px;
  padding-inline: 20px;
  font-size: var(--fs-xs);
}

.btn--md {
  height: 50px;
  padding-inline: 26px;
}

.btn--block {
  width: 100%;
}

/* ---------- 圆角标 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand-hover);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.pill--ghost {
  background: #fff;
  color: var(--ink-muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pill--light {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pill--lg {
  padding: 7px 14px;
  font-size: var(--fs-3xs);
}

/* ---------- 卡片 ---------- */
.card {
  padding: 26px;
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.card__title {
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.card--feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.card--feature .card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.card--feature .card__text {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

.card--soft {
  background: var(--bg-soft);
  box-shadow: none;
}

/* ---------- 图标块 ---------- */
.icon-tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--brand-surface);
  color: var(--brand-mark);
}

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

/* ---------- 勾选列表 ---------- */
.checks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.checks li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--ink-body);
}

.checks svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  color: var(--brand-mark);
}

/* 编号步骤 */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.steps-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--ink-body);
}

.steps-list__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  color: var(--brand);
  font-size: var(--fs-3xs);
  font-weight: 600;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  font-size: var(--fs-3xs);
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline-end: var(--sp-2);
  color: #a8b0bf;
}

/* ---------- 折叠问答 ---------- */
.qa {
  padding-block: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.qa summary {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  align-items: flex-start;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-inline-end: 2px solid var(--ink-muted);
  border-block-end: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.qa[open] summary::after {
  transform: rotate(-135deg);
}

.qa__body {
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* ---------- 筛选片 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tab {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-muted);
  font: inherit;
  font-size: var(--fs-2xs);
  line-height: 1.4;
  cursor: pointer;
}

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

.tab[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: none;
  color: #fff;
}

/* ---------- 时间线 ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-8);
}

.timeline__dot {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand);
}

.timeline__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-mark);
}

.timeline__title {
  margin-top: var(--sp-3);
  font-size: var(--fs-body);
  font-weight: 600;
}

.timeline__text {
  margin-top: 6px;
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
}

/* ---------- 正文长文 ---------- */
.prose__lede {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--ink);
}

.prose {
  max-width: var(--w-prose);
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--ink-body);
}

.prose > * + * {
  margin-top: 18px;
}

.prose h2 {
  margin-top: var(--sp-8);
  font-size: var(--fs-h5);
  line-height: 1.45;
  color: var(--ink);
}

.prose h3 {
  margin-top: var(--sp-7);
  font-size: 20px;
  color: var(--ink);
}

.prose ul {
  padding-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose li {
  position: relative;
  padding-inline-start: 18px;
}

.prose li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  inset-block-start: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 正文里嵌操作按钮时：按钮不该带下划线，也不吃段落的 1.85 行高 */
.prose__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  line-height: 1.2;
}

.prose__cta .btn {
  text-decoration: none;
}

/* 代码块 */
.code-block {
  padding: 18px 22px;
  border-radius: 12px;
  background: #12141a;
  color: #e6e9ef;
  font-size: var(--fs-2xs);
  line-height: 1.7;
  overflow-x: auto;
}

/* 提示块 */
.note {
  padding: 18px 22px;
  border-inline-start: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: var(--bg-soft);
  font-size: var(--fs-xs);
  color: var(--ink-body);
}

.note__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--brand);
}

/* 引用块 */
.quote {
  padding-block: var(--sp-2);
  padding-inline-start: var(--sp-6);
  border-inline-start: 3px solid var(--brand-mark);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}

/* 图片位统一在 pages.css 里按页面处理（长截图需裁切 + 底部渐隐） */
@media (max-width: 1024px) {
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-6);
  }
}

@media (max-width: 640px) {
  .btn {
    height: 48px;
    padding-inline: 22px;
    font-size: var(--fs-sm);
  }

  .btn--sm {
    height: 40px;
  }

  .qa summary {
    font-size: var(--fs-body);
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .prose {
    font-size: 15px;
  }

  .quote {
    font-size: 16px;
  }
}
