/* GitHub issue auto-fix wizard (static/issue-flow.js).
 *
 * Self-contained: every colour is a scoped --if-* token, so the wizard looks
 * the same on the dashboard and on the Queues board, which carry different
 * variable sets. The entry-point styles at the bottom (starter card, Queues
 * button, coach mark) live outside the scrim and use the same tokens.
 */
.iflow-scrim,
.iflow-starter,
.iflow-coach,
.iflow-coach-ring {
  --if-bg: #0b0f15;
  --if-panel: #10151c;
  --if-raised: #171d27;
  --if-sunken: #0a0e13;
  --if-line: #263041;
  --if-line-soft: #1c2430;
  --if-text: #e6edf3;
  --if-dim: #8d99a8;
  --if-faint: #647080;
  --if-accent: #7aa2ff;
  --if-accent-ink: #0b1220;
  --if-accent-soft: rgba(122, 162, 255, 0.13);
  --if-teal: #39d2c0;
  --if-green: #3fb950;
  --if-green-soft: rgba(63, 185, 80, 0.12);
  --if-amber: #e3b341;
  --if-amber-soft: rgba(227, 179, 65, 0.11);
  --if-red: #f85149;
  --if-red-soft: rgba(248, 81, 73, 0.11);
  --if-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --if-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] .iflow-scrim,
:root[data-theme="light"] .iflow-starter,
:root[data-theme="light"] .iflow-coach,
:root[data-theme="light"] .iflow-coach-ring {
  --if-bg: #eef1f5;
  --if-panel: #ffffff;
  --if-raised: #f5f7fa;
  --if-sunken: #f0f3f7;
  --if-line: #d3dae3;
  --if-line-soft: #e4e9ef;
  --if-text: #1b2230;
  --if-dim: #586474;
  --if-faint: #7c8796;
  --if-accent: #2f5fd6;
  --if-accent-ink: #ffffff;
  --if-accent-soft: rgba(47, 95, 214, 0.09);
  --if-teal: #0e7f74;
  --if-green: #1a7f37;
  --if-green-soft: rgba(26, 127, 55, 0.09);
  --if-amber: #8f6200;
  --if-amber-soft: rgba(154, 103, 0, 0.09);
  --if-red: #c5222c;
  --if-red-soft: rgba(207, 34, 46, 0.07);
  --if-shadow: 0 30px 80px rgba(20, 30, 50, 0.25);
}

/* ── Shell ─────────────────────────────────────────────────────────── */
.iflow-scrim {
  position: fixed; inset: 0; z-index: 100050;
  display: grid; place-items: center; padding: 16px;
  background: rgba(3, 6, 10, 0.66);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  font: 13.5px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--if-text);
  animation: iflow-fade 0.16s ease-out;
}
.iflow-scrim *, .iflow-scrim *::before, .iflow-scrim *::after { box-sizing: border-box; }
.iflow {
  width: min(980px, 100%); height: min(780px, 100%);
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  background:
    radial-gradient(900px 260px at 12% -8%, rgba(122, 162, 255, 0.16), transparent 62%),
    radial-gradient(700px 240px at 96% -12%, rgba(57, 210, 192, 0.10), transparent 60%),
    var(--if-panel);
  border: 1px solid var(--if-line); border-radius: 16px;
  box-shadow: var(--if-shadow); overflow: hidden;
  animation: iflow-rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes iflow-fade { from { opacity: 0; } }
@keyframes iflow-rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }

.iflow-head { display: flex; align-items: center; gap: 13px; padding: 18px 22px 4px; }
.iflow-bolt {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center; color: var(--if-accent-ink);
  background: linear-gradient(135deg, var(--if-accent), var(--if-teal));
  box-shadow: 0 6px 18px rgba(122, 162, 255, 0.28);
}
.iflow-bolt svg { width: 20px; height: 20px; }
.iflow-head h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.iflow-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--if-dim); }
.iflow-head-text { flex: 1; min-width: 0; }
.iflow-x {
  width: 30px; height: 30px; flex: none; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--if-dim);
  font-size: 19px; line-height: 1; display: grid; place-items: center; padding: 0;
}
.iflow-x:hover { background: var(--if-raised); border-color: var(--if-line); color: var(--if-text); }

/* ── Pipeline ──────────────────────────────────────────────────────── */
.iflow-pipe {
  display: flex; align-items: flex-start; padding: 16px 26px 14px;
  border-bottom: 1px solid var(--if-line-soft);
}
.iflow-node { flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.iflow-node-dot {
  position: relative; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--if-raised); border: 1px solid var(--if-line); color: var(--if-faint);
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.iflow-node-dot svg { width: 21px; height: 21px; }
.iflow-node-label { margin-top: 7px; font-size: 11.5px; font-weight: 600; color: var(--if-dim); transition: color 0.25s; }
.iflow-node-cap {
  margin-top: 1px; max-width: 100%; min-height: 15px; font: 10.5px var(--if-mono);
  color: var(--if-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iflow-node.is-focus .iflow-node-dot {
  color: var(--if-accent); border-color: var(--if-accent);
  background: var(--if-accent-soft); box-shadow: 0 0 0 4px var(--if-accent-soft);
}
.iflow-node.is-focus .iflow-node-label { color: var(--if-text); }
.iflow-node.is-live .iflow-node-dot {
  color: var(--if-accent); border-color: var(--if-accent); background: var(--if-accent-soft);
  animation: iflow-pulse 1.5s ease-in-out infinite;
}
.iflow-node.is-live .iflow-node-label { color: var(--if-text); }
.iflow-node.is-done .iflow-node-dot { color: var(--if-green); border-color: rgba(63, 185, 80, 0.5); background: var(--if-green-soft); }
.iflow-node.is-done .iflow-node-label { color: var(--if-text); }
.iflow-node-tick {
  position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; border-radius: 50%;
  display: none; place-items: center; background: var(--if-green); color: #06130a;
  border: 2px solid var(--if-panel);
}
.iflow-node-tick svg { width: 9px; height: 9px; }
.iflow-node.is-done .iflow-node-tick { display: grid; animation: iflow-pop 0.28s cubic-bezier(0.3, 1.5, 0.5, 1); }
.iflow-link {
  position: relative; flex: 1 1 0; min-width: 14px; height: 2px; margin-top: 21px;
  border-radius: 2px; background: var(--if-line); overflow: hidden; transition: background 0.3s;
}
.iflow-link.is-done { background: rgba(63, 185, 80, 0.55); }
.iflow-link.is-flow::after,
.iflow-pipe.is-demo .iflow-link::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%;
  background: linear-gradient(90deg, transparent, var(--if-accent), var(--if-teal), transparent);
  animation: iflow-travel 1.25s linear infinite;
}
/* Intro: one packet walks the whole pipe, node by node. */
.iflow-pipe.is-demo .iflow-link::after { animation: iflow-demo-link 6s linear infinite; animation-delay: calc(var(--i) * 1.2s); }
.iflow-pipe.is-demo .iflow-node-dot { animation: iflow-demo-node 6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s - 0.25s); }
@keyframes iflow-travel { to { left: 100%; } }
@keyframes iflow-demo-link { 0% { left: -45%; } 20%, 100% { left: 100%; } }
@keyframes iflow-demo-node {
  0%, 22%, 100% { color: var(--if-faint); border-color: var(--if-line); background: var(--if-raised); box-shadow: none; transform: none; }
  6%, 14% { color: var(--if-accent); border-color: var(--if-accent); background: var(--if-accent-soft); box-shadow: 0 0 0 5px var(--if-accent-soft); transform: translateY(-2px); }
}
@keyframes iflow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122, 162, 255, 0.42); }
  55% { box-shadow: 0 0 0 9px rgba(122, 162, 255, 0); }
}
@keyframes iflow-pop { from { transform: scale(0); } }

/* ── Body: steps rail + pane ───────────────────────────────────────── */
.iflow-body { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 0; }
.iflow-steps {
  margin: 0; padding: 18px 12px 18px 18px; list-style: none;
  border-right: 1px solid var(--if-line-soft); overflow-y: auto;
}
.iflow-step {
  position: relative; display: flex; gap: 11px; width: 100%; padding: 7px 8px 15px;
  border: 0; border-radius: 9px; background: none; color: var(--if-dim);
  font: inherit; text-align: left; cursor: default;
}
.iflow-step::before {
  content: ''; position: absolute; left: 19px; top: 31px; bottom: -3px; width: 2px;
  background: var(--if-line); border-radius: 2px;
}
.iflow-steps li:last-child .iflow-step::before { display: none; }
.iflow-step-num {
  position: relative; z-index: 1; width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--if-raised); border: 1px solid var(--if-line); color: var(--if-dim);
}
.iflow-step-num svg { width: 11px; height: 11px; }
.iflow-step-name { display: block; font-size: 13px; font-weight: 600; line-height: 24px; }
.iflow-step-sub {
  display: block; font: 11px var(--if-mono); color: var(--if-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px;
}
.iflow-step.is-current { color: var(--if-text); }
.iflow-step.is-current .iflow-step-num { background: var(--if-accent); border-color: var(--if-accent); color: var(--if-accent-ink); }
.iflow-step.is-done { cursor: pointer; }
.iflow-step.is-done:hover { background: var(--if-raised); }
.iflow-step.is-done .iflow-step-num { background: var(--if-green-soft); border-color: rgba(63, 185, 80, 0.5); color: var(--if-green); }
.iflow-step.is-done::before { background: rgba(63, 185, 80, 0.45); }

.iflow-pane { padding: 22px 26px 24px; overflow-y: auto; min-width: 0; }
.iflow-pane > :first-child { margin-top: 0; }
.iflow-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--if-accent); }
.iflow-h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.iflow-lead { margin: 0 0 18px; color: var(--if-dim); font-size: 13.5px; max-width: 62ch; }
.iflow-h3 { margin: 20px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--if-dim); }
.iflow-pane code, .iflow-coach code {
  font: 12px var(--if-mono); padding: 1.5px 5px; border-radius: 5px;
  background: var(--if-sunken); border: 1px solid var(--if-line-soft); color: var(--if-text);
}
.iflow-pane a { color: var(--if-accent); text-decoration: none; }
.iflow-pane a:hover { text-decoration: underline; }
.iflow-pane a.iflow-btn:hover { text-decoration: none; }
.iflow-dim { color: var(--if-dim); }

/* How-it-works rows */
.iflow-how { display: grid; gap: 9px; margin: 0 0 4px; padding: 0; list-style: none; }
.iflow-how li { display: flex; gap: 12px; align-items: flex-start; }
.iflow-how-n {
  width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 7px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--if-accent-soft); color: var(--if-accent);
}
.iflow-how b { font-weight: 600; }

/* Cards and rows */
.iflow-card { border: 1px solid var(--if-line); border-radius: 12px; background: var(--if-raised); }
.iflow-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.iflow-row + .iflow-row { border-top: 1px solid var(--if-line-soft); }
.iflow-row-main { flex: 1; min-width: 0; }
.iflow-row-title { font-weight: 600; }
.iflow-row-sub { font-size: 12px; color: var(--if-dim); overflow-wrap: anywhere; }
.iflow-state {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--if-sunken); border: 1px solid var(--if-line); color: var(--if-faint);
}
.iflow-state svg { width: 11px; height: 11px; }
.iflow-state.is-ok { background: var(--if-green-soft); border-color: rgba(63, 185, 80, 0.5); color: var(--if-green); }
.iflow-state.is-bad { background: var(--if-red-soft); border-color: rgba(248, 81, 73, 0.5); color: var(--if-red); }
.iflow-state.is-warn { background: var(--if-amber-soft); border-color: rgba(227, 179, 65, 0.5); color: var(--if-amber); }
.iflow-state.is-run { border-color: var(--if-accent); border-top-color: transparent; background: none; animation: iflow-spin 0.7s linear infinite; }
@keyframes iflow-spin { to { transform: rotate(360deg); } }
.iflow-cmd {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 5px; padding: 4px 4px 4px 9px;
  border-radius: 7px; background: var(--if-sunken); border: 1px solid var(--if-line-soft);
  font: 12px var(--if-mono);
}

/* Buttons */
.iflow-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--if-line); background: var(--if-raised); color: var(--if-text);
  font: 600 13px/1.2 inherit; font-family: inherit; text-decoration: none;
  transition: background 0.14s, border-color 0.14s, filter 0.14s, transform 0.08s;
}
.iflow-btn:hover { border-color: var(--if-faint); text-decoration: none; }
.iflow-btn:active { transform: translateY(1px); }
.iflow-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.iflow-btn.is-primary {
  border-color: transparent; color: var(--if-accent-ink);
  background: linear-gradient(135deg, var(--if-accent), #6f8ff0);
  box-shadow: 0 6px 18px rgba(122, 162, 255, 0.24);
}
.iflow-btn.is-primary:hover:not(:disabled) { filter: brightness(1.08); }
.iflow-btn.is-go {
  border-color: transparent; color: #06130a;
  background: linear-gradient(135deg, #4ac860, var(--if-teal));
  box-shadow: 0 6px 18px rgba(63, 185, 80, 0.22);
}
.iflow-btn.is-go:hover:not(:disabled) { filter: brightness(1.07); }
.iflow-btn.is-ghost { background: none; border-color: transparent; color: var(--if-dim); }
.iflow-btn.is-ghost:hover { background: var(--if-raised); color: var(--if-text); }
.iflow-btn.is-small { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.iflow-btn.is-big { padding: 11px 20px; font-size: 14px; border-radius: 11px; }
.iflow-btn svg { width: 14px; height: 14px; }
.iflow-linklike { background: none; border: 0; padding: 0; color: var(--if-accent); font: inherit; cursor: pointer; }
.iflow-linklike:hover { text-decoration: underline; }

/* Inputs */
.iflow-field { display: block; margin: 0 0 14px; }
.iflow-field-label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--if-dim); }
.iflow-input {
  width: 100%; padding: 9px 11px; border-radius: 9px; outline: none;
  border: 1px solid var(--if-line); background: var(--if-sunken); color: var(--if-text);
  font: 13px var(--if-mono);
}
.iflow-input:focus { border-color: var(--if-accent); box-shadow: 0 0 0 3px var(--if-accent-soft); }
.iflow-input.is-bad { border-color: var(--if-red); }
.iflow-field-hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--if-faint); }
.iflow-field-hint.is-bad { color: var(--if-red); }
.iflow-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Repo picker */
.iflow-repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 232px; overflow-y: auto; padding: 2px; margin: -2px; }
.iflow-repo {
  display: block; width: 100%; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  border: 1px solid var(--if-line); background: var(--if-raised); color: var(--if-text); font: inherit;
  transition: border-color 0.14s, background 0.14s;
}
.iflow-repo:hover { border-color: var(--if-faint); }
.iflow-repo.is-on { border-color: var(--if-accent); background: var(--if-accent-soft); box-shadow: 0 0 0 1px var(--if-accent) inset; }
.iflow-repo-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.iflow-repo-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iflow-repo-slug { display: block; font: 11px var(--if-mono); color: var(--if-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iflow-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--if-line); color: var(--if-dim); background: var(--if-sunken);
}
.iflow-chip.is-ok { color: var(--if-green); border-color: rgba(63, 185, 80, 0.4); background: var(--if-green-soft); }
.iflow-chip.is-warn { color: var(--if-amber); border-color: rgba(227, 179, 65, 0.4); background: var(--if-amber-soft); }
.iflow-chip.is-bad { color: var(--if-red); border-color: rgba(248, 81, 73, 0.4); background: var(--if-red-soft); }
.iflow-chip.is-accent { color: var(--if-accent); border-color: transparent; background: var(--if-accent-soft); }
.iflow-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.iflow-empty { padding: 16px; text-align: center; color: var(--if-dim); font-size: 12.5px; }

/* Callouts */
.iflow-callout {
  display: flex; gap: 10px; margin: 12px 0 0; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--if-line); background: var(--if-raised); font-size: 12.5px;
}
.iflow-callout svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.iflow-callout.is-warn { border-color: rgba(227, 179, 65, 0.42); background: var(--if-amber-soft); }
.iflow-callout.is-warn svg { color: var(--if-amber); }
.iflow-callout.is-bad { border-color: rgba(248, 81, 73, 0.42); background: var(--if-red-soft); }
.iflow-callout.is-bad svg { color: var(--if-red); }
.iflow-callout.is-info svg { color: var(--if-accent); }
.iflow-callout-body { flex: 1; min-width: 0; }
.iflow-callout-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Option cards (radio) */
.iflow-opts { display: grid; gap: 9px; }
.iflow-opt {
  display: flex; gap: 12px; padding: 13px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--if-line); background: var(--if-raised);
  transition: border-color 0.14s, background 0.14s;
}
.iflow-opt:hover { border-color: var(--if-faint); }
.iflow-opt.is-on { border-color: var(--if-accent); background: var(--if-accent-soft); box-shadow: 0 0 0 1px var(--if-accent) inset; }
.iflow-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.iflow-radio {
  width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--if-faint); display: grid; place-items: center;
}
.iflow-opt.is-on .iflow-radio { border-color: var(--if-accent); }
.iflow-opt.is-on .iflow-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--if-accent); }
.iflow-opt:focus-within { box-shadow: 0 0 0 3px var(--if-accent-soft); }
.iflow-opt-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14px; }
.iflow-opt-desc { margin: 3px 0 0; font-size: 12.5px; color: var(--if-dim); }
.iflow-opt-extra { margin-top: 9px; }
.iflow-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; cursor: pointer; }
.iflow-check input { margin: 2px 0 0; accent-color: var(--if-accent); flex: none; }
.iflow-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--if-sunken); border: 1px solid var(--if-line); }
.iflow-seg button {
  min-width: 40px; padding: 5px 12px; border: 0; border-radius: 7px; cursor: pointer;
  background: none; color: var(--if-dim); font: 600 13px inherit; font-family: inherit;
}
.iflow-seg button.is-on { background: var(--if-accent); color: var(--if-accent-ink); }
.iflow-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.iflow-summary { margin: 16px 0 0; padding: 11px 14px; border-radius: 10px; border: 1px dashed var(--if-line); font-size: 12.5px; color: var(--if-dim); }
.iflow-summary b { color: var(--if-text); font-weight: 600; }

/* Code tabs */
.iflow-tabs { display: flex; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--if-line); }
.iflow-tab {
  padding: 8px 12px; border: 0; background: none; cursor: pointer; margin-bottom: -1px;
  color: var(--if-dim); font: 600 12.5px inherit; font-family: inherit; border-bottom: 2px solid transparent;
}
.iflow-tab.is-on { color: var(--if-text); border-bottom-color: var(--if-accent); }
.iflow-codewrap { position: relative; }
.iflow-code {
  margin: 0; padding: 14px 16px; max-height: 232px; overflow: auto;
  font: 12px/1.6 var(--if-mono); color: var(--if-text); background: var(--if-sunken);
  border-radius: 0 0 11px 11px; white-space: pre; tab-size: 2;
}
.iflow-copy { position: absolute; top: 9px; right: 10px; }
.iflow-tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.iflow-tips li { display: flex; gap: 10px; font-size: 12.5px; color: var(--if-dim); }
.iflow-tips li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--if-accent); }
.iflow-tips b { color: var(--if-text); font-weight: 600; }

/* Test timeline */
.iflow-launch { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px; }
.iflow-launch-text { flex: 1; min-width: 220px; font-size: 12.5px; color: var(--if-dim); }
.iflow-tl { margin: 0; padding: 4px 0 0; list-style: none; }
.iflow-tl li { position: relative; display: flex; gap: 13px; padding: 0 0 18px; }
.iflow-tl li::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--if-line); border-radius: 2px; }
.iflow-tl li:last-child { padding-bottom: 0; }
.iflow-tl li:last-child::before { display: none; }
.iflow-tl li.is-done::before { background: rgba(63, 185, 80, 0.45); }
.iflow-tl .iflow-state { position: relative; z-index: 1; margin-top: 1px; }
.iflow-tl-main { flex: 1; min-width: 0; }
.iflow-tl-title { font-weight: 600; font-size: 13.5px; }
.iflow-tl li.is-todo .iflow-tl-title { color: var(--if-faint); font-weight: 500; }
.iflow-tl-sub { font-size: 12.5px; color: var(--if-dim); overflow-wrap: anywhere; }
.iflow-tl-actions { margin-top: 7px; display: flex; gap: 8px; flex-wrap: wrap; }
.iflow-tl-time { flex: none; font: 11px var(--if-mono); color: var(--if-faint); padding-top: 3px; }
.iflow-quote { margin: 6px 0 0; padding: 8px 11px; border-left: 2px solid var(--if-green); background: var(--if-green-soft); border-radius: 0 8px 8px 0; font-size: 12.5px; }

/* Finish */
.iflow-finish { text-align: center; padding: 6px 0 2px; }
.iflow-finish-badge {
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  color: #06130a; background: linear-gradient(135deg, #4ac860, var(--if-teal));
  box-shadow: 0 0 0 9px var(--if-green-soft); animation: iflow-pop 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.iflow-finish-badge svg { width: 28px; height: 28px; }
.iflow-finish .iflow-lead { margin-left: auto; margin-right: auto; }
.iflow-where { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 16px; text-align: left; }
.iflow-where-art { display: grid; gap: 5px; padding: 9px; border-radius: 10px; background: var(--if-sunken); border: 1px solid var(--if-line-soft); }
.iflow-where-art span { display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; font: 10.5px var(--if-mono); color: var(--if-faint); overflow: hidden; white-space: nowrap; }
.iflow-where-art span.is-on { background: var(--if-accent-soft); color: var(--if-accent); box-shadow: 0 0 0 1px var(--if-accent) inset; font-weight: 600; }
.iflow-where-art i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.iflow-where ul { margin: 6px 0 0; padding: 0 0 0 16px; font-size: 12.5px; color: var(--if-dim); }
.iflow-where li { margin: 2px 0; }
.iflow-finish-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.iflow-pane:focus { outline: none; }

/* Footer */
.iflow-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--if-line-soft); background: var(--if-bg); }
.iflow-foot-note { flex: 1; min-width: 0; font-size: 12px; color: var(--if-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iflow-foot-note.is-bad { color: var(--if-red); white-space: normal; }

/* ── Entry points (outside the scrim) ──────────────────────────────── */
.iflow-starter {
  display: flex; align-items: center; gap: 14px; width: min(560px, calc(100% - 48px));
  margin: 0 auto 28px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--if-line);
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(122, 162, 255, 0.14), transparent 70%),
    var(--if-panel);
  color: var(--if-text); text-align: left;
  font: 13px/1.45 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
.iflow-starter-art {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  color: var(--if-accent-ink); background: linear-gradient(135deg, var(--if-accent), var(--if-teal));
}
.iflow-starter-art svg { width: 21px; height: 21px; }
.iflow-starter-text { flex: 1; min-width: 0; }
.iflow-starter-text strong { display: block; font-size: 14px; font-weight: 650; }
.iflow-starter-text span { display: block; font-size: 12.5px; color: var(--if-dim); }
.iflow-starter-btn {
  flex: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; border: 0;
  font: 600 13px inherit; font-family: inherit; color: var(--if-accent-ink);
  background: linear-gradient(135deg, var(--if-accent), #6f8ff0);
}
.iflow-starter-btn:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .iflow-starter { flex-wrap: wrap; } .iflow-starter-btn { width: 100%; } }

/* Queues board: the bolt next to "new queue". */
.q2-iflow-btn { color: #7aa2ff; font-size: 14px; line-height: 1; }
.q2-iflow-btn svg { width: 15px; height: 15px; display: block; }

/* Coach mark shown on the Queues board after the wizard hands over. */
.iflow-coach-ring {
  position: fixed; z-index: 100040; pointer-events: none; border-radius: 9px;
  border: 2px solid var(--if-accent); box-shadow: 0 0 0 5px var(--if-accent-soft);
  animation: iflow-ring 1.4s ease-in-out infinite;
}
@keyframes iflow-ring { 50% { box-shadow: 0 0 0 11px rgba(122, 162, 255, 0); } }
.iflow-coach {
  position: fixed; z-index: 100041; width: 270px; padding: 13px 14px; border-radius: 12px;
  background: var(--if-panel); border: 1px solid var(--if-accent); color: var(--if-text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font: 12.5px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  animation: iflow-rise 0.22s ease-out;
}
.iflow-coach strong { display: block; margin-bottom: 3px; font-size: 13.5px; }
.iflow-coach p { margin: 0 0 9px; color: var(--if-dim); }
.iflow-coach button {
  padding: 5px 11px; border-radius: 7px; cursor: pointer; border: 0;
  font: 600 12px inherit; font-family: inherit; color: var(--if-accent-ink); background: var(--if-accent);
}

/* ── Small screens ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .iflow-scrim { padding: 0; }
  .iflow { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .iflow-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .iflow-steps { display: flex; gap: 4px; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--if-line-soft); overflow-x: auto; }
  .iflow-step { padding: 4px 6px; }
  .iflow-step::before, .iflow-step-sub { display: none; }
  .iflow-step:not(.is-current) .iflow-step-name { display: none; }
  .iflow-pipe { padding: 12px 10px 10px; }
  .iflow-node { flex-basis: 58px; }
  .iflow-node-label { font-size: 10px; }
  .iflow-node-cap { display: none; }
  .iflow-pane { padding: 18px 16px 20px; }
  .iflow-two, .iflow-where { grid-template-columns: 1fr; }
  .iflow-foot-note { display: none; }
  .iflow-foot { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .iflow-scrim, .iflow, .iflow-coach, .iflow-coach-ring, .iflow-finish-badge,
  .iflow-node-dot, .iflow-node-tick, .iflow-link::after { animation: none !important; }
  .iflow-link.is-flow::after, .iflow-pipe.is-demo .iflow-link::after { display: none; }
}

/* The initial workspace offers setup without covering the dashboard. */
.ccc-start-view {
  width: min(640px, calc(100% - 48px));
  margin: clamp(32px, 8vh, 88px) auto 32px;
  color: var(--text);
}
body.has-start-view #popoutSidePanelBtn { display: none; }
.ccc-start-view h1 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; text-wrap: balance; }
.ccc-start-intro { margin: 0 0 28px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.ccc-start-view .iflow-starter { width: 100%; box-sizing: border-box; margin: 0 0 12px; background: var(--if-panel); }
.ccc-start-view .iflow-starter-text span { margin-top: 5px; }
.ccc-start-view .iflow-starter-btn { min-height: 44px; }
.ccc-start-view .iflow-starter-btn:focus-visible { outline: 2px solid var(--if-accent); outline-offset: 3px; }
.ccc-start-view .iflow-starter-btn:disabled { opacity: .65; cursor: wait; }
@media (max-width: 560px) {
  .ccc-start-view { width: calc(100% - 32px); margin-top: 24px; }
}
