/* domains/git/core-operations.css */
/* Git core operations module：Git 专区（commit / branch / merge / pull / push / clone） */

/* ---- 提交 Commit ---- */
.commit-anat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.commit-hash { color: #b45309; }
.commit-msg { color: var(--text); font-weight: 600; }
.commit-meta { color: var(--text-3); font-size: 12px; }

/* ---- 分支 Branch（branch / merge 共用的分支图：圆点 + 连线） ---- */
.branch-graph { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.branch-row { display: flex; align-items: center; min-width: 0; }
.branch-tag { flex: none; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--brand-light); color: var(--brand); margin-right: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.branch-tag.green { background: #dcfce7; color: #15803d; }
.branch-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.branch-dot.green { background: #22c55e; box-shadow: 0 0 0 2px #dcfce7; }
.branch-dot.red { background: var(--red); box-shadow: 0 0 0 2px var(--red-light); }
.branch-dot.merge { background: #a855f7; box-shadow: 0 0 0 3px #f3e8ff; }
.branch-link { flex: 1; min-width: 6px; max-width: 26px; height: 2px; background: var(--border); }
.branch-pad { flex: none; }
.branch-note { font-size: 12px; color: var(--text-3); }
.branch-head { align-self: flex-start; font-size: 12px; color: #a855f7; border: 1px dashed #a855f7; border-radius: 4px; padding: 1px 6px; }

/* ---- 合并 Merge（冲突文件标记） ---- */
.merge-cf { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; display: flex; flex-direction: column; width: 100%; text-align: left; }
.merge-cf > span { display: block; padding: 3px 10px; }
.merge-cf-mark { color: #b45309; background: #fffbeb; }
.merge-cf-yours { color: #15803d; background: #f0fdf4; }
.merge-cf-sep { color: var(--text-3); background: var(--bg-soft); }
.merge-cf-theirs { color: #1d4ed8; background: #eff6ff; }

/* ---- 推送 Push ---- */
.push-anat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.push-cmd { color: #b45309; }
.push-origin { color: #7c3aed; }
.push-branch { color: #15803d; }

/* ---- 克隆 Clone ---- */
.clone-demo { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.clone-gh { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.clone-code-btn { display: inline-block; background: #1f883d; color: #fff; font-size: 12px; border-radius: 6px; padding: 4px 12px; font-weight: 600; }
.clone-drop { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
.clone-drop-tabs { display: flex; gap: 10px; padding: 7px 10px 0; border-bottom: 1px solid var(--border-light); font-size: 12px; color: var(--text-3); }
.clone-drop-tabs b { color: var(--text); border-bottom: 2px solid #fd8c73; padding-bottom: 5px; font-weight: 600; }
.clone-url-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.clone-url { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; color: var(--text-2); background: var(--bg-soft); border: 1px solid var(--border-light); border-radius: 5px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clone-copy { flex: none; font-size: 12px; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 3px 7px; }
.clone-arrow { align-self: center; color: var(--text-3); font-size: 12px; }
.clone-anat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 1px; flex-wrap: wrap; width: 100%; }
.clone-proto { color: var(--text-3); }
.clone-host { color: #7c3aed; }
.clone-user { color: #b45309; }
.clone-repo { color: var(--brand); font-weight: 600; }

/* domains/git/collaboration.css */
/* Git collaboration module：pull-request / worktree / stash / gitignore / diff */

/* ---- Pull Request 合并请求 ---- */
.pr-demo { display: flex; flex-direction: column; gap: 8px; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pr-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--border-light); }
.pr-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.pr-num { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.pr-badge { flex: none; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: #1f883d; color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.pr-badge.merged { background: #8250df; }
.pr-branch { display: flex; align-items: center; gap: 5px; padding: 8px 11px; font-size:12px; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pr-branch b { background: var(--brand-light); color: var(--brand); border-radius: 4px; padding: 1px 7px; font-weight: 500; }
.pr-merge { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-top: 1px solid var(--border-light); background: var(--bg-soft); }
.pr-merge-ok { font-size: 12px; color: #1a7f37; flex: 1; }
.pr-merge-btn { flex: none; font-size: 12px; font-weight: 600; color: #fff; background: #1f883d; border-radius: 6px; padding: 5px 12px; }
.pr-anat { display: flex; flex-direction: column; gap: 8px; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pr-tabs { display: flex; gap: 2px; padding: 0 11px; border-bottom: 1px solid var(--border-light); }
.pr-tab { font-size:12px; color: var(--text-3); padding: 6px 9px; border-bottom: 2px solid transparent; }
.pr-tab.on { color: var(--text); font-weight: 600; border-color: #fd8c73; }

/* ---- Worktree 工作树 ---- */
.wt-demo { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.wt-dirs { display: flex; align-items: stretch; gap: 7px; width: 100%; }
.wt-dir { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.wt-dir-name { font-size: 12px; font-weight: 600; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wt-dir-branch { font-size:12px; color: var(--brand); background: var(--brand-light); border-radius: 4px; padding: 1px 6px; align-self: flex-start; }
.wt-dir-note { font-size:12px; color: var(--text-3); line-height: 1.4; }
.wt-arr { align-self: center; flex: none; font-size: 12px; color: var(--text-3); }
.wt-repo { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-2); background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 8px; padding: 6px 10px; }
.wt-anat { display: flex; flex-direction: column; gap: 7px; width: 100%; align-items: center; }
.wt-anat-dirs { display: flex; align-items: stretch; gap: 7px; width: 100%; }

/* ---- Stash 贮藏 ---- */
.stash-demo { display: flex; align-items: center; gap: 8px; width: 100%; }
.stash-box { flex: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.stash-box b { font-size:12px; color: var(--text); }
.stash-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stash-item { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.stash-item b { color: var(--brand); font-weight: 600; }
.stash-item.top { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.stash-arr { flex: none; font-size:12px; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---- .gitignore 忽略文件 ---- */
.gitignore-demo { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.gitignore-file { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; color: var(--text); }
.gitignore-tag { font-size: 12px; color: var(--text-3); letter-spacing: .3px; font-family: inherit; }
.gitignore-file i { color: var(--text-3); font-style: normal; font-size:12px; }
.gitignore-shield { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size:12px; color: #16a34a; text-align: center; max-width: 74px; }
.gitignore-anat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text); }
.gitignore-anat .gi-c { color: var(--text-3); font-size: 12px; margin-left: 10px; font-family: -apple-system, "PingFang SC", sans-serif; }

/* ---- Diff 差异对比 ---- */
.diff-demo { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; line-height: 1.6; }
.diff-f { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-soft); border-bottom: 1px solid var(--border-light); color: var(--text-2); font-size: 12px; }
.diff-f b { color: var(--text); font-weight: 600; }
.diff-stat { font-size:12px; }
.diff-stat .a { color: #1a7f37; }
.diff-stat .d { color: #d1242f; }
.diff-line { display: block; padding: 1px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diff-add { background: #dafbe1; color: #1a7f37; }
.diff-del { background: #ffebe9; color: #d1242f; }
.diff-ctx { color: var(--text-3); }
.diff-hunk { background: #ddf4ff; color: #57606a; }
.diff-anat { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; line-height: 1.7; }
.diff-anat .diff-line { padding: 2px 12px; }

/* domains/git/diagram-kit.css */
/* Git 专区 · 统一图示语言（diagram kit）
   列表预览 demo 与详情 demoDetail 共用同一套 class：
   - 预览只放一张主图（流水线或分支图），不放命令条和注解
   - 详情 = 主图 + .gd-cmd 命令条 + .gd-note 人话注解
   颜色语义：brand 蓝 = 主线/当前动作，green = 分支/成功，red = 问题，灰 = 未参与 */

.gd { display: flex; flex-direction: column; gap: 10px; width: 100%; }

/* ---- 四段流水线：工作区 → 暂存区 → 本地仓库 → 远程仓库 ---- */
.gd-flow { display: flex; align-items: stretch; gap: 4px; width: 100%; }
.gd-stage {
  flex: 1 1 0; min-width: 0;
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 6px 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-align: center;
}
.gd-stage b { font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.gd-stage small { font-size: 11px; color: var(--text-3); line-height: 1.35; }
.gd-stage.on { border-color: var(--brand); background: var(--brand-light); }
.gd-stage.on b { color: var(--brand); }
.gd-stage.on small { color: color-mix(in srgb, var(--brand) 70%, var(--text-3)); }
.gd-stage.green { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); background: var(--green-light); }
.gd-stage.green b { color: color-mix(in srgb, var(--green) 80%, #000); }
.gd-stage.dim { opacity: .45; }
/* 存档点：本地/远程仓库里的一排小圆点 */
.gd-dots { display: flex; gap: 4px; margin-top: 2px; }
.gd-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.gd-dots i.on { background: var(--brand); }
.gd-dots i.new { background: var(--green); box-shadow: 0 0 0 2px var(--green-light); }

.gd-arrow {
  flex: none; align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: var(--border); font-size: 13px; line-height: 1.15;
}
.gd-arrow code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px; color: var(--text-3); white-space: nowrap;
}
.gd-arrow.on { color: var(--brand); font-weight: 700; }
.gd-arrow.on code { color: var(--brand); }
.gd-arrow.green { color: var(--green); font-weight: 700; }
.gd-arrow.green code { color: color-mix(in srgb, var(--green) 80%, #000); }

/* ---- 分支图：每条 lane 一条线，圆点是存档 ---- */
.gd-lanes { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.gd-lane { display: flex; align-items: center; gap: 0; }
.gd-tag {
  flex: none; margin-right: 8px;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--brand); background: var(--brand-light);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}
.gd-tag.green { color: color-mix(in srgb, var(--green) 80%, #000); background: var(--green-light); border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.gd-tag.gray { color: var(--text-3); background: var(--bg-soft); border-color: var(--border-light); }
.gd-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.gd-dot.green { background: var(--green); }
.gd-dot.purple { background: #7c5ce0; }
.gd-dot.red { background: var(--red); }
.gd-dot.hollow { background: #fff; border: 2px solid var(--border); }
.gd-dot.merge { width: 12px; height: 12px; background: #7c5ce0; box-shadow: 0 0 0 3px color-mix(in srgb, #7c5ce0 18%, transparent); }
.gd-link { flex: 1 1 0; min-width: 10px; height: 2px; background: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.gd-link.green { background: color-mix(in srgb, var(--green) 45%, var(--border)); }
.gd-link.dashed { background: repeating-linear-gradient(90deg, var(--border) 0 5px, transparent 5px 9px); }
.gd-pad { flex: none; }

/* ---- 命令条：深色终端一行，只放最关键的那条命令 ---- */
.gd-cmd {
  background: #1f2430; border-radius: 8px;
  padding: 8px 12px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #d7dae0; white-space: nowrap; overflow-x: auto;
}
.gd-cmd b { color: #8b93a5; font-weight: 400; margin-right: 6px; }
.gd-cmd .hl { color: #7ee787; }

/* ---- 人话注解：详情图下方一行，加粗处给结论 ---- */
.gd-note { font-size: 12.5px; line-height: 1.65; color: var(--text-2); }
.gd-note b { color: var(--text); font-weight: 650; }
.gd-note .bad { color: var(--red); font-weight: 650; }

/* ---- 两栏对比（diff / before-after 用） ---- */
.gd-cols { display: flex; gap: 8px; width: 100%; }
.gd-col {
  flex: 1 1 0; min-width: 0;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 4px;
}
.gd-col > b { font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.gd-col small { font-size: 11px; color: var(--text-3); line-height: 1.5; }
.gd-col.on { border-color: var(--brand); background: var(--brand-light); }
.gd-col.green { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); background: var(--green-light); }
.gd-col.red { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: var(--red-light); }

/* 详情页演示容器里让图示居中且不被拉得过宽 */
.detail-hero .gd, .dh-demo-inner .gd { max-width: 560px; margin: 0 auto; }

/* ---- 2026 Git story visuals -------------------------------------------------
   One visual sentence per card. Chinese action/result copy leads; commands sit
   in a quiet secondary row on detail pages. */
.git-story {
  --git-ink: #24292f;
  --git-blue: #3867e8;
  --git-blue-soft: #eef3ff;
  --git-green: #1f9d55;
  --git-green-soft: #edf9f1;
  --git-purple: #8250df;
  width: min(100%, 650px);
  color: var(--git-ink);
}
.git-story-main { width: 100%; }
.git-story.is-card { min-height: 104px; display: grid; place-items: center; }
.git-story.is-detail { display: grid; gap: 24px; }
.git-story.is-detail .git-story-main {
  min-height: 152px; display: grid; align-items: center;
  padding: 20px 22px; border: 1px solid #e8ebf0; border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  box-shadow: 0 1px 0 rgba(27,31,36,.03);
}
.git-story-answer {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: 16px;
  padding-top: 18px; border-top: 1px solid var(--border-light);
}
.git-command {
  display: inline-flex; align-items: center; min-height: 28px; max-width: 100%;
  padding: 5px 9px; border: 1px solid #dfe3e8; border-radius: 7px;
  color: #57606a; background: #f6f8fa;
  font: 600 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.git-story-answer p { margin: 1px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.75; }

.git-simple-flow,
.git-transfer-visual,
.git-review-visual {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%;
}
.git-motion {
  flex: 0 0 auto; min-width: 72px;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label arrow" "term arrow";
  align-items: center; column-gap: 8px; text-align: right;
}
.git-motion span { grid-area: label; color: var(--text-2); font-size: 11px; line-height: 1.3; white-space: nowrap; }
.git-motion small { grid-area: term; color: #8c959f; font: 600 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.git-motion i { grid-area: arrow; color: var(--git-blue); font-size: 18px; font-style: normal; }

.git-file-card,
.git-repo-card,
.git-folder-card,
.git-device-card,
.git-version-card {
  flex: 1 1 0; min-width: 0; min-height: 72px;
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid #dfe3e8; border-radius: 11px; background: #fff;
}
.git-file-card > span:last-child,
.git-repo-card > span:last-child,
.git-folder-card > span:last-child,
.git-device-card > span:last-child,
.git-version-card > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.git-file-card b,
.git-repo-card b,
.git-folder-card b,
.git-device-card b,
.git-version-card b { overflow: hidden; color: var(--git-ink); font-size: 12px; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.git-file-card small,
.git-repo-card small,
.git-folder-card small,
.git-device-card small,
.git-version-card small { color: #8c959f; font-size: 10.5px; line-height: 1.4; }
.git-file-card.is-change { border-color: #f0c36a; background: #fffbeb; }
.git-file-card.is-change small { color: #9a6700; }
.git-file-mark {
  position: relative; flex: 0 0 auto; width: 28px; height: 34px;
  border: 1.5px solid #8c959f; border-radius: 5px; background: #fff;
}
.git-file-mark::before { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 1.5px; background: #afb8c1; box-shadow: 0 6px 0 #d0d7de, 0 12px 0 #d0d7de; }
.git-file-mark::after { content: ""; position: absolute; right: -1.5px; top: -1.5px; width: 8px; height: 8px; border-left: 1.5px solid #8c959f; border-bottom: 1.5px solid #8c959f; border-radius: 0 4px 0 3px; background: #f6f8fa; }

.git-version-card { position: relative; border-color: #dfe3e8; background: #fff; }
.git-version-card.is-new { border-color: #d0d7de; background: #f6f8fa; box-shadow: none; }
.git-version-check {
  flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 50%; color: #fff; background: var(--git-blue); font-size: 14px; font-weight: 700;
}
.git-version-dots { flex: 0 0 auto; display: flex; align-items: center; gap: 0; }
.git-version-dots i { position: relative; width: 17px; height: 2px; background: #b9c3cf; }
.git-version-dots i::before { content: ""; position: absolute; left: -1px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: #8c959f; transform: translateY(-50%); }
.git-version-dots i:last-child { width: 7px; }
.git-version-dots i.is-current::before { width: 8px; height: 8px; background: var(--git-green); box-shadow: 0 0 0 3px var(--git-green-soft); }
.git-story--git .git-version-card .git-version-dots,
.git-story--commit .git-version-card .git-version-dots { display: none; }

.git-history-preview { width: min(100%, 360px); display: grid; gap: 13px; }
.git-history-preview > span { color: #57606a; font-size: 10.5px; font-weight: 650; }
.git-history-preview > div { display: flex; align-items: center; padding-inline: 4px; }
.git-history-preview > div i { flex: 0 0 auto; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--git-blue); box-shadow: 0 0 0 2px var(--git-blue); }
.git-history-preview > div i.is-current { width: 13px; height: 13px; background: var(--git-green); box-shadow: 0 0 0 2px var(--git-green), 0 0 0 6px var(--git-green-soft); }
.git-history-preview > div b { flex: 1; height: 3px; background: linear-gradient(90deg, #89a3ed, #b8c5ea); }
.git-history-preview > small { display: flex; justify-content: space-between; color: #8c959f; font-size: 9.5px; }

.git-repo-card.is-cloud { border-color: #c7d1df; background: #f6f8fa; }
.git-repo-card.is-success { border-color: #d0d7de; background: #f6f8fa; }
.git-repo-icon { flex: 0 0 auto; width: 34px; height: 29px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 5px; border: 1.5px solid #57606a; border-radius: 8px; background: #fff; }
.git-repo-icon i { width: 5px; height: 5px; border-radius: 50%; background: #57606a; }
.git-repo-icon i:last-child { background: var(--git-green); }

.git-device-card { background: #fff; }
.git-device-screen { flex: 0 0 auto; width: 48px; height: 34px; display: grid; place-items: center; border: 1.5px solid #57606a; border-radius: 5px; background: #f6f8fa; }
.git-device-screen::after { content: ""; width: 24px; height: 3px; border-radius: 3px; background: #afb8c1; transform: translateY(14px); }
.git-device-screen .git-version-dots { transform: translateY(3px); }
.git-device-screen .git-version-dots i { width: 10px; }

.git-folder-icon { position: relative; flex: 0 0 auto; width: 39px; height: 28px; border: 1.5px solid #6e7781; border-radius: 5px; background: #f6f8fa; }
.git-folder-icon::before { content: ""; position: absolute; left: 3px; top: -6px; width: 17px; height: 7px; border: 1.5px solid #6e7781; border-bottom: 0; border-radius: 4px 4px 0 0; background: #f6f8fa; }
.git-folder-card.is-green { border-color: #d0d7de; background: #f6f8fa; }

/* Branch and merge keep Git's recognizable graph, but label it in plain Chinese. */
.git-branch-visual { position: relative; width: min(100%, 510px); padding: 2px 6px 0 92px; }
.git-branch-caption { position: absolute; left: 0; top: -1px; display: grid; gap: 1px; }
.git-branch-caption.is-feature { top: 67px; }
.git-branch-caption span { color: var(--git-blue); font-size: 11px; font-weight: 650; }
.git-branch-caption.is-feature span { color: var(--git-green); }
.git-branch-caption small { color: #8c959f; font-size: 9.5px; }
.git-branch-lane { height: 32px; display: flex; align-items: center; }
.git-branch-lane i { position: relative; z-index: 1; flex: 0 0 auto; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--git-blue); box-shadow: 0 0 0 2px var(--git-blue); }
.git-branch-lane b { flex: 1 1 0; height: 3px; background: #94aaf1; }
.git-branch-lane.is-feature { width: 62%; margin: 34px 0 0 38%; }
.git-branch-lane.is-feature i { background: var(--git-green); box-shadow: 0 0 0 2px var(--git-green); }
.git-branch-lane.is-feature b { background: #8bd2a7; }
.git-branch-split { position: absolute; left: calc(38% + 92px); top: 28px; width: 30px; height: 38px; border-left: 3px solid #8bd2a7; border-bottom: 3px solid #8bd2a7; border-radius: 0 0 0 12px; }
.git-branch-split span { position: absolute; left: 9px; top: 12px; width: max-content; color: #6e7781; font-size: 9.5px; }

.git-merge-visual { position: relative; width: min(100%, 500px); min-height: 124px; padding-right: 190px; display: grid; align-content: center; gap: 28px; }
.git-merge-source { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 9px; }
.git-merge-source span { color: var(--git-blue); font-size: 11px; font-weight: 650; }
.git-merge-source.is-feature span { color: var(--git-green); }
.git-merge-source > div { display: flex; align-items: center; }
.git-merge-source i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--git-blue); }
.git-merge-source b { flex: 1; height: 3px; background: #94aaf1; }
.git-merge-source.is-feature i { background: var(--git-green); }
.git-merge-source.is-feature b { background: #8bd2a7; }
.git-merge-path { position: absolute; left: calc(100% - 192px); top: 39px; width: 55px; height: 49px; border: 3px solid var(--git-purple); border-left: 0; border-radius: 0 24px 24px 0; }
.git-merge-path i { position: absolute; right: -6px; top: 18px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--git-purple); box-shadow: 0 0 0 3px #eadcfb; }
.git-merge-result { position: absolute; right: 0; top: 35px; width: 170px; min-height: 70px; display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #cbb6ee; border-radius: 11px; background: #f7f2ff; }
.git-merge-result > span:last-child { display: grid; gap: 2px; }
.git-merge-result b { font-size: 11.5px; }
.git-merge-result small { color: #8c959f; font-size: 9.5px; line-height: 1.35; }
.git-merge-result .git-version-check { background: var(--git-purple); }

/* Review, worktree, stash, ignore and diff each explain one visible outcome. */
.git-review-change,
.git-review-checks { flex: 1 1 0; min-width: 0; min-height: 92px; display: grid; align-content: center; gap: 3px; padding: 12px; border: 1px solid #dfe3e8; border-radius: 11px; background: #fff; }
.git-review-change > span { color: var(--git-green); font-size: 10px; font-weight: 650; }
.git-review-change b { font-size: 12px; }
.git-review-change small { color: #8c959f; font-size: 10px; }
.git-review-checks { border-color: #d0d7de; background: #f6f8fa; }
.git-review-checks span { color: #57606a; font-size: 10.5px; }
.git-review-checks span i { color: var(--git-green); font-style: normal; font-weight: 700; }
.git-review-checks b { margin-top: 3px; color: #18753f; font-size: 11px; }

.git-worktree-visual { width: min(100%, 500px); margin: 0 auto; }
.git-shared-history { width: max-content; max-width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 7px 12px; border: 1px solid #c7d1df; border-radius: 999px; background: #f6f8fa; }
.git-shared-history > span { color: #57606a; font-size: 10.5px; font-weight: 650; }
.git-worktree-lines { width: 50%; height: 24px; margin: 0 auto; border-left: 1.5px solid #afb8c1; border-right: 1.5px solid #afb8c1; border-top: 1.5px solid #afb8c1; border-radius: 8px 8px 0 0; }
.git-worktree-folders { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.git-stash-visual { width: min(100%, 560px); display: grid; grid-template-columns: 1fr auto 130px; align-items: center; gap: 12px; }
.git-drawer { position: relative; min-height: 78px; display: grid; align-content: center; gap: 2px; padding: 17px 12px 10px; border: 1px solid #b8a2df; border-radius: 7px 7px 11px 11px; background: #f7f2ff; text-align: center; }
.git-drawer-handle { position: absolute; left: 10px; right: 10px; top: 8px; height: 4px; border-radius: 4px; background: #b8a2df; }
.git-drawer b { font-size: 11px; }
.git-drawer small { color: #8c959f; font-size: 9.5px; }
.git-clean-state { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--git-green-soft); }
.git-clean-state > i { color: var(--git-green); font-style: normal; font-weight: 700; }
.git-clean-state > span { display: flex; align-items: baseline; gap: 8px; }
.git-clean-state b { color: #18753f; font-size: 10.5px; }
.git-clean-state small { color: #5a7564; font-size: 9.5px; }

.git-ignore-visual { width: min(100%, 500px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .8fr); gap: 14px; }
.git-file-list { overflow: hidden; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; }
.git-file-list > span { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-bottom: 1px solid #eef1f4; color: #57606a; font-size: 10.5px; }
.git-file-list > span:last-child { border-bottom: 0; }
.git-file-list > span i { width: 8px; height: 10px; border: 1px solid #8c959f; border-radius: 2px; }
.git-file-list > span b { margin-left: auto; color: var(--git-green); font-size: 9.5px; font-weight: 650; }
.git-file-list > span.is-secret { color: #9a6700; background: #fffbeb; text-decoration: line-through; }
.git-file-list > span.is-secret b { color: #cf222e; text-decoration: none; }
.git-ignore-rule { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid #d0d7de; border-radius: 10px; background: #f6f8fa; }
.git-shield { flex: 0 0 auto; width: 30px; height: 34px; display: grid; place-items: center; border-radius: 8px 8px 13px 13px; color: #fff; background: var(--git-green); font-size: 17px; font-weight: 650; }
.git-ignore-rule > span:last-child { display: grid; gap: 2px; }
.git-ignore-rule b { font: 650 11px/1.3 ui-monospace, Menlo, monospace; }
.git-ignore-rule small { color: #5a7564; font-size: 9.5px; line-height: 1.4; }

.git-diff-visual { width: min(100%, 500px); display: flex; align-items: center; gap: 12px; }
.git-diff-card { flex: 1 1 0; min-width: 0; min-height: 96px; display: grid; align-content: center; gap: 5px; padding: 12px; border: 1px solid #dfe3e8; border-radius: 11px; background: #fff; }
.git-diff-card > span { color: #57606a; font-size: 10px; font-weight: 650; }
.git-diff-card small { color: #8c959f; font-size: 9.5px; }
.git-diff-card b { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.git-diff-card b i { font-style: normal; font-size: 13px; }
.git-diff-card.is-before { border-color: #d0d7de; background: #fff; }
.git-diff-card.is-before b { color: #a40e26; background: #ffebe9; }
.git-diff-card.is-after { border-color: #d0d7de; background: #fff; }
.git-diff-card.is-after b { color: #18753f; background: #dafbe1; }
.git-diff-arrow { flex: 0 0 auto; color: var(--git-blue); font-size: 18px; }

/* List cards are deliberately quieter and shorter than detail visuals. */
.git-story.is-card .git-story-main { min-height: 100px; display: grid; align-items: center; }
.git-story.is-card .git-file-card,
.git-story.is-card .git-repo-card,
.git-story.is-card .git-folder-card,
.git-story.is-card .git-device-card,
.git-story.is-card .git-version-card { min-height: 64px; padding: 9px 10px; }
.git-story.is-card .git-file-card small,
.git-story.is-card .git-repo-card small,
.git-story.is-card .git-folder-card small,
.git-story.is-card .git-device-card small,
.git-story.is-card .git-version-card small { display: none; }
.git-story.is-card .git-motion { min-width: 54px; }
.git-story.is-card .git-motion span { font-size: 9.5px; }
.git-story.is-card .git-motion small { font-size: 9px; }
.git-story.is-card .git-version-dots { display: none; }
.git-story.is-detail .git-file-card b,
.git-story.is-detail .git-repo-card b,
.git-story.is-detail .git-folder-card b,
.git-story.is-detail .git-device-card b,
.git-story.is-detail .git-version-card b { overflow: visible; white-space: normal; }
.git-story.is-card .git-review-visual { gap: 9px; }
.git-story.is-card .git-review-visual .git-motion { min-width: 50px; }
.git-story.is-card .git-review-change,
.git-story.is-card .git-review-checks { min-height: 78px; padding: 9px; }
.git-story.is-card .git-clean-state { display: none; }
.git-story.is-card .git-stash-visual { grid-template-columns: 1fr auto 105px; }
.git-story.is-card .git-ignore-visual { grid-template-columns: 1fr 115px; gap: 9px; }
.git-story.is-card .git-ignore-rule small { display: none; }
.git-story.is-card .git-diff-card { min-height: 78px; padding: 9px; }

@media (min-width: 1101px) {
  .catalog-layout .card-demo:not(.scaled-preview) > .git-story { zoom: 1; }
}

@media (max-width: 720px) {
  .detail-body:has(.git-story) .usage-grid,
  .detail-body:has(.git-story) .usage-grid > *,
  .detail-body:has(.git-story) .usage-box ul,
  .detail-body:has(.git-story) .usage-box li,
  .detail-body:has(.git-story) .usage-box .mk { min-width: 0; max-width: 100%; }
  .detail-body:has(.git-story) .usage-box { width: 100%; min-width: 0; overflow: hidden; }
  .detail-body:has(.git-story) .usage-box .mk > * { min-width: 0; max-width: 100% !important; }
  .detail-body:has(.git-story) .usage-box .terminal-win { width: 100%; }
  .detail-body:has(.git-story) .anat-stage .stash-demo { max-width: 100%; flex-direction: column; }
  .detail-body:has(.git-story) .anat-stage .stash-arr { transform: rotate(90deg); }
  .git-story.is-detail { min-width: 0; max-width: 100%; }
  .git-story.is-detail .git-story-main { min-height: 0; padding: 18px 14px; }
  .git-story-answer { grid-template-columns: 1fr; gap: 10px; }
  .git-command { width: max-content; max-width: 100%; overflow-x: auto; }
  .git-story.is-detail .git-simple-flow,
  .git-story.is-detail .git-transfer-visual,
  .git-story.is-detail .git-review-visual { flex-direction: column; gap: 9px; }
  .git-story.is-detail .git-simple-flow > .git-file-card,
  .git-story.is-detail .git-simple-flow > .git-version-card,
  .git-story.is-detail .git-simple-flow > .git-repo-card,
  .git-story.is-detail .git-transfer-visual > .git-file-card,
  .git-story.is-detail .git-transfer-visual > .git-version-card,
  .git-story.is-detail .git-transfer-visual > .git-repo-card,
  .git-story.is-detail .git-transfer-visual > .git-device-card,
  .git-story.is-detail .git-transfer-visual > .git-folder-card,
  .git-story.is-detail .git-review-change,
  .git-story.is-detail .git-review-checks { width: min(100%, 260px); flex: 0 0 auto; }
  .git-story.is-detail .git-motion {
    min-width: 0; grid-template-columns: auto auto; grid-template-areas: "label term" "arrow arrow";
    justify-content: center; column-gap: 6px; text-align: center;
  }
  .git-story.is-detail .git-motion span { font-size: 10px; white-space: nowrap; }
  .git-story.is-detail .git-motion i { justify-self: center; line-height: 1; transform: rotate(90deg); }
  .git-story.is-card .git-simple-flow,
  .git-story.is-card .git-transfer-visual,
  .git-story.is-card .git-review-visual { gap: 8px; }
  .git-motion { min-width: 48px; }
  .git-motion span { font-size: 9px; white-space: normal; }
  .git-file-card,
  .git-repo-card,
  .git-folder-card,
  .git-device-card,
  .git-version-card { min-height: 62px; padding: 8px; }
  .git-file-card small,
  .git-repo-card small,
  .git-folder-card small,
  .git-device-card small,
  .git-version-card small { display: none; }
  .git-file-mark,
  .git-repo-icon,
  .git-folder-icon,
  .git-device-screen { transform: scale(.82); margin-inline: -3px; }
  .git-version-dots { display: none; }
  .git-story.is-card .git-simple-flow--commit .git-file-mark,
  .git-story.is-card .git-simple-flow--commit .git-version-check { display: none; }
  .git-story.is-card .git-simple-flow--commit .git-file-card,
  .git-story.is-card .git-simple-flow--commit .git-version-card { justify-content: center; text-align: center; }
  .git-merge-visual { padding-right: 132px; }
  .git-merge-result { width: 122px; }
  .git-merge-result small { display: none; }
  .git-branch-split span { left: 2px; top: 8px; width: 25px; line-height: 1.15; white-space: normal; word-break: break-all; }
  .git-story.is-detail .git-stash-visual { grid-template-columns: minmax(0, 1fr); }
  .git-story.is-detail .git-stash-visual > .git-motion { justify-self: center; }
  .git-story.is-detail .git-drawer { width: min(100%, 260px); justify-self: center; }
  .git-story.is-detail .git-clean-state { grid-column: 1; }
  .git-story.is-card .git-stash-visual { grid-template-columns: 1fr auto 105px; }
  .git-story.is-detail .git-ignore-visual { grid-template-columns: minmax(0, 1fr); }
  .git-story.is-card .git-ignore-visual { grid-template-columns: 1fr 105px; gap: 8px; }
  .git-ignore-rule small { display: none; }
}
