/* 定价页（features/pricing.html，英文页由 ui-i18n-build 生成）：价格计算器、套餐对比、常见问题。放在根目录：英文页生成时会把 /features/ 下的 href 改写成 /en/features/。改动时同步升 HTML 里的 ?v=。 */

/* ============ 计算器 ============ */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 20px;
  align-items: start;
}
.calc-form { display: grid; gap: 14px; min-width: 0; }
.calc-block {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: var(--panel);
}
.calc-block legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.calc-block legend + * { clear: both; }
.calc-step {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--signal);
  border: 1px solid rgba(var(--signal-rgb), .35);
  border-radius: 999px;
  padding: 1px 8px;
}
.calc-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.calc-sub { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.calc-sub b { color: var(--ink); font-weight: 600; }
.calc-warn { color: var(--signal); }

.calc-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.calc-stepper button {
  width: 44px; border: 0; background: transparent; color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.calc-stepper button:hover { background: rgba(var(--signal-rgb), .08); color: var(--signal); }
.calc-stepper button:disabled { opacity: .35; cursor: default; background: transparent; color: var(--ink); }
.calc-stepper input {
  width: 72px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: transparent; color: var(--ink); text-align: center;
  font: 700 20px/1 var(--font); padding: 10px 0;
  -moz-appearance: textfield; appearance: textfield;
}
.calc-stepper input::-webkit-outer-spin-button,
.calc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.calc-group + .calc-group { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.calc-group-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.calc-group-title span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.calc-included { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.calc-included li {
  font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 8px;
  background: var(--paper);
}
.calc-included li::before { content: "✓"; color: var(--signal); margin-right: 5px; }
.calc-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.calc-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  background: var(--paper); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.calc-check:hover { border-color: rgba(var(--signal-rgb), .55); }
.calc-check input { accent-color: var(--signal); margin: 0; flex: none; }
.calc-check:has(input:checked) { border-color: var(--signal); background: rgba(var(--signal-rgb), .06); }

.calc-token { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-token input[type="range"] { flex: 1 1 220px; min-width: 0; accent-color: var(--signal); }
.calc-token-input { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.calc-token-input input {
  width: 96px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
  font: 700 16px/1 var(--font); padding: 9px 10px; text-align: right;
}
.calc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.calc-chips button {
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted);
  font: 500 12.5px/1 var(--font); padding: 6px 11px; cursor: pointer;
}
.calc-chips button:hover { color: var(--ink); border-color: var(--ink); }
.calc-chips button[aria-pressed="true"] { color: var(--signal); border-color: var(--signal); background: rgba(var(--signal-rgb), .06); }

.calc-seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--paper); gap: 3px; }
.calc-seg label { position: relative; cursor: pointer; }
.calc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.calc-seg span { display: block; padding: 8px 16px; border-radius: 7px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.calc-seg span em { font-style: normal; font-size: 11.5px; color: var(--signal); margin-left: 4px; }
.calc-seg input:checked + span { background: var(--ink); color: var(--paper); }
.calc-seg input:checked + span em { color: inherit; opacity: .8; }
.calc-seg input:focus-visible + span { box-shadow: var(--focus); }
.calc-seg input:disabled + span { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.calc-sum {
  position: sticky; top: 84px;
  border: 1px solid var(--ink); border-radius: 14px; padding: 20px 20px 18px;
  background: var(--panel);
  box-shadow: var(--shadow-md);
}
.calc-sum-label { margin: 0; font-size: 13px; color: var(--muted); }
.calc-total { margin: 4px 0 0; font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-total small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.calc-equiv { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.calc-lines { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.calc-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink); }
.calc-lines li span:first-child { min-width: 0; }
.calc-lines li small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.calc-lines li b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-lines li.is-muted b { color: var(--muted); font-weight: 500; }
.calc-save {
  margin: 14px 0 0; font-size: 13px; color: var(--signal);
  background: rgba(var(--signal-rgb), .07); border-radius: 8px; padding: 8px 10px;
}
.calc-save:empty { display: none; }
.calc-actions { display: grid; gap: 8px; margin-top: 16px; }
.calc-actions .btn { width: 100%; justify-content: center; }
.calc-foot { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ============ 套餐对比 ============ */
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cmp { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--paper); }
.cmp thead th strong { display: block; color: var(--ink); font-size: 15px; }
.cmp thead th.is-hot { color: var(--signal); }
.cmp tbody th { font-weight: 500; color: var(--ink); width: 34%; }
.cmp tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cmp td { color: var(--ink); }
.cmp td.is-yes::before { content: "✓"; color: var(--signal); font-weight: 700; }
.cmp td.is-no { color: var(--muted); }
.cmp tr.cmp-group th { background: var(--paper); font-size: 12px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 10px; padding-bottom: 10px; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp-fit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.cmp-fit-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 16px 18px; }
.cmp-fit-card.is-hot { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(var(--signal-rgb), .08); }
.cmp-fit-name { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.cmp-fit-card.is-hot .cmp-fit-name { color: var(--signal); }
.cmp-fit-who { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.cmp-fit-note { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.cmp--full { min-width: 880px; }
.cmp--full tbody th { width: 30%; }
.cmp--full td[colspan] { color: var(--muted); font-size: 13px; line-height: 1.6; }
.cmp-roles { margin-top: 28px; }
.cmp-roles h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; }
.cmp-roles .hint { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.cmp--roles { min-width: 760px; }
.cmp--roles tbody th { width: 28%; }
/* 小屏横向滚动时首列固定，行名始终可见 */
.cmp--full tbody tr:not(.cmp-group) th, .cmp--roles tbody tr:not(.cmp-group) th { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
.cmp--full thead th:first-child, .cmp--roles thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
.cmp--full tr.cmp-group th span, .cmp--roles tr.cmp-group th span { display: inline-block; position: sticky; left: 16px; }
@media (max-width: 960px) { .cmp-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cmp-fit { grid-template-columns: 1fr; } }

/* ============ 常见问题 ============ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0 16px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 24px 14px 0; position: relative;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.faq details p a, .price-notes a { color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 899px) {
  .calc { grid-template-columns: 1fr; }
  .calc-sum { position: static; }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .calc-block { padding: 16px 14px 14px; }
  .calc-total { font-size: 32px; }
  .calc-seg { display: grid; grid-auto-flow: row; width: 100%; }
}
