/* ============================================================
 * 外贸落地价计算器 · 样式
 * 风格：克制、偏专业财务工具。不用渐变、emoji、彩色侧条、阴影卡片。
 * 层级靠字号、字重和留白；颜色只在必要处出现：
 *   墨色 --ink      交互和选中（按钮、选中的国家/产品、焦点）
 *   绿 / 红         只用在结论数字上（便宜 / 贵）
 *   琥珀色           只用在「待核实」
 *   我方 = 深色实心点，当地 = 灰色空心点
 * ============================================================ */
:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e4e4e7;
  --line-2: #efefef;
  --soft: #fafaf9;

  --focus: rgba(24, 24, 27, .08);
  --link: #1f4fbf;

  --good: #15803d;
  --bad: #b42318;
  --warn-ink: #7a5300;
  --warn-bg: #fdf8ec;
  --warn-line: #ecdcae;

  --radius: 10px;
  --num: "SF Pro Display", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ---------- 顶栏 ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--card); margin-bottom: 24px; }
.top-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 16px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .2px; display: flex; align-items: baseline; gap: 10px; }
.region-name { font-size: 14px; font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.top-meta { display: flex; gap: 0; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.top-meta span + span::before { content: "·"; margin: 0 8px; color: var(--faint); }
.top-meta b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- 布局 ---------- */
.grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; padding-bottom: 28px; align-items: start; }
.inputs { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 2px; scrollbar-width: thin; }
.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .inputs { position: static; max-height: none; overflow: visible; }
  .wrap { padding: 0 14px; }
  .top-meta { display: none; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel { padding: 0; }
.panel > :not(.panel-h) { margin-left: 20px; margin-right: 20px; }
.panel > :last-child { margin-bottom: 20px; }
.panel-h { display: flex; align-items: baseline; gap: 10px; padding: 16px 20px 0; margin-bottom: 14px; font-size: 15px; font-weight: 700; }
.panel-h small { font-weight: 400; font-size: 12px; color: var(--muted); }
.n { font: 600 12px/1 ui-monospace, "SF Mono", Consolas, monospace; color: var(--faint); width: 14px; flex: none; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: baseline; gap: 8px; }
h2 small, h3 small { font-weight: 400; color: var(--muted); font-size: 12px; }
h3 { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }

.step { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.panel > .step:last-child { border-bottom: none; padding-bottom: 0; }

input, select {
  font: inherit; padding: 9px 11px; border: 1px solid #d4d4d8; border-radius: 8px; background: #fff; width: 100%; color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover { border-color: #a1a1aa; }
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus); }
input[type="number"] { font-variant-numeric: tabular-nums; }

.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.note { font-size: 12px; color: var(--muted); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.note:empty { display: none; }
.muted { color: var(--muted); }

/* ---------- 区域标签 ---------- */
.region-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.region-tabs::-webkit-scrollbar { display: none; }
.region-tabs button {
  flex: none; font: inherit; font-size: 13px; border: none; background: none; color: var(--muted);
  padding: 4px 0 8px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.region-tabs button:hover { color: var(--ink); }
.region-tabs button small { font-size: 11px; color: var(--faint); margin-left: 2px; font-variant-numeric: tabular-nums; }
.region-tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- 常用国家 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; transition: border-color .12s, background .12s;
}
.chip:hover { border-color: #a1a1aa; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 产品 ---------- */
.product-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 0; }
.product-chips .chip { border-radius: 8px; padding: 7px 4px 6px; display: flex; flex-direction: column; align-items: center; font-size: 13px; line-height: 1.3; }
.product-chips .chip small { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.product-chips .chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.product-chips .chip.on small { color: #d4d4d8; }

/* ---------- 可搜索的国家选择 ---------- */
.combo { position: relative; }
.combo input {
  padding-left: 34px; padding-right: 60px; font-size: 15px; font-weight: 600; height: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px center;
}
.combo-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 11px/1 ui-monospace, Consolas, monospace; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; background: var(--soft); pointer-events: none;
}
.combo:focus-within .combo-kbd { display: none; }
.combo-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: none; border-radius: 50%; background: #f4f4f5; color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.combo-clear:hover { background: #e4e4e7; color: var(--ink); }
.combo-panel {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10); overflow: hidden;
}
.combo-list { margin: 0; padding: 4px; list-style: none; max-height: min(380px, 55vh); overflow-y: auto; overscroll-behavior: contain; }
.combo-list li[role="option"] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.combo-list .code { flex: none; width: 28px; font: 600 11px/18px ui-monospace, Consolas, monospace; color: var(--muted); }
.combo-list .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.combo-list .l1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-list .l1 small { color: var(--muted); margin-left: 2px; }
.combo-list .l2 { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-list .via { font-style: normal; color: var(--muted); margin-left: 6px; }
.combo-list .via::before { content: "· "; }
.combo-list .tick { flex: none; color: var(--muted); font-size: 11px; }
.combo-list mark { background: none; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.combo-list li.active { background: #f4f4f5; }
.combo-list li.sel .nm { font-weight: 600; }
.combo-list .grp { position: sticky; top: -4px; background: #fff; z-index: 1; font-size: 11px; font-weight: 600; color: var(--faint); padding: 8px 10px 4px; }
.combo-list .empty { padding: 14px 10px; color: var(--ink); font-size: 13px; }
.combo-list .empty small { color: var(--muted); }
.combo-list .hard { font-weight: 600; color: var(--bad); }
.combo-list .unsure { font-weight: 600; color: var(--warn-ink); }
.combo-foot { display: flex; gap: 14px; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); background: var(--soft); }
@media (max-width: 900px) {
  .combo-kbd, .combo-foot { display: none; }
  .combo-list li[role="option"] { padding: 11px 10px; }
}

/* ---------- 进口税费 ---------- */
.tax-ctx { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 12px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; }
.tile { border: 1px solid #d4d4d8; border-radius: 8px; padding: 7px 11px 6px; cursor: text; display: flex; flex-direction: column; background: #fff; transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: #a1a1aa; }
.tile:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus); }
.tile > span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile > div { display: flex; align-items: baseline; gap: 4px; }
.tile input { border: none; padding: 0; font: 600 21px/1.3 var(--num); color: var(--ink); background: transparent; width: 100%; min-width: 0; box-shadow: none; font-variant-numeric: tabular-nums; }
.tile input:focus { box-shadow: none; }
.tile em { font-style: normal; font-size: 12px; color: var(--muted); flex: none; }

.tax-opts { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tax-opts .opt { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 3px; }
.tax-opts .opt span { font-size: 12px; color: var(--muted); }
.tax-opts select { padding: 7px 9px; font-size: 13px; }

.extra-list { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 4px; }
.extra-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 0 2px; }
.extra-head small { font-weight: 400; color: var(--faint); }
.extra-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.extra-row + .extra-row { border-top: 1px solid var(--line-2); }
.ex-name { font-size: 13px; display: flex; flex-direction: column; min-width: 0; }
.ex-name small { font-size: 11px; color: var(--muted); }
.ex-name .rec { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; display: inline; }
.ex-name .rec::before { content: "· "; }
.ex-input { display: flex; align-items: center; gap: 4px; flex: none; }
.ex-input input { width: 74px; padding: 5px 8px; text-align: right; font-weight: 600; }
.ex-input em { font-style: normal; font-size: 12px; color: var(--muted); }

/* 待核实 / 已核对 */
.uncertain { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; color: var(--warn-ink); }
.uncertain .u-title { font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.u-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--warn-ink); border: 1px solid #d9c27c; border-radius: 4px; padding: 0 5px; flex: none; }
.uncertain ul { margin: 6px 0 10px; padding-left: 18px; }
.uncertain li { margin: 2px 0; }
.uncertain .u-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.uncertain .u-actions a { font-size: 12px; color: var(--warn-ink); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.uncertain.ok { background: none; border: none; border-bottom: 1px solid var(--line-2); border-radius: 0; color: var(--muted); padding: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.uncertain.ok .u-actions { display: inline-flex; }

.duty-warn { margin-top: 10px; font-size: 12px; line-height: 1.65; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 8px 11px; }
.duty-warn .btn { margin-top: 6px; display: inline-block; }

.clear-info { margin-top: 12px; font-size: 12px; line-height: 1.65; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line-2); }
.clear-info .lv-badge { font-weight: 700; margin-right: 6px; }
.clear-info.lv1 .lv-badge { color: var(--good); }
.clear-info.lv2 .lv-badge { color: var(--warn-ink); }
.clear-info.lv3 .lv-badge { color: var(--bad); }

.more { margin-top: 12px; }
.more summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12px; color: var(--muted); }
.tax-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.tax-foot .hint { margin: 0; }

/* ---------- 报价对比 ---------- */
.side { margin-bottom: 16px; }
.side + .side { padding-top: 16px; border-top: 1px solid var(--line-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; box-sizing: border-box; }
.ours .dot, tr.ours .dot, .kpi.ours .dot { background: var(--ink); }
.local .dot, tr.local .dot, .kpi.local .dot { border: 1.5px solid var(--muted); background: #fff; }

.money { display: flex; }
.money input { font: 600 22px/1.2 var(--num); padding: 8px 12px; border-radius: 8px 0 0 8px; border-right: none; height: 48px; font-variant-numeric: tabular-nums; }
.money select { width: 88px; flex: none; border-radius: 0 8px 8px 0; background: var(--soft); font-weight: 600; height: 48px; }

.inline { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.inline > span { width: 40px; color: var(--muted); font-size: 13px; flex: none; }
.inline input { flex: 1; }
.cur-suffix { font-style: normal; color: var(--muted); font-size: 12px; }
.inline .cur-suffix { width: 36px; flex: none; }

.seg { display: flex; margin-top: 10px; border: 1px solid #d4d4d8; border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; }
.seg span { display: block; text-align: center; padding: 6px 0; font-size: 13px; color: var(--muted); }
.seg label + label span { border-left: 1px solid #d4d4d8; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -2px; }

.fx { margin-top: 12px; }
.fx summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.fx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin: 8px 0; }
.fx-grid label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.fx-grid label span { width: 78px; color: var(--muted); flex: none; }
.fx-grid input { padding: 5px 8px; }

/* ---------- 结论 ---------- */
.verdict { padding: 22px 24px 20px; }
.v-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.v-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.v-pill { font-size: 13px; font-weight: 700; }
.verdict.good .v-pill { color: var(--good); }
.verdict.bad .v-pill { color: var(--bad); }
.v-country { color: var(--muted); font-size: 12.5px; }
.verdict .big { font: 700 40px/1.1 var(--num); margin: 10px 0 18px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.big-label { font: 600 15px/1 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; color: var(--ink-2); }
.big-pct { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.verdict.good .big { color: var(--good); }
.verdict.bad .big { color: var(--bad); }
.verdict .big .big-label { color: var(--ink-2); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 14px; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 16px; }
.kpi:first-child { padding-left: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi b { font: 600 20px/1.35 var(--num); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { font-size: 11.5px; color: var(--muted); }
.kpi.be.up small { color: var(--good); }
.kpi.be.down small { color: var(--bad); }
.verdict p { margin: 14px 0 0; }
.verdict .unsure-line { color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 7px 11px; font-size: 12.5px; }
.verdict .warn { color: var(--bad); font-size: 12.5px; }
@media (max-width: 900px) {
  .verdict { padding: 18px 16px; }
  .verdict .big { font-size: 30px; }
  .kpis { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .kpi.be { grid-column: span 2; border-left: none; padding-left: 0; padding-top: 12px; border-top: 1px solid var(--line-2); }
}

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); text-align: right; }
th:first-child, td:first-child { text-align: left; color: var(--ink-2); padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-size: 12px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); }
.cmp tr.ours td:first-child { color: var(--ink); font-weight: 600; }
.cmp td .dot, .kpi .dot { vertical-align: middle; margin-right: 7px; position: relative; top: -1px; }
tr.total td { font-weight: 700; color: var(--ink); border-top: 1px solid var(--ink-2); }
tr.sum td { color: var(--ink); font-weight: 600; }
tr.diff td { font-weight: 700; border-bottom: none; }
.pos { color: var(--bad); }
.neg { color: var(--good); }
.sub-cur { display: block; font-size: 11px; color: var(--faint); font-weight: 400; }
@media (max-width: 900px) { .cmp td, .cmp th { padding: 9px 5px; } .sub-cur { white-space: nowrap; } }

.detail-card summary { cursor: pointer; list-style: none; }
.detail-card summary::-webkit-details-marker { display: none; }
.detail-card summary h2 { margin: 0; }
.detail-card summary h2::after { content: "展开"; font-size: 12px; font-weight: 400; color: var(--muted); margin-left: auto; }
.detail-card[open] summary h2::after { content: "收起"; }
.detail-card[open] summary h2 { margin-bottom: 12px; }

/* ---------- 按钮 ---------- */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: #3f3f46; border-color: #3f3f46; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #d4d4d8; font-weight: 500; }
.btn.ghost:hover { border-color: var(--ink); background: #fff; }
.btn.small { padding: 5px 12px; font-size: 13px; }

/* ---------- AI ---------- */
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-ask { display: flex; gap: 8px; }
.ai-ask input { flex: 1; }
.ai-out { margin-top: 14px; white-space: pre-wrap; border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.75; }
.ai-out:empty { display: none; }
.ai-out.err { color: var(--bad); }
.ai-out a { color: var(--link); word-break: break-all; }
.ai-out .src { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.ai-out .src ol { margin: 4px 0 0; padding-left: 18px; }

.foot { color: var(--faint); font-size: 12px; padding-bottom: 32px; }

/* ---------- 手机底部结论条（桌面不显示） ---------- */
.mini-bar { display: none; }
@media (max-width: 900px) {
  .mini-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--ink); color: #fff; text-decoration: none; font-size: 14px;
  }
  .mini-bar.good b { color: #86efac; }
  .mini-bar.bad b { color: #fca5a5; }
  .mini-bar span { font-size: 12px; color: #d4d4d8; white-space: nowrap; }
  .foot { padding-bottom: 80px; }
}

/* ---------- 客户进口方式（正常清关 / 保税仓） ---------- */
.import-mode { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.im-label { font-size: 12px; color: var(--muted); }
.import-mode .seg { margin-top: 4px; }
.import-mode .hint { margin-top: 6px; }
.verdict .bond-line { font-size: 12.5px; color: var(--ink-2); border-left: 2px solid var(--ink); padding: 2px 0 2px 10px; }
.cmp tr.ref td { color: var(--faint); font-size: 12.5px; }
.cmp tr.ref td .sub-cur { color: var(--faint); }
.cmp.bonded td.key { font-weight: 700; color: var(--ink); }
.cmp.bonded tr.diff td.key.pos { color: var(--bad); }
.cmp.bonded tr.diff td.key.neg { color: var(--good); }
tr.bond-note td { font-size: 12px; color: var(--muted); background: var(--soft); }

/* ---------- 结论卡：两根对比条 ---------- */
.bars { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 16px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; align-items: center; }
.bar-name { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.bar { height: 14px; background: #f1f1f2; border-radius: 3px; display: flex; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar-row.ours .s-base { background: var(--ink); }
.bar-row.ours .s-ship { background: #52525b; }
.bar-row.ours .s-fee { background: #a1a1aa; }
.bar-row.local .s-base { background: #a1a1aa; }
.bar .s-tax { background: #e8a598; }
.bar-val { font: 600 17px/1 var(--num); font-variant-numeric: tabular-nums; text-align: right; min-width: 110px; }
.bar-note { grid-column: 2 / 4; font-size: 11.5px; color: var(--muted); }
.be-line { font-size: 14px; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.be-line b { font: 700 18px/1.2 var(--num); color: var(--ink); font-variant-numeric: tabular-nums; }
.be-line span { font-size: 12.5px; }
.be-line.up span { color: var(--good); }
.be-line.down span { color: var(--bad); }
.verdict .foot-notes { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.verdict .foot-notes:empty { display: none; }
.verdict .foot-notes .u { color: var(--warn-ink); }
.sub-h { font-size: 12.5px; color: var(--muted); margin: 6px 0 6px; }
.detail-card .sub-h + table { margin-bottom: 4px; }
.detail-card .hint { margin-bottom: 14px; }
@media (max-width: 900px) {
  .bar-row { grid-template-columns: 40px 1fr auto; column-gap: 8px; }
  .bar-val { font-size: 15px; min-width: 88px; }
}

/* ============================================================
 * 分区（2026-11-09）：底色层次 + 栏目标题 + 卡片标题栏，仍然不用渐变和彩色
 * ============================================================ */
:root { --bg: #ececea; --card-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04); }
.card { border-color: #e1e1e3; box-shadow: var(--card-shadow); }
.grid { gap: 28px; }
.inputs, .results { gap: 14px; }

/* 左右两栏的栏目标题 */
.col-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted);
  display: flex; align-items: center; gap: 10px; margin: 2px 2px -4px;
}
.col-title::after { content: ""; flex: 1; height: 1px; background: #d6d6d8; }
.inputs { padding-top: 0; }

/* 卡片标题栏：浅灰底 + 分隔线，序号用黑底白字小方块 */
.panel-h {
  background: #f7f7f6; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 20px; margin-bottom: 16px; font-size: 15px;
}
.n {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px;
  background: var(--ink); color: #fff; font: 700 11px/1 -apple-system, "Segoe UI", sans-serif; flex: none; align-self: center;
}
.panel-h small { margin-left: 2px; }

/* 卡片内的小分组：上下留白 + 小标题 */
.grp-label, .im-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.import-mode { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--line-2); }
.tax-ctx { margin-top: -4px; margin-bottom: 14px; }
.uncertain { margin-bottom: 16px; }
.clear-info { margin-top: 14px; padding-top: 12px; }
.tax-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.side { margin-bottom: 0; }
.side + .side { margin-top: 16px; padding-top: 16px; }
.panel > .note { margin-top: 16px; }

/* 结论卡：顶部一条结论色细线，作为主卡片 */
.verdict { border-top: 3px solid var(--ink); }
.verdict.good { border-top-color: var(--good); }
.verdict.bad { border-top-color: var(--bad); }

/* 次要卡片：浅灰底，退后一层 */
.detail-card, .card.ai { background: #fafaf9; box-shadow: none; }
.detail-card summary h2, .card.ai h2 { font-size: 14px; }

/* ============================================================
 * 左栏分区（2026-11-09 第二轮）
 *  - 左栏不再是带独立滚动条的长框（会把三张卡片看成一整块），卡片直接排在页面上
 *  - 改成右侧结果固定：往下填写时，结论一直在视野里
 *  - 卡片内的小标题（目的国、产品、我方报价……）改成深色加粗，分组之间留更大间距
 * ============================================================ */
.inputs { position: static; max-height: none; overflow: visible; padding-right: 0; gap: 22px; }
.results { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; gap: 16px; }
.grid { align-items: start; }
@media (max-width: 900px) {
  .results { position: static; max-height: none; overflow: visible; }
}

.panel-h { font-size: 16px; padding: 14px 20px; margin-bottom: 18px; }
.panel h3, .side h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.panel h3 small, .side h3 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.step { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.side + .side { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.grp-label, .im-label { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.import-mode { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.top h1 { gap: 0; }
