/*
 * 服务支持 — design/pc/服务支持.jpg (1920×2482) + design/mobile/服务支持@2x.png
 * 无独立 hero、无装饰 banner，整页底 #F3F4F9。订单查询 PC 三栏、移动单框 + 绿顶结果卡。
 */

.page-support {
  background: #f3f4f9;
  padding-bottom: 80px;
}

/* PC：本页最小稿字 12。视觉下限 10，全部字号乘同一倍率，标题仍大于正文。
   内容到 10 时 16 的问句是 13.3，36 的区块标题是 30。 */
html:not([data-layout="mobile"]) .page-support {
  --type-boost: max(1, calc(10 / 12 / var(--s)));
  --section-title-size: calc(36px * var(--type-boost));
}

/* ---------------------------------------------------------------- 订单查询 */

.order-query {
  padding-bottom: 0;
}

.order-query__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 230px;
  gap: 12px;
  margin-top: 36px;
  align-items: stretch;
}

.order-query__form input {
  width: 100%;
  height: calc(60px * var(--type-boost));
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0 18px;
  color: var(--ink);
  font-size: calc(14px * var(--type-boost));
  font-family: inherit;
}

.order-query__form input::placeholder { color: var(--ink-mute); }

.order-query__form input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.order-query__form .btn {
  height: calc(60px * var(--type-boost));
  min-height: calc(60px * var(--type-boost));
  border-radius: 0;
  font-size: calc(16px * var(--type-boost));
  box-shadow: none;
}

.order-query__form .btn:disabled {
  cursor: wait;
  opacity: .7;
}

.order-query__hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: calc(14px * var(--type-boost));
  line-height: 1.4;
  color: #c33;
}

.order-query__hint:empty { display: none; }

/* 移动端点「立即查询」后的身份验证。结构跟跨越速运参考弹窗，颜色走本站品牌蓝。 */
.waybill-verify {
  width: min(320px, calc(100% - 40px));
  max-width: 320px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
}

.waybill-verify::backdrop {
  background: rgba(1, 21, 65, .45);
}

.waybill-verify__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 24px;
}

.waybill-verify__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.waybill-verify__head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

.waybill-verify__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -6px -8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.waybill-verify__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.waybill-verify__digits {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 10px;
  justify-content: center;
}

.waybill-verify__digits input {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  padding: 0;
  border: var(--hairline) solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-family: inherit;
  text-align: center;
}

.waybill-verify__digits input:focus {
  outline: 0;
  border-color: var(--brand);
}

.waybill-verify__error {
  margin: 0;
  min-height: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #c33;
}

.waybill-verify__error:empty { display: none; }

.waybill-verify__submit {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border-radius: 6px;
  font-size: 15px;
  box-shadow: none;
}

.order-query__result {
  margin-top: 20px;
}

.order-query__result[hidden] { display: none; }

/* 结果卡：成稿绿顶线 + 白底；查无此单两行居中。 */
.waybill-card {
  background: #fff;
  border-top: 4px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  overflow: hidden;
}

.waybill-card + .waybill-card {
  margin-top: 20px;
}

.waybill-card__summary {
  min-height: 108px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 32px;
  border-bottom: var(--hairline) solid #edf0f2;
}

.waybill-card__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.waybill-card__no {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: calc(17px * var(--type-boost));
  color: var(--ink);
}

.waybill-card__no b {
  color: var(--ink);
  font-size: calc(18px * var(--type-boost));
  font-weight: 700;
  letter-spacing: .02em;
}

.waybill-card__copy {
  min-width: calc(44px * var(--type-boost));
  height: calc(26px * var(--type-boost));
  padding: 0 9px;
  border: var(--hairline) solid #d9dde2;
  border-radius: 3px;
  background: #fff;
  color: var(--ink-soft);
  font-size: calc(12px * var(--type-boost));
  cursor: pointer;
}

.waybill-card__copy:hover,
.waybill-card__copy:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: 0;
}

.waybill-card__status {
  color: var(--brand);
  font-size: calc(17px * var(--type-boost));
  font-weight: 700;
}

.waybill-card__status.is-error { color: #c33; }

/* 查无节点不是错误：文案走中性灰，别用报错红吓用户 */
.waybill-card__status.is-empty {
  color: var(--ink-mute);
  font-weight: 600;
}

/* 查无此单：成稿只有「物流单号」行 + 居中说明，没有状态/复制/路由 */
.waybill-card.is-blank .waybill-card__route,
.waybill-card.is-blank .waybill-card__copy,
.waybill-card.is-blank .waybill-card__status,
.waybill-card.is-blank .waybill-card__updated { display: none; }

.waybill-card.is-blank .waybill-card__summary {
  min-height: 80px;
  justify-content: center;
  padding: 26px 24px;
  border-bottom: var(--hairline) solid #ccc;
}

.waybill-card.is-blank .waybill-card__identity {
  justify-content: center;
}

.waybill-card.is-blank .waybill-card__no {
  justify-content: center;
  font-size: calc(16px * var(--type-boost));
}

.waybill-card.is-blank .waybill-card__no b {
  color: var(--brand);
  font-size: calc(16px * var(--type-boost));
}

.waybill-card.is-blank .waybill-card__msg {
  padding: 28px 24px;
  text-align: center;
  color: var(--ink);
  font-size: calc(14px * var(--type-boost));
}

.waybill-card__updated {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-mute);
  font-size: calc(13px * var(--type-boost));
}

.waybill-card__updated time {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.waybill-card__updated[hidden] { display: none; }

.waybill-card__msg {
  margin: 0;
  padding: 24px 32px;
  font-size: calc(15px * var(--type-boost));
  line-height: 1.7;
  color: var(--ink-soft);
}

.waybill-card__msg[hidden] { display: none; }

.waybill-card__route {
  padding: 22px 32px 24px;
}

.waybill-card__route h3 {
  position: relative;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: var(--hairline) solid #edf0f2;
  color: var(--brand);
  font-size: calc(18px * var(--type-boost));
  line-height: 1.4;
}

.waybill-card__route h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 3px;
  background: var(--accent);
}

.waybill-route {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.waybill-route[hidden] { display: none; }

.waybill-route.is-collapsed .waybill-route__item:nth-child(n + 5) { display: none; }

.waybill-route__item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 20px;
}

.waybill-route__item:not(:last-child)::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 38px;
  bottom: 0;
  left: 18px;
  width: var(--hairline);
  background: #dfe3e7;
}

.waybill-route__marker {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 7px solid #f3f4f5;
  border-radius: 50%;
  background: #bfc5ca;
}

.waybill-route__marker::after {
  content: '';
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 2px;
}

.waybill-route__item.is-current .waybill-route__marker {
  border-color: rgba(0, 100, 180, .12);
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(71, 190, 40, .18);
}

.waybill-route__body {
  min-width: 0;
  padding: 2px 0 12px;
}

.waybill-route__item:last-child .waybill-route__body { padding-bottom: 0; }

.waybill-route__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.waybill-route__head h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: calc(16px * var(--type-boost));
  font-weight: 600;
  line-height: 1.5;
}

.waybill-route__item.is-current .waybill-route__head h4 {
  color: var(--brand);
  font-size: calc(17px * var(--type-boost));
}

.waybill-route__head time {
  flex: 0 0 auto;
  color: var(--ink-soft);
  white-space: nowrap;
  font-size: calc(13px * var(--type-boost));
  font-variant-numeric: tabular-nums;
}

.waybill-route__description {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: calc(14px * var(--type-boost));
  line-height: 1.5;
}

.waybill-route__item:not(.is-current) .waybill-route__description,
.waybill-route__item:not(.is-current) .waybill-route__head time {
  color: #90979e;
}

.waybill-card__toggle {
  display: block;
  min-width: calc(124px * var(--type-boost));
  height: calc(38px * var(--type-boost));
  margin: 8px auto 0;
  padding: 0 18px;
  border: var(--hairline) solid #dce1e5;
  border-radius: 19px;
  background: #fff;
  color: var(--brand);
  font-size: calc(13px * var(--type-boost));
  cursor: pointer;
}

.waybill-card__toggle:hover,
.waybill-card__toggle:focus-visible {
  border-color: var(--brand);
  background: rgba(0, 100, 180, .04);
  outline: 0;
}

.waybill-card__toggle[hidden] { display: none; }

.waybill-state {
  min-height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 32px;
  border-top: 4px solid var(--accent);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  color: var(--ink);
}

.waybill-state > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(71, 190, 40, .13);
}

.waybill-state p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .order-query:has(.order-query__form[aria-busy="true"]) .order-query__result .waybill-state > span {
    animation: waybill-state-pulse 1s ease-in-out infinite alternate;
  }
}

@keyframes waybill-state-pulse {
  to { scale: 1.25; opacity: .65; }
}

/* ---------------------------------------------------------------- FAQ */

.faq {
  margin-top: 65px;
}

.faq .section-title {
  /* 查询条底到「常见问题」标题顶 65：模块间距走 margin，不再叠全局标题 77。 */
  padding-top: 0;
}

.faq__list {
  margin-top: 40px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq__item {
  background: #fff;
  border: var(--hairline) solid #eee;
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 0;
  background: #f7f8fa;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
}

.faq__q:hover { background: #f0f2f5; }

.faq__no {
  flex-shrink: 0;
  width: calc(28px * var(--type-boost));
  height: calc(28px * var(--type-boost));
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: calc(14px * var(--type-boost));
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.faq__text {
  flex: 1;
  font-size: calc(16px * var(--type-boost));
  font-weight: 600;
}

.faq__toggle {
  flex-shrink: 0;
  font-size: calc(13px * var(--type-boost));
  color: var(--ink-mute);
}

.faq__a {
  font-size: calc(14px * var(--type-boost));
  line-height: 1.85;
  color: var(--ink-soft);
  background: #fff;
}

/* padding 不能写在 .faq__a 上：border-box 下 height:0 收不到 padding，
   过渡会在 44px 停住，再被 hidden 一下子抠掉，收起时会顿一下。 */
.faq__a-inner {
  padding: 20px 24px 24px 68px;
  overflow-wrap: break-word;
}

.faq__a p + p { margin-top: .6em; }

/* FAQ 答案与新闻正文共用受控富文本协议：图片保留后台设置的固有尺寸，
   仅在答案栏更窄时等比缩小；data-align 只接受后端白名单中的三档枚举。 */
.faq__a-inner img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.2em 0;
}

.faq__a-inner img[data-align="center"] {
  margin-right: auto;
  margin-left: auto;
}

.faq__a-inner img[data-align="right"] {
  margin-right: 0;
  margin-left: auto;
}

.faq__a-inner img[data-align="left"] {
  margin-right: auto;
  margin-left: 0;
}

.faq__a-inner a { overflow-wrap: anywhere; }

.faq__a-inner table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

.faq__a-inner th,
.faq__a-inner td {
  min-width: 88px;
  padding: 8px 12px;
  border: var(--hairline) solid var(--line);
  text-align: left;
}

.faq__a[hidden] { display: none; }

/* 运单结果卡入场：只有显式挂 is-pending 才藏初态，漏调 JS 时内容仍可见 */
@media (prefers-reduced-motion: no-preference) {
  html.motion-ready .waybill-card.is-pending,
  html.motion-ready .waybill-state.is-pending {
    opacity: 0;
    translate: 0 16px;
    transition:
      opacity .45s cubic-bezier(.22, 1, .36, 1),
      translate .45s cubic-bezier(.22, 1, .36, 1);
  }

  html.motion-ready .waybill-card.is-entered,
  html.motion-ready .waybill-state.is-entered {
    opacity: 1;
    translate: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .waybill-card,
  .waybill-state,
  .faq__a {
    opacity: 1;
    translate: none;
    transition: none;
  }
}

html[data-layout="mobile"] {
  /* 第八轮：375 稿是完整单框 + 102px「立即查询」。上游只认面单号，后四位框藏掉。 */
  .page-support {
    background: #f2f4f9;
  }

  .order-query .section-title {
    padding-top: 26px;
  }

  .order-query__form {
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 0;
    margin-top: 20px;
  }

  .order-query__form label[for="oq-phone"],
  .order-query__form input[name="phone"] {
    display: none;
  }

  .order-query__form input {
    min-width: 0;
    height: 40px;
    font-size: 12px;
    padding: 0 12px;
    border: var(--hairline) solid #d8dee6;
  }

  .order-query__form input[name="no"] {
    border-right: 0;
  }

  .order-query__form .btn {
    height: 40px;
    min-height: 40px;
    font-size: 13px;
    padding: 0 8px;
    width: 100%;
    gap: 0;
  }

  .order-query__result { margin-top: 16px; }

  .waybill-card__summary {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .waybill-card__identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .waybill-card__no {
    gap: 6px;
    font-size: 14px;
  }

  .waybill-card__no b { font-size: 15px; }
  .waybill-card__status { font-size: 16px; }
  .waybill-card__updated { font-size: 12px; }
  .waybill-card__msg { padding: 14px 20px 18px; font-size: 13px; }
  .waybill-card.is-blank .waybill-card__summary { min-height: 56px; padding: 18px 16px; }
  .waybill-card.is-blank .waybill-card__msg { padding: 18px 16px; }
  .waybill-card__route { padding: 18px 20px 20px; }
  .waybill-card__route h3 { font-size: 17px; }

  .waybill-route {
    margin-top: 14px;
  }

  .waybill-route__item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
  }

  .waybill-route__item:not(:last-child)::before {
    top: 32px;
    left: 15px;
  }

  .waybill-route__marker {
    width: 32px;
    height: 32px;
    border-width: 6px;
  }

  .waybill-route__body { padding: 1px 0 10px; }

  .waybill-route__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .waybill-route__head h4,
  .waybill-route__item.is-current .waybill-route__head h4 { font-size: 15px; }

  .waybill-route__head time { font-size: 12px; }
  .waybill-route__description { margin-top: 3px; font-size: 13px; }

  .waybill-state {
    min-height: 84px;
    padding: 22px 20px;
    font-size: 14px;
  }

  .faq { margin-top: 20px; }
  .faq .section-title { padding-top: 22px; }

  /* F20-23：问句/答案比成稿 12px 略放大，避免挤在一起。 */
  .faq__a-inner { padding: 8px 14px 16px 18px; font-size: 13px; line-height: 1.7; }
  .faq__q { padding: 14px; gap: 10px; }
  .faq__text { font-size: 15px; }
}
