/* ==========================================================================
   步步盾 BBDUN — 内页专用样式
   依赖 style.css 的 tokens 与基础组件。
   ========================================================================== */

/* ==================================================== 内页统一 Hero */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 7vw, 92px)) 0 clamp(48px, 6vw, 76px);
  overflow: hidden;
}

.page-hero-inner {
  position: relative;
  max-width: 860px;
}

.page-hero-title {
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-hero-title .line {
  display: block;
  /* 保持整行不折断：内页标题多为短语，断行会破坏语义 */
  white-space: nowrap;
}

/* 窄屏放不下时允许整体换行，而不是从中间劈开 */
@media (max-width: 700px) {
  .page-hero-title .line { white-space: normal; }
}

.page-hero-title .hl {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.page-hero-lead {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  color: var(--text-mid);
}

.page-hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 640px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.page-hero-kpis .hero-stat { background: var(--ink-800); }

/* ============================================== 首页入口指引 entry-grid */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px;
}

.entry-card {
  position: relative;
  display: block;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.entry-card:hover {
  color: inherit;
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.36);
  box-shadow: var(--sh-md);
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 17px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(129, 140, 248, 0.12));
  color: var(--brand-400);
  transition: transform 0.3s var(--ease);
}

.entry-card:hover .entry-icon { transform: scale(1.07) rotate(-4deg); }

.entry-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.entry-card:hover h3 { color: var(--brand-400); }

.entry-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-low);
}

.entry-go {
  position: absolute;
  top: 28px; right: 26px;
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}

.entry-card:hover .entry-go {
  opacity: 1;
  transform: none;
  color: var(--brand-400);
}

/* ================================================== 产品页 layers */
.layers {
  display: grid;
  gap: 20px;
}

.layer-card {
  position: relative;
  padding: 32px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

.layer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad-brand);
  opacity: 0.5;
  transition: opacity 0.32s var(--ease), width 0.32s var(--ease);
}

.layer-card:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: var(--sh-md);
}

.layer-card:hover::before { opacity: 1; width: 4px; }

.layer-no {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand-400);
  margin-bottom: 16px;
}

.layer-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.layer-icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  flex-shrink: 0;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: var(--r-md);
  background: rgba(14, 165, 233, 0.09);
  color: var(--brand-400);
}

.layer-text { min-width: 0; }
.layer-text h3 { margin-bottom: 10px; font-size: 1.28rem; }
.layer-text p  { color: var(--text-mid); font-size: 0.945rem; margin-bottom: 16px; }

.layer-text .pillar-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

/* 4 列特性网格 */
.features-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ================================================== 请求链路 chain */
.chain {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.chain-step {
  flex: 1 1 190px;
  display: flex;
  gap: 14px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.chain-step:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.32);
}

.chain-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(99, 102, 241, 0.12));
  color: var(--brand-400);
}

.chain-text { min-width: 0; }
.chain-text b {
  display: block;
  margin-bottom: 5px;
  font-size: 0.95rem;
  color: var(--text-hi);
}
.chain-text span {
  display: block;
  font-size: 0.815rem;
  line-height: 1.65;
  color: var(--text-low);
}

.chain-arrow {
  display: grid;
  place-items: center;
  color: var(--text-dim);
  flex-shrink: 0;
  align-self: center;
}

/* ================================================== 区域详情 regions */
.regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.region-card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

.region-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: var(--sh-md);
}

.region-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.region-head h3 { font-size: 1.24rem; margin: 0 0 2px; }
.region-head span { font-size: 0.815rem; color: var(--text-dim); }

.node-flag-lg {
  width: 54px; height: 54px;
  font-size: 0.82rem;
  border-radius: var(--r-md);
}

.region-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.region-specs {
  display: grid;
  gap: 11px;
  padding: 16px 0;
  margin-bottom: 16px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  flex-grow: 1;
}

.region-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--brand-400);
}

/* ==================================================== 套餐对比表 */
.pricing-note {
  margin-top: 28px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.cmp-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.cmp-table thead th {
  padding: 18px 20px;
  background: rgba(240, 245, 252, 0.85);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-hi);
  text-align: left;
  white-space: nowrap;
}

.cmp-table thead th.is-hot {
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.09);
}

.cmp-table thead th em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--amber-500);
  margin-top: 3px;
}

.cmp-table tbody th {
  padding: 14px 20px;
  font-weight: 500;
  color: var(--text-low);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.cmp-table tbody td {
  padding: 14px 20px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--line);
}

.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td { border-bottom: 0; }

.cmp-table tbody tr:hover th,
.cmp-table tbody tr:hover td { background: rgba(14, 165, 233, 0.045); }

/* ==================================================== 选择建议 */
.advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.advice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.advice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.32);
}

.advice-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.advice-card p  { font-size: 0.895rem; color: var(--text-low); margin-bottom: 20px; flex-grow: 1; }

/* ==================================================== 接入流程 */
.process-list {
  display: grid;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.process-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 24px;
}

.process-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process-no {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex-shrink: 0;
  border: 1px solid rgba(14, 165, 233, 0.32);
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.08);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--brand-400);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.process-item:hover .process-no {
  transform: scale(1.08);
  background: rgba(14, 165, 233, 0.16);
}

.process-line {
  flex-grow: 1;
  width: 2px;
  min-height: 40px;
  margin: 8px 0;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.4), rgba(14, 165, 233, 0.06));
}

.process-body {
  padding-bottom: 44px;
}

.process-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.process-head h3 { margin: 0; font-size: 1.22rem; }

.process-head .step-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.process-body > p {
  font-size: 0.925rem;
  color: var(--text-mid);
  margin-bottom: 0;
}

.process-how {
  margin-top: 14px !important;
  font-size: 0.875rem !important;
  color: var(--text-low) !important;
}

/* 代码块 */
.process-code {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(243, 246, 251, 0.95);
  overflow: hidden;
}

.code-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 249, 253, 0.9);
}

.code-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(120, 165, 235, 0.22);
}

.process-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
}

.process-code code {
  font-family: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  color: #0F4C81;
  white-space: pre;
}

/* ==================================================== 接入清单 */
.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 18px;
}

.check-item {
  display: flex;
  gap: 15px;
  padding: 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.check-item:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.34);
}

.check-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok-400);
}

.check-item h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.check-item p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.68;
  color: var(--text-low);
}

/* ==================================================== 相关入口行 */
.related-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 32px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 60% 130% at 4% 0%, rgba(14, 165, 233, 0.12), transparent 60%),
    var(--surface);
}

.related-text h3 {
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.related-text p {
  margin: 0;
  font-size: 0.895rem;
  color: var(--text-low);
}

.related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==================================================== FAQ 编号样式 */
.faq-q-index {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s var(--ease);
}

.faq-item[open] .faq-q-index { color: var(--brand-400); }

.faq-q-text { min-width: 0; }

/* FAQ 底部引导卡 */
.ask-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 36px 40px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 55% 130% at 6% 0%, rgba(14, 165, 233, 0.15), transparent 62%),
    var(--surface);
}

.ask-icon {
  display: grid;
  place-items: center;
  width: 66px; height: 66px;
  flex-shrink: 0;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: var(--r-lg);
  background: rgba(14, 165, 233, 0.1);
  color: var(--brand-400);
}

.ask-body { flex-grow: 1; min-width: 0; }
.ask-body h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin-bottom: 8px; }
.ask-body p  { margin: 0; font-size: 0.925rem; color: var(--text-mid); }

.ask-actions {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex-shrink: 0;
}

/* ==================================================== 联系卡片 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px;
}

.contact-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: inherit;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

a.contact-card:hover {
  color: inherit;
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.36);
  box-shadow: var(--sh-md);
}

.contact-card-primary {
  border-color: rgba(14, 165, 233, 0.36);
  background:
    radial-gradient(ellipse 90% 130% at 0% 0%, rgba(14, 165, 233, 0.13), transparent 62%),
    var(--surface);
}

.contact-card-plain { cursor: default; }

.contact-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(129, 140, 248, 0.12));
  color: var(--brand-400);
}

.contact-card h3 {
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.contact-card p {
  margin: 0 0 5px;
  font-size: 0.905rem;
  font-weight: 600;
  color: var(--brand-400);
  word-break: break-all;
}

.contact-note {
  display: block;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.contact-card .entry-go {
  top: 26px; right: 22px;
}

/* ==================================================== 需求表单 */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.form-intro h2 { margin-bottom: 12px; }

.form-intro > p {
  font-size: 0.945rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}

/* 响应时效表 */
.response-table {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.response-table h3 {
  margin-bottom: 14px;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-low);
}

.resp-row {
  display: grid;
  grid-template-columns: 0.95fr 0.75fr 1.5fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.845rem;
  color: var(--text-mid);
  align-items: start;
}

.resp-row:last-child { border-bottom: 0; }

.resp-row span:nth-child(2) {
  color: var(--text-hi);
  font-weight: 600;
}

.resp-head {
  padding-bottom: 10px;
}

.resp-head span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.resp-head span:nth-child(2) { color: var(--text-dim); font-weight: 700; }

/* 表单本体 */
.req-form {
  position: relative;
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-hi);
}

.field {
  margin-bottom: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.865rem;
  font-weight: 600;
  color: var(--text-hi);
}

.field label em {
  font-style: normal;
  color: var(--danger-400);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line-str);
  border-radius: var(--r-sm);
  background: rgba(247, 250, 253, 0.9);
  color: var(--text-hi);
  font-size: 0.92rem;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-low) 50%),
    linear-gradient(135deg, var(--text-low) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% + 1px),
    calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field select option {
  background: var(--ink-700);
  color: var(--text-hi);
}

.field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.7;
}

/* 校验错误态 */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger-400);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.13);
}

.field.has-error label { color: var(--danger-400); }

/* 字段级错误提示 */
.field-err {
  margin-top: 6px;
  font-size: 0.79rem;
  color: var(--danger-400);
}

.form-err {
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: var(--r-sm);
  background: rgba(220, 38, 38, 0.07);
  font-size: 0.85rem;
  color: var(--danger-400);
}

.form-tip {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* 提交成功态 */
.form-ok {
  padding: 26px 10px;
  text-align: center;
}

.form-ok-icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  border: 1px solid rgba(52, 211, 153, 0.36);
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok-400);
}

.form-ok h3 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.form-ok p {
  max-width: 340px;
  margin: 0 auto 22px;
  font-size: 0.9rem;
  color: var(--text-low);
}

/* ==================================================== 内页响应式 */
@media (max-width: 1080px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-intro { max-width: 720px; }
}

@media (max-width: 860px) {
  .ask-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 26px;
  }
  .ask-actions { flex-direction: row; flex-wrap: wrap; }
  .related-row { padding: 28px 26px; }
  .chain { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); align-self: flex-start; margin-left: 20px; }
}

@media (max-width: 520px) {
  .page-hero-kpis { grid-template-columns: 1fr; }
  .layer-main { flex-direction: column; gap: 16px; }
  .process-item { grid-template-columns: 1fr; gap: 14px; }
  .process-line { display: none; }
  .process-body { padding-bottom: 34px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .req-form { padding: 26px 20px; }
  .resp-row { grid-template-columns: 1fr; gap: 3px; }
  .resp-row span:last-child { text-align: left; }
  .entry-grid, .advice-grid, .checklist, .contact-grid, .regions { grid-template-columns: 1fr; }
  .ask-actions, .related-actions { flex-direction: column; width: 100%; }
  .ask-actions .btn, .related-actions .btn { width: 100%; }
}