/* 阅信云 nextgen 组件（见信办事）。只用 tokens.css 的变量，不写裸色值。
   顺序：基础 → 骨架（桌、纸、目录、旁注、底部五个词）→ 信 → 句 → 据 → 账 → 表单与按钮 → 状态与提示 → 运营内部纸面。
   虚线只留给三处，意思都是「还不是事实」或「沿此分开」：草稿单的边、估算金额的下划线、齿孔线。 */

/* ───────── 基础 ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--desk); color: var(--ink-2);
  font: 400 var(--fs-body)/var(--lh-body) var(--font);
  line-break: strict; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
b, strong { font-weight: 600; color: var(--ink); }
i, em { font-style: normal; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
a:hover { color: var(--action); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: var(--r-blank); }
.nb { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.mono { font: 400 var(--fs-mono)/var(--lh-mono) var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.quiet { color: var(--ink-3); }
.fact { color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack { display: grid; gap: var(--s3); }
.stack--lg { gap: var(--s6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.split { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); }
[hidden] { display: none !important; }
@media (max-width: 759px) { .only-wide { display: none !important; } }
@media (min-width: 760px) { .only-narrow { display: none !important; } }

/* ───────── 骨架：顶栏 ───────── */
.top { position: sticky; top: 0; z-index: 20; background: var(--desk); border-bottom: 1px solid var(--line); }
.top__in {
  max-width: 1200px; height: var(--h-top); margin: 0 auto; padding: 0 var(--s4);
  display: grid; grid-template-columns: minmax(0, 1fr) 420px minmax(0, 1fr); align-items: center; gap: var(--s4);
}
.top__left { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.top__right { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand img { width: 24px; height: 24px; display: block; }
.space, .topbtn {
  appearance: none; display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--r-control); background: none; color: var(--ink);
  font: 400 var(--fs-nav)/var(--lh-nav) var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; min-width: 0;
}
.space { border-color: var(--line); max-width: 100%; }
.space span { overflow: hidden; text-overflow: ellipsis; }
.topbtn:hover, .space:hover { border-color: var(--edge); }
.ask {
  appearance: none; display: flex; align-items: center; gap: var(--s2); width: 100%; height: 36px; padding: 0 var(--s3);
  border: 1px solid var(--edge); border-radius: var(--r-control); background: var(--paper); color: var(--ink-3);
  font: 400 var(--fs-nav)/var(--lh-nav) var(--font); text-align: left; cursor: text; white-space: nowrap; overflow: hidden;
}
.who {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control);
  background: var(--sunk); border: 1px solid var(--line); color: var(--ink); font: 600 var(--fs-nav)/1 var(--font);
}
.top__title { font: 600 var(--fs-title)/var(--lh-title) var(--font); color: var(--ink); white-space: nowrap; }
.pubnav { display: flex; align-items: center; justify-content: center; gap: var(--s6); }
.pubnav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-nav); white-space: nowrap; padding: 8px 0; }
.pubnav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: 0 2px 0 var(--action); }
.addr { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); min-width: 0; }
.addr b { font: 600 var(--fs-mono)/var(--lh-mono) var(--mono); }

/* ───────── 骨架：目录、纸、旁注 ───────── */
.frame { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: var(--w-toc) minmax(0, 1fr); align-items: start; }
.frame--solo { max-width: 1000px; grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: var(--h-top); padding: var(--s8) var(--s6) var(--s8) var(--s4); }
.toc a {
  display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-left: 3px solid transparent;
  color: var(--ink-2); font: 400 var(--fs-nav)/var(--lh-nav) var(--font); text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); font-weight: 600; border-left-color: var(--action); }
.toc .toc__sub a { min-height: 36px; padding-left: 28px; font-size: var(--fs-small); }
.toc .toc__sub a[aria-current] { border-left-color: transparent; text-decoration: underline; text-decoration-color: var(--action); text-underline-offset: 4px; }
.toc__more { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.toc__count { margin-left: 6px; font: 600 var(--fs-label)/var(--lh-label) var(--font); color: var(--heed); background: var(--heed-wash); border-radius: var(--r-label); padding: 1px 6px; }

.paper { position: relative; min-height: calc(100vh - var(--h-top)); padding: var(--s8) 0 96px; }
.paper::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--w-read);
  background: var(--paper); border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.paper--wide::before { width: 100%; }
.row { position: relative; display: grid; grid-template-columns: var(--w-read) minmax(0, var(--w-side)); }
.row + .row { margin-top: var(--s6); }
.row > .main { min-width: 0; padding: 0 40px; }
.row > .side { min-width: 0; padding: 2px 0 0 var(--s6); color: var(--ink-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.paper--wide .row { grid-template-columns: minmax(0, 1fr); }
.note { position: relative; }
.note + .note { margin-top: var(--s4); }
.note::before { content: ""; position: absolute; left: calc(-1 * var(--s6)); top: 10px; width: var(--s4); border-top: 1px solid var(--edge); }
.note b { display: block; color: var(--ink-2); }
.note > span { display: block; }
.note .m--est, .note .m--held { font-weight: 400; }

.pagehead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); margin-bottom: var(--s4); }
.pagehead h1 { font: 600 var(--fs-title)/var(--lh-title) var(--font); color: var(--ink); }
.pagefoot {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s12); padding-top: var(--s4);
  border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3);
}
.pagefoot a { color: var(--ink-2); }
.sec { display: flex; align-items: center; gap: var(--s3); margin: var(--s8) 0 var(--s3); font: 600 var(--fs-small)/var(--lh-small) var(--font); color: var(--ink-3); }
.sec::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.sec:first-child { margin-top: 0; }
.sec a, .sec button { font-weight: 400; }
.subnav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s6); margin-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.subnav a { padding: 10px 0; color: var(--ink-2); text-decoration: none; font-size: var(--fs-nav); }
.subnav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: 0 2px 0 var(--action); }
/* phone: one line that scrolls sideways inside itself (the page never scrolls sideways) */
@media (max-width: 759px) { .subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .subnav::-webkit-scrollbar { display: none; } .subnav a { flex: none; white-space: nowrap; } }

/* 底部五个词（<1180 px）：只有字 */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--h-tabs) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper); border-top: 1px solid var(--edge);
}
.tabs a { position: relative; display: grid; place-items: center; color: var(--ink-2); font: 400 var(--fs-nav)/var(--lh-nav) var(--font); text-decoration: none; }
.tabs a[aria-current] { color: var(--action); font-weight: 600; }
.tabs a[aria-current]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 28px; margin-left: -14px; border-top: 3px solid var(--action); }

@media (max-width: 1179px) {
  .frame { max-width: var(--w-read); grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .tabs { display: grid; }
  .paper::before { width: 100%; }
  .paper { padding-bottom: calc(var(--h-tabs) + 64px); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .side { padding: var(--s3) 40px 0; }
  .note::before { display: none; }
  /* 窄屏：旁注收成句子下面的一行小字，只露标题；.note--open 的保持展开 */
  .row > .side { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
  .note + .note { margin-top: 0; }
  .note:not(.note--open) > span { display: none; }
  .note:not(.note--open) b { display: inline; font-weight: 400; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
  .note:not(.note--open) b::after { content: " ›"; }
  .note--open { flex-basis: 100%; padding-left: var(--s3); border-left: 1px solid var(--edge); }
  .top__in { grid-template-columns: minmax(0, 1fr) minmax(0, 320px) auto; }
}
@media (max-width: 759px) {
  .top__in { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); padding: 0 var(--s4); }
  .top__in > .ask, .pubnav { display: none; }
  .paper { padding-top: var(--s4); }
  .paper::before { border-left: 0; border-right: 0; }
  .row > .main { padding: 0 var(--s4); }
  .row > .side { padding: var(--s3) var(--s4) 0; }
  .row + .row { margin-top: var(--s4); }
  .space { max-width: 132px; }
  .space, .topbtn { min-height: var(--tap); }
}
body[data-shell="public"] .paper, body[data-shell="page"] .paper { padding-bottom: var(--s12); }
body[data-shell="public"] .tabs, body[data-shell="page"] .tabs { display: none; }

/* ───────── 信 ───────── */
.letter__date { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--s3); margin-bottom: var(--s4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.letter__hi { margin-bottom: var(--s1); color: var(--ink-2); }
.lead { font: 600 var(--fs-note)/var(--lh-note) var(--font); color: var(--ink); margin-bottom: var(--s3); text-wrap: pretty; }
.letter p + p { margin-top: var(--s2); }
.letter__sign { margin-top: var(--s4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.head { font: 600 var(--fs-head)/var(--lh-head) var(--font); color: var(--ink); text-wrap: balance; }
.matter { position: relative; display: grid; gap: var(--s3); padding-left: 28px; }
.matter__no { position: absolute; left: 0; top: 0; font-weight: 600; color: var(--ink-3); }
.row--matter { padding-top: 20px; }
.row--matter::before { content: ""; position: absolute; top: 0; left: 40px; width: calc(var(--w-read) - 80px); border-top: 1px solid var(--line); }
@media (max-width: 1179px) { .row--matter::before { left: 40px; right: 40px; width: auto; } }
@media (max-width: 759px) { .row--matter::before { left: var(--s4); right: var(--s4); } .matter { padding-left: 0; } .matter__no { position: static; float: left; margin-right: var(--s2); } }
.matter__why { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }

/* ───────── 句 ───────── */
.say { font: 400 var(--fs-sentence)/var(--lh-sentence) var(--font); color: var(--ink); text-wrap: pretty; }
.say--lg { font-size: var(--fs-note); line-height: 2.375rem; }
.blank {
  appearance: none; position: relative; display: inline-block; margin: 0 2px; padding: 0 6px; border: 0;
  border-bottom: 2px solid var(--draft); border-radius: var(--r-blank) var(--r-blank) 0 0; background: var(--draft-wash);
  color: var(--draft); font: inherit; font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: pointer; vertical-align: baseline;
}
.blank::before { content: ""; position: absolute; inset: -9px -3px; }
.blank::after { content: ""; display: inline-block; margin-left: 5px; vertical-align: middle; border: 4px solid transparent; border-top-color: currentColor; border-bottom-width: 0; }
.blank--empty { font-weight: 400; }
.blank[aria-expanded="true"] { background: var(--draft); color: var(--paper); }
.src { display: inline-block; margin-left: 2px; padding: 2px 6px; border-radius: var(--r-label); background: var(--sunk); color: var(--ink-3); font: 600 var(--fs-label)/var(--lh-label) var(--font); white-space: nowrap; vertical-align: 2px; }
.src--ai { background: var(--draft-wash); color: var(--draft); }
.then { position: relative; padding-left: 20px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.then::before { content: ""; position: absolute; left: 0; top: 10px; width: 12px; border-top: 1px solid var(--edge); }
.then--heed, .then--stop { padding: var(--s2) var(--s3); border-radius: var(--r-control); }
.then--heed { background: var(--heed-wash); color: var(--heed); }
.then--stop { background: var(--stop-wash); color: var(--stop); }
.then--heed::before, .then--stop::before { display: none; }
.then--heed b, .then--stop b { color: inherit; }

/* 选择面板：桌面在蓝字下方，手机从底部出来；永远有「自己填」 */
.picker { width: 320px; max-width: 100%; padding: var(--s2); border: 1px solid var(--edge); border-radius: var(--r-slip); background: var(--sheet); }
.picker__t { padding: var(--s2) var(--s3); font: 600 var(--fs-small)/var(--lh-small) var(--font); color: var(--ink-3); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--tap); padding: var(--s2) var(--s3); border-radius: var(--r-control); color: var(--ink); cursor: pointer; }
.opt small { color: var(--ink-3); font-size: var(--fs-small); }
.opt[aria-checked="true"] { background: var(--draft-wash); color: var(--draft); font-weight: 600; }
.opt[aria-checked="true"] small { color: var(--draft); font-weight: 400; }
.opt--risk { color: var(--heed); border-top: 1px solid var(--line); border-radius: 0; }
.veil { position: fixed; inset: 0; z-index: 30; background: var(--veil); }
.panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 80vh; overflow: auto; padding: var(--s3) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom, 0px)); border-radius: var(--r-panel) var(--r-panel) 0 0; background: var(--sheet); border-top: 1px solid var(--edge); }
.panel__grip { width: 36px; margin: 0 auto var(--s3); border-top: 3px solid var(--line); border-radius: 2px; }
@media (min-width: 760px) { .panel { left: 50%; right: auto; bottom: auto; top: 96px; width: 560px; margin-left: -280px; border: 1px solid var(--edge); border-radius: var(--r-panel); } .panel__grip { display: none; } }

/* ───────── 据：草稿单 → 回执（同一张卡） ───────── */
.slip { position: relative; --behind: var(--paper); border: 1px dashed var(--draft); border-radius: var(--r-slip); background: var(--sheet); }
.slip__top { display: grid; gap: var(--s3); padding: var(--s4) 20px; }
.slip__bot { position: relative; display: grid; gap: var(--s3); padding: var(--s4) 20px; border-top: 1px dashed var(--edge); }
.slip__bot::before, .slip__bot::after {
  content: ""; position: absolute; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--behind); border: 1px solid var(--draft);
}
.slip__bot::before { left: -9px; clip-path: inset(-1px -1px -1px 7px); }
.slip__bot::after { right: -9px; clip-path: inset(-1px 7px -1px -1px); }
.slip--receipt { border: 1px solid var(--edge); }
.slip--receipt .slip__bot::before, .slip--receipt .slip__bot::after { border: 1px solid var(--edge); }
.slip--sample { background: none; }
.slip__kind { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--s3); font: 600 var(--fs-small)/var(--lh-small) var(--font); color: var(--draft); }
.slip__kind span { font-weight: 400; color: var(--ink-3); }
.slip__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.rhead { display: grid; gap: 2px; }
.rhead__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); font: 600 var(--fs-title)/var(--lh-title) var(--font); color: var(--ink); }
.rhead__name .mono { font-weight: 400; color: var(--ink-2); }
.rhead__line { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.amt { font: 600 var(--fs-amount)/var(--lh-amount) var(--font); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.amt-cn { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.kv { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); gap: 6px var(--s4); font-size: var(--fs-small); line-height: var(--lh-small); }
.kv dt { color: var(--ink-3); }
.kv dd { color: var(--ink); min-width: 0; }
.fixed { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.verify { display: flex; flex-wrap: wrap; gap: 2px var(--s4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }

/* 钱的三态：估 / 留 / 实。不靠颜色单独表达：估和留带字标 */
.m { font-variant-numeric: tabular-nums; white-space: nowrap; }
.m--est { color: var(--draft); text-decoration: underline dashed; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.m--held { color: var(--draft); text-decoration: underline solid; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.m--set { color: var(--ink); font-weight: 600; }
.m__tag { display: inline-block; margin-right: 4px; padding: 0 4px; border: 1px solid currentColor; border-radius: var(--r-label); font: 600 var(--fs-label)/var(--lh-label) var(--font); vertical-align: 1px; text-decoration: none; }

/* 流转行：四个点 */
.routing { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); font-size: var(--fs-small); line-height: var(--lh-small); }
.routing li { position: relative; padding: 18px var(--s2) 0 0; color: var(--ink-3); }
.routing li::before { content: ""; position: absolute; top: 2px; left: 0; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--edge); background: var(--sheet); }
.routing li::after { content: ""; position: absolute; top: 7px; left: 14px; right: 4px; border-top: 1px solid var(--edge); }
.routing li:last-child::after { display: none; }
.routing li b { display: block; color: inherit; font-weight: 400; }
.routing li.is-done { color: var(--ink-2); }
.routing li.is-done b { color: var(--ink); font-weight: 600; }
.routing li.is-done::before { background: var(--action); border-color: var(--action); }
.routing li.is-now b { color: var(--draft); font-weight: 600; }
.routing li.is-now::before { border-color: var(--draft); border-width: 3px; }
@media (max-width: 759px) {
  .routing { grid-auto-flow: row; }
  .routing li { padding: 0 0 var(--s3) 22px; }
  .routing li::before { top: 5px; }
  .routing li::after { top: 18px; bottom: 0; left: 4.5px; right: auto; border-top: 0; border-left: 1px solid var(--edge); }
  .routing li:last-child { padding-bottom: 0; }
  .routing li b { display: inline; margin-right: var(--s2); }
}

/* 两个人的事：两行 */
.two { display: grid; }
.two li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 var(--s2); padding: 10px 0; border-top: 1px solid var(--line); }
.two li:first-child { border-top: 0; }
.two li > i { color: var(--ink-3); font-weight: 600; }
.two li small { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.two li.is-done b::after { content: ""; }
.two li.is-wait b { color: var(--draft); }

/* 没办成：哪一步、钱动没动、下一步、请求编号 */
.why { display: grid; gap: var(--s3); padding: var(--s4) 20px; border: 1px solid var(--heed); border-radius: var(--r-slip); background: var(--sheet); }
.why--stop { border-color: var(--stop); }
.why__t { font: 600 var(--fs-title)/var(--lh-title) var(--font); color: var(--ink); }
.why__money { color: var(--ink); font-weight: 600; }
.why__ref { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }

/* AI 版面板 */
.twin { display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-slip); background: var(--sunk); }
.twin pre { font: 400 var(--fs-mono)/var(--lh-mono) var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ───────── 账 ───────── */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-small); line-height: var(--lh-small); }
.tbl th { padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--edge); color: var(--ink-3); font-weight: 600; text-align: left; white-space: nowrap; vertical-align: bottom; }
.tbl td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td b { font-weight: 600; }
.tbl tfoot td { border-bottom: 0; border-top: 1px solid var(--edge); color: var(--ink); font-weight: 600; }
.scroll-x { overflow-x: auto; }
/* 手机上的账：两行一条，不横向滚动 */
.rows > li, .rows > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.rows > :first-child { border-top: 0; }
.rows__a { color: var(--ink); min-width: 0; }
.rows__v { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows__b { grid-column: 1 / -1; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.rows__b2 { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }

/* 月历账本：每天一格写当天花了多少；今天这格是估 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal__h { padding: 6px var(--s2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sunk); color: var(--ink-3); font: 600 var(--fs-label)/var(--lh-label) var(--font); }
.cal__d { position: relative; display: grid; align-content: space-between; gap: var(--s2); min-height: 64px; padding: 6px var(--s2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.cal__d .n { font: 400 var(--fs-label)/var(--lh-label) var(--font); color: var(--ink-3); }
.cal__d .v { text-align: right; font: 600 var(--fs-small)/var(--lh-small) var(--font); font-variant-numeric: tabular-nums; color: var(--ink); }
.cal__d.is-out { background: var(--sunk); }
.cal__d.is-today { box-shadow: inset 0 0 0 1px var(--draft); }
.cal__d.is-today .v { color: var(--draft); font-weight: 400; text-decoration: underline dashed; text-underline-offset: 3px; }
.cal__d.is-open { background: var(--action-wash); box-shadow: inset 0 -3px 0 var(--action); }
.cal__d.is-open .n { color: var(--ink); font-weight: 600; }
@media (max-width: 759px) { .cal__d { min-height: 56px; padding: 4px; } .cal__d .v { font-size: var(--fs-label); } .cal__h { padding: 4px; text-align: center; } }

/* 上限条：十格，能数 */
.cap { display: grid; gap: 6px; }
.cap__bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; max-width: 240px; }
.cap__bar i { height: 10px; border: 1px solid var(--edge); border-radius: 2px; }
.cap__bar i.on { background: var(--action); border-color: var(--action); }
.cap__bar.is-full i.on { background: var(--heed); border-color: var(--heed); }
.cap__txt { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }

/* 代码与编号 */
.code { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-control); background: var(--sunk); color: var(--ink); font: 400 var(--fs-mono)/var(--lh-mono) var(--mono); white-space: pre; overflow-x: auto; }
.code--wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.copyline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); border: 1px solid var(--edge); border-radius: var(--r-control); background: var(--paper); }
.copyline .mono { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.bigcode { font: 600 var(--fs-amount)/var(--lh-amount) var(--mono); color: var(--ink); letter-spacing: 0.04em; white-space: nowrap; }

/* ───────── 按钮与表单 ───────── */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 10px 20px; border: 1px solid transparent; border-radius: var(--r-control);
  font: 600 var(--fs-button)/var(--lh-button) var(--font); text-align: center; text-decoration: none; cursor: pointer;
}
.btn--go { background: var(--action); color: var(--on-action); }
.btn--go:hover { color: var(--on-action); }
.btn--quiet { background: none; border-color: var(--edge); color: var(--ink); }
.btn--stop { background: none; border-color: var(--stop); color: var(--stop); }
.btn--text { min-height: var(--tap); padding: 10px 2px; background: none; border: 0; color: var(--ink); font-weight: 400; text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: var(--fs-small); }
@media (pointer: coarse), (max-width: 759px) { .btn--sm { min-height: var(--tap); } }
.field { display: grid; gap: 6px; }
.field > label, .label { font: 600 var(--fs-small)/var(--lh-small) var(--font); color: var(--ink); }
.input, .textarea {
  display: block; width: 100%; min-height: var(--tap); padding: 9px var(--s3); border: 1px solid var(--edge); border-radius: var(--r-control);
  background: var(--sheet); color: var(--ink); font: 400 1rem/1.5rem var(--font);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input--mono { font-family: var(--mono); letter-spacing: 0.04em; }
.input-wrap { position: relative; }
.input-wrap .btn--text { position: absolute; right: var(--s3); top: 0; }
.hint { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.hint--ok { color: var(--action); }
.hint--stop { color: var(--stop); }
.hint--heed { color: var(--heed); }
.pick { display: flex; align-items: flex-start; gap: var(--s3); min-height: var(--tap); padding: 10px 0; cursor: pointer; color: var(--ink-2); }
.pick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); }
.seg { display: inline-flex; flex-wrap: wrap; gap: var(--s2); }
.seg > * { display: inline-flex; align-items: center; min-height: var(--tap); padding: var(--s2) var(--s3); border: 1px solid var(--edge); border-radius: var(--r-control); color: var(--ink); background: none; text-decoration: none; cursor: pointer; }
.seg > [aria-pressed="true"], .seg > [aria-current] { border-color: var(--draft); background: var(--draft-wash); color: var(--draft); font-weight: 600; }

/* ───────── 状态与提示 ───────── */
/* 常态：标记 + 文字。形状不同，不单靠颜色：办成是实心点，等待是空心点，提醒是横条，失败是方块 */
/* inline, so the words sit on the same baseline as the sentence around them */
.st { white-space: nowrap; color: var(--ink-2); }
.st::before { content: ""; display: inline-block; vertical-align: middle; position: relative; top: -1px; margin-right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--edge); }
.st--ok::before { background: var(--action); }
.st--wait::before { background: none; border: 1.5px solid var(--draft); }
.st--heed::before { height: 3px; border-radius: 1px; background: var(--heed); }
.st--stop::before { border-radius: 1px; background: var(--stop); }
.st--off::before { background: none; border: 1.5px solid var(--edge); }
.tag { display: inline-block; padding: 2px 6px; border-radius: var(--r-label); font: 600 var(--fs-label)/var(--lh-label) var(--font); white-space: nowrap; vertical-align: 1px; background: var(--sunk); color: var(--ink-2); }
.tag--ok { background: var(--action-wash); color: var(--action); }
.tag--draft { background: var(--draft-wash); color: var(--draft); }
.tag--heed { background: var(--heed-wash); color: var(--heed); }
.tag--stop { background: var(--stop-wash); color: var(--stop); }
.strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s2) var(--s4); background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--ink); font-size: var(--fs-small); line-height: var(--lh-small); }
.strip--heed { background: var(--heed-wash); color: var(--heed); }
.strip--stop { background: var(--stop-wash); color: var(--stop); }
.strip--heed b, .strip--stop b { color: inherit; }
.callout { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-control); background: var(--sunk); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.callout--heed { background: var(--heed-wash); color: var(--heed); }
.callout--stop { background: var(--stop-wash); color: var(--stop); }
.callout--ok { background: var(--action-wash); color: var(--ink); }
.callout--heed b, .callout--stop b, .callout--heed a, .callout--stop a { color: inherit; }
.waiting { display: grid; gap: var(--s2); color: var(--ink-2); }
.waiting b::after { content: "…"; }
.skel { display: block; height: 14px; border-radius: var(--r-blank); background: var(--sunk); border: 1px solid var(--line); }
.empty { display: grid; gap: var(--s3); padding: var(--s6) 0; color: var(--ink-2); }
.steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; }
.steps .mark { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border: 1.5px solid var(--edge); border-radius: var(--r-blank); color: var(--on-action); }
.steps .is-done .mark { background: var(--action); border-color: var(--action); }
.steps .is-done b { color: var(--ink-2); }
.chat { display: grid; gap: var(--s6); }
.turn { display: grid; gap: var(--s2); }
.turn--me { justify-items: end; }
.turn--me .turn__t { max-width: 88%; padding: var(--s3) var(--s4); border-radius: var(--r-slip); background: var(--sunk); color: var(--ink); }
.turn__t { color: var(--ink); }
.turn__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s1) var(--s3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.composer { display: flex; align-items: flex-end; gap: var(--s2); padding: var(--s2); border: 1px solid var(--edge); border-radius: var(--r-slip); background: var(--sheet); }
.composer .btn { flex: none; }
.composer .textarea { border: 0; min-height: var(--tap); padding: 9px var(--s2); background: none; resize: none; }

/* ───────── 运营：内部纸面 ───────── */
body[data-shell="ops"] { --desk: var(--ops-desk); --paper: var(--ops-paper); --sunk: var(--ops-sunk); }
.inner { display: flex; flex-wrap: wrap; gap: 0 var(--s4); padding: 6px var(--s4); background: var(--heed-wash); border-bottom: 2px solid var(--heed); color: var(--heed); font-size: var(--fs-small); line-height: var(--lh-small); }
.inner b { color: inherit; }
.inner__in { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.memo { padding: var(--s3) var(--s4); border-left: 3px solid var(--heed); background: var(--heed-wash); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.memo b:first-child { display: block; color: var(--heed); }

/* 示意框：只在组件页、动效页和总览里用，产品里没有 */
.demo { display: grid; gap: var(--s4); }
.demo__t { font: 600 var(--fs-small)/var(--lh-small) var(--font); color: var(--ink-3); }
.swatch { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); align-items: center; font-size: var(--fs-small); line-height: var(--lh-small); }
.swatch i { width: 40px; height: 40px; border: 1px solid var(--edge); border-radius: var(--r-control); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
@media (max-width: 759px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

@media print {
  .top, .toc, .tabs, .pagefoot, .inner { display: none; }
  body { background: none; }
  .paper::before { border: 0; background: none; }
}

/* 补充 */
@media (min-width: 1180px) { .subnav--narrow { display: none; } }
details > summary { cursor: pointer; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: var(--s1); }
.why__ref details { flex-basis: 100%; }
.no { font: 400 var(--fs-mono)/var(--lh-mono) var(--mono); color: var(--ink); white-space: nowrap; }  /* 编号：不拆行 */
.steps--num { counter-reset: step; }
.steps--num .mark { border: 0; color: var(--ink-3); font-weight: 600; }
.steps--num .mark::before { counter-increment: step; content: counter(step); }
.quote { margin: 0; padding: var(--s2) var(--s4); border-left: 3px solid var(--line); color: var(--ink); }
.quote__by { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-3); }
.pubcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
@media (max-width: 759px) { .pubcols { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } }
