/* ==========================================================================
   GEOER · 公共元件（按钮 / 胶囊 / 卡片 / 表单字段 / 页头 / 面包屑）
   数值口径见 output/07-首页PRD-浅色版.md 第 3.4 节「圆角 / 描边 / 间距」
   ========================================================================== */

/* ------------------------------------------------------------------ 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  transition: background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

/* 首屏主/次按钮与表单提交按钮 */
.btn--lg {
  height: 56px;
  padding-inline: 32px;
  font-size: 16px;
}

/* 订单页支付 / 检测表单提交 */
.btn--block {
  width: 100%;
  height: 54px;
  font-size: 16px;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  border: 1px solid transparent;
}

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

.btn--ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-base);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--lg.btn--ghost {
  padding-inline: 28px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 文字链（品牌色） */
.link-brand {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  transition: color var(--dur-fast) var(--ease-out);
}

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

/* 文字链（弱化，14px Medium） */
.link-muted {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

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

/* 文字链也可以挂在 button 上（如「再测一个网站 →」），清掉按钮默认样式 */
button.link-brand,
button.link-muted {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* ------------------------------------------------------------------ 卡片 */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-card);
}

/* 单行文字胶囊 */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  background: var(--brand-tag-bg);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

/* 卡内末行说明胶囊 */
.pill-inset {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-pill-sm);
  background: var(--bg-inset);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* 分类标签（文章列表页） */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  transition: background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

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

.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* 状态标签（语义色，仅用于状态表达） */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.status-tag--ok {
  background: var(--accent-ok-soft);
  color: var(--accent-ok);
}

.status-tag--warn {
  background: var(--accent-warn-soft);
  color: var(--accent-warn);
}

.status-tag--bad {
  background: var(--accent-bad-soft);
  color: var(--accent-bad);
}

/* -------------------------------------------------------------- 表单字段 */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 画布口径：13px Medium，--text-body */
.field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
}

.field__control {
  display: flex;
  align-items: center;
  height: 50px;
  padding-inline: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-input);
  transition: border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.field__control input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.field__control input::placeholder {
  color: var(--text-faint);
}

.field__control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(58, 91, 224, 0.12);
}

.field__control.is-invalid {
  border-color: var(--accent-bad);
}

.field__error {
  display: none;
  font-size: 12px;
  color: var(--accent-bad);
}

.field.has-error .field__error {
  display: block;
}

/* ------------------------------------------------------------ 页头 / 面包屑 */

/* 列表类页头（bg-alt 底）：订单页、文章列表、FAQ 页、免费测网站 */
.page-header {
  background: var(--bg-alt);
  padding: var(--header-pad-top) var(--pad-page) var(--header-pad-bottom);
}

/* 详情类页头（bg-base 底）：文章详情 */
.page-header--base {
  background: var(--bg-base);
}

.page-header__inner {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header__inner--tight {
  gap: 18px;
}

.page-header .h1 {
  font-size: 36px;
  line-height: 48px;
}

.page-header__desc {
  font-size: 16px;
  line-height: 28px;
  color: var(--text-muted);
}

/* 画布口径：中间层级的可点条目为 13px Medium，末级用 Regular */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-faint);
}

.breadcrumb a {
  font-weight: 500;
  color: var(--brand);
  transition: color var(--dur-fast) var(--ease-out);
}

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

.breadcrumb .sep {
  color: var(--text-faint);
}

.breadcrumb .current {
  color: var(--text-faint);
}

/* ------------------------------------------------------------ 正文内容 */

/* 章节说明 + 卡片（去卡片化列表行） */
.list-plain {
  display: flex;
  flex-direction: column;
}

.list-plain__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  transition: background var(--dur-fast) var(--ease-out);
}

.list-plain__row + .list-plain__row {
  border-top: 1px solid var(--border-base);
}

.list-plain__row:hover .list-plain__title {
  color: var(--brand);
}

/* -------------------------------------------------------------- 断点 */

@media (max-width: 899px) {
  .page-header .h1 {
    font-size: 30px;
    line-height: 42px;
  }
}

@media (max-width: 639px) {
  .btn--lg {
    padding-inline: 24px;
    font-size: 15px;
  }

  .page-header .h1 {
    font-size: 26px;
    line-height: 36px;
  }
}
