/* 页 8 团团提议卡与改动记录（设计 3.10）。都是纸：不透明、发丝边；黄只给「应用」，状态用文字。
   时间轨是这一页签的唯一装置：2px 发丝线，实心墨点＝团团的包，空心点＝你的改动。 */

/* ── 改动清单：提议卡与改动记录共用 ── */
.tt-ch-diff { display: grid; gap: var(--b-sp-3); margin-top: var(--b-sp-3); padding: 10px var(--b-sp-3) 11px; border-radius: var(--b-radius-inner); background: var(--b-bg-inset); }
.tt-ch-dline { display: flex; align-items: baseline; gap: 6px; font-size: var(--b-fs-13); line-height: 20px; }
.tt-ch-dname { font-weight: 600; color: var(--b-text-1); }
.tt-ch-sign { flex: none; width: 1em; font-weight: 600; color: var(--b-text-1); text-align: center; }
.tt-ch-dtask.is-remove .tt-ch-dname { text-decoration: line-through; text-decoration-thickness: 1px; }
.tt-ch-dmeta, .tt-ch-dnote { padding-left: calc(1em + 6px); font-size: var(--b-fs-12); line-height: 18px; color: var(--b-text-3); }
/* 这一行的一句补充（「下一步已经定了」）：比元信息高一档，读得出是理由不是属性 */
.tt-ch-dnote { margin-top: 2px; color: var(--b-text-2); }
.tt-ch-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--b-sp-3); row-gap: 2px; margin-top: 2px; }
.tt-ch-fields dt { font-size: var(--b-fs-12); line-height: 22px; color: var(--b-text-3); }
.tt-ch-fields dd { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--b-fs-13); line-height: 22px; font-family: var(--b-font-num); font-variant-numeric: tabular-nums; }
/* 数字对照（8 → 0、10/25 → 10/26）放大一档，前后值一眼对上 */
.tt-ch-fields dd.is-num { font-size: var(--b-fs-15); }
/* 划线压在单个数字上会读成别的字（0 像 θ）：线退成浅色、只 1px，数字本身保持可读 */
.tt-ch-fields dd.is-num .tt-ch-old { text-decoration-color: var(--b-text-disabled); }
.tt-ch-fields dd.is-long { display: block; }
.tt-ch-fields dd.is-long .tt-ch-old { display: block; }
.tt-ch-newline { display: flex; align-items: baseline; gap: 6px; }
.tt-ch-newline .tt-ch-arrow { transform: translateY(1px); }
.tt-ch-old { color: var(--b-text-3); text-decoration-line: line-through; text-decoration-thickness: 1px; text-decoration-color: currentColor; }
.tt-ch-arrow { display: inline-flex; flex: none; color: var(--b-text-3); }
.tt-ch-arrow svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tt-ch-new { font-weight: 600; color: var(--b-text-1); overflow-wrap: anywhere; }

/* 紧凑版：撤回那一行只用一行字说清改回了什么，不再垫底色 */
.tt-ch-diff.is-compact { margin-top: 2px; padding: 0; background: none; gap: 0; }
.tt-ch-diff.is-compact .tt-ch-dline { display: none; }
.tt-ch-diff.is-compact .tt-ch-dtask.is-add .tt-ch-dline, .tt-ch-diff.is-compact .tt-ch-dtask.is-remove .tt-ch-dline { display: flex; font-size: var(--b-fs-12); }
.tt-ch-diff.is-compact :is(.tt-ch-dmeta, .tt-ch-dnote) { display: none; }
.tt-ch-diff.is-compact .tt-ch-fields { margin: 0; }
.tt-ch-diff.is-compact .tt-ch-fields dd, .tt-ch-diff.is-compact .tt-ch-fields dd.is-num { font-size: var(--b-fs-13); }
.tt-ch-diff.is-compact :is(.tt-ch-new, .tt-ch-dname, .tt-ch-sign) { font-weight: 500; color: var(--b-text-2); }

/* ── 提议卡 ── */
.tt-ch-prop { padding: var(--b-sp-4) var(--b-sp-4) var(--b-sp-3); border-radius: var(--b-radius-card); background: var(--b-bg-card); box-shadow: inset 0 0 0 1px var(--b-line), 0 1px 2px var(--b-card-shadow), 0 14px 30px -20px var(--b-card-shadow-far); transition: box-shadow var(--m-snappy-t) var(--m-spring-snappy); }
.tt-ch-prop.is-pending:hover, .tt-ch-prop.is-pending:focus-within { box-shadow: inset 0 0 0 1px var(--b-line-strong), 0 1px 2px var(--b-card-shadow), 0 18px 36px -20px var(--b-card-shadow-far); }
.tt-ch-kicker { font-size: var(--b-fs-12); line-height: 18px; font-weight: 600; letter-spacing: var(--b-ls-cap); color: var(--b-text-3); }
.tt-ch-prop-title { margin-top: 2px; font-size: var(--b-fs-15); line-height: 1.45; font-weight: 600; color: var(--b-text-1); }
/* 标题短，两行时上下等长；理由句用 pretty（balance 会在中文词中间断开，如「平／均」） */
.tt-ch-prop-title, .tt-ch-title { text-wrap: balance; }
.tt-ch-why, .tt-ch-conflict p, .tt-ch-empty { text-wrap: pretty; }
/* 中文短句优先在标点处换行（「…10 倍，／下一步就往这儿加」），不在词中间断；实在放不下再任意断 */
.tt-ch-prop-title, .tt-ch-title, .tt-ch-why { word-break: keep-all; overflow-wrap: anywhere; }
.tt-ch-why { margin-top: 2px; font-size: var(--b-fs-13); line-height: 1.6; color: var(--b-text-2); }
.tt-ch-impact { margin-top: var(--b-sp-3); font-size: var(--b-fs-12); line-height: 18px; color: var(--b-text-3); }
.tt-ch-prop-acts { display: flex; align-items: center; gap: var(--b-sp-2); margin-top: var(--b-sp-2); }
.tt-ch-look { margin-left: auto; }
.tt-ch-prop-state { display: flex; align-items: center; gap: 6px; margin-top: var(--b-sp-3); padding-top: 10px; border-top: 1px solid var(--b-line); font-size: var(--b-fs-12); line-height: 20px; color: var(--b-text-2); }
.tt-ch-prop-state .tt-ch-look { font-size: var(--b-fs-12); }
.tt-ch-ok { display: inline-flex; color: var(--b-ok); }
.tt-ch-ok svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tt-ch-state-sub { color: var(--b-text-3); }
.tt-ch-state-sub::before { content: "·"; margin-right: 6px; }
/* 已过期、没有采用：收成平纸，字退一档，读得出是历史 */
.tt-ch-prop.is-stale, .tt-ch-prop.is-declined { box-shadow: inset 0 0 0 1px var(--b-line); }
.tt-ch-prop.is-stale .tt-ch-prop-title, .tt-ch-prop.is-declined .tt-ch-prop-title { color: var(--b-text-2); }
.tt-ch-prop.is-stale .tt-ch-why, .tt-ch-prop.is-declined .tt-ch-why { color: var(--b-text-3); }
.tt-ch-prop.is-stale .tt-ch-diff, .tt-ch-prop.is-declined .tt-ch-diff { background: var(--b-neutral-tint); }
.tt-ch-prop.is-stale :is(.tt-ch-dname, .tt-ch-new, .tt-ch-sign), .tt-ch-prop.is-declined :is(.tt-ch-dname, .tt-ch-new, .tt-ch-sign) { font-weight: 500; color: var(--b-text-3); }
.tt-ch-prop.is-stale .tt-ch-prop-state, .tt-ch-prop.is-declined .tt-ch-prop-state { color: var(--b-text-3); }

/* ── 改动记录 ── */
/* 记录直接写在团团栏的纸上，不再套一层框 */
.tt-ch-log { padding-bottom: var(--b-sp-2); }
.tt-ch-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--b-sp-3); padding-bottom: var(--b-sp-3); margin-bottom: var(--b-sp-4); border-bottom: 1px solid var(--b-line); font-size: var(--b-fs-12); line-height: 18px; color: var(--b-text-3); }
.tt-ch-top strong { font-family: var(--b-font-num); font-size: var(--b-fs-13); font-weight: 600; color: var(--b-text-1); font-variant-numeric: tabular-nums; }
.tt-ch-legend { display: inline-flex; align-items: center; gap: 6px; }
.tt-ch-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--b-text-1); }
.tt-ch-legend i.is-you { margin-left: var(--b-sp-2); background: transparent; box-shadow: inset 0 0 0 1.5px var(--b-text-2); }
.tt-ch-filter { display: inline-flex; align-items: center; gap: 2px; height: 28px; margin-bottom: var(--b-sp-3); padding: 0 3px 0 var(--b-sp-3); border-radius: var(--b-radius-pill); background: var(--b-neutral-tint); font-size: var(--b-fs-13); color: var(--b-text-2); }
.tt-ch-filter strong { font-weight: 600; color: var(--b-text-1); }
.tt-ch-filter-x { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 4px; border-radius: 50%; font-size: 15px; line-height: 1; color: var(--b-text-2); }
.tt-ch-filter-x:hover { background: var(--b-line); color: var(--b-text-1); }
.tt-ch-empty { padding: var(--b-sp-4) 0 var(--b-sp-5); font-size: var(--b-fs-13); line-height: 1.6; color: var(--b-text-3); }

.tt-ch-rail > li.tt-ch-dayhead { display: flex; align-items: baseline; gap: var(--b-sp-2); padding-bottom: 10px; font-size: var(--b-fs-12); line-height: 18px; font-weight: 600; letter-spacing: var(--b-ls-cap); color: var(--b-text-3); }
.tt-ch-rail > li.tt-ch-dayhead:not(:first-child) { padding-top: var(--b-sp-1); }
.tt-ch-today { font-weight: 500; letter-spacing: 0; color: var(--b-text-2); }
.tt-ch-rail { position: relative; }
/* 轨道从第一颗点到最后一颗点：画在每一项左侧，最后一项只画到点为止 */
.tt-ch-rail > li { position: relative; padding: 0 0 var(--b-sp-5) 26px; }
.tt-ch-rail > li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--b-line-strong); }
.tt-ch-rail > li.tt-ch-dayhead:first-child::before { display: none; }
.tt-ch-rail > li.tt-ch-dayhead:first-child + li::before { top: 9px; }
.tt-ch-rail > li:last-child::before { bottom: auto; height: 10px; }
.tt-ch-dot { position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--b-text-1); box-shadow: 0 0 0 3px var(--b-bg-card); }
.tt-ch-fold > .tt-ch-dot, .tt-ch-revert > .tt-ch-dot { background: var(--b-bg-card); box-shadow: inset 0 0 0 1.5px var(--b-text-2), 0 0 0 3px var(--b-bg-card); }

.tt-ch-meta { display: flex; align-items: baseline; gap: var(--b-sp-2); min-height: 20px; font-size: var(--b-fs-12); line-height: 20px; color: var(--b-text-3); }
.tt-ch-meta time, .tt-ch-ver { font-family: var(--b-font-num); font-variant-numeric: tabular-nums; }
.tt-ch-who { font-weight: 600; color: var(--b-text-2); }
.tt-ch-ver { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; white-space: nowrap; }
.tt-ch-ver svg { width: 10px; height: 10px; fill: none; stroke: var(--b-text-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tt-ch-ver-to { font-weight: 600; color: var(--b-text-2); }
.tt-ch-title { margin-top: 2px; font-size: var(--b-fs-15); line-height: 1.45; font-weight: 600; color: var(--b-text-1); }
.tt-ch-pack /* 标题短，两行时上下等长；理由句用 pretty（balance 会在中文词中间断开，如「平／均」） */
.tt-ch-prop-title, .tt-ch-title { text-wrap: balance; }
.tt-ch-why, .tt-ch-conflict p, .tt-ch-empty { text-wrap: pretty; }
/* 中文短句优先在标点处换行（「…10 倍，／下一步就往这儿加」），不在词中间断；实在放不下再任意断 */
.tt-ch-prop-title, .tt-ch-title, .tt-ch-why { word-break: keep-all; overflow-wrap: anywhere; }
.tt-ch-why { margin-top: 2px; }

.tt-ch-acts { display: flex; align-items: center; gap: 2px; margin: 6px 0 0 -10px; }
.tt-ch-log .btn.tt-ch-act { height: 28px; padding: 0 10px; font-size: var(--b-fs-13); font-weight: 500; color: var(--b-text-2); background: transparent; }
.tt-ch-log .btn.tt-ch-act { gap: 5px; }
.tt-ch-log .btn.tt-ch-act svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tt-ch-log .btn.tt-ch-act:hover { color: var(--b-text-1); background: var(--b-neutral-tint); }
.tt-ch-log .btn.tt-ch-act:active { background: var(--b-line-strong); }
.tt-ch-locked { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; font-size: var(--b-fs-12); color: var(--b-text-3); }
.tt-ch-undone { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; font-size: var(--b-fs-12); font-weight: 500; color: var(--b-text-2); }
.tt-ch-undone svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 已撤回的包：整体退到第三阶文字；点也退色，轨道上看得出这一包不再生效 */
.tt-ch-pack.is-undone :is(.tt-ch-title, .tt-ch-why, .tt-ch-who, .tt-ch-dname, .tt-ch-new, .tt-ch-sign) { color: var(--b-text-3); }
.tt-ch-pack.is-undone :is(.tt-ch-title, .tt-ch-dname, .tt-ch-new) { font-weight: 500; }
/* 不再生效：改动清单退成虚线框，和生效中的实底一眼分开 */
.tt-ch-pack.is-undone .tt-ch-diff { background: none; box-shadow: none; outline: 1px dashed var(--b-line-strong); outline-offset: -1px; }
.tt-ch-pack.is-undone .tt-ch-old { text-decoration-color: var(--b-text-disabled); }
.tt-ch-pack.is-undone > .tt-ch-dot { background: var(--b-text-disabled); }

/* 撤回本身：一行，空心点 */
.tt-ch-revert .tt-ch-title { font-size: var(--b-fs-13); font-weight: 500; color: var(--b-text-2); }

/* 你的手改：默认折成一行 */
.tt-ch-foldbtn { display: inline-flex; align-items: center; gap: 2px; margin: -2px 0 -2px -6px; padding: 2px 6px; border-radius: var(--b-radius-chip); font-size: var(--b-fs-13); line-height: 20px; font-weight: 600; color: var(--b-text-2); }
.tt-ch-foldbtn:hover { color: var(--b-text-1); background: var(--b-neutral-tint); }
.tt-ch-foldbtn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--m-snappy-t) var(--m-spring-snappy); }
.tt-ch-fold.is-open .tt-ch-foldbtn svg { transform: rotate(90deg); }
.tt-ch-sub { display: grid; gap: var(--b-sp-3); margin-top: var(--b-sp-2); }
.tt-ch-sub .tt-ch-diff { margin-top: 4px; }
.tt-ch-fold.is-open .tt-ch-sub { animation: m-rise var(--m-snappy-t) var(--m-spring-snappy) both; }

/* 撤回冲突：二选一，不用黄 */
.tt-ch-conflict { margin-top: var(--b-sp-2); padding: var(--b-sp-3); border-radius: var(--b-radius-inner); background: var(--b-bg-card); box-shadow: inset 0 0 0 1px var(--b-line-strong); font-size: var(--b-fs-13); line-height: 1.6; color: var(--b-text-1); }
.tt-ch-conflict-acts { display: flex; align-items: center; gap: var(--b-sp-3); margin-top: var(--b-sp-2); }

/* 刚应用、刚撤回：状态行轻轻升入一次 */
.tt-ch-log .is-fresh, .tt-ch-prop .is-fresh { animation: m-rise var(--m-smooth-t) var(--m-spring-smooth) both; }
@media (prefers-reduced-motion: reduce) {
  .tt-ch-log .is-fresh, .tt-ch-prop .is-fresh, .tt-ch-fold.is-open .tt-ch-sub { animation: none; }
}
