.pipeline {
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.stagesContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
}

.stage {
  background: var(--ifm-background-color);
  border: 2px solid var(--ifm-color-emphasis-200);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.stage:hover {
  border-color: var(--ifm-color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stageHeader {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stageNumber {
  background: var(--ifm-color-primary);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.stageIcon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stage h3 {
  margin: 0;
  color: var(--ifm-color-primary);
  flex-grow: 1;
}

.stageDescription {
  margin: 0 0 1rem 0;
  color: var(--ifm-color-emphasis-800);
}

.stageDetails {
  margin-top: 1rem;
}

.detailItem {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-700);
}

.bullet {
  color: var(--ifm-color-primary);
  font-weight: bold;
  margin-top: 2px;
}

.arrow {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ifm-color-primary);
  z-index: 1;
}

@media (max-width: 768px) {
  .stagesContainer {
    grid-template-columns: 1fr;
  }
  
  .arrow {
    display: none;
  }
  
  .stage:nth-child(odd) {
    border-left: 4px solid var(--ifm-color-primary);
  }
}

.flowDiagram {
  margin: 4rem 0;
  text-align: center;
}

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding: 2rem 0;
  overflow-x: auto;
}

.flowItem {
  flex-shrink: 0;
}

.flowBox {
  background: var(--ifm-color-emphasis-100);
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 8px;
  padding: 1rem;
  min-width: 140px;
  text-align: center;
  font-weight: 600;
}

.flowBox small {
  display: block;
  font-weight: normal;
  color: var(--ifm-color-emphasis-700);
  margin-top: 0.5rem;
}

.flowArrow {
  font-size: 1.5rem;
  color: var(--ifm-color-primary);
  font-weight: bold;
}

.example {
  margin: 4rem 0;
  background: var(--ifm-color-emphasis-100);
  border-radius: 12px;
  padding: 2rem;
}

.exampleFlow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.exampleStage {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--ifm-color-primary);
  font-family: var(--ifm-font-family-monospace);
}

.note {
  margin-top: 4rem;
}

.note .card {
  padding: 2rem;
  border-radius: 12px;
}

.note h3 {
  margin-top: 0;
  color: var(--ifm-color-primary);
}

.note p {
  margin-bottom: 1rem;
}

.note p:last-child {
  margin-bottom: 0;
}

/* Dark mode adjustments */
[data-theme='dark'] .stage {
  border-color: var(--ifm-color-emphasis-300);
}

[data-theme='dark'] .flowBox {
  background: var(--ifm-color-emphasis-200);
}

[data-theme='dark'] .example {
  background: var(--ifm-color-emphasis-200);
}

[data-theme='dark'] .exampleStage {
  background: var(--ifm-background-surface-color);
}