/* 择机 · 样式
   设计原则：内容优先；一种强调色（朱红）只用在“该行动的地方”；衬线字体用于标题和数字。 */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --sunken: #f3f0ea;
  --ink: #1c1b19;
  --ink-2: #57534e;
  --ink-3: #8f8a82;
  --line: #e8e3da;
  --line-strong: #d6cfc3;
  --accent: #b4441f;
  --accent-ink: #ffffff;
  --accent-bg: #f8ebe3;
  --green: #2f7a4f;
  --green-bg: #e7f1ea;
  --blue: #2f5d8a;
  --blue-bg: #e8eef5;
  --red: #b42318;
  --red-bg: #fbeceb;
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Noto Sans Mono CJK SC", monospace;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 4px 16px rgba(28, 27, 25, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151413;
    --surface: #1e1c1a;
    --sunken: #191816;
    --ink: #ece8e1;
    --ink-2: #b9b2a7;
    --ink-3: #847e75;
    --line: #2f2c28;
    --line-strong: #423e38;
    --accent: #e07a52;
    --accent-ink: #1a1009;
    --accent-bg: #34221a;
    --green: #6cc493;
    --green-bg: #1b2a21;
    --blue: #8fb3dc;
    --blue-bg: #1b2430;
    --red: #f08b80;
    --red-bg: #33201e;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link, .prose a, p a { color: var(--accent); }
a.link:hover, .prose a:hover, p a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.35; }
h2 { font-size: 19px; line-height: 1.4; }
h3 { font-size: 16px; }
p { margin: 0; }
small, .small { font-size: 13px; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.nowrap { white-space: nowrap; }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 28px; height: 60px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .08em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  position: relative; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px;
}
.nav-links a:hover { color: var(--ink); background: var(--sunken); }
.nav-links a.on { color: var(--ink); font-weight: 600; }
.nav-links a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent);
}
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center;
  font-weight: 600; vertical-align: 1px;
}
.nav-side { display: flex; gap: 14px; font-size: 13.5px; color: var(--ink-3); }
.nav-side a:hover, .nav-side a.on { color: var(--ink); }

/* ---------- 页面骨架 ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 40px 28px 96px; }
.page-head { margin-bottom: 28px; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-head .lead { margin-top: 10px; max-width: 680px; color: var(--ink-2); }
.page-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow { font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }
.eyebrow a:hover { color: var(--ink); }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head .more { font-size: 13.5px; color: var(--ink-3); }
.section-head .more:hover { color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.flash {
  max-width: 1120px; margin: 16px auto 0; padding: 0 28px;
}
.flash div {
  padding: 10px 16px; border-radius: 10px; background: var(--green-bg); color: var(--green); font-size: 14px;
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 16px; }
.panel h3 { margin-bottom: 10px; }
.panel.tight { padding: 16px 18px; }
.panel.sunken { background: var(--sunken); box-shadow: none; }
.hint { color: var(--ink-3); font-size: 13.5px; }
.empty { color: var(--ink-3); font-size: 14px; padding: 18px 0; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- 按钮与表单 ---------- */
button, .btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1;
  padding: 10px 16px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
button:hover, .btn:hover { border-color: var(--ink-3); }
.btn-primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, button.primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-quiet, button.quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.btn-quiet:hover, button.quiet:hover { color: var(--ink); background: var(--sunken); border-color: transparent; }
button.danger { background: transparent; color: var(--red); border-color: transparent; }
button.danger:hover { background: var(--red-bg); }
button.small, .btn.small { padding: 7px 11px; font-size: 13px; }
form.inline { display: inline; }

input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px;
}
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
label { display: block; font-size: 13px; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: 6px; font-size: 15px; }
label.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.fields { display: grid; gap: 16px; }
.fields.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fields.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.row > input { flex: 1; min-width: 160px; width: auto; }
.row > select { width: auto; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.fold > summary { color: var(--ink-2); font-size: 14px; }
details.fold > summary::before { content: "+ "; color: var(--ink-3); }
details.fold[open] > summary::before { content: "− "; }
details.fold[open] > summary { margin-bottom: 12px; }

/* ---------- 小部件 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 20px; padding: 0 8px;
  border-radius: 6px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; font-weight: 500;
}
.chip.accent { background: var(--accent-bg); color: var(--accent); }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.blue { background: var(--blue-bg); color: var(--blue); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.dot.validated { background: var(--green); }
.dot.gap { background: var(--accent); }
.dot.underrated { background: var(--blue); }
.dot.weak { background: var(--line-strong); }

.score {
  flex: none; width: 44px; text-align: center; font-family: var(--serif); font-size: 22px; font-weight: 700;
  line-height: 1; color: var(--ink-3);
}
.score small { display: block; font-family: var(--sans); font-size: 11px; font-weight: 400; margin-top: 4px; color: var(--ink-3); }
.score.hot { color: var(--accent); }
.score.warm { color: var(--ink); }

/* 列表行 */
.list { border-top: 1px solid var(--line); }
.item {
  display: flex; gap: 18px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line);
}
a.item:hover { background: var(--surface); }
a.item:hover .item-title { color: var(--accent); }
.item-body { flex: 1; min-width: 0; }
.item-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.item-meta { margin-top: 3px; font-size: 13px; color: var(--ink-3); display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.item-side { flex: none; text-align: right; font-size: 13px; color: var(--ink-3); }
.clip { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 标签页 */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-x: auto; }
.tabs a {
  padding: 10px 0; color: var(--ink-3); font-size: 14.5px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 600; border-color: var(--accent); }
.tabs .n { margin-left: 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.filters a {
  font-size: 13px; padding: 4px 11px; border-radius: 20px; color: var(--ink-2); border: 1px solid var(--line);
  display: inline-flex; gap: 6px; align-items: center;
}
.filters a:hover { border-color: var(--ink-3); }
.filters a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* 引用（证据原话） */
.quote { padding: 14px 0 14px 18px; border-left: 2px solid var(--accent); margin: 14px 0; }
.quote-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.75; color: var(--ink); max-height: 22em; overflow: auto; }
.quote-meta { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.quote-meta a:hover { color: var(--accent); }
details.original { margin-top: 6px; }
details.original summary { font-size: 12.5px; color: var(--ink-3); }
details.original .quote-text { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.ai-note { margin-top: 8px; font-size: 13px; color: var(--ink-2); background: var(--sunken); border-radius: 8px; padding: 6px 10px; }

/* ---------- 首页 ---------- */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 36px; }
.hero .lead { margin-top: 12px; color: var(--ink-2); font-size: 16px; max-width: 620px; }
.capture {
  margin-top: 28px; display: flex; gap: 10px; align-items: center; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px 8px 8px 20px; box-shadow: var(--shadow);
  max-width: 760px;
}
.capture:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.capture input[type=text] { border: none; box-shadow: none; padding: 10px 0; font-size: 16px; background: transparent; }
.capture input[type=text]:focus { box-shadow: none; }

  content: "→"; position: absolute; left: 4px; top: 30px; color: var(--line-strong); font-size: 16px;
}

.callout {
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: 28px; padding: 20px 24px; border-radius: var(--radius); background: var(--accent-bg);
}
.callout h3 { color: var(--accent); }
.callout p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }

.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.matrix a { background: var(--surface); padding: 14px 16px; }
.matrix a:hover { background: var(--sunken); }
.matrix b { font-family: var(--serif); font-size: 24px; font-weight: 600; display: block; line-height: 1.2; }
.matrix span { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.matrix-axes { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin: 8px 2px 0; }

.mini-list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini-list a:last-child { border-bottom: none; }
.mini-list a:hover .item-title { color: var(--accent); }

/* ---------- 详情页 ---------- */
.detail-head h1 { font-size: 28px; }
.detail-head .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.facts { display: grid; grid-template-columns: 96px 1fr; gap: 12px 18px; margin: 0; }
.facts dt { color: var(--ink-3); font-size: 13.5px; padding-top: 1px; }
.facts dd { margin: 0; }
.facts dd.missing { color: var(--ink-3); font-style: italic; }

.meter { display: grid; grid-template-columns: 56px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.meter .bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--ink-2); border-radius: 3px; }
.meter .bar.pay i { background: var(--accent); }
.meter .v { text-align: right; color: var(--ink-3); }
.big-score { display: flex; align-items: baseline; gap: 6px; }
.big-score b { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 700; }
.big-score span { color: var(--ink-3); }

.next { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.next h3 { font-size: 15px; }
.next p { margin-top: 4px; color: var(--ink-2); font-size: 14px; }

.product-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.product-row:last-child { border-bottom: none; }
.product-row .item-body p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.money { font-family: var(--serif); font-weight: 600; font-size: 16px; white-space: nowrap; }
.money small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11.5px; color: var(--ink-3); text-align: right; }

  font-size: 14px; color: var(--ink-2); max-height: none; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
}

.timeline { list-style: none; padding: 0; margin: 14px 0 0; }
.timeline li { position: relative; padding: 0 0 16px 20px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--accent); }

.hypothesis { font-family: var(--serif); font-size: 18px; line-height: 2; color: var(--ink-3); }
.hypothesis em, .hypothesis a {
  font-style: normal; color: var(--ink); padding: 0 2px;
  background: linear-gradient(transparent 62%, var(--accent-bg) 0);
}
.hypothesis a:hover { color: var(--accent); }
.hypothesis .blank { color: var(--ink-3); border-bottom: 1px dashed var(--line-strong); }

table.fit { width: 100%; border-collapse: collapse; }
table.fit td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
table.fit tr:last-child td { border-bottom: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; padding: 4px 11px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg label + label span { border-left: 1px solid var(--line-strong); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:checked + span.no { background: var(--red); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.column h3 { font-family: var(--sans); font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.column.on h3 { border-color: var(--accent); color: var(--ink); }
.opp-card { display: block; margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.opp-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.opp-card .item-title { font-size: 14.5px; }
.opp-card p { font-size: 13px; color: var(--ink-3); margin-top: 6px; }



textarea.prompt { font-family: var(--mono); font-size: 12.5px; background: var(--sunken); }
.star { border: none; background: none; padding: 4px; font-size: 16px; color: var(--line-strong); }
.star.on { color: #d4a017; }
.star:hover { color: #d4a017; border: none; }

footer.foot { max-width: 1120px; margin: 0 auto; padding: 24px 28px 40px; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-2.even { grid-template-columns: 1fr; gap: 28px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-inner { padding: 0 16px; gap: 14px; height: auto; flex-wrap: wrap; padding-top: 10px; }
  .nav-links { order: 3; width: 100%; flex: none; overflow-x: auto; margin: 0 -8px; padding-bottom: 6px; }
  .nav-links a.on::after { bottom: -6px; }
  .nav-side { margin-left: auto; }
  main { padding: 24px 16px 72px; }
  .flash { padding: 0 16px; }
  h1, .detail-head h1 { font-size: 24px; }
  .hero h1 { font-size: 28px; }
  .capture { flex-wrap: wrap; padding: 10px 12px; }
  .capture input[type=text] { flex: 1 1 100%; }
    .board, .fields.cols-3, .fields.cols-2 { grid-template-columns: 1fr 1fr; }
  .item { gap: 12px; }
  .item-side { display: none; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  footer.foot { padding: 20px 16px 32px; }
}
@media (max-width: 420px) {
  .board { grid-template-columns: 1fr; }
}

/* ---------- 卡片（全站统一的模块） ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
}
a.card { color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(28,27,25,.05), 0 10px 28px rgba(28,27,25,.07); transform: translateY(-1px); }
a.card:hover .item-title, a.card:hover .card-title { color: var(--accent); }
.card.sunken { background: var(--sunken); box-shadow: none; }
.card.soft { background: var(--accent-bg); border-color: transparent; box-shadow: none; }
.card.compact { padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.cards > .card + .card, .cards .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .more { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.card-head .more:hover { color: var(--accent); }
.card-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.card-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.card-body { flex: 1; font-size: 14px; color: var(--ink-2); }
.card-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3);
}
.card-foot .spacer { flex: 1; }
.card .list { border-top: none; }
.card .list .item:last-child { border-bottom: none; }
.card .item { padding-left: 0; padding-right: 0; }
.card .quote { margin: 12px 0 0; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: stretch; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.stack-cards { display: flex; flex-direction: column; gap: 16px; }
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 40px 0 14px; }
.group-title h2 { margin: 0; }
.group-title .hint { margin: 0; }

/* 数据卡片 */
.stat b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.15; font-weight: 600; }
.stat span { font-size: 13.5px; color: var(--ink-3); }
.stat small { display: block; margin-top: 6px; color: var(--ink-3); }
a.stat:hover b { color: var(--accent); }

/* 状态点 */
.state { display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.state.ok::before { background: var(--green); }
.state.bad::before { background: var(--red); }
.state.idle::before { background: var(--line-strong); }

/* 卡片里的大数字 */
.big-num { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.card .money { text-align: left; font-size: 18px; }
.card .money small { display: inline; text-align: left; margin-left: 6px; }

@media (max-width: 900px) {
  .cards.cols-3, .cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .cards, .cards.cols-2, .cards.cols-3, .cards.small { grid-template-columns: minmax(0, 1fr); }
  .cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .stat b { font-size: 26px; }
}
.clip-4 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; max-height: none; }
.card .quote-text.clip-4 { font-size: 14px; color: var(--ink-2); }
.card .ai-note { margin-top: 12px; }
.empty-state.card { padding: 48px 20px; align-items: center; }
.clip-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.board > .card + .card { margin-top: 0; }
.column.card h3 { padding-bottom: 8px; }
.grid-2 > .card + aside, .grid-2 > div > .card:first-child { margin-top: 0; }
.card .facts { margin: 0; }
.card .hypothesis { font-size: 17px; }
.card.stat span { font-size: 13px; color: var(--ink-3); }
.card .product-row:first-of-type { padding-top: 4px; }
.card-foot .money { color: var(--ink); }
.card-foot .money.muted { color: var(--ink-3); }
.card .product-row:has(+ .card-foot), .card .product-row:has(+ details.card-foot) { border-bottom: none; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap { width: 100%; max-width: 380px; padding: 24px 16px; margin: 0; }

/* ---------- 手机：App 式底部导航 ---------- */
.tabbar { display: none; }
@media (max-width: 680px) {
  body { font-size: 16px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .nav-links { display: none; }
  .nav-inner { flex-wrap: nowrap; height: 54px; padding-top: 0; }
  .nav-side { gap: 18px; font-size: 14.5px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 60px; font-size: 12px; color: var(--ink-3);
  }
  .tabbar a.on { color: var(--accent); font-weight: 600; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .badge { position: absolute; top: 5px; left: calc(50% + 6px); margin: 0; font-size: 10.5px; min-width: 17px; line-height: 17px; }
  button, .btn { min-height: 40px; padding: 10px 16px; font-size: 15px; }
  button.small, .btn.small { min-height: 36px; padding: 8px 13px; font-size: 14px; }
  input, select, textarea { font-size: 16px; padding: 11px 12px; }  /* 16px 以上，安卓输入时不会自动放大页面 */
  .card-title, .item-title { font-size: 16.5px; }
  .card-body, .quote-text { font-size: 15px; }
  .hint, .quote-meta, .card-foot, small, .small { font-size: 13.5px; }
  .flash { position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 31; margin: 0; }
  .flash div { box-shadow: 0 6px 24px rgba(0,0,0,.18); }
  footer.foot { display: none; }
}

/* 底部导航：去掉浏览器默认的方形点按高亮，改成图标背后的圆角胶囊 */
.tabbar a { -webkit-tap-highlight-color: transparent; outline: none; }
.tabbar a::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 58px; height: 30px; margin-left: -29px;
  border-radius: 15px; background: transparent; transform: scale(.6); opacity: 0;
  transition: transform .18s ease, opacity .18s ease, background-color .18s ease;
}
.tabbar a > * { position: relative; }
.tabbar a.on::before { background: var(--accent-bg); transform: scale(1); opacity: 1; }
.tabbar a:active::before { background: color-mix(in srgb, var(--accent) 22%, transparent); transform: scale(1); opacity: 1; }
.tabbar a:focus-visible::before { opacity: 1; transform: scale(1); box-shadow: 0 0 0 2px var(--accent); }
.tabbar svg { margin-top: 2px; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }
button:active, .btn:active { filter: brightness(.94); }
a.card:active { transform: scale(.995); }
