/* ============================================================
   Lineage — PFM-grade dark UI
   one accent · alpha hairlines · tabular numerals · quiet chrome
   ============================================================ */

.app{ height:100vh; display:flex; flex-direction:column; overflow:hidden; }
button{ font-family:inherit; letter-spacing:inherit; }

/* ───────────────────────── TOP BAR ───────────────────────── */
.topbar{ flex:none; background:var(--bg); border-bottom:1px solid var(--line); }
.topbar-inner{ height:49px; display:flex; align-items:center; gap:14px; padding:0 16px; }
.brand{ display:flex; align-items:center; gap:8px; }
.brand-mark{ width:23px; height:23px; border-radius:6px; display:grid; place-items:center;
  background:linear-gradient(180deg, oklch(0.625 0.17 278 / 0.30), oklch(0.625 0.17 278 / 0.16));
  border:1px solid var(--agent-dim); color:var(--agent-2); box-shadow:var(--hl); }
.brand-name{ font-size:14px; font-weight:600; letter-spacing:-0.02em; }
.repo-crumb{ display:flex; align-items:center; gap:6px; font-size:12.5px; }
.crumb-org, .crumb-slash{ color:var(--tx-3); }
.crumb-repo{ color:var(--tx-2); font-weight:500; }
.branch-pill{ display:inline-flex; align-items:center; gap:4px; margin-left:3px;
  background:var(--bg-1); border:1px solid var(--line); color:var(--tx-3);
  border-radius:6px; padding:3px 7px; font-size:11px; font-family:var(--mono); cursor:pointer; white-space:nowrap;
  transition:color .14s var(--ease), border-color .14s var(--ease); }
.branch-pill:hover{ color:var(--tx-2); border-color:var(--line-2); }

.prime-nav{ display:flex; gap:1px; margin-left:6px; }
.prime-tab{ display:inline-flex; align-items:center; gap:7px; border:none; background:none;
  color:var(--tx-3); font-size:13px; font-weight:500; letter-spacing:-0.01em;
  padding:6px 11px; border-radius:7px; cursor:pointer; transition:color .14s var(--ease), background .14s var(--ease); }
.prime-tab:hover{ color:var(--tx-2); }
.prime-tab.on{ color:var(--tx); background:var(--bg-2); box-shadow:var(--hl); }
.prime-tab svg{ opacity:0.85; }

.topbar-search{ flex:1; max-width:288px; margin-left:auto;
  display:flex; align-items:center; gap:8px;
  background:var(--bg-1); border:1px solid var(--line); border-radius:8px; padding:6px 9px 6px 10px;
  transition:border-color .14s var(--ease), box-shadow .14s var(--ease); }
.topbar-search:focus-within{ border-color:var(--agent-dim); box-shadow:var(--ring); }
.topbar-search input{ flex:1; background:none; border:none; outline:none; color:var(--tx);
  font-family:inherit; font-size:12.5px; letter-spacing:-0.01em; }
.topbar-search input::placeholder{ color:var(--tx-3); }
.topbar-search kbd{ font-size:11px; line-height:1; color:var(--tx-3); font-family:var(--mono);
  background:var(--bg-3); border:1px solid var(--line); border-radius:5px; padding:3px 5px; box-shadow:var(--hl); }

.view-toggle{ display:flex; gap:1px; background:var(--bg-1); border:1px solid var(--line); border-radius:8px; padding:2px; box-shadow:var(--hl); }
.view-toggle button{ display:inline-flex; align-items:center; gap:6px; border:none; background:none;
  color:var(--tx-3); font-size:12px; font-weight:500; padding:5px 11px; border-radius:6px; cursor:pointer; transition:color .14s var(--ease); }
.view-toggle button.on{ background:var(--bg-3); color:var(--tx); box-shadow:var(--hl); }
.view-toggle button:hover:not(.on){ color:var(--tx-2); }

/* ═══════════════════════ ACTIVITY ═══════════════════════ */
.stage{ flex:1; min-height:0; overflow-y:auto; }
.stage-inner{ max-width:1040px; margin:0 auto; padding:26px 28px 120px; }

/* ── metrics: editorial, quiet ── */
.metrics{ border:1px solid var(--line); border-radius:13px; padding:17px 4px 16px 20px; background:var(--bg-1); box-shadow:var(--hl); }
.metrics-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:17px; padding-right:16px; }
.eyebrow{ font-size:10px; letter-spacing:0.16em; color:var(--tx-3); font-weight:600; white-space:nowrap; }
.metrics-title h2{ display:none; }
.period-pill{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--tx-3);
  background:var(--bg-2); border:1px solid var(--line); border-radius:7px; padding:4px 9px; cursor:pointer; white-space:nowrap;
  transition:color .14s var(--ease), border-color .14s var(--ease); }
.period-pill:hover{ color:var(--tx-2); border-color:var(--line-2); }
.metrics-grid{ display:flex; align-items:stretch; }
.metric{ flex:1; min-width:0; padding:1px 18px; display:flex; flex-direction:column; }
.metric:first-of-type{ padding-left:0; }
.metric-div{ width:1px; align-self:stretch; background:var(--line); margin:3px 0; }
.metric-label{ font-size:11px; color:var(--tx-3); margin-bottom:9px; letter-spacing:-0.005em; }
.metric-row{ display:flex; align-items:center; gap:10px; }
.metric-value{ font-size:22px; font-weight:600; letter-spacing:-0.025em; line-height:1; color:var(--tx); font-variant-numeric:tabular-nums; }
.metric-sub{ margin-top:auto; padding-top:9px; display:flex; align-items:center; gap:7px; font-size:11px; min-height:15px; }
.metric-subtext{ color:var(--tx-3); }
.delta{ font-family:var(--mono); font-size:10.5px; color:var(--tx-3); display:inline-flex; align-items:center; gap:2px; font-variant-numeric:tabular-nums; }
.delta.up{ color:var(--human-2); }
.delta.down{ color:var(--tx-3); }
.spark{ display:block; opacity:0.95; }
.authored-bar{ width:52px; height:4px; border-radius:3px; background:var(--bg-3); overflow:hidden; }
.authored-bar span{ display:block; height:100%; background:var(--agent); border-radius:3px; }

/* ── filter bar ── */
.filterbar{ display:flex; align-items:center; justify-content:space-between; margin:22px 0 4px; }
.filter-tabs{ display:flex; gap:1px; }
.filter-tab{ display:inline-flex; align-items:center; gap:7px; border:none; background:none;
  color:var(--tx-3); font-size:12.5px; font-weight:500; letter-spacing:-0.01em;
  padding:6px 11px; border-radius:7px; cursor:pointer; transition:color .14s var(--ease), background .14s var(--ease); }
.filter-tab:hover:not(.on){ color:var(--tx-2); }
.filter-tab.on{ background:var(--bg-2); color:var(--tx); box-shadow:var(--hl); }
.tab-dot{ width:6px; height:6px; border-radius:50%; }
.tab-count{ font-size:10.5px; color:var(--tx-4); font-variant-numeric:tabular-nums; }
.filter-tab.on .tab-count{ color:var(--tx-3); }

/* ── timeline ── */
.timeline{ margin-top:8px; }
.day-divider{ display:flex; align-items:center; gap:12px; padding:22px 0 7px; margin-left:54px; }
.day-label{ font-size:11.5px; font-weight:600; color:var(--tx-2); letter-spacing:-0.01em; }
.day-rule{ flex:1; height:1px; background:var(--line); }
.day-count{ font-size:10.5px; color:var(--tx-4); font-variant-numeric:tabular-nums; }

.tl-row{ display:flex; cursor:pointer; }
.rail{ width:54px; flex:none; position:relative; display:flex; justify-content:center; }
.rail-line{ position:absolute; top:0; bottom:-1px; width:1px; background:var(--line); left:50%; transform:translateX(-50%); }
.node-dot{ position:relative; z-index:2; margin-top:17px;
  width:20px; height:20px; border-radius:50%; display:grid; place-items:center; flex:none;
  border:1px solid; background:var(--bg); }
.dot-agent{ border-color:var(--agent-dim); color:var(--agent-2); background:var(--agent-bg); }
.dot-agent svg{ width:10px; height:10px; }
.dot-human{ width:12px; height:12px; margin-top:21px; border-color:var(--line-3); background:var(--bg); }
.dot-human .dot-core{ width:5px; height:5px; border-radius:50%; background:var(--human); }
.dot-end{ width:9px; height:9px; border:1px solid var(--line-2); background:var(--bg); margin:0 auto; }

.tl-card{ flex:1; min-width:0; margin:8px 0 8px 4px; border-radius:11px;
  transition:border-color .14s var(--ease), background .14s var(--ease); }

.agent-card{ background:var(--bg-1); border:1px solid var(--line); padding:13px 15px; box-shadow:var(--hl); }
.tl-row.agent-row:hover .agent-card{ border-color:var(--line-2); background:var(--bg-2); }
.tl-row.sel .agent-card{ border-color:var(--agent-dim); background:var(--bg-2); box-shadow:var(--hl), var(--ring); }
.ac-top{ display:flex; align-items:center; gap:8px; margin-bottom:9px; flex-wrap:wrap; }
.agent-name{ display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:600; color:var(--tx); letter-spacing:-0.01em; }
.model-chip{ font-size:10.5px; color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:5px; padding:2px 7px; white-space:nowrap; }
.ac-branch{ display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--tx-3); white-space:nowrap; font-family:var(--mono); }
.ac-spacer{ flex:1; }
.cost-pill{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:500;
  color:var(--tx-2); background:none; border:none; border-radius:0; padding:0; white-space:nowrap; font-variant-numeric:tabular-nums; }
.cost-pill svg{ color:var(--tx-4); }
.cost-pill.sm{ font-size:11px; }
.ac-time, .commit-time{ font-size:11px; color:var(--tx-3); white-space:nowrap; font-variant-numeric:tabular-nums; }
.ac-summary{ font-size:13.5px; color:var(--tx); font-weight:500; line-height:1.45; margin-bottom:5px; text-wrap:pretty; letter-spacing:-0.011em; }
.ac-task{ font-size:11.5px; color:var(--tx-3); line-height:1.5; margin-bottom:11px;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.ac-foot{ display:flex; align-items:center; gap:14px; font-size:11px; color:var(--tx-3); flex-wrap:wrap; }
.foot-chip{ display:inline-flex; align-items:center; gap:5px; color:var(--tx-3); white-space:nowrap; font-variant-numeric:tabular-nums; }
.foot-chip svg{ color:var(--tx-4); }
.result-chip{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:500;
  border-radius:6px; padding:3px 8px; border:1px solid var(--line); background:var(--bg-2); color:var(--tx-2); white-space:nowrap; font-family:var(--mono); }
.result-chip svg{ color:var(--tx-3); }
.rc-commit svg{ color:var(--agent-2); }
.rc-pr svg{ color:var(--blue); }
.rc-status{ color:var(--tx-3); font-size:9.5px; padding-left:5px; border-left:1px solid var(--line-2); margin-left:1px; letter-spacing:0.02em; }

.commit-card{ background:transparent; border:1px solid transparent; padding:7px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:14px; }
.tl-row.commit-row:hover .commit-card{ background:var(--bg-1); border-color:var(--line); }
.tl-row.sel .commit-card{ background:var(--bg-1); border-color:var(--line-2); }
.commit-main{ display:flex; align-items:center; gap:9px; min-width:0; }
.commit-msg{ font-size:12.5px; color:var(--tx-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--mono); }
.commit-meta{ display:flex; align-items:center; gap:11px; flex:none; font-size:11px; font-variant-numeric:tabular-nums; }
.merge-tag{ color:var(--blue); font-size:9.5px; font-family:var(--mono); }
.commit-hash{ color:var(--tx-3); font-family:var(--mono); }
.commit-delta{ display:inline-flex; gap:6px; font-family:var(--mono); }

.tl-end{ display:flex; align-items:center; gap:11px; margin-left:54px; padding:24px 0 0; font-size:11px; color:var(--tx-4); }
.avatar{ display:inline-grid; place-items:center; border-radius:50%; border:1px solid; font-weight:600; flex:none; letter-spacing:0; }

/* ── graph ── */
.graphview{ margin-top:16px; }
.graph-lanes{ display:flex; gap:14px; margin:4px 0 14px; flex-wrap:wrap; }
.lane-chip{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-family:var(--mono); }
.lane-swatch{ width:8px; height:8px; border-radius:2px; }
.graph-body{ display:flex; align-items:flex-start; }
.graph-svg{ flex:none; }
.graph-rows{ flex:1; min-width:0; }
.graph-row{ display:flex; align-items:center; gap:11px; padding:0 12px; border-radius:8px; cursor:pointer; border:1px solid transparent; }
.graph-row:hover{ background:var(--bg-1); }
.graph-row.sel{ background:var(--bg-1); border-color:var(--line-2); }
.gr-msg{ font-size:13px; color:var(--tx); flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-0.01em; }
.gr-msg.commit{ color:var(--tx-2); font-size:12px; }
.gr-time{ font-size:10.5px; color:var(--tx-4); flex:none; font-variant-numeric:tabular-nums; }

/* ═══════════════════════ CODE VIEW ═══════════════════════ */
.code-layout{ flex:1; min-height:0; display:flex; }
.tree-panel{ width:256px; flex:none; border-right:1px solid var(--line); display:flex; flex-direction:column; background:var(--bg); }
.tree-head{ flex:none; display:flex; align-items:center; gap:6px; height:40px; padding:0 14px; font-size:11.5px; color:var(--tx-3); border-bottom:1px solid var(--line); font-family:var(--mono); }
.tree-scroll{ flex:1; overflow-y:auto; padding:8px 8px 40px; }
.tn-row{ width:100%; display:flex; align-items:center; gap:7px; border:none; background:none; cursor:pointer;
  color:var(--tx-2); font-size:12.5px; padding:5px 8px; border-radius:7px; text-align:left; letter-spacing:-0.008em;
  transition:background .12s var(--ease), color .12s var(--ease); }
.tn-row:hover{ background:var(--bg-1); color:var(--tx); }
.tn-row.on{ background:var(--agent-bg); color:var(--tx); box-shadow:inset 2px 0 0 var(--agent); }
.tn-name{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tn-agentdot{ width:5px; height:5px; border-radius:50%; background:var(--agent); flex:none; opacity:0.9; }
.file-glyph{ width:17px; height:16px; border:1px solid; border-radius:4px; display:grid; place-items:center;
  font-family:var(--mono); font-size:7.5px; font-weight:500; text-transform:uppercase; flex:none; opacity:0.9; letter-spacing:0; }

.code-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.path-bar{ flex:none; height:40px; display:flex; align-items:center; gap:2px; padding:0 18px; border-bottom:1px solid var(--line); font-size:12.5px; }
.crumb-seg{ border:none; background:none; color:var(--tx-3); cursor:pointer; font-size:12.5px; padding:2px 5px; border-radius:5px; transition:color .12s var(--ease), background .12s var(--ease); }
.crumb-seg:hover{ color:var(--tx); background:var(--bg-1); }
.crumb-sl{ color:var(--tx-4); }
.crumb-file{ color:var(--tx); font-weight:500; padding:0 5px; }

.browse-grid{ flex:1; min-height:0; overflow-y:auto; display:flex; gap:28px; padding:22px 22px 60px; max-width:1160px; }

/* file list */
.filelist{ flex:1; min-width:0; border:1px solid var(--line); border-radius:11px; overflow:hidden; align-self:flex-start; box-shadow:var(--hl); }
.fl-head{ display:flex; align-items:center; gap:12px; padding:8px 16px; background:var(--bg-1); border-bottom:1px solid var(--line); font-size:11px; color:var(--tx-3); font-family:var(--mono); }
.fl-h-name{ flex:none; width:196px; color:var(--tx-2); }
.fl-h-last{ flex:1; }
.fl-h-age{ flex:none; width:52px; text-align:right; }
.fl-row{ width:100%; display:flex; align-items:center; gap:12px; padding:9px 16px; border:none; background:none;
  border-top:1px solid var(--line); cursor:pointer; text-align:left; transition:background .12s var(--ease); }
.fl-row:hover{ background:var(--bg-1); }
.fl-name{ flex:none; width:196px; display:flex; align-items:center; gap:9px; min-width:0; }
.fl-n-dir{ flex:1; min-width:0; font-size:13px; color:var(--tx); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-0.01em; }
.fl-n-file{ flex:1; min-width:0; font-size:13px; color:var(--tx-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-0.01em; }
.fl-msg{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; }
.fl-msg-text{ flex:1; min-width:0; font-size:12px; color:var(--tx-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fl-age{ flex:none; width:52px; text-align:right; font-size:11px; color:var(--tx-3); font-variant-numeric:tabular-nums; }

.auth{ display:inline-flex; align-items:center; gap:5px; flex:none; }
.auth-name{ font-size:11.5px; color:var(--tx-2); white-space:nowrap; }
.auth-agent .auth-name{ color:var(--agent-2); }
.auth-age{ font-size:10.5px; color:var(--tx-3); font-variant-numeric:tabular-nums; }

/* about rail */
.about{ width:236px; flex:none; display:flex; flex-direction:column; gap:22px; }
.about-h{ margin:0 0 9px; font-size:12.5px; font-weight:600; color:var(--tx); letter-spacing:-0.01em; }
.about-desc{ margin:0; font-size:12.5px; line-height:1.6; color:var(--tx-2); }
.about-label{ font-size:10.5px; letter-spacing:0.06em; text-transform:uppercase; color:var(--tx-3); margin-bottom:10px; }
.authorship-bar, .lang-bar{ display:flex; height:6px; border-radius:4px; overflow:hidden; background:var(--bg-2); gap:2px; }
.authorship-bar span, .lang-bar span{ display:block; height:100%; border-radius:2px; }
.ab-agent{ background:var(--agent); }
.ab-human{ background:var(--human); }
.authorship-legend, .lang-legend{ display:flex; flex-wrap:wrap; gap:7px 14px; margin-top:11px; font-size:11px; color:var(--tx-2); }
.authorship-legend span, .lang-legend span{ display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.lg-dot{ width:7px; height:7px; border-radius:50%; }

/* code file (blame) */
.codefile{ flex:1; min-height:0; display:flex; flex-direction:column; }
.cf-bar{ flex:none; height:42px; display:flex; align-items:center; gap:14px; padding:0 18px; border-bottom:1px solid var(--line); }
.cf-path{ font-size:12.5px; color:var(--tx-3); font-family:var(--mono); }
.cf-path .cf-sep{ margin:0 3px; color:var(--tx-4); }
.cf-path .cf-p-last{ color:var(--tx); font-weight:500; }
.cf-meta{ display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--tx-3); margin-left:auto; font-variant-numeric:tabular-nums; }
.cf-agentpct{ display:inline-flex; align-items:center; gap:4px; color:var(--agent-2); }
.cf-dot{ color:var(--tx-4); }
.blame-toggle{ display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--bg-1);
  color:var(--tx-3); font-size:11.5px; font-weight:500; padding:5px 10px; border-radius:7px; cursor:pointer; box-shadow:var(--hl);
  transition:color .14s var(--ease), border-color .14s var(--ease); }
.blame-toggle.on{ color:var(--agent-2); border-color:var(--agent-dim); background:var(--agent-bg); }

.cf-code{ flex:1; min-height:0; overflow:auto; padding:4px 0 60px; }
.blk{ display:flex; align-items:stretch; position:relative; }
.cf-code.blame .blk::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:2px; background:transparent; }
.cf-code.blame .blk.kind-agent::before{ background:var(--agent); opacity:0.55; }
.cf-code.blame .blk.kind-human::before{ background:var(--human); opacity:0.5; }
.blk.clickable{ cursor:pointer; }
.cf-code.blame .blk.clickable:hover{ background:oklch(0.625 0.17 278 / 0.05); }
.cf-code.blame .blk.clickable:hover::before{ opacity:1; }
.cf-code.blame .blk.kind-human:hover{ background:var(--bg-1); }
.blk-gutter{ flex:none; width:206px; padding:9px 14px 9px 14px; border-right:1px solid var(--line);
  display:flex; flex-direction:column; gap:3px; justify-content:flex-start; overflow:hidden; }
.blk-auth{ display:flex; align-items:center; }
.blk-sub{ font-size:10.5px; color:var(--tx-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blk-intent{ color:var(--tx-3); }
.blk-hash{ color:var(--tx-4); font-family:var(--mono); }
.blk-open{ font-size:10px; color:var(--agent-2); opacity:0; transition:opacity .14s var(--ease); margin-top:1px; }
.blk.clickable:hover .blk-open{ opacity:1; }
.blk-code{ flex:1; min-width:0; padding:7px 0; }
.cl{ display:flex; align-items:baseline; padding:0 16px 0 0; }
.cl-n{ flex:none; width:48px; text-align:right; padding-right:18px; font-size:11.5px; color:var(--tx-4); user-select:none; font-variant-numeric:tabular-nums; }
.cl-t{ font-size:12.5px; line-height:1.85; color:var(--tx); white-space:pre; }

/* syntax — low-chroma, sits on near-black */
.hl-com{ color:var(--tx-4); font-style:italic; }
.hl-str{ color:oklch(0.760 0.072 168); }
.hl-kw{ color:oklch(0.745 0.120 278); }
.hl-typ{ color:oklch(0.780 0.082 232); }
.hl-num{ color:oklch(0.785 0.085 52); }

.cf-empty{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:13px;
  color:var(--tx-2); font-size:14px; text-align:center; padding:40px; }
.cf-empty-sub{ font-size:12.5px; color:var(--tx-3); }
.cf-empty .mono{ color:var(--agent-2); }

/* ═══════════════════════ DRAWER ═══════════════════════ */
.drawer-scrim{ position:fixed; inset:0; background:oklch(0.10 0.01 277 / 0.55); opacity:0; pointer-events:none; z-index:50; }
.drawer-scrim.show{ opacity:1; pointer-events:auto; }
.drawer{ position:fixed; top:0; right:0; bottom:0; width:min(536px, 94vw);
  background:var(--bg-1); border-left:1px solid var(--line-2); z-index:60;
  transform:translateX(100%); visibility:hidden;
  display:flex; flex-direction:column; box-shadow:-40px 0 80px -40px oklch(0 0 0 / 0.8); }
.drawer.open{ transform:translateX(0); visibility:visible; }

.d-head{ padding:18px 22px 15px; border-bottom:1px solid var(--line); flex:none; }
.d-head-top{ display:flex; align-items:center; gap:9px; margin-bottom:13px; }
.node-kind{ display:inline-flex; align-items:center; gap:5px; font-size:10px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; padding:4px 8px; border-radius:6px; }
.kind-agent{ color:var(--agent-2); background:var(--agent-bg); }
.kind-human{ color:var(--human-2); background:var(--human-bg); }
.d-close{ margin-left:auto; width:28px; height:28px; border-radius:7px; display:grid; place-items:center; background:var(--bg-2); border:1px solid var(--line); color:var(--tx-2); cursor:pointer; transition:background .14s var(--ease), color .14s var(--ease); }
.d-close:hover{ background:var(--bg-3); color:var(--tx); }
.d-title{ margin:0 0 11px; font-size:16.5px; font-weight:600; line-height:1.36; letter-spacing:-0.018em; text-wrap:pretty; }
.d-title.mono{ font-size:13.5px; font-weight:500; letter-spacing:0; }
.d-byline{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--tx-2); font-variant-numeric:tabular-nums; }
.d-byline .mono{ color:var(--tx-3); }
.dot-sep{ color:var(--tx-4); }

.d-body{ flex:1; overflow-y:auto; padding:16px 22px 50px; }
.trigger-line{ display:flex; align-items:center; gap:9px; font-size:12px; color:var(--tx-2); background:var(--bg-2); border:1px solid var(--line); border-radius:9px; padding:9px 11px; margin-bottom:16px; }
.trigger-tag{ font-size:9px; letter-spacing:0.08em; color:var(--tx-3); background:var(--bg); border:1px solid var(--line); border-radius:5px; padding:2px 6px; flex:none; }

/* the one place cost is allowed to be expressive */
.cost-panel{ background:linear-gradient(180deg, var(--cost-bg), transparent 80%); border:1px solid oklch(0.800 0.085 85 / 0.28); border-radius:11px; padding:14px 16px; margin-bottom:18px; box-shadow:var(--hl); }
.cost-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:11px; }
.cost-head .eyebrow{ color:var(--cost); }
.cost-big{ font-size:23px; font-weight:600; color:var(--cost-2); letter-spacing:-0.025em; font-variant-numeric:tabular-nums; }
.cost-bar{ height:4px; border-radius:3px; background:var(--bg-3); overflow:hidden; margin-bottom:14px; }
.cost-bar span{ display:block; height:100%; background:var(--cost); border-radius:3px; }
.cost-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px 20px; }
.cost-grid > div{ display:flex; align-items:baseline; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:7px; }
.cg-label{ font-size:10.5px; color:var(--tx-3); }
.cg-val{ font-size:12.5px; color:var(--tx); font-weight:500; font-variant-numeric:tabular-nums; }

.d-section{ border-top:1px solid var(--line); }
.d-section-head{ width:100%; display:flex; align-items:center; gap:8px; background:none; border:none; cursor:pointer; padding:14px 0 12px; color:var(--tx); }
.d-section-title{ font-size:12.5px; font-weight:600; letter-spacing:-0.01em; }
.d-section-count{ font-size:10.5px; color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:5px; padding:0 6px; margin-left:1px; font-variant-numeric:tabular-nums; }
.d-section-body{ padding:0 0 17px; }

.task-quote{ margin:0; padding:11px 14px; border-left:2px solid var(--agent-dim); background:var(--bg-2); border-radius:0 9px 9px 0; font-size:13px; line-height:1.6; color:var(--tx); }
.reason-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px; }
.reason-list li{ display:flex; gap:11px; font-size:12.5px; line-height:1.55; color:var(--tx-2); }
.reason-n{ flex:none; width:18px; height:18px; border-radius:6px; background:var(--bg-2); border:1px solid var(--line); display:grid; place-items:center; font-size:10px; color:var(--agent-2); margin-top:1px; font-variant-numeric:tabular-nums; }

.tool-log{ background:var(--bg); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.tool-row{ display:flex; align-items:center; gap:9px; padding:8px 12px; border-top:1px solid var(--line); }
.tool-row:first-child{ border-top:none; }
.tool-ico{ flex:none; }
.tool-label{ font-size:11.5px; color:var(--tx); font-weight:500; flex:none; min-width:120px; font-family:var(--mono); }
.tool-detail{ font-size:11px; color:var(--tx-3); flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--mono); }
.tool-status{ flex:none; font-family:var(--mono); font-weight:600; display:grid; place-items:center; }

.files-list{ display:flex; flex-direction:column; gap:2px; margin-bottom:13px; }
.file-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 10px; border-radius:7px; background:var(--bg-2); }
.file-path{ font-size:11.5px; color:var(--tx-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--mono); }
.file-stat{ display:flex; gap:8px; font-size:11px; flex:none; font-family:var(--mono); font-variant-numeric:tabular-nums; }

.diff-wrap{ display:flex; flex-direction:column; gap:12px; }
.diff-block{ border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.diff-path{ font-size:10.5px; color:var(--tx-2); background:var(--bg-2); padding:7px 12px; border-bottom:1px solid var(--line); font-family:var(--mono); }
.diff-code{ font-size:11.5px; line-height:1.75; background:var(--bg); padding:5px 0; font-family:var(--mono); }
.diff-hunk{ color:var(--tx-4); padding:0 12px 4px; font-size:10.5px; }
.diff-line{ display:flex; padding:0 12px; }
.dl-gutter{ width:13px; flex:none; color:var(--tx-4); user-select:none; }
.dl-text{ white-space:pre-wrap; word-break:break-word; }
.dl-add{ background:oklch(0.745 0.082 165 / 0.10); }
.dl-add .dl-gutter, .dl-add .dl-text{ color:var(--add); }
.dl-del{ background:oklch(0.700 0.140 25 / 0.10); }
.dl-del .dl-gutter, .dl-del .dl-text{ color:var(--del); }
.dl-ctx .dl-text{ color:var(--tx-2); }

.result-card{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--bg-2); border:1px solid var(--line); border-radius:11px; padding:12px 14px; box-shadow:var(--hl); }
.result-left{ display:flex; align-items:center; gap:11px; min-width:0; }
.result-ico{ width:32px; height:32px; border-radius:9px; display:grid; place-items:center; background:var(--bg); border:1px solid var(--line); flex:none; }
.result-title{ font-size:13px; font-weight:600; display:flex; align-items:center; gap:8px; letter-spacing:-0.01em; }
.result-title .mono{ font-weight:500; }
.result-sub{ font-size:10.5px; color:var(--tx-3); margin-top:3px; font-family:var(--mono); }
.status-badge{ font-size:9px; font-weight:600; border:1px solid; border-radius:5px; padding:2px 6px; text-transform:uppercase; letter-spacing:0.05em; }
.result-open{ display:inline-flex; align-items:center; gap:5px; background:var(--bg-3); border:1px solid var(--line-2); color:var(--tx); border-radius:8px; padding:6px 11px; font-size:11.5px; font-weight:500; cursor:pointer; flex:none; box-shadow:var(--hl); transition:background .14s var(--ease); }
.result-open:hover{ background:var(--line-2); }

.commit-stat{ display:flex; gap:13px; font-family:var(--mono); font-size:13px; font-weight:500; margin-bottom:15px; font-variant-numeric:tabular-nums; }
.empty-note{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:10px; padding:13px; line-height:1.5; }

/* entrance — transform only (never hides content if frozen) */
@media (prefers-reduced-motion: no-preference){
  .tl-row, .graph-row{ animation:rise .34s var(--ease) both; }
}
@keyframes rise{ from{ transform:translateY(5px); } to{ transform:none; } }

@media (max-width: 880px){
  .metrics-grid{ flex-wrap:wrap; gap:18px 0; }
  .metric{ flex:1 1 33%; }
  .metric-div{ display:none; }
  .about, .tree-panel{ display:none; }
  .topbar-search{ display:none; }
}

/* ═══════════════════════ HISTORY (commits) ═══════════════════════ */
.add{ color:var(--add); }
.del{ color:var(--del); }

.history{ flex:1; min-height:0; overflow-y:auto; }
.history-inner{ max-width:900px; margin:0 auto; padding:30px 28px 120px; }
.history-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:22px; }
.history-title h2{ margin:0; font-size:19px; font-weight:600; letter-spacing:-0.02em; }
.history-sub{ font-size:11.5px; color:var(--tx-3); margin-top:5px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hs-branch{ color:var(--tx-2); }
.history-spend{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--tx-2);
  background:var(--bg-1); border:1px solid var(--line); border-radius:8px; padding:6px 11px; box-shadow:var(--hl); font-variant-numeric:tabular-nums; cursor:pointer; white-space:nowrap; transition:border-color .12s var(--ease); }
.history-spend:hover{ border-color:var(--line-2); }
.history-spend svg{ color:var(--cost); }

.cm-group{ margin-bottom:8px; }
.cm-day{ display:flex; align-items:center; gap:12px; padding:18px 2px 9px; }
.cm-day-label{ font-size:11.5px; font-weight:600; color:var(--tx-2); letter-spacing:-0.01em; }
.cm-day-rule{ flex:1; height:1px; background:var(--line); }

.cm-list{ border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow:var(--hl); background:var(--bg-1); }
.cm-row{ display:flex; align-items:center; gap:13px; padding:12px 15px; border-top:1px solid var(--line); cursor:pointer;
  transition:background .12s var(--ease); }
.cm-row:first-child{ border-top:none; }
.cm-row:hover{ background:var(--bg-2); }
.cm-rail-dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.cm-rail-dot[data-kind="agent"]{ background:var(--agent); box-shadow:0 0 0 3px var(--agent-bg); }
.cm-rail-dot[data-kind="human"]{ background:transparent; border:1.5px solid var(--line-3); }
.cm-body{ flex:1; min-width:0; }
.cm-msg{ font-size:13.5px; color:var(--tx); font-weight:500; letter-spacing:-0.011em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-sub{ display:flex; align-items:center; gap:9px; margin-top:5px; flex-wrap:wrap; }
.cm-author{ display:inline-flex; align-items:center; gap:6px; }
.cm-author-name{ font-size:11.5px; color:var(--tx-3); white-space:nowrap; }
.cm-author-agent .cm-author-name{ color:var(--agent-2); }
.cm-agent-ic{ width:16px; height:16px; border-radius:5px; display:grid; place-items:center; background:var(--agent-bg); color:var(--agent-2); }
.cm-badge{ font-size:9.5px; letter-spacing:0.04em; text-transform:uppercase; color:var(--agent-2); background:var(--agent-bg); border-radius:5px; padding:2px 6px; font-weight:600; white-space:nowrap; }
.cm-merge{ font-size:9.5px; color:var(--blue); background:oklch(0.700 0.105 245 / 0.14); border-radius:5px; padding:2px 6px; font-family:var(--mono); }
.cm-right{ display:flex; align-items:center; gap:14px; flex:none; }
.ci-dot{ display:grid; place-items:center; width:18px; height:18px; border-radius:50%; }
.ci-ok{ color:var(--add); background:oklch(0.745 0.082 165 / 0.14); }
.ci-bad{ color:var(--del); background:oklch(0.700 0.140 25 / 0.14); }
.cm-stat{ display:inline-flex; gap:7px; font-size:11.5px; font-variant-numeric:tabular-nums; }
.cm-time{ font-size:11px; color:var(--tx-3); white-space:nowrap; font-variant-numeric:tabular-nums; }
.cm-hash{ display:inline-flex; align-items:center; gap:3px; font-size:11.5px; color:var(--tx-2); cursor:pointer;
  background:var(--bg-2); border:1px solid var(--line); border-radius:7px; padding:4px 8px; transition:all .12s var(--ease); font-variant-numeric:tabular-nums; }
.cm-row:hover .cm-hash{ border-color:var(--agent-dim); color:var(--agent-2); background:var(--agent-bg); }
.cm-hash svg{ opacity:0.6; }

/* ═══════════════════════ COMMIT DETAIL ═══════════════════════ */
.cd{ flex:1; min-height:0; display:flex; flex-direction:column; }
.cd-topbar{ flex:none; height:44px; display:flex; align-items:center; justify-content:space-between; padding:0 18px; border-bottom:1px solid var(--line); }
.cd-back{ display:inline-flex; align-items:center; gap:6px; border:none; background:none; color:var(--tx-2); font-size:13px; font-weight:500; cursor:pointer; padding:5px 9px 5px 5px; border-radius:7px; transition:color .12s var(--ease), background .12s var(--ease); }
.cd-back:hover{ color:var(--tx); background:var(--bg-1); }
.cd-branch{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:var(--tx-3); }

.cd-scroll{ flex:1; min-height:0; overflow-y:auto; }
.cd-inner{ max-width:820px; margin:0 auto; padding:28px 28px 120px; }

.cd-head{ padding-bottom:20px; border-bottom:1px solid var(--line); }
.cd-message{ margin:0 0 13px; font-size:21px; font-weight:600; letter-spacing:-0.022em; line-height:1.3; text-wrap:pretty; }
.cd-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; color:var(--tx-3); font-variant-numeric:tabular-nums; }
.cd-meta > span{ white-space:nowrap; }
.cd-sep{ color:var(--tx-3); }
.cd-commit-hash{ color:var(--tx-2); }
.cd-parent{ color:var(--tx-4); }
.cd-pr{ display:inline-flex; align-items:center; gap:4px; color:var(--blue); }
.cd-ci{ display:inline-flex; align-items:center; gap:4px; }
.cd-ci.ok{ color:var(--add); }
.cd-ci.bad{ color:var(--del); }
.cd-stat{ display:inline-flex; gap:7px; }

.cd-session-bar{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin:22px 0 4px; padding:13px 16px; background:var(--bg-1); border:1px solid var(--line); border-radius:11px; box-shadow:var(--hl); }
.csb-left{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.csb-label{ font-size:9.5px; letter-spacing:0.1em; color:var(--agent-2); font-weight:600; white-space:nowrap; }
.csb-trigger{ font-size:12.5px; color:var(--tx-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.csb-stats{ display:flex; align-items:center; gap:14px; font-size:11.5px; color:var(--tx-3); flex:none; font-variant-numeric:tabular-nums; }
.csb-stats span{ display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.csb-stats svg{ color:var(--tx-4); }
.csb-div{ width:1px; height:13px; background:var(--line-2); padding:0 !important; }
.csb-cost{ color:var(--cost-2) !important; }
.csb-cost svg{ color:var(--cost) !important; }

.cd-section-title{ display:flex; align-items:baseline; gap:10px; margin:28px 0 14px; font-size:13px; font-weight:600; letter-spacing:-0.01em; color:var(--tx); white-space:nowrap; }
.cd-section-meta{ font-size:11px; color:var(--tx-3); font-weight:400; font-variant-numeric:tabular-nums; white-space:nowrap; }

/* transcript */
.transcript{ position:relative; padding-left:2px; }
.tr-rail{ position:absolute; left:11px; top:14px; bottom:14px; width:1px; background:var(--line); }
.st{ display:flex; gap:13px; padding:5px 0; position:relative; }
.st-dot{ width:23px; height:23px; border-radius:50%; flex:none; display:grid; place-items:center; z-index:1;
  background:var(--bg); border:1px solid var(--line-2); }
.st-dot-prompt{ background:var(--agent-bg); border-color:var(--agent-dim); color:var(--agent-2); }
.st-dot-think{ background:var(--bg-1); border-color:var(--line); color:var(--tx-3); width:23px; height:23px; }
.st-dot-tool{ background:var(--bg-1); border-color:var(--line); }
.st-dot-commit{ background:var(--agent-bg); border-color:var(--agent-dim); color:var(--agent-2); }
.st-body{ flex:1; min-width:0; padding-top:1px; }

.st-prompt{ padding-bottom:9px; }
.st-kicker{ font-size:9.5px; letter-spacing:0.1em; color:var(--tx-3); margin-bottom:5px; }
.st-prompt-text{ font-size:13.5px; color:var(--tx); line-height:1.55; font-weight:500; letter-spacing:-0.01em; text-wrap:pretty;
  background:var(--bg-2); border:1px solid var(--line); border-left:2px solid var(--agent-dim); border-radius:0 9px 9px 0; padding:10px 13px; }

.st-think .st-body{ padding-top:3px; }
.st-think-text{ font-size:12.5px; color:var(--tx-2); line-height:1.55; text-wrap:pretty; }

.st-tool-body{ display:flex; align-items:center; gap:10px; min-height:23px; padding-top:0 !important; }
.st-tool-label{ font-size:12px; color:var(--tx); font-weight:500; flex:none; white-space:nowrap; }
.st-tool-detail{ font-size:11.5px; color:var(--tx-3); flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.st-tool-status{ flex:none; font-family:var(--mono); font-weight:600; font-size:12px; }
.st-flag .st-tool-label{ color:var(--cost-2); }

.st-commit{ padding-top:6px; }
.st-commit-row{ display:flex; align-items:center; gap:9px; }
.st-commit-label{ font-size:12.5px; font-weight:600; color:var(--tx); }
.st-commit-hash{ font-size:11.5px; color:var(--agent-2); background:var(--agent-bg); border-radius:5px; padding:2px 7px; }
.st-commit-msg{ font-size:11.5px; color:var(--tx-3); margin-top:4px; }

.cd-files{ display:flex; flex-direction:column; gap:2px; margin-bottom:14px; }
.cd-file{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 12px; border-radius:8px; background:var(--bg-1); border:1px solid var(--line); }
.cd-file-path{ font-size:12px; color:var(--tx-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cd-file-stat{ display:flex; gap:8px; font-size:11.5px; flex:none; font-variant-numeric:tabular-nums; }

.cd-human{ display:flex; align-items:center; gap:11px; padding:16px; background:var(--bg-1); border:1px solid var(--line); border-radius:11px; box-shadow:var(--hl); }
.cd-human-title{ font-size:13px; color:var(--tx); font-weight:500; }
.cd-human-sub{ font-size:12px; color:var(--tx-3); margin-top:3px; }

/* ═══════════════════ ATTRIBUTION + SESSIONS ═══════════════════ */
/* manual-link status line on a commit */
.attr-line{ display:flex; align-items:center; gap:9px; margin:18px 0 4px; padding:10px 13px; border-radius:10px; font-size:12.5px; }
.attr-manual{ background:var(--agent-bg); border:1px solid var(--agent-dim); color:var(--tx); }
.attr-manual svg{ color:var(--agent-2); }
.attr-manual b{ font-weight:600; color:var(--agent-2); }
.attr-unlink{ margin-left:auto; border:1px solid var(--line-2); background:var(--bg-2); color:var(--tx-2); font-size:11.5px; font-weight:500; padding:4px 11px; border-radius:7px; cursor:pointer; transition:all .12s var(--ease); }
.attr-unlink:hover{ color:var(--del); border-color:oklch(0.700 0.140 25 / 0.5); }

/* sibling commits (one session → many commits) */
.sib{ margin:18px 0 4px; border:1px solid var(--line); border-radius:11px; overflow:hidden; background:var(--bg-1); box-shadow:var(--hl); }
.sib-head{ display:flex; align-items:center; gap:8px; padding:11px 14px; font-size:12.5px; font-weight:600; color:var(--tx); background:var(--bg-2); border-bottom:1px solid var(--line); white-space:nowrap; }
.sib-count{ margin-left:auto; font-size:11px; color:var(--tx-3); background:var(--bg); border:1px solid var(--line); border-radius:5px; padding:1px 7px; font-variant-numeric:tabular-nums; }
.sib-list{ display:flex; flex-direction:column; }
.sib-row{ display:flex; align-items:center; gap:11px; padding:10px 14px; border:none; border-top:1px solid var(--line); background:none; cursor:pointer; text-align:left; transition:background .12s var(--ease); width:100%; }
.sib-row:first-child{ border-top:none; }
.sib-row:hover{ background:var(--bg-2); }
.sib-hash{ font-size:11.5px; color:var(--agent-2); background:var(--agent-bg); border-radius:5px; padding:2px 7px; flex:none; }
.sib-msg{ flex:1; min-width:0; font-size:12.5px; color:var(--tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-0.01em; }
.sib-manual{ display:inline-flex; align-items:center; gap:3px; font-size:10px; color:var(--agent-2); background:var(--agent-bg); border-radius:5px; padding:2px 6px; flex:none; }
.sib-stat{ display:inline-flex; gap:6px; font-size:11px; flex:none; font-variant-numeric:tabular-nums; }

/* open full session button */
.cd-viewfull{ display:flex; align-items:center; gap:12px; margin:16px 0 6px; }
.viewfull-btn{ display:inline-flex; align-items:center; gap:7px; border:1px solid var(--agent-dim); background:var(--agent-bg); color:var(--agent-2); font-size:12.5px; font-weight:500; padding:7px 13px; border-radius:8px; cursor:pointer; box-shadow:var(--hl); transition:all .12s var(--ease); white-space:nowrap; flex:none; }
.viewfull-btn:hover{ background:oklch(0.625 0.170 278 / 0.2); }
.viewfull-hint{ font-size:11px; color:var(--tx-4); }

/* unattributed commit → link affordance */
.cd-unattr{ margin-top:22px; }
.attr-link-btn{ display:inline-flex; align-items:center; gap:8px; margin-top:14px; border:1px solid var(--line-2); background:var(--bg-2); color:var(--tx); font-size:12.5px; font-weight:500; padding:8px 14px; border-radius:9px; cursor:pointer; box-shadow:var(--hl); transition:all .12s var(--ease); white-space:nowrap; }
.attr-link-btn:hover{ border-color:var(--agent-dim); color:var(--agent-2); background:var(--agent-bg); }
.attr-link-btn svg{ color:var(--agent-2); }

/* ── session detail header bits ── */
.sd-kind{ display:inline-flex; align-items:center; gap:6px; font-size:10px; font-weight:600; letter-spacing:0.08em; color:var(--agent-2); margin-bottom:11px; white-space:nowrap; }
.sd-message{ font-size:18px !important; }
.sd-agent{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--agent-2); font-weight:500; }
.sd-agent .cm-agent-ic{ width:18px; height:18px; }

/* ── orphan card ── */
.orphan-card{ margin:18px 0 4px; padding:15px 16px; border-radius:12px; border:1px solid oklch(0.800 0.085 85 / 0.32); background:linear-gradient(180deg, var(--cost-bg), transparent 85%); box-shadow:var(--hl); }
.orphan-abandoned{ border-color:var(--line-2); background:var(--bg-1); }
.orphan-explored{ border-color:var(--line-2); background:var(--bg-1); }
.orphan-top{ display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.orphan-badge{ display:inline-flex; align-items:center; gap:4px; font-size:9.5px; font-weight:600; letter-spacing:0.06em; color:var(--cost-2); background:var(--cost-bg); border:1px solid oklch(0.800 0.085 85 / 0.35); border-radius:6px; padding:3px 8px; }
.orphan-abandoned .orphan-badge, .orphan-explored .orphan-badge{ color:var(--tx-3); background:var(--bg-2); border-color:var(--line); }
.orphan-outcome{ font-size:13px; font-weight:600; color:var(--tx); letter-spacing:-0.01em; }
.orphan-note{ margin:0 0 14px; font-size:12.5px; line-height:1.6; color:var(--tx-2); text-wrap:pretty; }
.orphan-actions{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.orphan-actions .attr-link-btn{ margin-top:0; }
.orphan-spend{ font-size:11.5px; color:var(--tx-3); font-variant-numeric:tabular-nums; }

/* ── agents view spend header ── */
.agents-spend{ min-width:264px; }
.aspend-row{ display:flex; align-items:baseline; gap:8px; justify-content:flex-end; }
.aspend-total{ font-size:18px; font-weight:600; color:var(--tx); letter-spacing:-0.02em; font-variant-numeric:tabular-nums; }
.aspend-label{ font-size:11px; color:var(--tx-3); white-space:nowrap; }
.aspend-bar{ height:5px; border-radius:3px; background:var(--cost); overflow:hidden; margin:9px 0 8px; }
.aspend-bar span{ display:block; height:100%; background:var(--agent); border-radius:3px; }
.aspend-legend{ display:flex; gap:14px; justify-content:flex-end; font-size:11px; color:var(--tx-2); font-variant-numeric:tabular-nums; }
.aspend-legend span{ display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }

/* ── session row ── */
.se-row{ align-items:flex-start; }
.se-dot{ width:9px; height:9px; border-radius:50%; flex:none; margin-top:4px; }
.se-dot-shipped{ background:var(--agent); box-shadow:0 0 0 3px var(--agent-bg); }
.se-dot-superseded{ background:var(--cost); box-shadow:0 0 0 3px var(--cost-bg); }
.se-dot-abandoned{ background:transparent; border:1.5px solid var(--line-3); }
.se-dot-explored{ background:transparent; border:1.5px solid oklch(0.800 0.085 85 / 0.5); }
.se-orphan{ opacity:0.92; }
.se-top{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.se-agent{ font-size:13px; font-weight:600; color:var(--tx); letter-spacing:-0.01em; white-space:nowrap; }
.se-outcome{ font-size:10px; font-weight:600; letter-spacing:0.02em; padding:2px 7px; border-radius:5px; white-space:nowrap; }
.se-outcome-shipped{ color:var(--agent-2); background:var(--agent-bg); }
.se-outcome-superseded{ color:var(--cost-2); background:var(--cost-bg); }
.se-outcome-abandoned{ color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); }
.se-outcome-explored{ color:var(--cost-2); background:var(--cost-bg); }
.se-task{ font-size:12px; color:var(--tx-3); margin-top:5px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.se-dur{ display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--tx-3); white-space:nowrap; font-variant-numeric:tabular-nums; }
.se-dur svg{ color:var(--tx-4); }
.se-cost{ display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--tx-2); white-space:nowrap; font-variant-numeric:tabular-nums; }
.se-cost svg{ color:var(--tx-4); }
.se-cost-orphan{ color:var(--cost-2); }
.se-cost-orphan svg{ color:var(--cost); }

/* ── link picker modal ── */
.lp-scrim{ position:fixed; inset:0; background:oklch(0.10 0.01 277 / 0.6); z-index:70; }
.lp{ position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:min(520px, 92vw); max-height:80vh;
  display:flex; flex-direction:column; background:var(--bg-1); border:1px solid var(--line-2); border-radius:14px; z-index:71;
  box-shadow:0 30px 80px -30px oklch(0 0 0 / 0.8); overflow:hidden; }
.lp-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 18px 13px; border-bottom:1px solid var(--line); }
.lp-title{ font-size:14.5px; font-weight:600; letter-spacing:-0.01em; }
.lp-sub{ font-size:11px; color:var(--tx-3); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:360px; }
.lp-note{ font-size:12px; color:var(--tx-3); line-height:1.5; padding:12px 18px; border-bottom:1px solid var(--line); }
.lp-list{ overflow-y:auto; padding:8px; display:flex; flex-direction:column; gap:3px; }
.lp-row{ display:flex; align-items:center; gap:11px; padding:10px 11px; border:1px solid transparent; background:none; border-radius:9px; cursor:pointer; text-align:left; transition:background .12s var(--ease), border-color .12s var(--ease); }
.lp-row:hover{ background:var(--bg-2); border-color:var(--line-2); }
.lp-row-ic{ width:24px; height:24px; border-radius:7px; display:grid; place-items:center; flex:none; background:var(--agent-bg); color:var(--agent-2); }
.lp-row-ic-commit{ background:var(--bg-3); color:var(--tx-2); }
.lp-row-body{ flex:1; min-width:0; }
.lp-row-top{ display:flex; align-items:center; gap:8px; }
.lp-row-agent{ font-size:13px; font-weight:600; color:var(--tx); white-space:nowrap; letter-spacing:-0.01em; flex:none; }
.lp-orphan-tag{ font-size:9.5px; color:var(--cost-2); background:var(--cost-bg); border-radius:5px; padding:2px 6px; white-space:nowrap; }
.lp-linked-tag{ font-size:9.5px; color:var(--tx-3); background:var(--bg-3); border-radius:5px; padding:2px 6px; white-space:nowrap; }
.lp-row-task{ font-size:11px; color:var(--tx-3); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lp-row-cost{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:var(--tx-2); flex:none; font-variant-numeric:tabular-nums; }
.lp-row-cost svg{ color:var(--tx-4); }
.lp-empty{ padding:24px; text-align:center; font-size:12.5px; color:var(--tx-3); }

/* ═══════════════════ GLOBAL SCOPE — org + repos ═══════════════════ */
.org-crumb{ display:flex; align-items:center; gap:9px; }
.crumb-org{ font-size:13px; color:var(--tx-2); font-weight:500; }
.repo-switch{ position:relative; }
.repo-switch-btn{ display:inline-flex; align-items:center; gap:7px; background:var(--bg-1); border:1px solid var(--line); color:var(--tx-2); border-radius:7px; padding:5px 9px; font-size:12px; cursor:pointer; transition:border-color .12s var(--ease); white-space:nowrap; }
.repo-switch-btn:hover{ border-color:var(--line-2); color:var(--tx); }
.repo-switch-btn .mono{ font-size:11.5px; }
.repo-dot{ width:8px; height:8px; border-radius:3px; flex:none; }
.rs-scrim{ position:fixed; inset:0; z-index:44; }
.rs-menu{ position:absolute; top:calc(100% + 6px); left:0; z-index:45; width:268px; background:var(--bg-2); border:1px solid var(--line-2); border-radius:11px; box-shadow:0 24px 60px -24px oklch(0 0 0 / 0.75); padding:6px; }
.rs-item{ width:100%; display:flex; align-items:center; gap:9px; border:none; background:none; cursor:pointer; padding:8px 9px; border-radius:8px; text-align:left; transition:background .12s var(--ease); }
.rs-item:hover{ background:var(--bg-3); }
.rs-item.on{ background:var(--agent-bg); }
.rs-item-name{ font-size:12.5px; color:var(--tx); font-weight:500; flex:none; white-space:nowrap; }
.rs-item-desc{ font-size:11px; color:var(--tx-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rs-item-meta{ margin-left:auto; font-size:10.5px; color:var(--tx-3); background:var(--bg); border:1px solid var(--line); border-radius:5px; padding:1px 6px; }
.rs-div{ height:1px; background:var(--line); margin:5px 8px; }

.repo-badge{ display:inline-flex; align-items:center; gap:5px; flex:none; }
.repo-badge .repo-dot{ width:7px; height:7px; border-radius:2.5px; }
.repo-name{ font-size:10.5px; color:var(--tx-2); }
.repo-badge-sm .repo-name{ font-size:10.5px; }

.scope-note{ display:flex; align-items:center; gap:10px; margin:14px 0 0; padding:9px 13px; background:var(--bg-1); border:1px solid var(--line); border-radius:9px; font-size:12px; color:var(--tx-3); }
.scope-clear{ margin-left:auto; border:1px solid var(--line-2); background:var(--bg-2); color:var(--tx-2); font-size:11px; font-weight:500; padding:4px 10px; border-radius:7px; cursor:pointer; transition:color .12s var(--ease), border-color .12s var(--ease); }
.scope-clear:hover{ color:var(--agent-2); border-color:var(--agent-dim); }

/* ── prompt authorship + resume divider ── */
.st-prompt-head{ display:flex; align-items:center; gap:9px; margin-bottom:6px; }
.pby{ display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--tx-2); white-space:nowrap; }
.pby-system{ color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:5px; padding:2px 7px; }
.pby-system svg{ color:var(--tx-4); }
.st-resume{ display:flex; align-items:center; gap:9px; margin:14px 0 8px; padding-left:3px; }
.st-resume-ic{ width:23px; height:23px; border-radius:50%; display:grid; place-items:center; background:var(--cost-bg); border:1px solid oklch(0.800 0.085 85 / 0.4); color:var(--cost-2); flex:none; }
.st-resume-text{ font-size:12px; color:var(--tx-2); }
.st-resume-text b{ color:var(--cost-2); font-weight:600; }
.st-resume-from{ color:var(--tx-3); }

/* ── user-messages filter toggle ── */
.tr-title{ justify-content:space-between; }
.tr-toggle{ display:flex; gap:1px; background:var(--bg-1); border:1px solid var(--line); border-radius:8px; padding:2px; box-shadow:var(--hl); }
.tr-toggle button{ display:inline-flex; align-items:center; gap:6px; border:none; background:none; color:var(--tx-3); font-size:11.5px; font-weight:500; padding:4px 10px; border-radius:6px; cursor:pointer; transition:color .12s var(--ease); white-space:nowrap; }
.tr-toggle button.on{ background:var(--bg-3); color:var(--tx); box-shadow:var(--hl); }
.tr-toggle button:hover:not(.on){ color:var(--tx-2); }
.trt-count{ font-size:10px; color:var(--tx-4); }
.tr-toggle button.on .trt-count{ color:var(--agent-2); }

/* ── prompts-only view ── */
.prompts-only{ display:flex; flex-direction:column; gap:9px; }
.po-row{ padding:12px 14px; background:var(--bg-1); border:1px solid var(--line); border-left:2px solid var(--agent-dim); border-radius:0 10px 10px 0; box-shadow:var(--hl); }
.po-resume{ border-left-color:oklch(0.800 0.085 85 / 0.5); }
.po-meta{ display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.po-turn{ font-size:9.5px; letter-spacing:0.08em; color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:5px; padding:2px 7px; }
.po-resume-tag{ display:inline-flex; align-items:center; gap:3px; font-size:9.5px; color:var(--cost-2); background:var(--cost-bg); border-radius:5px; padding:2px 6px; }
.po-text{ font-size:13.5px; color:var(--tx); line-height:1.55; letter-spacing:-0.01em; text-wrap:pretty; }

/* ── session detail people / global ── */
.sd-global{ display:inline-flex; align-items:center; gap:4px; margin-left:8px; color:var(--blue); font-size:9.5px; letter-spacing:0.04em; }
.sd-people{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:16px 0 4px; padding:11px 14px; background:var(--bg-1); border:1px solid var(--line); border-radius:11px; box-shadow:var(--hl); }
.sd-people-label{ font-size:10.5px; color:var(--tx-3); background:var(--bg-2); border:1px solid var(--line); border-radius:6px; padding:3px 8px; white-space:nowrap; }
.sd-people-list{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.sd-person{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--tx); font-weight:500; white-space:nowrap; }
.sd-person-role{ font-size:10px; color:var(--tx-3); font-weight:400; background:var(--bg-2); border-radius:5px; padding:1px 6px; }
.sd-resumed-tag{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-size:10.5px; color:var(--cost-2); background:var(--cost-bg); border:1px solid oklch(0.800 0.085 85 / 0.35); border-radius:6px; padding:3px 8px; white-space:nowrap; }

.sib-xrepo{ margin-left:8px; font-size:10px; color:var(--blue); background:oklch(0.700 0.105 245 / 0.14); border-radius:5px; padding:1px 7px; }
.st-commit-row{ flex-wrap:wrap; }

/* ── agents list extras ── */
.se-foot{ display:flex; align-items:center; gap:10px; margin-top:7px; flex-wrap:wrap; }
.se-turns{ font-size:10.5px; color:var(--tx-3); }
.se-global{ display:inline-flex; align-items:center; gap:3px; font-size:9.5px; color:var(--blue); background:oklch(0.700 0.105 245 / 0.14); border-radius:5px; padding:2px 6px; white-space:nowrap; }
.se-resumed{ display:inline-flex; align-items:center; gap:3px; font-size:9.5px; color:var(--cost-2); background:var(--cost-bg); border-radius:5px; padding:2px 6px; white-space:nowrap; }
