

:root {
  /* Layout constants */
  --wf-step-w:  130px;
  --wf-step-h:  108px;
  --wf-conn-w:   44px;
  --wf-radius:   11px;
}

/* Colors specific to light mode */
[data-md-color-scheme="default"] {
    /* Columns colors */
    --wf-c1: #610085;
    --wf-c2: #a173a9;
    --wf-c3: #c38acd;
    
    --wf-ground:   #662e7d;
    --wf-surface:  #f5eff7;
    --wf-text:     var(--md-typeset-color);
    --wf-sub:      #f4f5f1;
    --wf-tag:      var(--md-typeset-color);
    --wf-accent:   #662e7d;
    --wf-accent-2: #f4f5f1;
    --wf-border:   #662e7d;
    --wf-muted:    #f4f5f1;
}

/* Colors specific to dark mode */
[data-md-color-scheme="slate"] {
    /* Columns colors */
    --wf-c1: #662e7d;/* #4f46e5; */
    --wf-c2: #c38acd; /*#ba4420;*/
    --wf-c3: #f4f5f1;

    --wf-ground:   #0d1117;;
    --wf-surface:  #161b2c;
    --wf-text:     #dde2f0;
    --wf-sub:      #7a8aa8;
    --wf-tag:      #f4f5f1;
    --wf-accent:   #dde2f0;
    --wf-accent-2: #c38acd;
    --wf-border:   #252d40;
    --wf-muted:    #4a5570;
}



/* ─── Global portal ─────────── */

.wf2-portal {
  background: var(--wf-ground);
  border: 1px solid var(--wf-border);
  border-radius: 16px;
  padding: 2rem 2.5rem 2.25rem;
  overflow-x: auto;
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.25);
}

.wf2-portal-header {
  margin-bottom: 1.75rem;
  user-select: none;
}

.wf2-eyebrow {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wf-accent-2);
  margin: 0 0 .35rem;
}

.wf2-lead {
  font-size: .85rem;
  color: var(--wf-sub);
  margin: 0;
}

/* ─── Board (phase lanes + separators) ─────────── */

.wf2-board {
  display: flex;
  align-items: stretch;
  min-width: max-content;
}

/* ─── Phase lane ─────────────────────────────────── */

.wf2-lane {
  flex: 1;
  min-width: 200px;
  border-radius: 12px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wf2-lane-header {
  padding: .7rem 1rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  border-bottom: 1px solid var(--wf-border);
}

.wf2-lane-tag {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--wf-tag);
}

.wf2-lane-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--wf-text);
}

/* Colored top accent per phase */
.wf2-lane-prepare { border-top: 3px solid var(--wf-c1); }
.wf2-lane-execute { border-top: 3px solid var(--wf-c2); }
.wf2-lane-iterate { border-top: 3px solid var(--wf-c3); }

.wf2-lane-steps {
  padding: .65rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1;
}

/* ─── Step rows inside lanes ──────────────────────── */

.wf2-step {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .65rem;
  border-radius: 8px;
  text-decoration: none !important;
  color: var(--wf-text) !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,.05);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.wf2-step:hover {
  transform: translateX(4px);
  background: rgba(255,255,255,.09);
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
}

.wf2-step:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: 2px;
}

/* Per-step colored left accent bar */
.wf2-s1 { border-left: 3px solid var(--wf-c1); }
.wf2-s2 { border-left: 3px solid var(--wf-c2); }
.wf2-s3 { border-left: 3px solid var(--wf-c3); }

.wf2-step .wf2-tag {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--wf-sub);
  min-width: 16px;
  flex-shrink: 0;
}

.wf2-step .wf2-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  fill: var(--wf-accent);
}

.wf2-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wf2-step .wf2-title {
  font-size: .73rem;
  font-weight: 700;
  color: var(--wf-text);
  white-space: nowrap;
}

.wf2-step .wf2-desc {
  font-size: .6rem;
  color: var(--wf-tag);
  white-space: nowrap;
}

.wf2-chevron {
  font-size: 1rem;
  flex-shrink: 0;
  transition: color .15s ease, transform .15s ease;
  line-height: 1;
}

.wf2-chevron::before { content: '›'; }

.wf2-step:hover .wf2-chevron {
  color: var(--wf-accent);
  transform: translateX(3px);
}

/* Light mode: steps as white cards on the tinted lane */
[data-md-color-scheme="default"] .wf2-step {
  background: #ffffff;
  /* Leave border-left alone: it carries the per-step accent color */
  border-top-color: #e4d6ea;
  border-right-color: #e4d6ea;
  border-bottom-color: #e4d6ea;
}

[data-md-color-scheme="default"] .wf2-step:hover {
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(102, 46, 125, .18);
}

[data-md-color-scheme="default"] .wf2-lane-header {
  border-bottom-color: #e4d6ea;
}

/* ─── Phase separator (between lanes) ────────────── */

.wf2-phase-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 .65rem;
  flex-shrink: 0;
}

.wf2-sep-top,
.wf2-sep-bot {
  width: 1px;
  flex: 1;
  background: var(--wf-border);
  min-height: 12px;
}

.wf2-sep-arrow {
  font-size: 1.1rem;
  color: var(--wf-muted);
  user-select: none;
  padding: .35rem 0;
  /*animation: wf2-nudge 2s ease-in-out infinite;*/
}

.wf2-sep-arrow::before { content: '→'; }

@keyframes wf2-nudge {
  0%, 100% { opacity: .4; transform: translateX(0); }
  50%       { opacity: .9; transform: translateX(3px); }
}

/* ─── Responsive: stack columns on mobile ────────── */

@media (max-width: 720px) {
  .wf2-portal {
    padding: 1.25rem 1rem;
    border-radius: 10px;
  }

  .wf2-board {
    flex-direction: column;
    min-width: unset;
  }

  .wf2-lane {
    min-width: unset;
    border-radius: 10px;
  }

  .wf2-phase-sep {
    flex-direction: row;
    padding: .45rem 0;
    height: auto;
    align-self: stretch;
  }

  .wf2-sep-top,
  .wf2-sep-bot {
    width: auto;
    height: 1px;
    flex: 1;
    min-height: unset;
    min-width: 12px;
  }

  .wf2-sep-arrow {
    padding: 0 .5rem;
    animation: none;
    opacity: .6;
  }

  .wf2-sep-arrow::before { content: '↓'; }
}

@media (prefers-reduced-motion: reduce) {
  .wf2-sep-arrow { animation: none; }
}
