/* 未夜 · 任务中心（P1 重设计：场记板）。深空底 / 星光白 / 未夜蓝（BRAND_OS §17），蓝色刀口只标记当前切点；动效令牌见设计说明。
   只在 customer.html 加载，不再依赖 app.css（app.css 仍给旧版资产库页使用）。
   浅色 / 深色默认跟随系统；<html data-theme="light|dark"> 手动覆盖。无外部字体、无外部资源。
   品牌约束：无装饰光、无呼吸灯、无渐变；晨曦金不在本页使用；警示色仅用于“需要你处理”。 */

/* ---------- 设计令牌 ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Microsoft YaHei UI", monospace;
  --r-card: 12px;
  --r-ctl: 8px;
  --r-sm: 6px;
  --r-pill: 999px;
  /* 动效令牌（frontend-motion：单次、无回弹、入场减速） */
  --dur-instant: 90ms;
  --dur-quick: 160ms;
  --dur-base: 240ms;
  --dur-calm: 360ms;
  --dur-scene: 560ms;
  --t-press: var(--dur-instant);
  --t-state: var(--dur-quick);
  --t-enter: var(--dur-base);
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ease: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --bar-h: 52px;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #e9edf4;
  --fill: rgba(11,16,32,0.07);
  --fill-2: rgba(11,16,32,0.045);
  --ink: #0b1020;
  --ink-2: #2a3244;
  --muted: #515c6f;
  --ink-3: #5f6b80;
  --line: rgba(11,16,32,0.12);
  --line-strong: rgba(11,16,32,0.26);
  --accent: #2f6bde;
  --accent-btn: #1b55c4;
  --accent-btn-hover: #2463d6;
  --accent-ink: #1b55c4;
  --accent-soft: rgba(47,107,222,0.12);
  --on-accent: #ffffff;
  --ok: #1a6b3f;
  --ok-soft: rgba(31,122,71,0.13);
  --ok-fill: #2e8f58;
  --warn: #8f4a00;
  --warn-soft: rgba(184,117,20,0.15);
  --bad: #b3261e;
  --bad-solid: #b3261e;
  --bad-soft: rgba(179,38,30,0.1);
  --glass: rgba(243,245,249,0.88);
  --glass-side: rgba(243,245,249,0);
  --bar-solid: #f3f5f9;
  --seg-on: #ffffff;
  --seg-shadow: 0 0 0 1px rgba(11,16,32,0.16);
  --knob: #ffffff;
  --shadow: none;
  --shadow-pop: 0 12px 32px rgba(11,16,32,0.18);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px #2f6bde;
  --backdrop: rgba(11,16,32,0.38);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070a14;
    --surface: #0e1424;
    --surface-2: #151c30;
    --fill: rgba(200,215,255,0.1);
    --fill-2: rgba(200,215,255,0.06);
    --ink: #eef2fa;
    --ink-2: #c9d1e2;
    --muted: #9aa6bd;
    --ink-3: #8793aa;
    --line: rgba(200,215,255,0.14);
    --line-strong: rgba(200,215,255,0.28);
    --accent: #5b9bff;
    --accent-btn: #7db0ff;
    --accent-btn-hover: #96c0ff;
    --accent-ink: #7db0ff;
    --accent-soft: rgba(91,155,255,0.18);
    --on-accent: #07101f;
    --ok: #6fcb8a;
    --ok-soft: rgba(111,203,138,0.16);
    --ok-fill: #6fcb8a;
    --warn: #f0a35c;
    --warn-soft: rgba(240,163,92,0.16);
    --bad: #ff8f85;
    --bad-solid: #c4302b;
    --bad-soft: rgba(255,143,133,0.15);
    --glass: rgba(7,10,20,0.86);
    --bar-solid: #070a14;
    --seg-on: #2a3452;
    --seg-shadow: 0 0 0 1px rgba(200,215,255,0.22);
    --knob: #ffffff;
    --shadow: none;
    --shadow-pop: 0 12px 32px rgba(0,0,0,0.6);
    --ring: 0 0 0 2px var(--bg), 0 0 0 4px #5b9bff;
    --backdrop: rgba(0,0,0,0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #070a14;
  --surface: #0e1424;
  --surface-2: #151c30;
  --fill: rgba(200,215,255,0.1);
  --fill-2: rgba(200,215,255,0.06);
  --ink: #eef2fa;
  --ink-2: #c9d1e2;
  --muted: #9aa6bd;
  --ink-3: #8793aa;
  --line: rgba(200,215,255,0.14);
  --line-strong: rgba(200,215,255,0.28);
  --accent: #5b9bff;
  --accent-btn: #7db0ff;
  --accent-btn-hover: #96c0ff;
  --accent-ink: #7db0ff;
  --accent-soft: rgba(91,155,255,0.18);
  --on-accent: #07101f;
  --ok: #6fcb8a;
  --ok-soft: rgba(111,203,138,0.16);
  --ok-fill: #6fcb8a;
  --warn: #f0a35c;
  --warn-soft: rgba(240,163,92,0.16);
  --bad: #ff8f85;
  --bad-solid: #c4302b;
  --bad-soft: rgba(255,143,133,0.15);
  --glass: rgba(7,10,20,0.86);
  --bar-solid: #070a14;
  --seg-on: #2a3452;
  --seg-shadow: 0 0 0 1px rgba(200,215,255,0.22);
  --knob: #ffffff;
  --shadow: none;
  --shadow-pop: 0 12px 32px rgba(0,0,0,0.6);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px #5b9bff;
  --backdrop: rgba(0,0,0,0.6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--font); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd { font: 0.9em var(--mono); background: var(--fill); padding: 1px 6px; border-radius: 6px; }
pre { margin: 0; font-family: var(--mono); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -56px; z-index: 60; background: var(--accent-btn); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-pill); }
.skip:focus { top: 8px; text-decoration: none; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow { display: block; color: var(--accent-ink); font-weight: 600; font-size: 13px; letter-spacing: 0; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.47; margin: 8px 0 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.note { font-size: 14px; line-height: 1.5; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); color: var(--ink-2); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.field-error { margin: 8px 0 0; color: var(--bad); font-size: 13px; overflow-wrap: anywhere; }
[aria-invalid="true"] { border-color: var(--bad) !important; }

/* ---------- 卡片 / 徽标 ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); border: 0.5px solid var(--line); min-width: 0; }
.card-title { font-size: 21px; font-weight: 600; margin: 0 0 8px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.status-chip { font-weight: 500; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 15px/1.2 var(--font); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
  min-height: 40px; padding: 9px 20px; border-radius: var(--r-pill); border: 0;
  background: var(--fill); color: var(--accent-ink);
  transition: background var(--ease), color var(--ease), transform 100ms, opacity var(--ease);
}
.btn:hover { background: var(--line-strong); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent-btn); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-btn-hover); }
.btn.ghost { background: var(--fill-2); color: var(--accent-ink); }
.btn.ghost:hover { background: var(--fill); }
.btn.small { min-height: 32px; padding: 6px 14px; font-size: 13px; }
.btn[disabled], button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.danger, .btn.is-danger { color: var(--bad); }

/* ---------- 表单 ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 16px 0 6px; }
input, select, textarea {
  width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink);
  background: var(--fill-2); border: 1px solid transparent; border-radius: var(--r-ctl);
  padding: 10px 12px; min-height: 40px; transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
:root:not([data-theme="dark"]) input, :root:not([data-theme="dark"]) select, :root:not([data-theme="dark"]) textarea { background-color: var(--surface-2); }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1.5 1.5 4.5 4.5 4.5-4.5' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
select:disabled, input:disabled, textarea:disabled { opacity: 0.5; cursor: not-allowed; }
input[type="file"] { padding: 8px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font-size: 13px; }
input[type="file"]::file-selector-button { font: 500 13px var(--font); background: var(--accent-soft); color: var(--accent-ink); border: 0; border-radius: var(--r-pill); padding: 7px 14px; margin-right: 12px; cursor: pointer; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0;
  border-radius: 7px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer; position: relative;
  transition: background var(--ease), border-color var(--ease);
}
input[type="checkbox"]:checked { background: var(--accent-btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.5 12.5 3.8 3.8 7.2-8' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border-color: var(--accent-btn); }
input[type="checkbox"]:focus-visible { box-shadow: var(--ring); outline: none; }
input[type="number"] { font-variant-numeric: tabular-nums; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: var(--r-pill); background: var(--fill); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--fill); border-radius: var(--r-pill); }
progress::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); transition: width 300ms; }
progress::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }

.check-line { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
/* iOS 风格开关：仍是原生 checkbox，可 Tab 聚焦、空格切换 */
.switch-line { justify-content: space-between; min-height: 44px; margin: 4px 0 0; }
.switch-line input[type="checkbox"] { order: 2; width: 46px; height: 28px; border-radius: var(--r-pill); border: 0; background: var(--fill); position: relative; }
.switch-line input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--knob); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform var(--ease); }
.switch-line input[type="checkbox"]:checked { background: var(--ok-fill); }
.switch-line input[type="checkbox"]:checked::after { transform: translateX(18px); }
.switch-line input[type="checkbox"]:focus-visible { box-shadow: var(--ring); }
/* 开关按钮（role=switch）：自动执行、功能开关 */
button[role="switch"].toggle, .feature-switch {
  position: relative; flex: none; width: 52px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--fill); font-size: 0; color: transparent; cursor: pointer; transition: background var(--ease);
}
button[role="switch"].toggle::after, .feature-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--knob); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform var(--ease); }
button[role="switch"].toggle[aria-checked="true"], .feature-switch[aria-checked="true"] { background: var(--ok-fill); }
button[role="switch"].toggle[aria-checked="true"]::after, .feature-switch[aria-checked="true"]::after { transform: translateX(20px); }
button[role="switch"].toggle:hover, .feature-switch:hover { background: var(--line-strong); }
button[role="switch"].toggle[aria-checked="true"]:hover, .feature-switch[aria-checked="true"]:hover { background: var(--ok-fill); filter: brightness(1.04); }
button[role="switch"].toggle:disabled, .feature-switch:disabled, button[role="switch"].toggle[aria-disabled="true"] { opacity: 0.4; }
button[role="switch"].toggle[aria-disabled="true"] { cursor: not-allowed; }
button[role="switch"].toggle.locked::after { background: var(--knob) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5.5' y='10.5' width='13' height='9' rx='2.5' fill='none' stroke='%238e8e93' stroke-width='2'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 label { margin-top: 16px; }
.grid2 input, .grid2 select { margin-top: 6px; }

/* 折叠区 */
details.more, details.lt-checks, details.skill-manual, details.executor-advanced { min-width: 0; }
details.more { border-top: 0.5px solid var(--line); margin-top: 16px; padding-top: 4px; }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-radius: var(--r-sm); }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 5px 0 3px; border-right: 1.7px solid var(--ink-3); border-bottom: 1.7px solid var(--ink-3); transform: rotate(-45deg); transition: transform var(--ease); }
details[open] > summary::before { transform: rotate(45deg); }
summary:hover { color: var(--ink); }
summary:focus-visible { outline: none; box-shadow: var(--ring); }
details.more > summary { font-weight: 600; color: var(--ink); }

/* ---------- 顶栏（毛玻璃） ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--bar-solid); border-bottom: 0.5px solid var(--line); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.topbar-inner { max-width: 1440px; margin: 0 auto; height: var(--bar-h); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand > div { min-width: 0; }
.brand-logo { width: 28px; height: 28px; flex: none; color: var(--ink); }
.brand-name { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.1; white-space: nowrap; }
.brand-latin { font: 400 11px/1 var(--font); letter-spacing: 0.16em; color: var(--muted); text-transform: lowercase; }
.brand-sub { margin: 2px 0 0; font-size: 11.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-tools { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* 账号胶囊（顶栏）：邮箱（打码）+ 免费版 / 会员至 */
.account-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; min-height: 32px; padding: 4px 6px 4px 12px; border: 0; border-radius: var(--r-pill); background: var(--fill-2); color: var(--ink); font: 500 13px/1.2 var(--font); cursor: pointer; transition: background var(--ease); }
.account-pill:hover { background: var(--fill); }
.account-pill:focus-visible { outline: none; box-shadow: var(--ring); }
.account-pill-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pill-sub { flex: none; padding: 3px 9px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.account-pill[data-state="member"] .account-pill-sub { background: var(--ok-soft); color: var(--ok); }
.account-pill[data-state="out"] { padding: 4px 14px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.account-pill[data-state="out"] .account-pill-sub { display: none; }
.topbar-tools .status-chip { background: var(--fill-2); color: var(--ink-2); font-weight: 500; }
.theme-switch { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--r-pill); background: var(--fill); }
.theme-switch button { display: grid; place-items: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); cursor: pointer; transition: background var(--ease), color var(--ease); }
.theme-switch button .ico { width: 17px; height: 17px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-checked="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow); }
.theme-switch button:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- 侧栏与外壳 ---------- */
.customer-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); max-width: 1440px; margin: 0 auto; }
.customer-sidebar { position: sticky; top: var(--bar-h); align-self: start; height: calc(100vh - var(--bar-h)); height: calc(100dvh - var(--bar-h)); padding: 24px 16px; overflow-y: auto; background: var(--bg); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .customer-sidebar { background: var(--glass-side); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.nav-caption { margin: 0 12px 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.customer-nav { display: grid; gap: 2px; }
.customer-nav button {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left;
  min-height: 52px; padding: 8px 12px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink);
  font: 500 15px/1.3 var(--font); cursor: pointer; transition: background var(--ease), color var(--ease);
}
.customer-nav button > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--accent-ink); }
.customer-nav button small { grid-column: 2; display: block; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.3; }
.customer-nav button:hover { background: var(--fill-2); }
.customer-nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.customer-nav button[aria-current="page"] small { color: var(--ink-2); }
.customer-nav button:focus-visible { outline: none; box-shadow: var(--ring); }
.sidebar-note { margin: 28px 12px 0; padding-top: 16px; border-top: 0.5px solid var(--line); font-size: 13px; color: var(--ink-2); }
.sidebar-note p { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-fill); margin-right: 8px; vertical-align: 1px; }

.customer-main { width: 100%; min-width: 0; padding: 28px 48px 96px; outline: none; }
.customer-view { min-width: 0; }
.customer-account { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
#account-name { flex: 1; min-width: 0; text-align: right; overflow-wrap: anywhere; margin: 0; }
#banner { position: sticky; top: calc(var(--bar-h) + 12px); z-index: 30; margin: 0 0 16px; background: var(--surface); box-shadow: var(--shadow-pop); border: 0.5px solid var(--line); color: var(--warn); }

/* ---------- 页首 ---------- */
.workspace-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 16px 40px; align-items: center; padding: 0 0 16px; }
.workspace-hero h1, .workspace-heading h1 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.workspace-hero .lead { max-width: 34em; }
.hero-side { display: grid; gap: 12px; align-content: center; align-self: center; min-width: 0; }
.hero-status { margin: 0; padding: 4px 16px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); border: 0.5px solid var(--line); display: grid; }
.hero-status > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 12px 0; }
.hero-status > div + div { border-top: 0.5px solid var(--line); }
.hero-status dt { color: var(--muted); font-size: 13px; }
.hero-status dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
#worker-state::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 0.05em; background: var(--ink-3); }
#worker-state[data-state="ok"]::before { background: var(--ok-fill); }
#worker-state[data-state="warn"] { color: var(--ink); }
#worker-state[data-state="warn"]::before { background: var(--warn); }
.hero-status .service-box { align-items: center; }
.hero-status .service-box dd { display: grid; gap: 8px; justify-items: start; }
.service-box .note { margin: 0; overflow-wrap: anywhere; }
#service-stop { color: var(--ink-2); }
#service-stopped { font-size: 15px; font-weight: 600; padding: 14px 16px; }
body[data-stopped] .customer-grid, body[data-stopped] .local-view { opacity: 0.45; pointer-events: none; }

.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin: 0 0 32px; }
.workspace-heading h1 { margin: 6px 0 0; }
.workspace-heading .lead { max-width: 36em; }
.workspace-heading > .badge { flex: none; }

/* ---------- 工作台 ---------- */
.customer-grid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 24px 32px; align-items: start; }
.customer-grid > * { min-width: 0; }
.executor-card { grid-column: 1 / -1; order: 1; display: grid; gap: 4px; margin: 0; padding: 20px 24px; }
.executor-card[data-on="true"] { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow); }
.executor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.executor-head > div { flex: 1 1 auto; min-width: 0; }
.executor-head .card-title { margin: 0; font-size: 19px; }
.executor-head .hint { margin-top: 2px; overflow-wrap: anywhere; }
#executor-state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ink-3); vertical-align: 0.05em; }
.executor-card[data-on="true"] #executor-state::before { background: var(--ok-fill); }
#executor-confirm { margin-top: 8px; }
.connect-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.connect-bar .hint { margin: 0; }
.executor-advanced { margin-top: 8px; border-top: 0.5px solid var(--line); padding-top: 4px; }
.adv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 24px; margin: 8px 0 8px; align-items: start; }
.adv-grid label, .adv-codex label { display: grid; gap: 6px; margin: 0; min-width: 0; }
.adv-codex { display: grid; gap: 6px; min-width: 0; }
.adv-codex input { text-overflow: ellipsis; }
.adv-codex .hint { margin: 0; overflow-wrap: anywhere; }

.customer-create { padding: 24px; }
.customer-create .card-title { font-size: 21px; margin-bottom: 4px; }
.customer-create label:first-of-type { margin-top: 12px; }
.customer-create label { margin-top: 20px; }
.customer-create .hint { margin: 8px 0 0; }
.customer-create textarea { min-height: 88px; }
#need-label::after, #criteria-field:has(#criteria:required) #criteria-label::after { content: "必填"; margin-left: 8px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); font-size: 11px; font-weight: 500; vertical-align: 1px; }
.need-count { text-align: right; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.need-count[data-over="true"] { color: var(--bad); text-align: left; }
.step-number, .workflow-steps b, .connect-steps b { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; margin-right: 4px; }
#capability-scope { margin: 16px 0 0; background: var(--accent-soft); color: var(--ink); }
#column-settings { margin-top: 4px; }
.file-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.customer-submit { width: 100%; margin-top: 24px; min-height: 48px; font-size: 16px; font-weight: 600; }
#form-feedback { scroll-margin-top: calc(var(--bar-h) + 24px); scroll-margin-bottom: 24px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--bad-soft); color: var(--bad); font-size: 14px; }
#execution-help { margin: 16px 0 0; padding-top: 16px; border-top: 0.5px solid var(--line); }
.monitor-preference { margin: 8px 0 12px; }
.monitor-preference small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin: -2px 0 4px; }
.customer-settings .grid2 { margin-top: 0; }
.budget-main { display: grid; gap: 6px; margin: 0 0 16px; min-width: 0; }
.budget-main .grid2 { margin: 0; }
.budget-main .hint { margin: 0; }

/* 技能区 */
.skill-field { display: grid; gap: 10px; min-width: 0; margin: 20px 0 0; }
.skill-title { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.skill-field .hint, .skill-field .note { margin: 0; overflow-wrap: anywhere; }
.skill-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.skill-chips:empty { display: none; }
.skill-rec-label { font-size: 13px; font-weight: 600; color: var(--accent-ink); margin-right: 2px; }
.chip { font: 500 13px/1.2 var(--font); cursor: pointer; text-align: left; max-width: 100%; min-height: 32px; padding: 6px 14px; border-radius: var(--r-pill); border: 0; background: var(--fill); color: var(--ink-2); transition: background var(--ease), color var(--ease); }
.chip:hover { background: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.chip.is-clash { opacity: 0.5; cursor: help; text-decoration: line-through; text-decoration-color: var(--ink-3); }
.skill-manual summary { color: var(--accent-ink); }
.skill-manual select { margin: 4px 0 12px; }
.skill-manual label { margin-top: 8px; }
.skill-groups { display: grid; gap: 8px; }
.skill-cat { min-width: 0; }
.skill-cat-box { border-radius: var(--r-ctl); background: var(--fill-2); }
.skill-cat-box > summary { justify-content: flex-start; padding: 6px 14px 6px 10px; min-height: 44px; font-size: 14px; }
.skill-cat-name { flex: 1; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.skill-cat-count { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.skill-cat-box .chips, .skill-cat-box > .chips { padding: 2px 14px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-cat-box .chip { background: var(--surface); box-shadow: 0 0 0 0.5px var(--line); }
.skill-cat-box .chip[aria-pressed="true"] { background: var(--accent-soft); box-shadow: none; }
.skill-cat-note { margin: 6px 0 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--fill-2); color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; transition: background var(--ease); }
.skill-cat-note[data-flash="true"] { background: var(--accent-soft); color: var(--ink); }
.workspace-field { display: grid; gap: 6px; margin: 20px 0 0; }
.workspace-field label { margin: 0; }
.workspace-field .hint, .workspace-line { overflow-wrap: anywhere; margin: 0; }
.folder-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.folder-row select, #workspace-path { min-width: 0; width: 100%; }
#workspace-path { text-overflow: ellipsis; }
#workspace-path:focus { text-overflow: clip; }

/* ---------- 进度与成果 ---------- */
.customer-progress { min-width: 0; }
.customer-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.customer-progress-head h2 { font-size: 21px; font-weight: 600; }
.customer-progress-head h3 { font-size: 21px; font-weight: 600; overflow-wrap: anywhere; }
.history-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.history-toolbar input[type="search"] { background-color: var(--surface); border-color: var(--line-strong); flex: 1 1 200px; min-width: 0; border-radius: var(--r-pill); padding-left: 16px; }
.history-toolbar .switch-line { flex: 0 0 auto; gap: 12px; margin: 0; }
.history-toolbar > .hint { flex-basis: 100%; margin: 0; }
#bulk-archive { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 12px; border-top: 0.5px solid var(--line); }
#bulk-archive-age { width: auto; max-width: 360px; min-height: 36px; padding: 6px 36px 6px 12px; font-size: 13px; }
#bulk-archive-confirm { display: inline-flex; gap: 8px; }
#bulk-archive-status { flex-basis: 100%; margin: 0; }
#bulk-archive-status:empty { display: none; }
.history-toolbar:has(#show-archived-tasks:checked) #bulk-archive > :not(#bulk-archive-status),
.history-toolbar:has(#show-archived-tasks:checked) #bulk-archive:has(#bulk-archive-status:empty) { display: none; }

.customer-empty { padding: 28px 24px 12px; }
.customer-empty h3 { font-size: 21px; font-weight: 600; }
.customer-empty .lead { font-size: 15px; margin: 8px 0 12px; max-width: 40em; }
.workflow-steps { display: grid; list-style: none; margin: 0; padding: 0; }
.workflow-steps li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 0.5px solid var(--line); font-size: 15px; font-weight: 500; }
.workflow-steps b { width: 28px; height: 28px; font-size: 13px; margin: 0; }
.workflow-steps small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.customer-miss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 20px; margin: 0 0 16px; }
.customer-miss p { color: var(--ink-2); font-size: 14px; }

/* 任务列表：分组圆角列表（inset grouped） */
.customer-task-list { display: grid; margin: 0 0 24px; padding: 0; max-height: min(420px, 52vh); overflow-y: auto; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); border: 0.5px solid var(--line); }
.customer-task-list:empty { display: none; }
.customer-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; width: 100%; padding: 14px 20px; border: 0; border-top: 0.5px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; font: 500 15px/1.4 var(--font); cursor: pointer; overflow-wrap: anywhere; transition: background var(--ease); }
.customer-task:first-child { border-top: 0; }
.customer-task:hover { background: var(--fill-2); }
.customer-task[aria-pressed="true"] { background: var(--accent-soft); }
.customer-task .task-meta { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.customer-task .badge { grid-column: 2; grid-row: 1 / span 2; }
.customer-task:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }

.customer-detail { padding: 28px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.customer-detail, .customer-detail p, .customer-detail li, .customer-detail dd { overflow-wrap: anywhere; }
.customer-detail > p { margin-top: 8px; }
.customer-detail > p.note { margin-top: 12px; }
.customer-detail > .customer-progress-head { margin-bottom: 8px; }
.customer-detail h4 { margin: 24px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.customer-detail h4 + p { margin-top: 0; font-size: 16px; }
.customer-detail progress { margin: 20px 0 8px; }
.customer-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; border-radius: var(--r-ctl); background: var(--fill-2); }
.customer-checks li { padding: 12px 16px; font-size: 14px; }
.customer-checks li + li { border-top: 0.5px solid var(--line); }
.customer-checks .note { margin: 0; padding: 0; background: transparent; font-weight: 500; }
.customer-checks .hint { margin-top: 4px; }
.customer-result { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--mono); background: var(--fill-2); padding: 16px; border-radius: var(--r-ctl); max-height: 420px; overflow: auto; margin-top: 8px; }
.customer-downloads { display: grid; gap: 8px; margin: 20px 0 0; }
.customer-download { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--fill-2); }
.customer-download > span:first-child { flex: 1 1 140px; overflow-wrap: anywhere; font-weight: 500; }
.out-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 20px; }
.out-actions .hint { margin: 0; }
.refresh-note { align-self: center; }
.folder-open-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.folder-open-row .hint { margin: 0; min-width: 0; }
.extend-budget { margin: 16px 0 0; padding: 16px; border-radius: var(--r-ctl); background: var(--fill-2); }
.extend-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.extend-fields label { display: grid; gap: 6px; margin: 0; font-size: 13px; }
.extend-fields input { width: 120px; }
.extend-budget .hint { margin: 12px 0 0; }
.reply-box label { margin: 0 0 8px; }
.reply-box textarea { min-height: 80px; }
.reply-box .btn { margin-top: 12px; }
.stop-confirm { margin-top: 16px; }
.stop-confirm .note { margin: 0 0 12px; }
.tech-details { margin: 12px 0 0; }
.tech-details p { margin: 6px 0 0; }

/* ---------- 功能管理 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0 0 24px; }
.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.feature-card h2 { font-size: 19px; font-weight: 600; }
.feature-card .customer-progress-head { margin: 0; }
.feature-card p { margin: 0; color: var(--ink-2); }
.feature-card .hint { flex: 1; margin: 0; }
.feature-card .feature-switch { align-self: flex-start; }
.feature-boundary, .setup-card { padding: 28px; }
.feature-boundary h3 { font-size: 19px; margin-bottom: 8px; }
.feature-boundary p + p { margin-top: 8px; }

/* ---------- MCP / 指南 ---------- */
.mcp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.setup-card { min-width: 0; }
.setup-card h2 { font-size: 21px; font-weight: 600; margin: 32px 0 10px; display: flex; align-items: center; gap: 8px; }
.setup-card h2:first-child { margin-top: 0; }
.setup-card h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; }
.setup-card > p, .setup-card > section > p { color: var(--ink-2); margin-top: 8px; }
.setup-card label { margin: 20px 0 6px; }
.setup-card .btn { margin-top: 12px; }
.setup-card pre.customer-result { margin-top: 16px; }
.setup-card .connect-bar .btn, .setup-card .copy-head .btn { margin-top: 0; }
.setup-card .check-line { margin-top: 16px; }
.connect-steps { list-style: none; display: grid; margin: 16px 0 4px; padding: 0; }
.connect-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-top: 0.5px solid var(--line); }
.connect-steps li:first-child { border-top: 0; padding-top: 4px; }
.connect-steps b { width: 28px; height: 28px; font-size: 13px; margin: 0; }
.connect-steps h3 { margin: 3px 0 4px; font-size: 15px; }
.connect-steps p { margin: 0; font-size: 14px; color: var(--ink-2); }
.connect-steps code { overflow-wrap: anywhere; }
.local-guide > h3 { margin: 0; font-size: 17px; }
.connect-tools { list-style: none; display: grid; gap: 8px; padding: 0; margin: 16px 0 12px; }
.connect-tool { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 18px; border-radius: var(--r-ctl); background: var(--fill-2); }
.connect-tool > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.connect-tool b { font-size: 15px; font-weight: 600; }
.connect-tool .hint { margin: 0; }
.connect-tool[data-state="connected"] { background: var(--ok-soft); }
.connect-tool[data-state="connected"] .btn:not(.primary) { background: var(--surface); }
.connect-tool .note { background: var(--surface); }
.connect-tool[data-state="missing"] { opacity: 0.65; }
.connect-tool > .doubao-keyed { flex-basis: 100%; margin: 0; }
.connect-missing { padding: 4px 4px 0; border: 0; background: none; overflow-wrap: anywhere; list-style: none; }
.connect-result { flex-basis: 100%; margin: 4px 0 0; padding: 16px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: 0 0 0 0.5px var(--line); overflow-wrap: anywhere; }
.connect-result[data-ok="false"] { box-shadow: 0 0 0 1px var(--warn); }
.connect-result > .note { margin: 0 0 10px; }
.connect-result > .hint { margin: 4px 0; }
.connect-channel { margin: 12px 0 0; padding: 8px 14px; border-radius: var(--r-sm); background: var(--accent-soft); }
.connect-channel > .hint { margin: 0; color: var(--ink-2); }
.connect-next { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.connect-more { display: flex; flex-wrap: wrap; gap: 8px; }
.connect-more:empty { display: none; }
.connect-confirm { flex-basis: 100%; min-width: 0; display: grid; gap: 8px; }
.connect-confirm:empty { display: none; }
.connect-confirm .note { margin: 0; overflow-wrap: anywhere; }
.connect-confirm select { max-width: 100%; }
.generic-connect { margin: 20px 0 16px; padding: 20px; border-radius: var(--r-ctl); background: var(--fill-2); min-width: 0; }
.generic-connect h3 { margin: 0 0 6px; font-size: 17px; }
.generic-connect p { margin: 8px 0; overflow-wrap: anywhere; }
.copy-block { margin: 16px 0 0; min-width: 0; }
.copy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 8px; }
.copy-head label { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.copy-box { margin: 0; padding: 12px 14px; max-width: 100%; max-height: 220px; overflow: auto; border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 0 0 0.5px var(--line); color: var(--ink); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.clipboard-field { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
.guide-list { list-style: none; counter-reset: guide; margin: 0 0 24px; padding: 0; }
.guide-list li { counter-increment: guide; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 16px; padding: 20px 0; border-top: 0.5px solid var(--line); }
.guide-list li:first-child { border-top: 0; padding-top: 4px; }
.guide-list li::before { content: counter(guide); grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.guide-list h3 { font-size: 17px; margin: 4px 0 0; }
.guide-list p { color: var(--ink-2); margin: 0; }
.doubao-form code { overflow-wrap: anywhere; font-size: 15px; }

/* ---------- 登录 ---------- */
.customer-login { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(240px, 0.8fr); align-items: center; gap: 32px; max-width: 920px; margin: 0 0 24px; padding: 32px 36px; }
.login-logo { width: 96px; height: auto; display: block; box-sizing: border-box; padding: 14px 12px; border-radius: 22px; background: #0b0b0d; }
.customer-login h2 { margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.customer-login .hint { font-size: 15px; margin-top: 8px; }
.customer-login form { display: grid; gap: 4px; align-self: center; }
.customer-login form label { margin: 0 0 2px; }
.customer-login form .btn { margin-top: 12px; min-height: 44px; }
.login-capabilities { display: grid; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.login-capabilities li { display: flex; align-items: baseline; gap: 12px; font-size: 14px; }
.login-capabilities b { flex: 0 0 auto; color: var(--ink); font-weight: 600; }
.login-capabilities span { color: var(--muted); }

/* ---------- 对话框 ---------- */
.materials-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 28px; border: 0; border-radius: var(--r-card); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.materials-dialog::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.materials-dialog h2 { font-size: 21px; }
.material-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 0; border-top: 0.5px solid var(--line); }
.material-info { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.material-info .hint { margin: 4px 0 0; }
.material-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 本机工具页：能力库 / 装配 / 复盘 ---------- */
.local-view { min-width: 0; }
.lt-scroll-hint { display: none; margin: -8px 0 12px; font-size: 13px; }
.lt-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.seg-control { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 2px; margin: 0 0 20px; border-radius: 10px; background: var(--fill); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-control::-webkit-scrollbar { display: none; }
.seg-control .chip { flex: 1 0 auto; min-height: 32px; padding: 5px 18px; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 500; text-align: center; white-space: nowrap; }
.seg-control .chip:hover { background: transparent; color: var(--ink); }
.seg-control .chip[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); font-weight: 600; box-shadow: var(--seg-shadow); }
.seg-control.mini { margin: 0; }
.seg-control.mini .chip { min-height: 26px; padding: 2px 12px; font-size: 12px; }
.lt-search { display: flex; gap: 8px; align-items: center; margin: 0 0 20px; padding: 10px 10px 10px 20px; }
.lt-search input { flex: 1 1 auto; min-width: 0; background: transparent; border: 0; padding-left: 0; font-size: 16px; }
.lt-search input:focus { box-shadow: none; background: transparent; }
.lt-search:focus-within { box-shadow: var(--ring); }
.lt-split { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-bottom: 32px; }
.lt-list { max-height: 640px; overflow: auto; display: grid; align-content: start; min-width: 0; padding: 8px; }
.lt-group { margin: 12px 0 4px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.5; }
.lt-group:first-child { margin-top: 4px; }
.lt-item { display: grid; gap: 2px; text-align: left; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); cursor: pointer; font: inherit; min-width: 0; transition: background var(--ease); }
.lt-item:hover { background: var(--fill-2); }
.lt-item.is-active { background: var(--accent-soft); }
.lt-item .lt-tag { justify-self: start; font-size: 12px; line-height: 1.4; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.lt-hit { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.lt-groups .lt-group-line { display: block; }
.lt-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.lt-item b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.lt-item small { color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lt-list > .hint { padding: 8px 12px; }
.lt-detail { min-width: 0; padding: 24px 28px; }
.lt-detail > .hint { margin: 0; }
.lt-detail > .note:first-child { margin-top: 0; }
.lt-block { margin: 0 0 16px; min-width: 0; }
.lt-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; margin: 0 0 12px; }
.lt-block-head strong { flex: 1 1 100%; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.lt-block-head .seg-control { margin-left: auto; }
.lt-block-head .hint { margin: 0; }
.lt-out .lt-block-head strong { flex: 1 1 auto; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
#retro-bar { margin: 0 0 16px; }
.lt-pre { margin: 0; padding: 16px; border-radius: var(--r-ctl); background: var(--fill-2); color: var(--ink); font: 13px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }
.lt-packs { margin-top: 8px; padding: 28px; }
.lt-pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.lt-pack { padding: 16px 18px; border-radius: var(--r-ctl); background: var(--fill-2); min-width: 0; }
.lt-pack h3 { margin: 0 0 6px; font-size: 16px; }
.lt-pack p { margin: 0 0 4px; overflow-wrap: anywhere; }
.lt-panel { display: grid; gap: 16px; min-width: 0; margin-bottom: 24px; }
.lt-form { display: grid; gap: 12px; min-width: 0; padding: 28px; align-content: start; }
.lt-form > * { min-width: 0; }
.lt-form .card-title { margin: 0 0 4px; }
.lt-form label { display: grid; gap: 6px; margin: 4px 0 0; }
.lt-form label.check-line { display: flex; }
.lt-form .grid2 { gap: 12px 16px; }
.lt-form .grid2 label { margin-top: 0; }
.lt-form .grid2 label input, .lt-form .grid2 label select { margin: 0; }
.lt-form .hint { margin: 0; }
.lt-form .note { margin: 0; }
.lt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lt-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lt-inline select, .lt-inline input { flex: 1 1 160px; min-width: 0; width: auto; }
.lt-checks { border-radius: var(--r-ctl); background: var(--fill-2); }
.lt-checks > summary { justify-content: flex-start; padding: 6px 14px 6px 10px; min-height: 44px; }
.lt-check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; padding: 0 14px 12px; max-height: 280px; overflow: auto; }
.lt-check-list .check-line { margin: 0; min-height: 36px; font-size: 14px; }
.lt-write { display: grid; gap: 12px; min-width: 0; padding: 28px; }
.lt-write .card-title { margin: 0; }
.lt-write .hint { margin: 0; }
.lt-write label { margin: 0; }
.lt-plan, .lt-confirm { display: grid; gap: 12px; justify-items: start; min-width: 0; width: 100%; }
.lt-plan .note, .lt-confirm .note { margin: 0; overflow-wrap: anywhere; }
.lt-plan .lt-pre { width: 100%; }
.lt-out { min-width: 0; padding: 28px; }
.lt-out .card-title { margin: 0 0 4px; }
.lt-out > .hint { margin: 0 0 12px; }
.lt-out > .note { margin: 0 0 12px; }
.lt-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.lt-h { margin: 32px 0 12px; font-size: 21px; font-weight: 600; }
.lt-retro { margin: 0 0 12px; display: grid; gap: 10px; min-width: 0; padding: 24px; }
.lt-retro .customer-progress-head { margin: 0; }
.lt-retro h3 { font-size: 17px; font-weight: 600; }
.lt-retro progress { height: 8px; }
.lt-retro p { margin: 0; overflow-wrap: anywhere; }
.lt-retro .hint { margin: 0; }
.lt-bullets { padding-left: 20px; margin: 4px 0; overflow-wrap: anywhere; color: var(--ink-2); }
.lt-bullets li { margin: 4px 0; }
.lt-retro-wrap > .hint, #retro-out > .hint { margin: 8px 0; }

/* ---------- Markdown 排版（能力库卡片、装配结果） ---------- */
.md { font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 28px 0 8px; line-height: 1.3; }
.md .md-h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.md .md-h2 { font-size: 20px; font-weight: 600; padding-bottom: 8px; border-bottom: 0.5px solid var(--line); }
.md .md-h3 { font-size: 17px; font-weight: 600; }
.md .md-h4, .md .md-h5, .md .md-h6 { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0; padding-left: 1.5em; }
.md li { margin: 4px 0; padding-left: 2px; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md li::marker { color: var(--ink-3); }
.md strong { font-weight: 600; }
.md em { font-style: italic; }
.md code { font: 0.88em var(--mono); background: var(--fill); padding: 2px 6px; border-radius: 6px; }
.md pre { margin: 14px 0; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--fill-2); overflow: auto; font: 13px/1.65 var(--mono); }
.md pre code { background: none; padding: 0; font: inherit; white-space: pre; }
.md blockquote { margin: 14px 0; padding: 4px 16px; border-left: 3px solid var(--line-strong); color: var(--ink-2); }
.md hr { border: 0; border-top: 0.5px solid var(--line-strong); margin: 24px 0; }
.md .md-url { color: var(--muted); font-size: 0.9em; }
.md .md-front { color: var(--muted); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); margin: 0 0 16px; }
.md .md-table { overflow-x: auto; margin: 14px 0; }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md th, .md td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 0.5px solid var(--line); }
.md th { font-weight: 600; color: var(--ink-2); background: var(--fill-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .customer-shell { grid-template-columns: 216px minmax(0, 1fr); }
  .customer-main { padding: 32px 32px 80px; }
  .customer-grid { grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1fr); gap: 24px; }
  .mcp-grid { grid-template-columns: minmax(0, 1fr); }
  .customer-login { grid-template-columns: auto minmax(0, 1fr); }
  .customer-login form { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  /* 侧栏 → 顶部可横向滑动的分段标签 */
  .customer-shell { display: block; }
  .customer-sidebar { position: static; height: auto; padding: 12px 16px 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .nav-caption, .sidebar-note, .customer-nav button small { display: none; }
  .customer-nav { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--fill); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .customer-nav::-webkit-scrollbar { display: none; }
  .customer-nav button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 11px; font-size: 14px; white-space: nowrap; scroll-snap-align: center; }
  .customer-nav button > span { width: 20px; height: 20px; border-radius: 0; color: inherit; }
  .customer-nav button .ico { width: 18px; height: 18px; }
  .customer-nav button[aria-current="page"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow); }
  .customer-nav button[aria-current="page"] > span { color: var(--accent-ink); }
  .customer-main { padding: 24px 16px 64px; }
  .customer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workspace-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 24px; align-items: start; }
  .workspace-heading { flex-wrap: wrap; align-items: flex-start; margin-bottom: 24px; }
  .lt-split { grid-template-columns: minmax(0, 1fr); }
  .lt-list { max-height: 340px; }
  .executor-card { order: 1; }
  .customer-create { order: -2; }
  .customer-progress { order: -1; }
  .customer-login { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px; }
  .login-logo { width: 72px; padding: 10px 8px; border-radius: 16px; }
}
@media (max-width: 640px) {
  :root { --bar-h: 52px; }
  .topbar-inner { padding: 0 16px; gap: 8px; }
  .brand-latin, .brand-sub { display: none; }
  .topbar-tools { gap: 8px; }
  .topbar-tools .status-chip { font-size: 11px; padding: 4px 8px; max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
  .theme-switch button { width: 44px; height: 44px; }
  body { font-size: 16px; }
  .workspace-hero h1, .workspace-heading h1 { font-size: 32px; line-height: 1.12; }
  .lead { font-size: 16px; }
  .customer-create, .customer-detail, .feature-boundary, .setup-card, .lt-form, .lt-out, .lt-write, .lt-packs { padding: 20px; }
  .lt-detail { padding: 20px; }
  .executor-card { padding: 16px 20px; }
  .grid2, #column-settings { grid-template-columns: minmax(0, 1fr); }
  .adv-grid { grid-template-columns: minmax(0, 1fr); }
  .customer-task { padding: 14px 16px; }
  .history-toolbar .btn, .customer-progress-head .btn, .out-actions .btn, .customer-miss .btn, .reply-box .btn, #bulk-archive-age, .btn.small { min-height: 44px; }
  .check-line { min-height: 44px; }
  .folder-row .btn, .connect-tool .btn { min-height: 44px; }
  .folder-row { grid-template-columns: minmax(0, 1fr); }
  .folder-row .btn { width: 100%; }
  .connect-tool .btn, .connect-more .btn, .connect-confirm .btn { width: 100%; }
  .connect-more .btn { flex: 1 1 100%; }
  .copy-head .btn { min-height: 44px; min-width: 72px; }
  .customer-download .btn { min-height: 44px; min-width: 64px; }
  .lt-actions .btn { flex: 1 1 auto; }
  .lt-block-head .btn.small { min-height: 36px; }
  .lt-block-head .seg-control { margin-left: 0; }
  .lt-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .lt-tabs::-webkit-scrollbar { display: none; }
  .lt-tabs .chip { flex: none; min-height: 40px; }
  .lt-scroll-hint:not([hidden]) { display: block; }
  .seg-control { display: flex; }
  .seg-control .chip { padding: 5px 10px; min-height: 40px; }
  .workflow-steps li { padding: 12px 0; }
  .customer-account { margin-bottom: 12px; }
  .md .md-h1 { font-size: 22px; }
  .lt-block-head strong { font-size: 22px; }
  .customer-login h2 { font-size: 24px; }
  #bulk-archive-age { width: 100%; max-width: 100%; }
}

/* ---------- 会员：锁定提示与账号页 ---------- */
.lock-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--fill-2); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.lock-note[hidden] { display: none; }
.lock-ico { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); color: var(--ink-3); }
.lock-ico .ico { width: 16px; height: 16px; }
.lock-text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.lock-go { flex: none; }
.lock-note.block { margin: 0 0 24px; padding: 14px 18px; border-radius: var(--r-card); }
.acc-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.acc-card { padding: 24px 28px; min-width: 0; }
.acc-status, .acc-off { grid-column: 1 / -1; }
.acc-auth { grid-column: auto; }
.acc-off { display: grid; justify-items: start; gap: 8px; }
.acc-off .card-title { margin: 4px 0 0; }
.acc-off .lock-ico { width: 40px; height: 40px; }
.acc-off .lock-ico .ico { width: 22px; height: 22px; }
.acc-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.acc-big { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 0; }
.acc-form { display: grid; gap: 14px; }
.acc-field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.acc-submit { min-height: 44px; }
.acc-redeem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
.acc-redeem input { font-family: var(--mono); letter-spacing: 0.04em; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 16px; }
.plan-card { position: relative; display: grid; gap: 2px; justify-items: start; padding: 16px; border-radius: var(--r-ctl); background: var(--fill-2); min-width: 0; }
.plan-card .plan-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-card .plan-price { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.plan-card .plan-days { font-size: 14px; color: var(--ink-2); }
.plan-card .hint { margin-top: 2px; }
.plan-card .plan-best { position: absolute; top: 12px; right: 12px; }
.dev-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-width: 0; }
.dev-row + .dev-row { border-top: 0.5px solid var(--line); }
.dev-info { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.dev-info b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.dev-info .hint { margin: 0; }
.stop-note { margin: 8px 0 0; }
@media (max-width: 900px) {
  .acc-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .acc-card { padding: 20px; }
  .customer-nav { position: relative; }
  .customer-nav[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .customer-nav[data-fade="start"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
  .customer-nav[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 36px), transparent); }
}
@media (max-width: 640px) {
  .brand { flex: none; }
  .topbar-tools { flex: 1; justify-content: flex-end; }
  .account-pill { max-width: 150px; padding-left: 10px; }
  .account-pill-sub { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .account-pill[data-state="free"] .account-pill-main, .account-pill[data-state="member"] .account-pill-main { display: none; }
  .account-pill[data-state="free"], .account-pill[data-state="member"] { padding: 4px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .plan-card { grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 12px; padding: 14px 16px; justify-items: start; }
  .plan-card .hint { display: none; }
  .plan-card .plan-best { position: static; grid-column: 1 / -1; }
  .acc-big { font-size: 26px; }
  .acc-redeem { grid-template-columns: minmax(0, 1fr); }
  .acc-redeem .btn, .acc-card .connect-bar .btn { min-height: 44px; }
  .lock-note { padding: 10px 12px; }
}

/* ---------- 法律页（用户协议 / 隐私政策） ---------- */
.legal-main { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }
.legal-card { padding: 32px 36px; }
.legal-card h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 16px; }
.legal-card h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-card p { line-height: 1.7; margin: 8px 0 0; color: var(--ink-2); }
.legal-card p.note { color: var(--warn); }
.legal-foot { margin-top: 32px; }
@media (max-width: 640px) { .legal-card { padding: 22px 20px; } .legal-card h1 { font-size: 26px; } }

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .customer-task[aria-pressed="true"], .customer-nav button[aria-current="page"], .lt-item.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
  input[type="checkbox"]:checked { forced-color-adjust: none; }
}

@media (max-width: 520px) { .topbar-tools .status-chip { display: none; } }

/* 手机：导航不再横向滑动被截断，8 个入口换行成两排，全部可见。 */
@media (max-width: 600px) {
  .customer-nav { flex-wrap: wrap; overflow-x: visible; }
  .customer-nav button { flex: 1 1 22%; padding: 8px 6px; font-size: 13px; }
  .customer-nav button > span { display: none; }
  .customer-detail .customer-progress-head h3, #task-detail h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

.generic-connect summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
@media (max-width: 600px) {
  .customer-app input[type="number"], .customer-app input[type="search"], .customer-app input[type="text"] { min-height: 44px; }
  .switch-line { min-height: 48px; }
}

/* 账号：协议更新提示、我的数据与注销 */
.acc-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 12px; }
.acc-consent .btn { margin-left: auto; }
.acc-data { grid-column: 1 / -1; }
.acc-danger { margin-top: 18px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding-top: 12px; }
.acc-danger summary { cursor: pointer; font-weight: 500; color: var(--bad); min-height: 44px; display: flex; align-items: center; }
.acc-danger .acc-form { max-width: 420px; margin-top: 10px; }
@media (max-width: 600px) { .acc-consent .btn { margin-left: 0; width: 100%; min-height: 44px; } .acc-danger .btn { min-height: 44px; } }

/* ---------- 协同页：AI 成员 · 分工 · 任务讨论 ---------- */
.skill-route:empty { display: none; }
.skill-route { display: grid; gap: 8px; min-width: 0; }
.skill-route .note { margin: 0; }
.team-root { display: grid; gap: 24px; min-width: 0; }
.team-status { padding: 16px 20px; border-radius: var(--r-card); border: 0.5px solid var(--line); min-width: 0; }
.team-status.ok { background: var(--ok-soft); color: var(--ok); }
.team-status.warn { background: var(--warn-soft); color: var(--warn); }
.team-status-text { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.team-needs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.team-needs li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.team-why { flex: 1 1 220px; min-width: 0; color: var(--ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.team-needs .btn { min-height: 44px; }
.team-block { display: grid; gap: 12px; min-width: 0; align-content: start; }
.team-h { font-size: 21px; font-weight: 600; }
.team-h2 { font-size: 16px; font-weight: 600; margin-top: 4px; }
.team-mini { margin: 12px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.team-roster, .team-tasks, .team-subs, .team-msgs, .team-crit { list-style: none; margin: 0; padding: 0; }
.team-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.team-agent { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.team-agent-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-agent-head strong { overflow-wrap: anywhere; min-width: 0; }
.team-state { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.team-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.team-dot[data-state="idle"] { background: var(--ok-fill); }
.team-dot[data-state="busy"] { background: var(--accent); }
.team-dot[data-state="off"] { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); }
.team-cur { margin: 0; overflow-wrap: anywhere; }
.team-agent .switch-line { margin-top: 2px; }
.team-tasks { display: grid; gap: 12px; }
.team-task { padding: 16px 20px; display: grid; gap: 10px; }
.team-task[data-needs="true"] { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.team-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.team-toggle { flex: 1 1 240px; min-width: 0; min-height: 44px; display: grid; gap: 2px; text-align: left; padding: 6px 8px; margin: -6px -8px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.team-toggle:hover { background: var(--fill-2); }
.team-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.team-toggle::after { content: "展开分工与讨论"; font-size: 12px; color: var(--accent-ink); }
.team-toggle[aria-expanded="true"]::after { content: "收起"; }
.team-title { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.team-toggle .hint { margin: 0; }
.team-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.team-task .note { margin: 0; }
.team-need-tag { justify-self: start; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-ctl); background: var(--warn-soft); color: var(--warn); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.team-need-tag:focus-visible { outline: none; box-shadow: var(--ring); }
.team-owner-off { margin: 0; }
.team-field { min-width: 0; }
.team-field label { margin: 8px 0 4px; }
.team-field select, .team-field input, .team-field textarea { min-height: 44px; }
.team-field textarea { min-height: 72px; }
.team-body { display: grid; gap: 12px; border-top: 0.5px solid var(--line); padding-top: 12px; min-width: 0; }
.team-subs { display: grid; gap: 10px; }
.team-sub { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); min-width: 0; }
.team-sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.team-sub-head strong { overflow-wrap: anywhere; min-width: 0; }
.team-crit { padding-left: 18px; list-style: disc; font-size: 14px; color: var(--ink-2); }
.team-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.team-row .team-field { flex: 1 1 180px; }
.team-row .btn { min-height: 44px; }
.team-form { display: grid; gap: 8px; min-width: 0; }
.team-form .btn { min-height: 44px; justify-self: start; }
.team-form .field-error, .team-block > .field-error { margin: 0; }
.team-msgs { display: grid; gap: 8px; }
.team-msg { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--fill-2); display: grid; gap: 6px; justify-items: start; min-width: 0; max-width: 100%; }
.team-msg.mine { background: var(--accent-soft); }
.team-meta { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.team-time { margin: 0; }
.team-text { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.team-msg .btn { min-height: 44px; }
.team-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0; }
@media (max-width: 640px) {
  .team-task { padding: 14px 16px; }
  .team-status { padding: 14px 16px; }
  .team-needs .btn, .team-form .btn { width: 100%; }
  .team-roster { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 第四轮复测（F2）：提交原因、行内确认、候选标准、警告条、设备确认、协同提示 ---- */
.warn-strip { display: grid; gap: 6px; margin: 0 0 12px; }
.warn-strip[hidden] { display: none; }
.warn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--warn-soft); color: var(--warn); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.warn-row .btn { flex: none; min-height: 44px; }
.submit-reason { font-weight: 600; }
.submit-ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; overflow-wrap: anywhere; }
.submit-ask[hidden], .criteria-candidates[hidden] { display: none; }
.submit-ask > span:first-child { flex: 1 1 220px; min-width: 0; }
.submit-ask .connect-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.submit-ask .btn { min-height: 44px; }
.criteria-candidates { display: grid; gap: 8px; margin-top: 10px; }
.criteria-candidates .hint { margin: 0; }
.criteria-candidates .chip { min-height: 36px; white-space: normal; }
.result-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.result-actions .btn { min-height: 44px; }
.result-actions .hint { margin: 0; }
.connect-stale { margin: 2px 0 0; color: var(--warn); overflow-wrap: anywhere; }
.route-hint { margin: 0; overflow-wrap: anywhere; }
.team-legend { margin: 0 0 8px; overflow-wrap: anywhere; }
.team-needs li > input { flex: 1 1 200px; min-width: 0; min-height: 44px; }
.team-needs li > .field-error { flex: 1 1 100%; }
.team-agent .switch-line { min-height: 44px; width: 100%; }
.dev-info .dev-seen, .dev-info .dev-id { overflow-wrap: anywhere; }
.dev-row { flex-wrap: wrap; }
.dev-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.dev-confirm .btn, .dev-row .btn { min-height: 44px; }
.dev-row > .field-error { flex: 1 1 100%; margin: 0; }
.asm-no-task { margin-top: 0; }

/* F2 7：320 宽顶栏——主题提示文字让位，会员胶囊不压品牌 */
@media (max-width: 400px) {
  .topbar-tools .theme-tip { display: none; }
  .topbar-tools { overflow: hidden; gap: 4px; }
  .topbar-inner { gap: 4px; }
  .theme-switch { padding: 0; gap: 0; }
  .account-pill { max-width: 76px; padding: 4px 8px; }
  .account-pill-sub { display: none; }
}

/* ---------- 提交按钮：不能提交时置灰但仍可聚焦（aria-disabled），红字原因在按钮上方 ---------- */
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[aria-disabled="true"]:hover { background: var(--accent-btn); }

/* ---------- 能力库分类 chips：窄屏横向滚动，右侧（或左侧）有内容时渐隐提示 ---------- */
@media (max-width: 640px) {
  .lt-tabs[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .lt-tabs[data-fade="start"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
  .lt-tabs[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 40px), transparent); }
}

/* ---------- 账号收尾：邮箱未验证小字、忘记密码一行、兑换按钮上方的原因 ---------- */
.acc-status .eyebrow .acc-unverified { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted, inherit); overflow-wrap: anywhere; }
.acc-forgot { margin: 0 0 8px; overflow-wrap: anywhere; }
.acc-redeem-why { margin: 0; flex: 1 1 auto; }
.acc-redeem-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.acc-redeem-gate .btn { min-height: 44px; }
.acc-redeem-gate + .acc-redeem { margin-top: 8px; }

/* 注销确认按钮：字段填好后是实色危险按钮，空态灰掉（仅局部） */
.acc-danger .btn.danger { background: var(--bad-solid); color: #fff; font-weight: 600; cursor: pointer; }
.acc-danger .btn.danger:hover { filter: brightness(0.92); }
.acc-danger .btn.danger:disabled { background: #5d626c; color: #d5d8de; opacity: 1; font-weight: 500; filter: none; cursor: not-allowed; border-color: transparent; }
.acc-export-path { word-break: break-all; user-select: all; }

/* ---------- 拆成两个任务：表单上方固定的步骤条（第 1 件 / 共 2 件：…　接下来：…） ---------- */
.split-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px; }
.split-steps[hidden] { display: none; }
.split-steps .split-next { color: var(--muted); }
.split-steps .split-notes { font-size: 12px; line-height: 1.4; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.split-steps .split-notes-text { flex-basis: 100%; margin: 0; }
.split-steps .btn { margin-left: auto; }

/* ---------- 任务中心：分区列表、引导条、详情（谁写的 / 进度 / 验收 / 记录） ---------- */
.task-group-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 20px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); background: var(--surface); border-top: 0.5px solid var(--line); }
.task-group-head:first-child { border-top: 0; border-radius: var(--r-card) var(--r-card) 0 0; }
.task-group-head .group-count { min-width: 20px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center; }
.task-group-head.group-needs { color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.task-group-head.group-needs .group-count { background: var(--warn); color: var(--surface); }
.task-group-head + .customer-task { border-top: 0; }
.customer-task.group-needs { box-shadow: inset 3px 0 0 var(--warn); background: color-mix(in srgb, var(--warn-soft) 35%, transparent); }
.customer-task.group-needs[aria-pressed="true"] { background: var(--accent-soft); }
.customer-task.group-done, .customer-task.group-ended { color: var(--ink-2); }

.task-guide { margin: 0 0 16px; padding: 18px 20px; border-radius: var(--r-card); background: var(--surface); border: 0.5px solid var(--line); box-shadow: var(--shadow); }
.task-guide[hidden] { display: none; }
.task-guide.is-offline { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.task-guide.is-error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.task-guide .guide-title { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.task-guide.is-offline .guide-title { color: var(--warn); }
.task-guide.is-error .guide-title { color: var(--bad); }
.task-guide > .hint { margin: 4px 0 0; }
.task-guide > .btn { margin-top: 12px; }
.guide-steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.guide-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); }
.guide-steps li > strong { font-size: 14px; font-weight: 600; }
.guide-steps li > .hint { flex-basis: 100%; margin: 0; }
.guide-cmd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; }
.guide-cmd { font: 500 14px/1.4 var(--mono); padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface); border: 0.5px solid var(--line-strong); color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.guide-tip { margin: 0; }
.guide-skeleton { display: block; height: 12px; margin-top: 10px; border-radius: var(--r-pill); background: var(--fill); width: 100%; }
.guide-skeleton.short { width: 60%; }

.src-tag { display: inline-flex; align-items: center; flex: none; padding: 1px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; line-height: 1.6; letter-spacing: 0.01em; white-space: nowrap; }
.src-user { background: var(--fill); color: var(--ink-2); }
.src-ai { background: var(--accent-soft); color: var(--accent-ink); }
.by-user, .by-ai { display: grid; gap: 6px; justify-items: start; margin: 8px 0 0; padding: 10px 14px; border-radius: var(--r-ctl); font-size: 14px; line-height: 1.55; }
.by-user { background: var(--fill-2); box-shadow: inset 3px 0 0 var(--line-strong); color: var(--ink); }
.by-ai { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); }
.by-user .src-body, .by-ai .src-body { white-space: pre-wrap; overflow-wrap: anywhere; justify-self: stretch; }
.customer-detail h4 + p.by-user { font-size: 15px; }
.customer-detail > .src-tag { margin-top: 12px; }
pre.customer-result.by-ai { padding-left: 16px; }

.task-now { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.task-now .now-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink-3); }
.task-now.tone-run .now-dot { background: var(--accent); }
.task-now.tone-needs .now-dot, .task-now.tone-recover .now-dot { background: var(--warn); }
.task-now.tone-needs { color: var(--warn); font-weight: 600; }
.task-now.tone-ok .now-dot { background: var(--ok-fill); }
.task-now.tone-bad .now-dot { background: var(--bad); }

.needs-zone { margin: 16px 0 0; padding: 16px; border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn-soft) 50%, var(--surface)); }
.needs-zone-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--warn); }
.needs-zone > .note.warn:first-of-type { margin-top: 8px; }
.needs-zone .extend-budget { background: var(--surface); }
.needs-zone .tech-details { margin-top: 12px; }
.pq-from { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
blockquote.pq-quote { margin: 0 0 12px; }
.pq-answer { margin: 0 0 12px; }
.quick-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.quick-add .chip { font-weight: 600; }

.task-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 20px 0 4px; }
.meter-item { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); min-width: 0; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.meter-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.meter-value { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.customer-detail .meter-item progress { margin: 0; }
.meter-bar { height: 6px; border-radius: var(--r-pill); background: var(--fill); overflow: hidden; }
.meter-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 300ms; }
.meter-item.tone-warn .meter-value { color: var(--warn); }
.meter-item.tone-warn .meter-bar > span { background: var(--warn); }
.meter-item.tone-bad .meter-value { color: var(--bad); }
.meter-item.tone-bad .meter-bar > span { background: var(--bad); }
.meter-item.tone-ok .meter-value { color: var(--ok); }
.meter-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.meter-pips { display: flex; gap: 4px; }
.meter-pips i { width: 14px; height: 6px; border-radius: var(--r-pill); background: var(--fill); }
.meter-pips i.on { background: var(--warn); }

.checks-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 24px; }
.customer-detail .checks-head h4 { margin: 0; }
.checks-head .hint { margin: 0; font-variant-numeric: tabular-nums; }
.check-list { margin-top: 8px; }
.check-item { display: grid; gap: 6px; }
.check-top { display: flex; align-items: flex-start; gap: 8px; }
.check-mark { flex: none; width: 18px; font-weight: 700; color: var(--ink-3); }
.check-item.is-pass .check-mark { color: var(--ok); }
.check-item.is-weak .check-mark { color: var(--warn); }
.check-text { flex: 1; min-width: 0; color: var(--ink); }
.check-state { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); }
.check-item.is-pass .check-state { background: var(--ok-soft); color: var(--ok); }
.check-item.is-weak .check-state, .check-item.is-pending .check-state { background: var(--warn-soft); color: var(--warn); }
.tag-new { flex: none; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); }
.check-item .by-ai { margin: 0 0 0 26px; font-size: 13px; }
.ev-flag { margin: 0 0 0 26px; font-size: 13px; color: var(--warn); }
.ev-flag::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--warn); color: var(--surface); font-size: 11px; font-weight: 700; vertical-align: 1px; }

.amend-box textarea { width: 100%; min-height: 64px; }
.amend-box label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 600; }
.amend-box .btn { margin-top: 12px; }
.amend-status:empty { display: none; }

.tl-caption { margin: 10px 0 6px; }
.task-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; position: relative; padding: 0 0 14px; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1.5px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 10px; height: 10px; margin: 5px 0 0 1px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 3px var(--surface); position: relative; }
.tl-item.tone-run .tl-dot { background: var(--accent); }
.tl-item.tone-needs .tl-dot, .tl-item.tone-user .tl-dot { background: var(--warn); }
.tl-item.tone-ok .tl-dot { background: var(--ok-fill); }
.tl-item.tone-bad .tl-dot { background: var(--bad); }
.tl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tl-type { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-msg { margin: 2px 0 0; font-size: 14px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-item.tone-muted .tl-msg { color: var(--ink-2); }

@media (max-width: 640px) {
  .task-group-head { padding: 8px 16px 6px; }
  .task-guide { padding: 16px; }
  .guide-steps .btn, .quick-add .chip, .amend-box .btn { min-height: 44px; }
  .task-meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .needs-zone { padding: 14px; }
  .check-item .by-ai, .ev-flag { margin-left: 0; }
  .check-top { flex-wrap: wrap; }
}
@media (forced-colors: active) {
  .by-user, .by-ai, .needs-zone, .meter-item, .task-guide { border: 1px solid CanvasText; }
  .meter-bar > span, .meter-pips i.on, .tl-dot { background: Highlight; forced-color-adjust: none; }
}

/* ---------- 一句话入口：写一句话 → 自动选技能、拆步骤 → 改 → 开跑 ---------- */
.plan-entry { padding: 24px; margin: 0 0 20px; }
.plan-entry[hidden] { display: none; }
.plan-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.plan-lead { margin: 6px 0 0; max-width: 40em; }
.plan-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 16px; }
.plan-input-row textarea { width: 100%; min-height: 56px; margin: 0; font-size: 16px; line-height: 1.5; resize: vertical; }
.plan-input-row .btn { min-height: 44px; white-space: nowrap; }
.plan-kbd { margin: 6px 0 0; font-size: 12px; }
.plan-status:empty { display: none; }
.plan-status { margin: 8px 0 0; }

.plan-preview { margin-top: 20px; padding-top: 20px; border-top: 0.5px solid var(--line); outline: none; }
.plan-preview:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); border-radius: var(--r-ctl); }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-head h3, .plan-head h4 { margin: 0; font-size: 17px; font-weight: 600; }
.plan-head h4 { font-size: 15px; }
.plan-head .hint { margin: 0 0 0 auto; font-variant-numeric: tabular-nums; }
.plan-conf.conf-high { background: var(--ok-soft); color: var(--ok); }
.plan-conf.conf-low { background: var(--warn-soft); color: var(--warn); }
.plan-mock-note { margin: 10px 0 0; }
.plan-summary { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink); }
.plan-skills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.plan-skills-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.chip.plan-skill { cursor: default; min-height: 28px; padding: 4px 12px; background: var(--accent-soft); color: var(--accent-ink); }
.plan-why { margin-top: 10px; }
.plan-reasons { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.plan-single-note { margin: 12px 0 0; }

.plan-stages { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.plan-stage { position: relative; padding-left: 18px; }
.plan-stage::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: -14px; width: 1.5px; background: var(--line); }
.plan-stage:last-child::before { bottom: 0; }
.plan-stage::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink-3); }
.plan-stage.is-parallel::after { box-shadow: inset 0 0 0 2px var(--accent); }
.plan-stage-cap { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.plan-stage.is-parallel > .plan-stage-cap { color: var(--accent-ink); }
.plan-stage-steps { display: grid; gap: 10px; }
.plan-stage.is-parallel .plan-stage-steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-step { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); border: 0.5px solid var(--line); min-width: 0; }
.plan-step-top { display: flex; align-items: center; gap: 8px; }
.plan-step-no { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 0.5px solid var(--line-strong); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.plan-step-title { flex: 1; min-width: 0; margin: 0; font-weight: 600; }
.plan-step .plan-del { flex: none; }
.plan-crit-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.plan-step textarea { width: 100%; min-height: 52px; margin: 0; font-size: 14px; }
.plan-step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.plan-step-meta .hint { margin: 0; font-size: 12px; }
.plan-step-meta .check-line { margin: 0; font-size: 13px; }
.plan-add { margin-top: 12px; }
.plan-final { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px dashed var(--line-strong); }
.plan-final .plan-stage-cap { margin-bottom: 4px; }
.plan-final-title { margin: 0; font-weight: 600; }
.plan-criteria { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.plan-actions .btn { min-height: 40px; }
.plan-bad { margin: 8px 0 0; color: var(--warn); }

.plan-progress { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--r-card); background: var(--fill-2); }
.plan-entry .plan-progress { margin-top: 20px; }
.plan-progress progress { width: 100%; margin: 10px 0 0; }
.plan-phase-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.phase-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.phase-chip.tone-run { background: var(--accent-soft); color: var(--accent-ink); }
.phase-chip.tone-needs { background: var(--warn-soft); color: var(--warn); }
.phase-chip.tone-ok { background: var(--ok-soft); color: var(--ok); }
.plan-stages.is-run { margin-top: 14px; }
.plan-run-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface); border: 0.5px solid var(--line); min-width: 0; }
.plan-run-step .now-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.plan-run-step.tone-run .now-dot { background: var(--accent); }
.plan-run-step.tone-needs { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.plan-run-step.tone-needs .now-dot { background: var(--warn); }
.plan-run-step.tone-ok .now-dot { background: var(--ok-fill); }
.plan-run-title { flex: 1; min-width: 8em; font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.plan-run-step .hint { margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-parent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 640px) {
  .plan-entry { padding: 18px 16px; }
  .plan-title { font-size: 21px; }
  .plan-input-row { grid-template-columns: 1fr; }
  .plan-input-row .btn, .plan-actions .btn { width: 100%; }
  .plan-stage.is-parallel .plan-stage-steps { grid-template-columns: 1fr; }
  .plan-step .plan-del, .plan-add, .plan-run-step .btn { min-height: 44px; }
}
@media (forced-colors: active) {
  .plan-step, .plan-run-step, .plan-progress { border: 1px solid CanvasText; }
  .plan-stage::after, .plan-run-step .now-dot { forced-color-adjust: none; background: Highlight; }
}

/* 完成后的验收：质量一行、接受/拒收重做；修改验收时的撤销勾选；部分结果 */
.quality-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.quality-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.review-box { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.review-box h4 { margin: 0 0 4px; }
.review-box .connect-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-form > label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.review-form textarea { width: 100%; min-height: 72px; }
.review-form .btn { margin-top: 10px; }
.review-status:empty { display: none; }
.amend-remove { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.amend-remove legend { padding: 0 4px; font-size: 13px; font-weight: 600; }
.amend-box .amend-remove label.check-row, .check-row { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font-size: 13px; font-weight: 400; line-height: 1.45; cursor: pointer; }
.check-row input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row span { min-width: 0; overflow-wrap: anywhere; }
.customer-result.is-partial { border: 1px dashed var(--line-strong); }
.by-user.redo-note { box-shadow: inset 3px 0 0 var(--warn); }
@media (max-width: 640px) {
  .review-box { padding: 12px; }
  .review-box .btn, .check-row { min-height: 44px; }
  .check-row { align-items: center; }
}
@media (forced-colors: active) {
  .quality-line, .review-box, .amend-remove { border: 1px solid CanvasText; }
}

/* =====================================================================
   P1 重设计 · 场记板（覆盖层）
   原则：发丝线代替阴影；小圆角；琥珀只标“当前切点”；动效 = 单次、无回弹、按状态变化触发。
   ===================================================================== */
body { font-feature-settings: "tnum" 1; }
h1, h2, h3 { letter-spacing: -0.02em; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; font-weight: 600; color: var(--accent-ink); }
.lead { font-size: 16px; line-height: 1.55; }
.card { border: 1px solid var(--line); box-shadow: none; }
.card-title { font-size: 18px; font-weight: 650; }
.btn { border-radius: var(--r-ctl); font-weight: 600; letter-spacing: 0; background: var(--fill); color: var(--ink); transition: background var(--t-state) var(--ease-out), color var(--t-state) var(--ease-out), transform var(--t-press) var(--ease-snap), opacity var(--t-state) var(--ease-out); }
.btn:hover { background: var(--line-strong); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--fill-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-btn); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-btn-hover); }
.btn.danger, .btn.is-danger { color: var(--bad); }
.badge { border-radius: var(--r-sm); font-weight: 600; letter-spacing: 0; background: var(--fill); color: var(--ink-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
input, select, textarea { border-radius: var(--r-ctl); background: var(--surface); border: 1px solid var(--line-strong); }
:root:not([data-theme="dark"]) input, :root:not([data-theme="dark"]) select, :root:not([data-theme="dark"]) textarea { background-color: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.chip { border-radius: var(--r-ctl); background: var(--fill); min-height: 32px; }
.chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--accent); }
progress { height: 4px; border-radius: 2px; }
progress::-webkit-progress-bar { border-radius: 2px; }
progress::-webkit-progress-value { transition: width 480ms var(--ease-out); background: var(--accent); border-radius: 2px; }
.skip { border-radius: var(--r-ctl); }

/* 顶栏与字标 */
.topbar { border-bottom: 1px solid var(--line); }
.brand-name { font-weight: 700; letter-spacing: 0.01em; }
.brand-latin { letter-spacing: 0.18em; }
.theme-switch { border-radius: var(--r-ctl); }
.theme-switch button { border-radius: 6px; min-width: 32px; min-height: 28px; }
/* Keep the full product name, login label and all three theme targets on 320px. */
@media (max-width: 360px) {
  .topbar-inner { padding-inline: 8px; gap: 4px; }
  .brand { gap: 6px; flex-shrink: 0; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-name { font-size: 15px; }
  .topbar-tools { gap: 4px; overflow: visible; flex-shrink: 0; }
  .account-pill { max-width: 64px; }
  .account-pill[data-state="out"] { min-width: 50px; padding-inline: 10px; flex-shrink: 0; }
}
.account-pill, .topbar-tools .status-chip { border-radius: var(--r-ctl); }

/* 侧栏：当前页 = 刀口 + 墨色字，不再整块着色 */
.customer-sidebar { border-right: 1px solid var(--line); }
.customer-nav button { position: relative; border-radius: var(--r-ctl); transition: background var(--t-state) var(--ease-out); }
.customer-nav button > span { color: var(--muted); }
.customer-nav button[aria-current="page"] { background: var(--fill); color: var(--ink); }
.customer-nav button[aria-current="page"] > span { color: var(--accent-ink); }
.customer-nav button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); transform: scaleY(0); transform-origin: center; transition: transform var(--t-press) var(--ease-snap); }
.customer-nav button[aria-current="page"]::before { transform: scaleY(1); }

/* 页首：一句话 + 读数 */
.workspace-hero h1, .workspace-heading h1 { font-size: 34px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; }
.hero-status { border-radius: var(--r-card); box-shadow: none; border: 1px solid var(--line); }
.hero-status dd { font-variant-numeric: tabular-nums; }
.hero-status dt { letter-spacing: 0.04em; }
.workspace-hero { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
label { font-weight: 600; }
.step-number { background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
#capability-scope { background: var(--fill-2); box-shadow: inset 3px 0 0 var(--line-strong); border-radius: var(--r-sm); }

/* 任务列表：刀口标记当前切点 */
.customer-task-list { border-radius: var(--r-card); box-shadow: none; border: 1px solid var(--line); }
.customer-task { position: relative; padding: 14px 20px 14px 22px; transition: background var(--t-state) var(--ease-out); }
.customer-task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transform: scaleY(0); transform-origin: top; transition: transform var(--t-enter) var(--ease-out), background var(--t-state) var(--ease-out); }
.customer-task.group-needs::before, .customer-task.group-running::before { transform: scaleY(1); }
.customer-task.group-needs::before { background: var(--warn); }
.customer-task.group-running::before { background: var(--accent); }
.customer-task.group-needs { box-shadow: none; background: transparent; font-weight: 600; }
.customer-task[aria-pressed="true"] { background: var(--accent-soft); }
.customer-task[aria-pressed="true"]::before { background: var(--accent); transform: scaleY(1); }
.customer-task.group-done, .customer-task.group-ended { color: var(--ink-2); font-weight: 400; }
.customer-task:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.task-group-head { letter-spacing: 0.08em; background: var(--surface-2); }
.task-group-head.group-needs { background: var(--warn-soft); color: var(--warn); }
.task-group-head.group-needs .group-count { background: var(--warn); color: var(--surface); }
.task-group-head .group-count { border-radius: var(--r-sm); }
.task-guide { box-shadow: none; border-radius: var(--r-card); border: 1px solid var(--line); }
.customer-detail { padding: 24px; }
.customer-detail h4 { letter-spacing: 0.06em; }
.by-ai { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.customer-checks li { font-variant-numeric: tabular-nums; }

/* 动效编排：页面级 ≤600ms；列表行 40ms 步进（前 8 行）；详情仅在切换任务时入场一次 */
@keyframes p1-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes p1-row { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes p1-cut { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  .customer-view:not([hidden]) .workspace-hero, .customer-view:not([hidden]) .workspace-heading { animation: p1-rise var(--t-enter) var(--ease-out) both; }
  .customer-view:not([hidden]) .customer-create, .customer-view:not([hidden]) .plan-entry { animation: p1-rise var(--t-enter) var(--ease-out) 60ms both; }
  .customer-view:not([hidden]) .customer-progress { animation: p1-rise var(--t-enter) var(--ease-out) 120ms both; }
  .customer-task, .task-group-head { animation: p1-row var(--t-enter) var(--ease-out) both; }
  .customer-task:nth-child(2) { animation-delay: 40ms; } .customer-task:nth-child(3) { animation-delay: 80ms; } .customer-task:nth-child(4) { animation-delay: 120ms; }
  .customer-task:nth-child(5) { animation-delay: 160ms; } .customer-task:nth-child(6) { animation-delay: 200ms; } .customer-task:nth-child(7) { animation-delay: 240ms; }
  .customer-task:nth-child(n+8) { animation-delay: 280ms; }
  #task-detail.is-enter { animation: p1-cut var(--t-enter) var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .customer-task::before, .customer-nav button::before { background: Highlight; }
}
@media (max-width: 640px) {
  .workspace-hero h1, .workspace-heading h1 { font-size: 28px; }
  .customer-create, .customer-detail { padding: 16px; }
  .customer-nav button, .btn { min-height: 44px; }
}

/* 开关与复选：关闭态必须看得见（非文本对比 ≥3:1），开启态用主色 */
.switch-line input[type="checkbox"], button[role="switch"].toggle, .feature-switch { background: var(--line-strong); box-shadow: inset 0 0 0 1px var(--line-strong); }
.switch-line input[type="checkbox"]::after, button[role="switch"].toggle::after, .feature-switch::after { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.switch-line input[type="checkbox"]:checked, button[role="switch"].toggle[aria-checked="true"], .feature-switch[aria-checked="true"] { background: var(--accent-btn); box-shadow: none; }
.switch-line input[type="checkbox"]:checked::after, button[role="switch"].toggle[aria-checked="true"]::after, .feature-switch[aria-checked="true"]::after { background: var(--on-accent); }
input[type="checkbox"] { border-radius: 5px; border-color: var(--ink-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="checkbox"]:not(.switch-line input):checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.5 12.5 3.8 3.8 7.2-8' fill='none' stroke='%2307101f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] input[type="checkbox"]:not(.switch-line input):checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.5 12.5 3.8 3.8 7.2-8' fill='none' stroke='%2307101f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* Keep the checked fill above generic input theme rules so the SVG tick contrasts. */
input[type="checkbox"]:not(.switch-line input):checked { background-color: var(--accent-btn); }
/* WCAG 2.2 · 2.5.8：行内复选框目标不小于 24px */
.check-row input[type="checkbox"] { width: 24px; height: 24px; margin: 0; }

/* ---- 第 2 轮：任务行阶段轨（排队 → 执行 → 完成）。颜色用已注册的自定义属性，状态变化时平滑过渡 ---- */
@property --c1 { syntax: "<color>"; inherits: false; initial-value: transparent; }
@property --c2 { syntax: "<color>"; inherits: false; initial-value: transparent; }
@property --c3 { syntax: "<color>"; inherits: false; initial-value: transparent; }
.customer-task { --c1: var(--line-strong); --c2: var(--line-strong); --c3: var(--line-strong); padding-bottom: 24px; transition: background var(--t-state) var(--ease-out), --c1 var(--dur-base) var(--ease-out), --c2 var(--dur-base) var(--ease-out), --c3 var(--dur-base) var(--ease-out); }
.customer-task::after { content: ""; position: absolute; left: 22px; bottom: 9px; width: 54px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--c1) 0 16px, transparent 16px 19px, var(--c2) 19px 35px, transparent 35px 38px, var(--c3) 38px 54px); pointer-events: none; }
.customer-task.group-queued { --c1: var(--ink-3); }
.customer-task.group-running, .customer-task.group-recovering { --c1: var(--accent); --c2: var(--accent); }
.customer-task.group-needs { --c1: var(--warn); --c2: var(--warn); }
.customer-task.group-done { --c1: var(--ok-fill); --c2: var(--ok-fill); --c3: var(--ok-fill); }
.customer-task.group-ended { --c1: var(--ink-3); --c2: var(--bad); }
.customer-task .task-meta { margin-top: 2px; }
.btn:active { transform: scale(0.97); }
@media (forced-colors: active) { .customer-task::after { background: linear-gradient(90deg, CanvasText 0 16px, transparent 16px 19px, CanvasText 19px 35px, transparent 35px 38px, CanvasText 38px 54px); } }
@media (prefers-reduced-motion: reduce) { .customer-task { transition: none; } }

/* 页首读数：窄栏标签 + 等宽数字，状态点用形状而不只是颜色 */
.hero-status > div { padding: 10px 0; }
#worker-state::before { border-radius: 2px; transform: rotate(45deg) scale(0.85); }
.workspace-hero { align-items: end; }

/* =====================================================================
   P1b · 建立镜头 → 特写
   首屏先建立：标题行 + 状态条 + 一句话入口；再特写：选中任务详情。
   手动填写默认收起；任务区左列表右详情；数字变化滚动一次。
   ===================================================================== */
.workspace-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 0 0 14px; margin-bottom: 16px; }
.workspace-hero h1 { font-size: 24px; line-height: 1.2; font-weight: 650; }
.workspace-hero .lead { font-size: 14px; margin: 2px 0 0; max-width: none; color: var(--muted); }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.status-strip { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.strip-item { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 6px 14px; margin: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: default; }
.strip-item:first-child { border-left: 0; }
button.strip-item { cursor: pointer; transition: background var(--dur-quick) var(--ease-out); }
button.strip-item:hover { background: var(--fill); }
button.strip-item[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
button.strip-item:focus-visible { outline-offset: -3px; }
.strip-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.strip-item b { font-size: 20px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 1ch; display: inline-block; }
.strip-exec b { font-size: 14px; font-weight: 600; }
button.strip-item[data-zero="true"] b { color: var(--ink-3); font-weight: 500; }
button.strip-item[data-filter="needs"][data-zero="false"] b { color: var(--warn); }
.strip-dot { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg) scale(.9); align-self: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); transition: background var(--dur-base) var(--ease-out); }
.strip-exec[data-state="ok"] .strip-dot { background: var(--ok-fill); box-shadow: none; }
.status-more { font-size: 12px; color: var(--muted); }
.status-more summary { cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
.status-more[open] { grid-column: 1 / -1; }
.status-more .hero-status { margin-top: 6px; min-width: 300px; }
@keyframes p1-roll { from { opacity: 0; transform: translateY(70%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .strip-item b.is-roll { animation: p1-roll var(--dur-quick) var(--ease-out) both; } }

/* 一句话入口为主路径 */
.plan-entry { margin-bottom: 12px; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.plan-title { font-size: 20px; }

/* 手动填写：整行一条，展开时平滑出现 */
.customer-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.customer-create { padding: 0; }
.create-head { margin: 0; font-size: inherit; }
.create-toggle { display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: 48px; padding: 10px 20px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-card); }
.create-toggle:hover { background: var(--fill-2); }
.create-toggle:focus-visible { outline-offset: -3px; }
.create-name { font-size: 15px; font-weight: 650; }
.create-toggle small { color: var(--muted); font-size: 13px; flex: 1; min-width: 0; }
.chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-base) var(--ease-out); align-self: center; }
.create-toggle[aria-expanded="true"] .chev { transform: translateY(1px) rotate(225deg); }
.create-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--dur-calm) var(--ease-out), visibility 0s linear var(--dur-calm); }
.create-body[data-open="true"] { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--dur-calm) var(--ease-out), visibility 0s; }
.create-inner { overflow: hidden; min-height: 0; padding: 0 20px; }
.create-body[data-open="true"] .create-inner { padding-bottom: 20px; }
@media (prefers-reduced-motion: reduce) { .create-body, .chev { transition: none; } }

/* 任务区：左列表（建立）右详情（特写） */
.customer-progress { display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); gap: 12px 24px; align-items: start; }
.customer-progress > * { grid-column: 1; min-width: 0; }
.customer-progress > #empty { grid-column: 1 / -1; }
.customer-progress > #task-detail { grid-column: 2; grid-row: 1 / span 6; align-self: start; }
@media (min-width: 1280px) { .customer-progress > #task-detail { position: sticky; top: calc(var(--bar-h, 56px) + 12px); } }
.customer-progress > #task-detail[hidden] { display: none; }
.customer-task-list { max-height: none; margin-bottom: 0; }
.customer-detail { padding: 20px 24px; }
#task-list[data-filter="queued"] > :not(.group-queued), #task-list[data-filter="needs"] > :not(.group-needs), #task-list[data-filter="done"] > :not(.group-done) { display: none; }

/* 任务行：阶段轨（排队 → 执行 → 完成），当前段刀口 */
.customer-task::after { content: none; }
.stage-rail { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; }
.stage-rail i { position: relative; display: block; height: 2px; background: var(--line-strong); border-radius: 1px; font-style: normal; transition: background var(--dur-base) var(--ease-out), height var(--dur-quick) var(--ease-out); }
.stage-rail i::after { content: attr(data-l); position: absolute; top: 6px; left: 0; font-size: 11px; line-height: 1; color: var(--ink-3); white-space: nowrap; }
.group-queued .stage-rail i:nth-child(1), .group-recovering .stage-rail i:nth-child(1) { background: var(--ink-3); height: 4px; }
.group-running .stage-rail i:nth-child(1) { background: var(--accent); }
.group-running .stage-rail i:nth-child(2) { background: var(--accent); height: 4px; }
.group-needs .stage-rail i:nth-child(1) { background: var(--warn); }
.group-needs .stage-rail i:nth-child(2) { background: var(--warn); height: 4px; }
.group-done .stage-rail i { background: var(--ok-fill); }
.group-done .stage-rail i:nth-child(3) { height: 4px; }
.group-ended .stage-rail i:nth-child(1) { background: var(--ink-3); }
.group-ended .stage-rail i:nth-child(2) { background: var(--bad); height: 4px; }
.group-queued .stage-rail i:nth-child(1)::after, .group-recovering .stage-rail i:nth-child(1)::after, .group-running .stage-rail i:nth-child(2)::after, .group-needs .stage-rail i:nth-child(2)::after, .group-done .stage-rail i:nth-child(3)::after, .group-ended .stage-rail i:nth-child(2)::after { color: var(--ink); font-weight: 600; }
.customer-task { padding-bottom: 28px; }

/* 详情：需要你只出现一处；指标并成一行度量条 */
.customer-detail:has(.needs-zone) .task-now.tone-needs { display: none; }
.task-meters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.task-meters .meter-item { padding: 8px 12px; border-left: 1px solid var(--line); background: transparent; border-radius: 0; box-shadow: none; }
.task-meters .meter-item:first-child { border-left: 0; }
.task-meters .meter-top { display: grid; gap: 2px; }
.task-meters .meter-label { font-size: 11px; color: var(--muted); }
.task-meters .meter-value { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.task-meters .meter-note { display: none; }
.task-meters progress { margin: 6px 0 0; height: 3px; }
.task-meters .meter-bar { margin-top: 6px; }

@media (max-width: 1000px) {
  .customer-progress { grid-template-columns: minmax(0, 1fr); }
  .customer-progress > #task-detail { grid-column: 1; grid-row: auto; position: static; max-height: none; overflow: visible; }
}
@media (max-width: 700px) {
  .workspace-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { align-items: stretch; }
  .status-strip { width: 100%; }
  .strip-item { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px; }
  .strip-exec { flex: 1.1 1 0; }
  .task-meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-meters .meter-item:nth-child(3) { border-left: 0; }
  .task-meters .meter-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .create-toggle small { display: none; }
}
@media (forced-colors: active) { .stage-rail i { background: CanvasText; } .strip-dot { box-shadow: inset 0 0 0 2px CanvasText; } }

/* P1b 第 1 轮修订：列表先于引导卡；筛选栏压成两行 */
.customer-progress > .customer-progress-head { order: 0; }
.customer-progress > #history-tools { order: 1; }
.customer-progress > #task-list { order: 2; }
.customer-progress > #more-tasks { order: 3; }
.customer-progress > #task-guide, .customer-progress > #task-miss { order: 4; }
.history-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.history-toolbar #task-search { flex: 1 1 160px; min-width: 0; min-height: 40px; }
.history-toolbar #capacity-status { flex: 1 1 100%; margin: 0; }
.history-toolbar #bulk-archive { flex: 1 1 100%; }
.plan-entry { padding: 16px 20px 12px; }
.plan-entry .plan-lead { margin: 2px 0 10px; }
#plan-need { min-height: 56px; height: 56px; }
.plan-kbd { margin: 6px 0 0; }
.plan-status:empty { display: none; }
.history-toolbar #capacity-status { flex: 1 1 0; }
.history-toolbar #bulk-archive { flex: 0 0 auto; }

/* P1b 镜头语言：切换任务 = 硬切 + 短位移（无淡入淡出）；首次进入页面时先建立（状态条、列表），再特写（详情延后 120ms） */
@keyframes p1-hardcut { from { transform: translateX(14px); clip-path: inset(0 0 0 14px); } to { transform: none; clip-path: inset(0); } }
@media (prefers-reduced-motion: no-preference) {
  #task-detail.is-enter { animation: p1-hardcut var(--dur-quick) var(--ease-snappy, cubic-bezier(.16,1,.3,1)) both; }
  #task-detail.is-enter.is-first { animation-delay: 120ms; }
}

/* =====================================================================
   P1b 第 2 轮：协同 / 能力库 / 功能管理 / 账号 / 连接 / 指南 按同一体系重画
   统一页首（小眉题 + 24px 标题 + 一行说明 + 发丝线），列表用发丝线与刀口，详情区先建立后特写。
   ===================================================================== */
.workspace-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 16px; margin: 0 0 20px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.workspace-heading .eyebrow { grid-column: 1; }
.workspace-heading h1 { font-size: 24px; line-height: 1.2; margin: 2px 0 0; grid-column: 1; }
.workspace-heading .lead { font-size: 14px; margin: 2px 0 0; color: var(--muted); grid-column: 1; max-width: none; }
.workspace-heading > .badge { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.workspace-heading > div:first-child { grid-column: 1; }

/* 能力库：分类标签 = 刀口下划线；列表行发丝线，当前项左侧刀口；右侧详情空态给出方向 */
.lt-tabs { gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.lt-tabs .chip { border-radius: 0; background: transparent; min-height: 40px; padding: 0 14px; box-shadow: none; position: relative; color: var(--muted); }
.lt-tabs .chip[aria-pressed="true"], .lt-tabs .chip[aria-selected="true"] { color: var(--ink); box-shadow: none; font-weight: 600; }
.lt-tabs .chip[aria-pressed="true"]::after, .lt-tabs .chip[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; animation: p1-underline var(--dur-quick) var(--ease-snappy) both; }
@keyframes p1-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lt-search { padding: 4px 6px 4px 16px; border-radius: var(--r-ctl); box-shadow: none; border: 1px solid var(--line-strong); }
.lt-split { gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: none; overflow: hidden; align-items: stretch; }
.lt-split > .card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lt-list { padding: 0; border-right: 1px solid var(--line) !important; }
.lt-group { margin: 0; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); letter-spacing: 0.06em; }
.lt-item { position: relative; border-radius: 0; padding: 12px 16px 12px 18px; border-bottom: 1px solid var(--line); }
.lt-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: scaleY(0); transition: transform var(--dur-instant) var(--ease-snap); }
.lt-item.is-active { background: var(--accent-soft); }
.lt-item.is-active::before { transform: scaleY(1); }
.lt-detail > .hint:only-child { display: grid; place-items: center; min-height: 160px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); }
.lt-detail { padding: 20px 24px; }
.lt-block-head strong { font-size: 22px; }

/* 协同：需要你的横幅 = 刀口 + 发丝线；成员卡与任务卡同一套 */
.team-status.warn { box-shadow: inset 3px 0 0 var(--warn); border-radius: var(--r-card); }
#team-root .card, #view-team .card { box-shadow: none; border: 1px solid var(--line); }
#view-team h2 { font-size: 16px; letter-spacing: 0; margin: 24px 0 8px; }

/* 账号、连接、指南：卡片统一发丝线，图标块去圆形底 */
#view-account .card, #view-mcp .card, #view-guide .card, #view-features .card { box-shadow: none; border: 1px solid var(--line); }
#view-account .card-title, #view-mcp .card-title { font-size: 17px; }

@media (max-width: 700px) {
  .workspace-heading { grid-template-columns: minmax(0, 1fr); }
  .workspace-heading > .badge { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
  .lt-split { grid-template-columns: minmax(0, 1fr); }
  .lt-list { border-right: 0 !important; border-bottom: 1px solid var(--line); max-height: 320px; }
  .lt-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .lt-tabs .chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .lt-tabs .chip::after, .lt-item::before { animation: none !important; transition: none !important; } }
@media (max-width: 1000px) { .customer-progress > #task-detail { order: 5; } }
@media (max-width: 700px) { #plan-need { min-height: 84px; height: 84px; } }
/* 批量归档区放不下时折行，不得伸进右侧详情列 */
.history-toolbar #bulk-archive { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.history-toolbar #bulk-archive select { max-width: 100%; min-width: 0; }
.history-toolbar #bulk-archive .hint { flex: 1 1 100%; margin: 0; }
#main:focus, #main:focus-visible { outline: none; }

/* ---------- P1c：窄屏单行导航 + 抽屉 ---------- */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .customer-sidebar { position: relative; top: auto; z-index: 30; padding: 8px 16px 0; }
  .nav-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 14px; border: 1px solid var(--line, var(--fill)); border-radius: var(--r-ctl, 8px); background: var(--fill); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
  .nav-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
  .nav-toggle-ico { display: grid; place-items: center; width: 22px; height: 22px; color: var(--accent-ink); }
  .nav-toggle-ico .ico { width: 20px; height: 20px; }
  .nav-toggle-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-toggle-label { font-size: 13px; font-weight: 500; color: var(--muted); }
  .nav-toggle-chev { width: 18px; height: 18px; color: var(--muted); transition: transform var(--dur-quick, 160ms) var(--ease-out, ease-out); }
  .is-nav-open .nav-toggle-chev { transform: rotate(180deg); }
  .customer-nav { position: absolute; left: 16px; right: 16px; top: calc(100% + 4px); display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line, var(--fill)); border-radius: var(--r-card, 12px); background: var(--surface, var(--bg, Canvas)); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); overflow: hidden; max-height: 0; padding-block: 0; border-width: 0; visibility: hidden; opacity: 0; -webkit-mask-image: none !important; mask-image: none !important; transition: max-height var(--dur-base, 240ms) var(--ease-out, ease-out), opacity var(--dur-quick, 160ms) linear, visibility 0s linear var(--dur-base, 240ms); }
  .is-nav-open .customer-nav { max-height: 360px; padding: 6px; border-width: 1px; visibility: visible; opacity: 1; transition-delay: 0s; }
  .customer-nav button { flex: none; justify-content: flex-start; min-height: 48px; padding: 8px 12px; font-size: 15px; }
  .customer-nav button small { display: block; }
}
@media (max-width: 600px) {
  .customer-nav button { flex: none; padding: 8px 12px; font-size: 15px; }
  .customer-nav button > span { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .customer-nav, .nav-toggle-chev { transition: none; }
}

/* ---------- P1c：能力库选中项详情重排（仅 .lt-detail）---------- */
.lt-detail { padding: 0; overflow: hidden; }
.lt-detail > .lt-block { margin: 0; }
.lt-detail .lt-block-head { flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; padding: 16px 24px; border-bottom: 0.5px solid var(--line); background: var(--fill-2); }
.lt-detail .lt-block-head strong { flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 1.3; }
.lt-detail .lt-block-head .seg-control, .lt-detail .lt-block-head .btn { flex: none; }
.lt-detail .lt-block-head .hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lt-detail .lt-block-head .hint:not(:empty) { position: static; width: auto; height: auto; clip: auto; flex: none; font-size: 12px; color: var(--ok, var(--accent-ink)); }
.lt-detail .lt-block > .md, .lt-detail .lt-block > .lt-pre { margin: 0; padding: 20px 24px 24px; }
.lt-detail .lt-block > .lt-pre { margin: 20px 24px 24px; padding: 14px; }
.lt-detail .md > p:first-child { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.lt-detail .md > p:nth-child(2) { margin: 0 0 20px; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent); font-size: 15px; line-height: 1.7; color: var(--ink); }
.lt-detail .md .md-h2 { margin: 22px 0 10px; padding: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); border-bottom: 0.5px solid var(--line); }
.lt-detail .md .md-h2:first-of-type { margin-top: 4px; }
.lt-detail .md ul { margin: 0 0 8px; }
.lt-detail .md li { line-height: 1.65; }
@media (max-width: 640px) {
  .lt-detail .lt-block-head { flex-wrap: wrap; padding: 12px 16px; }
  .lt-detail .lt-block-head strong { flex: 1 1 100%; font-size: 18px; }
  .lt-detail .lt-block > .md { padding: 16px; }
  .lt-detail .lt-block > .lt-pre { margin: 16px; }
}

/* ---------- P1c：协同成员卡缩小、信息密度提高 ---------- */
.team-roster { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.team-agent { padding: 10px 12px; gap: 2px 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.team-agent > * { grid-column: 1 / -1; min-width: 0; }
.team-agent > .team-agent-head { grid-column: 1; grid-row: 1; justify-content: flex-start; }
.team-agent > .team-state { grid-column: 1; grid-row: 2; font-size: 13px; color: var(--ink-2); }
.team-agent > .switch-line { grid-column: 1 / -1; grid-row: 1 / span 2; width: auto; min-height: 44px; margin: 0; justify-content: flex-end; gap: 8px; font-size: 13px; }
.team-agent > .team-cur, .team-agent > .team-state-note { font-size: 12px; line-height: 1.45; padding-top: 4px; border-top: 0.5px solid var(--line); margin-top: 2px; }
.team-agent > .team-state-note + .team-cur { border-top: 0; padding-top: 0; margin-top: 0; }
.team-agent-head strong { font-size: 14px; }

/* P1c：任务记录容量提示独占一行，不再被挤成窄列 */
.history-toolbar #capacity-status { flex: 1 1 100%; margin: 0; }

/* ---------- P2：识别结果行（新建页）与「能力验收项」区块（任务详情） ---------- */
.route-result { display: grid; gap: 10px; min-width: 0; padding: 14px 16px; border-radius: var(--r-card); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); }
.route-result[hidden] { display: none; }
.rr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rr-head .skill-title { margin-right: 2px; }
.rr-head .btn { margin-left: auto; }
.src-plat { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rr-row { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; padding: 0; list-style: none; min-width: 0; }
.rr-li { display: flex; min-width: 0; }
.rr-li + .rr-li::before { content: "·"; align-self: center; padding: 0 6px; color: var(--ink-3); }
.rr-item { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; max-width: 100%; padding: 6px 10px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background var(--t-state) var(--ease-out); }
.rr-item:hover { background: var(--fill); }
.rr-item[aria-expanded="true"] { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.rr-item:focus-visible, .rr-cand:focus-visible, .cap-switch summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rr-k { font-size: 12px; color: var(--muted); line-height: 1.3; }
.rr-v { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.rr-item.conf-low .rr-v { color: var(--warn); }
.rr-item.conf-low .rr-v::before { content: "▲ "; font-size: 11px; }
.rr-item.conf-high .rr-v::before, .rr-item.conf-picked .rr-v::before { content: "● "; font-size: 10px; color: var(--ok); }
.rr-why { margin: 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.rr-why[hidden] { display: none; }
.rr-state { margin: 0; }
.rr-status { margin: 0; min-height: 0; }
.rr-status:empty { display: none; }
.rr-cands { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; min-width: 0; }
.rr-cand-title { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; color: var(--warn); line-height: 1.5; }
.rr-cand { display: grid; gap: 3px; align-content: start; min-height: 44px; padding: 10px 12px; border: 0; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: box-shadow var(--t-state) var(--ease-out), background var(--t-state) var(--ease-out); }
.rr-cand:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.rr-cand[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.rr-cand-name { font-size: 14px; font-weight: 600; }
.rr-cand-meta { font-size: 12px; color: var(--muted); }
.rr-cand-accept { font-size: 12px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rr-more > summary { cursor: pointer; font-size: 13px; color: var(--accent-ink); min-height: 32px; display: flex; align-items: center; }
.rr-more .rr-cands { margin-top: 6px; }

.accept-pair { display: block; }
.accept-pair.has-cap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 20px; align-items: start; }
.cap-block { margin-top: 24px; padding: 14px 16px 16px; border-radius: var(--r-card); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.customer-detail .cap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.customer-detail .cap-head h4 { margin: 0 4px 0 0; }
.cap-sub { margin: 6px 0 0; font-size: 13px; }
.customer-detail .cap-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 14px; }
.customer-detail .cap-meta dt { color: var(--muted); }
.customer-detail .cap-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cap-block .note { margin: 12px 0 0; }
.cap-count { margin: 12px 0 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cap-group { margin-top: 12px; }
.cap-group > h5, .cap-group > summary { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cap-group > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.cap-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cap-item { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cap-item.is-fail { box-shadow: inset 3px 0 0 var(--bad), inset 0 0 0 1px var(--line); }
.cap-item-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; }
.cap-mark { flex: none; width: 18px; font-weight: 700; color: var(--ink-3); }
.cap-item.is-pass .cap-mark { color: var(--ok); }
.cap-item.is-fail .cap-mark { color: var(--bad); }
.cap-text { flex: 1 1 200px; min-width: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.cap-badge, .cap-state { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-sm); line-height: 1.5; }
.cap-badge.is-required { background: var(--accent-soft); color: var(--accent-ink); }
.cap-badge.is-optional { background: var(--fill); color: var(--ink-2); }
.cap-state { background: var(--fill); color: var(--ink-2); }
.cap-state.is-pass { background: var(--ok-soft); color: var(--ok); }
.cap-state.is-fail { background: var(--bad-soft); color: var(--bad); }
.cap-state.is-na { box-shadow: inset 0 0 0 1px var(--line-strong); background: transparent; }
.cap-item .by-ai { margin: 0 0 0 26px; font-size: 13px; }
.cap-na, .cap-shape, .cap-fail, .cap-nawhen { margin: 0 0 0 26px; font-size: 13px; line-height: 1.5; }
.cap-na { color: var(--ink-2); }
.cap-shape.is-hit { color: var(--ok); }
.cap-shape.is-miss { color: var(--warn); }
.cap-fail { color: var(--bad); }
.cap-switch { margin-top: 14px; border-top: 0.5px solid var(--line); padding-top: 8px; }
.cap-switch > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.cap-switch-body { display: grid; gap: 8px; padding-top: 6px; }
.cap-switch-body > * { margin: 0; }
.cap-switch-body label { font-size: 13px; color: var(--muted); }
.cap-select { width: 100%; min-height: 40px; }
.cap-switch-body .btn { justify-self: start; }
.cap-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cap-confirm p { flex: 1 1 100%; margin: 0; }
.cap-switch-msg.is-ok { color: var(--ok); }
.cap-switch-msg.is-bad { color: var(--bad); }
.cap-switch-msg:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .rr-why:not([hidden]) { animation: rr-in var(--dur-quick) var(--ease-out) both; }
  @keyframes rr-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  .route-result { padding: 12px; }
  .rr-row { flex-direction: column; gap: 0; }
  .rr-li + .rr-li::before { content: none; }
  .rr-li { border-top: 0.5px solid var(--line); }
  .rr-li:first-child { border-top: 0; }
  .rr-item { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
  .rr-v { text-align: right; }
  .rr-cands { grid-template-columns: 1fr; }
  .rr-cand { min-height: 48px; }
  .rr-head .btn, .cap-switch-body .btn, .cap-confirm .btn { min-height: 44px; }
  .cap-block { padding: 12px; }
  .cap-item .by-ai, .cap-na, .cap-shape, .cap-fail, .cap-nawhen { margin-left: 0; }
  .cap-select { min-height: 44px; }
}
@media (forced-colors: active) {
  .route-result, .cap-block, .cap-item, .rr-cand, .rr-why { border: 1px solid CanvasText; }
  .rr-item[aria-expanded="true"], .rr-cand[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* P2：资产库详情的能力编号与开源来源 */
.cap-meta-lib { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; align-items: center; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.cap-meta-lib dt { color: var(--muted); }
.cap-meta-lib dd { margin: 0; overflow-wrap: anywhere; }
.cap-id-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cap-id { padding: 2px 6px; border-radius: var(--r-sm); background: var(--surface); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.cap-none { color: var(--muted); }
.cap-copied:empty { display: none; }
@media (max-width: 640px) {
  .cap-meta-lib { grid-template-columns: 1fr; gap: 2px; }
  .cap-meta-lib dd { margin-bottom: 8px; }
  .cap-id-row .btn { min-height: 44px; }
}

/* P2 第二段：能力归因（复盘页）与资产库使用统计 */
.lt-capusage { margin-top: 28px; display: grid; gap: 12px; min-width: 0; }
.lt-capusage .lt-h { margin: 0; }
.lt-cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.lt-capcard { min-width: 0; }
.lt-capstats { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 10px 0 0; font-size: 13px; }
.lt-capstats dt { color: var(--muted); }
.lt-capstats dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lt-h2 { margin: 8px 0 0; font-size: 16px; }
.lt-advice { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lt-advice-item { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--fill-2); box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px var(--line); min-width: 0; }
.lt-advice-item p { margin: 0; overflow-wrap: anywhere; }
.lt-advice-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lt-advice-name { font-size: 14px; overflow-wrap: anywhere; }
.lt-advice-id { font-size: 11px; color: var(--muted); }
.lt-capfew { margin: 12px 0 20px; }
.lt-capfew > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--accent-ink); overflow-wrap: anywhere; }
.lt-capfew .lt-cap-grid { margin-top: 8px; }
.rr-bc { margin: 0; }
.cap-common { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) {
  .lt-capstats { grid-template-columns: 1fr 1fr; }
  .lt-advice-item .btn, .cap-common .chip { min-height: 44px; }
}

/* 本机入口：主线只保留需求、进度和结果，设置及检查记录仍可展开。 */
body[data-entry-mode="local-supervised"] .simple-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
body[data-entry-mode="local-supervised"] .simple-workflow li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
body[data-entry-mode="local-supervised"] .simple-workflow b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) {
  min-width: 0;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) > summary {
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink-2);
  font: 600 14px/1.6 var(--font);
  cursor: pointer;
  overflow-wrap: anywhere;
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) > summary::marker {
  color: var(--muted);
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details)[open] > summary {
  border-bottom: 1px solid var(--line);
}
body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) > :not(summary) {
  min-width: 0;
  max-width: 100%;
  margin: 14px;
}
body[data-entry-mode="local-supervised"] #execution-setup #executor-card {
  padding: 0;
  border: 0;
  box-shadow: none;
}
body[data-entry-mode="local-supervised"] #task-options :is(input, textarea, select),
body[data-entry-mode="local-supervised"] #review-details :is(pre, code, dd) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-entry-mode="local-supervised"] #task-options .budget-main {
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-entry-mode="local-supervised"] #review-details .accept-pair {
  display: block;
}
body[data-entry-mode="local-supervised"] #review-details .cap-block {
  margin-top: 14px;
}
@media (max-width: 640px) {
  body[data-entry-mode="local-supervised"] .simple-workflow {
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
  }
  body[data-entry-mode="local-supervised"] .simple-workflow li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) > :not(summary) {
    margin: 12px;
  }
  body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details) :is(.btn, button, input:not([type="checkbox"]):not([type="radio"]), select) {
    min-height: 44px;
  }
  body[data-entry-mode="local-supervised"] #task-options :is(input, textarea, select) {
    font-size: 16px;
  }
  body[data-entry-mode="local-supervised"] #task-options :is(.grid2, .customer-settings) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (forced-colors: active) {
  body[data-entry-mode="local-supervised"] :is(#execution-setup, #task-options, #review-details),
  body[data-entry-mode="local-supervised"] .simple-workflow b {
    border-color: CanvasText;
  }
}
@media (max-width: 640px) {
  body[data-entry-mode="local-supervised"] .history-log > summary {
    display: block;
    min-height: 44px;
    padding: 10px 0;
  }
  body[data-entry-mode="local-supervised"] .history-log > summary::before {
    display: inline-block;
    margin-right: 12px;
    vertical-align: middle;
  }
  body[data-entry-mode="local-supervised"] .history-resume {
    display: block;
    margin: 6px 0 0 24px;
    font-weight: 400;
    overflow-wrap: anywhere;
  }
}

.account-page #account-pill { display: none; }

/* A short, optional demonstration; never masquerades as live task progress. */
.harness-guide{border:1px solid var(--line,#ddd);border-radius:16px;background:var(--surface,#fff);padding:16px 18px;margin:0 0 20px;min-width:0}.harness-guide-heading{display:flex;gap:12px;justify-content:space-between;align-items:center}.harness-guide-heading strong{font-size:15px}.harness-guide-heading button{flex:none;font-size:12px;padding:7px 10px}.harness-demo{display:flex;gap:12px;align-items:center;margin:18px 0 8px}.harness-demo span{flex:1;min-width:0;padding:12px 8px;border-radius:10px;background:color-mix(in srgb,var(--primary,var(--green,#4a3fd1)) 8%,transparent);text-align:center;font-size:13px}.harness-demo i{font-style:normal;opacity:.4}.harness-guide[data-motion=playing] .harness-demo span{animation:harness-pulse 6s ease-in-out infinite}.harness-demo span:nth-of-type(2){animation-delay:2s!important}.harness-demo span:nth-of-type(3){animation-delay:4s!important}@keyframes harness-pulse{0%,34%,100%{opacity:.65;transform:translateY(0)}12%,24%{opacity:1;transform:translateY(-3px)}}.harness-advanced{margin:18px 0;border-top:1px solid var(--line);padding-top:12px}.harness-advanced summary{cursor:pointer;color:var(--muted);font-size:13px}.harness-window-option{font-size:12px;color:var(--muted)}
@media(max-width:550px){.harness-guide{padding:14px}.harness-guide-heading strong{font-size:13px}.harness-demo{gap:5px}.harness-demo span{padding:10px 5px;font-size:11px}.harness-demo i{font-size:11px}.harness-guide-heading button{font-size:11px;padding:6px 8px}}
@media(prefers-reduced-motion:reduce){.harness-guide .harness-demo span{animation:none!important;transform:none!important;opacity:1}}

body[data-mode="local-supervised"] #mcp-manual-config{display:none}

.harness-hub{margin:0 0 20px}.harness-hub-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.harness-tool-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.harness-tool-row{display:flex;flex-direction:column;gap:5px;border:1px solid var(--line,#ddd);border-radius:9px;padding:10px;min-width:0;font-size:13px}.harness-tool-row code{font-size:11px;overflow-wrap:anywhere;opacity:.65}@media(max-width:550px){.harness-tool-list{grid-template-columns:1fr}}

.harness-guide:not([data-expanded="true"]){padding:10px 14px;margin-bottom:14px}.harness-guide-heading strong{min-width:0}#mcp-desktop-download{margin:8px 0}
body[data-entry-mode="local-supervised"] .workspace-hero{margin-bottom:16px}@media(max-width:550px){body[data-entry-mode="local-supervised"] .workspace-hero .lead{margin-bottom:0}body[data-entry-mode="local-supervised"] .status-strip{font-size:11px}}
