/* ============================================================
   Conversion model components — GoalJourney · FactsPanel · OfferingField
   §4: done = neutral (never green) · current = brand accent ·
   pivot / warn = amber (never red) · AI sources show the Ai mark.
   Used by both the Lead dashboard (cockpit) and the Inbox context panel.
   ============================================================ */

/* ---------- GoalJourney ---------- */
.goal-journey { display: flex; flex-direction: column; }
.gj-node { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.gj-rail { display: flex; flex-direction: column; align-items: center; }
.gj-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--muted);
}
.gj-line { flex: 1; width: 2px; background: var(--border); margin: 3px 0; min-height: 14px; }
.gj-body { padding-bottom: 16px; min-width: 0; }
.gj-node:last-child .gj-body { padding-bottom: 0; }
.gj-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gj-title { font-size: 12.5px; font-weight: 600; color: var(--fg); }
.gj-outcome { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.gj-planned { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.gj-now {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--brand); background: color-mix(in oklch, var(--brand) 12%, transparent);
  padding: 1px 7px; border-radius: 999px;
}
.gj-note { font-size: 11px; color: var(--warn); margin-top: 4px; font-weight: 500; }

/* done — neutral, filled grey dot with check */
.gj-node.done .gj-dot { background: var(--sunken); border-color: var(--border); color: var(--muted); }
.gj-node.done .gj-title { color: var(--muted); }
/* current — brand ring */
.gj-node.current .gj-dot {
  border-color: var(--brand); background: color-mix(in oklch, var(--brand) 14%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 14%, transparent);
}
.gj-node.current .gj-title { color: var(--fg-strong); font-weight: 700; }
/* next — hollow grey */
.gj-node.next .gj-dot { background: transparent; border-style: dashed; border-color: var(--border); }
.gj-node.next .gj-title { color: var(--dim); }
/* warn (e.g. disqualified note on a done node) — amber dot */
.gj-node.warn .gj-dot { border-color: var(--warn); color: var(--warn); }

/* micro stage bar for the current goal */
.gj-stages { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.gj-stage { display: inline-flex; flex-direction: column; gap: 4px; min-width: 46px; }
.gj-stage i { display: block; height: 4px; border-radius: 999px; background: var(--border); }
.gj-stage label { font-size: 9.5px; color: var(--dim); white-space: nowrap; }
.gj-stage.done i { background: color-mix(in oklch, var(--brand) 45%, var(--border)); }
.gj-stage.done label { color: var(--muted); }
.gj-stage.active i { background: var(--brand); }
.gj-stage.active label { color: var(--brand); font-weight: 700; }

/* pivot row */
.gj-pivot {
  display: flex; align-items: flex-start; gap: 9px; margin: 0 0 16px;
  padding: 8px 11px; border-radius: var(--r-sm, 8px);
  background: color-mix(in oklch, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in oklch, var(--warn) 26%, transparent);
}
.gj-pivot-ic { color: var(--warn); flex: none; margin-top: 1px; }
.gj-pivot-txt { font-size: 11px; color: var(--fg); line-height: 1.45; }
.gj-pivot-txt b { font-weight: 700; color: var(--fg-strong); }
.gj-pivot-reason { color: var(--muted); }

.goal-journey.compact .gj-body { padding-bottom: 12px; }
.goal-journey.compact .gj-title { font-size: 12px; }

/* ---------- GoalJourneyStepper (horizontal stage stepper, grouped by goal) ---------- */
.gj-stepper-grouped { display: flex; align-items: stretch; gap: 18px; overflow-x: auto; padding: 6px 2px 4px; }
.gjs-group { display: flex; flex-direction: column; min-width: 0; }
.gjs-bracket { position: relative; height: 16px; margin: 0 6px 9px; }
.gjs-bracket::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; border: 1.5px solid var(--border); border-bottom: none; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.gjs-glabel { position: relative; z-index: 1; display: block; width: fit-content; max-width: 100%; margin: 0 auto; padding: 0 7px; text-align: center; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gjs-group.warn.current .gjs-bracket::after { border-color: color-mix(in oklch, var(--warn) 50%, var(--border)); }
.gjs-group.warn.current .gjs-glabel { color: var(--warn); }
.gjs-steps { display: flex; }
.gjs-step { flex: 1 1 0; min-width: 80px; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.gjs-rail { position: relative; width: 100%; height: 16px; display: flex; align-items: center; justify-content: center; }
.gjs-line { position: absolute; right: 50%; top: 50%; width: 100%; height: 2px; transform: translateY(-50%); background: var(--border); }
.gjs-step.done .gjs-line, .gjs-step.active .gjs-line { background: var(--brand); }
.gjs-step.future .gjs-line { background: none; border-top: 2px dashed var(--border); height: 0; }
.gjs-dot { position: relative; z-index: 1; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--brand-fg); flex-shrink: 0; }
.gjs-step.done .gjs-dot { background: var(--brand); border-color: var(--brand); }
.gjs-step.active .gjs-dot { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gjs-step.warn.done .gjs-dot { background: var(--warn); border-color: var(--warn); }
.gjs-step.warn.active .gjs-dot { background: var(--surface); box-shadow: 0 0 0 3px var(--warn-bg); }
.gjs-label { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-top: 7px; line-height: 1.3; padding: 0 5px; }
.gjs-step.done .gjs-label { color: var(--fg); }
.gjs-step.active .gjs-label { color: var(--fg-strong); font-weight: 700; }
.ld-journey-card .ld-stagetasks { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }

/* ---------- FactsPanel ---------- */
.facts-panel { display: flex; flex-direction: column; }
.facts-h {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 10px; display: flex; flex-direction: column; gap: 2px;
}
.facts-cap { text-transform: none; font-weight: 500; letter-spacing: 0; color: var(--dim); font-size: 10.5px; }
.facts-list { display: flex; flex-direction: column; gap: 7px; }
.fact-row { display: grid; grid-template-columns: 16px 1fr; gap: 9px; align-items: start; }
.fact-ic { display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; flex: none; }
.fact-label { font-size: 12px; color: var(--fg); line-height: 1.4; }
.fact-row.true .fact-ic { color: var(--brand); }
.fact-row.pending .fact-ic { color: var(--warn); }
.fact-row.pending .fact-label { color: var(--muted); }
.fact-row.unknown .fact-ic { color: var(--dim); }
.fact-row.unknown .fact-label { color: var(--dim); }

/* ---------- OfferingField ---------- */
.offering-field {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md, 10px);
  background: var(--sunken);
}
.off-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.off-value { font-size: 13.5px; font-weight: 700; color: var(--fg-strong); }
.off-none { font-style: italic; font-weight: 500; color: var(--dim); }
.off-was { font-size: 11px; font-weight: 500; color: var(--muted); }
.off-src { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.offering-field.compact { padding: 8px 10px; }
