/* css/inspector.css：页 7 任务详情检查栏（tt-in-*）。纸，插在画布纸面右侧 400 宽，左侧一根发丝线。
   打开时先浮在画布右侧滑入（is-floating），落定后画布纸面分栏收窄；只动 transform／opacity。 */
.tt-in { grid-area: 1 / 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--b-bg-card); box-shadow: inset 1px 0 0 var(--b-line); }
.tt-in:focus { outline: none; }
.tt-in.is-floating { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; z-index: 6; box-shadow: inset 1px 0 0 var(--b-line), -18px 0 36px -28px var(--b-card-shadow-far); }

/* 头：类别 · 执行方类型、标题（可改）、状态 */
.tt-in-head { flex: none; padding: var(--b-sp-4) var(--b-sp-5) var(--b-sp-4) var(--b-sp-6); border-bottom: 1px solid var(--b-line); }
.tt-in-kicker { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin-right: calc(var(--b-sp-2) * -1); }
.tt-in-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.tt-in-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--b-sp-1) var(--b-sp-2); margin-top: var(--b-sp-1); }
.tt-in-title h2 { font-size: var(--b-fs-20); line-height: var(--b-lh-title); font-weight: 700; letter-spacing: var(--b-ls-title); cursor: text; min-width: 0; }
.tt-in-title.is-editing { display: grid; }
.tt-in-state { flex-basis: 100%; display: flex; align-items: center; gap: var(--b-sp-2); margin-top: var(--b-sp-2); }
.tt-in-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--b-sp-2); border-radius: 6px; font-size: var(--b-fs-12); font-weight: 600; color: var(--b-text-2); background: var(--b-neutral-tint); }
.tt-in-pill.is-on { color: var(--b-text-1); }
.tt-in-pill.is-done { color: var(--b-ok); background: var(--b-ok-tint); }
/* 排队、返工：五态之外多半句「在等谁」，跟在徽标后面，弱一档 */
.tt-in-state-note { font-size: var(--b-fs-13); color: var(--b-text-2); }

/* 身：字段表 dt 12＋dd 15，行间发丝线 */
.tt-in-body { flex: 1; min-height: 0; overflow: auto; padding: var(--b-sp-1) var(--b-sp-5) var(--b-sp-6) var(--b-sp-6); overscroll-behavior: contain; scrollbar-width: thin;
  /* 底部 24px 渐隐：内容被底栏截住时读成「下面还有」，而不是露半行字 */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
.tt-in-fields { display: grid; }
.tt-in-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--b-sp-3); padding: var(--b-sp-3) 0; border-bottom: 1px solid var(--b-line); }
.tt-in-row dt { padding-top: 3px; font-size: var(--b-fs-12); line-height: 1.5; letter-spacing: var(--b-ls-cap); color: var(--b-text-3); }
.tt-in-row dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--b-sp-2); min-width: 0; font-size: var(--b-fs-15); line-height: 1.5; color: var(--b-text-1); font-variant-numeric: tabular-nums; }
.tt-in-val { min-width: 0; }
.tt-in-row.is-editable .tt-in-val { cursor: text; }
.tt-in-row.is-editable .tt-in-val:hover { text-decoration: underline; text-decoration-color: var(--b-line-strong); text-underline-offset: 4px; }
.tt-in-edit { align-self: center; margin-left: auto; width: 26px; height: 26px; display: inline-grid; place-content: center; border-radius: var(--b-radius-pill); color: var(--b-text-3); opacity: 0; transition: opacity var(--m-snappy-t) var(--m-spring-snappy), background-color var(--m-snappy-t) var(--m-spring-snappy); }
.tt-in-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.tt-in-row:hover .tt-in-edit, .tt-in-title:hover .tt-in-edit, .tt-in-edit:focus-visible { opacity: 1; }
.tt-in-edit:hover { color: var(--b-text-1); background: var(--b-neutral-tint); }
.tt-in-title .tt-in-edit { margin-left: 0; }
.tt-in-you { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; font-size: var(--b-fs-12); font-weight: 500; line-height: 1; color: var(--b-text-3); box-shadow: inset 0 0 0 1px var(--b-line-strong); white-space: nowrap; }
.tt-in-impact { flex-basis: 100%; margin-top: 2px; text-align: left; font-size: var(--b-fs-13); line-height: 1.5; color: var(--b-text-1); }
.tt-in-impact:hover { text-decoration: underline; text-underline-offset: 3px; }
.tt-in-accept { display: grid; gap: 4px; }
.tt-in-accept li { position: relative; padding-left: 16px; }
.tt-in-accept li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--b-text-3); }

/* 行内编辑：保存／取消显式点，失焦不提交 */
.tt-in-editor { flex-basis: 100%; display: grid; gap: var(--b-sp-2); }
.tt-in-editor .field { height: 36px; padding: 0 var(--b-sp-3); font-size: var(--b-fs-15); }
.tt-in-editor select.field { appearance: auto; }
.tt-in-dates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--b-sp-2); }
.tt-in-dates label { display: grid; gap: 4px; }
.tt-in-dates span { font-size: var(--b-fs-12); color: var(--b-text-3); }
.tt-in-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--b-sp-2); }
.tt-in-quiet { color: var(--b-text-2); font-weight: 500; }
.tt-in-quiet:hover { color: var(--b-text-1); background: var(--b-neutral-tint); }
.tt-in-outline { color: var(--b-text-1); background: transparent; box-shadow: inset 0 0 0 1px var(--b-line-strong); }
.tt-in-outline:hover { background: var(--b-neutral-tint); }

/* 段落：团团为什么加这件事、交给执行方的、经过、交付 */
.tt-in-sec, .tt-in-why { margin-top: var(--b-sp-6); }
.tt-in-sec h3, .tt-in-why h3 { margin-bottom: var(--b-sp-2); font-size: var(--b-fs-12); font-weight: 600; letter-spacing: var(--b-ls-cap); color: var(--b-text-3); }
.tt-in-why { padding: var(--b-sp-3) var(--b-sp-4); border-radius: var(--b-radius-inner); background: var(--b-bg-inset); }
.tt-in-why p { font-size: var(--b-fs-15); line-height: 1.6; color: var(--b-text-1); }
.tt-in-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--b-sp-3); }
.tt-in-sec-h .tt-in-more { margin: 0 0 var(--b-sp-2); color: var(--b-text-2); }
.tt-in-brief { font-size: var(--b-fs-13); line-height: 1.7; color: var(--b-text-2); }
.tt-in-brief.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-in-more { margin-top: 4px; font-size: var(--b-fs-13); font-weight: 500; color: var(--b-text-1); }
.tt-in-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.tt-in-hist { position: relative; display: grid; gap: var(--b-sp-3); padding-left: var(--b-sp-4); }
.tt-in-hist::before { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--b-line-strong); }
.tt-in-hist li { position: relative; display: grid; gap: 1px; }
.tt-in-hist li::before { content: ""; position: absolute; left: calc(var(--b-sp-4) * -1); top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--b-bg-card); box-shadow: inset 0 0 0 1.5px var(--b-text-3); }
.tt-in-hist li:last-child::before { background: var(--b-text-1); box-shadow: none; }
.tt-in-hist time { font-size: var(--b-fs-12); color: var(--b-text-3); font-variant-numeric: tabular-nums; }
.tt-in-hist span { font-size: var(--b-fs-13); line-height: 1.55; color: var(--b-text-1); }
/* 等你验收时交付置顶：去掉段间距、紧贴头部，下面字段表照旧 */
.tt-in-delivery.is-awaiting { margin: var(--b-sp-4) 0 var(--b-sp-2); }
.tt-in-delivery.is-awaiting h3 { color: var(--b-text-1); }
.tt-in-file { display: flex; align-items: center; gap: var(--b-sp-3); 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); }
.tt-in-file > i { flex: none; width: 28px; height: 36px; border-radius: 4px 9px 4px 4px; background: var(--b-bg-inset); box-shadow: inset 0 0 0 1px var(--b-line-strong); }
.tt-in-file > div { flex: 1; min-width: 0; display: grid; }
.tt-in-file b { font-size: var(--b-fs-13); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-in-file small { font-size: var(--b-fs-12); color: var(--b-text-3); }

/* 脚：验收／退回（等你验收时）、和团团说说、催一下 */
.tt-in-foot { flex: none; display: grid; gap: var(--b-sp-3); padding: var(--b-sp-4) var(--b-sp-5) var(--b-sp-4) var(--b-sp-6); border-top: 1px solid var(--b-line); }
.tt-in-return { display: grid; gap: var(--b-sp-2); }
.tt-in-return textarea.field { height: auto; padding: var(--b-sp-2) var(--b-sp-3); resize: none; line-height: 1.5; }

/* 暗色：检查栏比画布纸面提亮一档并在左侧投一道影，读成压在画布上的面板，而不是画布的延伸 */
:root[data-theme="dark"] .tt-in { background: #25241F; box-shadow: inset 1px 0 0 var(--b-line-strong), -16px 0 32px -20px rgb(0 0 0 / .6); }
:root[data-theme="dark"] .tt-in-file { background: var(--b-bg-inset); }
