/* ===== CLASSIFICATION FLOW ===== */
.classify-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 100%);
}

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.flow-start { display: flex; justify-content: center; }

.flow-node {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.flow-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

.flow-dest {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 10px 22px;
}

.flow-dest.red { background: var(--red); box-shadow: 0 0 24px rgba(231,76,60,0.3); }
.flow-dest.blue { background: #2563eb; box-shadow: 0 0 24px rgba(74,158,255,0.3); }
.flow-dest.green { background: #16a34a; box-shadow: 0 0 24px rgba(46,204,113,0.3); }

.flow-example {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

.flow-arrow-down {
  width: 2px;
  height: 32px;
  background: var(--border);
  position: relative;
  margin: 0 auto;
}

.flow-arrow-down::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--border);
}

.flow-arrow-down.small { height: 20px; }
.flow-arrow-down.tiny { height: 14px; }

.flow-decision {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.flow-diamond {
  background: var(--bg-card);
  border: 2px solid var(--orange);
  transform: rotate(0deg);
  padding: 20px 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  width: 180px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(243,156,18,0.1);
}

.flow-diamond.small {
  width: 140px;
  height: 110px;
  font-size: 12px;
  padding: 16px 24px;
}

.flow-branches {
  display: flex;
  gap: 80px;
  justify-content: center;
  margin-top: 8px;
  position: relative;
}

/* Horizontal connector line */
.flow-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 2px;
  background: var(--border);
}

.flow-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 140px;
}

.flow-label-yes, .flow-label-no {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 4px;
}

.flow-label-yes { color: var(--green); background: #2ecc7118; }
.flow-label-no { color: var(--red-light); background: #e74c3c18; }

.flow-decision-2 {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.flow-sub-branches {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 8px;
  position: relative;
}

.flow-sub-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 2px;
  background: var(--border);
}

/* Scope tree inside the "Yes" branch */
.flow-scope-tree {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  min-width: 320px;
}

.flow-scope-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.flow-scope-row:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
}

.flow-scope-row.indent { margin-left: 24px; }
.flow-scope-row.indent-2 { margin-left: 48px; }

.flow-scope-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.flow-scope-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.flow-scope-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}

.flow-scope-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-style: italic;
}

@media (max-width: 768px) {
  .flow-branches, .flow-sub-branches { flex-direction: column; gap: 24px; align-items: center; }
  .flow-branches::before, .flow-sub-branches::before { display: none; }
  .flow-diamond { width: 150px; height: 120px; font-size: 12px; }
  .flow-scope-tree { min-width: unset; }
  .flow-scope-file { font-size: 10px; }
}
