/* TransferOS-Global v0.1 — mobile-first, ink-green + lime accent, zero deps */
:root {
  --bg: #f6f6f1;
  --card: #ffffff;
  --ink: #132625;
  --muted: #5f6a66;
  --line: #e3e4da;
  --brand1: #16453a;
  --brand2: #c9f06b;
  --brand-grad: linear-gradient(135deg, #132625 0%, #16453a 55%, #256b52 100%);
  --green: #16a34a;
  --green-bg: #e9f9ef;
  --red: #e11d48;
  --red-bg: #fdeef2;
  --amber: #d97706;
  --amber-bg: #fff7e8;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(19, 38, 37, .10);
  --spring: cubic-bezier(.2, .7, .3, 1.25);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 84px;
  background-image:
    radial-gradient(520px 340px at 8% -4%, rgba(201, 240, 107, .16), transparent 70%),
    radial-gradient(560px 380px at 105% 12%, rgba(22, 69, 58, .08), transparent 70%);
  background-attachment: fixed;
}
.page { max-width: 640px; margin: 0 auto; padding: 12px 14px 20px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.card, .alert, .risk { animation: rise .45s var(--spring) both; }
.page > .card:nth-of-type(2) { animation-delay: .06s; }
.page > .card:nth-of-type(3) { animation-delay: .12s; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 246, 241, .94);
  color: var(--ink);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.topbar-in { max-width: 640px; margin: 0 auto; }
.topbar .brand { font-size: 18px; font-weight: 800; }
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  padding: 8px 4px 10px; font-size: 11px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tabbar a .ico { font-size: 20px; display: block; transition: transform .25s var(--spring); }
.tabbar a.active { color: var(--brand1); font-weight: 700; }
.tabbar a.active .ico { transform: scale(1.15); }
.tabbar a:not(.active):active { transform: scale(.94); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 18px; margin: 12px 0; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero { background: var(--brand-grad); color: #fff; border: none; }
.hero h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.35; }
.hero p { margin: 8px 0; color: rgba(255, 255, 255, .92); }
.hero .num { font-size: 30px; font-weight: 800; color: var(--brand2); }
.section-title { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.hint { font-size: 13px; color: var(--muted); }
.mt { margin-top: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 16px;
  border: none; border-radius: 12px; padding: 14px;
  cursor: pointer; font-family: inherit;
  touch-action: manipulation;
  transition: transform .12s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: #fff; color: var(--brand1); border: 1.5px solid var(--brand1); }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { margin-top: 0; }

/* ---------- 表单 ---------- */
.field { margin: 14px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand1); }
.radio-card {
  display: block; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 8px 0; cursor: pointer;
  transition: all .15s ease;
}
.radio-card input { margin-right: 8px; accent-color: var(--brand1); }
.radio-card.sel { border-color: var(--brand1); background: #edf2e9; }
input[type="range"] { width: 100%; accent-color: var(--brand1); }

/* ---------- 步骤指示 ---------- */
.steps { display: flex; gap: 6px; margin: 12px 0; }
.steps .dot {
  flex: 1; height: 6px; border-radius: 3px; background: var(--line);
}
.steps .dot.on { background: var(--brand1); }
.step-label { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 4px; }

/* ---------- 结果 ---------- */
.verdict { border-radius: 12px; padding: 16px; margin: 12px 0; font-weight: 700; }
.verdict.ok { background: var(--green-bg); color: #15803d; border: 1.5px solid #86efac; }
.verdict.warn { background: var(--amber-bg); color: #92400e; border: 1.5px solid #fcd34d; }
.verdict.bad { background: var(--red-bg); color: #be123c; border: 1.5px solid #fda4af; }
.dim-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.dim-row:last-child { border-bottom: none; }
.dim-ico { font-size: 20px; flex: none; }
.dim-row .fix { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 风险框 ---------- */
.risk {
  background: var(--red-bg); border: 1.5px solid #fda4af; border-radius: 12px;
  padding: 16px; margin: 12px 0;
}
.risk h3 { margin: 0 0 8px; color: #be123c; font-size: 15px; }
.alert {
  background: var(--amber-bg); border: 1.5px solid #fcd34d; border-radius: 12px;
  padding: 14px; margin: 12px 0; font-size: 14px;
}

/* ---------- 数字 ---------- */
.big-num { font-size: 28px; font-weight: 800; color: var(--brand1); }
table.nums { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
table.nums td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.nums td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
table.nums tr.total td { font-size: 16px; color: var(--brand1); border-bottom: none; }

/* ---------- 时间线 ---------- */
.timeline { margin: 10px 0; padding-left: 4px; }
.tl-step { display: flex; gap: 12px; margin: 0 0 16px; }
.tl-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.tl-body b { display: block; margin-bottom: 2px; }
.check-list { list-style: none; padding: 0; margin: 8px 0; }
.check-list li { padding: 6px 0 6px 28px; position: relative; font-size: 14px; }
.check-list li::before { content: "☐"; position: absolute; left: 2px; color: var(--brand1); font-size: 16px; }

.disclaimer { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; line-height: 1.6; }
.disclaimer a { color: var(--brand1); }
.footnote { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* ---- plan.html ---- */
.progress { height: 10px; background: #e6ead9; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.progress-in { height: 100%; background: linear-gradient(90deg, #16453a, #7fb069); border-radius: 6px; transition: width .25s; }
.req { border: 1px solid #e2e5d8; border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: #fafaf6; }
.req-head { margin-bottom: 6px; font-size: 15px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-top: 1px dashed #e2e5d8; cursor: pointer; font-size: 14px; }
.opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: #16453a; flex: none; }
.tag { display: inline-block; font-size: 12px; background: #e0ebd4; color: #17503f; border-radius: 20px; padding: 1px 10px; margin-left: 6px; }
.saved-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px dashed #e2e5d8; }
.btn.sm { padding: 4px 12px; font-size: 13px; }

/* ---- coach.html ---- */
textarea { width: 100%; box-sizing: border-box; border: 1px solid #d6dbc9; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
input[type="number"], select { font-size: 15px; }

/* ---- whitelist ---- */
.wl { border: 2px solid #e2e5d8; }
.wl.sel { border-color: #16453a; background: #f7f8f3; }
.wl-head { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 16px; margin-bottom: 6px; }
.wl-head input { width: 20px; height: 20px; accent-color: #16453a; flex: none; }

/* ---- 评估状态栏 ---- */
.evalbar { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.evalbar.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.evalbar.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.evalbar.bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.evalbar a { color: inherit; font-weight: 700; }

/* ---- 客服组件 ---- */
#chatFab { position: fixed; right: 16px; bottom: 76px; width: 52px; height: 52px; border-radius: 50%;
  background: #16453a; color: #fff; border: none; font-size: 24px; cursor: pointer; z-index: 999;
  box-shadow: 0 4px 14px rgba(19,38,37,.35); }
#chatPanel { position: fixed; right: 12px; bottom: 140px; width: min(340px, calc(100vw - 24px)); height: 440px;
  max-height: 60vh; background: #fff; border-radius: 14px; z-index: 999; display: flex; flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); overflow: hidden; border: 1px solid #e2e5d8; }
#chatPanel[hidden] { display: none; }
.chat-head { background: #16453a; color: #fff; padding: 10px 12px; display: flex;
  justify-content: space-between; align-items: center; font-size: 15px; }
.chat-link { background: none; border: none; color: #fff; font-size: 13px; cursor: pointer; margin-left: 8px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #f7f8f3; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.bot { background: #fff; border: 1px solid #e2e5d8; align-self: flex-start; }
.msg.user { background: #16453a; color: #fff; align-self: flex-end; }
.chat-chips { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; background: #fff; border-top: 1px solid #e8ebdd; }
.chip { flex: none; border: 1px solid #16453a; color: #16453a; background: #fff; border-radius: 16px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chat-input { display: flex; border-top: 1px solid #e8ebdd; background: #fff; }
.chat-input input { flex: 1; border: none; padding: 12px; font-size: 14px; outline: none; }
.chat-input button { border: none; background: #16453a; color: #fff; padding: 0 18px; font-size: 14px; cursor: pointer; }
.human-card { background: #edf2e9; border: 1px dashed #16453a; border-radius: 10px; padding: 10px; text-align: center; }
.human-card img { max-width: 150px; margin: 8px auto; display: block; border-radius: 8px; }

/* 咨询漏斗卡：默认 hidden，由 FUNNEL_OPEN 控制 */
.funnel-card{border:2px solid #16453a;background:#f2f5ec}
.funnel-card[hidden]{display:none}

/* 步骤式折叠 */
.step{margin-bottom:10px;border:1px solid #dfe1d2;border-radius:12px;overflow:hidden;background:#fff}
.step-head{width:100%;display:flex;align-items:center;gap:10px;padding:14px;background:#fff;border:none;font-size:16px;text-align:left;cursor:pointer;color:#1f2937}
.step-num{width:28px;height:28px;border-radius:50%;background:#16453a;color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;flex:none;font-weight:700}
.step.done .step-num{background:#16a34a}
.step-title{font-weight:600}
.step-check{margin-left:auto;font-size:16px}
.step-arrow{color:#9ca3af;transition:transform .2s;flex:none}
.step.open .step-arrow{transform:rotate(180deg)}
.step-body{padding:2px 12px 14px}
.step-body[hidden]{display:none}
.step-body .card{margin:8px 0}

/* 语言切换器 */
.topbar{position:relative}
.langsel{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;gap:4px}
.langsel button{border:1px solid #ddd;background:#fff;border-radius:8px;padding:4px 8px;font-size:12px;cursor:pointer;color:#6b7280}
.langsel button.on{background:#16453a;color:#fff;border-color:#16453a}

/* ---------- v22: logo chip / serif headings / boundary / compare / custom cost ---------- */
.brand-mark { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: #132625; vertical-align: -6px; margin-right: 7px; align-items: center; justify-content: center; }
.brand-mark svg { width: 18px; height: 18px; }
.brand-mark path { fill: none; stroke: #c9f06b; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.hero h1, .section-title { font-family: "Noto Serif SC", "Songti SC", "STSong", serif; }
.bnd-item { border-top: 1px dashed var(--line); padding: 10px 0 2px; }
.bnd-item:first-of-type { border-top: none; padding-top: 2px; }
.bnd-item b { color: var(--brand1); }
.bnd-item p { margin: 4px 0 8px; font-size: 14px; }
.cmp-scroll { overflow-x: auto; }
.cmp-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.cmp-table th, .cmp-table td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; min-width: 128px; }
.cmp-table th { background: var(--brand1); color: #fff; font-size: 14px; }
.cmp-table td.cmp-k { background: #f2f5ec; font-weight: 700; min-width: 76px; white-space: nowrap; }

/* ---------- v23: editorial homepage (paper layout, display type, route panel) ---------- */
.v23-hero { padding: 26px 2px 8px; }
.eyebrow-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; color: #7a8b6f; font-weight: 700; text-transform: uppercase; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand2); margin-right: 7px; box-shadow: 0 0 0 3px rgba(201, 240, 107, .25); }
.eyebrow-note { font-size: 12px; color: var(--muted); text-align: right; }
.eyebrow-dark { color: #7a8b6f; }
.eyebrow-light { color: rgba(201, 240, 107, .85); }
.display-title { font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-size: clamp(40px, 11.5vw, 56px); line-height: 1.22; margin: 16px 0 14px; font-weight: 900; color: var(--ink); }
.display-title em { font-style: normal; color: #5c7355; }
.lede { font-size: 16px; line-height: 1.75; color: #3d4744; margin: 0 0 20px; }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-lime { display: inline-block; background: var(--brand2); color: #132625; font-weight: 800; font-size: 16px; padding: 13px 22px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 14px rgba(163, 196, 60, .35); transition: transform .12s ease; }
.btn-lime:active { transform: scale(.97); }
.text-link-u { color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(19, 38, 37, .35); }
.fine-note { margin: 16px 0 4px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.fine-ico { flex: none; width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 50%; font-size: 11px; line-height: 16px; text-align: center; font-style: italic; }
.route-panel { background: linear-gradient(160deg, #132625, #16453a); color: #fff; border-radius: 20px; padding: 20px; margin: 18px 0 6px; box-shadow: 0 10px 28px rgba(19, 38, 37, .25); }
.route-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .16em; color: rgba(255, 255, 255, .65); margin-bottom: 16px; }
.route-live { letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.route-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand2); display: inline-block; }
.route-row { display: flex; align-items: center; gap: 14px; }
.route-circle { flex: none; width: 66px; height: 66px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; line-height: 1.3; font-weight: 700; }
.route-circle-uc { background: var(--brand2); border-color: var(--brand2); color: #132625; }
.route-meta { flex: 1; }
.route-meta b { font-size: 17px; display: block; }
.route-meta small { color: rgba(255, 255, 255, .72); font-size: 12.5px; }
.route-tag { flex: none; font-size: 12px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 3px 12px; color: rgba(255, 255, 255, .85); }
.route-tag-lime { background: rgba(201, 240, 107, .18); border-color: rgba(201, 240, 107, .5); color: var(--brand2); }
.route-dash { display: flex; align-items: center; gap: 10px; margin: 10px 0 10px 32px; }
.dash-line { width: 1.5px; height: 30px; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .5) 0 4px, transparent 4px 8px); }
.dash-node { width: 9px; height: 9px; border-radius: 50%; background: var(--brand2); margin-left: -14px; margin-top: 22px; }
.dash-label { font-size: 12.5px; color: rgba(255, 255, 255, .75); margin-top: 22px; }
.route-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.route-chips span { font-size: 12.5px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); padding: 5px 12px; border-radius: 999px; }
.route-note { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin: 12px 0 0; }
.stat-band { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 22px 0 6px; padding: 16px 0 6px; }
.stat-cell { padding: 0 12px; border-left: 1px solid var(--line); }
.stat-cell:first-child { border-left: none; padding-left: 2px; }
.stat-cell strong { font-family: "Noto Serif SC", "Songti SC", serif; font-size: 27px; color: var(--brand1); display: block; }
.stat-cell span { font-size: 12.5px; color: var(--ink); }
.stat-cell small { color: var(--muted); font-size: 11.5px; }
.stat-link { grid-column: 1 / -1; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--brand1); text-decoration: none; }
.v23-block { padding: 22px 2px 4px; }
.block-title { font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-size: 27px; line-height: 1.35; margin: 10px 0 14px; font-weight: 900; }
.block-title em { font-style: normal; color: #5c7355; }
.flow-list { border-top: 1px solid var(--line); }
.flow-row { display: flex; gap: 14px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.flow-num { font-family: "Noto Serif SC", serif; font-size: 14px; color: #7a8b6f; font-weight: 700; flex: none; }
.flow-row div { flex: 1; }
.flow-row b { font-size: 16px; }
.flow-row p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.flow-row a { flex: none; font-size: 13px; font-weight: 700; color: var(--brand1); text-decoration: none; white-space: nowrap; }
.fit-list { border-top: 1px solid var(--line); }
.fit-row { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.fit-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #e0ebd4; color: var(--brand1); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.fit-row b { font-size: 15px; }
.fit-row p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cta-band { background: linear-gradient(150deg, #132625, #1d5c47); color: #fff; border-radius: 20px; padding: 24px 20px; margin: 20px 0 14px; }
.cta-band h2 { font-family: "Noto Serif SC", "Songti SC", serif; font-size: 26px; line-height: 1.4; margin: 10px 0 18px; font-weight: 900; }

.tag-h { background: #f0e3ba; color: #6b5510; }
