/* 前台（门户 / 实训 / 采集 / 登录）样式
   语言：薄雾底色上的白色数据面，茶绿负责动作与品牌，琥珀只标“你在这里 / 主推”，红只表示失败。 */
:root {
  --ink: #17302b;
  --ink-2: #3e5750;
  --muted: #6b7f79;
  --bg: #eef2ef;
  --surface: #ffffff;
  --surface-2: #f5f8f6;
  --line: #d6e0da;
  --line-strong: #b9c9c1;
  --brand: #1f6f5f;
  --brand-deep: #124a3e;
  --brand-soft: #e1efe9;
  --accent: #c97a1b;
  --accent-soft: #fbefdb;
  --ok: #2f8f5b;
  --ok-soft: #e2f3e8;
  --warn: #9a6a0a;
  --warn-soft: #fdf2dc;
  --bad: #b4362f;
  --bad-soft: #fbe3e1;
  --info: #2d5c8f;
  --info-soft: #e3edf8;
  --r-sm: 6px;
  --r-md: 10px;
  --r-pill: 999px;
  --w: 1200px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .6rem; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 600; }
small { font-size: .86rem; }
.muted { color: var(--muted); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- 顶栏 ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { max-width: var(--w); margin: 0 auto; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); font-size: 1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 1.9rem; height: 1.9rem; border-radius: .55rem; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.nav { display: flex; gap: .15rem; flex: 1; }
.nav a { padding: .42rem .75rem; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.user-box { display: flex; align-items: center; gap: .6rem; }
.user-name { color: var(--muted); font-size: .9rem; }
.inline-form { display: inline; }

/* ---------- 模块条：模块名 + 子页签 + “怎么用” ---------- */
.modbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.modbar-inner { max-width: var(--w); margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1rem; min-height: 46px; }
.modbar-name { font-weight: 700; color: var(--brand-deep); padding-right: 1rem; border-right: 1px solid var(--line); line-height: 1; }
.modbar-tabs { display: flex; gap: .1rem; flex: 1; overflow-x: auto; }
.modbar-tabs a { padding: .8rem .7rem; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .95rem; }
.modbar-tabs a:hover { color: var(--brand-deep); text-decoration: none; }
.modbar-tabs a.active { color: var(--brand-deep); border-bottom-color: var(--accent); font-weight: 600; }
.modbar-help { font: inherit; font-size: .9rem; color: var(--brand-deep); background: var(--brand-soft); border: 0; border-radius: var(--r-pill); padding: .35rem .85rem; cursor: pointer; }
.modbar-help[aria-expanded="true"] { background: var(--brand); color: #fff; }
.guide { background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.guide[hidden] { display: none; }
.guide-inner { max-width: var(--w); margin: 0 auto; padding: 1rem 1.25rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; }
.guide-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; counter-reset: step; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .5rem; font-size: .9rem; line-height: 1.5; }
.guide-steps li::before { content: counter(step); grid-column: 1; grid-row: 1 / span 2; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; margin-top: .1rem; }
.guide-steps b { grid-column: 2; display: block; color: var(--ink); }
.guide-steps span { grid-column: 2; color: var(--ink-2); }
[id] { scroll-margin-top: 4.5rem; }
.guide-aside { font-size: .86rem; color: var(--ink-2); border-left: 1px solid rgba(18, 74, 62, .18); padding-left: 1.25rem; }
.guide-aside p { margin-bottom: .4rem; }
@media (max-width: 900px) { .guide-inner { grid-template-columns: minmax(0, 1fr); } .guide-aside { border-left: 0; padding-left: 0; } }

/* ---------- 页面骨架 ---------- */
.container { max-width: var(--w); width: 100%; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; flex: 1; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; text-align: center; padding: 1rem; }
.messages { margin-bottom: 1rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .lead { color: var(--ink-2); margin: .3rem 0 0; max-width: 60ch; }
.page-head .crumbs { font-size: .86rem; color: var(--muted); margin-bottom: .3rem; }
.page-head .crumbs a { color: var(--muted); }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.section { margin-top: 1.5rem; }
.section-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.section-head h2 { font-size: 1.05rem; }
.section-head .desc { color: var(--muted); font-size: .88rem; }
.section-head .actions { margin-left: auto; display: flex; gap: .4rem; }
.section-title { margin: 1.5rem 0 .6rem; font-size: 1.05rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
.two-col.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two-col.wide { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.stack > * + * { margin-top: 1rem; }

/* ---------- 面 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.25rem; }
.card + .card { margin-top: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: .6rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.card-head .desc { color: var(--muted); font-size: .86rem; }
.card.quiet { background: var(--surface-2); border-color: transparent; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card-link { color: inherit; display: block; }
.card-link:hover { text-decoration: none; border-color: var(--brand); }
.card-link h3 { color: var(--brand-deep); }
.table-card { padding: 0; overflow: auto; }
.table-card > .table-note { padding: .6rem 1rem; color: var(--muted); font-size: .86rem; border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); padding: 1.75rem 1rem; text-align: center; }
.empty b { display: block; color: var(--ink-2); margin-bottom: .2rem; }

/* 入口卡（门户首页等） */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.25rem; color: inherit; display: flex; flex-direction: column; gap: .35rem; }
.entry:hover { text-decoration: none; border-color: var(--brand); }
.entry h3 { color: var(--brand-deep); font-size: 1.05rem; }
.entry p { color: var(--ink-2); font-size: .9rem; margin: 0; }
.entry .entry-go { margin-top: auto; padding-top: .5rem; font-size: .88rem; color: var(--brand); font-weight: 600; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 600; white-space: nowrap; font-size: .84rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.highlight td { background: var(--accent-soft); }
.table-nowrap th, .table-nowrap td { white-space: nowrap; }
.table .sub { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
.table-compact th, .table-compact td { padding: .45rem .7rem; }
.count { color: var(--muted); font-size: .88rem; margin: .6rem 0; }

/* 键值对 */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem 1.5rem; margin: 0; }
.kv > div { display: flex; flex-direction: column; gap: .05rem; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { margin: 0; font-weight: 500; }
.kv.one { grid-template-columns: minmax(0, 1fr); }
.kv.one dd { font-weight: 400; white-space: pre-line; }
.detail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem 1.5rem; margin: 0; }
.detail-list div { display: flex; flex-direction: column; }
.detail-list dt { color: var(--muted); font-size: .8rem; }
.detail-list dd { margin: 0; font-weight: 500; }

/* 条件行：替代“A · B · C” */
.conds { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.conds li { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .2rem .6rem; font-size: .84rem; color: var(--ink-2); }
.conds li b { color: var(--ink); font-weight: 600; margin-left: .25rem; }

/* ---------- 按钮 / 标签 / 提示 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .95rem; border-radius: var(--r-sm); border: 1px solid var(--brand); background: var(--brand-soft); color: var(--brand-deep); font: inherit; font-weight: 500; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: #d0e7dd; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.btn-sm { padding: .3rem .65rem; font-size: .86rem; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tag { display: inline-block; padding: .12rem .55rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.tag-published, .tag-ok, .tag-pass, .tag-reviewed { background: var(--ok-soft); color: var(--ok); }
.tag-pending, .tag-warn, .tag-draft { background: var(--warn-soft); color: var(--warn); }
.tag-rejected, .tag-fail, .tag-danger { background: var(--bad-soft); color: var(--bad); }
.tag-neutral { background: #e8ecef; color: #4a5b63; }
.tag-submitted { background: var(--info-soft); color: var(--info); }
.tag-accent, .tag-primary { background: var(--accent-soft); color: #8a5210; }
.alert { padding: .7rem 1rem; border-radius: var(--r-sm); margin-bottom: .75rem; border: 1px solid transparent; font-size: .92rem; }
.alert-success { background: var(--ok-soft); color: #1f6b3f; border-color: #c0e3cd; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: #c4d8ee; }
.alert-warning { background: var(--warn-soft); color: #7b5607; border-color: #f1dfb0; }
.alert-error { background: var(--bad-soft); color: var(--bad); border-color: #f1c4c0; }
.alert ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.hint { font-size: .86rem; color: var(--muted); }
.note { background: var(--surface-2); border-left: 3px solid var(--brand); padding: .6rem .9rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .9rem; color: var(--ink-2); }
.callout { background: var(--accent-soft); border: 1px solid #f0d9ae; border-radius: var(--r-sm); padding: .7rem 1rem; font-size: .92rem; }

/* ---------- 表单 ---------- */
.form-card { max-width: 920px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem 1.25rem; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.form-field label { font-weight: 600; font-size: .9rem; }
.form-field .req { color: var(--bad); }
.form-field input, .form-field select, .form-field textarea, .filter-bar input, .filter-bar select {
  font: inherit; padding: .5rem .65rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); width: 100%; min-width: 0;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .filter-bar input:focus, .filter-bar select:focus { outline: 2px solid #bcdcd0; outline-offset: 0; border-color: var(--brand); }
.form-field input[type=checkbox] { width: auto; align-self: flex-start; margin: .6rem 0; transform: scale(1.15); }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--bad); }
.form-field .error { color: var(--bad); font-size: .84rem; }
.form-field small.muted { font-size: .82rem; }
.form-field .errorlist { margin: 0; padding: 0; list-style: none; color: var(--bad); font-size: .84rem; }
.form-actions { margin-top: 1.1rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.check { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.check input { width: auto; margin: 0; }
.filter-bar { display: flex; gap: .6rem 1rem; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .form-field { min-width: 140px; flex: 1; }
.filter-bar .form-field.grow { flex: 2.5; min-width: 220px; }
.filter-bar .form-field.auto { flex: 0; min-width: auto; }
.filter-bar .checks { display: flex; gap: .8rem; align-items: center; padding-bottom: .55rem; }
.login-wrap { display: grid; place-items: center; min-height: 60vh; }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: .9rem; }

/* ---------- 指标 ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem 1rem; }
.kpi .label { color: var(--muted); font-size: .82rem; }
.kpi .value { font-size: 1.5rem; font-weight: 700; margin-top: .1rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .value small { font-size: .8rem; font-weight: 400; color: var(--muted); margin-left: .2rem; }
.kpi .sub { color: var(--muted); font-size: .8rem; }
.chip-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); padding: .2rem .65rem; border-radius: var(--r-pill); font-size: .84rem; }
.chip:hover { border-color: var(--brand); color: var(--brand-deep); text-decoration: none; }
.chip b { color: var(--ink); margin-left: .35rem; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 280px; }
.chart.tall { height: 380px; }
.score-bar { height: 8px; background: #e6ebe8; border-radius: 4px; overflow: hidden; min-width: 70px; }
.score-bar i { display: block; height: 100%; background: var(--brand); }
.score { display: flex; align-items: center; gap: .5rem; }
.explain { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; padding-left: 1rem; line-height: 1.45; }
.explain li + li { margin-top: .1rem; }
details.sub { font-size: .84rem; }
details.sub > summary { cursor: pointer; color: var(--brand); }
details > summary { cursor: pointer; }
.pagination { display: flex; gap: .4rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .35rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; font-size: .9rem; }
.pagination span.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.anchor-nav { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; list-style: none; }
.anchor-nav a { display: inline-block; padding: .3rem .7rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.anchor-nav a:hover { border-color: var(--brand); color: var(--brand-deep); text-decoration: none; }
.alert-list { margin: 0; padding: 0; list-style: none; }
.alert-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.alert-list li:last-child { border-bottom: 0; }

/* ---------- 实训：四步轨道（全站唯一的“抢眼”元素） ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 1.1rem 0 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.step { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .85rem 1rem; color: inherit; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: 0; }
.step:hover { text-decoration: none; background: var(--surface-2); }
.step .no { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.step b { display: block; font-size: .95rem; }
.step .muted { font-size: .8rem; display: block; line-height: 1.35; }
.step.done .no { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.step.done .no::before { content: "✓"; }
.step.done .no span { display: none; }
.step.current { background: var(--accent-soft); }
.step.current .no { background: var(--accent); color: #fff; border-color: var(--accent); }
.step.current b { color: #8a5210; }
.step.current::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }

/* 候选商品卡 */
.item-list { display: grid; gap: .75rem; }
.item-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; }
.item-card.is-primary { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.item-card .item-title { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.item-card .item-title h3 { font-size: 1.02rem; }
.item-card .item-title .spec { color: var(--muted); font-size: .88rem; }
.item-card .item-tools { display: flex; gap: .35rem; align-items: flex-start; }
.item-card .item-body { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .75rem 1.5rem; }
@media (max-width: 760px) { .item-card .item-body { grid-template-columns: minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .4rem .9rem; margin: 0; }
.facts div { display: flex; flex-direction: column; }
.facts dt { color: var(--muted); font-size: .76rem; }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .95rem; }
.facts dd small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.item-card .item-side { font-size: .88rem; }
.item-card .item-side dt { color: var(--muted); font-size: .78rem; }
.item-card .item-side dd { margin: 0 0 .4rem; }

/* AI 选品建议 */
.reco-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem 1rem; align-items: end; }
.reco-form .form-field label { font-size: .84rem; }
.reco-form .btn { height: 2.45rem; }
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; margin-top: 1rem; }
.reco-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.reco-card .reco-rank { color: var(--muted); font-size: .78rem; }
.reco-card h3 { font-size: 1rem; }
.reco-main { display: flex; align-items: baseline; gap: .9rem; }
.reco-main .big { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.reco-main .big small { font-size: .78rem; font-weight: 400; color: var(--muted); display: block; }
.reco-main .second { font-size: .9rem; color: var(--ink-2); }
.reco-card .reco-why { margin: 0; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-2); }
.reco-card .reco-why li { margin-bottom: .15rem; }
.reco-card .reco-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; align-items: center; margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--line); }
.reco-card .reco-add input { font: inherit; padding: .4rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); min-width: 0; }
.reco-side { display: grid; gap: .75rem; margin-top: 1rem; }
.reco-side ul { margin: .3rem 0 0; padding-left: 1.2rem; font-size: .88rem; }

/* 测算结果 */
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.result-box { border-radius: var(--r-sm); padding: .8rem .95rem; border: 1px solid var(--line); background: var(--surface-2); }
.result-box .label { color: var(--muted); font-size: .8rem; }
.result-box .big { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.result-box small { display: block; color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.result-box.ok { border-color: #bfe0cc; background: var(--ok-soft); }
.result-box.ok .big { color: #1f6b3f; }
.result-box.warn { border-color: #f1dfb0; background: var(--warn-soft); }
.result-box.warn .big { color: var(--warn); }
.result-box.bad { border-color: #f1c4c0; background: var(--bad-soft); }
.result-box.bad .big { color: var(--bad); }
.sim-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .6rem; }
.sim-head b { font-size: 1rem; }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.checklist li { display: flex; gap: .55rem; align-items: baseline; font-size: .95rem; }
.checklist li::before { content: "○"; color: var(--muted); font-size: .9rem; }
.checklist li.done::before { content: "✓"; color: var(--ok); font-weight: 700; }
.checklist li.done { color: var(--ink-2); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; align-items: center; }
.timeline li:last-child { border-bottom: 0; }

/* ---------- 弹窗 ---------- */
.modal { width: min(980px, calc(100vw - 2rem)); height: min(740px, calc(100vh - 3rem)); height: min(740px, calc(100dvh - 3rem)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--r-md); background: var(--surface); color: var(--ink); box-shadow: 0 18px 48px rgba(18, 48, 40, .28); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(23, 48, 43, .45); }
html:has(.modal[open]) { overflow: hidden; }
.modal-box { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem .75rem; }
.modal-head h2 { font-size: 1.1rem; }
.modal-head p { margin: .2rem 0 0; font-size: .88rem; }
.modal-x { font: inherit; font-size: 1.4rem; line-height: 1; width: 2rem; height: 2rem; flex: none; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.modal-x:hover { background: var(--surface-2); color: var(--ink); }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; padding: .8rem 1.25rem; border-top: 1px solid var(--line); }

/* 产品对比：选择弹窗（卡片网格） */
.compare-tip { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.empty .btn { margin-top: .4rem; }
.picker-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem .75rem; padding: 0 1.25rem .8rem; border-bottom: 1px solid var(--line); }
.picker-tools .chip-list { flex: 1 1 24rem; min-width: 0; padding-top: .3rem; }
.picker-tools input[type=search] { font: inherit; flex: 0 1 14rem; min-width: 0; padding: .42rem .65rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.picker-tools input[type=search]:focus { outline: 2px solid #bcdcd0; outline-offset: 0; border-color: var(--brand); }
button.chip { font: inherit; font-size: .84rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed="true"] b { color: inherit; }
.picker-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.25rem; background: var(--surface-2); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; align-content: start; }
.picker-grid .empty { grid-column: 1 / -1; }
.pick { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .7rem 2.5rem .7rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; user-select: none; }
.pick[hidden] { display: none; }
.pick:hover { border-color: var(--brand); }
.pick input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-title { line-height: 1.35; }
.pick-meta { font-size: .82rem; color: var(--muted); }
.pick-no { position: absolute; top: .65rem; right: .65rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: #fff; font-size: .76rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick.is-on { background: var(--brand-soft); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pick.is-on .pick-no { background: var(--brand); border-color: var(--brand); }
.pick.is-off { opacity: .45; cursor: not-allowed; }
.pick.is-off:hover { border-color: var(--line); }
.picker-picked { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; flex: 1; min-width: 0; min-height: 1.9rem; margin: 0; padding: 0; list-style: none; }
.picker-picked:empty::before { content: "还没有选择产品"; color: var(--muted); font-size: .86rem; }
.picker-picked li { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .25rem .2rem .3rem; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-deep); font-size: .86rem; font-weight: 500; }
.picker-picked li i { width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; }
.picker-picked li button { font: inherit; width: 1.35rem; height: 1.35rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--brand-deep); line-height: 1; cursor: pointer; }
.picker-picked li button:hover { background: rgba(18, 74, 62, .12); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .two-col, .two-col.even, .two-col.wide, .three-col { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { flex-wrap: wrap; gap: .5rem .9rem; }
  .nav { order: 3; flex: 0 0 100%; overflow-x: auto; }
  .user-box { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .modbar-name { display: none; }
}
@media (max-width: 560px) {
  html { font-size: 14px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .item-card { grid-template-columns: minmax(0, 1fr); }
}
