* { box-sizing: border-box; }

body {
  margin: 0; padding: 28px 16px 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
  color: #1e293b; min-height: 100vh;
}
body.has-banner { padding-top: 72px; }

.wrap { max-width: 1080px; margin: 0 auto; }
h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: .5px; }
.sub { color: #64748b; font-size: 13px; margin: 0; line-height: 1.6; }

.card {
  background: #fff; border-radius: 14px; padding: 18px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06); margin-top: 16px;
}

/* ========== 试用横幅 ========== */
.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 9px 16px; font-size: 13px; line-height: 1.5;
  background: linear-gradient(90deg, #fff7e6, #ffedd5);
  border-bottom: 1px solid #fed7aa; color: #92400e;
  box-shadow: 0 2px 10px rgba(146, 64, 14, .08);
}
.demo-banner[hidden] { display: none; }
.demo-banner .badge {
  flex: none; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .8px; padding: 2px 7px; border-radius: 6px;
}
.demo-banner .link {
  flex: none; background: none; border: none; padding: 0; cursor: pointer;
  color: #b45309; font-size: 13px; text-decoration: underline; white-space: nowrap;
}
.demo-banner .link:hover { color: #92400e; }
.demo-banner .link[hidden] { display: none; }

/* ========== 试用标签 ========== */
.tag-demo {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: #b45309; background: #fff7e6; border: 1px solid #fed7aa;
  border-radius: 6px; padding: 2px 7px;
}
.tag-demo[hidden] { display: none; }
h1 .tag-demo { font-size: 12px; padding: 3px 9px; }

/* ========== 查询表单 ========== */
.form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 150px; min-width: 130px; }
.field > span { font-size: 12px; color: #64748b; }
input, select {
  height: 38px; padding: 0 10px; border: 1px solid #d8dee9; border-radius: 9px;
  font-size: 14px; background: #fff; color: #1e293b; outline: none; width: 100%;
}
input:focus, select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 18px; border-radius: 9px; border: 1px solid #d8dee9;
  background: #fff; color: #334155; font-size: 14px; cursor: pointer;
  transition: .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: #b9c4d4; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.btn.primary:hover { background: #1d4ed8; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[hidden] { display: none; }

.hint { margin-top: 12px; font-size: 13px; color: #64748b; min-height: 18px; line-height: 1.6; }
.hint.err { color: #dc2626; }
.hint.ok { color: #16a34a; }
.hint.warn { color: #b45309; }

/* ========== 示例标的 chips ========== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #eef2f7; }
.chips[hidden] { display: none; }
.chips .chip-label { font-size: 12px; color: #94a3b8; align-self: center; margin-right: 2px; }
.chip {
  border: 1px solid #dbe6f5; background: #f5f9ff; color: #1d4ed8;
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
  transition: .15s; white-space: nowrap;
}
.chip:hover { background: #e8f1ff; border-color: #b9d3f7; }
.chip.locked { color: #94a3b8; border-color: #e8edf5; background: #f8fafc; cursor: not-allowed; }

/* ========== 统计卡片 ========== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; padding: 12px 14px; }
.stat .label { font-size: 12px; color: #64748b; }
.stat .value { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .small { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.up { color: #d92b2b; }
.down { color: #12924a; }

/* ========== 明细表 ========== */
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
h2 { font-size: 18px; margin: 0 0 4px; }
.table-wrap { max-height: 460px; overflow: auto; border: 1px solid #eef2f7; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
th, td {
  padding: 8px 12px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid #f1f5f9; font-variant-numeric: tabular-nums;
}
th:first-child, td:first-child { text-align: left; }
tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: none; }

/* ========== 结果区水印 ========== */
#resultCard { position: relative; overflow: hidden; }
#resultCard.trial-wm::after {
  content: attr(data-wm);
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 62px; font-weight: 800; letter-spacing: 14px;
  color: rgba(220, 38, 38, .06);
  transform: rotate(-18deg); pointer-events: none; user-select: none;
}

/* ========== 弹窗通用 ========== */
.modal-mask {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, .45);
}
.modal-mask[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px; padding: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28); animation: pop .18s ease-out;
  max-height: 88vh; display: flex; flex-direction: column;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal h3 { margin: 0 0 10px; font-size: 18px; color: #1e293b; }
.modal-body { font-size: 13.5px; color: #475569; line-height: 1.85; overflow: auto; }
.modal-body p { margin: 0 0 10px; }
.modal-body b { color: #1e293b; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f5f9; flex-wrap: wrap;
}
.foot-btns { display: flex; gap: 10px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #64748b; cursor: pointer; user-select: none; }
.chk input { width: 15px; height: 15px; margin: 0; }

/* ========== 购买弹窗专属 ========== */
.price-box {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(90deg, #eff6ff, #f8fbff);
  border: 1px solid #dbeafe; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px;
}
.price { font-size: 26px; font-weight: 800; color: #1d4ed8; letter-spacing: .5px; }
.price-sub { font-size: 12.5px; color: #64748b; }

.sec-title { font-size: 12px; color: #94a3b8; margin: 0 0 6px; letter-spacing: .5px; }
.features { margin: 0 0 14px; padding-left: 0; list-style: none; }
.features li {
  position: relative; padding-left: 22px; margin: 6px 0; font-size: 13px; color: #475569;
}
.features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #16a34a; font-weight: 700;
}

.contact { font-size: 13px; color: #334155; background: #f8fafc; border: 1px dashed #e2e8f0;
  border-radius: 10px; padding: 9px 12px; margin: 0 0 12px; word-break: break-all; }

.unlock-row { display: flex; gap: 8px; margin: 0 0 12px; }
.unlock-row[hidden] { display: none; }
.unlock-row input { flex: 1 1 auto; }
.unlock-row .btn { flex: none; }

.warn {
  margin-top: 4px; padding: 9px 11px; border-radius: 10px;
  background: #fff7e6; border: 1px solid #fed7aa; color: #92400e; font-size: 12.5px;
}

/* ========== 页脚 ========== */
.foot { margin-top: 18px; font-size: 12px; color: #94a3b8; line-height: 1.8; }

@media (max-width: 640px) {
  .field { flex: 1 1 100%; }
  .btn.primary { width: 100%; }
  .demo-banner { font-size: 12px; flex-wrap: wrap; gap: 6px; }
  #resultCard.trial-wm::after { font-size: 40px; letter-spacing: 8px; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .foot-btns { justify-content: flex-end; }
}