/* 「今天要做什么」新版（10-15 第五轮，默认；地址带 brief=old 回旧版，那时本文件的规则一条都不命中）。
   令牌全部沿用 app.css。结构：一、页首一行（展开态与窄条态同一行）；二、一句话与今天的日程；三、正文两栏与三种小卡；
   四、采用条；五、窄条；六、状态过渡用的（brief-motion.js）与悬停、按下；七、中屏；八、手机。 */

/* ============ 一、页首一行 ============ */
.brief.bn { display: block; }
.brief.bn.card:hover { box-shadow: var(--shadow-card); }   /* 大简报不是按钮，悬停不浮起 */
.bn .bh { position: relative; display: flex; align-items: center; gap: 8px 14px; min-height: 62px; padding: 12px 14px 12px 18px; }
.bn .bh-t { display: flex; flex: none; align-items: center; gap: 10px; }
.bn .bh-t .tb-k { font-size: 14px; font-weight: var(--fw-strong); }
.bn .bh-t .tb-d { font-size: 12px; color: var(--ink-3); }
.bn .ms-st { flex: 0 1 auto; min-width: 0; gap: 8px; }
.bn .ms-st::before { content: ""; flex: none; width: 1px; height: 16px; margin-right: 4px; background: var(--line-strong); }
.bn .ms-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.bn.k-wait .ms-text { color: var(--wait-ink); }
.bn.k-done .ms-text { color: var(--done-ink); }
.bn.k-wait .ms-ic { background: var(--wait-bg); }
.bn.k-done .ms-ic { background: var(--done-bg); }
.bn.k-done .ms-chk { stroke: var(--done-ink); }
.bn.k-wait { --ring-c: color-mix(in srgb, var(--wait-dot) 28%, transparent); }
.bn.k-done { --ring-c: color-mix(in srgb, var(--done-dot) 28%, transparent); }
/* 状态句里可点的片段（只是给已有的「展开」「打开待定」多一个入口） */
.bh-seg { padding: 0; border: 0; background: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.bh-seg:hover, .bh-seg:focus-visible { text-decoration-color: currentColor; }
.bh-dot { margin: 0 6px; color: var(--ink-3); font-style: normal; font-weight: 400; }
.bn .ms-now { font-size: 14px; }
.bn .ms-now .ms-k, .bn .ms-cd { font-size: 12px; }
.bn .ms-go { font-size: 14px; }
.bn .tb-fold, .bn .ms-open { flex: none; margin-left: 0; }
/* 草案材质（10-15 第六轮；底色与标签在 app.css「三、简报」，新旧两版共用）：大简报悬停也不浮起；正文上方的分隔线随纸色加深一点 */
.brief.bn.is-draft.card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.bn.is-draft .bn-body { border-top-color: var(--line-strong); }

/* ============ 二、一句话与今天的日程 ============ */
.bn .bb { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 20px 22px; }
.bn .tb-say { max-width: 46em; margin: 0; font-size: var(--fs-h2); font-weight: 500; line-height: 1.45; letter-spacing: -.005em; text-wrap: pretty; }
.bn .fixbar { margin: 0 0 0 -10px; padding: 0; background: none; gap: 2px 0; }
.bn .fb-k { margin-right: 8px; padding-left: 10px; color: var(--ink-3); font-weight: 500; }   /* 留出第一条的焦点框，不压住「程」 */
.bn .later-row { margin-top: -2px; }

/* ============ 三、正文两栏与小卡 ============ */
.bn .bn-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0 28px; align-items: start; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.bn .bside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bn .bcards { display: flex; flex-direction: column; gap: 8px; }
.bn .bgrp-h { flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; margin-bottom: 10px; }
.bn .bgrp-h b { display: inline-flex; flex: none; align-items: baseline; font-size: 14px; font-weight: var(--fw-strong); color: var(--ink); }
.bn .bgrp-must > .bgrp-h b { font-size: var(--fs-strong); }
.bn .bgrp-h .n { margin-left: 6px; font: 600 12px var(--font-num); font-style: normal; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bn .bgrp-h > span { min-width: 0; overflow: hidden; font-size: 12px; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
/* 空组不画框：组头行尾一个灰字「暂无」 */
.bn .bgrp-none { flex: none; margin-left: auto; font: 500 12px var(--font-sans); font-style: normal; color: var(--ink-3); }
.bn .bgrp-h:has(.bgrp-none) { margin-bottom: 0; }

/* 小卡共用：不写「待办」类别；截止标签前不另加点 */
.wn .wc-tag::before { content: none; }
.wn .wc-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-3); }
.wn .wc-why .wc-tag.late { color: var(--late-ink); font-weight: 600; }
.wn-sep { margin: 0 6px; font-style: normal; color: var(--ink-3); }
.wr-new { margin-right: 6px; color: var(--wait-ink); font-weight: 600; }
.wn .wc-title { transition: text-decoration-color 120ms var(--ease); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.wn .wc-title:hover { text-decoration-color: var(--accent-line); }
/* 延后常显，但降到浅灰；指到、聚焦、菜单打开时回到墨色加下划线 */
.wn .lnk-park { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); text-decoration: underline; text-decoration-color: transparent; transition: color 120ms var(--ease), text-decoration-color 120ms var(--ease); }
.wn .lnk-park .ico { width: 12px; height: 12px; }
.wn .lnk-park:hover, .wn .lnk-park:focus-visible, .wn .lnk-park[aria-expanded="true"] { color: var(--ink); text-decoration-color: var(--accent-line); }
/* 挪到今天／移出今天（10-15 第六轮）：和「延后」同一种浅灰文字链接 */
.wn .lnk-pull { color: var(--ink-3); text-decoration-color: transparent; transition: color 120ms var(--ease), text-decoration-color 120ms var(--ease); }
.wn .lnk-pull:hover, .wn .lnk-pull:focus-visible { color: var(--ink); text-decoration-color: var(--accent-line); }

/* 今天必须做：描边卡，标题打头 16/650；右侧 168 宽的时间轨（建议／待写入飞书／已排在上，延后在下），几张卡的时间竖着对齐、往下正对采用按钮 */
.wn-must { flex-direction: row; align-items: stretch; gap: 16px; padding: 12px 14px 12px 16px; }
.wn-main { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.wn-must .wc-title { font-size: var(--fs-strong); font-weight: 650; line-height: 1.4; }
.wn-must .wc-note { color: var(--ink-2); }
.wn-rail { flex: none; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 8px; width: 168px; margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line); }
.wn-rail .wc-acts { margin-left: 0; }
.wn .wc-when { height: 24px; white-space: nowrap; }
.wn .wc-when.sug { padding: 0 10px; border-radius: var(--radius-pill); box-shadow: none; background: var(--surface-2); color: var(--ink-3); transition: color 120ms var(--ease), background-color 120ms var(--ease), opacity 120ms var(--ease); }   /* 10-15 第六轮：去虚线，浅灰底浅灰字 */
.wn .wc-when.st-pending { padding: 0 10px; border-radius: var(--radius-pill); background: var(--wait-bg); }
.wn .wc-when.st-feishu { padding: 0 2px; }
.wn .wc-when.none { height: 0; }
.wn-must.no-time .wn-rail { width: auto; justify-content: flex-end; padding-left: 0; border-left: 0; }   /* 卡上没有时间：不画竖线，「延后」收到右下角 */
.wn.is-new.wn-must { box-shadow: inset 3px 0 0 var(--wait-dot), inset 0 0 0 1px var(--line-strong); }
/* 做完的收成一行：划线标题＋「✓ 已完成」 */
.wn.is-done { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 8px 16px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .7; }
.wn.is-done .wc-title { font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration-line: line-through; text-decoration-color: var(--ink-3); }

/* 建议先做：灰底不描边，标题 14/600 */
.wn-sug { gap: 3px; padding: 12px 14px; background: var(--surface-2); box-shadow: none; }
.wn-sug .wc-why { color: var(--ink-2); }
.wn-sug .wc-foot { justify-content: flex-start; margin-top: 4px; padding-top: 0; border-top: 0; }
.wn-sug .wc-cat { font-size: 12px; color: var(--ink-3); }
.wn-sug .lnk[data-act="open-meeting"] { color: var(--ink); font-weight: 600; }

/* 稍后再做：一个外框里的清单行（标题 14/500；截止 · 来源 12 浅灰，最多两行，指到露全句） */
.bn .blist { gap: 0; border-radius: var(--radius-ctl); box-shadow: inset 0 0 0 1px var(--line); }
.wn-row { flex-direction: row; align-items: flex-start; gap: 12px; padding: 9px 14px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.wn-row:first-child { border-top-left-radius: var(--radius-ctl); border-top-right-radius: var(--radius-ctl); }
.wn-row:last-child { border-bottom-left-radius: var(--radius-ctl); border-bottom-right-radius: var(--radius-ctl); }
.wn-row + .wn-row { box-shadow: inset 0 1px 0 var(--line); }
.wn-row.is-new { box-shadow: inset 3px 0 0 var(--wait-dot); }
.wn-row.is-new + .wn-row, .wn-row + .wn-row.is-new { box-shadow: inset 0 1px 0 var(--line); }
.wn-row + .wn-row.is-new { box-shadow: inset 3px 0 0 var(--wait-dot), inset 0 1px 0 var(--line); }
.wn-row.is-parked { border: 0; background: none; }
.wn-row.is-parked .wc-title { color: var(--ink-2); }
.wr-main { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.wn-row .wc-title { font-size: 14px; font-weight: 500; }
.wn-row:is(:hover, :focus-within) .wc-why { -webkit-line-clamp: unset; }
.wn-row .wc-acts { flex: none; margin-left: 0; padding-top: 2px; }
/* 桌面上「延后」指到、聚焦才出现（会后新增与已延后的照常显示）；触屏常显 */
@media (hover: hover) and (min-width: 761px) {
  .wn-row:not(.is-new):not(.is-parked) .wc-acts { opacity: 0; transition: opacity 120ms var(--ease); }
  .wn-row:is(:hover, :focus-within) .wc-acts, .wn-row .wc-acts:has([aria-expanded="true"]) { opacity: 1; }
}
/* 状态句里点了「会后新增 N 件待办」：那几张卡亮一下 */
.wn.bn-ping { animation: bnPing 1.2s var(--ease) 1; }
@keyframes bnPing { 0% { background-color: transparent; } 25% { background-color: var(--wait-bg); } 100% { background-color: transparent; } }

/* ============ 四、采用条：贴在今天必须做下面，宽同主栏 ============ */
.bn-ab { margin-top: 10px; padding: 6px 14px; background: var(--surface-2); }   /* 右内边距同卡片，「采用建议」右缘正对上面的时间胶囊 */
.bn-ab .ab-msg { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.ab-pill { display: inline-block; flex: none; width: 20px; height: 10px; border-radius: var(--radius-pill); background: var(--surface-3); }
.bn-ab .btn { height: var(--btn-h-sm); }
.bn-ab .btn.ghost { color: var(--ink-2); }
.bn-ab .ab-go { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bn-ab .ab-go:hover { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 3px var(--accent-soft); }
/* 指到「采用建议」时卡上的建议胶囊一起加深，指到「暂不采用」时一起变淡 */
.bgrp-must:has([data-act="adopt"]:hover, [data-act="adopt"]:focus-visible) .wn .wc-when.sug { color: var(--ink); background: var(--surface-3); }
.bgrp-must:has([data-act="skip"]:hover, [data-act="skip"]:focus-visible) .wn .wc-when.sug { opacity: .4; }

/* ============ 五、窄条：只剩页首这一行，外加事实段 ============ */
.bn .ms-facts { font-size: 12px; }
.bn .ms-more { display: none; }

/* ============ 六、状态过渡用的（brief-motion.js）与悬停、按下 ============ */
.bm-ghost { will-change: transform, opacity; }
.bm-num { position: relative; display: inline-block; white-space: pre; }
.bm-num-old { position: absolute; right: 0; top: 0; white-space: pre; pointer-events: none; }
.bm-d { display: inline-block; }
.bm-strike { position: absolute; left: 0; top: 52%; height: 1.5px; background: var(--ink-3); transform-origin: left center; pointer-events: none; }
html.brief-new .fb-i, html.brief-new .ms-now, html.brief-new .ms-chip, html.brief-new .bgrp-tg { transition: background-color 120ms var(--ease), transform 120ms var(--ease); }
html.brief-new :is(.fb-i, button.ms-now, button.ms-chip, .bh-seg):active { transform: scale(.97); }
html.brief-new .bn :is(.lnk, .ms-go, .wc-title, .bgrp-tg):active { opacity: .6; }

/* ============ 七、中屏：两栏保留到 761 ============ */
@media (max-width: 1100px) {
  .bn .bn-body { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 20px; }
  .bn .bcards { display: flex; }
  .wn-rail { width: 150px; }
}

/* ============ 八、手机：页首三行（标题＋收起；状态句；现在／下一件），窄条两行 ============ */
@media (max-width: 760px) {
  .bn .bh { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t fold" "st st" "r r"; gap: 6px 8px; min-height: 0; padding: 10px 10px 10px 14px; }
  .bn .bh:not(:has(.tb-fold)) { grid-template-areas: "t t" "st st" "r r"; }
  .bn .bh-t { grid-area: t; gap: 8px; }
  .bn .bh-t .ch-ic { width: 28px; height: 28px; border-radius: 9px; }
  .bn .bh-t .ch-ic .ico { width: 16px; height: 16px; }
  .bn .ms-st { grid-area: st; }
  .bn .ms-st::before { display: none; }
  .bn .ms-text { font-size: 14px; white-space: normal; }
  .bn .ms-r { grid-area: r; min-width: 0; margin-left: 0; overflow: hidden; }
  .bn .ms-r:empty { display: none; }
  .bn .tb-fold, .bn .ms-open { grid-area: fold; height: 28px; min-height: 0; padding: 0 10px; }
  .bn .ms-now { height: 28px; padding: 0 10px; font-size: 13px; }
  /* 窄条两行：第一行状态句＋展开，第二行现在／下一件（收工态是「明天到期 N 件」，点一下露明细） */
  .bn.bn-mini .bh { grid-template-areas: "st fold" "r r"; padding: 8px 8px 8px 12px; }
  .bn.bn-mini .bh-t { display: none; }
  .bn.bn-mini .ms-text { white-space: nowrap; }
  .bn .ms-more { display: inline-flex; align-items: center; gap: 2px; min-height: 28px; padding: 0 0 0 30px; border: 0; background: none; color: var(--ink-2); font: 500 12px var(--font-sans); text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; cursor: pointer; }
  .bn .ms-more .ico { width: 13px; height: 13px; }
  .bn .ms-tip.show { display: block !important; top: calc(100% + 6px); left: 12px; right: 12px; white-space: pre-wrap; }

  .bn .bb { gap: 10px; padding: 0 14px 16px; }
  .bn .tb-say { font-size: var(--fs-strong); line-height: 1.55; }
  /* 今天的日程：一行横滑，右端渐隐 */
  .bn .fixbar { flex-direction: row; flex-wrap: nowrap; align-items: center; margin: 0 -14px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .bn .fixbar::-webkit-scrollbar { display: none; }
  .bn .fb-k { display: none; }
  .bn .fb-sep { display: inline; flex: none; }
  .bn .fb-i { flex: none; width: auto; flex-wrap: nowrap; padding: 0 8px; white-space: nowrap; }
  .bn .fb-i:first-of-type { margin-left: -8px; }

  .bn .bn-body { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 4px; padding-top: 14px; }
  .bn .bside { gap: 18px; }
  .bn .bgrp-h { flex-wrap: wrap; row-gap: 0; }
  .bn .bgrp-h > span { flex: 1 1 100%; order: 3; white-space: normal; }
  .bn .bgrp-tg { margin-left: auto; }
  /* 时间轨变成卡底一行 */
  .wn-must { flex-direction: column; gap: 6px; padding: 11px 12px 10px 14px; }
  .wn-rail { flex-direction: row; align-items: center; width: auto; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .wn .wc-when.none { height: 24px; }
  /* 稍后再做默认收着，会后新增与已延后的照样露出来 */
  .bn .bgrp-later:not(.open) .bcards { display: flex; }
  .bn .bgrp-later:not(.open) .wn-row:not(.is-new):not(.is-parked) { display: none; }
  .bn .bgrp-later:not(.open):not(.has-shown) .blist { display: none; }
  .bn .bgrp-later:not(.open) .wn-row.is-new, .bn .bgrp-later:not(.open) .wn-row.is-parked { border-radius: var(--radius-ctl); }
  /* 采用条只在今天必须做这一组里吸底，组尾就停住 */
  .bn-ab.ab-sticky { padding: 8px 8px 8px 12px; }
}
