/* /pricing.html 的版面。页头页脚不在这里 —— 它们由 partials/site-{header,footer}.html
   渲染、样式全在 site-chrome.css，这张表后加载，只管页面自己那几段：
   大标题 → 四级阶梯 → 四张档位卡 → 24 行对比表 → FAQ → 留资弹层 / toast。

   四张卡有两份 markup、一套 CSS：模板里的静态兜底卡，和 www/assets/js/pricing.js 的
   `cnCard()`（拿到人民币 offer 时整块替换 #tiers）。两边的 class 逐项一致，所以下面
   `.card` 那一段同时管着两套，换皮只改这一处。*/

@keyframes i18n-reveal-fallback {
  to {
    visibility: visible;
  }
}

html.i18n-pending body {
  visibility: hidden;
  animation: i18n-reveal-fallback 0s 3s forwards;
}

/* 共用色板与字体栈在 site-chrome.css 里（外壳先加载）；这两个只有定价页用，留在这。 */
:root {
  --h2-line: #e6ded6;
  --h2-body: #4d5256;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--h2-paper, #faf5f0);
  color: var(--h2-ink, #282d32);
  font-family: var(--pingfang);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--h2-orange, #ff5a00);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 首页用的是同一块 1200 画板：定价页跟着它，两页的左右留白对得上。 */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.eb {
  color: var(--h2-ink, #282d32);
  font-size: 14px;
  letter-spacing: .02em;
  margin-bottom: 14px;
}

/* CJK 排印：方块字关闭负字距，几个小字号标签提字号保可读。 */
html[lang="zh"] body {
  line-height: 1.6;
}

html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] .tname {
  letter-spacing: 0;
}

html[lang="zh"] .lede {
  letter-spacing: .01em;
}

html[lang="zh"] .eb {
  font-size: 15px;
  letter-spacing: .08em;
}

html[lang="zh"] .rung .step {
  font-size: 13px;
  letter-spacing: .06em;
}

html[lang="zh"] .badge {
  font-size: 12px;
  letter-spacing: .02em;
}

html[lang="zh"] .feats li.head {
  font-size: 14px;
  letter-spacing: .02em;
}

/* ---------- 大标题 ---------- */
.plans-page {
  display: block;
  background: var(--h2-paper, #faf5f0);
}

.plans {
  padding: 66px 0 6px;
  text-align: center;
}

.plans h1 {
  font-family: var(--pingfang-bold);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--h2-ink, #282d32);
  max-width: 1000px;
  margin: 0 auto;
  text-wrap: balance;
}

/* `hero_h1` 的橙色那半句自成一行 —— 让它跟着上一句流的话，中文在 390 宽下会掉出「具。」这种孤字。 */
.plans h1 span {
  display: block;
  color: var(--h2-orange, #ff5a00);
}

.plans .lede {
  max-width: 760px;
  margin: 26px auto 0;
  color: var(--h2-muted, #91969b);
  font-size: 19px;
  line-height: 1.45;
}

.plans .trust {
  margin-top: 16px;
  color: var(--h2-body, #4d5256);
  font-size: 15px;
}

.plans .trust b {
  color: var(--h2-ink, #282d32);
}

/* ---------- 四级阶梯 ---------- */
.ladder {
  margin: 44px 0 0;
}

.ladder .rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--h2-line, #e6ded6);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.rung {
  position: relative;
  padding: 18px 20px 20px;
  border-right: 1px solid var(--h2-line, #e6ded6);
}

.rung:last-child {
  border-right: 0;
}

.rung .step {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--h2-muted, #91969b);
}

.rung .role {
  margin-top: 7px;
  color: var(--h2-ink, #282d32);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
}

.rung .who {
  margin-top: 4px;
  color: var(--h2-muted, #91969b);
  font-size: 13px;
  line-height: 1.35;
}

.rung.here {
  background: var(--h2-paper, #faf5f0);
}

.rung.here::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--h2-orange, #ff5a00);
}

/* ---------- 四张档位卡 ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  padding: 34px 0 6px;
}

.tiers .test-offer {
  grid-column: 2 / span 2;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: clip;
  box-shadow: 0 10px 28px rgba(40, 45, 50, .07);
}

.card.hot {
  box-shadow: 0 14px 34px rgba(255, 90, 0, .18);
}

/* 头部色带：`cnCard()` 不产出包裹层，所以色带由 .tname + .role 两个相邻兄弟共用同一块
   底色拼出来 —— 上圆角给 .tname，下圆角给 .role，中间不留缝。 */
.card>.tname,
.card>.role {
  background: var(--h2-teal, #286464);
  color: #fff;
}

.card>.tname {
  margin: 6px 6px 0;
  padding: 32px 18px 6px;
  border-radius: 12px 12px 0 0;
  font-family: var(--pingfang-bold);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.card>.role {
  margin: 0 6px;
  padding: 0 18px 18px;
  border-radius: 0 0 12px 12px;
  min-height: 54px;
  font-size: 14px;
  line-height: 1.3;
  /* 压字不压底色：整块 opacity 会把色带下半截也调淡，接缝就露出来了。 */
  color: rgba(255, 255, 255, .92);
}

.card.hot>.tname,
.card.hot>.role {
  background: var(--h2-orange, #ff5a00);
}

/* 托管档：`cnCard()` 只在增长版上加 .hot，别的档位没有类名可认 —— 认它自己的按钮档位值。 */
.card:has(.cta[data-plan="managed"])>.tname,
.card:has(.cta[data-plan="managed"])>.role {
  background: var(--h2-deep, #20272d);
}

.badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffe132;
  color: #111;
  border-radius: 12px;
  padding: 3px 12px;
  font-size: 11px;
  white-space: nowrap;
}

.price {
  display: flex;
  align-items: baseline;
  min-height: 68px;
  padding: 20px 18px 4px;
  font-family: var(--pingfang-bold);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  color: #000;
}

.price .currency,
.price .per {
  font-size: 18px;
  font-weight: 400;
  color: var(--h2-ink, #282d32);
}

/* ¥ 紧贴数字（¥599，不是 ¥ 599），/月 与数字之间留一口气。 */
.price .per {
  margin-left: 5px;
}

.price .amt.custom {
  font-size: 26px;
}

.subnote {
  padding: 0 18px;
  color: var(--h2-muted, #91969b);
  font-size: 12.5px;
  line-height: 1.45;
  min-height: 36px;
}

/* 卡底那个空的 .subnote（付费档买不了时 pricing.js 往里写字）不占位。 */
.subnote:empty {
  min-height: 0;
  padding: 0;
}

.pitch {
  padding: 12px 18px 0;
  color: var(--h2-body, #4d5256);
  font-size: 14px;
  line-height: 1.45;
  min-height: 74px;
}

.feats {
  flex: 1;
  list-style: none;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0 18px;
}

.feats li {
  padding-left: 26px;
  color: var(--h2-body, #4d5256);
  font-size: 13.5px;
  line-height: 1.4;
  background: url("/assets/img/home/choice@2x.png") left 3px / 17px 12px no-repeat;
}

.feats li.head {
  padding-left: 0;
  background: none;
  color: var(--h2-ink, #282d32);
  font-size: 13.5px;
  font-weight: 600;
}

.cta {
  display: block;
  width: calc(100% - 36px);
  min-height: 44px;
  margin: 20px 18px;
  padding: 0 16px;
  border: 1.5px solid var(--h2-orange, #ff5a00);
  border-radius: 999px;
  background: transparent;
  color: var(--h2-orange, #ff5a00);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.cta:hover {
  background: var(--h2-orange, #ff5a00);
  color: #fff;
}

.cta.solid,
.card.hot .cta {
  background: var(--h2-orange, #ff5a00);
  color: #fff;
}

.cta:disabled {
  cursor: default;
  background: #fff;
  border-color: #dce1e6;
  color: #b6bdc3;
}

/* ---------- 24 行完整对比表 ---------- */
/* 窄屏靠 .cmp-scroll 横向滚 —— 24×5 的表挤成两行一格反而看不出哪档有哪项，页面本身不横向滚。 */
.compare {
  margin-top: 64px;
}

.compare .sec-h {
  text-align: center;
  margin-bottom: 24px;
}

.compare h2 {
  margin: 0;
  color: var(--h2-ink, #282d32);
  font-family: var(--pingfang-bold);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
}

.cmp-scroll {
  overflow-x: auto;
  border: 1px solid var(--h2-line, #e6ded6);
  border-radius: 14px;
  background: #fff;
}

.cmp {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}

.cmp th,
.cmp td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0eae4;
  text-align: center;
  white-space: nowrap;
}

.cmp thead th {
  padding: 15px 14px 13px;
  background: var(--h2-teal, #286464);
  color: #fff;
  font-weight: 700;
  vertical-align: top;
}

.cmp thead th:first-child {
  text-align: left;
}

.cmp thead th small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, .78);
}

/* 增长版一列整列高亮：表头换成橙色，整列淡橙底。 */
.cmp .hot {
  background: rgba(255, 90, 0, .06);
}

.cmp thead th.hot {
  background: var(--h2-orange, #ff5a00);
  color: #fff;
}

.cmp thead th.hot small {
  color: rgba(255, 255, 255, .85);
}

/* 分组行：「哪一档开始有」。 */
.cmp .grp th {
  padding: 9px 14px 7px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--h2-orange, #ff5a00);
  background: var(--h2-paper, #faf5f0);
  border-bottom: 1px solid var(--h2-line, #e6ded6);
}

.cmp tbody th {
  min-width: 240px;
  text-align: left;
  font-weight: 500;
  color: var(--h2-body, #4d5256);
  white-space: normal;
}

.cmp tbody:last-child tr:last-child th,
.cmp tbody:last-child tr:last-child td {
  border-bottom: 0;
}

.cmp .y {
  color: var(--h2-teal, #286464);
  font-weight: 700;
}

.cmp .n {
  color: #d3cdc6;
}

.cmp-note {
  margin: 14px 2px 0;
  color: var(--h2-muted, #91969b);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- FAQ ---------- */
/* 折叠条的外观跟首页 index.css 的 `.fq` 是同一套（同样的边框、圆角、字号与 v/^ 标记）。 */
.faq {
  padding: 84px 0 96px;
}

.faq .sec-h {
  max-width: 850px;
  margin: 0 auto 34px;
  text-align: center;
}

.faq h2 {
  color: var(--h2-ink, #282d32);
  font-family: var(--pingfang-bold);
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.12;
}

.faq h2 span {
  color: var(--h2-orange, #ff5a00);
}

.qs {
  max-width: 960px;
  margin: 0 auto;
}

.fq {
  border: 1px solid #e1d9d2;
  background: #fff;
  border-radius: 10px;
  margin: 0 0 12px;
}

.fq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 16px 20px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--h2-ink, #282d32);
  cursor: pointer;
  list-style: none;
}

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

.fq summary:after {
  content: "v";
  color: #d8d1ca;
  font-family: var(--pingfang);
  font-size: 18px;
  line-height: 1;
}

.fq[open] summary:after {
  content: "^";
}

.fq .fa {
  padding: 0 20px 20px;
  color: #3e4448;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- 留资弹层 ---------- */
/* 原生 <dialog>：遮罩、Esc 关闭、焦点圈都由浏览器给。 */
.lead {
  /* showModal() 的居中靠浏览器默认的 margin:auto，上面那条 `*{margin:0}` 会把它抹掉，
     弹层就贴到左上角去了 —— 这里把它加回来。 */
  margin: auto;
  max-width: 380px;
  width: calc(100% - 32px);
  padding: 26px 24px 22px;
  border: 1px solid var(--h2-line, #e6ded6);
  border-radius: 16px;
  background: #fff;
  color: var(--h2-ink, #282d32);
  box-shadow: 0 24px 60px -24px rgba(32, 39, 45, .5);
}

.lead::backdrop {
  background: rgba(32, 39, 45, .45);
}

.lead h2 {
  font-family: var(--pingfang-bold);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.lead p {
  margin-top: 8px;
  color: var(--h2-body, #4d5256);
  font-size: 13.5px;
  line-height: 1.5;
}

.lead input {
  width: 100%;
  margin-top: 16px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--h2-ink, #282d32);
  background: var(--h2-paper, #faf5f0);
  border: 1px solid var(--h2-line, #e6ded6);
  border-radius: 10px;
}

.lead-act {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.lead-act button {
  padding: 10px 20px;
  border: 1.5px solid var(--h2-line, #e6ded6);
  border-radius: 100px;
  background: #fff;
  color: var(--h2-muted, #91969b);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lead-act button.solid {
  border-color: var(--h2-orange, #ff5a00);
  background: var(--h2-orange, #ff5a00);
  color: #fff;
}

.lead-act button.solid:disabled {
  opacity: .55;
  cursor: default;
}

/* ---------- toast / 入场动画 ---------- */
#toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(8px);
  padding: 13px 20px;
  border-radius: 11px;
  background: var(--h2-deep, #20272d);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

#toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .6s cubic-bezier(.2, .7, .2, 1) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media(prefers-reduced-motion:reduce) {
  .rise {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---------- 窄屏 ---------- */
@media (max-width:1100px) {
  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiers .test-offer {
    grid-column: auto;
  }

  .card>.tname {
    font-size: 24px;
  }

  .price {
    font-size: 34px;
  }
}

@media (max-width:860px) {
  .ladder .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rung:nth-child(2n) {
    border-right: 0;
  }

  .rung:nth-child(-n+2) {
    border-bottom: 1px solid var(--h2-line, #e6ded6);
  }
}

@media (max-width:620px) {
  .plans {
    padding-top: 44px;
  }

  .plans .lede {
    font-size: 16px;
  }

  .ladder .rail {
    grid-template-columns: 1fr;
  }

  .rung {
    border-right: 0;
    border-bottom: 1px solid var(--h2-line, #e6ded6);
  }

  .rung:last-child {
    border-bottom: 0;
  }

  .tiers {
    grid-template-columns: 1fr;
  }

  .card>.role {
    min-height: 0;
  }

  .pitch {
    min-height: 0;
  }

  .subnote {
    min-height: 0;
    padding-bottom: 4px;
  }

  .price {
    min-height: 0;
  }

  .compare {
    margin-top: 48px;
  }

  .faq {
    padding: 60px 0 72px;
  }

  .fq summary {
    font-size: 17px;
  }

  .fq .fa {
    font-size: 15px;
  }
}
