:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #f1effb;
  --line: #e4e2ef;
  --line-strong: #cfcbe3;
  --ink: #1d1b2b;
  --ink-2: #4a475e;
  --ink-3: #6e6a85;
  --brand: #5546c4;
  --brand-ink: #3e30a6;
  --brand-soft: #ebe8fb;
  --brand-line: #b9b1ee;
  --red: #b23a52;
  --red-soft: #fbecef;
  --amber: #a8670c;
  --amber-soft: #fbf2e2;
  --green: #2f7d57;
  --green-soft: #e7f4ec;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 90, .04), 0 4px 16px rgba(40, 30, 90, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--sans); }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.n, .kpi b { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; }
h1 { font-size: 40px; line-height: 1.15; letter-spacing: .5px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; color: var(--brand); font-weight: 600; }
.hidden { display: none !important; }

/* layout */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: #f3f1fb; border-right: 1px solid var(--line); padding: 22px 14px 16px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column; }
.logo { font-family: var(--serif); font-size: 34px; color: var(--brand-ink); padding: 0 12px 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.logo small { font: 12px var(--sans); color: var(--ink-3); letter-spacing: 1px; }
.nav-group { padding: 14px 0 8px; border-bottom: 1px solid var(--line); }
.nav-group > span { display: block; font-size: 11px; letter-spacing: 3px; color: var(--ink-3); font-weight: 600; padding: 0 12px 6px; }
.nav-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; border-radius: 8px; color: var(--ink); }
.nav-item:hover { background: var(--brand-soft); text-decoration: none; }
.nav-item.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item em { font-style: normal; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.nav-item.on em { color: var(--brand); }
.side-foot { margin-top: auto; padding: 14px 12px 0; font-size: 12px; color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }
.dot.off { background: var(--amber); }
.dot.none { background: var(--line-strong); }
.side-foot form { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.main { padding: 40px 48px 64px; min-width: 0; max-width: 1480px; }
.topbar { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.page-head .tag { font-family: var(--serif); color: var(--brand); font-weight: 700; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 720px; }
.head-actions { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.card.soft { background: var(--surface-2); border-color: transparent; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.scope { padding: 14px 20px; }
.scope b { color: var(--brand-ink); font-size: 12px; letter-spacing: 1px; display: block; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.kpi span { color: var(--ink-3); font-size: 13px; }
.kpi b { display: block; font-size: 28px; font-family: var(--serif); margin-top: 4px; }

/* forms */
label.f { display: block; }
label.f > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--ink-2); margin-bottom: 6px; }
label.f > span i { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  font: inherit; color: var(--ink); font-variant-numeric: tabular-nums; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-line); outline-offset: 0; border-color: var(--brand); }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.range i { color: var(--ink-3); font-style: normal; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.form-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin: 18px -24px -22px; padding: 16px 24px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--brand); color: var(--brand-ink); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand-ink); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg a, .seg button { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; color: var(--ink-2); border: 0; border-right: 1px solid var(--line); background: none; font: inherit; cursor: pointer; }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg a:hover { text-decoration: none; background: var(--surface-2); }
.seg .on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.demo { background: #fff6dd; color: #8a6510; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.t { width: 100%; border-collapse: collapse; min-width: 860px; }
table.t th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: #faf9ff; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
.pcell { display: flex; gap: 10px; align-items: center; min-width: 280px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; border: 1px solid var(--line); }
.thumb.lg { width: 96px; height: 96px; }
.ptitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.score { display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px; border-radius: 6px; font-weight: 700; background: var(--surface-2); }
.score.hi { background: var(--green-soft); color: var(--green); }
.score.mid { background: var(--brand-soft); color: var(--brand-ink); }
.score.lo { background: #f3f2f6; color: var(--ink-3); }

/* lights */
.light { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.light::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.light.red { color: var(--red); background: var(--red-soft); }
.light.yellow { color: var(--amber); background: var(--amber-soft); }
.light.green { color: var(--green); background: var(--green-soft); }
.light.pending { color: var(--ink-3); background: #f1f0f5; }
.q3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.q3 > div { padding: 20px 22px; border-right: 1px solid var(--line); }
.q3 > div:last-child { border-right: 0; }
.q3 h3 { margin: 8px 0 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 14px; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts span { display: block; font-size: 12px; color: var(--ink-3); }
.facts b { font-variant-numeric: tabular-nums; }
.verdict { border-top: 3px solid var(--brand); background: var(--surface-2); padding: 16px 20px; border-radius: 0 0 8px 8px; min-width: 260px; }
.verdict.abandon { border-color: var(--red); }
.verdict.go { border-color: var(--green); }
.verdict.caution { border-color: var(--amber); }
.verdict b { font-family: var(--serif); font-size: 26px; display: block; margin: 2px 0 6px; }
.verdict.abandon b { color: var(--red); } .verdict.go b { color: var(--green); } .verdict.caution b { color: var(--amber); }

/* list pickers */
.picker { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-height: 70vh; overflow-y: auto; }
.picker a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); min-height: 56px; }
.picker a:hover { background: var(--surface-2); text-decoration: none; }
.picker a.on { background: var(--brand-soft); }
.picker .meta { font-size: 12px; color: var(--ink-3); }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #fbfaff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 200px; display: flex; flex-direction: column; }
.col-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.col-head h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.col-head .cnt { font: 600 12px var(--sans); background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; }
.col-head .sla { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.col-head .sla input { width: 64px; min-height: 30px; padding: 4px 8px; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.kcard.demo { border-style: dashed; }
.kcard.overdue { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.kcard .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.kcard img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.kcard .kt { font-weight: 600; margin: 8px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .kp { color: var(--brand-ink); font-size: 12.5px; }
.kcard .kx { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.kcard .acts { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; margin-top: 10px; align-items: stretch; }
.kcard .acts .btn { padding: 0 8px; font-size: 13px; min-height: 40px; white-space: normal; line-height: 1.25; text-align: center; }
.kcard details { margin-top: 8px; font-size: 12.5px; }
.kcard details summary { cursor: pointer; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.empty { color: var(--ink-3); text-align: center; padding: 28px 12px; }

/* profit */
.pf { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lever { display: grid; grid-template-columns: 1fr 104px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lever label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lever input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--brand); height: 28px; }
.lever input[type=number] { min-height: 38px; text-align: right; }
.pf.brief { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpis .kpi b { font-size: 30px; }
.kpi.good b { color: var(--green); } .kpi.bad b { color: var(--red); }
.lines { width: 100%; border-collapse: collapse; margin-top: 8px; }
.lines td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.lines td:last-child, .lines td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.note { background: var(--amber-soft); color: #7a4c08; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 10px 0; }
.note.info { background: var(--brand-soft); color: var(--brand-ink); }
.note.err { background: var(--red-soft); color: var(--red); }

/* knowledge */
.libs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.lib { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); display: block; min-height: 96px; }
.lib:hover { border-color: var(--brand-line); text-decoration: none; }
.lib.on { background: var(--brand-soft); border-color: var(--brand); }
.lib b { font-size: 17px; display: flex; justify-content: space-between; }
.lib b i { font-style: normal; font-family: var(--serif); color: var(--brand-ink); }
.lib span { font-size: 12px; color: var(--ink-3); }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; margin: 16px 0; }
.flow .kpi b { font-size: 26px; }
.flow > i { color: var(--ink-3); font-style: normal; }
.article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.article:last-child { border-bottom: 0; }
.article pre { white-space: pre-wrap; font: 13px/1.7 var(--sans); color: var(--ink-2); margin: 6px 0; }

/* briefing */
.pick { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pick .pid { color: var(--brand-ink); font-weight: 700; }
.pick .obj { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.modes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.modes label { display: flex; align-items: center; justify-content: center; min-height: 52px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.modes label:nth-child(2n) { border-right: 0; }
.modes label:nth-last-child(-n+2) { border-bottom: 0; }
.modes input { position: absolute; opacity: 0; }
.modes label:has(input:checked) { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; outline: 1px solid var(--brand); outline-offset: -1px; }

/* modal & toast */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(30, 20, 80, .25); }
dialog::backdrop { background: rgba(29, 27, 43, .45); }
dialog form.m { padding: 26px 28px 22px; }
dialog .m-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
dialog .m-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; }
.err-text { color: var(--red); font-size: 12.5px; margin-top: 6px; font-weight: 600; }
.radio-card { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; }
.radio-card:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.radio-card input { accent-color: var(--brand); width: 18px; height: 18px; margin-top: 3px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
#toast.err { background: var(--red); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, #f3f1fb, #f8f8fc); }
.login { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow); }
.login .logo { border: 0; padding: 0; margin-bottom: 4px; }

@media (max-width: 1200px) {
  .main { padding: 32px 28px 56px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .libs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf, .pf.brief { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(29, 27, 43, .35); z-index: 30; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #f3f1fb; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .topbar .logo { border: 0; padding: 0; margin: 0; font-size: 26px; }
  .main { padding: 22px 16px 48px; }
  h1 { font-size: 30px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > * { min-width: 0; }
  .picker { max-height: 260px; }
  .q3 { grid-template-columns: 1fr; }
  .q3 > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .g3 { grid-template-columns: 1fr; }
  .form-grid .c3, .form-grid .c4, .form-grid .c5 { grid-column: span 6; }
  .form-grid .c8 { grid-column: span 12; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow > i { display: none; }
}
@media (max-width: 600px) {
  .g2, .g4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .libs { grid-template-columns: 1fr 1fr; }
  .form-grid .c3, .form-grid .c4, .form-grid .c5, .form-grid .c6 { grid-column: span 12; }
  .card { padding: 18px 16px; }
  .form-foot { margin: 16px -16px -18px; padding: 14px 16px; }
  .page-head { margin-bottom: 18px; }
  .head-actions, .head-actions .btn { width: 100%; }
  .head-actions > * { flex: 1 1 100%; }
  .board { grid-auto-columns: 82vw; }
  .facts { grid-template-columns: 1fr 1fr; }
}


/* Touch devices: 16px form text stops iOS from zooming on focus; 44px minimum hit targets. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  .btn, .btn.sm, button, select, input[type=checkbox] + span, .chip[role=button], summary { min-height: 44px; }
  .btn.sm { padding-left: 14px; padding-right: 14px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  input[type=range] { height: 44px; }
}
.mobile-only { display: none; }
@media (max-width: 600px) { .mobile-only { display: inline-flex; } }

/* Profit page on tablet/phone: results live below the inputs, so a fixed bar shows them while sliding. */
.pf-mini { display: none; }
@media (max-width: 1200px) {
  .pf-mini { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; gap: 16px; align-items: center;
    justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(29, 27, 43, .08); }
  .pf-mini span { display: block; font-size: 12px; color: var(--ink-3); }
  .pf-mini b { font-size: 20px; font-variant-numeric: tabular-nums; }
  .pf-mini b.good { color: var(--green); } .pf-mini b.bad { color: var(--red); }
  body:has(.pf-mini) .main { padding-bottom: 110px; }
  #pf-result { position: static !important; scroll-margin-top: 70px; }
  /* list pickers turn into a horizontal strip so the work area starts near the top */
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > * { min-width: 0; }
  .picker { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .picker a { flex: 0 0 240px; border-bottom: 0; border-right: 1px solid var(--line); scroll-snap-align: start; }
  .picker .empty { flex: 1; }
}

/* image placeholder: first character of the title instead of an empty grey box */
.thumb.ph { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 18px; }
.thumb.lg.ph { font-size: 38px; }

/* ranking: collapsible filters (closed by default on phones), column priority, phone cards */
.fbox > summary { display: none; }
@media (max-width: 1100px) {
  table.rank .c-opt { display: none; }
}
@media (max-width: 900px) {
  .fbox > summary { display: inline-flex; margin-bottom: 12px; list-style: none; }
  .fbox > summary::-webkit-details-marker { display: none; }
  .fbox > summary::before { content: "▸ "; }
  .fbox[open] > summary::before { content: "▾ "; }
  .feed > :nth-child(n+4) { display: none; }
  .feed.all > :nth-child(n+4) { display: block; }
}
@media (max-width: 600px) {
  table.rank thead { display: none; }
  table.rank, table.rank tbody { display: block; min-width: 0; }
  table.rank .pcell { min-width: 0; } table.rank .pcell > div { min-width: 0; }
  table.rank tr { display: grid; grid-template-columns: 22px repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  table.rank td { padding: 0; border: 0; text-align: left; }
  table.rank .c-rank { grid-row: 1; grid-column: 1; padding-top: 12px; }
  table.rank .c-prod { grid-row: 1; grid-column: 2 / 5; }
  table.rank .c-kv { grid-row: 2; font-size: 14px; }
  table.rank .c-kv[data-k="售价"] { grid-column: 2; } table.rank .c-kv[data-k="月销"] { grid-column: 3; } table.rank .c-kv[data-k="机会分"] { grid-column: 4; }
  table.rank .c-kv::before { content: attr(data-k); display: block; font-size: 12px; color: var(--ink-3); }
  table.rank .c-act { grid-row: 3; grid-column: 2 / 5; }
  table.rank .c-act .btn { width: 100%; }
  .table-wrap:has(table.rank) { overflow: visible; }
}
.feed-more { display: none; }
@media (max-width: 900px) { .feed-more { display: inline-flex; } }
.verdict.check { border-color: var(--amber); } .verdict.check b { color: var(--amber); }
/* candidates: thresholds folded into one summary line */
.thr-box { padding: 12px 18px; }
.thr-box > summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; cursor: pointer; list-style: none; }
.thr-box > summary::-webkit-details-marker { display: none; }
.thr-box > summary .small { flex: 1; min-width: 200px; }
.thr-box[open] > summary .btn { display: none; }
@media (min-width: 601px) and (max-width: 1100px) { table.rank { min-width: 0; } table.rank .pcell { min-width: 220px; } }
/* settings gear: sidebar logo row + mobile top bar */
.logo-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; padding-bottom: 12px; }
.logo-row .logo { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
a.gear { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 20px; color: var(--ink-2);
  text-decoration: none; border: 1px solid var(--line); background: #fff; }
a.gear:hover { color: var(--brand-ink); border-color: var(--brand); text-decoration: none; }
.topbar a.gear { width: 44px; height: 40px; }

/* ============================================================
   v2 visual system — clean cross-border workstation
   (sans headings, soft globe backdrop, glass surfaces, icon nav)
   ============================================================ */
:root {
  --bg: #fafafc;
  --surface: #ffffff;
  --surface-2: #f4f2fb;
  --line: #e9e8f0;
  --line-strong: #d7d5e2;
  --ink: #1d1c28;
  --ink-2: #4a4858;
  --ink-3: #737083;
  --brand: #5546c4;
  --brand-ink: #3e30a6;
  --brand-soft: #f4f2fb;
  --brand-line: #c9c2ef;
  --radius: 8px;
  --shadow: none;
  --shadow-pop: 0 6px 24px rgba(29, 28, 40, .10);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}
body { background: var(--bg); font-size: 14px; }

h1, h2, h3 { font-family: var(--sans); letter-spacing: 0; }
h1 { font-size: 28px; font-weight: 600; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
body { font-size: 14px; line-height: 1.6; }
.eyebrow { letter-spacing: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 19px; height: 19px; flex: none; }
.btn .ico { width: 16px; height: 16px; margin-right: 2px; vertical-align: -3px; }

/* sidebar */
.shell { grid-template-columns: 236px 1fr; }
.side { background: #fff;
  border-right: 1px solid var(--line); padding: 24px 14px 18px; }
.logo-row { border-bottom: 0; padding-bottom: 6px; margin-bottom: 6px; }
.brand { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; padding: 0 12px; text-decoration: none !important; }
.brand { display: block; }
.brand-mark { display: block; font: 600 22px/1.2 var(--sans); color: var(--brand); }
.brand small { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.nav-group { border-bottom: 0; padding: 18px 0 2px; }
.nav-group > span { font-size: 13px; letter-spacing: 1px; color: var(--ink-3); font-weight: 500; padding: 0 12px 8px; }
.nav-item { justify-content: flex-start; gap: 12px; color: var(--ink-2); border-radius: 10px; position: relative; font-size: 14.5px; }
.nav-item .ico { color: var(--ink-3); }
.nav-item:hover { background: rgba(238, 235, 253, .7); }
.nav-item.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item.on .ico { color: var(--brand); }
.nav-item.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand); }
.side-foot { padding: 16px 4px 0; border-top: 1px solid var(--line); margin-top: auto; }
.market-pill { padding: 0 8px 12px; font-size: 12px; color: var(--ink-3); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.user-row:hover { background: rgba(238, 235, 253, .7); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.user-meta { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.user-meta small { color: var(--ink-3); font-size: 12px; }
.chev { color: var(--ink-3); font-size: 18px; }
.foot-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.foot-actions .nav-item { flex: 1; min-height: 40px; padding: 8px; }
.foot-actions form { margin: 0; }

/* page head */
.main { padding: 26px 40px 64px; max-width: 1560px; }
.page-head { align-items: flex-end; margin-bottom: 18px; }
.page-head p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.crumb i { font-style: normal; margin: 0 6px; color: var(--line-strong); }
.crumb b { color: var(--brand-ink); font-weight: 600; }
.sync { align-self: center; font-size: 13px; color: var(--ink-3); text-align: right; max-width: 360px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: none; padding: 20px 24px; margin-bottom: 16px; }
.card.soft { background: var(--surface-2); border-color: transparent; }
.btn { border-radius: 10px; }
.btn.primary { background: var(--brand); border-color: var(--brand); }
.btn.outline { background: #fff; border: 1px solid var(--brand-line); color: var(--brand-ink); }
.btn.added { background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); }

/* filter bar */
.filterbar { padding: 16px 18px; }
.fb-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(150px, 200px) minmax(220px, 1fr) auto auto; gap: 12px; align-items: center; }
.fb-row > * { min-width: 0; }
.fb-market, .fb-select select, .fb-search { height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.fb-market { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 600; color: var(--ink); }
.fb-market .ico { color: #ee4d2d; }
.fb-select select { width: 100%; padding: 0 12px; font: inherit; color: var(--ink); }
.fb-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.fb-search .ico { color: var(--ink-3); }
.fb-search input { border: 0; outline: 0; flex: 1; min-width: 0; font: inherit; background: transparent; }
.fb-row .btn.primary { height: 46px; padding: 0 22px; }
.fb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.chip-on, .chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13px; text-decoration: none !important; }
.chip-on { background: var(--brand-soft); color: var(--brand-ink); }
.chip-on span { font-size: 15px; line-height: 1; }
.chip-btn { border: 1px dashed var(--brand-line); color: var(--brand-ink); }
.chip-reset { font-size: 13px; color: var(--ink-2); padding: 6px 4px; }
.fb-more { flex-basis: auto; }
.fb-more > summary { list-style: none; cursor: pointer; color: var(--brand-ink); font-size: 13px; font-weight: 600; padding: 6px 2px; }
.fb-more > summary::-webkit-details-marker { display: none; }
.fb-more > summary::after { content: " ⌄"; }
.fb-more[open] { flex-basis: 100%; }
.fb-more-grid { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }

/* market signals */
.signals { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); align-items: center; gap: 0; padding: 18px 22px; }
.signals h2 { font-size: 16px; }
.sig { display: flex; align-items: center; gap: 14px; padding: 0 22px; border-left: 1px solid var(--line); }
.sig-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sig-ic .ico { width: 22px; height: 22px; }
.sig-ic.new { background: #e3f4ea; color: #2f8a5a; }
.sig-ic.up { background: var(--brand-soft); color: var(--brand); }
.sig-ic.down { background: #fbe9ee; color: #c0405f; }
.sig > b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sig > b.good { color: #2f8a5a; } .sig > b.brandc { color: var(--brand); } .sig > b.bad { color: #c0405f; }
.sig strong { display: block; font-size: 14px; }
.sig small { color: var(--ink-3); font-size: 12px; }
.sig-note { grid-column: 1 / -1; margin: 10px 0 0; }

/* product list */
.list-card { padding: 0; overflow: hidden; }
.list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 20px 22px 16px; }
.list-head h2 { display: inline; }
.list-head .scope { margin-top: 6px; padding: 0; }
.list-card .table-wrap { border: 0; border-radius: 0; background: transparent; }
table.rank { min-width: 980px; }
table.rank th { background: #f4f2fd; color: var(--ink-2); font-size: 13px; padding: 12px 14px; border-bottom: 0; }
table.rank td { padding: 14px; border-bottom: 1px solid #efedf7; vertical-align: middle; }
table.rank tbody tr:hover { background: rgba(244, 242, 253, .55); }
.thumb.md { width: 58px; height: 58px; border-radius: 10px; }
.pcell { gap: 14px; }
.ptitle { font-weight: 600; color: var(--ink); -webkit-line-clamp: 1; }
.meta-line { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.meta-line i { font-style: normal; margin: 0 6px; color: var(--line-strong); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tags:empty { display: none; }
.sales { display: flex; align-items: center; gap: 14px; }
.sales b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.sales small { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.good { color: #2f8a5a; } .bad { color: #c0405f; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark polygon { fill: var(--brand); opacity: .09; stroke: none; }
.spark.down polyline { stroke: #8f84d8; }
.spark-none { color: var(--line-strong); }
.lvl { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }
.lvl.high { background: #fde9ee; color: #c0405f; }
.lvl.mid { background: #e8f0fd; color: #2f62c9; }
.lvl.low { background: #e3f4ea; color: #2f8a5a; }
.lvl.unknown { background: #f0eff4; color: var(--ink-3); }
.pstat { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; background: #f0eff4; color: var(--ink-2); }
.pstat.select { background: #fff4e5; color: #a8670c; }
.pstat.measure { background: #e8f0fd; color: #2f62c9; }
.pstat.done { background: #fde9ee; color: #c0405f; }
.pstat.done.ok { background: #e3f4ea; color: #2f8a5a; }
table.rank .acts { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
table.rank .acts .link { font-size: 13px; font-weight: 600; white-space: nowrap; }
table.rank .acts .btn { min-width: 96px; }
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px 18px; }
.list-foot .ico { width: 15px; height: 15px; vertical-align: -3px; }
.pager { display: flex; gap: 8px; }
.pg { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-2); text-decoration: none !important; background: #fff; }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg.off { pointer-events: none; opacity: .4; }
.list-card .empty { padding: 40px 22px; }

@media (max-width: 1200px) {
  .fb-row { grid-template-columns: 1fr 1fr; }
  .fb-search { grid-column: 1 / -1; }
  .signals { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .signals h2 { grid-column: 1 / -1; }
  .sig:first-of-type { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .list-head .seg { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .list-head .seg a { text-align: center; }
  .topbar { background: #fff; border-bottom: 1px solid var(--line); }
  .topbar a.gear .ico { width: 22px; height: 22px; }
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 24px; }
  .page-head { align-items: flex-start; }
  .sync { text-align: left; }
  .signals { grid-template-columns: 1fr; }
  .sig { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .sig:first-of-type { border-top: 0; }
}
@media (max-width: 600px) {
  .fb-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .filterbar { padding: 14px; }
  .list-head { padding: 16px 16px 12px; }
  table.rank { min-width: 0; }
  table.rank td { padding: 0; border: 0; }
  table.rank tr { border-bottom: 1px solid #efedf7; padding: 14px 16px; }
  table.rank .c-sales .spark { width: 64px; }
  table.rank .acts { justify-content: space-between; }
  table.rank .acts .btn { flex: 1; }
  .list-foot { padding: 12px 16px 16px; }
}
.pstat, .lvl, table.rank .acts .link, table.rank td.n { white-space: nowrap; }
@media (max-width: 600px) {
  table.rank tr { grid-template-columns: 22px repeat(3, minmax(0, 1fr)); }
  table.rank .ptitle { -webkit-line-clamp: 2; }
  table.rank .thumb.md { width: 52px; height: 52px; }
  table.rank .c-sales .sales { gap: 8px; }
  table.rank .c-sales .spark { display: none; }
  .head-actions { width: 100%; }
}
.topbar .brand { padding: 0; } .topbar .brand-mark { font-size: 20px; } .list-head .seg a { white-space: nowrap; font-size: 13px; }
/* v2: retire the serif display face everywhere */
.kpi b, .verdict b, .page-head .tag, .login .logo, .flow .kpi b, .card-head b { font-family: var(--sans); }
.kpi b { font-weight: 700; letter-spacing: -.3px; }
.login-wrap { background: transparent; }

.login .logo { font-size: 34px; font-weight: 700; color: var(--brand); }

/* ===== Login (Kaiselect) — brand typography, whitespace, flat dot map ===== */
body.auth { background: #fbfbfd; min-height: 100vh; }
.auth-top { display: flex; align-items: baseline; gap: 20px; width: calc(100% - 96px); max-width: 1304px; margin: 0 auto; padding: 36px 0 20px; border-bottom: 1px solid #ecebf2; }
.auth-brand { font: 600 26px/1.2 var(--sans); color: var(--brand); }
.auth-desc { font-size: 14px; color: var(--ink-3); }
.auth-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: clamp(48px, 7vw, 120px); max-width: 1400px; margin: 0 auto; padding: 88px 48px 64px; align-items: start; }
.auth-hero h1 { font-size: clamp(30px, 2.6vw, 36px); font-weight: 500; line-height: 1.35; color: var(--ink); }
.auth-hero > p { margin: 10px 0 0; font-size: 17px; color: var(--ink-3); letter-spacing: .5px; }
.auth-map { display: block; width: 100%; max-width: 760px; height: auto; margin: 64px 0 0; opacity: .5; }
.auth-panel h2 { font-size: 28px; font-weight: 500; line-height: 1.35; }
.auth-sub { margin: 8px 0 40px; color: var(--ink-3); font-size: 15px; }
.af { display: block; font-size: 14px; color: var(--ink); font-weight: 500; margin: 0 0 8px; }
.ai { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d9d7e3; border-radius: 8px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.ai::placeholder { color: #a5a3b3; }
.ai:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(85, 70, 196, .14); }
.ai[aria-invalid="true"] { border-color: #c0405f; }
.apw { position: relative; }
.apw .ai { padding-right: 52px; }
.eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink-3); border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.eye:hover, .eye[aria-pressed="true"] { color: var(--brand); }
.eye:focus-visible { outline: 2px solid var(--brand); }
.aerr { margin: 6px 0 0; font-size: 13px; color: #b23a52; }
.apw + .aerr, .ai + .aerr { margin-bottom: 0; }
#login-form .af:not(:first-of-type) { margin-top: 24px; }
.abtn { width: 100%; height: 48px; margin-top: 32px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: 600 16px var(--sans); cursor: pointer; }
.abtn:hover { background: var(--brand-ink); }
.abtn:focus-visible { outline: 3px solid rgba(85, 70, 196, .35); outline-offset: 2px; }
.abtn:disabled { opacity: .7; cursor: progress; }
.auth-note { margin: 20px 0 0; font-size: 13px; color: var(--ink-3); }
@media (max-width: 1100px) {
  .auth-main { grid-template-columns: 1fr 1fr; padding-top: 64px; }
}
@media (max-width: 780px) {
  .auth-top { width: calc(100% - 40px); padding: 20px 0 14px; }
  .auth-main { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 40px; }
  .auth-hero h1 { font-size: 26px; }
  .auth-hero > p { font-size: 15px; }
  .auth-map { display: none; }
  .auth-panel h2 { font-size: 22px; }
  .auth-sub { margin-bottom: 24px; }
}

/* ===== Work pages (calm v3): flat surfaces, compact signal bar ===== */
.shell { background: var(--bg); }
.main { padding: 28px clamp(20px, 3vw, 44px) 64px; }
.page-head h1 { font-size: 28px; }
.ptitle { -webkit-line-clamp: 2; }
.meta-line .ext { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-strong); }
.meta-line .ext:hover { color: var(--brand-ink); }
.signals-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.signals-bar > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 18px; cursor: pointer; list-style: none; }
.signals-bar > summary::-webkit-details-marker { display: none; }
.sb-title { font-weight: 600; color: var(--ink); }
.sb-item { color: var(--ink-2); font-size: 13.5px; }
.sb-item b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.sb-scope { color: var(--ink-3); font-size: 12.5px; flex: 1 1 280px; }
.sb-more { color: var(--brand-ink); font-size: 13px; font-weight: 600; }
.signals-bar[open] .sb-more { visibility: hidden; }
.sb-list { list-style: none; margin: 0; padding: 4px 18px 0; border-top: 1px solid var(--line); max-height: 320px; overflow: auto; }
.sb-list li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1f0f5; font-size: 13.5px; }
.sb-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.signals-bar[open] { padding-bottom: 12px; }
.signals-bar[open] > p { padding: 0 18px; }
.filterbar, .list-card { box-shadow: none; }
table.rank th { background: #f7f6fb; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.nav-item.on::before { left: -14px; }

/* ===== Candidate decision (v3) ===== */
.shell { background: linear-gradient(to right, #fff 236px, var(--bg) 236px); }
@media (max-width: 900px) { .shell { background: var(--bg); } }
.cd-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 28px; padding: 24px; }
.cd-prod { display: flex; gap: 18px; min-width: 0; }
.cd-prod-main { min-width: 0; flex: 1; }
.cd-title { font-size: 18px; font-weight: 600; line-height: 1.45; margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cd-kv { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 10px; }
.cd-kv dt { font-size: 12px; color: var(--ink-3); }
.cd-kv dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-kv dd small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.cd-why > summary { cursor: pointer; font-size: 13px; color: var(--brand-ink); }
.cd-why p { margin: 6px 0 0; }
.ext { display: inline-block; margin-top: 8px; color: var(--ink-3); }
.cd-verdict { border-left: 1px solid var(--line); padding-left: 28px; }
.cd-k { font-size: 12.5px; color: var(--ink-3); letter-spacing: .5px; }
.cd-verdict > b { display: block; font-size: 24px; font-weight: 600; margin: 4px 0 6px; color: var(--ink); }
.cd-verdict.abandon > b { color: #b23a52; } .cd-verdict.go > b { color: #2f7d57; } .cd-verdict.caution > b, .cd-verdict.check > b { color: #a8670c; }
.cd-verdict p { margin: 0 0 8px; color: var(--ink-2); }
.cd-flag { font-size: 13px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); }
.cd-flag.warn { background: #fbf2e2; color: #7a4a08; }
.cd-next { margin: 14px 0 10px; }
.cd-next .btn { width: 100%; justify-content: center; }
.cd-sec { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--brand-ink); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.cd-q { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.cd-q > section { padding: 20px 22px; }
.cd-q header { display: flex; justify-content: space-between; align-items: center; }
.cd-q h3 { margin: 6px 0 8px; }
.cd-judge { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.cd-judge span { display: inline-block; font-size: 12px; color: var(--brand-ink); background: var(--surface-2); border-radius: 4px; padding: 0 6px; margin-right: 6px; }
.cd-q .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 12px; border-top: 1px solid var(--line); }
.cd-q .facts > div { padding: 10px 0; border-bottom: 1px solid #f0eff5; }
.cd-q .facts dt { font-size: 12px; color: var(--ink-3); }
.cd-q .facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.gap { font-weight: 500; font-size: 12.5px; color: #a8670c; }
.bands { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 4px; }
.bands caption { text-align: left; padding-bottom: 4px; }
.bands th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 4px 0; }
.bands td { padding: 4px 0 4px 8px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1100px) { .cd-head { grid-template-columns: 1fr; } .cd-verdict { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }
@media (max-width: 600px) { .cd-prod { flex-direction: column; } .cd-head { padding: 16px; } }
.bands th { white-space: nowrap; }
body:not(.auth) { background: linear-gradient(to right, #fff 236px, var(--bg) 236px); }
@media (max-width: 900px) { body:not(.auth) { background: var(--bg); } }
.auth-hero h1, .page-head h1, .cd-title { text-wrap: balance; }

/* ===== v3 extended pages: quotes, profits, board, briefing, knowledge, management ===== */
.auth-panel form .af + .ai, .auth-panel form .ai + .af { margin-top: 0; }
.auth-panel form .ai { margin-bottom: 18px; }
.af small { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.auth-panel .note { margin: 0 0 18px; }

/* empty states: a title, one line of guidance, optional action */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty b { color: var(--ink); font-weight: 600; font-size: 15px; }
.empty span { max-width: 420px; line-height: 1.6; }
.empty .btn { margin-top: 8px; }
.empty.small { padding: 18px 12px; }

/* product workspace header (quotes / profits) */
.wk-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.wk-head.slim { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 16px 20px; }
.wk-prod { display: flex; gap: 16px; min-width: 0; }
.wk-main { min-width: 0; flex: 1; }
.wk-title { font-size: 17px; font-weight: 600; line-height: 1.45; margin: 4px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-head.slim .wk-title { margin: 0 0 4px; font-size: 15.5px; }
.wk-state { border-left: 1px solid var(--line); padding-left: 24px; }
.wk-now { margin: 14px 0 12px; color: var(--ink-2); }
.wk-now .cd-k { display: block; margin-bottom: 2px; }
.wk-now b { font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.btn.wide { width: 100%; justify-content: center; }

/* flow progress */
.flow { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; font-size: 12.5px; }
.flow li { flex: 1; position: relative; }
.flow li + li::before { content: ""; position: absolute; left: -50%; right: 50%; top: 11px; height: 1px; background: var(--line-strong); z-index: 0; }
.flow li.done + li::before { background: var(--brand); }
.flow a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-3); text-align: center; white-space: nowrap; }
.flow a:hover { text-decoration: none; color: var(--brand-ink); }
.flow i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; }
.flow li.done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.flow li.here a { color: var(--brand-ink); font-weight: 600; }
.flow li.here:not(.done) i { border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-soft); }
.wk-head.slim .flow { min-width: 340px; }

/* section heads */
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.sec-head h2 { font-size: 17px; margin: 0; }

/* quote runs & offers */
.run { padding: 0; overflow: hidden; }
.run-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fbfbfd; flex-wrap: wrap; }
.run-head .small { margin-left: 8px; }
.run > .note, .run > p { margin: 12px 18px; }
.st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); }
.st.ok { background: var(--green-soft); color: var(--green); } .st.bad { background: var(--red-soft); color: var(--red); }
.offer { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid #f0eff5; }
.offer:last-child { border-bottom: 0; }
.offer .thumb { width: 58px; height: 58px; }
.offer.chosen { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.offer-title { font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer .ext { margin: 0; }
.tiers { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.tiers b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.offer-why { font-size: 12.5px; color: var(--brand-ink); margin-top: 4px; }
.offer-act { display: flex; align-items: center; gap: 6px; }
.offer-act input { width: 84px; min-height: 36px; text-align: right; }
.q-tools > summary { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; cursor: pointer; list-style: none; }
.q-tools > summary::-webkit-details-marker { display: none; }
.q-tools > summary::after { content: "展开"; margin-left: auto; font-size: 13px; color: var(--brand-ink); }
.q-tools[open] > summary::after { content: "收起"; }
.q-tools[open] > summary { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.q-tools h3 { font-size: 15px; margin-bottom: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* profit: input → assumptions → result */
.step-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 12px; }
.step-h i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 600; }
.step-h small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.pf-res { position: sticky; top: 16px; }
.verdict-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
.verdict-box b { display: block; font-size: 20px; font-weight: 600; margin: 2px 0 4px; }
.verdict-box p { margin: 0; }
.verdict-box.go { border-color: #bfe0cd; background: var(--green-soft); } .verdict-box.go b { color: var(--green); }
.verdict-box.no { border-color: #f0d6a8; background: var(--amber-soft); } .verdict-box.no b { color: #8a5508; }
.kpis .kpi { padding: 12px 16px; } .kpis .kpi b { font-size: 24px; font-family: var(--sans); }
.kpis .kpi span { font-size: 12.5px; }

/* board */
.statbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 14px; }
.statbar > div span { font-size: 12.5px; color: var(--ink-3); display: block; }
.statbar > div b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.statbar > div small { font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.statbar p { margin: 0 0 0 auto; }
.col { background: #f7f6fb; }
.col-head h3 { font-family: var(--sans); font-size: 14.5px; }
.col-empty { color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 18px 8px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.kcard img { aspect-ratio: 16/9; }

/* briefing: conclusion / evidence / gaps / next */
.br-task { font-size: 18px; margin: 4px 0 6px; }
.br-sec { padding: 14px 0; border-top: 1px solid var(--line); }
.br-sec:first-of-type { border-top: 0; }
.br-sec > h3 { display: flex; align-items: center; gap: 10px; font-size: 14.5px; margin: 0 0 8px; font-family: var(--sans); }
.br-sec > h3 i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); border-radius: 4px; padding: 1px 8px; }
.br-lead { font-size: 15px; line-height: 1.75; margin: 0; color: var(--ink); }
.pick-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.pick-t { color: var(--ink-2); font-size: 13px; flex: 1; min-width: 0; }
.conf { font-size: 12px; color: var(--ink-3); background: var(--surface-2); border-radius: 4px; padding: 0 6px; }
.pick:last-child { border-bottom: 0; }
.br-list { margin: 0; padding-left: 20px; } .br-list li { margin: 4px 0; }
.gap-list li::marker { color: var(--amber); }
.modes label { border-radius: 8px; }

/* knowledge */
.search-lg { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; background: #fff; }
.search-lg:focus { outline: 2px solid var(--brand-line); border-color: var(--brand); }

/* shared calm overrides */
.kpi { box-shadow: none; }
.kpi b { font-family: var(--sans); font-weight: 600; }
.page-head p { max-width: 720px; }
.picker a.on { box-shadow: inset 3px 0 0 var(--brand); }
dialog { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(29, 28, 40, .14); }
dialog::backdrop { background: rgba(29, 28, 40, .32); }

@media (max-width: 1100px) {
  .wk-head { grid-template-columns: 1fr; }
  .wk-state { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .wk-head.slim { grid-template-columns: 1fr; }
  .wk-head.slim .flow { min-width: 0; }
  .pf-res { position: static; }
}
@media (max-width: 600px) {
  .offer { grid-template-columns: 48px minmax(0, 1fr); padding: 12px 14px; }
  .offer .thumb { width: 48px; height: 48px; }
  .offer-act { grid-column: 1 / -1; justify-content: flex-end; }
  .flow { font-size: 11.5px; }
  .statbar { gap: 8px 20px; } .statbar p { margin: 0; flex-basis: 100%; }
  .wk-prod .thumb.lg { width: 72px; height: 72px; }
}
.card.thr-box { padding: 12px 18px; }
.thr-box > summary .eyebrow { flex: none; }
.thr-box > summary .small.muted { flex: 1 1 260px; text-align: left; }
.lines td + td { padding-left: 14px; white-space: nowrap; }
#k-total { font-size: 18px !important; line-height: 1.4; }

/* filter bar at medium widths: search and 筛选 share one row, no orphaned button */
@media (max-width: 1200px) and (min-width: 601px) {
  .fb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .fb-row > .fb-search { grid-column: 1 / 3; grid-row: 2; }
  .fb-row > .btn.primary { grid-column: 3; grid-row: 2; }
  .fb-row > .fb-search ~ .fb-select { grid-column: 3; grid-row: 1; }
  .fb-row:not(:has(.fb-search ~ .fb-select)) > .fb-select { grid-column: 2 / 4; }
}
.picker a.dropped { opacity: .62; }
.picker a.dropped.on { opacity: 1; }
.drop-tag { color: var(--red); font-weight: 600; }
