/* ==========================================================================
   Synapse5 Console · components.css
   组件层：按钮 / 徽标 / 卡片 / 表格 / 时间线 / 进度 / 甘特 / 提示 / 表单 /
           业务卡片（阶段·成员·周·Gate·交付·链接·文件）/ 指南 / 认领 / 公开页
   --------------------------------------------------------------------------
   依赖：base.css（令牌、reset、外壳）；不定义 :root 令牌，只定义少量 --c- 前缀组件局部变量；颜色一律取 base.css 变量。
   命名：新企业级 BEM（.card__head / .btn--ghost / .progress__bar / .kpi__value）
         + 旧类名兼容层（.stat-card / .milestone / .bar / .pill--done …），
         两套选择器尽量合并到同一组声明，保证 8 页旧 DOM 与 JS 动态生成的 DOM 都生效。
   约束：无 @import、无外链资源、不使用 color-mix()/backdrop-filter；
         深色模式跟随 base.css 的 [data-theme="dark"] 变量自动换色。
   ========================================================================== */

/* ==== 1) 通用文本小件（页面内大量复用） ==== */
.note { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.6; }
.note--stale { color: var(--warning); }
.eyebrow { display: block; margin: 0 0 var(--sp-1); color: var(--brand); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lede { max-width: 60ch; margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.7; }
.lede strong, .lede b { color: var(--text); }
h3.sub-title, .sub-title { margin: var(--sp-5) 0 var(--sp-2); color: var(--ink); font-size: var(--fs-16); font-weight: 600; }
/* 编号 / 负责人 / 任务 id 等 mono 小字 */
.owner { font-family: var(--mono); font-size: var(--fs-13); font-weight: 600; white-space: nowrap; }
.task-id { color: var(--brand); font-family: var(--mono); font-size: var(--fs-12); font-weight: 600; white-space: nowrap; }
.task-meta { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: var(--fs-12); white-space: nowrap; }
/* D1–D12 编号徽标 */
.d-id { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-full); background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: var(--fs-12); font-weight: 700; white-space: nowrap; }
/* 相对截止文案 */
.due-relative { color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; white-space: nowrap; }
.due-relative.is-urgent { color: var(--coral); font-weight: 600; }
.due-relative.is-overdue { color: var(--danger); font-weight: 600; }
/* 兼容 start.html 自检清单的通过/失败标记 */
.ok { color: var(--success); }
.bad { color: var(--danger); }
/* 分段控件里的数量小徽标 */
.count { min-width: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--surface-3); color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 16px; text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px !important;
  height: 1px !important; margin: -1px !important;
  padding: 0 !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important;
  border: 0 !important;
}
/* 状态点 / 在线点 */
.dot, .dot-live { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); }
.dot-live { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
/* 图例 / 色块 */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-12); }
.legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.legend .swatch, .swatch { width: 16px; height: 6px; border-radius: 2px; background: var(--brand); }
.legend .swatch--coral, .swatch--coral { background: var(--coral); }
.legend .swatch--line, .swatch--line { width: 2px; height: 14px; border-radius: 2px; background: var(--coral); }

/* ==== 2) 按钮 ==== */
/* 默认 = primary 实心 brand；旧 .btn--solid 与新 .btn--ghost/.btn--soft/.btn--danger 共用 */

.btn {
  --c-btn-h: 38px; --c-spin-ink: var(--brand-fg);
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  height: var(--c-btn-h); padding: 0 var(--sp-4);
  border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--brand); color: var(--brand-fg);
  font-family: inherit; font-size: var(--fs-14);
  font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none;
  cursor: pointer; box-shadow: var(--sh-1);
  transition: background-color var(--dur-1) var(--ease-1), border-color var(--dur-1) var(--ease-1), color var(--dur-1) var(--ease-1), box-shadow var(--dur-1) var(--ease-1), transform var(--dur-1) var(--ease-1);
}
.btn:hover { background: var(--brand-hover); color: var(--brand-fg); text-decoration: none; }
.btn:active { background: var(--brand-active); transform: translateY(1px); }
.btn__icon, .btn > svg { width: 16px; height: 16px; flex: 0 0 auto; }
/* 次要：描边 */
.btn--ghost { --c-spin-ink: var(--text); border-color: var(--line-strong); background: transparent; color: var(--text); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:active { background: var(--surface-3); color: var(--ink); }
/* 三级：浅底 */
.btn--soft { --c-spin-ink: var(--brand); border-color: transparent; background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn--soft:hover { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.btn--soft:active { background: var(--surface-3); }
/* 危险操作 */
.btn--danger { --c-spin-ink: var(--surface); border-color: transparent; background: var(--danger); color: var(--surface); }
.btn--danger:hover { background: var(--danger); color: var(--surface); filter: brightness(0.94); }
/* 旧 start.html 的实心/描边按钮 */
.btn--solid { background: var(--brand); color: var(--brand-fg); }
.btn--solid:hover { background: var(--brand-hover); color: var(--brand-fg); }
.btn--outline { border-color: var(--line-strong); background: var(--surface); color: var(--text); box-shadow: none; }
.btn--outline:hover { background: var(--surface-2); color: var(--ink); }
/* 尺寸 */
.btn--sm { --c-btn-h: 30px; gap: 4px; padding: 0 var(--sp-3); font-size: var(--fs-13); }
.btn--lg { --c-btn-h: 46px; padding: 0 var(--sp-5); font-size: var(--fs-16); }
.btn--block { display: flex; width: 100%; }
.btn--icon { width: var(--c-btn-h); padding: 0; }
/* 状态：禁用 / 加载 */
.btn[disabled], .btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; filter: none; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--c-spin-ink); border-right-color: transparent; border-radius: 50%; animation: c-spin 0.7s linear infinite; }
@keyframes c-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 深色首屏上的按钮（旧首页 hero 内） */
.hero .btn--ghost { --c-spin-ink: var(--c-hero-fg); border-color: var(--c-hero-line); background: var(--c-hero-panel); color: var(--c-hero-fg); }
.hero .btn--ghost:hover { background: var(--c-hero-panel-hover); color: var(--c-hero-fg); }

/* ==== 3) 徽标 .pill / 标签 .chip / 负责人 / 认领 chip ==== */
/* 规范：高 22、圆点 6px、fs12/600。旧语义名与新语义名共用声明。 */

.pill {
  --c-pill-h: 22px; display: inline-flex;
  align-items: center; gap: 6px;
  height: var(--c-pill-h); padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r-full);
  font-size: var(--fs-12); font-weight: 600;
  line-height: 1; white-space: nowrap;
  vertical-align: middle;
}
.pill::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.pill--plain::before, .pill--no-dot::before { display: none; }
/* 旧语义 → 新语义（同一组声明） */
.pill--done, .pill--success { background: var(--success-bg); color: var(--success); }
.pill--current, .pill--today, .pill--brand { background: var(--brand-soft); color: var(--brand); }
.pill--todo, .pill--upcoming, .pill--neutral { border-color: var(--line); background: var(--surface-3); color: var(--muted); }
.pill--overdue, .pill--danger { background: var(--danger-bg); color: var(--danger); }
.pill--external, .pill--info { background: var(--info-bg); color: var(--info); }
.pill--warning, .pill--tier2 { background: var(--warning-bg); color: var(--warning); }
.pill--core { background: var(--brand-soft); color: var(--brand); }
/* 默认（无变体）用中性色，避免旧页面裸 .pill 变成无样式 */
.pill:not([class*="pill--"]) { border-color: var(--line); background: var(--surface-3); color: var(--muted); }
.pill--sm { --c-pill-h: 18px; gap: 4px; padding: 0 7px; font-size: 11px; }
.pill--sm::before { width: 5px; height: 5px; }
.pill--lg { --c-pill-h: 26px; padding: 0 12px; font-size: var(--fs-13); }
/* 标签 / chips 组 */
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); color: var(--muted); font-size: var(--fs-12); white-space: nowrap; }
.chip strong, .chip b { color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.owner-chip {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border: 1px solid var(--line);
  border-radius: var(--r-full); background: var(--surface-2);
  color: var(--muted); font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  line-height: 18px; white-space: nowrap;
}
.claim-chip {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border: 1px solid var(--line-strong);
  border-radius: var(--r-full); background: var(--surface-2);
  color: var(--text); font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  line-height: 18px; white-space: nowrap;
}
.claim-chip.is-pending { border-color: var(--warning); background: var(--warning-bg); color: var(--warning); }
.claim-mine-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 22px; }
.claim-mine-pill.pill, #claim-mine-pill.pill { background: var(--brand-soft); color: var(--brand); }
/* 待配置 / 占位标签 */
.tag-pending, .link-url.is-pending, .link-pending {
  display: inline-flex; align-items: center;
  gap: 6px; align-self: flex-start;
  margin-top: var(--sp-1); padding: 2px 10px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-full);
  background: var(--surface-2); color: var(--muted);
  font-family: var(--mono); font-size: var(--fs-12);
  line-height: 20px; overflow-wrap: anywhere;
}

/* ==== 4) 卡片（统一外壳） + 区块标题 ==== */
/* 旧 .card 与 9 类业务卡统一为 r-xl / 1px line / sh-1 / surface / pad 20 */

.card,
.kpi,
.stat-card,
.phase-card,
.member-card,
.week-card,
.gate-card,
.deliverable-card,
.link-card,
.claim-unclaimed-card,
.claim-task,
.guide-section,
.gantt-card,
.figure,
.plan-status-cell,
.home-kpi,
.claim-state,
.claim-identity,
.file-hero,
.file-download {
  --c-card-pad: 20px; position: relative;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--sh-1);
  transition: box-shadow var(--dur-2) var(--ease-1), border-color var(--dur-2) var(--ease-1), transform var(--dur-2) var(--ease-1);
}
.card,
.kpi,
.stat-card,
.phase-card,
.member-card,
.week-card,
.gate-card,
.deliverable-card,
.link-card,
.claim-unclaimed-card,
.guide-section,
.gantt-card,
.figure,
.plan-status-cell,
.home-kpi,
.claim-state,
.claim-identity,
.file-hero,
.file-download {
  padding: var(--c-card-pad);
}
/* hover 微升：仅可交互/可浏览的卡片 */
.card--interactive:hover,
.card:hover,
.stat-card:hover,
.phase-card:hover,
.member-card:hover,
.week-card:hover,
.gate-card:hover,
.deliverable-card:hover,
.link-card:hover,
.home-kpi:hover,
.file-download:hover,
.figure:hover,
.gantt-card:hover,
.plan-status-cell:hover,
.claim-unclaimed-card:hover {
  border-color: var(--line-strong); box-shadow: var(--sh-2);
  transform: translateY(-1px);
}
.card > :first-child,
.phase-card > :first-child,
.member-card > :first-child,
.week-card > :first-child,
.gate-card > :first-child,
.deliverable-card > :first-child,
.link-card > :first-child,
.guide-section > :first-child,
.claim-state > :first-child,
.file-hero > :first-child {
  margin-top: 0;
}
.card > :last-child, .phase-card > :last-child, .member-card > :last-child, .week-card > :last-child, .gate-card > :last-child, .deliverable-card > :last-child, .link-card > :last-child, .guide-section > :last-child { margin-bottom: 0; }
/* 卡片内部子结构 */
.card__head, .card__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.card__title { color: var(--ink); font-size: var(--fs-16); font-weight: 600; }
.card__body > :first-child { margin-top: 0; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-12); }
.card--flush { padding: 0; overflow: hidden; }
.card--flush > .table-wrap { margin: 0; border: 0; border-radius: inherit; box-shadow: none; }
.card--flush > .table-toolbar:first-child { border-radius: inherit; }
.card--muted { background: var(--surface-2); box-shadow: none; }
.card--accent { border-top: 3px solid var(--brand); }
.card--accent-coral { border-top: 3px solid var(--coral); }
.card--accent-success { border-top: 3px solid var(--success); }
.card h2, .card > h3 { margin-bottom: var(--sp-2); }
.card p + p, .guide-section p + p { margin-top: var(--sp-2); }
/* 区块 / 区块标题（旧 .section-head + 新 .section__head 同组） */
.section { margin-top: var(--sp-6); }
.section:first-child { margin-top: 0; }
.page-head + .section { margin-top: var(--sp-5); }
.section-head, .section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-4); }
.section-head h2, .section__head h2, .section-head__title, .section__title { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: var(--fs-20); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.section-head h2::before, .section__head h2::before { content: ""; width: 3px; height: 1.05em; flex: 0 0 auto; border-radius: 2px; background: var(--brand); }
.section-head .note, .section__desc { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.55; }
.section__actions, .section-head__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
/* 旧版 page-head 内文兼容（新版 .page-head 结构由 base.css 负责） */
.page-head > .eyebrow { display: block; }
.page-head .lede { margin-top: var(--sp-2); }
.page-head .note { margin-top: var(--sp-2); }
@supports selector(:has(*)) {
  .page-head:has(> .eyebrow), .page-head:has(> .lede) { display: block; align-items: initial; justify-content: initial; }
}

/* ==== 5) KPI / 项目数字 ==== */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-3); }
.home-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.home-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--sp-4); color: var(--text); text-decoration: none; }
.home-kpi:hover { color: var(--text); text-decoration: none; }
.home-kpi-value { color: var(--ink); font-size: var(--fs-24); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-kpi-label { color: var(--muted); font-size: var(--fs-13); }
/* 倒计时（首页 #countdown-* 容器；旧 id 与新 class 双兼容） */
.countdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); }
.countdown-label, .countdown__label { color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.countdown-days, .countdown-value, .countdown__value { color: var(--ink); font-size: var(--fs-32); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown-days small, .countdown-value small, .countdown-unit { margin-left: 2px; color: var(--muted); font-size: var(--fs-14); font-weight: 600; }
.countdown-meta, .countdown__meta { color: var(--muted); font-size: var(--fs-12); }
.stat-card { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) var(--sp-4) var(--sp-3); overflow: hidden; }
.stat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand); opacity: 0.85; }
.stat-card:nth-child(4)::before, .stat-card:nth-child(5)::before { background: var(--coral); }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--sp-2); border-radius: var(--r-lg); background: var(--brand-soft); color: var(--brand); }
.stat-icon svg { width: 20px; height: 20px; }
.stat-card:nth-child(4) .stat-icon, .stat-card:nth-child(5) .stat-icon { background: var(--surface-3); color: var(--coral); }
.stat-value { color: var(--ink); font-size: var(--fs-32); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 2px; color: var(--muted); font-size: var(--fs-14); font-weight: 600; }
.stat-label { color: var(--muted); font-size: var(--fs-13); line-height: 1.35; }
.stat-hint { color: var(--faint); font-size: var(--fs-12); line-height: 1.45; }
/* 新版 KPI 契约（DESIGN_SPEC §4） */
.kpi { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4); }
.kpi__label { color: var(--muted); font-size: var(--fs-12); line-height: 1.35; }
.kpi__value { color: var(--ink); font-size: var(--fs-24); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi__delta { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--fs-12); }
.kpi__delta--up { color: var(--success); }
.kpi__delta--down { color: var(--danger); }
.kpi__delta--warn { color: var(--warning); }

/* ==== 6) 表格 ==== */
/* 外层 .table-wrap 负责横滚 + 边缘渐变提示；table / .table 元素级保留全局思路 */

.table-wrap {
  position: relative; margin: var(--sp-4) 0;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background-color: var(--surface);
  background-image: linear-gradient(to right, var(--surface) 30%, transparent), linear-gradient(to left, var(--surface) 30%, transparent), linear-gradient(to right, var(--line), transparent), linear-gradient(to left, var(--line), transparent);
  background-position: left center, right center, left center, right center;
  background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%; background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll; box-shadow: var(--sh-1);
}
.table-wrap > table { margin: 0; }
table, .table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-14); line-height: 1.5; }
caption { padding: var(--sp-3) var(--sp-4) var(--sp-1); color: var(--muted); font-size: var(--fs-12); text-align: left; caption-side: top; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
tbody td { font-size: var(--fs-13); }
tbody tr { transition: background-color var(--dur-1) var(--ease-1); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td strong, th strong { color: var(--ink); }
/* 数字列：右对齐 + 等宽数字 */
td.num, th.num, .table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
/* 紧凑表 */
.table--compact th, .table--compact td { padding: 6px 10px; font-size: var(--fs-12); }
/* 首列 sticky（新契约 .table--sticky-first / 旧 .table-wrap--sticky-first） */
.table--sticky-first th:first-child, .table--sticky-first td:first-child, .table-wrap--sticky-first table th:first-child, .table-wrap--sticky-first table td:first-child {
  position: sticky; left: 0;
  z-index: 1; background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.table--sticky-first thead th:first-child, .table-wrap--sticky-first table thead th:first-child { z-index: 3; background: var(--surface-2); }
.table--sticky-first tbody tr:hover td:first-child, .table-wrap--sticky-first table tbody tr:hover td:first-child { background: var(--surface-2); }
/* 空态 / 提示行 */
.table-empty { padding: var(--sp-6) var(--sp-4) !important; color: var(--muted); font-size: var(--fs-13); text-align: center; }
.table-hint { display: none; margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-12); }
/* 宽表：交付清单收敛为 5 列后仍保持最小可读宽度（1040px），
   窄屏一律由外层 .table-wrap 横向滚动承担，页面级不产生横向溢出（表格均在 .table-wrap 内）。 */
.table-wrap > table.table--wide { min-width: 1040px; }
/* 5 列交付表：形式要求 / 验收标准并入「交付物」单元格，作为名称下方的小字（.text-xs.muted） */
.table--wide .cell-name { color: var(--ink); font-weight: 600; line-height: 1.45; }
.table--wide .cell-note { margin-top: 2px; line-height: 1.5; }
/* 横向滚动提示：默认隐藏；761–1335px（JS 的移动端提示不覆盖、表格又放不下的区间）显示。
   ≤760 由 app.js addTableHints() 在真实溢出时注入 .table-hint（见 §21 移动端规则）。 */
.table-hint--scroll { display: none; }
@media (min-width: 761px) and (max-width: 1335px) {
  .table-hint--scroll { display: block; }
}
/* 卡片视图下表格隐藏时，紧随其后的滑动提示一并隐藏 */
.table-wrap[hidden] + .table-hint { display: none; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.table-toolbar .note { margin: 0; }
/* 键值表 / 明细 */
.kv-table td:first-child { width: 9rem; color: var(--muted); font-weight: 500; }
.kv { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); margin: var(--sp-3) 0; }
.kv dt { color: var(--muted); font-size: var(--fs-13); }
.kv dd { margin: 0; color: var(--text); font-size: var(--fs-13); overflow-wrap: anywhere; }
.detail-list { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0; padding: 0; list-style: none; }
.detail-row { display: grid; grid-template-columns: minmax(72px, 96px) minmax(0, 1fr); gap: var(--sp-3); font-size: var(--fs-13); }
.detail-term { color: var(--muted); }
.detail-value { color: var(--text); overflow-wrap: anywhere; }
.result-summary { margin: 0 0 var(--sp-3); color: var(--muted); font-size: var(--fs-13); }
.result-summary strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ==== 7) 时间线：旧 .milestone 与 新 .timeline 双套 ==== */
.milestones, .timeline, .phase-timeline { margin: 0; padding: 0; list-style: none; }
:is(.milestone, .timeline__item, .timeline-item) { position: relative; margin: 0; padding: 0 0 var(--sp-4) calc(36px + var(--sp-3)); }
:is(.milestone, .timeline__item, .timeline-item):last-child { padding-bottom: 0; }
:is(.milestone, .timeline__item, .timeline-item)::before { content: ""; position: absolute; top: 40px; bottom: 0; left: 17px; width: 2px; background: var(--line); }
:is(.milestone, .timeline__item, .timeline-item):last-child::before { display: none; }
:is(.milestone-marker, .timeline__marker, .timeline-marker) {
  position: absolute; top: 2px;
  left: 0; display: grid;
  place-items: center; width: 36px;
  height: 36px; border: 2px solid var(--line-strong);
  border-radius: 50%; background: var(--surface);
  color: var(--muted); font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  line-height: 1;
  transition: background-color var(--dur-2) var(--ease-1), border-color var(--dur-2) var(--ease-1), color var(--dur-2) var(--ease-1);
}
:is(.milestone-body, .timeline__body, .timeline-body) {
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface);
  transition: border-color var(--dur-2) var(--ease-1), box-shadow var(--dur-2) var(--ease-1);
}
:is(.milestone-body, .timeline__body, .timeline-body):hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
:is(.milestone-top, .timeline__head, .timeline-head) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); }
:is(.milestone-top, .timeline__head, .timeline-head) :is(h3, h4) { font-size: var(--fs-16); font-weight: 600; }
:is(.milestone-date, .timeline__time, .timeline-time) { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); white-space: nowrap; }
:is(.milestone-meta, .timeline__meta, .timeline-meta) { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.55; }
:is(.milestone-note, .timeline__note, .timeline-note) { margin: var(--sp-2) 0 0; color: var(--text); font-size: var(--fs-13); line-height: 1.6; }
/* 状态：已完成 / 当前 / 外部 */
:is(.milestone, .timeline__item, .timeline-item).is-done :is(.milestone-marker, .timeline__marker, .timeline-marker) { border-color: var(--success); background: var(--success-bg); color: var(--success); }
:is(.milestone,
.timeline__item,
.timeline-item).is-current :is(.milestone-marker,
.timeline__marker,
.timeline-marker),
:is(.milestone,
.timeline__item,
.timeline-item)[aria-current="step"] :is(.milestone-marker,
.timeline__marker,
.timeline-marker) {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
:is(.milestone,
.timeline__item,
.timeline-item).is-current :is(.milestone-body,
.timeline__body,
.timeline-body),
:is(.milestone,
.timeline__item,
.timeline-item)[aria-current="step"] :is(.milestone-body,
.timeline__body,
.timeline-body) {
  border-color: var(--brand);
}
:is(.milestone, .timeline__item, .timeline-item).is-todo :is(.milestone-marker, .timeline__marker, .timeline-marker) { border-color: var(--line-strong); color: var(--brand); }
:is(.milestone, .timeline__item, .timeline-item).is-external :is(.milestone-marker, .timeline__marker, .timeline-marker) { border-style: dashed; }
:is(.milestone, .timeline__item, .timeline-item).is-external :is(.milestone-body, .timeline__body, .timeline-body) { border-style: dashed; background: var(--surface-2); box-shadow: none; }
/* 更新流 */
.updates { position: relative; margin: 0; padding: 0; list-style: none; }
.updates li { position: relative; display: flex; gap: var(--sp-3); margin: 0; padding: 2px 0 var(--sp-4) var(--sp-5); }
.updates li::before { content: ""; position: absolute; top: 6px; left: 2px; width: 8px; height: 8px; border: 2px solid var(--success); border-radius: 50%; background: var(--surface); }
.updates li + li::after { content: ""; position: absolute; top: 20px; bottom: 2px; left: 6px; width: 1px; background: var(--line); }
.updates time { flex: 0 0 6.5rem; color: var(--brand); font-family: var(--mono); font-size: var(--fs-12); font-weight: 600; white-space: nowrap; }
.updates p { margin: 0; color: var(--text); font-size: var(--fs-13); line-height: 1.6; }
/* 首屏迷你里程碑轨道（M0–M7） */
.pulse-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.pulse-rail li { position: relative; margin: 0; padding-top: 16px; color: var(--c-hero-muted, var(--muted)); font-family: var(--mono); font-size: 10px; text-align: center; }
.pulse-rail li::before { content: ""; position: absolute; top: 5px; left: 50%; width: 8px; height: 8px; border: 1.5px solid var(--c-hero-muted, var(--line-strong)); border-radius: 50%; background: transparent; transform: translateX(-50%); }
.pulse-rail li::after { content: ""; position: absolute; top: 9px; left: 50%; width: 100%; height: 1px; background: var(--c-hero-line, var(--line)); }
.pulse-rail li:last-child::after { display: none; }
.pulse-rail li.is-done::before { border-color: var(--success); background: var(--success); }
.pulse-rail li.is-current::before { border-color: var(--c-hero-accent, var(--coral)); background: var(--c-hero-accent, var(--coral)); box-shadow: 0 0 0 4px var(--c-hero-panel, var(--surface-3)); }
.pulse-rail li.is-current { color: var(--c-hero-accent, var(--coral)); font-weight: 700; }
.pulse-rail li.is-external::before { border-style: dashed; }

/* ==== 8) 进度：旧 .bar/.bar-fill/.mini-bar/.dist-bar 与 新 .progress/.progress__bar ==== */
.progress { display: grid; gap: 6px; }
.progress__head, .progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-12); }
.progress__value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.progress__track, .bar { position: relative; display: block; height: 8px; overflow: hidden; border-radius: var(--r-full); background: var(--surface-3); }
.progress__bar, .bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width var(--dur-3) var(--ease-2); }
.progress--success .progress__bar, .bar-fill.is-ok { background: var(--success); }
.progress--warning .progress__bar, .bar-fill.is-coral { background: var(--warning); }
.progress--danger .progress__bar, .bar-fill.is-danger { background: var(--danger); }
.bar-now { position: absolute; top: -2px; bottom: -2px; width: 2px; border-radius: 2px; background: var(--coral); box-shadow: 0 0 0 2px var(--surface-3); }
/* 阶段卡内进度必须 6px、圆角 */
.phase-card .bar, .phase-card .progress__track { height: 6px; border-radius: var(--r-full); }
/* 成员负载迷你条 */
.mini-bar { flex: 1 1 auto; height: 6px; overflow: hidden; border-radius: var(--r-full); background: var(--surface-3); }
.mini-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
/* 交付人分布 */
.owner-dist { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.owner-dist li { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) minmax(0, auto); align-items: center; gap: var(--sp-3); margin: 0; font-size: var(--fs-13); }
.owner-dist .dist-name { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; white-space: nowrap; }
.owner-dist .dist-bar { height: 6px; overflow: hidden; border-radius: var(--r-full); background: var(--surface-3); }
.owner-dist .dist-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.owner-dist li.is-lead .dist-bar i { background: var(--coral); }
.owner-dist .dist-count { min-width: 0; color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); white-space: normal; overflow-wrap: anywhere; text-align: right; }
/* 右栏（base .grid--sidebar 的 280px 固定列）内：名称+条一行、计数另起一行，避免 3 列挤爆卡片 */
.grid--sidebar .owner-dist li { grid-template-columns: 4.2rem minmax(0, 1fr); row-gap: 2px; }
.grid--sidebar .owner-dist .dist-name { white-space: normal; }
.grid--sidebar .owner-dist .dist-count { grid-column: 1 / -1; }
/* 认领页进度卡 */
.claim-progress { display: flex; flex-direction: column; gap: var(--sp-1); }
.claim-progress-value { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--ink); font-size: var(--fs-20); font-weight: 700; font-variant-numeric: tabular-nums; }
.claim-progress-value .note, .claim-progress-total { margin: 0; color: var(--muted); font-size: var(--fs-12); font-weight: 500; }
.claim-progress .bar, .claim-progress .progress__track { margin: var(--sp-1) 0; height: 8px; }

/* ==== 9) 甘特（基线图片 + 阶段条） ==== */
.gantt-card { --c-gantt-label: 9.6rem; margin: var(--sp-4) 0; }
.gantt, .gantt-body { position: relative; display: grid; gap: 4px; }
.gantt-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-2); }
.gantt-head h3 { font-size: var(--fs-16); font-weight: 600; }
.gantt-axis { display: flex; justify-content: space-between; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-4); padding-left: var(--c-gantt-label); color: var(--muted); font-family: var(--mono); font-size: 11px; }
.gantt-row { display: grid; grid-template-columns: calc(var(--c-gantt-label) - 8px) minmax(0, 1fr); align-items: center; gap: var(--sp-2); padding: 3px 6px; border-radius: var(--r-md); transition: background-color var(--dur-1) var(--ease-1); }
.gantt-row:hover { background: var(--surface-2); }
.gantt-label { overflow: hidden; color: var(--text); font-size: var(--fs-12); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.gantt-label code { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.gantt-track { position: relative; height: 24px; overflow: hidden; border-radius: var(--r-md); background-color: var(--surface-2); background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 25% 100%; }
.gantt-row:nth-child(even) .gantt-track { background-color: var(--surface-3); }
.gantt-bar {
  position: absolute; top: 5px;
  bottom: 5px; display: flex;
  align-items: center; min-width: 10px;
  padding: 0 8px; overflow: hidden;
  border-radius: var(--r-sm); background: var(--brand);
  color: var(--brand-fg); font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  line-height: 1; white-space: nowrap;
}
.gantt-bar--coral { background: var(--coral); color: var(--surface); }
.gantt-today {
  position: absolute; top: 0;
  bottom: 0;
  /* --pos 由 app.js 行内 style 写入（0–1 比例），属于 JS 契约变量，不可改名 */ left: calc(var(--c-gantt-label) + (100% - var(--c-gantt-label)) * var(--pos, 0));
  z-index: 2; width: 2px;
  border-radius: 2px; background: var(--coral);
  pointer-events: none;
}
.gantt-today-label {
  position: absolute; top: 0;
  left: 50%; padding: 1px 5px;
  border-radius: var(--r-sm); background: var(--coral);
  color: var(--surface); font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  white-space: nowrap; transform: translate(-50%, -100%);
}
.gantt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); color: var(--muted); font-size: var(--fs-12); }

/* ==== 10) 提示块 / Toast ==== */
.callout {
  --c-callout-accent: var(--brand); position: relative;
  margin: var(--sp-4) 0; padding: var(--sp-4);
  border: 1px solid var(--line); border-left: 3px solid var(--c-callout-accent);
  border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--surface);
  box-shadow: var(--sh-1);
}
.callout--ok, .callout--success { --c-callout-accent: var(--success); background: var(--success-bg); }
.callout--warn, .callout--warning { --c-callout-accent: var(--warning); background: var(--warning-bg); }
.callout--danger, .callout--error { --c-callout-accent: var(--danger); background: var(--danger-bg); }
.callout--info { --c-callout-accent: var(--info); background: var(--info-bg); }
.callout-title, .callout__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--ink); font-size: var(--fs-14); font-weight: 600; line-height: 1.4; }
.callout-title svg, .callout__title svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--c-callout-accent); }
.callout p, .callout ul, .callout ol { margin: 0; color: var(--text); font-size: var(--fs-13); line-height: 1.6; }
.callout p + p, .callout ul, .callout ol { margin-top: var(--sp-2); }
.callout ul, .callout ol { padding-left: var(--sp-5); }
.callout li { margin: 2px 0; }
.callout > :last-child { margin-bottom: 0; }
/* 页面级错误 / 加载失败 */
.data-error {
  margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--danger); border-left: 3px solid var(--danger);
  border-radius: var(--r-md); background: var(--danger-bg);
  color: var(--danger); font-size: var(--fs-13);
  line-height: 1.6;
}
.data-error strong, .data-error code { color: inherit; }
/* 轻提示：旧行为 fixed 底部居中 + .is-visible */
.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--sp-5) + env(safe-area-inset-bottom)); z-index: var(--z-toast);
  max-width: min(92vw, 32rem); margin: 0;
  padding: 10px 16px; border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brand); border-radius: var(--r-lg);
  background: var(--ink); color: var(--surface);
  font-size: var(--fs-13); line-height: 1.5;
  text-align: center; box-shadow: var(--sh-3);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 10px); transition: opacity var(--dur-2) var(--ease-1), transform var(--dur-2) var(--ease-1);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { border-color: var(--danger); border-left-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.toast--success { border-color: var(--success); border-left-color: var(--success); background: var(--success-bg); color: var(--success); }
.toast--info { border-color: var(--info); border-left-color: var(--info); background: var(--info-bg); color: var(--info); }

/* ==== 11) 空态 / 加载 / 骨架屏 ==== */
.empty-state {
  display: grid; place-items: center;
  gap: var(--sp-2); margin: var(--sp-4) 0;
  padding: var(--sp-7) var(--sp-4); border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl); background: var(--surface-2);
  color: var(--muted); font-size: var(--fs-13);
  line-height: 1.6; text-align: center;
}
.empty-state__title, .empty-state strong { color: var(--text); font-size: var(--fs-14); font-weight: 600; }
.empty-state__text { max-width: 44ch; }
.empty-state__action { margin-top: var(--sp-2); }
.loading {
  display: flex; align-items: center;
  gap: var(--sp-2); margin: var(--sp-4) 0;
  padding: var(--sp-3) var(--sp-4); border: 1px dashed var(--line);
  border-radius: var(--r-md); background: var(--surface-2);
  color: var(--muted); font-size: var(--fs-13);
  list-style: none;
}
.loading::before { content: ""; width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; animation: c-spin 0.8s linear infinite; }
.skeleton { position: relative; overflow: hidden; min-height: 12px; border-radius: var(--r-sm); background: var(--surface-3); color: transparent; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-2), transparent); background-size: 200% 100%; animation: c-skeleton 1.4s var(--ease-2) infinite; }
.skeleton--text { height: 12px; margin: 6px 0; }
.skeleton--title { width: 40%; height: 20px; margin-bottom: var(--sp-3); }
.skeleton--circle { width: 40px; height: 40px; border-radius: 50%; }
.skeleton--card { height: 96px; border-radius: var(--r-xl); }
@keyframes c-skeleton {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ==== 12) 工具栏 / 分段控件 / 视图切换 / 表单 ==== */
.toolbar {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin: var(--sp-4) 0;
  padding: var(--sp-3); border: 1px solid var(--line);
  border-radius: var(--r-xl); background: var(--surface);
  box-shadow: var(--sh-1);
}
.toolbar__group, .toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
/* 吸顶工具栏（能力类；当前仅交付页 .toolbar--sticky 使用）
   top 叠加安全区：≤1023 的 topbar 高度含 env(safe-area-inset-top)，桌面端该值为 0；
   背景必须不透明，并补一条下边框，滚动时与内容分隔。 */
.toolbar--sticky {
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top));
  z-index: var(--z-toolbar);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--sh-2);
}
.segmented, .filter, .view-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-lg); background: var(--surface-3); }
.view-switch { border: 1px solid var(--line); background: var(--surface); }
.segmented button, .filter button, .view-switch button {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  height: 30px; padding: 0 var(--sp-3);
  border: 0; border-radius: calc(var(--r-lg) - 2px);
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: var(--fs-13);
  font-weight: 600; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-1), color var(--dur-1) var(--ease-1);
}
.segmented button:hover, .filter button:hover, .view-switch button:hover { background: var(--surface-2); color: var(--ink); }
.segmented button:active, .filter button:active, .view-switch button:active { transform: scale(0.97); }
.segmented button[aria-pressed="true"],
.segmented button.is-active,
.filter button[aria-pressed="true"],
.filter button.is-active,
.view-switch button[aria-pressed="true"],
.view-switch button.is-active,
.segmented button[aria-selected="true"],
.view-switch button[aria-selected="true"],
[role="tab"][aria-selected="true"] {
  background: var(--surface); color: var(--brand);
  box-shadow: var(--sh-1);
}
.view-switch button[aria-pressed="true"], .view-switch button.is-active { background: var(--surface-3); color: var(--ink); box-shadow: none; }
.segmented button[aria-pressed="true"] .count, .segmented button.is-active .count, .filter button[aria-pressed="true"] .count { background: var(--brand-soft); color: var(--brand); }
/* 表单控件 */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label, .field-label { color: var(--text); font-size: var(--fs-13); font-weight: 600; }
.field__hint, .field-hint { color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.field__error, .field-error { color: var(--danger); font-size: var(--fs-12); }
.input, .select, .textarea {
  width: 100%; min-height: 36px;
  padding: 6px 10px; border: 1px solid var(--line-strong);
  border-radius: var(--r-md); background: var(--surface);
  color: var(--text); font-family: inherit;
  font-size: var(--fs-14); line-height: 1.4;
  transition: border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); }
.input[disabled], .select[disabled], .textarea[disabled], .input[readonly] { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.input[aria-invalid="true"], .input.is-invalid, .select[aria-invalid="true"] { border-color: var(--danger); }
.field--inline { flex-direction: row; align-items: center; gap: var(--sp-2); }
.filter-row, .field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); }
/* 分页 */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: var(--sp-4) 0 0; padding: 0; list-style: none; }
.pager button, .pager a {
  display: inline-flex; align-items: center;
  justify-content: center; min-width: 32px;
  height: 32px; padding: 0 var(--sp-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font-size: var(--fs-13); text-decoration: none;
}
.pager button:hover, .pager a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.pager [aria-current="page"], .pager .is-current { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* ==== 13) 业务卡片：阶段 / 成员 / 周 / Gate / 交付 / 链接 / 文件 / 图 / 状态 ==== */
/* ---- 阶段进度卡 ---- */
.phase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: var(--sp-3); }
.phase-card { display: flex; flex-direction: column; gap: var(--sp-1); }
.phase-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.phase-head h3 { font-size: var(--fs-14); font-weight: 600; }
.phase-wbs { color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); white-space: nowrap; }
.phase-meta { margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.phase-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-2); margin-top: var(--sp-1); color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.phase-foot strong { color: var(--text); }
.phase-owners { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--sp-1) 0 0; }
/* ---- 成员卡 ---- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.member-card { display: flex; flex-direction: column; gap: var(--sp-1); overflow: hidden; }
.member-card.is-lead { border-color: var(--brand); }
.member-card.is-lead::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--coral); }
.member-head { display: flex; align-items: center; gap: var(--sp-2); }
.member-card .avatar, .member-head .avatar {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  flex: 0 0 auto; border-radius: 50%;
  background: var(--brand); color: var(--brand-fg);
  font-family: var(--mono); font-size: var(--fs-12);
  font-weight: 700;
}
.member-card.is-lead .avatar { background: var(--coral); color: var(--surface); }
.member-name { min-width: 0; }
.member-name h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-14); font-weight: 600; }
.member-role { margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.member-duty { margin: var(--sp-1) 0 0; color: var(--text); font-size: var(--fs-13); line-height: 1.55; }
.member-load { display: flex; align-items: center; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.member-load strong { color: var(--text); }
.member-card.is-lead .mini-bar i { background: var(--coral); }
.member-deliv { margin: var(--sp-1) 0 0; padding-top: var(--sp-2); border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
/* ---- 周视图卡 ---- */
.weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: var(--sp-3); }
.week-card { display: flex; flex-direction: column; gap: var(--sp-1); }
.week-card.is-current, .week-card.is-today { border-color: var(--brand); box-shadow: var(--sh-2); }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.week-id { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--r-full); background: var(--brand); color: var(--brand-fg); font-family: var(--mono); font-size: var(--fs-12); font-weight: 700; }
.week-dates { color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: right; }
.week-goal { margin: var(--sp-1) 0 0; color: var(--ink); font-size: var(--fs-14); font-weight: 600; line-height: 1.4; }
.week-ms { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--sp-1) 0 0; }
.week-tasks { margin: var(--sp-1) 0 0; padding-top: var(--sp-2); border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-12); line-height: 1.55; }
/* ---- Gate 卡 / 任务链 ---- */
.gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3); }
.gate-card--coral { border-top: 3px solid var(--coral); }
.gate-card--teal { border-top: 3px solid var(--brand); }
.gate-card h3 { margin-bottom: var(--sp-1); font-size: var(--fs-14); font-weight: 600; }
.gate-date { display: inline-flex; align-items: baseline; gap: 6px; margin: var(--sp-1) 0 0; color: var(--coral); font-family: var(--mono); font-size: var(--fs-16); font-weight: 700; }
.gate-card--teal .gate-date { color: var(--brand); }
.gate-card p { font-size: var(--fs-13); }
.chain, .chain--static { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: var(--sp-2) 0 0; padding: 0; list-style: none; }
.chain li, .chain--static li {
  display: inline-flex; align-items: center;
  gap: 4px; margin: 0;
  padding: 1px 8px; border: 1px solid var(--line);
  border-radius: var(--r-full); background: var(--surface-2);
  color: var(--text); font-family: var(--mono);
  font-size: 11px; font-weight: 600;
}
.chain li:not(:last-child)::after { content: "→"; margin-left: 2px; color: var(--coral); font-family: var(--font); }
/* ---- 折叠明细（历史 .task-details 结构 / 新 .details 兼容） ---- */
.task-details, .claim-rules-details, .home-status, .plan-materials { margin: var(--sp-4) 0; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-1); }
.task-details > summary, .claim-rules-details > summary, .home-status > summary, .plan-materials > summary {
  display: flex; align-items: center;
  gap: var(--sp-2); min-height: 44px;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-xl);
  color: var(--text); font-size: var(--fs-14);
  font-weight: 600; cursor: pointer;
  list-style: none;
}
.task-details > summary::-webkit-details-marker, .claim-rules-details > summary::-webkit-details-marker, .home-status > summary::-webkit-details-marker, .plan-materials > summary::-webkit-details-marker { display: none; }
.task-details > summary::before, .claim-rules-details > summary::before, .home-status > summary::before, .plan-materials > summary::before { content: "▸"; color: var(--brand); transition: transform var(--dur-1) var(--ease-1); }
.task-details[open] > summary::before, .claim-rules-details[open] > summary::before, .home-status[open] > summary::before, .plan-materials[open] > summary::before { transform: rotate(90deg); }
.task-details[open] > summary, .claim-rules-details[open] > summary, .home-status[open] > summary, .plan-materials[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.task-mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2px var(--sp-3); margin: 0; padding: var(--sp-3) var(--sp-4); list-style: none; }
.task-mini-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); margin: 0; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-13); }
.task-mini-list li:last-child { border-bottom: 0; }
.home-status-body, .plan-materials-body, .claim-rules-details > ul { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.claim-rules-details > ul { margin: 0; padding-left: var(--sp-6); font-size: var(--fs-13); line-height: 1.6; }
.claim-rules-details .note { margin: 0; padding: 0 var(--sp-4) var(--sp-4); }
/* ---- 交付卡 ---- */
.deliverable-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.deliverable-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.deliverable-card.is-overdue { border-left: 3px solid var(--danger); }
.deliverable-card.is-accepted { border-left: 3px solid var(--success); }
.deliverable-card.is-active { animation: none; }
.deliverable-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.deliverable-card h3 { font-size: var(--fs-14); font-weight: 600; line-height: 1.45; }
.deliverable-meta { display: grid; gap: 4px; margin: 0; }
.deliverable-meta > div { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: var(--sp-2); font-size: var(--fs-12); }
.deliverable-meta dt { color: var(--muted); font-weight: 500; }
.deliverable-meta dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.deliverable-meta dd strong { color: var(--ink); }
.deliverable-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-12); }
/* ---- 链接卡 ---- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3); }
.link-card { display: flex; flex-direction: column; gap: var(--sp-2); color: var(--text); text-decoration: none; }
a.link-card:hover { color: var(--text); text-decoration: none; }
.link-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--brand-soft); color: var(--brand); }
.link-icon.is-coral, .link-card.is-coral .link-icon { background: var(--surface-3); color: var(--coral); }
.link-icon svg { width: 20px; height: 20px; }
.link-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-size: var(--fs-14); font-weight: 600; }
.link-desc { margin: 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.6; }
.link-url { display: block; color: var(--brand); font-family: var(--mono); font-size: var(--fs-12); overflow-wrap: anywhere; }
.link-note { margin: 0; color: var(--faint); font-size: var(--fs-12); line-height: 1.5; }
.link-card .btn { align-self: flex-start; margin-top: var(--sp-1); }
/* ---- 文件页 ---- */
.file-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--sp-5); margin: var(--sp-4) 0; }
.file-hero-main { min-width: 0; }
.file-hero h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-16); font-weight: 600; }
.file-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--sp-2); border-radius: var(--r-lg); background: var(--brand-soft); color: var(--brand); }
.file-icon svg { width: 24px; height: 24px; }
.file-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.file-tree { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.file-tree-title { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.file-tree ul { display: grid; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.file-tree li { display: grid; gap: 2px; margin: 0; padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.file-tree li code { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: var(--fs-12); font-weight: 600; }
.file-tree li span { color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.file-downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-3); }
.file-download { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); color: var(--text); text-decoration: none; }
.file-download:hover { color: var(--text); text-decoration: none; }
.file-download .fd-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); }
.file-download.is-coral .fd-icon { background: var(--surface-3); color: var(--coral); }
.file-download .fd-icon svg { width: 18px; height: 18px; }
.file-download strong { display: block; color: var(--ink); font-size: var(--fs-13); font-weight: 600; }
.file-download small { display: block; color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.file-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.file-copy-row .note { margin: 0; }
/* ---- 图 / 基线甘特图 ---- */
.figure { margin: var(--sp-4) 0; padding: var(--sp-3); }
.figure-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: 0 2px var(--sp-2); }
.figure-toolbar h3 { font-size: var(--fs-14); font-weight: 600; }
.figure-toolbar .note { margin: 0; }
.figure-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.figure-scroll img { display: block; width: 100%; min-width: 640px; height: auto; border-radius: var(--r-lg); }
.figure figcaption { margin-top: var(--sp-2); padding: 0 2px; color: var(--muted); font-size: var(--fs-12); line-height: 1.6; }
.plan-gantt-mobile { display: none; margin-top: var(--sp-2); }
/* ---- 计划页状态条 ---- */
.plan-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0; }
.plan-status-cell { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4); }
.plan-status-label { color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; }
.plan-status-cell strong { color: var(--ink); font-size: var(--fs-16); font-weight: 600; line-height: 1.3; }
.plan-status-meta { color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.plan-materials-body > section:first-child, .plan-materials-body > .callout:first-child { margin-top: var(--sp-3); }
.plan-materials-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }

/* ==== 14) 首屏 Hero（旧首页装饰，保留为可复用的深色区） ==== */
/* 深色区局部变量：hero 与 guide-hero 共用同一套（两处都在组件层，不污染 :root） */
.hero, .guide-hero {
  --c-hero-bg: linear-gradient(140deg, #07243b 0%, #0a3d5c 38%, #0b5f6b 72%, #0d7a78 100%); --c-hero-fg: #eef8fb;
  --c-hero-muted: #a9c7d6; --c-hero-line: rgba(238, 248, 251, 0.22);
  --c-hero-panel: rgba(6, 24, 38, 0.35); --c-hero-panel-hover: rgba(6, 24, 38, 0.55);
  --c-hero-accent: #ff9678;
}
.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--sp-6); align-items: center;
  margin-top: var(--sp-2); padding: clamp(24px, 4vw, 48px);
  overflow: hidden; border-radius: calc(var(--r-xl) + 8px);
  background: var(--c-hero-bg); color: var(--c-hero-fg);
  box-shadow: var(--sh-3);
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(620px 300px at 88% 10%, rgba(45, 212, 191, 0.22), transparent 65%), radial-gradient(520px 360px at -6% 96%, rgba(255, 122, 89, 0.18), transparent 62%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.45; background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px); background-size: 26px 26px; }
.hero-copy { min-width: 0; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--sp-2); color: var(--c-hero-muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-eyebrow .dot { width: 8px; height: 8px; background: var(--c-hero-accent); }
.hero-title { margin: 0; color: var(--c-hero-fg); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.hero-title .hero-5, .brand-text strong .brand-5 { background: linear-gradient(120deg, #ffb199, #ff7a59 55%, #f4623d); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hero-sub { margin: var(--sp-2) 0 0; color: var(--c-hero-fg); font-size: var(--fs-16); font-weight: 600; }
.hero-lede { max-width: 42rem; margin: var(--sp-2) 0 0; color: var(--c-hero-muted); font-size: var(--fs-14); line-height: 1.7; }
.hero-lede strong, .hero-lede b { color: var(--c-hero-fg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.hero-actions .btn { min-height: 42px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.hero-meta li { display: inline-flex; align-items: baseline; gap: 6px; margin: 0; padding: 2px 10px; border: 1px solid var(--c-hero-line); border-radius: var(--r-full); color: var(--c-hero-muted); font-size: var(--fs-12); white-space: nowrap; }
.hero-meta strong { color: var(--c-hero-fg); }
.hero-who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; color: var(--c-hero-muted); font-size: var(--fs-13); }
.hero-who strong { color: var(--c-hero-fg); }
.hero-who .dot-live { background: var(--success); box-shadow: 0 0 0 4px var(--c-hero-panel); }
.hero-more { display: none; margin-top: var(--sp-2); color: var(--c-hero-muted); }
.hero-more summary { display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--c-hero-muted); font-size: var(--fs-13); font-weight: 600; cursor: pointer; list-style: none; }
.hero-more summary::-webkit-details-marker { display: none; }
.hero-more summary::before { content: "▸"; color: var(--c-hero-accent); }
.hero-more[open] summary::before { transform: rotate(90deg); }
.hero-more p { margin: var(--sp-1) 0 0; color: var(--c-hero-muted); font-size: var(--fs-13); line-height: 1.6; }
/* 右侧里程碑面板 */
.hero-panel { min-width: 0; padding: var(--sp-4) var(--sp-5); border: 1px solid var(--c-hero-line); border-radius: var(--r-xl); background: var(--c-hero-panel); }
.hero-panel-label { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin: 0; color: var(--c-hero-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-panel-value { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 0; color: var(--c-hero-fg); font-size: clamp(2.4rem, 4.4vw, 3.2rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-panel-value small { color: var(--c-hero-muted); font-size: 0.34em; font-weight: 600; }
.hero-panel-name { margin: var(--sp-2) 0 0; color: var(--c-hero-fg); font-size: var(--fs-14); font-weight: 600; }
.hero-panel-meta { margin: 2px 0 0; color: var(--c-hero-muted); font-size: var(--fs-12); line-height: 1.55; }
.hero-panel-foot { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px dashed var(--c-hero-line); }
.hero-panel-foot p { margin: 2px 0; color: var(--c-hero-muted); font-size: var(--fs-12); }
.hero-panel-foot strong { color: var(--c-hero-fg); font-variant-numeric: tabular-nums; }
.hero-synapse { position: absolute; right: -3rem; bottom: -4rem; z-index: -1; width: min(40rem, 70%); opacity: 0.35; pointer-events: none; }
.hero-synapse .edge { fill: none; stroke: var(--c-hero-muted); stroke-width: 1.2; }
.hero-synapse .node { fill: var(--n-800); stroke: var(--success); stroke-width: 2; }
.hero-synapse .node--hub { fill: var(--c-hero-accent); stroke: var(--c-hero-fg); }
.hero-synapse .node-pulse { fill: var(--c-hero-fg, var(--surface)); opacity: 0.6; }
/* 指南页深色头图 */
.guide-hero { position: relative; margin-top: var(--sp-2); padding: clamp(24px, 3.6vw, 40px); overflow: hidden; border-radius: var(--r-xl); background: var(--c-hero-bg); color: var(--c-hero-fg); box-shadow: var(--sh-3); }
.guide-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 240px at 92% -10%, rgba(45, 212, 191, 0.3), transparent 65%); }
.guide-hero > * { position: relative; z-index: 1; }
.guide-hero .eyebrow, .guide-hero .page-head__eyebrow { color: var(--c-hero-muted); }
.guide-hero h1 { color: var(--c-hero-fg); font-size: var(--fs-32); }
.guide-hero .lede, .guide-hero .page-head__desc { max-width: 46rem; color: var(--c-hero-muted); }
.guide-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) 0 0; padding: 0; list-style: none; color: var(--c-hero-muted); font-size: var(--fs-12); }
.guide-meta li { margin: 0; }
.guide-meta strong { color: var(--c-hero-fg); }
.guide-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ==== 15) 公开页（start.html 迁移后）：账号对照 / 自检 / 提示 ==== */
.wrap { width: min(100% - var(--sp-5), 720px); margin-inline: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.browser-tip {
  display: none; margin: var(--sp-3) 0 0;
  padding: var(--sp-2) var(--sp-3); border: 1px solid var(--warning);
  border-left: 3px solid var(--warning); border-radius: var(--r-md);
  background: var(--warning-bg); color: var(--warning);
  font-size: var(--fs-13); line-height: 1.55;
}
.browser-tip.is-visible { display: block; }
.accounts { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.account { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); font-size: var(--fs-13); }
.account strong { display: block; color: var(--ink); }
.account span { color: var(--muted); }
.check-body { margin-top: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font-size: var(--fs-13); }
.check-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--sp-2); }
.check-list span:first-child { color: var(--muted); }
.check-list span:last-child { color: var(--ink); font-family: var(--mono); font-size: var(--fs-12); word-break: break-all; }

/* ==== 16) 步骤条 / FAQ / 速查（指南 & 公开页共用） ==== */
.steps { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) 48px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute;
  top: var(--sp-3); left: var(--sp-3);
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%; background: var(--brand);
  color: var(--brand-fg); font-family: var(--mono);
  font-size: var(--fs-12); font-weight: 700;
}
.steps > li strong { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 600; }
.steps > li p { margin: 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.6; }
.steps > li p strong { display: inline; }
.steps--compact { gap: var(--sp-2); margin-top: var(--sp-2); }
.steps--compact > li { padding: var(--sp-2) var(--sp-3) var(--sp-2) 42px; }
.steps--compact > li::before { top: var(--sp-2); left: var(--sp-2); width: 20px; height: 20px; font-size: 11px; }
.faq { display: grid; gap: var(--sp-1); margin-top: var(--sp-3); }
.faq details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.faq summary { display: flex; align-items: baseline; gap: var(--sp-2); min-height: 44px; padding: var(--sp-2) var(--sp-3); color: var(--ink); font-size: var(--fs-14); font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▸"; flex: 0 0 auto; color: var(--brand); transition: transform var(--dur-1) var(--ease-1); }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-body { padding: var(--sp-2) var(--sp-3) var(--sp-3); color: var(--muted); font-size: var(--fs-13); line-height: 1.6; }
.faq .faq-body p { margin: 2px 0; }
.quickref { margin: var(--sp-3) 0 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--surface-2); counter-reset: qr; }
.quickref ol { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.quickref li { position: relative; margin: 0; padding-left: 34px; color: var(--text); font-size: var(--fs-13); line-height: 1.6; counter-increment: qr; }
.quickref li::before {
  content: counter(qr); position: absolute;
  top: 0; left: 0;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--brand); border-radius: 50%;
  color: var(--brand); font-family: var(--mono);
  font-size: 11px; font-weight: 700;
}
.guide-foot-note { margin-top: var(--sp-4); padding: var(--sp-3); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); font-size: var(--fs-12); line-height: 1.6; }
/* 指南页布局 */
.guide-quickstart { margin-top: var(--sp-4); }
.guide-quickstart h2 { font-size: var(--fs-16); font-weight: 600; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); }
.guide-article { min-width: 0; }
.guide-toc { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-1); }
.guide-toc h2, .guide-toc__title { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.guide-toc ol { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.guide-toc li { margin: 0; }
.guide-toc a { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border-radius: var(--r-full); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); text-decoration: none; white-space: nowrap; }
.guide-toc a::before { counter-increment: toc; content: counter(toc); color: var(--brand); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.guide-toc a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.guide-toc-mobile { display: none; margin: var(--sp-3) 0; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
.guide-toc-mobile summary { display: flex; align-items: center; min-height: 44px; padding: var(--sp-2) var(--sp-4); color: var(--text); font-size: var(--fs-14); font-weight: 600; cursor: pointer; list-style: none; }
.guide-toc-mobile summary::-webkit-details-marker { display: none; }
.guide-toc-mobile summary::before { content: "▸"; margin-right: 6px; color: var(--brand); }
.guide-toc-mobile[open] summary::before { transform: rotate(90deg); }
.guide-toc-mobile ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 var(--sp-4) var(--sp-3); list-style: none; }
.guide-toc-mobile a { display: inline-block; padding: 3px 10px; border-radius: var(--r-full); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); text-decoration: none; }
.guide-section { margin-top: var(--sp-4); scroll-margin-top: calc(var(--topbar-h) + var(--sp-4)); }
.guide-section:first-child { margin-top: 0; }
.guide-section > h2 { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); font-size: var(--fs-20); font-weight: 600; }
.guide-section > h2 .sec-num { color: var(--brand); font-family: var(--mono); font-size: var(--fs-16); font-weight: 700; }
.guide-section h3 { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-16); font-weight: 600; }
.sec-num { color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); font-weight: 600; }
.guide-section > p, .guide-section > ul, .guide-section > ol, .guide-section > .table-wrap, .guide-section > .callout, .guide-section > .steps, .guide-section > .faq, .guide-section > .quickref { margin-top: var(--sp-3); }
.guide-section ul, .guide-section ol { padding-left: var(--sp-5); color: var(--text); font-size: var(--fs-13); line-height: 1.65; }
.guide-section li { margin: 3px 0; }
.guide-section p { color: var(--text); font-size: var(--fs-13); line-height: 1.7; }
.guide-layout .guide-article > .guide-section:first-child { margin-top: 0; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); }
.danger-list { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.danger-list li { display: flex; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--danger); border-radius: var(--r-md); background: var(--danger-bg); color: var(--text); font-size: var(--fs-13); line-height: 1.6; }
.danger-list li::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; border-radius: 50%; background: var(--danger); color: var(--surface); font-size: 11px; font-weight: 700; }
.danger-list li strong { color: var(--danger); }

/* ==== 17) 认领页 ==== */
.claim-status { margin: var(--sp-3) 0; }
.claim-status > * + * { margin-top: var(--sp-2); }
.claim-state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
.claim-state--warn { border-color: var(--warning); background: var(--warning-bg); }
.claim-state--error { border-color: var(--danger); background: var(--danger-bg); }
.claim-state h2 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-16); font-weight: 600; }
.claim-state p { margin: 0; color: var(--text); font-size: var(--fs-13); line-height: 1.6; }
.claim-state .btn { margin-top: var(--sp-1); }
.claim-identity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-13); }
.claim-identity strong { color: var(--ink); }
/* 概览三卡 */
.claim-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0; }
.claim-overview .card { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.claim-timer, .claim-mine { display: flex; flex-direction: column; gap: var(--sp-1); }
.claim-timer-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.04em; }
.claim-timer-value { margin: 0; color: var(--ink); font-size: var(--fs-24); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.claim-timer-value.is-locked { color: var(--danger); font-size: var(--fs-20); }
.claim-timer-meta { margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.claim-mine-chips { margin: var(--sp-1) 0; }
/* 底部动作条：桌面 sticky，移动端 fixed（tabbar z70 > actionbar z60） */
.claim-actionbar, #claim-actionbar {
  position: sticky; bottom: 0;
  z-index: var(--z-toolbar); display: flex;
  flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-3);
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--sh-3);
}
.claim-selected { margin: 0; color: var(--text); font-size: var(--fs-13); }
.claim-selected strong { color: var(--ink); font-size: var(--fs-16); font-variant-numeric: tabular-nums; }
.claim-selected .note { margin: 0; }
.claim-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.claim-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.claim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
/* 可勾选任务卡 */
.claim-task { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) var(--sp-4); cursor: pointer; }
.claim-task:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.claim-task:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--sh-1); }
.claim-check { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.claim-task-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 26px; }
.claim-task-title { margin-top: 2px; color: var(--ink); font-size: var(--fs-14); font-weight: 600; line-height: 1.45; }
.claim-task-meta { color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.claim-task-owner { margin-top: auto; padding-top: var(--sp-2); border-top: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-12); }
.claim-task-owner strong { color: var(--text); }
.claim-check-mark {
  position: absolute; top: var(--sp-3);
  right: var(--sp-3); display: grid;
  place-items: center; width: 20px;
  height: 20px; border: 2px solid var(--line-strong);
  border-radius: 50%; background: var(--surface);
  color: var(--brand-fg); transition: background-color var(--dur-1) var(--ease-1), border-color var(--dur-1) var(--ease-1);
}
.claim-check-mark svg { width: 12px; height: 12px; opacity: 0; transition: opacity var(--dur-1) var(--ease-1); }
/* 选中 */
.claim-task.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--sh-1); }
.claim-task.is-selected .claim-check-mark { border-color: var(--brand); background: var(--brand); }
.claim-task.is-selected .claim-check-mark svg { opacity: 1; }
/* 我的 */
.claim-task.is-mine { border-color: var(--coral); }
.claim-task.is-mine .claim-check-mark { border-color: var(--coral); }
/* 已被他人认领 */
.claim-task.is-taken { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.claim-task.is-taken:hover { border-color: var(--line); box-shadow: none; }
.claim-task.is-taken .claim-task-title { color: var(--muted); }
.claim-task.is-taken .claim-check-mark { border-style: dashed; border-color: var(--line-strong); }
/* 禁用 / 截止锁定 */
.claim-task.is-disabled { cursor: not-allowed; opacity: 0.7; }
.claim-task.is-disabled:hover { border-color: var(--line); box-shadow: none; }
.claim-task.is-disabled .claim-check-mark, .claim-task.is-locked .claim-check-mark { border-style: dashed; border-color: var(--line-strong); }
.claim-task.is-locked { border-color: var(--danger); background: var(--danger-bg); cursor: not-allowed; }
.claim-task.is-locked .claim-task-title { color: var(--danger); }
/* 认领成功横幅 */
.claim-success, #claim-success-banner, .claim-alert {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: var(--sp-2); margin: var(--sp-3) 0 0;
  padding: var(--sp-2) var(--sp-3); border: 1px solid var(--success);
  border-left: 3px solid var(--success); border-radius: var(--r-md);
  background: var(--success-bg); color: var(--text);
  font-size: var(--fs-13);
}
.claim-success strong { color: var(--success); }
.claim-success-close { padding: 2px 6px; border: 0; background: transparent; color: var(--muted); font-size: var(--fs-16); line-height: 1; cursor: pointer; }
/* 未认领清单 / 管理员视图 */
.claim-unclaimed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-5); }
.claim-unclaimed-card { padding: var(--sp-3) var(--sp-4); border-style: dashed; border-color: var(--line-strong); background: var(--surface-2); box-shadow: none; }
.claim-unclaimed-title { margin: var(--sp-1) 0 2px; color: var(--ink); font-size: var(--fs-13); font-weight: 600; line-height: 1.45; }
.claim-unclaimed-card .claim-task-meta { margin: 0; }
.claim-admin { display: grid; gap: var(--sp-3); }
.claim-admin__head, .claim-admin-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-4); }
.claim-admin__title, .claim-admin-title { color: var(--ink); font-size: var(--fs-16); font-weight: 600; }
.claim-admin__summary, .claim-admin-summary { color: var(--muted); font-size: var(--fs-13); }
.claim-admin__note, .claim-admin-note { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.55; }
.claim-admin__table, .claim-admin-table { margin: var(--sp-3) 0; }
/* 成员认领网格（新契约，兼容表格行渲染） */
.claim-members, .claim-member-list { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0; padding: 0; list-style: none; }
.claim-member { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.claim-member__name, .claim-member-name { color: var(--ink); font-size: var(--fs-14); font-weight: 600; }
.claim-member__count, .claim-member-count { color: var(--muted); font-family: var(--mono); font-size: var(--fs-12); text-align: right; white-space: nowrap; }
.claim-member__tasks, .claim-member-tasks { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-12); }
.claim-member__status, .claim-member-status { grid-column: 2; justify-self: end; }

/* ==== 18) 旧外壳兼容层（base.css 未覆盖的旧标记；新外壳走 base 的 .topbar/.sidebar） ==== */
.site-header { position: sticky; top: 0; z-index: var(--z-topbar); border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.site-header .brand-mark { width: 30px; height: 30px; flex: 0 0 auto; border-radius: var(--r-md); }
.site-header .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-header .brand-text strong { font-size: var(--fs-14); font-weight: 700; }
.site-header .brand-text small { color: var(--muted); font-size: 11px; }
.site-header .site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-header .site-nav a { height: 32px; padding: 0 10px; }
.site-header .site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.site-header .site-nav a[aria-current="page"]::before { display: none; }
/* 旧页面主体：base 的 .container 只有横向内距 */
main.container { padding-block: var(--sp-4) var(--sp-6); }
@media (max-width: 1023px) {
  main.container { padding-bottom: calc(var(--sp-6) + var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  .site-header .site-nav {
    position: absolute; top: 100%;
    right: 0; left: 0;
    display: none; flex-direction: column;
    align-items: stretch; gap: 2px;
    padding: var(--sp-2) var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--sh-3);
  }
  .site-header.nav-open .site-nav, .app-shell.nav-open .site-header .site-nav { display: flex; }
  .site-header .site-nav a { height: 44px; padding: 0 var(--sp-3); border-radius: var(--r-md); }
}

/* ==== 19) 状态与无障碍（键盘 / 当前项 / 选中项可见状态） ==== */
[aria-current="page"]:not(a), [aria-current="step"]:not(a) { font-weight: 600; }
.pill[aria-current="true"], .chip[aria-current="true"] { border-color: var(--brand); color: var(--brand); }
.is-disabled, [aria-disabled="true"]:not(.btn) { cursor: not-allowed; opacity: 0.6; }
/* 点击反馈统一在支持 hover 的设备上提供 */
@media (hover: hover) {
  .card--interactive:active, .link-card:active, .home-kpi:active, .file-download:active { transform: translateY(0); box-shadow: var(--sh-1); }
}

/* ==== 20) 深色模式：仅覆盖少量写死的装饰色（其余跟随 base.css 变量） ==== */
[data-theme="dark"] .hero { --c-hero-panel: rgba(2, 10, 18, 0.45); --c-hero-panel-hover: rgba(2, 10, 18, 0.62); }
[data-theme="dark"] .figure-scroll { background: var(--surface); }
[data-theme="dark"] .figure-scroll img { background: var(--surface); }
[data-theme="dark"] .stat-card::before { opacity: 0.7; }
[data-theme="dark"] .hero-synapse .node { fill: var(--n-900); }

/* ==== 21) 响应式：≥1024 / ≤1199 / ≤1023 / ≤760 / ≤480 ==== */
@media (min-width: 1024px) {
  .guide-layout { grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: var(--sp-6); }
  .guide-toc { position: sticky; top: calc(var(--topbar-h) + var(--sp-4)); }
  .guide-toc ol { flex-direction: column; }
  .guide-toc a { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 0 8px; border-radius: var(--r-md); background: transparent; }
  .guide-toc a:hover { background: var(--surface-2); }
}

@media (max-width: 1199px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
  .hero-panel { max-width: 34rem; }
  .gantt-card { --c-gantt-label: 8rem; }
}

@media (max-width: 1023px) {
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: var(--fs-24); }
  .claim-actionbar, #claim-actionbar {
    position: fixed; right: 0;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); left: 0;
    z-index: var(--z-drawer); margin: 0;
    padding: var(--sp-2) var(--sp-3); border-right: 0;
    border-bottom: 0; border-left: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  body[data-page="claim"] .page, body[data-page="claim"] main.container { padding-bottom: calc(var(--tabbar-h) + 88px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-3)); }
  .claim-actions .btn, .claim-toolbar .btn { min-height: 44px; }
  .guide-layout { gap: var(--sp-3); }
  .guide-toc { display: none; }
  .guide-toc-mobile { display: block; }
  .claim-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .claim-mine { grid-column: 1 / -1; }
  .file-downloads { grid-template-columns: minmax(0, 1fr); }
  .plan-status { grid-template-columns: minmax(0, 1fr); }
  .file-hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .btn, .btn--sm { --c-btn-h: 40px; }
  .btn--sm { font-size: var(--fs-13); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .home-kpis { gap: var(--sp-2); }
  .stat-card { padding: var(--sp-3); }
  .stat-value { font-size: var(--fs-24); }
  .section { margin-top: var(--sp-5); }
  .section-head, .section__head { align-items: flex-start; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-3); }
  .section-head h2, .section__head h2 { font-size: var(--fs-16); }
  .section__actions, .section-head__actions { width: 100%; margin-left: 0; }
  .section__actions .btn { flex: 1 1 auto; }
  /* 时间线：节点缩小、日期换行 */
  :is(.milestone, .timeline__item, .timeline-item) { padding-left: calc(28px + var(--sp-3)); padding-bottom: var(--sp-3); }
  :is(.milestone, .timeline__item, .timeline-item)::before { top: 32px; left: 13px; }
  :is(.milestone-marker, .timeline__marker, .timeline-marker) { width: 28px; height: 28px; font-size: 10px; }
  :is(.milestone-body, .timeline__body, .timeline-body) { padding: var(--sp-2) var(--sp-3); }
  :is(.milestone-date, .timeline__time, .timeline-time) { width: 100%; margin-left: 0; }
  .updates li { flex-direction: column; gap: 2px; }
  .updates time { flex: none; }
  /* 卡片内距收紧 */
  .card,
  .kpi,
  .stat-card,
  .phase-card,
  .member-card,
  .week-card,
  .gate-card,
  .deliverable-card,
  .link-card,
  .claim-unclaimed-card,
  .guide-section,
  .gantt-card,
  .figure,
  .plan-status-cell,
  .home-kpi,
  .claim-state,
  .claim-identity,
  .file-hero,
  .file-download {
    --c-card-pad: 16px;
  }
  .deliverable-meta > div { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .owner-dist li { grid-template-columns: 4.6rem minmax(0, 1fr) auto; }
  /* 表格：收紧内距 + 提示 + 首列 sticky 默认关闭时仍保证可读 */
  th, td { padding: 8px 10px; }
  tbody td { font-size: var(--fs-12); }
  table, .table { min-width: 520px; }
  /* 宽表（交付表）：手机端降为 760px，缩短横向滑动距离并减少「交付物」单元格折行 */
  .table-wrap > table.table--wide { min-width: 760px; }
  .table-hint { display: block; margin: 0 0 var(--sp-2); }
  /* ≤760 由 app.js addTableHints() 在真实溢出时注入提示；静态提示隐藏，避免重复 */
  .table-hint--scroll { display: none; }
  .table-wrap { margin: var(--sp-3) 0; border-radius: var(--r-lg); }
  .table-wrap--sticky-first table th:first-child, .table-wrap--sticky-first table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .table-wrap--sticky-first thead th:first-child { z-index: 3; background: var(--surface-2); }
  /* 工具栏纵向；吸顶工具栏在移动端（≤760）取消吸顶，避免遮挡内容 */
  .toolbar { flex-direction: column; align-items: stretch; gap: var(--sp-2); padding: var(--sp-2); }
  .toolbar--sticky { position: static; }
  .segmented, .filter { width: 100%; }
  .segmented button, .filter button { flex: 1 1 auto; }
  .view-switch { align-self: flex-start; }
  .segmented button, .filter button, .view-switch button { min-height: 36px; }
  /* 甘特：标签换行、进度条全宽 */
  .gantt-axis { display: none; }
  .gantt-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 2px 0; }
  .gantt-label { white-space: normal; }
  .gantt-today, .gantt-today-label { display: none; }
  .gantt-bar { font-size: 10px; }
  /* 首屏紧凑 */
  .hero { padding: var(--sp-5) var(--sp-4); gap: var(--sp-4); }
  .hero::after { opacity: 0.3; }
  .hero-title { font-size: clamp(2.2rem, 12vw, 2.9rem); }
  .hero-lede { display: none; }
  .hero-more { display: block; }
  .hero-synapse { display: none; }
  .hero-actions { margin-top: var(--sp-3); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-who { margin-top: var(--sp-2); }
  .hero-panel { padding: var(--sp-3); }
  .hero-panel-value { font-size: var(--fs-32); }
  .hero-panel .pulse-rail, .hero-panel-foot { display: none; }
  .guide-hero h1 { font-size: var(--fs-24); }
  .guide-meta { flex-direction: column; gap: 2px; }
  .claim-overview { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .claim-mine { grid-column: auto; }
  .claim-timer-value { font-size: var(--fs-20); }
  .claim-actionbar, #claim-actionbar { flex-direction: column; align-items: stretch; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom)); }
  .claim-actions .btn { flex: 1 1 auto; }
  .claim-selected { font-size: var(--fs-12); }
  .claim-grid { gap: var(--sp-2); }
  .claim-unclaimed { grid-template-columns: minmax(0, 1fr); }
  .week-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .week-dates { text-align: left; }
  .figure { padding: var(--sp-2); }
  .figure-scroll img { min-width: 560px; }
  .figure-toolbar .note { display: none; }
  .plan-gantt-mobile { display: inline-flex; }
  .plan-materials-body .figure-scroll { display: none; }
  .file-tree { padding: var(--sp-2); }
  .check-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv-table td:first-child { width: auto; }
}

@media (max-width: 480px) {
  .stats { gap: var(--sp-2); }
  .stat-value { font-size: var(--fs-20); }
  .stat-icon { width: 32px; height: 32px; }
  .home-kpi-value { font-size: var(--fs-20); }
  .hero-title { font-size: 2.1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-meta li { font-size: 11px; }
  .segmented button, .filter button { padding: 0 var(--sp-2); font-size: var(--fs-12); }
  .segmented .count { display: none; }
  .guide-toc-mobile a { font-size: 11px; }
  .d-id { font-size: 11px; }
  .pill { padding: 0 8px; }
  .week-ms { gap: 2px; }
  .task-mini-list { grid-template-columns: minmax(0, 1fr); }
  .owner-dist li { grid-template-columns: 4.2rem minmax(0, 1fr) auto; }
  .file-download { padding: var(--sp-2) var(--sp-3); }
  .gantt-track { height: 20px; }
  .gantt-bar { top: 3px; bottom: 3px; padding: 0 5px; }
}

/* ==== 22) 打印：卡片去阴影、表格出边框、隐藏所有动作/筛选/导航性组件 ==== */
@media print {
  .card,
  .kpi,
  .stat-card,
  .phase-card,
  .member-card,
  .week-card,
  .gate-card,
  .deliverable-card,
  .link-card,
  .claim-unclaimed-card,
  .claim-task,
  .guide-section,
  .gantt-card,
  .figure,
  .plan-status-cell,
  .home-kpi,
  .claim-state,
  .claim-identity,
  .file-hero,
  .file-download,
  .callout,
  .table-wrap,
  .task-details,
  .claim-rules-details {
    border-color: var(--line-strong); box-shadow: none !important;
    break-inside: avoid;
  }
  .section, .guide-section, .timeline, .milestones { break-inside: auto; }
  h2, h3, .section-head, .section__head { break-after: avoid; }
  tr, .figure-scroll img { break-inside: avoid; }
  /* 隐藏交互/导航性组件 */
  .toolbar,
  .segmented,
  .filter,
  .view-switch,
  .table-toolbar,
  .claim-toolbar,
  .claim-actionbar,
  #claim-actionbar,
  .claim-actions,
  .claim-check-mark,
  .pager,
  .table-hint,
  .guide-toc,
  .guide-toc-mobile,
  .figure-toolbar .btn,
  .hero-actions,
  .hero-more,
  .guide-actions,
  .hero-synapse,
  .toast,
  .skeleton,
  .skeleton::after,
  .loading::before,
  .claim-success-close,
  .btn {
    display: none !important;
  }
  /* 指南页：目录与筛选全部去掉，正文连续排 */
  .guide-layout { display: block; }
  .guide-toc { display: none !important; }
  /* 表格：恢复完整宽度与边框 */
  .table-wrap { overflow: visible; border: 1px solid var(--line-strong); background: var(--surface); }
  table, .table { min-width: 0; font-size: 9pt; }
  /* 打印时宽表不再强制 1040px，避免 A4 页面裁切 */
  .table-wrap > table.table--wide { min-width: 0; }
  thead th { position: static; background: transparent !important; border-bottom: 1px solid var(--line-strong); }
  th, td { border-bottom: 1px solid var(--line); }
  /* 折叠内容在打印时展开 */
  .faq details:not([open]) .faq-body, .task-details:not([open]) > .task-mini-list, .claim-rules-details:not([open]) > ul, .home-status:not([open]) > .home-status-body { display: block; }
  .faq summary::before, .task-details > summary::before, .claim-rules-details > summary::before { display: none; }
  /* 深色首屏转白底黑字 */
  .hero, .guide-hero { padding: 0 0 var(--sp-3); border: 1px solid var(--line-strong); background: transparent !important; color: var(--text) !important; box-shadow: none !important; }
  .hero::before, .hero::after, .guide-hero::after { display: none !important; }
  .hero *, .guide-hero * { color: var(--text) !important; -webkit-text-fill-color: currentColor !important; background-color: transparent !important; background-image: none !important; box-shadow: none !important; }
  .hero-title, .hero-title .hero-5, .guide-hero h1 { color: var(--ink) !important; }
  .pill, .chip, .owner-chip, .claim-chip, .d-id { border: 1px solid var(--line-strong) !important; background: transparent !important; color: var(--ink) !important; }
  .pill::before { background: currentColor !important; }
  .gantt-body::before, .gantt-track { background-image: none !important; background-color: var(--surface-3) !important; }
  .gantt-today { display: none; }
  .claim-task.is-taken, .claim-task.is-disabled { opacity: 1; background: var(--surface) !important; }
  a { color: var(--ink); text-decoration: underline; }
}

/* ==== 23) 减少动效 / 高对比 ==== */
@media (prefers-reduced-motion: reduce) {
  .skeleton::after, .loading::before, .btn.is-loading::after { animation: none; }
  .skeleton::after { background: transparent; }
  .hero::after { display: none; }
}

@media (prefers-contrast: more) {
  .pill--todo, .pill--upcoming, .pill--neutral, .chip, .owner-chip { border-color: var(--line-strong); color: var(--text); }
  .table-wrap { border-color: var(--line-strong); }
  th, td { border-bottom-color: var(--line-strong); }
}

/* ============================ 31) 登录页 ============================ */
.login-body {
  background:
    radial-gradient(1200px 420px at 18% -10%, var(--brand-soft), transparent 60%),
    var(--bg);
}

.login-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--sp-4);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 0;
  overflow: hidden;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-5) var(--sp-5) 0;
}

.login-brand strong {
  font-size: var(--fs-16);
  font-weight: 700;
}

.login-brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.login-title {
  margin: 0 0 4px;
  font-size: var(--fs-24);
}

.login-desc {
  margin: 0 0 var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-13);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.login-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form .input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-14);
}

.login-form .input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.login-note {
  margin-top: var(--sp-4);
}

.login-footer {
  margin-top: var(--sp-4);
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  border-top: 1px solid var(--line);
}

.login-foot-note {
  color: var(--muted);
  font-size: 11.5px;
}

/* ============================ 32) 登录页 v2 / 登出表单 ============================ */
.logout-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.login-card {
  width: 100%;
  max-width: 880px;
  padding: 0;
  overflow: hidden;
}

.login-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.login-aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(61, 214, 198, 0.16), transparent 70%),
    linear-gradient(160deg, #0b3e5c 0%, #0d5a6a 60%, #0c6b78 100%);
  color: #eaf6f8;
}

.login-aside .login-brand {
  padding: 0;
}

.login-aside .brand-text small,
.login-aside small {
  color: rgba(234, 246, 248, 0.72);
}

.login-aside-title {
  margin: 0;
  font-size: var(--fs-16);
  font-weight: 650;
  color: #ffffff;
}

.login-aside-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--fs-13);
  color: rgba(234, 246, 248, 0.88);
}

.login-aside-list li {
  position: relative;
  padding-left: 18px;
}

.login-aside-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3dd6c6;
}

.login-aside-foot {
  margin: auto 0 0;
  font-size: 11px;
  color: rgba(234, 246, 248, 0.55);
  letter-spacing: 0.06em;
}

.login-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
}

.login-main-head {
  margin-bottom: var(--sp-1);
}

.login-help {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-12);
}

.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap .input {
  width: 100%;
  padding-right: 58px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--muted);
  font-size: var(--fs-12);
}

.pw-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.login-submit {
  margin-top: var(--sp-2);
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.login-foot-note {
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 760px) {
  .login-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-aside {
    padding: var(--sp-4) var(--sp-5);
    gap: var(--sp-2);
  }

  .login-aside-list,
  .login-aside-foot,
  .login-aside-title {
    display: none;
  }

  .login-main {
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
  }
}

/* 登录页 v2 微调：底栏与密码显隐 */
.login-card .login-foot {
  padding: 10px 20px;
}

.login-foot .login-foot-note {
  flex: 1 1 auto;
  min-width: 0;
}

.login-foot .theme-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.pw-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
}

.pw-toggle:hover {
  background: var(--surface-3);
  color: var(--ink);
  border-radius: var(--r-sm);
}

.login-aside .login-brand strong {
  color: #ffffff;
}

/* ============================ 33) 文件页（我的空间 / 共享区） ============================ */
.fm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.fm-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: var(--fs-13);
  min-height: 24px;
}

.fm-crumb {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

.fm-crumb:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.fm-crumb--current {
  color: var(--ink);
  font-weight: 600;
}

.fm-crumb-sep {
  color: var(--line-strong);
}

.fm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.fm-mkdir-form {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.fm-mkdir-form .input {
  max-width: 260px;
}

.fm-status {
  margin: 0;
  padding: var(--sp-2) var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-12);
}

.fm-status--error {
  color: var(--danger, #b3261e);
}

.fm-table-wrap {
  overflow-x: auto;
}

.fm-table {
  width: 100%;
  border-collapse: collapse;
}

.fm-table th,
.fm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: var(--fs-13);
}

.fm-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: var(--fs-12);
  white-space: nowrap;
}

.fm-table tbody tr:hover {
  background: var(--surface-2);
}

.fm-icon {
  display: inline-block;
  width: 18px;
  color: var(--brand);
  font-size: 12px;
}

.fm-row--dir .fm-icon {
  color: var(--amber, #b26a00);
}

.fm-dir {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
}

.fm-dir:hover {
  color: var(--brand-strong);
}

.fm-size,
.fm-time {
  color: var(--muted);
  white-space: nowrap;
}

.fm-actions-head,
.fm-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.fm-empty {
  margin: 0;
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--muted);
}

.fm-quota {
  margin: 0;
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
}

@media (max-width: 640px) {
  .fm-toolbar {
    padding: var(--sp-2) var(--sp-3);
  }

  .fm-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .fm-table th:nth-child(2),
  .fm-table td:nth-child(2),
  .fm-table th:nth-child(3),
  .fm-table td:nth-child(3) {
    display: none;
  }
}

/* ============================ 34) 预览/分享弹窗 ============================ */
.fm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 26, 36, 0.55);
}

.fm-modal[hidden] {
  display: none;
}

.fm-modal__box {
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(6, 24, 34, 0.35);
}

.fm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.fm-modal__body {
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fm-preview-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
}

.fm-preview-frame {
  width: 100%;
  height: 70vh;
  border: 0;
}

.fm-preview-text {
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.fm-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fm-share-row .input {
  flex: 1;
  min-width: 0;
}

/* ============================ 35) 首页我的任务 ============================ */
.home-tasks {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-task {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.home-task.is-done {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.home-task__id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 650;
  font-size: var(--fs-12);
}

.home-task__name {
  flex: 1 1 240px;
  min-width: 0;
  font-size: var(--fs-13);
  color: var(--ink);
}

.home-task__due {
  white-space: nowrap;
}

.home-task .btn {
  margin-left: auto;
}

/* ============================ 36) 按人任务量（计划页） ============================ */
.owner-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--sp-2) 0 var(--sp-4);
}

.owner-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-13);
}

.owner-summary__item.is-lead {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.owner-summary__item strong {
  font-weight: 650;
}

/* ============================ 37) 全部工作包：我的任务高亮 ============================ */
.table tbody tr.is-mine-row td {
  background: color-mix(in srgb, var(--brand-soft) 55%, transparent);
}

/* 管理员成员预览下拉 */
.view-as-select {
  height: 30px;
  max-width: 150px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-12);
  appearance: none;
}

/* 管理后台：项目资料表单 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.form-grid .input,
.form-grid textarea {
  width: 100%;
}

.form-grid textarea {
  grid-column: 1 / -1;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-13);
}

.risk-input {
  width: 100%;
  min-width: 220px;
}

/* API 令牌展示框 */
.token-box {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--brand);
  border-radius: var(--r-md);
  background: var(--brand-soft);
}

.token-box .callout-title {
  margin: 0 0 8px;
}

.token-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.token-row .input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
}

/* 发布申请 */
.fm-requests {
  padding: 0 var(--sp-4) var(--sp-3);
}

.fm-requests__title {
  margin: 0 0 6px;
}
